Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix(web): 云下载改在原页弹层提交,活动页只列任务

longmeidaoccd946f77d41
diff --git a/README.md b/README.md
index 36ee93959..69115b347 100644
--- a/README.md
+++ b/README.md
@@ -71,8 +71,8 @@ https://github.com/user-attachments/assets/a5610874-e611-41bb-be22-7d99f0d64b62
- **播放**:在浏览器里直接播放,记下看到哪;可以点喜欢、打分、稍后看、加进播放列表,也能「记一次高潮」。
- **追新作**:在女优页打开订阅,或在关注管理里按名字订阅,馆藏中尚未收录的女优也可订阅。Peach 会定期检查新作;创作者可跨 FANBOX、Patreon、Kemono 等站点关注,不同站点的同一作品合成一张卡。
- **JAV 入库**:在新作卡或关注内容上点「想要」,也可以直接输入番号。作品卡自动查找 JavDB 资源区与评论中的链接,合并重复资源,显示属性、大小和日期;磁链可以直接添加到 115 或 PikPak,其他链接可以复制。文件扫进馆藏后自动标为已入库,久找不到的老片可重新查找。
-- **云下载**:在活动页贴一条磁力,交给 115 或 PikPak 离线下载,下载完自动入库;关注条目和想要清单也有入口。
-- **按番号找资源**:在本机配置页「下载」里添加自己的 Prowlarr 或 Jackett 索引器,在活动页「云下载」按番号搜索。可按体积筛选,优先找高清、中字或无码;选中候选后确认提交。
+- **云下载**:在 JAV 入库页、高清版目标或关注条目上打开云下载,贴一条磁力交给 115 或 PikPak 离线下载,下载完自动入库;任务进度在活动页看。
+- **按番号找资源**:在本机配置页「下载」里添加自己的 Prowlarr 或 Jackett 索引器,在云下载弹层里按番号搜索。可按体积筛选,优先找高清、中字或无码;选中候选后确认提交。
- **统计**:片子存在哪块盘、看过多少、标签分布,一页看完。
- **外观**:深色浅色、主题色、侧栏顺序都能自己调。
- **多端**:电脑、平板、手机的浏览器都能用。
diff --git a/docs/CLOUDDRIVE.md b/docs/CLOUDDRIVE.md
index 647b04223..badf611e3 100644
--- a/docs/CLOUDDRIVE.md
+++ b/docs/CLOUDDRIVE.md
@@ -125,7 +125,7 @@ Peach 不实时监视网盘目录,因为每列一次目录都是一次网络
令牌、refresh token 和保存的密码只存在这台电脑的凭据文件里,不进设置文件,不随设置同步,也不写进日志和账本。
-提交入口在活动页(`/activity`)的「云下载」段:贴磁力、选 115 或 PikPak、确认目标目录后提交。作品详情和关注条目上的「云下载」键会带着番号和标题进到这里,只需要再贴磁力。同一个磁力(按 infohash 判断)已经有任务时,Peach 接着跟进那一条,不重复提交。
+提交在云下载弹层里:JAV 入库页每条作品的「搜索资源」与页上的「提交磁力」、高清版目标卡的「搜索资源」、关注详情的「云下载」键都在原页打开它,带上番号和标题;按番号搜索或贴磁力、选 115 或 PikPak、确认目标目录后提交。提交过的任务在活动页(`/activity`)的「云下载」段看进度。同一个磁力(按 infohash 判断)已经有任务时,Peach 接着跟进那一条,不重复提交。
任务卡显示状态和失败原因,在远端跑的可以取消,失败、取消和停滞的可以重新提交,每张卡都能复制磁力。几条规则:
diff --git a/docs/FRONTEND.md b/docs/FRONTEND.md
index 861558bb0..1047e9a11 100644
--- a/docs/FRONTEND.md
+++ b/docs/FRONTEND.md
@@ -159,7 +159,7 @@ React Router 以 Declarative 模式接管历史(`frontend/src/react/router/`
- 历史只有一份:`@peach/history` 随 `peach-ui.js` 发出,壳的 `route()` 经 `shellNavigate` 写地址,`<Router>` 的 `navigator` 也是它。路由树挂在一个不进文档的容器上,管理区那一页与播放列表页、关注页经 portal 画进 `#stats`,索引页与资料页画进 `#index`,目录网格与垃圾队列画进 `#grid`。
- 派发点 `RouteDispatch` 是两组 `<Routes>` 的兄弟,从头到尾是同一个实例。它在每次历史变化后报给 `routeSeen`,由它决定要不要调 `restoreRoute`。报在提交阶段之后的微任务里:壳打开那一屏时用 `flushSync` 画侧栏等岛,提交阶段内的 `flushSync` 不同步刷新别的根。`<Routes>` 里那十五页、资料页的五个模式、`#grid` 那两页的六条路径与 `/resource-sync` 只声明路径,其余落在 `path="*"`。这是页面组,按条目 `usr.backgroundLocation` 匹配,详情压在哪一页上就还匹配那一页;覆盖组按真实地址匹配 `OVERLAY_PATHS`(详情、四种队列、关注详情),元素为空,`path="*"` 兜底,两组都不会报没有路由。
- 管理区宿主跟着壳登记的那一条走,不跟地址:壳的 `openXxx` 照旧收舞台、铺骨架、认领表面,再 `openManagedRoute(path, open, {container, isCurrent, place})`。它领一个代次、先取首屏,取齐后在同一个任务里清掉骨架、放进 `.peach-react` 宿主(给了 `place` 就由它把壳排的框架换进容器、交出宿主),宿主用 `flushSync` 当场画完,骨架与正文之间没有空白帧;同一路径再打开就是新代次,页面重挂重取。三个容器各记一条、互不相收,`releaseManagedRoute` 逐个点名容器:`claimSurface` 收 `#stats` 与 `#index`,`showHomeSurfaces` 只收 `#index` 那一条,`#grid` 只由 `clearCatalogGrid` 收,资料页压在管理页上时管理页藏着照常活;详情舞台推 `/item/:id` 不经过它们,页面留在舞台下面。打开之后壳的开关(选择键、资料页换筛选与版式)经 `updateManagedRoute(container, patch)` 合进画着的那一页:代次不变,不重挂、不重取,照常排进下一次渲染。
-- `open` 只带那一次才算得出的值(地址上的分类与页签、只读状态、引导标记、云下载预填);回执与换到还归壳的那几屏走壳交给 `configureRouter(actions)` 的 `ShellActions`,经 Context 下发。管理区十页之间的跳转交 `navigate`,派发照旧回到壳;别的路径(含索引页与资料页)交 `actions.navigate`。配置页页签与云下载预填先交给壳再换地址,不进地址栏。判据钉在 `test/react/managed-routes.test.tsx`。
+- `open` 只带那一次才算得出的值(地址上的分类与页签、只读状态、引导标记);回执与换到还归壳的那几屏走壳交给 `configureRouter(actions)` 的 `ShellActions`,经 Context 下发。管理区十页之间的跳转交 `navigate`,派发照旧回到壳;别的路径(含索引页与资料页)交 `actions.navigate`。配置页页签先交给壳再换地址,不进地址栏。判据钉在 `test/react/managed-routes.test.tsx`。
- 派发判据是序号:每次历史变化领一个 `seq`;`shellNavigate` 写的那一次当场认领,不派发;后退前进与 React 子树里的 `navigate` 没人认领,派发一次。地址不变的 `popstate` 也领新序号,照样派发。
- 启动:壳在启动链上 `startRouting(restoreRoute)` 派发第一次,并认领到当时的序号。Router 先挂上时它报的序号已在其中;后挂上时读到的初值就是这一个。包到之前发生的后退前进,等 Router 挂上时补派一次。判据钉在 `test/react/router.test.tsx`。
diff --git a/docs/PRODUCT_BACKLOG.md b/docs/PRODUCT_BACKLOG.md
index 56c67673c..ea0b474b0 100644
--- a/docs/PRODUCT_BACKLOG.md
+++ b/docs/PRODUCT_BACKLOG.md
@@ -29,7 +29,7 @@
| --- | --- | --- |
| 开发流程 | 隔离工作树自动同步 Python 依赖,主检出只读核对;commit-msg 检查署名、已有 README 声明和分段 | `scripts/test_environment.py`、`scripts/test.ps1`、`scripts/test.sh`、`scripts/check_commit_message.py`、`scripts/githooks/` |
| 首次前端导入 | React 导入钩子各有 30 秒上限,普通用例沿用默认超时 | `frontend/test/islands.test.ts` |
-| 42、43 | 云下载、JavDB 卡片资源、自配 Torznab 搜索、体积和质量筛选已具备;资源搜索正式全量、桌面、手机与 Windows 生产 HTTPS 核验通过,已合入并上线;本地下载、JavBus、真实索引器验收与未来 App 通道仍待补 | `src/peach/resource_search.py`、`src/peach/wants_magnets.py`、活动页资源搜索与来源配置 |
+| 42、43 | 云下载、JavDB 卡片资源、自配 Torznab 搜索、体积和质量筛选已具备;资源搜索正式全量、桌面、手机与 Windows 生产 HTTPS 核验通过,已合入并上线;本地下载、JavBus、真实索引器验收与未来 App 通道仍待补 | `src/peach/resource_search.py`、`src/peach/wants_magnets.py`、云下载弹层的资源搜索与来源配置 |
| 46 | 周期挂载快照、故障分类、托盘提示和 NAS 目录过滤已合入,正式全量、桌面、手机与 Windows 生产 HTTPS 核验通过;本地来源目录不存在,115 与 PikPak 可读取;Mac 挂载验收待补 | `src/peach/mount_reachability.py`、`src/peach/platform.py`、API、扫描与托盘回归 |
| 21、26 | doctor、分级健康检查和系统诊断页已在 Windows 上线,全量 5959 项、浏览器 389 项及严格 CA 核验通过;库健康清单、来源证据和冷却可查,Mac 验收待补 | `src/peach/diagnostics.py`、`src/peach/library_diagnostics.py`、诊断页面与回归 |
| 11、20 | CI 已有不检出源码的 wheel 消费冒烟;完整矩阵结果、minimal source 与 artifact-only 验收仍待补齐 | `.github/workflows/test.yml`、`scripts/smoke_wheel.py` |
@@ -154,7 +154,7 @@
42. **本地下载:走用户自己的 BT 客户端与直链**:BT 通过用户本机下载器的 Web API 提交,Peach 不实现 BT 协议:qBittorrent 用 `/api/v2/auth/login`、`torrents/add`(`urls`、`savepath`、`category`/`tags`)、`torrents/info?hashes=`、`torrents/delete`;Transmission 用 `torrent-add`、`torrent-get`、`torrent-remove`,首个请求回 409 后带 `X-Transmission-Session-Id` 重发。保存路径必须落在某个本地来源根之内,watchdog 才看得到。关注来源附件(FANBOX、Patreon、Gofile 等)的直链由 Peach 自己下载。写新文件、不碰已有文件;占本机流量与磁盘,复用 `jobs.py` 的计费来源与磁盘闸门,预算见「待执行的操作」第 12 条。长下载用第 57 条的续传与停滞看门狗。
- 复用云下载的任务表、状态机与九类失败分类(`src/peach/downloads.py`,ADR-0089),只有瞬时网络自动重试;qB `metaDL`/`stalledDL` 归「无源或停滞」,落地未见时定向触发 `ingest_path`。
43. **资源搜索与候选筛选**:Torznab 是协议不是平台,基于 Newznab 扩展(`https://torznab.github.io/spec-1.3-draft/`);Jackett、Prowlarr 是把它翻译成各站请求的代理,Sonarr/Radarr 是客户端。Peach 作客户端接用户自己配置的 Prowlarr/Jackett,不内置站点定义:先 `t=caps`,再 `t=search&q=<番号>&cat=6000`,解析 `item` 的 `title`、`size`、`pubDate` 与 `torznab:attr` 的 `seeders`、`peers`、`magneturl`、`infohash`;磁力可能在 `magneturl`、`link` 或 `guid` 任一处,按内容判断(SakuraMedia `src/service/transfers/downloads/clients/torznab.py`,FC2 番号只搜纯数字,部分索引器失败不算整体失败)。
- - 自配 Torznab、凭据本机保存、候选筛选与最多五条结果、活动页填入云下载表单已实现。「寻找更好版本」页和详情页带入番号与原目标;明确的中字、无码目标自动选排序,其余文字保留供用户复核。真实索引器验收与 JavBus 作品页来源仍待补齐;逐条确认提交下载。
+ - 自配 Torznab、凭据本机保存、候选筛选与最多五条结果、填入云下载弹层已实现。「寻找更好版本」页和详情页带入番号与原目标;明确的中字、无码目标自动选排序,其余文字保留供用户复核。真实索引器验收与 JavBus 作品页来源仍待补齐;逐条确认提交下载。
- Jackett 与 Prowlarr 都内置 `sukebeinyaasi`、`onejav`、`freejavtorrent`(公开)与 `clearjav-api`(私有,只收官方片商作品)的定义。sukebei 没有清晰度分类,Jackett 把它整站映射成 6000,4K 只能在 `q` 里加关键词,再从标题解析;索引器名单里没有专收 4K 的公开源。
- 作品页资源还需接 JavBus:从详情页脚本取 `gid`、`uc` 后请求 `ajax/uncledatoolsbyajax.php`(带 Referer),每行有名称、大小、日期与「高清」「字幕」标记(garage `garage_jav/javbus.go`、Atlas `services/jav-utils.ts` 的 `parseMagnets`)。
- 候选筛选取 SakuraMedia `auto_download_service.py` 的判据并加强:标题解析出的番号对不上就剔除、体积区间、做种数大于 0、infohash 黑名单、最多试 5 个;Peach 另从标题与标签解析分辨率(`4K`、`2160p`)、编码、中字与无码标记,按「寻找更好版本」的目标排序,不只按体积。
diff --git a/docs/REUSE.md b/docs/REUSE.md
index ab0a1ee1e..d091aee8e 100644
--- a/docs/REUSE.md
+++ b/docs/REUSE.md
@@ -44,7 +44,7 @@ FC2 卖家名册复用 `sources/fc2.py` 的 `label`、`seller_url` 来源契约
请求复用 HTTPX 0.28.1。SDK 自带 requests 请求层没有响应大小上限,异常可能带完整 URL,故只使用其解析器。Peach 负责每源 caps 和 search 两次请求、至多六份种子、响应上限 2 MiB、每轮最多四源、45 秒预算、禁用重定向、脱敏错误、XML 实体声明拒收,以及体积、做种、黑名单、质量排序和最多五个候选。标题番号复用 `feeds.scan_code`,身份与中字、无码版次复用 `catalog_rules`。凭据复用 `CredentialStore`,不登记跨机同步字段;换端点不会沿用已保存的 API key。
-已对照 [Torznab 1.3 规范](https://torznab.github.io/spec-1.3-draft/torznab/Specification-v1.3.html) 与 SakuraMedia `torznab.py`(GPL-3.0,revision `9c6a31915c9a364c9d6717798575daf9445916bd`)的 FC2 查询、磁力字段回退与部分失败边界。SakuraMedia 耦合其 ORM,不作为运行时依赖。候选由活动页填入现有云下载表单,经用户确认后走 `submit_offline_download`。
+已对照 [Torznab 1.3 规范](https://torznab.github.io/spec-1.3-draft/torznab/Specification-v1.3.html) 与 SakuraMedia `torznab.py`(GPL-3.0,revision `9c6a31915c9a364c9d6717798575daf9445916bd`)的 FC2 查询、磁力字段回退与部分失败边界。SakuraMedia 耦合其 ORM,不作为运行时依赖。候选填入云下载弹层的磁力框,经用户确认后走 `submit_offline_download`。
OneJAV、Free JAV Torrent 只给种子链接。这类条目经索引器同源的下载代理取种子,由 bencode2 0.3.35(MIT,Python ≥3.10,有 cp314 Windows wheel 与纯 Python wheel)解码,再对 info 字典求 SHA-1。实证:真实 sukebei 种子算出的哈希与 Torznab `infohash` 一致;Prowlarr 代理对 OneJAV、Free JAV Torrent 返回 `application/x-bittorrent`。bencode2 和 fastbencode 0.3.11(Apache-2.0)都拒收键乱序的字典,重新编码就是原文。选 bencode2 是因为它有纯 Python 后备。torf(GPL-3.0)功能远超所需,bencode.py(BitTorrent 许可)、bencodepy(2015 年后停更)不采用。
diff --git a/docs/adr/0089-cloud-offline-download.md b/docs/adr/0089-cloud-offline-download.md
index 0b58ddd10..53fe860fb 100644
--- a/docs/adr/0089-cloud-offline-download.md
+++ b/docs/adr/0089-cloud-offline-download.md
@@ -57,3 +57,9 @@ infohash 已有任务就接管、不重复提交、不再扣配额;`download_s
服务才起得来。
- 115 剩余配额、令牌离线权限与 PikPak 人机验证后的登录,要用户填入真实令牌与账号后才能验证。
- README 常见问题写明 PikPak 账号的 token 存在本机。
+
+## 修订:提交改在原页的弹层里(2026-10-08)
+
+活动页的「云下载」段只列任务,不再有提交表单。JAV 入库页、高清版目标卡与关注详情在原页打开同一个
+云下载弹层(`frontend/src/react/activity/cloud-download-dialog.tsx`),番号、标题与来处直接交给弹层,
+不经壳转交、也不换页;第五条「入口不进地址栏」照旧成立。作品详情上没有这颗键。
diff --git a/frontend/src/react/activity/activity-page.tsx b/frontend/src/react/activity/activity-page.tsx
index 5d83d7c36..26fe27da0 100644
--- a/frontend/src/react/activity/activity-page.tsx
+++ b/frontend/src/react/activity/activity-page.tsx
@@ -20,7 +20,6 @@ import { Chip } from '@/components/base/badges/chip';
import { Button } from '@/components/base/buttons/button';
import { errorMessage } from '../../api';
-import type { ActivityProps } from '../bundle';
import { cardClass } from '../components/card';
import { EmptyState } from '../components/empty-state';
import { LoadingDots } from '../components/loading-dots';
@@ -158,7 +157,7 @@ function RunList({ live = false, children }: { live?: boolean; children: ReactNo
);
}
-export function ActivityPage({ prefill }: ActivityProps) {
+export function ActivityPage() {
const tasks = useQuery({
queryKey: TASKS_KEY,
queryFn: ({ signal }) => fetchTasks(signal),
@@ -260,7 +259,7 @@ export function ActivityPage({ prefill }: ActivityProps) {
: null}
</>}
{/* 离线下载跑在网盘那头,自己一张表、自己轮询;任务中心为空时它照样在。 */}
- <Section title="云下载"><DownloadsPanel prefill={prefill} /></Section>
+ <DownloadsPanel />
</Page>
);
}
diff --git a/frontend/src/react/activity/cloud-download-dialog.tsx b/frontend/src/react/activity/cloud-download-dialog.tsx
new file mode 100644
index 000000000..8b0dee194
--- /dev/null
+++ b/frontend/src/react/activity/cloud-download-dialog.tsx
@@ -0,0 +1,158 @@
+/* 云下载弹层:在点它的那一页原地打开,搜索索引器或贴磁力,交给 115 或 PikPak 离线下载。
+ *
+ * 入口有三处:JAV 入库页(每条作品与页头那一颗)、高清版目标卡、关注详情。它们把番号、
+ * 标题和来处(`prefill`)交进来,提交时一并记在任务上;提交过的任务在活动页「云下载」段看。
+ *
+ * 下载配置(`/api/downloads`)在弹层打开时才取,和活动页、入库页读同一个缓存键。
+ * 关注详情是 `showModal()` 开的原生 dialog,`anchor` 指着触发键,弹层挂进同一层才盖得住它。 */
+import { useRef, useState, type FormEvent, type ReactNode, type RefObject } from 'react';
+import { useQuery, useQueryClient } from '@tanstack/react-query';
+import { UNSAFE_PortalProvider } from 'react-aria';
+import { Heading } from 'react-aria-components';
+
+import { Button } from '@/components/base/buttons/button';
+import { Input } from '@/components/base/input/input';
+import { Select, SelectItem } from '@/components/base/select/select';
+
+import { apiGet, apiSend, errorMessage } from '../../api';
+import type { DownloadProviderKey, DownloadsSnapshot, DownloadSubmitResult } from '../bundle';
+import { ModalFrame } from '../components/modal-frame';
+import { Note } from '../components/note';
+import { overlayHost } from '../components/overlay-host';
+import { ErrorText, FieldLabel, Help } from '../settings/section';
+import { busyProps, useAction } from '../settings/use-action';
+import { DOWNLOADS_KEY, DOWNLOADS_URL, downloadPollInterval, failureText } from './downloads-panel';
+import { ResourceSearch } from './resource-search';
+
+/** 入口带进来的上下文。`origin` 记在任务上,如 `asset:12`、`follow:34`、`wishlist:5`。 */
+export interface DownloadPrefill { code?: string; title?: string; origin?: string; searchReason?: string }
+
+const RECEIPTS: Partial<Record<DownloadSubmitResult['outcome'], string>> = {
+ submitted: '已提交离线下载,进度在活动页',
+ adopted: '这个磁力已有任务,没有重复提交',
+ adopted_remote: '远端已有同一任务,已接管',
+};
+
+export function CloudDownloadDialog({ prefill, close, receipt, provider, anchor }: {
+ /** 空就是关着;不带番号与标题的空对象是「随手贴一条磁力」。 */
+ prefill: DownloadPrefill | null;
+ close(): void;
+ receipt(message: string): void;
+ /** 打开时先选中的下载方式,入库页把页上那一份交进来。 */
+ provider?: string;
+ anchor?: RefObject<Element | null>;
+}) {
+ const frame = (
+ <ModalFrame isOpen={Boolean(prefill)} onOpenChange={(open) => { if (!open) close() }} width="form">
+ {prefill ? <Body prefill={prefill} close={close} receipt={receipt} provider={provider} /> : null}
+ </ModalFrame>
+ );
+ return anchor
+ ? <UNSAFE_PortalProvider getContainer={() => overlayHost(anchor.current)}>{frame}</UNSAFE_PortalProvider>
+ : frame;
+}
+
+function Body({ prefill, close, receipt, provider }: {
+ prefill: DownloadPrefill; close(): void; receipt(message: string): void; provider?: string;
+}) {
+ const query = useQuery({
+ queryKey: DOWNLOADS_KEY,
+ queryFn: ({ signal }) => apiGet<DownloadsSnapshot>(`${DOWNLOADS_URL}?limit=50`, signal),
+ refetchInterval: (state) => downloadPollInterval(state.state.data),
+ });
+ const data = query.data;
+ const configured = data?.providers.filter((row) => row.configured) ?? [];
+ const subject = [prefill.code, prefill.title].filter(Boolean).join(' ');
+ const header = (
+ <div className="flex flex-col gap-1 px-5 pt-5">
+ <Heading slot="title" className="text-title-2-semibold text-text-primary">云下载</Heading>
+ {subject ? <p className="min-w-0 truncate text-body-2-regular text-text-secondary">{subject}</p> : null}
+ </div>
+ );
+ if (data?.available && configured.length) {
+ return <SubmitForm header={header} snapshot={data} prefill={prefill} close={close} receipt={receipt} provider={provider} />;
+ }
+ return (
+ <div className="flex min-h-0 flex-col">
+ {header}
+ <div className="flex flex-col gap-4 p-5">
+ {query.error ? <Note tone="error">{errorMessage(query.error)}</Note> : null}
+ {data && !data.available ? <Note tone="neutral">云下载只在账本写入端可用。</Note> : null}
+ {data?.available && !configured.length
+ ? <Note tone="neutral">先在配置页「下载」分组登录 PikPak,或填好 CloudDrive2 的地址与令牌。</Note>
+ : null}
+ </div>
+ <div className="flex justify-end p-3">
+ <Button variant="secondary" onClick={close}>关闭</Button>
+ </div>
+ </div>
+ );
+}
+
+function SubmitForm({ header, snapshot, prefill, close, receipt, provider: preferred }: {
+ header: ReactNode; snapshot: DownloadsSnapshot; prefill: DownloadPrefill;
+ close(): void; receipt(message: string): void; provider?: string;
+}) {
+ const client = useQueryClient();
+ const configured = snapshot.providers.filter((row) => row.configured);
+ const first = configured.find((row) => row.key === preferred) ?? configured[0]!;
+ const [provider, setProvider] = useState<DownloadProviderKey>(first.key);
+ const [magnet, setMagnet] = useState('');
+ const [code, setCode] = useState(prefill.code ?? '');
+ const [target, setTarget] = useState(first.target);
+ const [failure, setFailure] = useState('');
+ const action = useAction();
+ const input = useRef<HTMLInputElement>(null);
+
+ const choose = (key: DownloadProviderKey) => {
+ setProvider(key);
+ setTarget(configured.find((row) => row.key === key)?.target ?? '');
+ };
+
+ const submit = (event: FormEvent<HTMLFormElement>) => {
+ event.preventDefault();
+ if (!magnet.trim()) return;
+ const body = { magnet, provider, target, code, title: prefill.title, origin: prefill.origin };
+ setFailure('');
+ void action.run('submit', (signal) => apiSend<DownloadSubmitResult>(DOWNLOADS_URL, body, 'POST', signal),
+ (next) => {
+ void client.invalidateQueries({ queryKey: DOWNLOADS_KEY });
+ const text = RECEIPTS[next.outcome];
+ if (next.ok && text) { receipt(text); close(); return }
+ const reason = failureText(next.task);
+ setFailure(next.outcome === 'refused' ? '这个资源被判为违规,不再提交。'
+ : reason ? `提交没有成功:${reason}` : '提交没有成功。');
+ });
+ };
+
+ return (
+ <form aria-label="提交磁力" noValidate onSubmit={submit} className="flex min-h-0 flex-col">
+ {header}
+ <div className="flex min-h-0 flex-col gap-4 overflow-y-auto p-5">
+ <ResourceSearch initialCode={prefill.code ?? ''} reason={prefill.searchReason} choose={(uri, selectedCode) => {
+ setMagnet(uri); setCode(selectedCode); input.current?.focus();
+ }} />
+ <Input ref={input} label="磁力链接" placeholder="magnet:?xt=urn:btih:…" autoComplete="off" maxLength={4000}
+ value={magnet} onChange={setMagnet} />
+ <div className="flex flex-col gap-1">
+ <FieldLabel>下载到</FieldLabel>
+ <Select aria-label="下载到" selectedKey={provider}
+ onSelectionChange={(key) => { if (key !== null) choose(String(key) as DownloadProviderKey) }}>
+ {configured.map((row) => <SelectItem key={row.key} id={row.key}>{row.label}</SelectItem>)}
+ </Select>
+ {provider === '115' ? <Help>每提交一次扣一条离线配额,重新提交也算。</Help> : null}
+ </div>
+ <Input label="目标目录" placeholder="/云下载" autoComplete="off" maxLength={300}
+ value={target} onChange={setTarget} />
+ {/* 带着番号进来时它和搜索框是同一个值,选中候选也会跟着换,不再单列一格。 */}
+ {prefill.code ? null
+ : <Input label="番号" placeholder="可不填" autoComplete="off" maxLength={60} value={code} onChange={setCode} />}
+ {failure || action.error ? <ErrorText>{failure || action.error}</ErrorText> : null}
+ </div>
+ <div className="flex justify-between gap-4 p-3">
+ <Button variant="secondary" onClick={close}>取消</Button>
+ <Button type="submit" disabled={!magnet.trim()} {...busyProps(action.busy === 'submit')}>提交离线下载</Button>
+ </div>
+ </form>
+ );
+}
diff --git a/frontend/src/react/activity/downloads-panel.tsx b/frontend/src/react/activity/downloads-panel.tsx
index ab66ef107..761f45643 100644
--- a/frontend/src/react/activity/downloads-panel.tsx
+++ b/frontend/src/react/activity/downloads-panel.tsx
@@ -1,41 +1,31 @@
-/* 活动页「云下载」段:粘贴磁力交给 115 或 PikPak 离线下载,下面是提交过的任务。
+/* 活动页「云下载」段:提交过的离线下载任务。提交在各页原地的弹层里(`cloud-download-dialog.tsx`)。
*
* 任务表是 `/api/downloads` 自己的一份,不并进 `/api/tasks`:离线任务跑在网盘那头,一跑
* 几小时到几天,是一条带远端编号的提交记录,不是这台电脑上的一轮批处理。所以这一段自己取数、
* 自己轮询:有任务还在远端跑或等着落盘时五秒一次,全是终态三十秒一次。后台的对账节律由
* 服务端定(提交后约十秒查一次,之后退避),这里只是把它查到的结果读出来。
*
- * 关注条目、想要清单与高清版目标页上的「云下载」键把番号、标题和来处交进来(`prefill`),用户只需要贴磁力。
- * 失败的任务给中文原因;失败、取消与停滞的可以重新提交,被判违规的不给(服务端也会拒)。
- * 每张卡都能复制磁力:接口失效时退回手动添加。 */
-import { useEffect, useRef, useState } from 'react';
-import type { FormEvent } from 'react';
+ * 一条任务都没有时整段不画。失败的任务给中文原因;失败、取消与停滞的可以重新提交,被判
+ * 违规的不给(服务端也会拒)。每张卡都能复制磁力:接口失效时退回手动添加。 */
+import { useId, useState } from 'react';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import { Chip } from '@/components/base/badges/chip';
import { Button } from '@/components/base/buttons/button';
-import { Input } from '@/components/base/input/input';
-import { Select, SelectItem } from '@/components/base/select/select';
-import { SettingsCard } from '@/components/application/settings/settings-rows';
import { apiGet, apiSend, errorMessage } from '../../api';
-import type { DownloadProviderKey, DownloadsSnapshot, DownloadSubmitResult, DownloadTask } from '../bundle';
+import type { DownloadsSnapshot, DownloadTask } from '../bundle';
import { cardClass } from '../components/card';
import { Note } from '../components/note';
import { Progress } from '../components/progress';
-import { ErrorText, FieldLabel, Footer, Help, Stack } from '../settings/section';
+import { ErrorText } from '../settings/section';
import { busyProps, useAction } from '../settings/use-action';
import { momentText } from './tasks';
-import { ResourceSearch } from './resource-search';
-import type { CloudDownloadPrefill } from '../router/shell-actions';
export const DOWNLOADS_URL = '/api/downloads';
export const DOWNLOADS_KEY = ['downloads'] as const;
const CANCEL_URL = '/api/downloads/cancel';
-/** 作品页与关注条目带进来的上下文。`origin` 记在任务上,如 `asset:12`、`follow:34`。 */
-export type DownloadPrefill = CloudDownloadPrefill;
-
export const downloadPollInterval = (data: DownloadsSnapshot | undefined) =>
data?.tasks.some((task) => task.cancellable) ? 5_000 : 30_000;
@@ -43,120 +33,34 @@ const STATE_COLORS: Record<string, 'lime' | 'rose' | 'yellow'> = {
ingested: 'lime', failed: 'rose', cancelled: 'yellow', stalled: 'yellow',
};
-const OUTCOME_TEXT: Record<DownloadSubmitResult['outcome'], string> = {
- submitted: '已提交,远端开始下载后这里会显示进度。',
- adopted: '这个磁力已经有任务了,接着跟进那一条,没有重复提交。',
- adopted_remote: '远端已经有同一个任务,已接管,没有再扣配额。',
- refused: '这个资源被判为违规,不再提交。',
- failed: '提交没有成功。',
-};
-
const taskName = (task: DownloadTask) =>
task.title || task.display_name || task.remote_name || task.code || `磁力 ${task.info_hash?.slice(0, 8) ?? task.id}`;
-const failureText = (task: DownloadTask) =>
+export const failureText = (task: DownloadTask) =>
task.failure_label ? [task.failure_label, task.failure_detail].filter(Boolean).join(':') : '';
-export function DownloadsPanel({ prefill }: { prefill?: DownloadPrefill }) {
+export function DownloadsPanel() {
+ const id = useId();
const query = useQuery({
queryKey: DOWNLOADS_KEY,
queryFn: ({ signal }) => apiGet<DownloadsSnapshot>(`${DOWNLOADS_URL}?limit=50`, signal),
refetchInterval: (state) => downloadPollInterval(state.state.data),
});
const data = query.data;
- if (!data) {
- return query.error ? <Note tone="error">{errorMessage(query.error)}</Note> : null;
- }
- const configured = data.providers.filter((provider) => provider.configured);
+ if (!data?.tasks.length && !query.error) return null;
return (
- <>
+ <section aria-labelledby={id} className="flex min-w-0 flex-col gap-3">
+ <h3 id={id} className="text-title-2-semibold text-text-primary">云下载</h3>
{query.error ? <Note tone="error">{errorMessage(query.error)}</Note> : null}
- {!data.available
- ? <Note tone="neutral">云下载只在账本写入端可用。</Note>
- : configured.length
- ? <SubmitForm snapshot={data} prefill={prefill} />
- : <Note tone="neutral">
- 还没有配置云下载。在配置页「下载」分组填好 CloudDrive2 的地址与令牌,或登录 PikPak,
- 这里就能粘贴磁力提交离线下载。
- </Note>}
- {data.tasks.length
+ {data?.tasks.length
? <ul aria-live="polite" className="flex min-w-0 flex-col gap-3">
{data.tasks.map((task) => <TaskCard key={task.id} task={task} writable={data.available} />)}
</ul>
: null}
- </>
+ </section>
);
}
-function SubmitForm({ snapshot, prefill }: { snapshot: DownloadsSnapshot; prefill?: DownloadPrefill }) {
- const client = useQueryClient();
- const configured = snapshot.providers.filter((provider) => provider.configured);
- const [provider, setProvider] = useState<DownloadProviderKey>(configured[0]!.key);
- const [magnet, setMagnet] = useState('');
- const [code, setCode] = useState(prefill?.code ?? '');
- const [target, setTarget] = useState(configured[0]!.target);
- const [result, setResult] = useState<DownloadSubmitResult | null>(null);
- const action = useAction();
- const input = useRef<HTMLInputElement>(null);
- useEffect(() => { if (prefill) input.current?.focus() }, [prefill]);
- const current = configured.find((row) => row.key === provider) ?? configured[0]!;
-
- const choose = (key: DownloadProviderKey) => {
- setProvider(key);
- setTarget(configured.find((row) => row.key === key)?.target ?? '');
- };
-
- const submit = (event: FormEvent<HTMLFormElement>) => {
- event.preventDefault();
- const body = { magnet, provider, target, code, title: prefill?.title, origin: prefill?.origin };
- setResult(null);
- void action.run('submit', (signal) => apiSend<DownloadSubmitResult>(DOWNLOADS_URL, body, 'POST', signal),
- (next) => {
- setResult(next);
- if (next.ok) setMagnet('');
- void client.invalidateQueries({ queryKey: DOWNLOADS_KEY });
- });
- };
-
- return (
- <form aria-label="提交磁力" noValidate onSubmit={submit}>
- <SettingsCard>
- <Stack>
- <ResourceSearch initialCode={prefill?.code ?? ''} reason={prefill?.searchReason} choose={(uri, selectedCode) => {
- setMagnet(uri); setCode(selectedCode); input.current?.focus();
- }} />
- {prefill?.title ? <Help>{`给「${prefill.title}」找来的资源,下载完由推送发现登记入库。`}</Help> : null}
- <Input ref={input} label="磁力链接" placeholder="magnet:?xt=urn:btih:…" autoComplete="off" maxLength={4000}
- value={magnet} onChange={setMagnet} />
- <div className="flex flex-col gap-1">
- <FieldLabel>下载到</FieldLabel>
- <Select aria-label="下载到" selectedKey={provider}
- onSelectionChange={(key) => { if (key !== null) choose(String(key) as DownloadProviderKey) }}>
- {configured.map((row) => <SelectItem key={row.key} id={row.key}>{row.label}</SelectItem>)}
- </Select>
- </div>
- <Input label="目标目录" placeholder={current.target || '/云下载'} autoComplete="off" maxLength={300}
- hint="留空就用配置页填的目标目录。" value={target} onChange={setTarget} />
- <Input label="番号" placeholder="可不填" autoComplete="off" maxLength={60} value={code} onChange={setCode} />
- </Stack>
- {result ? <Stack divided><SubmitReceipt result={result} /></Stack> : null}
- {action.error ? <Stack divided><ErrorText>{action.error}</ErrorText></Stack> : null}
- <Footer status={provider === '115' ? '115 每提交一次扣一条离线配额,重新提交也算。' : undefined}>
- <Button type="submit" disabled={!magnet.trim()} {...busyProps(action.busy === 'submit')}>提交离线下载</Button>
- </Footer>
- </SettingsCard>
- </form>
- );
-}
-
-function SubmitReceipt({ result }: { result: DownloadSubmitResult }) {
- const reason = failureText(result.task);
- const text = OUTCOME_TEXT[result.outcome];
- if (result.outcome === 'failed') return <ErrorText>{reason ? `${text}${reason}` : text}</ErrorText>;
- if (result.outcome === 'refused') return <ErrorText>{text}</ErrorText>;
- return <Help role="status">{text}</Help>;
-}
-
function TaskCard({ task, writable }: { task: DownloadTask; writable: boolean }) {
const client = useQueryClient();
const action = useAction();
diff --git a/frontend/src/react/bundle.d.ts b/frontend/src/react/bundle.d.ts
index 8a4e4dbda..eca9ff16c 100644
--- a/frontend/src/react/bundle.d.ts
+++ b/frontend/src/react/bundle.d.ts
@@ -4,7 +4,7 @@
* `entry.tsx` 按这里的签名实现,两边的类型检查各自对照同一份声明。
* 配置数据的形状以 `/api/configuration`(`src/peach/routes_configuration.py`)为准。 */
import type { QualityGoal } from './quality-goals/quality-goals';
-import type { CloudDownloadPrefill, ShellActions } from './router/shell-actions';
+import type { ShellActions } from './router/shell-actions';
import type { IndexProps } from './index/index-data';
import type { CatalogGridProps } from './catalog-grid/types';
import type { JunkQueueProps } from './junk-queue/junk-queue';
@@ -274,13 +274,10 @@ export interface ConfigurationGroupProps extends Pick<ConfigurationProps, 'recei
data: ConfigurationData;
}
-/** 活动页没有来自遗留层的助手:整页的数据都来自 `/api/tasks`。`prefill` 是别处「云下载」键
- * 带进来的番号、标题与来处(`asset:12`、`follow:34`、`wishlist:5`)。 */
-export interface ActivityProps { prefill?: CloudDownloadPrefill }
-
/** 高清版目标页仍由遗留层提供的能力。全是纯函数或导航,页面不持有它们的状态。 */
export interface QualityGoalsProps {
- searchResources(prefill: CloudDownloadPrefill): void;
+ /** 写操作在服务端落地之后的过去时回执。 */
+ toast(message: string): void;
/** 打开作品详情(遗留层的整页视图,含播放器与队列)。 */
openItem(id: number): void;
/** 番号 + 版次徽章 + 标题的 HTML。非 JAV 条目退化成转义后的文件名。 */
@@ -343,8 +340,6 @@ export interface FollowManageProps {
toast(message: string): void;
/** 去「看更新」那一页(`/follow`)。整页换成哪一屏仍归遗留壳。 */
openFollow(): void;
- /** 云下载:带着番号、标题与来处(`wishlist:<想要 id>`)去活动页的云下载段,用户贴磁力交给 115 或 PikPak。 */
- cloudDownload(prefill: { code?: string; title?: string; origin: string }): void;
/** 账本只读:这台机器只能浏览,写操作全部不给点。 */
readOnly: boolean;
readOnlyMessage: string;
@@ -512,7 +507,7 @@ export type { GlowPickerHost } from './glow-picker/glow-picker-api';
* `loadGlowPicker` 接着经常驻表的 `openResidentSurface` 在路由树里画。 */
export declare function configureGlowPicker(host: GlowPickerHost): void;
-export type { CloudDownloadPrefill, ManagedOpenProps, ManagedPath, ShellActions } from './router/shell-actions';
+export type { ManagedOpenProps, ManagedPath, ShellActions } from './router/shell-actions';
/** 挂上客户端导航(`router/router.tsx`):React Router 接管 `@peach/history`,后退前进与 React 子树里的
* `navigate` 由它派发给壳;管理区、索引页与资料页由它画,经 `actions` 回到壳。重复调用是空操作。 */
diff --git a/frontend/src/react/follow-detail/follow-detail-page.tsx b/frontend/src/react/follow-detail/follow-detail-page.tsx
index ce7abff2d..4f7c89363 100644
--- a/frontend/src/react/follow-detail/follow-detail-page.tsx
+++ b/frontend/src/react/follow-detail/follow-detail-page.tsx
@@ -12,6 +12,7 @@ import { useMutation, useQuery } from '@tanstack/react-query';
import { esc, fmtDur, foldName, icon, requestErrorMessage } from '@peach/legacy/core';
import { apiSend } from '../../api';
+import { CloudDownloadDialog, type DownloadPrefill } from '../activity/cloud-download-dialog';
import { RetryNote } from '../components/grid-reveal';
import { MixGroupLabel, MixQueue, MixQueueRow } from '../components/mix-queue';
import {
@@ -308,6 +309,8 @@ function Side({ item, data, context, media, write, issue, helpers, actions }: {
const saved = item.status === 'saved';
const { busy } = write;
const busyAttrs = (key: string) => (busy.has(key) ? { 'aria-busy': true, 'aria-disabled': true } as const : {});
+ const cloud = useRef<HTMLButtonElement>(null);
+ const [download, setDownload] = useState<DownloadPrefill | null>(null);
return (
<div data-stage-side="" data-follow-detail-side="">
<div data-stage-side-content="">
@@ -375,8 +378,9 @@ function Side({ item, data, context, media, write, issue, helpers, actions }: {
title="隐藏这张图" {...busyAttrs(`hide:${selected.index}`)} onClick={() => write.hide(selected.index)}
dangerouslySetInnerHTML={{ __html: icon('image-off') }} />
) : null}
- <button type="button" data-follow-cloud-download="" aria-label="云下载" title="云下载 · 贴磁力交给 115 或 PikPak 离线下载"
- onClick={() => actions.cloudDownload(item)} dangerouslySetInnerHTML={{ __html: icon('cloud-download') }} />
+ <button ref={cloud} type="button" data-follow-cloud-download="" aria-label="云下载" title="云下载"
+ aria-haspopup="dialog" onClick={() => setDownload({ title: item.title || '', origin: `follow:${item.id}` })}
+ dangerouslySetInnerHTML={{ __html: icon('cloud-download') }} />
{src ? (
<a data-follow-download="" href={`${src}${src.includes('?') ? '&' : '?'}download=1`} download=""
aria-label="下载到本地" title="下载到本地" dangerouslySetInnerHTML={{ __html: icon('download') }} />
@@ -400,6 +404,8 @@ function Side({ item, data, context, media, write, issue, helpers, actions }: {
</div>
) : null}
<span data-follow-state="" aria-live="polite">{write.failure}</span>
+ <CloudDownloadDialog prefill={download} close={() => setDownload(null)} anchor={cloud}
+ receipt={(message) => actions.toast(message)} />
{tags.length ? (
<div data-stage-tags="" data-follow-detail-tags="">
{tags.map((tag) => (
diff --git a/frontend/src/react/follow-detail/follow-detail.ts b/frontend/src/react/follow-detail/follow-detail.ts
index ec5cd7608..98c999a49 100644
--- a/frontend/src/react/follow-detail/follow-detail.ts
+++ b/frontend/src/react/follow-detail/follow-detail.ts
@@ -99,8 +99,6 @@ export interface FollowDetailActions {
/** 操作回执;给了 `undo` 就带一颗撤销键。失败走 `failure`。 */
toast(message: string, options?: { undo?: () => Promise<void> }): void;
failure(action: string, error: unknown): void;
- /** 云下载:带着标题去活动页的云下载段,用户贴磁力交给 115 或 PikPak。 */
- cloudDownload(item: FollowDetailItem): void;
}
export interface FollowDetailProps {
diff --git a/frontend/src/react/follow-manage/follow-manage-page.tsx b/frontend/src/react/follow-manage/follow-manage-page.tsx
index 4382a8dd9..2a6af2474 100644
--- a/frontend/src/react/follow-manage/follow-manage-page.tsx
+++ b/frontend/src/react/follow-manage/follow-manage-page.tsx
@@ -59,7 +59,7 @@ function Reading({ term, figure, unit }: { term: string; figure: number; unit: s
export function FollowManagePage(props: FollowManageProps) {
const {
- route, savePreference, toast, openFollow, cloudDownload, readOnly, readOnlyMessage, writerUrl,
+ route, savePreference, toast, openFollow, readOnly, readOnlyMessage, writerUrl,
} = props;
const [tab, setTab] = useState<TabKey>(isTab(props.tab) ? props.tab : 'list');
const [page, setPage] = useState(Math.max(1, Math.floor(props.page) || 1));
@@ -189,7 +189,7 @@ export function FollowManagePage(props: FollowManageProps) {
</TabPanel>
<TabPanel id="wants" className="flex flex-col gap-4">
- <WantList readOnly={readOnly} toast={toast} cloudDownload={cloudDownload} />
+ <WantList readOnly={readOnly} toast={toast} />
</TabPanel>
<TabPanel id="source" className="flex flex-col gap-4">
diff --git a/frontend/src/react/quality-goals/quality-goals-page.tsx b/frontend/src/react/quality-goals/quality-goals-page.tsx
index 9382864ed..9c7808693 100644
--- a/frontend/src/react/quality-goals/quality-goals-page.tsx
+++ b/frontend/src/react/quality-goals/quality-goals-page.tsx
@@ -5,6 +5,7 @@
*
* 番号标题与来源徽标由遗留层以 HTML 字符串传进来:它们是全站语义契约的唯一实现,
* 在这里重写一份就会漂。时长、体积、来源名走 `src/core/index.ts` 同一套格式化口径,同理。 */
+import { useState } from 'react';
import { RiSparklingLine } from '@remixicon/react';
import { useQuery } from '@tanstack/react-query';
@@ -13,6 +14,7 @@ import { LOC, fmtDur, fmtSize } from '@peach/legacy/core';
import { Button } from '@/components/base/buttons/button';
import { errorMessage } from '../../api';
+import { CloudDownloadDialog, type DownloadPrefill } from '../activity/cloud-download-dialog';
import type { QualityGoalsProps } from '../bundle';
import { cardClass } from '../components/card';
import { CollectionSummary } from '../components/collection-summary';
@@ -24,9 +26,8 @@ import {
} from './quality-goals';
/** 一部待升级的作品一张卡。 */
-function GoalCard(
- { item, openItem, searchResources, javTitleHtml, javDisplayName, srcBadge }: { item: QualityGoal } & QualityGoalsProps,
-) {
+function GoalCard({ item, openItem, searchResources, javTitleHtml, javDisplayName, srcBadge }: { item: QualityGoal }
+ & Omit<QualityGoalsProps, 'toast'> & { searchResources(prefill: DownloadPrefill): void }) {
const open = () => openItem(item.id);
return (
<li data-goal-id={item.id}
@@ -74,7 +75,8 @@ function GoalCard(
);
}
-export function QualityGoalsPage(props: QualityGoalsProps) {
+export function QualityGoalsPage({ toast, ...props }: QualityGoalsProps) {
+ const [download, setDownload] = useState<DownloadPrefill | null>(null);
const goals = useQuery({ queryKey: QUALITY_GOALS_KEY, queryFn: ({ signal }) => fetchQualityGoals(signal) });
const data = goals.data;
if (!data) {
@@ -100,8 +102,9 @@ export function QualityGoalsPage(props: QualityGoalsProps) {
而这一行要回答的是「一共还欠多少部」。 */}
<CollectionSummary label="待升级" figure={`${data.total} 部作品`} flush />
<ul className="card-grid-cover gap-5">
- {items.map((item) => <GoalCard key={item.id} item={item} {...props} />)}
+ {items.map((item) => <GoalCard key={item.id} item={item} {...props} searchResources={setDownload} />)}
</ul>
+ <CloudDownloadDialog prefill={download} close={() => setDownload(null)} receipt={toast} />
</Page>
);
}
diff --git a/frontend/src/react/router/managed-routes.tsx b/frontend/src/react/router/managed-routes.tsx
index d5cf752c7..e144e36a9 100644
--- a/frontend/src/react/router/managed-routes.tsx
+++ b/frontend/src/react/router/managed-routes.tsx
@@ -137,10 +137,9 @@ export const MANAGED_ROUTES: ManagedRouteTable = {
},
'/quality-goals': {
prefetch: (_open, signal) => prefetchQualityGoals(signal),
- page: (_open, actions, go) => (
+ page: (_open, actions) => (
<QualityGoalsPage openItem={actions.openItem} javTitleHtml={javTitleHtml} javDisplayName={javDisplayName}
- searchResources={(prefill) => { actions.requestCloudDownload(prefill); go('/activity') }}
- srcBadge={actions.srcBadge} />
+ toast={(message) => actions.receipt(message)} srcBadge={actions.srcBadge} />
),
},
'/scraping': {
@@ -161,16 +160,15 @@ export const MANAGED_ROUTES: ManagedRouteTable = {
},
'/activity': {
prefetch: (_open, signal) => prefetchTasks(signal),
- page: (open) => <ActivityPage {...(open.prefill ? { prefill: open.prefill } : {})} />,
+ page: () => <ActivityPage />,
},
/* 首屏只取来源清单与凭据状态,地址栏指着「订阅源」时连它一起取。检查更新与查找那两趟
后台任务的快照不在首屏里:它们常年躺着上一趟的回执,等它们只会让首屏多一个往返。 */
'/follow-manage': {
prefetch: (open, signal) => prefetchFollowManage(signal, open.tab),
- page: (open, actions, go) => (
+ page: (open, actions) => (
<FollowManagePage {...open} route={actions.routeFollowManage} savePreference={actions.saveFollowPreference}
- toast={(message) => actions.receipt(message)} openFollow={actions.openFollow}
- cloudDownload={(prefill) => { actions.requestCloudDownload(prefill); go('/activity') }} />
+ toast={(message) => actions.receipt(message)} openFollow={actions.openFollow} />
),
},
};
diff --git a/frontend/src/react/router/shell-actions.ts b/frontend/src/react/router/shell-actions.ts
index 9c50782d5..f0185aa86 100644
--- a/frontend/src/react/router/shell-actions.ts
+++ b/frontend/src/react/router/shell-actions.ts
@@ -15,9 +15,6 @@ import type { IndexKind, IndexPerson, IndexRoute, PeopleLayout, PersonAvatar } f
import type { JunkQueueProps } from '../junk-queue/junk-queue';
import type { SearchProps } from '../search/search';
-/** 云下载表单的预填:番号、标题与来处(`asset:12`、`follow:34`、`wishlist:5`)。 */
-export interface CloudDownloadPrefill { code?: string; title?: string; origin?: string; searchReason?: string }
-
export interface ShellActions {
/** 打开作品详情(舞台)。 */
openItem(id: number): void;
@@ -47,8 +44,6 @@ export interface ShellActions {
reopenTutorial(): Promise<void>;
/** 下一次打开配置页时选中的页签,只交给那一次。 */
requestConfigurationSection(section: string): void;
- /** 下一次打开活动页时云下载表单的预填,只交给那一次。 */
- requestCloudDownload(prefill: CloudDownloadPrefill): void;
/** 复核页把分类写回地址栏,不重开。 */
routeReview(params: { category: string }): void;
/** 关注管理页把页签、页码与排序写回地址栏,不重开。 */
@@ -89,7 +84,7 @@ export interface ManagedOpenProps {
'/scraping': Record<string, never>;
'/configuration': Record<string, never>;
'/diagnostics': Record<string, never>;
- '/activity': { prefill?: CloudDownloadPrefill };
+ '/activity': Record<string, never>;
'/follow-manage': {
tab: string; page: number; sort: string; dir: string; pageSize: number; layout: string;
readOnly: boolean; readOnlyMessage: string; writerUrl: string;
diff --git a/frontend/src/react/wants/want-list.tsx b/frontend/src/react/wants/want-list.tsx
index eee6b4879..65f18fb3b 100644
--- a/frontend/src/react/wants/want-list.tsx
+++ b/frontend/src/react/wants/want-list.tsx
@@ -1,8 +1,11 @@
-/* JAV 入库:按状态分组的作品卡,卡片下方查询磁链并提交云下载。 */
+/* JAV 入库:按状态分组的作品卡,卡片下方查询磁链并提交云下载。
+ *
+ * 卡片下方的候选来自 JavDB;「搜索资源」打开云下载弹层,查自配索引器或贴磁力。页上那颗
+ * 「提交磁力」是不挂在任何作品上的同一个弹层。 */
import { useState } from 'react';
import type { KeyboardEvent } from 'react';
import { useQuery } from '@tanstack/react-query';
-import { RiStarLine, RiExternalLinkLine, RiCloudLine, RiDeleteBinLine } from '@remixicon/react';
+import { RiStarLine, RiExternalLinkLine, RiDeleteBinLine } from '@remixicon/react';
import { Button, ButtonLink } from '@/components/base/buttons/button';
import { Input } from '@/components/base/input/input';
@@ -10,6 +13,7 @@ import { Select, SelectItem } from '@/components/base/select/select';
import { apiGet, errorMessage } from '../../api';
import type { DownloadsSnapshot } from '../bundle';
+import { CloudDownloadDialog, type DownloadPrefill } from '../activity/cloud-download-dialog';
import { DOWNLOADS_KEY, DOWNLOADS_URL } from '../activity/downloads-panel';
import { cardClass } from '../components/card';
import { EmptyState } from '../components/empty-state';
@@ -66,7 +70,7 @@ function WantRow({ want, readOnly, busy, onReset, onRemove, onCloudDownload, dow
{source ? <ButtonLink data-button-link="" variant="secondary" size="small" trailingIcon={RiExternalLinkLine} href={source} target="_blank" rel="noopener noreferrer">来源页</ButtonLink> : null}
{/* 还在找的两段才给云下载:未发售的没有资源可下,已入库的已经到手。 */}
{want.phase === 'searching' || want.phase === 'given_up' ? (
- <Button variant="secondary" size="small" leadingIcon={RiCloudLine} disabled={readOnly} onClick={onCloudDownload}>云下载</Button>
+ <Button variant="secondary" size="small" disabled={readOnly} onClick={onCloudDownload}>搜索资源</Button>
) : null}
{want.phase === 'given_up' ? (
<Button variant="secondary" size="small" disabled={readOnly} {...busyProps(busy === `reset:${want.id}`)}
@@ -86,12 +90,11 @@ function WantRow({ want, readOnly, busy, onReset, onRemove, onCloudDownload, dow
export interface WantListProps {
readOnly: boolean;
toast(message: string): void;
- /** 带着番号、标题与 `wishlist:<id>` 去活动页的云下载段(壳的 `openCloudDownload`)。 */
- cloudDownload(prefill: { code?: string; title?: string; origin: string }): void;
}
-export function WantList({ readOnly, toast, cloudDownload }: WantListProps) {
+export function WantList({ readOnly, toast }: WantListProps) {
const [code, setCode] = useState('');
+ const [download, setDownload] = useState<DownloadPrefill | null>(null);
const [provider, setProvider] = useState('');
const action = useAction();
const wants = useQuery({
@@ -154,13 +157,16 @@ export function WantList({ readOnly, toast, cloudDownload }: WantListProps) {
{data?.scraping ? <Help role="status">正在给刚加入的番号取资料与封面。</Help> : null}
{configured.length ? <div className="flex flex-col gap-2">
<p className="text-body-medium text-text-primary">下载到</p>
- <Select aria-label="下载到" selectedKey={selected} onSelectionChange={(key) => setProvider(String(key))}>
- {configured.map((row) => <SelectItem key={row.key} id={row.key}>{row.label}</SelectItem>)}
- </Select>
+ <div className="flex flex-wrap items-center gap-2">
+ <Select aria-label="下载到" selectedKey={selected} onSelectionChange={(key) => setProvider(String(key))}>
+ {configured.map((row) => <SelectItem key={row.key} id={row.key}>{row.label}</SelectItem>)}
+ </Select>
+ <Button variant="secondary" disabled={readOnly} onClick={() => setDownload({})}>提交磁力</Button>
+ </div>
<Help>{configured.find((row) => row.key === selected)?.target || '使用已配置的目标目录'}</Help>
</div> : null}
{downloads.error ? <Note tone="error" title="下载配置未取得">{errorMessage(downloads.error)}</Note> : null}
- {downloads.data && !configured.length ? <Note tone="neutral">请先在配置页设置 115 或 PikPak 云下载。</Note> : null}
+ {downloads.data && !configured.length ? <Note tone="neutral">先在配置页「下载」分组登录 PikPak,或填好 CloudDrive2 的地址与令牌。</Note> : null}
{downloads.data && !downloads.data.available ? <Note tone="neutral">云下载只在账本写入端可用。</Note> : null}
{data && !items.length ? (
@@ -183,7 +189,7 @@ export function WantList({ readOnly, toast, cloudDownload }: WantListProps) {
<WantRow key={want.id} want={want} readOnly={readOnly} busy={action.busy}
downloads={downloads.data} provider={selected} toast={toast}
onReset={() => reset(want)} onRemove={() => remove(want)}
- onCloudDownload={() => cloudDownload({
+ onCloudDownload={() => setDownload({
code: want.code || '', title: want.title || '', origin: `wishlist:${want.id}`,
})} />
))}
@@ -191,6 +197,7 @@ export function WantList({ readOnly, toast, cloudDownload }: WantListProps) {
</section>
);
})}
+ <CloudDownloadDialog prefill={download} close={() => setDownload(null)} receipt={toast} provider={selected} />
</div>
);
}
diff --git a/frontend/src/shell/index.ts b/frontend/src/shell/index.ts
index cb31cefb2..0990173f9 100644
--- a/frontend/src/shell/index.ts
+++ b/frontend/src/shell/index.ts
@@ -73,8 +73,6 @@ export let followDetailReturnPath = '/follow';
/** 配置页下一次打开要选中的那一组页签名,选中之后清空。 */
export let configurationRequestedSection = '';
-/** 活动页云下载表单下一次打开时的预填,取一次就清掉;不进地址栏。 */
-export let activityPrefill: Record<string, string> | null = null;
/** `writeShell` 能整体换掉的那几项。两个选择集是常驻实例,不在其中。 */
export interface ShellFields {
@@ -94,7 +92,6 @@ export interface ShellFields {
presentedItem: PresentedItem | null;
followDetailReturnPath: string;
configurationRequestedSection: string;
- activityPrefill: Record<string, string> | null;
}
type Listener = () => void;
@@ -120,7 +117,6 @@ export function writeShell(patch: Partial<ShellFields>): void {
if (has('presentedItem')) presentedItem = patch.presentedItem!;
if (has('followDetailReturnPath')) followDetailReturnPath = patch.followDetailReturnPath!;
if (has('configurationRequestedSection')) configurationRequestedSection = patch.configurationRequestedSection!;
- if (has('activityPrefill')) activityPrefill = patch.activityPrefill!;
notifyShell();
}
diff --git a/frontend/test/react/activity.test.tsx b/frontend/test/react/activity.test.tsx
index 5f6a59c30..3b8e7bc0c 100644
--- a/frontend/test/react/activity.test.tsx
+++ b/frontend/test/react/activity.test.tsx
@@ -58,7 +58,7 @@ const payload = (overrides: Partial<ActivityData> = {}): ActivityData => ({
available: true, running: [], skipped: [], finished: [], ...overrides,
});
-/* 云下载段自己取 `/api/downloads`。这里的用例只数任务中心的请求,云下载那一路另答一份空表。 */
+/* 云下载段自己取 `/api/downloads`。这里的用例只数任务中心的请求,云下载那一路另答一份空表,那一段就不画。 */
const DOWNLOADS_IDLE: DownloadsSnapshot = { available: true, providers: [], tasks: [] };
function stubFetch(tasks: (input: string, init?: RequestInit) => Promise<unknown>) {
vi.stubGlobal('fetch', (input: string, init?: RequestInit) => (input.startsWith(DOWNLOADS_URL)
@@ -125,7 +125,7 @@ it('被挡下的那一轮单独成段,不在最近完成里再出现一次', a
result_summary: { blocked_by: 3 }, error: '与第 3 轮(手动触发)冲突,本次跳过',
});
const { host } = await open(payload({ skipped: [blocked], finished: [blocked] }));
- expect(sections(host)).toEqual(['正在进行', '被挡下的', '云下载']);
+ expect(sections(host)).toEqual(['正在进行', '被挡下的']);
expect(host.querySelectorAll('li')).toHaveLength(1);
// 原因落在卡片底部的说明区,状态由徽章说。
expect(host.querySelector('[data-status=cancelled]')?.textContent).toContain('与第 3 轮');
@@ -168,7 +168,7 @@ it('后继还在跑时,派出它的那一轮整张卡留在正在进行,那
progress_label: '取新作资料:MIZD-441', progress_current: 13, progress_total: 22,
followup_key: 'feed-scrape:MIZD-441', result_summary: {} });
const { host } = await open(payload({ running: [scraping], finished: [parent] }));
- expect(sections(host)).toEqual(['正在进行', '云下载']);
+ expect(sections(host)).toEqual(['正在进行']);
const row = host.querySelector('[data-followup-key]')!;
expect([...row.querySelectorAll('span')].map((node) => node.textContent))
.toEqual(['取新作资料', '进行中', 'MIZD-441 · 13 / 22 项']);
@@ -202,8 +202,8 @@ it('父任务不在这一屏上时,后继照常单独摆出来', async () => {
it('一条记录都没有时给空态,不是一片白', async () => {
const { host } = await open(payload());
expect(host.querySelector('h3')?.textContent).toBe('还没有任务记录');
- // 任务中心那三段都不画,只剩自带取数的云下载段。
- expect(sections(host)).toEqual(['云下载']);
+ // 任务中心那三段都不画;云下载没有任务,也不画。
+ expect(sections(host)).toEqual([]);
});
it('账本上还没有这张表时说清怎么办,不当成故障', async () => {
diff --git a/frontend/test/react/batch-dock.test.tsx b/frontend/test/react/batch-dock.test.tsx
index 508698958..95c05ad64 100644
--- a/frontend/test/react/batch-dock.test.tsx
+++ b/frontend/test/react/batch-dock.test.tsx
@@ -62,7 +62,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/browse-routes.test.tsx b/frontend/test/react/browse-routes.test.tsx
index 230b1becf..6ba931d66 100644
--- a/frontend/test/react/browse-routes.test.tsx
+++ b/frontend/test/react/browse-routes.test.tsx
@@ -43,7 +43,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/catalog-routes.test.tsx b/frontend/test/react/catalog-routes.test.tsx
index 033f6a2ea..98667c41c 100644
--- a/frontend/test/react/catalog-routes.test.tsx
+++ b/frontend/test/react/catalog-routes.test.tsx
@@ -42,7 +42,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/cloud-download-dialog.test.tsx b/frontend/test/react/cloud-download-dialog.test.tsx
new file mode 100644
index 000000000..b23f8ba30
--- /dev/null
+++ b/frontend/test/react/cloud-download-dialog.test.tsx
@@ -0,0 +1,121 @@
+/* 云下载弹层的行为:提交带什么、成功后回执并关上、失败留在原处、没配置与只读端说什么。 */
+import { QueryClientProvider } from '@tanstack/react-query';
+import { afterEach, expect, it, vi } from 'vitest';
+
+import { CloudDownloadDialog, type DownloadPrefill } from '../../src/react/activity/cloud-download-dialog';
+import type { DownloadsSnapshot, DownloadSubmitResult, DownloadTask } from '../../src/react/bundle';
+import { queryClient } from '../../src/react/query';
+import { buttonNamed, choose, mount, section, settle, submit, type } from './render';
+
+afterEach(() => queryClient.clear());
+
+const task = (patch: Partial<DownloadTask> = {}): DownloadTask => ({
+ id: 1, info_hash: 'a'.repeat(40), provider: '115', provider_label: '115', source_uri: 'magnet:?xt=urn:btih:' + 'a'.repeat(40),
+ display_name: 'ABC-123.mp4', target: '/115/云下载', code: 'ABC-123', title: null, origin: 'paste',
+ state: 'submitted', state_label: '已提交', failure: null, failure_label: null, failure_detail: null,
+ progress: null, remote_name: null, ledger_path: null, asset_id: null, submitted_at: '2026-10-01T08:00:00Z',
+ updated_at: '2026-10-01T08:01:00Z', finished_at: null, blocked: false, cancellable: true, resubmittable: false,
+ ...patch,
+});
+
+const snapshot = (patch: Partial<DownloadsSnapshot> = {}): DownloadsSnapshot => ({
+ available: true,
+ providers: [
+ { key: '115', label: '115', configured: true, target: '/115/云下载' },
+ { key: 'pikpak', label: 'PikPak', configured: true, target: '/云下载' },
+ ],
+ tasks: [],
+ ...patch,
+});
+
+/** 读接口回 `shown`;写接口回 `answer`。 */
+function serve(shown: DownloadsSnapshot, answer?: DownloadSubmitResult) {
+ const posts: unknown[] = [];
+ vi.stubGlobal('fetch', vi.fn(async (_input: string, init?: RequestInit) => {
+ if (init?.method === 'POST') posts.push(JSON.parse(String(init.body)));
+ return { ok: true, status: 200, json: async () => (init?.method === 'POST' ? answer : shown) };
+ }));
+ return posts;
+}
+
+/** 弹层画在 `body` 上的浮层容器里,不在挂载点里,所以从整页找。 */
+const open = async (prefill: DownloadPrefill, provider?: string) => {
+ const close = vi.fn();
+ const receipt = vi.fn();
+ await mount(
+ <QueryClientProvider client={queryClient}>
+ <CloudDownloadDialog prefill={prefill} close={close} receipt={receipt} provider={provider} />
+ </QueryClientProvider>,
+ );
+ // 取到下载配置之后才画表单或那句说明;Query 的通知走定时器,只等微任务不够。
+ await vi.waitFor(async () => {
+ await settle();
+ if (!document.querySelector('[role=dialog] form, [role=dialog] [role=note], [role=dialog] .p-5 > *')) {
+ throw new Error('弹层还没取到下载配置');
+ }
+ });
+ return { close, receipt, page: document.body };
+};
+
+const field = (root: HTMLElement, label: string) =>
+ [...root.querySelectorAll('label')].find((node) => node.textContent?.trim() === label)
+ ?.closest('[data-input-size]')?.querySelector('input') ?? null;
+
+const MAGNET = 'magnet:?xt=urn:btih:' + 'b'.repeat(40);
+
+it('带着番号与标题打开:标题行写番号与片名,搜索框与番号框已填,提交带上渠道、目录与来处', async () => {
+ const posts = serve(snapshot(), { ok: true, outcome: 'submitted', task: task() });
+ const { close, receipt, page } = await open({ code: 'ABC-123', title: '一部作品', origin: 'asset:12', searchReason: '中字' });
+ expect(page.querySelector('[role=dialog]')?.textContent).toContain('ABC-123 一部作品');
+ expect(page.textContent).toContain('版本目标:中字');
+ expect(field(page, '搜索资源')?.value).toBe('ABC-123');
+ expect(field(page, '番号')).toBeNull();
+ expect(field(page, '目标目录')?.value).toBe('/115/云下载');
+ await type(field(page, '磁力链接'), MAGNET);
+ await submit(section(page, '提交磁力'));
+ await settle();
+ expect(posts).toEqual([{
+ magnet: MAGNET, provider: '115', target: '/115/云下载', code: 'ABC-123', title: '一部作品', origin: 'asset:12',
+ }]);
+ expect(receipt).toHaveBeenCalledWith('已提交离线下载,进度在活动页');
+ expect(close).toHaveBeenCalled();
+});
+
+it('提交没成功时弹层不关,原因留在表单里', async () => {
+ serve(snapshot(), { ok: false, outcome: 'failed',
+ task: task({ state: 'failed', failure_label: '没有可用的资源', failure_detail: '远端拒收' }) });
+ const { close, receipt, page } = await open({});
+ await type(field(page, '磁力链接'), MAGNET);
+ await submit(section(page, '提交磁力'));
+ await settle();
+ expect(page.textContent).toContain('提交没有成功:没有可用的资源:远端拒收');
+ expect([close.mock.calls.length, receipt.mock.calls.length]).toEqual([0, 0]);
+});
+
+it('入库页交进来的下载方式先选中;换渠道时目标目录跟着换,115 才提配额', async () => {
+ serve(snapshot());
+ const { page } = await open({}, 'pikpak');
+ expect(field(page, '目标目录')?.value).toBe('/云下载');
+ expect(page.textContent).not.toContain('扣一条离线配额');
+ expect(buttonNamed('提交离线下载', page)?.className).toContain('bg-button-primary');
+ await choose(page.querySelector('[role=dialog] [aria-label="下载到"]'), '115');
+ expect(field(page, '目标目录')?.value).toBe('/115/云下载');
+ expect(page.textContent).toContain('每提交一次扣一条离线配额');
+});
+
+it('一个渠道都没配时说去哪里配,不画表单', async () => {
+ serve(snapshot({ providers: [
+ { key: '115', label: '115', configured: false, target: '' },
+ { key: 'pikpak', label: 'PikPak', configured: false, target: '' },
+ ] }));
+ const { page } = await open({});
+ expect(section(page, '提交磁力')).toBeNull();
+ expect(page.textContent).toContain('先在配置页「下载」分组');
+});
+
+it('只读端说明原因,不画表单', async () => {
+ serve(snapshot({ available: false }));
+ const { page } = await open({});
+ expect(page.textContent).toContain('云下载只在账本写入端可用');
+ expect(section(page, '提交磁力')).toBeNull();
+});
diff --git a/frontend/test/react/downloads-panel.test.tsx b/frontend/test/react/downloads-panel.test.tsx
index fe474d7ca..cac0ed3b2 100644
--- a/frontend/test/react/downloads-panel.test.tsx
+++ b/frontend/test/react/downloads-panel.test.tsx
@@ -1,11 +1,11 @@
-/* 活动页云下载段的行为:提交表单带什么、任务卡给哪些键、没配置与只读端说什么。 */
+/* 活动页云下载段的行为:任务卡给哪些键、没有任务时整段不画、只读端不给写操作。 */
import { QueryClientProvider } from '@tanstack/react-query';
import { afterEach, expect, it, vi } from 'vitest';
-import { DownloadsPanel, downloadPollInterval, type DownloadPrefill } from '../../src/react/activity/downloads-panel';
-import type { DownloadsSnapshot, DownloadSubmitResult, DownloadTask } from '../../src/react/bundle';
+import { DownloadsPanel, downloadPollInterval } from '../../src/react/activity/downloads-panel';
+import type { DownloadsSnapshot, DownloadTask } from '../../src/react/bundle';
import { queryClient } from '../../src/react/query';
-import { buttonNamed, choose, click, mount, section, settle, submit, type } from './render';
+import { buttonNamed, click, mount, settle } from './render';
afterEach(() => queryClient.clear());
@@ -43,8 +43,8 @@ function serve(shown: DownloadsSnapshot, answers: Record<string, unknown> = {})
return { calls, posts };
}
-const show = async (prefill?: DownloadPrefill) => {
- const host = await mount(<QueryClientProvider client={queryClient}><DownloadsPanel prefill={prefill} /></QueryClientProvider>);
+const show = async () => {
+ const host = await mount(<QueryClientProvider client={queryClient}><DownloadsPanel /></QueryClientProvider>);
// 首屏取数要走完 fetch、json 与 Query 派发三段,等到这一段画出内容为止。
await vi.waitFor(async () => {
await settle();
@@ -53,51 +53,6 @@ const show = async (prefill?: DownloadPrefill) => {
return host;
};
-const field = (host: HTMLElement, label: string) =>
- [...host.querySelectorAll('label')].find((node) => node.textContent?.trim() === label)
- ?.closest('[data-input-size]')?.querySelector('input') ?? null;
-
-it('提交带上渠道、目标目录、番号与来处,成功后清空磁力框并说明下一步', async () => {
- const result: DownloadSubmitResult = { ok: true, outcome: 'submitted', task: task({ state: 'submitted' }) };
- const { posts } = serve(snapshot(), { '/api/downloads': result });
- const host = await show({ code: 'ABC-123', title: '一部作品', origin: 'asset:12', searchReason: '中字' });
- expect(host.textContent).toContain('版本目标:中字');
- expect(field(host, '搜索资源')?.value).toBe('ABC-123');
- expect(field(host, '番号')?.value).toBe('ABC-123');
- expect(field(host, '目标目录')?.value).toBe('/115/云下载');
- expect(document.activeElement).toBe(field(host, '磁力链接'));
- expect(host.textContent).toContain('给「一部作品」找来的资源');
- await type(field(host, '磁力链接'), 'magnet:?xt=urn:btih:' + 'b'.repeat(40));
- await submit(section(host, '提交磁力'));
- await settle();
- expect(posts()).toEqual([['/api/downloads', {
- magnet: 'magnet:?xt=urn:btih:' + 'b'.repeat(40), provider: '115', target: '/115/云下载',
- code: 'ABC-123', title: '一部作品', origin: 'asset:12',
- }]]);
- expect(field(host, '磁力链接')?.value).toBe('');
- expect(host.querySelector('[role=status]')?.textContent).toContain('已提交');
-});
-
-it('换渠道时目标目录跟着换成那一路配置的目录,提交键是主按钮', async () => {
- serve(snapshot());
- const host = await show();
- expect(buttonNamed('提交离线下载', host)?.className).toContain('bg-button-primary');
- expect(host.textContent).toContain('115 每提交一次扣一条离线配额');
- await choose(host.querySelector('[aria-label="下载到"]'), 'PikPak');
- expect(field(host, '目标目录')?.value).toBe('/云下载');
- expect(host.textContent).not.toContain('115 每提交一次扣一条离线配额');
-});
-
-it('只列配置好的渠道;一个都没配时说去哪里配,不画表单', async () => {
- serve(snapshot({ providers: [
- { key: '115', label: '115', configured: false, target: '' },
- { key: 'pikpak', label: 'PikPak', configured: false, target: '' },
- ] }));
- const host = await show();
- expect(section(host, '提交磁力')).toBeNull();
- expect(host.textContent).toContain('在配置页「下载」分组');
-});
-
it('远端在跑的任务给进度与取消键,取消发到取消接口', async () => {
const { posts } = serve(snapshot({ tasks: [task()] }), { '/api/downloads/cancel': { ok: true, task: task() } });
const host = await show();
@@ -130,14 +85,24 @@ it('失败的任务写中文原因,可以重新提交;被判违规的只剩
}]]);
});
-it('只读端说明原因,任务照常列出但没有取消键', async () => {
+it('只读端任务照常列出,但没有取消键', async () => {
serve(snapshot({ available: false, tasks: [task()] }));
const host = await show();
- expect(host.textContent).toContain('云下载只在账本写入端可用');
- expect(section(host, '提交磁力')).toBeNull();
+ expect(host.querySelector('[data-download-state=remote_running]')).not.toBeNull();
expect(buttonNamed('取消', host)).toBeNull();
});
+it('一条任务都没有时整段不画,也没有提交表单', async () => {
+ const { calls } = serve(snapshot());
+ const host = await mount(<QueryClientProvider client={queryClient}><DownloadsPanel /></QueryClientProvider>);
+ await vi.waitFor(async () => {
+ await settle();
+ if (!calls.length) throw new Error('还没取数');
+ });
+ await settle();
+ expect(host.childElementCount).toBe(0);
+});
+
it('有任务还在跟进时五秒查一次,全是终态三十秒一次', () => {
expect(downloadPollInterval(snapshot({ tasks: [task()] }))).toBe(5_000);
expect(downloadPollInterval(snapshot({ tasks: [task({ cancellable: false, state: 'ingested' })] }))).toBe(30_000);
diff --git a/frontend/test/react/entity-routes.test.tsx b/frontend/test/react/entity-routes.test.tsx
index 9cb19b635..561cf1f0b 100644
--- a/frontend/test/react/entity-routes.test.tsx
+++ b/frontend/test/react/entity-routes.test.tsx
@@ -44,7 +44,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/follow-detail.test.tsx b/frontend/test/react/follow-detail.test.tsx
index 07eb24043..bdf3af397 100644
--- a/frontend/test/react/follow-detail.test.tsx
+++ b/frontend/test/react/follow-detail.test.tsx
@@ -46,7 +46,7 @@ type ActionMocks = { [K in keyof FollowDetailActions]: Mock<FollowDetailActions[
function actions(): ActionMocks {
return {
close: vi.fn(), openItem: vi.fn(), openTag: vi.fn(), present: vi.fn(), mountPlayer: vi.fn(() => vi.fn()),
- toast: vi.fn(), failure: vi.fn(), cloudDownload: vi.fn(),
+ toast: vi.fn(), failure: vi.fn(),
};
}
@@ -150,15 +150,16 @@ describe('写操作', () => {
expect(given.toast).toHaveBeenCalledWith('已保存到账本');
});
- it('云下载键不发请求,把这一条交给壳去活动页', async () => {
+ it('云下载键在详情里原地打开弹层,标题行写这一条的标题,不发写请求', async () => {
const fetcher = serve();
- const { host, actions: given } = await show(data(item(9)));
+ const { host } = await show(data(item(9)));
const button = host.querySelector('[data-follow-cloud-download]');
expect(button?.getAttribute('aria-label')).toBe('云下载');
expect(button?.querySelector('use')?.getAttribute('href')).toBe('#i-cloud-download');
await click(button);
+ await settle();
+ expect(document.querySelector('[role=dialog]')?.textContent).toContain(item(9).title);
expect(posts(fetcher)).toEqual([]);
- expect(given.cloudDownload).toHaveBeenCalledWith(expect.objectContaining({ id: 9 }));
});
it('标记已看:键按下、多一枚「恢复未看」;回执的撤销写回原状态', async () => {
diff --git a/frontend/test/react/follow-manage.test.tsx b/frontend/test/react/follow-manage.test.tsx
index bc995ee81..b2c1b6be8 100644
--- a/frontend/test/react/follow-manage.test.tsx
+++ b/frontend/test/react/follow-manage.test.tsx
@@ -144,7 +144,6 @@ const shellProps = (over: Partial<Props> = {}): Props => ({
savePreference: vi.fn(),
toast: vi.fn(),
openFollow: vi.fn(),
- cloudDownload: vi.fn(),
readOnly: false, readOnlyMessage: '', writerUrl: '',
...over,
});
diff --git a/frontend/test/react/manage-header.test.tsx b/frontend/test/react/manage-header.test.tsx
index f251bfe6a..edc17bb7f 100644
--- a/frontend/test/react/manage-header.test.tsx
+++ b/frontend/test/react/manage-header.test.tsx
@@ -69,7 +69,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/managed-routes.test.tsx b/frontend/test/react/managed-routes.test.tsx
index ea0484b0b..fb9427116 100644
--- a/frontend/test/react/managed-routes.test.tsx
+++ b/frontend/test/react/managed-routes.test.tsx
@@ -47,7 +47,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn((section: string) => sections[section] ?? ''), openFollow: vi.fn(),
receipt: vi.fn(), toast: vi.fn(), failure: vi.fn(), revealSource: vi.fn(async () => ''),
- reopenTutorial: vi.fn(async () => {}), requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(),
+ reopenTutorial: vi.fn(async () => {}), requestConfigurationSection: vi.fn(),
routeReview: vi.fn(), routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '',
routeIndex: vi.fn(), savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(),
personAvatar: vi.fn(() => ({ html: '', face: '' })), authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(),
@@ -404,12 +404,10 @@ it('数据管理页:复核、高清版与重复文件走 go,垃圾文件与
expect(vi.mocked(actions.receipt).mock.calls).toEqual([['做完了']]);
});
-it('复核页与关注管理页把地址写回壳,不重开;云下载先交预填再换到活动页', async () => {
+it('复核页与关注管理页把地址写回壳,不重开', async () => {
const r = await load();
const actions = shellActions();
- const order: string[] = [];
- const go = vi.fn((path: string) => { order.push(`go ${path}`) });
- vi.mocked(actions.requestCloudDownload).mockImplementation((prefill) => { order.push(`prefill ${prefill.origin}`) });
+ const go = vi.fn();
const review = element<ReviewProps>('/review', r,
{ category: 'name', readOnly: true, readOnlyMessage: '只读', writerUrl: '' }, actions, go);
expect([review.route, review.category, review.readOnly]).toEqual([actions.routeReview, 'name', true]);
@@ -418,8 +416,6 @@ it('复核页与关注管理页把地址写回壳,不重开;云下载先交
}, actions, go);
expect([follow.route, follow.savePreference, follow.openFollow, follow.page])
.toEqual([actions.routeFollowManage, actions.saveFollowPreference, actions.openFollow, 2]);
- follow.cloudDownload({ code: 'ABC-123', origin: 'wishlist:5' });
- expect(order).toEqual(['prefill wishlist:5', 'go /activity']);
});
it('回执、打开作品与资料页都交回壳:都走过去时回执', async () => {
@@ -428,14 +424,11 @@ it('回执、打开作品与资料页都交回壳:都走过去时回执', asyn
const undo = async () => {};
const go = vi.fn();
const goals = element<QualityGoalsProps>('/quality-goals', r, {}, actions, go);
- const prefill = { code: 'ABC-123', origin: 'asset:3', searchReason: '中字' };
- goals.searchResources(prefill);
- expect(actions.requestCloudDownload).toHaveBeenCalledWith(prefill);
- expect(go).toHaveBeenCalledWith('/activity');
goals.openItem(3);
expect(goals.srcBadge).toBe(actions.srcBadge);
expect(goals.javDisplayName({ name: 'ABC-123 片名.mp4' } as never)).toContain('ABC-123');
expect(goals.javTitleHtml({ name: '<b>.mp4' } as never)).not.toContain('<b>');
+ goals.toast('已提交离线下载');
const duplicates = element<DuplicatesProps>('/duplicates', r, {}, actions, vi.fn());
duplicates.toast('已删除', { undo });
duplicates.toast('已保留');
@@ -460,7 +453,7 @@ it('回执、打开作品与资料页都交回壳:都走过去时回执', asyn
expect(vi.mocked(actions.failure).mock.calls).toEqual([['删除', 'boom']]);
expect(actions.toast).not.toHaveBeenCalled();
expect(vi.mocked(actions.receipt).mock.calls).toEqual([
- ['已删除', { undo }], ['已保留', {}], ['已保存配置'], ['已判定'], ['已添加 1 个关注来源'], ['已导入'],
+ ['已提交离线下载'], ['已删除', { undo }], ['已保留', {}], ['已保存配置'], ['已判定'], ['已添加 1 个关注来源'], ['已导入'],
]);
});
@@ -472,15 +465,6 @@ it('采集页的提示走全站 Toast 原样', async () => {
expect(actions.receipt).not.toHaveBeenCalled();
});
-it('活动页的预填只跟着那一次打开:不带就是空表单,也不写进地址与历史', async () => {
- const r = await load('/activity');
- const withPrefill = element<{ prefill?: object }>('/activity', r, { prefill: { title: '片名' } }, shellActions(), vi.fn());
- const plain = element<{ prefill?: object }>('/activity', r, {}, shellActions(), vi.fn());
- expect(withPrefill.prefill).toEqual({ title: '片名' });
- expect('prefill' in plain).toBe(false);
- expect([location.href.includes('片名'), JSON.stringify(window.history.state ?? null).includes('片名')]).toEqual([false, false]);
-});
-
/** 索引页与资料页共用的容器,里面是壳铺好的骨架。 */
function indexSurface() {
const index = document.createElement('section');
diff --git a/frontend/test/react/quality-goals.test.tsx b/frontend/test/react/quality-goals.test.tsx
index f16de966f..5f612486c 100644
--- a/frontend/test/react/quality-goals.test.tsx
+++ b/frontend/test/react/quality-goals.test.tsx
@@ -12,7 +12,7 @@ import {
type QualityGoal, type QualityGoalsData,
} from '../../src/react/quality-goals/quality-goals';
-import { click, mount, mountRoot } from './render';
+import { click, mount, mountRoot, settle } from './render';
// 客户端是模块级的单例(所有 React 根共用一个),用例之间不清就互相喂数据。
afterEach(() => queryClient.clear());
@@ -40,7 +40,7 @@ const payload = (items: QualityGoal[], total = items.length): QualityGoalsData =
/** 遗留层交出来的那几个助手,换成可辨认的最小实现。 */
const legacyProps = () => ({
- searchResources: vi.fn(),
+ toast: vi.fn(),
openItem: vi.fn<(id: number) => void>(),
javTitleHtml: (item: QualityGoal) => `<strong class="javcode">${item.name}</strong>`,
javDisplayName: (item: QualityGoal) => `名称 ${item.name}`,
@@ -50,7 +50,11 @@ const legacyProps = () => ({
/** 依次回这几份数据,最后一份之后一直回它。`null` 那一份回 500。 */
function serve(...responses: (QualityGoalsData | null)[]) {
let at = 0;
- const fetcher = vi.fn(async (_input: string, _init?: RequestInit) => {
+ const fetcher = vi.fn(async (input: string, _init?: RequestInit) => {
+ // 云下载弹层自己取下载配置,那一路回一份没配渠道的空表,不占这几份数据的次序。
+ if (input.startsWith('/api/downloads')) {
+ return { ok: true, status: 200, json: async () => ({ available: true, providers: [], tasks: [] }) };
+ }
const body = responses[Math.min(at, responses.length - 1)] ?? null;
at += 1;
return body
@@ -133,13 +137,14 @@ it('封面、标题和页脚三处都打开同一部作品,无障碍名称用
expect(props.openItem.mock.calls).toEqual([[42], [42], [42]]);
});
-it('搜索资源带入番号、原版本目标与资产来源,无番号只提供查看版本', async () => {
- const { host, props } = await open(payload([goal({ id: 42, code: 'ABC-123', reason: '中字' }), goal({ id: 43 })]));
+it('搜索资源原地打开云下载弹层,带入番号与原版本目标;无番号只提供查看版本', async () => {
+ const { host } = await open(payload([goal({ id: 42, code: 'ABC-123', reason: '中字' }), goal({ id: 43 })]));
const buttons = [...host.querySelectorAll('button')].filter((node) => node.textContent === '搜索资源');
expect(buttons).toHaveLength(1);
await click(buttons[0]);
- expect(props.searchResources).toHaveBeenCalledWith({ code: 'ABC-123', title: '名称 one.mp4',
- origin: 'asset:42', searchReason: '中字' });
+ await settle();
+ const dialog = document.querySelector('[role=dialog]');
+ expect(dialog?.textContent).toContain('ABC-123 名称 one.mp4');
});
it('一条目标都没有时给空态,不是一片白', async () => {
diff --git a/frontend/test/react/surface-boundary.test.tsx b/frontend/test/react/surface-boundary.test.tsx
index d954a7660..3bb3948ab 100644
--- a/frontend/test/react/surface-boundary.test.tsx
+++ b/frontend/test/react/surface-boundary.test.tsx
@@ -65,7 +65,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/surface-routes.test.tsx b/frontend/test/react/surface-routes.test.tsx
index 16e2394d7..1b28e52cb 100644
--- a/frontend/test/react/surface-routes.test.tsx
+++ b/frontend/test/react/surface-routes.test.tsx
@@ -41,7 +41,7 @@ function shellActions(): ShellActions {
openItem: vi.fn(), openEntity: vi.fn(), openTag: vi.fn(), openTasteSignal: vi.fn(), navigate: vi.fn(),
openManage: vi.fn(), managePath: vi.fn(() => ''), openFollow: vi.fn(), receipt: vi.fn(), toast: vi.fn(),
failure: vi.fn(), revealSource: vi.fn(async () => ''), reopenTutorial: vi.fn(async () => {}),
- requestConfigurationSection: vi.fn(), requestCloudDownload: vi.fn(), routeReview: vi.fn(),
+ requestConfigurationSection: vi.fn(), routeReview: vi.fn(),
routeFollowManage: vi.fn(), saveFollowPreference: vi.fn(), srcBadge: () => '', routeIndex: vi.fn(),
savePeopleLayout: vi.fn(), exitSelectMode: vi.fn(), personAvatar: vi.fn(() => ({ html: '', face: '' })),
authorAvatar: vi.fn(() => ''), showIndexTags: vi.fn(), openFollowAuthor: vi.fn(), openFollowTag: vi.fn(),
diff --git a/frontend/test/react/want-list.test.tsx b/frontend/test/react/want-list.test.tsx
index 73ef43b9b..bbaf88640 100644
--- a/frontend/test/react/want-list.test.tsx
+++ b/frontend/test/react/want-list.test.tsx
@@ -50,13 +50,12 @@ const reads = (fetcher: ReturnType<typeof serve>) => fetcher.mock.calls.filter((
async function open(readOnly = false) {
const toast = vi.fn();
- const cloudDownload = vi.fn();
const host = await mount(
<QueryClientProvider client={queryClient}>
- <WantList readOnly={readOnly} toast={toast} cloudDownload={cloudDownload} />
+ <WantList readOnly={readOnly} toast={toast} />
</QueryClientProvider>);
await settle();
- return { host, toast, cloudDownload };
+ return { host, toast };
}
it('按待找、未发售、暂时放弃、已入库分段,段名带条数;只有暂时放弃的那条能重新查找', async () => {
@@ -77,24 +76,19 @@ it('按待找、未发售、暂时放弃、已入库分段,段名带条数;
expect(buttonNamed('重新查找', host.querySelector('[data-want-id="2"]')!)).toBeNull();
});
-it('待找与暂时放弃两段每行有云下载,带着番号、标题与 wishlist 来处;未发售与已入库没有', async () => {
+it('待找与暂时放弃两段每行有搜索资源,原地打开带番号与标题的云下载弹层;未发售与已入库没有', async () => {
serve(listed([
want(2, { title: '雨の日' }), want(3, { phase: 'given_up', search_count: 3 }),
want(4, { phase: 'unreleased', release_date: '2026-12-01' }), want(1, { phase: 'acquired' }),
want(6, { code: null, origin: 'follow', title: '关注里的一条', follow_item_id: 9 }),
]));
- const { host, cloudDownload } = await open();
- const key = (id: number) => buttonNamed('云下载', host.querySelector(`[data-want-id="${id}"]`)!);
+ const { host } = await open();
+ const key = (id: number) => buttonNamed('搜索资源', host.querySelector(`[data-want-id="${id}"]`)!);
expect([2, 3, 4, 1, 6].map((id) => !!key(id))).toEqual([true, true, false, false, true]);
expect(key(2)!.className).toContain('bg-background-primary-default');
await click(key(2));
- await click(key(3));
- await click(key(6));
- expect(cloudDownload.mock.calls.map(([prefill]) => prefill)).toEqual([
- { code: 'ABC-2', title: '雨の日', origin: 'wishlist:2' },
- { code: 'ABC-3', title: '', origin: 'wishlist:3' },
- { code: '', title: '关注里的一条', origin: 'wishlist:6' },
- ]);
+ await settle();
+ expect(document.querySelector('[role=dialog]')?.textContent).toContain('ABC-2 雨の日');
});
it('一条都没有就是空态,不画空的分段', async () => {
@@ -151,5 +145,5 @@ it('只读的机器:输入框、添加与每行的键都禁用', async () => {
expect(host.querySelector<HTMLInputElement>('input[aria-label="番号"]')!.disabled).toBe(true);
expect(buttonNamed('添加', host)!.disabled).toBe(true);
expect(buttonNamed('移除', host)!.disabled).toBe(true);
- expect(buttonNamed('云下载', host)!.disabled).toBe(true);
+ expect(buttonNamed('搜索资源', host)!.disabled).toBe(true);
});
diff --git a/frontend/test/shell/store.test.ts b/frontend/test/shell/store.test.ts
index dea4c7008..329ba8aaf 100644
--- a/frontend/test/shell/store.test.ts
+++ b/frontend/test/shell/store.test.ts
@@ -19,7 +19,7 @@ it('初值与壳启动之前一致:口径还没写入,来处指向首页与
expect([shell.detailReturnPath, shell.followDetailReturnPath]).toEqual(['/', '/follow']);
expect([shell.detailOriginAnchor, shell.detailOriginAbove, shell.detailReturnNeedsRestore]).toEqual([null, false, false]);
expect([shell.activeQueue, shell.pendingQueueRoute, shell.presentedItem]).toEqual([null, null, null]);
- expect([shell.configurationRequestedSection, shell.activityPrefill]).toEqual(['', null]);
+ expect(shell.configurationRequestedSection).toBe('');
expect(shell.selected.size + shell.followSelected.size).toBe(0);
expect(shell.shellVersion()).toBe(0);
});
@@ -95,7 +95,7 @@ it('退订之后不再收到通知;版本号单调递增', () => {
const stop = shell.subscribeShell(listener);
shell.notifyShell();
stop();
- shell.writeShell({ activityPrefill: { title: 'x' } });
+ shell.writeShell({ configurationRequestedSection: 'media' });
shell.notifyShell();
expect(listener).toHaveBeenCalledTimes(1);
expect(shell.shellVersion()).toBe(3);
diff --git a/web/app.js b/web/app.js
index b3f6a25eb..aa9b4bf51 100644
--- a/web/app.js
+++ b/web/app.js
@@ -23,7 +23,7 @@ import { loadRouter, managedEntry, managedTaken, openManagedRoute, peachHistory,
import { registerDiagnosticsRoute } from './dist/peach-ui.js';
import { state, barsContext, detailReturnBarsContext, selected, followSelected, selectMode, lastSelectedId, followLastSelectedId, selectSurface } from './dist/peach-ui.js';
import { detailReturnPath, detailOriginAnchor, detailOriginAbove, detailReturnNeedsRestore, activeQueue, pendingQueueRoute, presentedItem, followDetailReturnPath } from './dist/peach-ui.js';
-import { configurationRequestedSection, activityPrefill, notifyShell, writeShell } from './dist/peach-ui.js';
+import { configurationRequestedSection, notifyShell, writeShell } from './dist/peach-ui.js';
import { adoptOverlayState, clearOverlayBackground, holdOverlayBackground, overlayState, retagOverlay, takeOverlayReturn } from './dist/peach-ui.js';
import { javImageKind, syncJavImages, entitySkeletonHtml } from './dist/peach-ui.js';
import { avatarInner, configureHoverPreview, coverAnchor, coverImage, entityFaceImg, faceBoxAttrs, faceOrigin, facePos, imageFallbackAttrs, installCardArt, logoUrl, refitNativeImages, releaseHoverPreviews, rememberRepresentatives, setHoverState, upgradeCover, wireImageFallbacks } from './dist/peach-ui.js';
@@ -1984,21 +1984,14 @@ async function openReview(push=true){
if(surfaceCurrent(surface))window.scrollTo({top:0,behavior:'smooth'});
}
/* 活动页(任务中心)由路由树画。它自己按内容决定轮询快慢,壳不给它任何助手:
- 任务中心那几段只显示 /api/tasks 的结果,云下载段自己取 /api/downloads、自己提交。
- 关注条目的「云下载」键经 openCloudDownload 带着标题与来处进来,表单据此预填,
- 用户只贴磁力。上下文只交给这一次打开、不进地址栏:标题不该留在历史记录里,刷新后表单回到空白。
- 关注管理页、高清版目标页的键经路由树走过来,先交 `requestCloudDownload` 再换地址,读的是同一个
- `activityPrefill`(`frontend/src/shell/` 的单例)。 */
-function openCloudDownload(prefill){writeShell({activityPrefill:prefill});openActivity(true)}
+ 任务中心那几段只显示 /api/tasks 的结果,云下载段自己取 /api/downloads。 */
async function openActivity(push=true){
releaseHoverPreviews();disposeStage(false);enterManagementSurface();
- const prefill=activityPrefill;writeShell({activityPrefill:null});
if(push)route('/activity');
const surface=claimSurface('/activity');
showManagementBody({placeholder:managementPlaceholder('/activity')});
- await openManagedRoute('/activity',prefill?{prefill}:{},managedSurface(surface));
- // 带着上下文进来时表单自己聚焦磁力框、把它滚进视野,这里不再拉回顶部。
- if(surfaceCurrent(surface)&&!prefill)window.scrollTo({top:0,behavior:'smooth'});
+ await openManagedRoute('/activity',{},managedSurface(surface));
+ if(surfaceCurrent(surface))window.scrollTo({top:0,behavior:'smooth'});
}
/* 配置页(这台电脑的媒体文件夹与端口)同样是 island。它只在运行 Peach 的这台电脑上
有意义:服务端按回环地址与独立包两道门放行,手机上的管理菜单也不列它
@@ -2252,7 +2245,6 @@ const followDetailActions={
present:item=>{renderFollowDrawer(sidebarTagCounts([{tags:followCardTags(item)}]))},
toast:(message,{undo}={})=>actionReceipt(message,{undo}),
failure:(action,error)=>actionFailure(action,error),
- cloudDownload:item=>openCloudDownload({title:item.title||'',origin:`follow:${item.id}`}),
};
async function openFollowDetail(id,push=true,mediaIndex=null,preserveReturn=false){
@@ -3991,7 +3983,6 @@ const shellActions={
revealSource:revealForIsland,
reopenTutorial:reopenPostSetupTutorial,
requestConfigurationSection:section=>{writeShell({configurationRequestedSection:section})},
- requestCloudDownload:prefill=>{writeShell({activityPrefill:prefill})},
routeReview,
routeFollowManage,
saveFollowPreference:patch=>{
diff --git a/web/dist/peach-react.js b/web/dist/peach-react.js
index c32d61df6..1e1ff669b 100644
--- a/web/dist/peach-react.js
+++ b/web/dist/peach-react.js
@@ -9709,10 +9709,10 @@ function ute(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenuTrigger.mjs
-function dte(e) {
+function Iv(e) {
return e && e.__esModule ? e.default : e;
}
-function Iv(e, t, n) {
+function Lv(e, t, n) {
let { type: r = "menu", isDisabled: i, trigger: a = "press" } = e, o = dh(), { triggerProps: s, overlayProps: c } = ute({ type: r }, t, n), l = (e, n, r = "first") => {
if (!e || n.isDefaultPrevented()) return !1;
t.toggle(r);
@@ -9728,7 +9728,7 @@ function Iv(e, t, n) {
"Alt+ArrowDown": (e) => l(!0, e, "first"),
"Alt+ArrowUp": (e) => l(!0, e, "last")
}
- }), d = wg(dte(Nv), "@react-aria/menu"), { longPressProps: f } = Pv({
+ }), d = wg(Iv(Nv), "@react-aria/menu"), { longPressProps: f } = Pv({
isDisabled: i || a !== "longPress",
accessibilityDescription: d.format("longPressMessage"),
onLongPressStart() {
@@ -9792,8 +9792,8 @@ function Iv(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/selection/useTypeSelect.mjs
-var Lv = 1e3;
-function Rv(e) {
+var Rv = 1e3;
+function zv(e) {
let { keyboardDelegate: t, selectionManager: n, onTypeSelect: r } = e, i = (0, B.useRef)({
search: "",
timeout: void 0
@@ -9812,11 +9812,11 @@ function Rv(e) {
}
clearTimeout(i.current.timeout), i.current.timeout = setTimeout(() => {
i.current.search = "";
- }, Lv);
+ }, Rv);
}
} : void 0,
onKeyDown: t.getKeyForSearch ? (e) => {
- let a = fte(e.key);
+ let a = dte(e.key);
if (!(!a || e.ctrlKey || e.metaKey || e.altKey || !Op(e.currentTarget, H(e)) || i.current.search.length === 0 && a === " ")) {
if (i.current.search += a, t.getKeyForSearch != null) {
let a = t.getKeyForSearch(i.current.search, n.focusedKey);
@@ -9828,17 +9828,17 @@ function Rv(e) {
}
clearTimeout(i.current.timeout), i.current.timeout = setTimeout(() => {
i.current.search = "";
- }, Lv);
+ }, Rv);
}
} : void 0
} };
}
-function fte(e) {
+function dte(e) {
return e.length === 1 || !/^[A-Z]/i.test(e) ? e : "";
}
//#endregion
//#region node_modules/react-aria/dist/private/utils/useUpdateLayoutEffect.mjs
-function zv(e, t) {
+function Bv(e, t) {
let n = (0, B.useRef)(!0), r = (0, B.useRef)(null);
Hp(() => (n.current = !0, () => {
n.current = !1;
@@ -9848,7 +9848,7 @@ function zv(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/selection/useSelectableCollection.mjs
-function Bv(e) {
+function Vv(e) {
let { selectionManager: t, keyboardDelegate: n, ref: r, autoFocus: i = !1, shouldFocusWrap: a = !1, disallowEmptySelection: o = !1, disallowSelectAll: s = !1, escapeKeyBehavior: c = "clearSelection", selectOnFocus: l = t.selectionBehavior === "replace", disallowTypeAhead: u = !1, shouldUseVirtualFocus: d, allowsTabNavigation: f = !1, scrollRef: p = r, linkBehavior: m = "action", UNSTABLE_focusOnEntry: h } = e, { direction: g } = vg(), _ = lm(), v = (e, n, i) => {
if (n != null) {
if (t.isLink(n) && m === "selection" && l && !J_(e)) {
@@ -10041,14 +10041,14 @@ function Bv(e) {
e.stopPropagation(), t.setFocused(!0), n?.focusStrategy === "first" && (I.current = !0);
} : void 0);
let te = n.getFirstKey?.() ?? null;
- zv(() => {
+ Bv(() => {
if (I.current) {
if (te == null) {
let e = kp();
og(r.current), sg(e, null), t.collection.size > 0 && (I.current = !1);
} else t.setFocusedKey(te), I.current = !1;
}
- }, [te, t.collection.size]), zv(() => {
+ }, [te, t.collection.size]), Bv(() => {
t.collection.size > 0 && (I.current = !1);
}, [t.focusedKey]), dg(r, tee, d ? (e) => {
e.stopPropagation(), t.setFocused(!1), e.detail?.clearFocusKey && t.setFocusedKey(null);
@@ -10090,7 +10090,7 @@ function Bv(e) {
onMouseDown(e) {
p.current === H(e) && e.preventDefault();
}
- }, { typeSelectProps: se } = Rv({
+ }, { typeSelectProps: se } = zv({
keyboardDelegate: n,
selectionManager: t
});
@@ -10105,13 +10105,13 @@ function Bv(e) {
}
//#endregion
//#region node_modules/react-stately/dist/private/collections/getChildNodes.mjs
-function Vv(e, t) {
+function Hv(e, t) {
return typeof t.getChildren == "function" ? t.getChildren(e.key) : e.childNodes;
}
-function Hv(e) {
- return Uv(e, 0);
+function Uv(e) {
+ return Wv(e, 0);
}
-function Uv(e, t) {
+function Wv(e, t) {
if (t < 0) return;
let n = 0;
for (let r of e) {
@@ -10119,44 +10119,44 @@ function Uv(e, t) {
n++;
}
}
-function Wv(e) {
+function Gv(e) {
let t;
for (let n of e) t = n;
return t;
}
-function Gv(e, t, n) {
+function Kv(e, t, n) {
if (t.parentKey === n.parentKey) return t.index - n.index;
- let r = [...Kv(e, t), t], i = [...Kv(e, n), n], a = r.slice(0, i.length).findIndex((e, t) => e !== i[t]);
+ let r = [...qv(e, t), t], i = [...qv(e, n), n], a = r.slice(0, i.length).findIndex((e, t) => e !== i[t]);
return a === -1 ? r.findIndex((e) => e === n) >= 0 ? 1 : (i.findIndex((e) => e === t), -1) : (t = r[a], n = i[a], t.index - n.index);
}
-function Kv(e, t) {
+function qv(e, t) {
let n = [], r = t;
for (; r?.parentKey != null;) r = e.getItem(r.parentKey), r && n.unshift(r);
return n;
}
//#endregion
//#region node_modules/react-stately/dist/private/collections/getItemCount.mjs
-var qv = /* @__PURE__ */ new WeakMap();
-function Jv(e) {
- let t = qv.get(e);
+var Jv = /* @__PURE__ */ new WeakMap();
+function Yv(e) {
+ let t = Jv.get(e);
if (t != null) return t;
let n = 0, r = (t) => {
- for (let i of t) i.type === "section" ? r(Vv(i, e)) : i.type === "item" && n++;
+ for (let i of t) i.type === "section" ? r(Hv(i, e)) : i.type === "item" && n++;
};
- return r(e), qv.set(e, n), n;
+ return r(e), Jv.set(e, n), n;
}
//#endregion
//#region node_modules/react-aria/dist/private/i18n/useCollator.mjs
-var Yv = /* @__PURE__ */ new Map();
-function Xv(e) {
+var Xv = /* @__PURE__ */ new Map();
+function Zv(e) {
let { locale: t } = vg(), n = t + (e ? Object.entries(e).sort((e, t) => e[0] < t[0] ? -1 : 1).join() : "");
- if (Yv.has(n)) return Yv.get(n);
+ if (Xv.has(n)) return Xv.get(n);
let r = new Intl.Collator(t, e);
- return Yv.set(n, r), r;
+ return Xv.set(n, r), r;
}
//#endregion
//#region node_modules/react-aria/dist/private/interactions/PressResponder.mjs
-var pte = /*#__PURE__*/ B.forwardRef(({ children: e, ...t }, n) => {
+var fte = /*#__PURE__*/ B.forwardRef(({ children: e, ...t }, n) => {
let r = (0, B.useRef)(!1), i = (0, B.useContext)(Ng), a = U(i || {}, {
...t,
register() {
@@ -10167,44 +10167,44 @@ var pte = /*#__PURE__*/ B.forwardRef(({ children: e, ...t }, n) => {
r.current ||= !0;
}, []), /*#__PURE__*/ B.createElement(Ng.Provider, { value: a }, e);
});
-function mte({ children: e }) {
+function pte({ children: e }) {
let t = (0, B.useMemo)(() => ({ register: () => {} }), []);
return /*#__PURE__*/ B.createElement(Ng.Provider, { value: t }, e);
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/PortalProvider.mjs
-var Zv = /*#__PURE__*/ (0, B.createContext)({});
-function Qv(e) {
- let { getContainer: t } = e, { getContainer: n } = $v();
- return /*#__PURE__*/ B.createElement(Zv.Provider, { value: { getContainer: t === null ? void 0 : t ?? n } }, e.children);
+var Qv = /*#__PURE__*/ (0, B.createContext)({});
+function $v(e) {
+ let { getContainer: t } = e, { getContainer: n } = ey();
+ return /*#__PURE__*/ B.createElement(Qv.Provider, { value: { getContainer: t === null ? void 0 : t ?? n } }, e.children);
}
-function $v() {
- return (0, B.useContext)(Zv) ?? {};
+function ey() {
+ return (0, B.useContext)(Qv) ?? {};
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/Overlay.mjs
-var ey = /*#__PURE__*/ B.createContext(null);
-function ty(e) {
+var ty = /*#__PURE__*/ B.createContext(null);
+function ny(e) {
let t = Om(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [i, a] = (0, B.useState)(!1), o = (0, B.useMemo)(() => ({
contain: i,
setContain: a
- }), [i, a]), { getContainer: s } = $v();
+ }), [i, a]), { getContainer: s } = ey();
if (!e.portalContainer && s && (n = s()), !n) return null;
let c = e.children;
return e.disableFocusManagement || (c = /*#__PURE__*/ B.createElement(Yg, {
restoreFocus: !0,
contain: (e.shouldContainFocus || i) && !r
- }, c)), c = /*#__PURE__*/ B.createElement(ey.Provider, { value: o }, /*#__PURE__*/ B.createElement(mte, null, /*#__PURE__*/ B.createElement(Fh.Provider, { value: null }, c))), /*#__PURE__*/ $f.createPortal(c, n);
+ }, c)), c = /*#__PURE__*/ B.createElement(ty.Provider, { value: o }, /*#__PURE__*/ B.createElement(pte, null, /*#__PURE__*/ B.createElement(Fh.Provider, { value: null }, c))), /*#__PURE__*/ $f.createPortal(c, n);
}
-function ny() {
- let e = (0, B.useContext)(ey)?.setContain;
+function ry() {
+ let e = (0, B.useContext)(ty)?.setContain;
Hp(() => {
e?.(!0);
}, [e]);
}
//#endregion
//#region node_modules/react-aria/dist/private/dialog/useDialog.mjs
-function hte(e, t) {
+function mte(e, t) {
let { role: n = "dialog" } = e, r = ph();
r = e["aria-label"] ? void 0 : r;
let i = ph();
@@ -10220,7 +10220,7 @@ function hte(e, t) {
clearTimeout(e);
};
}
- }, [t]), ny(), (0, B.useRef)(!1), (0, B.useEffect)(() => {});
+ }, [t]), ry(), (0, B.useRef)(!1), (0, B.useEffect)(() => {});
let o = e["aria-describedby"] ?? i;
return {
dialogProps: {
@@ -10239,7 +10239,7 @@ function hte(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/focus/useFocusRing.mjs
-function ry(e = {}) {
+function iy(e = {}) {
let { autoFocus: t = !1, isTextInput: n, within: r } = e, i = (0, B.useRef)({
isFocused: !1,
isFocusVisible: t || Gm()
@@ -10267,35 +10267,35 @@ function ry(e = {}) {
}
//#endregion
//#region node_modules/react-aria/dist/private/i18n/useListFormatter.mjs
-function gte(e = {}) {
+function hte(e = {}) {
let { locale: t } = vg();
return (0, B.useMemo)(() => new Intl.ListFormat(t, e), [t, e]);
}
//#endregion
//#region node_modules/react-aria/dist/private/interactions/useHover.mjs
-var iy = !1, ay = 0;
-function _te() {
- iy = !0, setTimeout(() => {
- iy = !1;
+var ay = !1, oy = 0;
+function gte() {
+ ay = !0, setTimeout(() => {
+ ay = !1;
}, 500);
}
-function oy(e) {
- e.pointerType === "touch" && _te();
+function sy(e) {
+ e.pointerType === "touch" && gte();
}
-function vte() {
+function _te() {
let e = vp(null);
- if (e !== void 0) return ay === 0 && typeof PointerEvent < "u" && e.addEventListener("pointerup", oy), ay++, () => {
- ay--, !(ay > 0) && typeof PointerEvent < "u" && e.removeEventListener("pointerup", oy);
+ if (e !== void 0) return oy === 0 && typeof PointerEvent < "u" && e.addEventListener("pointerup", sy), oy++, () => {
+ oy--, !(oy > 0) && typeof PointerEvent < "u" && e.removeEventListener("pointerup", sy);
};
}
-function sy(e) {
+function cy(e) {
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: i } = e, [a, o] = (0, B.useState)(!1), s = (0, B.useRef)({
isHovered: !1,
ignoreEmulatedMouseEvents: !1,
pointerType: "",
target: null
}).current;
- (0, B.useEffect)(vte, []);
+ (0, B.useEffect)(_te, []);
let { addGlobalListener: c, removeAllGlobalListeners: l } = Pg(), { hoverProps: u, triggerHoverEnd: d } = (0, B.useMemo)(() => {
let e = (e, r) => {
if (s.pointerType = r, i || r === "touch" || s.isHovered || !Op(e.currentTarget, H(e))) return;
@@ -10317,7 +10317,7 @@ function sy(e) {
}), n && n(!1), o(!1));
}, u = {};
return typeof PointerEvent < "u" && (u.onPointerEnter = (t) => {
- iy && t.pointerType === "mouse" || e(t, t.pointerType);
+ ay && t.pointerType === "mouse" || e(t, t.pointerType);
}, u.onPointerLeave = (e) => {
!i && Op(e.currentTarget, H(e)) && a(e, e.pointerType);
}), {
@@ -10342,12 +10342,12 @@ function sy(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/interactions/useInteractOutside.mjs
-function yte(e) {
+function vte(e) {
let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: i } = e, a = (0, B.useRef)({
isPointerDown: !1,
ignoreEmulatedMouseEvents: !1
}), o = ug((e) => {
- n && cy(e, t) && (i && i(e), a.current.isPointerDown = !0);
+ n && ly(e, t) && (i && i(e), a.current.isPointerDown = !0);
}), s = ug((e) => {
n && n(e);
});
@@ -10357,7 +10357,7 @@ function yte(e) {
let n = t.current, i = vp(n);
if (typeof PointerEvent < "u") {
let n = (n) => {
- e.isPointerDown && cy(n, t) && s(n), e.isPointerDown = !1;
+ e.isPointerDown && ly(n, t) && s(n), e.isPointerDown = !1;
};
return i.addEventListener("pointerdown", o, !0), i.addEventListener("click", n, !0), () => {
i.removeEventListener("pointerdown", o, !0), i.removeEventListener("click", n, !0);
@@ -10365,7 +10365,7 @@ function yte(e) {
}
}, [t, r]);
}
-function cy(e, t) {
+function ly(e, t) {
if (e.button > 0) return !1;
let n = H(e);
if (n) {
@@ -10376,8 +10376,8 @@ function cy(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ar-AE.mjs
-var ly = {};
-ly = {
+var uy = {};
+uy = {
deselectedItem: (e) => `${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,
longPressToSelect: "اضغط مطولًا للدخول إلى وضع التحديد.",
select: "تحديد",
@@ -10391,8 +10391,8 @@ ly = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/bg-BG.mjs
-var uy = {};
-uy = {
+var dy = {};
+dy = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,
longPressToSelect: "Натиснете и задръжте за да влезете в избирателен режим.",
select: "Изберете",
@@ -10406,8 +10406,8 @@ uy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/cs-CZ.mjs
-var dy = {};
-dy = {
+var fy = {};
+fy = {
deselectedItem: (e) => `Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,
longPressToSelect: "Dlouhým stisknutím přejdete do režimu výběru.",
select: "Vybrat",
@@ -10421,8 +10421,8 @@ dy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/da-DK.mjs
-var fy = {};
-fy = {
+var py = {};
+py = {
deselectedItem: (e) => `${e.item} ikke valgt.`,
longPressToSelect: "Lav et langt tryk for at aktivere valgtilstand.",
select: "Vælg",
@@ -10436,8 +10436,8 @@ fy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/de-DE.mjs
-var py = {};
-py = {
+var my = {};
+my = {
deselectedItem: (e) => `${e.item} nicht ausgew\xe4hlt.`,
longPressToSelect: "Gedrückt halten, um Auswahlmodus zu öffnen.",
select: "Auswählen",
@@ -10451,8 +10451,8 @@ py = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/el-GR.mjs
-var my = {};
-my = {
+var hy = {};
+hy = {
deselectedItem: (e) => `\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,
longPressToSelect: "Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",
select: "Επιλογή",
@@ -10466,8 +10466,8 @@ my = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/en-US.mjs
-var hy = {};
-hy = {
+var gy = {};
+gy = {
deselectedItem: (e) => `${e.item} not selected.`,
select: "Select",
selectedCount: (e, t) => `${t.plural(e.count, {
@@ -10481,8 +10481,8 @@ hy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/es-ES.mjs
-var gy = {};
-gy = {
+var _y = {};
+_y = {
deselectedItem: (e) => `${e.item} no seleccionado.`,
longPressToSelect: "Mantenga pulsado para abrir el modo de selección.",
select: "Seleccionar",
@@ -10496,8 +10496,8 @@ gy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/et-EE.mjs
-var _y = {};
-_y = {
+var vy = {};
+vy = {
deselectedItem: (e) => `${e.item} pole valitud.`,
longPressToSelect: "Valikurežiimi sisenemiseks vajutage pikalt.",
select: "Vali",
@@ -10511,8 +10511,8 @@ _y = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/fi-FI.mjs
-var vy = {};
-vy = {
+var yy = {};
+yy = {
deselectedItem: (e) => `Kohdetta ${e.item} ei valittu.`,
longPressToSelect: "Siirry valintatilaan painamalla pitkään.",
select: "Valitse",
@@ -10526,8 +10526,8 @@ vy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/fr-FR.mjs
-var yy = {};
-yy = {
+var by = {};
+by = {
deselectedItem: (e) => `${e.item} non s\xe9lectionn\xe9.`,
longPressToSelect: "Appuyez de manière prolongée pour passer en mode de sélection.",
select: "Sélectionner",
@@ -10541,8 +10541,8 @@ yy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/he-IL.mjs
-var by = {};
-by = {
+var xy = {};
+xy = {
deselectedItem: (e) => `${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,
longPressToSelect: "הקשה ארוכה לכניסה למצב בחירה.",
select: "בחר",
@@ -10556,8 +10556,8 @@ by = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/hr-HR.mjs
-var xy = {};
-xy = {
+var Sy = {};
+Sy = {
deselectedItem: (e) => `Stavka ${e.item} nije odabrana.`,
longPressToSelect: "Dugo pritisnite za ulazak u način odabira.",
select: "Odaberite",
@@ -10571,8 +10571,8 @@ xy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/hu-HU.mjs
-var Sy = {};
-Sy = {
+var Cy = {};
+Cy = {
deselectedItem: (e) => `${e.item} nincs kijel\xf6lve.`,
longPressToSelect: "Nyomja hosszan a kijelöléshez.",
select: "Kijelölés",
@@ -10586,8 +10586,8 @@ Sy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/it-IT.mjs
-var Cy = {};
-Cy = {
+var wy = {};
+wy = {
deselectedItem: (e) => `${e.item} non selezionato.`,
longPressToSelect: "Premi a lungo per passare alla modalità di selezione.",
select: "Seleziona",
@@ -10601,8 +10601,8 @@ Cy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ja-JP.mjs
-var wy = {};
-wy = {
+var Ty = {};
+Ty = {
deselectedItem: (e) => `${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,
longPressToSelect: "長押しして選択モードを開きます。",
select: "選択",
@@ -10616,8 +10616,8 @@ wy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ko-KR.mjs
-var Ty = {};
-Ty = {
+var Ey = {};
+Ey = {
deselectedItem: (e) => `${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,
longPressToSelect: "선택 모드로 들어가려면 길게 누르십시오.",
select: "선택",
@@ -10631,8 +10631,8 @@ Ty = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/lt-LT.mjs
-var Ey = {};
-Ey = {
+var Dy = {};
+Dy = {
deselectedItem: (e) => `${e.item} nepasirinkta.`,
longPressToSelect: "Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",
select: "Pasirinkti",
@@ -10646,8 +10646,8 @@ Ey = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/lv-LV.mjs
-var Dy = {};
-Dy = {
+var Oy = {};
+Oy = {
deselectedItem: (e) => `Vienums ${e.item} nav atlas\u{12B}ts.`,
longPressToSelect: "Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",
select: "Atlasīt",
@@ -10661,8 +10661,8 @@ Dy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/nb-NO.mjs
-var Oy = {};
-Oy = {
+var ky = {};
+ky = {
deselectedItem: (e) => `${e.item} er ikke valgt.`,
longPressToSelect: "Bruk et langt trykk for å gå inn i valgmodus.",
select: "Velg",
@@ -10676,8 +10676,8 @@ Oy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/nl-NL.mjs
-var ky = {};
-ky = {
+var Ay = {};
+Ay = {
deselectedItem: (e) => `${e.item} niet geselecteerd.`,
longPressToSelect: "Druk lang om de selectiemodus te openen.",
select: "Selecteren",
@@ -10691,8 +10691,8 @@ ky = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/pl-PL.mjs
-var Ay = {};
-Ay = {
+var jy = {};
+jy = {
deselectedItem: (e) => `Nie zaznaczono ${e.item}.`,
longPressToSelect: "Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",
select: "Zaznacz",
@@ -10706,8 +10706,8 @@ Ay = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/pt-BR.mjs
-var jy = {};
-jy = {
+var My = {};
+My = {
deselectedItem: (e) => `${e.item} n\xe3o selecionado.`,
longPressToSelect: "Mantenha pressionado para entrar no modo de seleção.",
select: "Selecionar",
@@ -10721,8 +10721,8 @@ jy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/pt-PT.mjs
-var My = {};
-My = {
+var Ny = {};
+Ny = {
deselectedItem: (e) => `${e.item} n\xe3o selecionado.`,
longPressToSelect: "Prima continuamente para entrar no modo de seleção.",
select: "Selecionar",
@@ -10736,8 +10736,8 @@ My = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ro-RO.mjs
-var Ny = {};
-Ny = {
+var Py = {};
+Py = {
deselectedItem: (e) => `${e.item} neselectat.`,
longPressToSelect: "Apăsați lung pentru a intra în modul de selectare.",
select: "Selectare",
@@ -10751,8 +10751,8 @@ Ny = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/ru-RU.mjs
-var Py = {};
-Py = {
+var Fy = {};
+Fy = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
longPressToSelect: "Нажмите и удерживайте для входа в режим выбора.",
select: "Выбрать",
@@ -10766,8 +10766,8 @@ Py = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sk-SK.mjs
-var Fy = {};
-Fy = {
+var Iy = {};
+Iy = {
deselectedItem: (e) => `Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,
longPressToSelect: "Dlhším stlačením prejdite do režimu výberu.",
select: "Vybrať",
@@ -10781,8 +10781,8 @@ Fy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sl-SI.mjs
-var Iy = {};
-Iy = {
+var Ly = {};
+Ly = {
deselectedItem: (e) => `Element ${e.item} ni izbran.`,
longPressToSelect: "Za izbirni način pritisnite in dlje časa držite.",
select: "Izberite",
@@ -10796,8 +10796,8 @@ Iy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sr-SP.mjs
-var Ly = {};
-Ly = {
+var Ry = {};
+Ry = {
deselectedItem: (e) => `${e.item} nije izabrano.`,
longPressToSelect: "Dugo pritisnite za ulazak u režim biranja.",
select: "Izaberite",
@@ -10811,8 +10811,8 @@ Ly = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/sv-SE.mjs
-var Ry = {};
-Ry = {
+var zy = {};
+zy = {
deselectedItem: (e) => `${e.item} ej markerat.`,
longPressToSelect: "Tryck länge när du vill öppna väljarläge.",
select: "Markera",
@@ -10826,8 +10826,8 @@ Ry = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/tr-TR.mjs
-var zy = {};
-zy = {
+var By = {};
+By = {
deselectedItem: (e) => `${e.item} se\xe7ilmedi.`,
longPressToSelect: "Seçim moduna girmek için uzun basın.",
select: "Seç",
@@ -10841,8 +10841,8 @@ zy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/uk-UA.mjs
-var By = {};
-By = {
+var Vy = {};
+Vy = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
longPressToSelect: "Виконайте довге натиснення, щоб перейти в режим вибору.",
select: "Вибрати",
@@ -10856,8 +10856,8 @@ By = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/zh-CN.mjs
-var Vy = {};
-Vy = {
+var Hy = {};
+Hy = {
deselectedItem: (e) => `\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,
longPressToSelect: "长按以进入选择模式。",
select: "选择",
@@ -10871,8 +10871,8 @@ Vy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/intl/grid/zh-TW.mjs
-var Hy = {};
-Hy = {
+var Uy = {};
+Uy = {
deselectedItem: (e) => `\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,
longPressToSelect: "長按以進入選擇模式。",
select: "選取",
@@ -10886,55 +10886,55 @@ Hy = {
};
//#endregion
//#region node_modules/react-aria/dist/private/grid/intlStrings.mjs
-var Uy = {};
-Uy = {
- "ar-AE": ly,
- "bg-BG": uy,
- "cs-CZ": dy,
- "da-DK": fy,
- "de-DE": py,
- "el-GR": my,
- "en-US": hy,
- "es-ES": gy,
- "et-EE": _y,
- "fi-FI": vy,
- "fr-FR": yy,
- "he-IL": by,
- "hr-HR": xy,
- "hu-HU": Sy,
- "it-IT": Cy,
- "ja-JP": wy,
- "ko-KR": Ty,
- "lt-LT": Ey,
- "lv-LV": Dy,
- "nb-NO": Oy,
- "nl-NL": ky,
- "pl-PL": Ay,
- "pt-BR": jy,
- "pt-PT": My,
- "ro-RO": Ny,
- "ru-RU": Py,
- "sk-SK": Fy,
- "sl-SI": Iy,
- "sr-SP": Ly,
- "sv-SE": Ry,
- "tr-TR": zy,
- "uk-UA": By,
- "zh-CN": Vy,
- "zh-TW": Hy
+var Wy = {};
+Wy = {
+ "ar-AE": uy,
+ "bg-BG": dy,
+ "cs-CZ": fy,
+ "da-DK": py,
+ "de-DE": my,
+ "el-GR": hy,
+ "en-US": gy,
+ "es-ES": _y,
+ "et-EE": vy,
+ "fi-FI": yy,
+ "fr-FR": by,
+ "he-IL": xy,
+ "hr-HR": Sy,
+ "hu-HU": Cy,
+ "it-IT": wy,
+ "ja-JP": Ty,
+ "ko-KR": Ey,
+ "lt-LT": Dy,
+ "lv-LV": Oy,
+ "nb-NO": ky,
+ "nl-NL": Ay,
+ "pl-PL": jy,
+ "pt-BR": My,
+ "pt-PT": Ny,
+ "ro-RO": Py,
+ "ru-RU": Fy,
+ "sk-SK": Iy,
+ "sl-SI": Ly,
+ "sr-SP": Ry,
+ "sv-SE": zy,
+ "tr-TR": By,
+ "uk-UA": Vy,
+ "zh-CN": Hy,
+ "zh-TW": Uy
};
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridSelectionAnnouncement.mjs
-function bte(e) {
+function yte(e) {
return e && e.__esModule ? e.default : e;
}
-function xte(e, t) {
- let { getRowText: n = (e) => t.collection.getTextValue?.(e) ?? t.collection.getItem(e)?.textValue } = e, r = wg(bte(Uy), "@react-aria/grid"), i = t.selectionManager.rawSelection, a = (0, B.useRef)(i), o = (0, B.useCallback)(() => {
+function bte(e, t) {
+ let { getRowText: n = (e) => t.collection.getTextValue?.(e) ?? t.collection.getItem(e)?.textValue } = e, r = wg(yte(Wy), "@react-aria/grid"), i = t.selectionManager.rawSelection, a = (0, B.useRef)(i), o = (0, B.useCallback)(() => {
if (!t.selectionManager.isFocused || i === a.current) {
a.current = i;
return;
}
- let e = Wy(i, a.current), o = Wy(a.current, i), s = t.selectionManager.selectionBehavior === "replace", c = [];
+ let e = Gy(i, a.current), o = Gy(a.current, i), s = t.selectionManager.selectionBehavior === "replace", c = [];
if (t.selectionManager.selectedKeys.size === 1 && s) {
let e = t.selectionManager.selectedKeys.keys().next().value;
if (e != null && t.collection.getItem(e)) {
@@ -10973,7 +10973,7 @@ function xte(e, t) {
}
}, [i, t.selectionManager.isFocused]);
}
-function Wy(e, t) {
+function Gy(e, t) {
let n = /* @__PURE__ */ new Set();
if (e === "all" || t === "all") return n;
for (let r of e.keys()) t.has(r) || n.add(r);
@@ -10981,7 +10981,7 @@ function Wy(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/focus/useHasTabbableChild.mjs
-function Gy(e, t) {
+function Ky(e, t) {
let n = t?.isDisabled, [r, i] = (0, B.useState)(!1);
return Hp(() => {
if (e?.current && !n) {
@@ -11006,11 +11006,11 @@ function Gy(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useHighlightSelectionDescription.mjs
-function Ste(e) {
+function xte(e) {
return e && e.__esModule ? e.default : e;
}
-function Cte(e) {
- let t = wg(Ste(Uy), "@react-aria/grid"), n = Jm(), r = (n === "pointer" || n === "virtual" || n == null) && typeof window < "u" && "ontouchstart" in window;
+function Ste(e) {
+ let t = wg(xte(Wy), "@react-aria/grid"), n = Jm(), r = (n === "pointer" || n === "virtual" || n == null) && typeof window < "u" && "ontouchstart" in window;
return b_((0, B.useMemo)(() => {
let n = e.selectionManager.selectionMode, i = e.selectionManager.selectionBehavior, a;
return r && (a = t.format("longPressToSelect")), i === "replace" && n !== "none" && e.hasItemActions ? a : void 0;
@@ -11024,8 +11024,8 @@ function Cte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/selection/useSelectableList.mjs
-function Ky(e) {
- let { selectionManager: t, collection: n, disabledKeys: r, ref: i, keyboardDelegate: a, layoutDelegate: o, orientation: s } = e, c = Xv({
+function qy(e) {
+ let { selectionManager: t, collection: n, disabledKeys: r, ref: i, keyboardDelegate: a, layoutDelegate: o, orientation: s } = e, c = Zv({
usage: "search",
sensitivity: "base"
}), l = t.disabledBehavior, u = (0, B.useMemo)(() => a || new Q_({
@@ -11045,7 +11045,7 @@ function Ky(e) {
c,
l,
s
- ]), { collectionProps: d } = Bv({
+ ]), { collectionProps: d } = Vv({
...e,
ref: i,
selectionManager: t,
@@ -11055,7 +11055,7 @@ function Ky(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/selection/useSelectableItem.mjs
-function qy(e) {
+function Jy(e) {
let { id: t, selectionManager: n, key: r, ref: i, shouldSelectOnPressUp: a, shouldUseVirtualFocus: o, focus: s, isDisabled: c, onAction: l, allowsDifferentPressOrigin: u, linkBehavior: d = "action" } = e, f = lm();
t = dh(t);
let p = (e) => {
@@ -11102,20 +11102,20 @@ function qy(e) {
l && (l(), i.current?.dispatchEvent(new CustomEvent("react-aria-item-action", { bubbles: !0 }))), _ && i.current && f.open(i.current, e, D.href, D.routerOptions);
}, k = { ref: i };
a ? (k.onPressStart = (e) => {
- C.current = e.pointerType, T.current = w, e.pointerType === "keyboard" && (!S || Yy(e.key)) && p(e);
+ C.current = e.pointerType, T.current = w, e.pointerType === "keyboard" && (!S || Xy(e.key)) && p(e);
}, u ? (k.onPressUp = b ? void 0 : (e) => {
e.pointerType === "mouse" && v && p(e);
}, k.onPress = b ? O : (e) => {
e.pointerType !== "keyboard" && e.pointerType !== "mouse" && v && p(e);
}) : k.onPress = (e) => {
if (b || x && e.pointerType !== "mouse") {
- if (e.pointerType === "keyboard" && !Jy(e.key)) return;
+ if (e.pointerType === "keyboard" && !Yy(e.key)) return;
O(e);
} else e.pointerType !== "keyboard" && v && p(e);
}) : (k.onPressStart = (e) => {
- C.current = e.pointerType, T.current = w, E.current = b, v && (e.pointerType === "mouse" && !b || e.pointerType === "keyboard" && (!y || Yy(e.key))) && p(e);
+ C.current = e.pointerType, T.current = w, E.current = b, v && (e.pointerType === "mouse" && !b || e.pointerType === "keyboard" && (!y || Xy(e.key))) && p(e);
}, k.onPress = (e) => {
- (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && S && Jy(e.key) || e.pointerType === "mouse" && E.current) && (S ? O(e) : v && p(e));
+ (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && S && Yy(e.key) || e.pointerType === "mouse" && E.current) && (S ? O(e) : v && p(e));
});
let A = ote(n.collection);
if (m["data-collection"] = A, m["data-key"] = r, k.preventFocusOnPress = o, o && (k = U(k, {
@@ -11184,22 +11184,22 @@ function qy(e) {
hasAction: S
};
}
-function Jy(e) {
+function Yy(e) {
return e === "Enter";
}
-function Yy(e) {
+function Xy(e) {
return e === " ";
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridSelectionCheckbox.mjs
-function wte(e) {
+function Cte(e) {
return e && e.__esModule ? e.default : e;
}
-function Tte(e, t) {
+function wte(e, t) {
let { key: n } = e, r = t.selectionManager, i = dh(), a = !t.selectionManager.canSelectItem(n), o = t.selectionManager.isSelected(n);
return { checkboxProps: {
id: i,
- "aria-label": wg(wte(Uy), "@react-aria/grid").format("select"),
+ "aria-label": wg(Cte(Wy), "@react-aria/grid").format("select"),
isSelected: o,
isDisabled: a,
onChange: () => r.toggleSelection(n)
@@ -11207,10 +11207,10 @@ function Tte(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/listbox/useListBox.mjs
-function Ete(e, t, n) {
+function Tte(e, t, n) {
let r = Eg(e, { labelable: !0 }), i = e.selectionBehavior || "toggle", a = e.orientation || "vertical", o = e.linkBehavior || (i === "replace" ? "action" : "override");
i === "toggle" && o === "action" && (o = "override");
- let { listProps: s } = Ky({
+ let { listProps: s } = qy({
...e,
ref: n,
selectionManager: t.selectionManager,
@@ -11248,7 +11248,7 @@ function Ete(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/listbox/useListBoxSection.mjs
-function Dte(e) {
+function Ete(e) {
let { heading: t, "aria-label": n } = e, r = dh();
return {
itemProps: { role: "presentation" },
@@ -11268,7 +11268,7 @@ function Dte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/listbox/useOption.mjs
-function Ote(e, t, n) {
+function Dte(e, t, n) {
let { key: r } = e, i = q_.get(t), a = e.isDisabled ?? t.selectionManager.isDisabled(r), o = e.isSelected ?? t.selectionManager.isSelected(r), s = e.shouldSelectOnPressUp ?? i?.shouldSelectOnPressUp, c = e.shouldFocusOnHover ?? i?.shouldFocusOnHover, l = e.shouldUseVirtualFocus ?? i?.shouldUseVirtualFocus, u = e.isVirtualized ?? i?.isVirtualized, d = ph(), f = ph(), p = {
role: "option",
"aria-disabled": a || void 0,
@@ -11279,9 +11279,9 @@ function Ote(e, t, n) {
}, m = t.collection.getItem(r);
if (u) {
let e = Number(m?.index);
- p["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, p["aria-setsize"] = Jv(t.collection);
+ p["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, p["aria-setsize"] = Yv(t.collection);
}
- let h = i?.onAction ? () => i?.onAction?.(r) : void 0, g = ite(t, r), { itemProps: _, isPressed: v, isFocused: y, hasAction: b, allowsSelection: x } = qy({
+ let h = i?.onAction ? () => i?.onAction?.(r) : void 0, g = ite(t, r), { itemProps: _, isPressed: v, isFocused: y, hasAction: b, allowsSelection: x } = Jy({
selectionManager: t.selectionManager,
key: r,
ref: n,
@@ -11294,7 +11294,7 @@ function Ote(e, t, n) {
linkBehavior: i?.linkBehavior,
UNSTABLE_itemBehavior: i?.UNSTABLE_itemBehavior,
id: g
- }), { hoverProps: S } = sy({
+ }), { hoverProps: S } = cy({
isDisabled: a || !c,
onHoverStart() {
Gm() || (t.selectionManager.setFocused(!0), t.selectionManager.setFocusedKey(r));
@@ -11321,13 +11321,13 @@ function Ote(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/utils.mjs
-var Xy = /* @__PURE__ */ new WeakMap();
+var Zy = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenu.mjs
-function kte(e, t, n) {
+function Ote(e, t, n) {
let { shouldFocusWrap: r = !0, onKeyDown: i, onKeyUp: a, ...o } = e;
!e["aria-label"] && e["aria-labelledby"];
- let s = Eg(e, { labelable: !0 }), { listProps: c } = Ky({
+ let s = Eg(e, { labelable: !0 }), { listProps: c } = qy({
...o,
ref: n,
selectionManager: t.selectionManager,
@@ -11336,7 +11336,7 @@ function kte(e, t, n) {
shouldFocusWrap: r,
linkBehavior: "override"
});
- return Xy.set(t, {
+ return Zy.set(t, {
onClose: e.onClose,
onAction: e.onAction,
shouldUseVirtualFocus: e.shouldUseVirtualFocus
@@ -11353,8 +11353,8 @@ function kte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenuItem.mjs
-function Ate(e, t, n) {
- let { id: r, key: i, closeOnSelect: a, shouldCloseOnSelect: o, isVirtualized: s, "aria-haspopup": c, onPressStart: l, onPressUp: u, onPress: d, onPressChange: f, onPressEnd: p, onClick: m, onHoverStart: h, onHoverChange: g, onHoverEnd: _, onKeyDown: v, onKeyUp: y, onFocus: b, onFocusChange: x, onBlur: S, selectionManager: C = t.selectionManager } = e, w = !!c, T = w && e["aria-expanded"] === "true", E = e.isDisabled ?? C.isDisabled(i), D = e.isSelected ?? C.isSelected(i), O = Xy.get(t), k = t.collection.getItem(i), A = e.onClose || O.onClose, j = lm(), M = () => {
+function kte(e, t, n) {
+ let { id: r, key: i, closeOnSelect: a, shouldCloseOnSelect: o, isVirtualized: s, "aria-haspopup": c, onPressStart: l, onPressUp: u, onPress: d, onPressChange: f, onPressEnd: p, onClick: m, onHoverStart: h, onHoverChange: g, onHoverEnd: _, onKeyDown: v, onKeyUp: y, onFocus: b, onFocusChange: x, onBlur: S, selectionManager: C = t.selectionManager } = e, w = !!c, T = w && e["aria-expanded"] === "true", E = e.isDisabled ?? C.isDisabled(i), D = e.isSelected ?? C.isSelected(i), O = Zy.get(t), k = t.collection.getItem(i), A = e.onClose || O.onClose, j = lm(), M = () => {
if (!w && (k?.props?.onAction ? k.props.onAction() : e.onAction && e.onAction(i), O.onAction)) {
let e = O.onAction;
e(i, k?.value);
@@ -11378,7 +11378,7 @@ function Ate(e, t, n) {
};
if (C.selectionMode !== "none" && !w && (I["aria-checked"] = D), s) {
let e = Number(k?.index);
- I["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, I["aria-setsize"] = Jv(t.collection);
+ I["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, I["aria-setsize"] = Yv(t.collection);
}
let te = (0, B.useRef)(!1), ne = (e) => {
f?.(e), te.current = e;
@@ -11388,7 +11388,7 @@ function Ate(e, t, n) {
m?.(e), M(), gm(e, j, k.props.href, k?.props.routerOptions);
let t = re.current?.pointerType === "keyboard" ? re.current?.key === "Enter" || C.selectionMode === "none" || C.isLink(i) : C.selectionMode !== "multiple" || C.isLink(i);
t = o ?? a ?? t, A && !w && t && A(), re.current = null;
- }, { itemProps: oe, isFocused: se } = qy({
+ }, { itemProps: oe, isFocused: se } = Jy({
id: r,
selectionManager: C,
key: i,
@@ -11404,7 +11404,7 @@ function Ate(e, t, n) {
onPressChange: ne,
onPressEnd: p,
isDisabled: E
- }), { hoverProps: ue } = sy({
+ }), { hoverProps: ue } = cy({
isDisabled: E,
onHoverStart(e) {
!Gm() && !(T && c) && (C.setFocused(!0), C.setFocusedKey(i)), h?.(e);
@@ -11466,7 +11466,7 @@ function Ate(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/menu/useMenuSection.mjs
-function jte(e) {
+function Ate(e) {
let { heading: t, "aria-label": n } = e, r = dh();
return {
itemProps: { role: "presentation" },
@@ -11483,15 +11483,15 @@ function jte(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/utils/useResizeObserver.mjs
-function Mte() {
+function jte() {
return window.ResizeObserver !== void 0;
}
-function Zy(e) {
+function Qy(e) {
let { ref: t, box: n, onResize: r } = e, i = ug(r);
(0, B.useEffect)(() => {
let e = t?.current;
if (e) {
- if (Mte()) {
+ if (jte()) {
let t = new window.ResizeObserver((e) => {
e.length && i();
});
@@ -11507,186 +11507,186 @@ function Zy(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ar-AE.mjs
-var Qy = {};
-Qy = { dismiss: "تجاهل" };
+var $y = {};
+$y = { dismiss: "تجاهل" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/bg-BG.mjs
-var $y = {};
-$y = { dismiss: "Отхвърляне" };
+var eb = {};
+eb = { dismiss: "Отхвърляне" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/cs-CZ.mjs
-var eb = {};
-eb = { dismiss: "Odstranit" };
+var tb = {};
+tb = { dismiss: "Odstranit" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/da-DK.mjs
-var tb = {};
-tb = { dismiss: "Luk" };
+var nb = {};
+nb = { dismiss: "Luk" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/de-DE.mjs
-var nb = {};
-nb = { dismiss: "Schließen" };
+var rb = {};
+rb = { dismiss: "Schließen" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/el-GR.mjs
-var rb = {};
-rb = { dismiss: "Απόρριψη" };
+var ib = {};
+ib = { dismiss: "Απόρριψη" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/en-US.mjs
-var ib = {};
-ib = { dismiss: "Dismiss" };
+var ab = {};
+ab = { dismiss: "Dismiss" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/es-ES.mjs
-var ab = {};
-ab = { dismiss: "Descartar" };
+var ob = {};
+ob = { dismiss: "Descartar" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/et-EE.mjs
-var ob = {};
-ob = { dismiss: "Lõpeta" };
+var sb = {};
+sb = { dismiss: "Lõpeta" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/fi-FI.mjs
-var sb = {};
-sb = { dismiss: "Hylkää" };
+var cb = {};
+cb = { dismiss: "Hylkää" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/fr-FR.mjs
-var cb = {};
-cb = { dismiss: "Rejeter" };
+var lb = {};
+lb = { dismiss: "Rejeter" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/he-IL.mjs
-var lb = {};
-lb = { dismiss: "התעלם" };
+var ub = {};
+ub = { dismiss: "התעלם" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/hr-HR.mjs
-var ub = {};
-ub = { dismiss: "Odbaci" };
+var db = {};
+db = { dismiss: "Odbaci" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/hu-HU.mjs
-var db = {};
-db = { dismiss: "Elutasítás" };
+var fb = {};
+fb = { dismiss: "Elutasítás" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/it-IT.mjs
-var fb = {};
-fb = { dismiss: "Ignora" };
+var pb = {};
+pb = { dismiss: "Ignora" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ja-JP.mjs
-var pb = {};
-pb = { dismiss: "閉じる" };
+var mb = {};
+mb = { dismiss: "閉じる" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ko-KR.mjs
-var mb = {};
-mb = { dismiss: "무시" };
+var hb = {};
+hb = { dismiss: "무시" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/lt-LT.mjs
-var hb = {};
-hb = { dismiss: "Atmesti" };
+var gb = {};
+gb = { dismiss: "Atmesti" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/lv-LV.mjs
-var gb = {};
-gb = { dismiss: "Nerādīt" };
+var _b = {};
+_b = { dismiss: "Nerādīt" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/nb-NO.mjs
-var _b = {};
-_b = { dismiss: "Lukk" };
+var vb = {};
+vb = { dismiss: "Lukk" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/nl-NL.mjs
-var vb = {};
-vb = { dismiss: "Negeren" };
+var yb = {};
+yb = { dismiss: "Negeren" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/pl-PL.mjs
-var yb = {};
-yb = { dismiss: "Zignoruj" };
+var bb = {};
+bb = { dismiss: "Zignoruj" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/pt-BR.mjs
-var bb = {};
-bb = { dismiss: "Descartar" };
+var xb = {};
+xb = { dismiss: "Descartar" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/pt-PT.mjs
-var xb = {};
-xb = { dismiss: "Dispensar" };
+var Sb = {};
+Sb = { dismiss: "Dispensar" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ro-RO.mjs
-var Sb = {};
-Sb = { dismiss: "Revocare" };
+var Cb = {};
+Cb = { dismiss: "Revocare" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/ru-RU.mjs
-var Cb = {};
-Cb = { dismiss: "Пропустить" };
+var wb = {};
+wb = { dismiss: "Пропустить" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sk-SK.mjs
-var wb = {};
-wb = { dismiss: "Zrušiť" };
+var Tb = {};
+Tb = { dismiss: "Zrušiť" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sl-SI.mjs
-var Tb = {};
-Tb = { dismiss: "Opusti" };
+var Eb = {};
+Eb = { dismiss: "Opusti" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sr-SP.mjs
-var Eb = {};
-Eb = { dismiss: "Odbaci" };
+var Db = {};
+Db = { dismiss: "Odbaci" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/sv-SE.mjs
-var Db = {};
-Db = { dismiss: "Avvisa" };
+var Ob = {};
+Ob = { dismiss: "Avvisa" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/tr-TR.mjs
-var Ob = {};
-Ob = { dismiss: "Kapat" };
+var kb = {};
+kb = { dismiss: "Kapat" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/uk-UA.mjs
-var kb = {};
-kb = { dismiss: "Скасувати" };
+var Ab = {};
+Ab = { dismiss: "Скасувати" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/zh-CN.mjs
-var Ab = {};
-Ab = { dismiss: "取消" };
+var jb = {};
+jb = { dismiss: "取消" };
//#endregion
//#region node_modules/react-aria/dist/private/intl/overlays/zh-TW.mjs
-var jb = {};
-jb = { dismiss: "關閉" };
+var Mb = {};
+Mb = { dismiss: "關閉" };
//#endregion
//#region node_modules/react-aria/dist/private/overlays/intlStrings.mjs
-var Mb = {};
-Mb = {
- "ar-AE": Qy,
- "bg-BG": $y,
- "cs-CZ": eb,
- "da-DK": tb,
- "de-DE": nb,
- "el-GR": rb,
- "en-US": ib,
- "es-ES": ab,
- "et-EE": ob,
- "fi-FI": sb,
- "fr-FR": cb,
- "he-IL": lb,
- "hr-HR": ub,
- "hu-HU": db,
- "it-IT": fb,
- "ja-JP": pb,
- "ko-KR": mb,
- "lt-LT": hb,
- "lv-LV": gb,
- "nb-NO": _b,
- "nl-NL": vb,
- "pl-PL": yb,
- "pt-BR": bb,
- "pt-PT": xb,
- "ro-RO": Sb,
- "ru-RU": Cb,
- "sk-SK": wb,
- "sl-SI": Tb,
- "sr-SP": Eb,
- "sv-SE": Db,
- "tr-TR": Ob,
- "uk-UA": kb,
- "zh-CN": Ab,
- "zh-TW": jb
+var Nb = {};
+Nb = {
+ "ar-AE": $y,
+ "bg-BG": eb,
+ "cs-CZ": tb,
+ "da-DK": nb,
+ "de-DE": rb,
+ "el-GR": ib,
+ "en-US": ab,
+ "es-ES": ob,
+ "et-EE": sb,
+ "fi-FI": cb,
+ "fr-FR": lb,
+ "he-IL": ub,
+ "hr-HR": db,
+ "hu-HU": fb,
+ "it-IT": pb,
+ "ja-JP": mb,
+ "ko-KR": hb,
+ "lt-LT": gb,
+ "lv-LV": _b,
+ "nb-NO": vb,
+ "nl-NL": yb,
+ "pl-PL": bb,
+ "pt-BR": xb,
+ "pt-PT": Sb,
+ "ro-RO": Cb,
+ "ru-RU": wb,
+ "sk-SK": Tb,
+ "sl-SI": Eb,
+ "sr-SP": Db,
+ "sv-SE": Ob,
+ "tr-TR": kb,
+ "uk-UA": Ab,
+ "zh-CN": jb,
+ "zh-TW": Mb
};
//#endregion
//#region node_modules/react-aria/dist/private/overlays/DismissButton.mjs
-function Nte(e) {
+function Mte(e) {
return e && e.__esModule ? e.default : e;
}
-function Nb(e) {
- let { onDismiss: t, ...n } = e, r = fg(n, wg(Nte(Mb), "@react-aria/overlays").format("dismiss")), i = () => {
+function Pb(e) {
+ let { onDismiss: t, ...n } = e, r = fg(n, wg(Mte(Nb), "@react-aria/overlays").format("dismiss")), i = () => {
t && t();
};
return /*#__PURE__*/ B.createElement(H_, null, /*#__PURE__*/ B.createElement("button", {
@@ -11701,22 +11701,22 @@ function Nb(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/useOverlay.mjs
-var Pb = [];
-function Fb(e, t) {
+var Fb = [];
+function Ib(e, t) {
let { onClose: n, shouldCloseOnBlur: r, isOpen: i, isDismissable: a = !1, isKeyboardDismissDisabled: o = !1, shouldCloseOnInteractOutside: s } = e, c = (0, B.useRef)(void 0);
(0, B.useEffect)(() => {
- if (i && !Pb.includes(t)) return Pb.push(t), () => {
- let e = Pb.indexOf(t);
- e >= 0 && Pb.splice(e, 1);
+ if (i && !Fb.includes(t)) return Fb.push(t), () => {
+ let e = Fb.indexOf(t);
+ e >= 0 && Fb.splice(e, 1);
};
}, [i, t]);
let l = () => {
- Pb[Pb.length - 1] === t && n && n();
+ Fb[Fb.length - 1] === t && n && n();
}, u = (e) => {
- let n = Pb[Pb.length - 1];
+ let n = Fb[Fb.length - 1];
c.current = n, (!s || s(H(e))) && n === t && e.stopPropagation();
}, d = (e) => {
- (!s || s(H(e))) && (Pb[Pb.length - 1] === t && e.stopPropagation(), c.current === t && l()), c.current = void 0;
+ (!s || s(H(e))) && (Fb[Fb.length - 1] === t && e.stopPropagation(), c.current === t && l()), c.current = void 0;
}, { keyboardProps: f } = Mh({ shortcuts: { Escape: () => {
if (!o) {
l();
@@ -11724,7 +11724,7 @@ function Fb(e, t) {
}
return !1;
} } });
- yte({
+ vte({
ref: t,
onInteractOutside: a && i ? d : void 0,
onInteractOutsideStart: u
@@ -11745,20 +11745,20 @@ function Fb(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/usePreventScroll.mjs
-var Ib = typeof document < "u" && window.visualViewport, Lb = 0, Rb;
-function zb(e = {}) {
+var Lb = typeof document < "u" && window.visualViewport, Rb = 0, zb;
+function Bb(e = {}) {
let { isDisabled: t } = e;
Hp(() => {
- if (!t) return Lb++, Lb === 1 && (Rb = em() && nm() ? Fte() : Pte()), () => {
- Lb--, Lb === 0 && Rb();
+ if (!t) return Rb++, Rb === 1 && (zb = em() && nm() ? Pte() : Nte()), () => {
+ Rb--, Rb === 0 && zb();
};
}, [t]);
}
-function Pte() {
+function Nte() {
let e = window.innerWidth - document.documentElement.clientWidth;
return ah(e > 0 && ("scrollbarGutter" in document.documentElement.style ? Tp(document.documentElement, "scrollbar-gutter", "stable") : Tp(document.documentElement, "padding-right", `${e}px`)), Tp(document.documentElement, "overflow", "hidden"));
}
-function Fte() {
+function Pte() {
let e = Tp(document.documentElement, "overflow", "hidden"), t, n = !1, r = (e) => {
let r = H(e);
t = m_(r) ? r : h_(r, !0), n = !1;
@@ -11776,7 +11776,7 @@ function Fte() {
}
}, s = (e) => {
let t = H(e), n = e.relatedTarget;
- n && lg(n) ? (n.focus({ preventScroll: !0 }), Bb(n, lg(t))) : n || (t.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: !0 });
+ n && lg(n) ? (n.focus({ preventScroll: !0 }), Vb(n, lg(t))) : n || (t.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: !0 });
}, c = HTMLElement.prototype.focus;
Reflect.defineProperty(HTMLElement.prototype, "focus", {
configurable: !0,
@@ -11786,7 +11786,7 @@ function Fte() {
c.call(this, {
...e,
preventScroll: !0
- }), (!e || !e.preventScroll) && Bb(this, n);
+ }), (!e || !e.preventScroll) && Vb(this, n);
}
});
let l = ah(wp(document, "touchstart", r, {
@@ -11804,10 +11804,10 @@ function Fte() {
});
};
}
-function Bb(e, t) {
- t || !Ib ? Vb(e) : Ib.addEventListener("resize", () => Vb(e), { once: !0 });
+function Vb(e, t) {
+ t || !Lb ? Hb(e) : Lb.addEventListener("resize", () => Hb(e), { once: !0 });
}
-function Vb(e) {
+function Hb(e) {
let t = document.scrollingElement || document.documentElement, n = e;
for (; n && n !== t;) {
let e = h_(n);
@@ -11815,7 +11815,7 @@ function Vb(e) {
let t = e.getBoundingClientRect(), r = n.getBoundingClientRect();
if (r.top < t.top || r.bottom > t.top + n.clientHeight) {
let n = t.bottom;
- Ib && (n = Math.min(n, Ib.offsetTop + Ib.height));
+ Lb && (n = Math.min(n, Lb.offsetTop + Lb.height));
let i = r.top - t.top - ((n - t.top) / 2 - r.height / 2);
e.scrollTo({
top: Math.max(0, Math.min(e.scrollHeight - e.clientHeight, e.scrollTop + i)),
@@ -11828,13 +11828,13 @@ function Vb(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/useModalOverlay.mjs
-function Ite(e, t, n) {
- let { overlayProps: r, underlayProps: i } = Fb({
+function Fte(e, t, n) {
+ let { overlayProps: r, underlayProps: i } = Ib({
...e,
isOpen: t.isOpen,
onClose: t.close
}, n);
- return zb({ isDisabled: !t.isOpen }), ny(), (0, B.useEffect)(() => {
+ return Bb({ isDisabled: !t.isOpen }), ry(), (0, B.useEffect)(() => {
if (t.isOpen && n.current) return K_([n.current], { shouldUseInert: !0 });
}, [t.isOpen, n]), {
modalProps: U(r),
@@ -11843,32 +11843,32 @@ function Ite(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/calculatePosition.mjs
-var Hb = {
+var Ub = {
top: "top",
bottom: "top",
left: "left",
right: "left"
-}, Ub = {
+}, Wb = {
top: "bottom",
bottom: "top",
left: "right",
right: "left"
-}, Lte = {
+}, Ite = {
top: "left",
left: "top"
-}, Wb = {
+}, Gb = {
top: "height",
left: "width"
-}, Gb = {
+}, Kb = {
width: "totalWidth",
height: "totalHeight"
-}, Kb = {}, Rte = () => typeof document < "u" ? window.visualViewport : null;
-function qb(e, t) {
+}, qb = {}, Lte = () => typeof document < "u" ? window.visualViewport : null;
+function Jb(e, t) {
let n = 0, r = 0, i = 0, a = 0, o = 0, s = 0, c = {}, l = (t?.scale ?? 1) > 1;
if (e.tagName === "BODY" || e.tagName === "HTML") {
let l = document.documentElement;
i = l.clientWidth, a = l.clientHeight, n = t?.width ?? i, r = t?.height ?? a, c.top = l.scrollTop || e.scrollTop, c.left = l.scrollLeft || e.scrollLeft, t && (o = Math.max(0, t.pageTop - (c.top ?? 0)), s = Math.max(0, t.pageLeft - (c.left ?? 0)));
- } else ({width: n, height: r, top: o, left: s} = $b(e, !1)), c.top = e.scrollTop, c.left = e.scrollLeft, i = n, a = r;
+ } else ({width: n, height: r, top: o, left: s} = ex(e, !1)), c.top = e.scrollTop, c.left = e.scrollLeft, i = n, a = r;
return nm() && (e.tagName === "BODY" || e.tagName === "HTML") && l && (c.top = 0, c.left = 0, o = t?.pageTop ?? 0, s = t?.pageLeft ?? 0), {
width: n,
height: r,
@@ -11879,7 +11879,7 @@ function qb(e, t) {
left: s
};
}
-function zte(e) {
+function Rte(e) {
return {
top: e.scrollTop,
left: e.scrollLeft,
@@ -11887,11 +11887,11 @@ function zte(e) {
height: e.scrollHeight
};
}
-function Jb(e, t, n, r, i, a, o) {
- let s = i.scroll[e] ?? 0, c = r[Wb[e]], l = o[e] + r.scroll[Hb[e]] + a, u = o[e] + r.scroll[Hb[e]] + c - a, d = t - s + r.scroll[Hb[e]] + o[e] - r[Hb[e]], f = t - s + n + r.scroll[Hb[e]] + o[e] - r[Hb[e]];
+function Yb(e, t, n, r, i, a, o) {
+ let s = i.scroll[e] ?? 0, c = r[Gb[e]], l = o[e] + r.scroll[Ub[e]] + a, u = o[e] + r.scroll[Ub[e]] + c - a, d = t - s + r.scroll[Ub[e]] + o[e] - r[Ub[e]], f = t - s + n + r.scroll[Ub[e]] + o[e] - r[Ub[e]];
return d < l ? l - d : f > u ? Math.max(u - f, l - d) : 0;
}
-function Bte(e) {
+function zte(e) {
let t = window.getComputedStyle(e);
return {
top: parseInt(t.marginTop, 10) || 0,
@@ -11900,55 +11900,55 @@ function Bte(e) {
right: parseInt(t.marginRight, 10) || 0
};
}
-function Yb(e) {
- if (Kb[e]) return Kb[e];
- let [t, n] = e.split(" "), r = Hb[t] || "right", i = Lte[r];
- Hb[n] || (n = "center");
- let a = Wb[r], o = Wb[i];
- return Kb[e] = {
+function Xb(e) {
+ if (qb[e]) return qb[e];
+ let [t, n] = e.split(" "), r = Ub[t] || "right", i = Ite[r];
+ Ub[n] || (n = "center");
+ let a = Gb[r], o = Gb[i];
+ return qb[e] = {
placement: t,
crossPlacement: n,
axis: r,
crossAxis: i,
size: a,
crossSize: o
- }, Kb[e];
+ }, qb[e];
}
-function Xb(e, t, n, r, i, a, o, s, c, l, u) {
+function Zb(e, t, n, r, i, a, o, s, c, l, u) {
let { placement: d, crossPlacement: f, axis: p, crossAxis: m, size: h, crossSize: g } = r, _ = {};
_[m] = e[m] ?? 0, f === "center" ? _[m] += ((e[g] ?? 0) - (n[g] ?? 0)) / 2 : f !== m && (_[m] += (e[g] ?? 0) - (n[g] ?? 0)), _[m] += a;
let v = e[m] - n[g] + c + l, y = e[m] + e[g] - c - l;
if (_[m] = z_(_[m], v, y), d === p) {
- let t = s ? u[h] : u[Gb[h]];
- _[Ub[p]] = Math.floor(t - e[p] + i);
+ let t = s ? u[h] : u[Kb[h]];
+ _[Wb[p]] = Math.floor(t - e[p] + i);
} else _[p] = Math.floor(e[p] + e[h] + i);
return _;
}
-function Vte(e, t, n, r, i, a, o, s, c, l, u) {
- let d = (e.top == null ? c[Gb.height] - (e.bottom ?? 0) - o : e.top) - (c.scroll.top ?? 0), f = l ? n.top : 0, p = {
+function Bte(e, t, n, r, i, a, o, s, c, l, u) {
+ let d = (e.top == null ? c[Kb.height] - (e.bottom ?? 0) - o : e.top) - (c.scroll.top ?? 0), f = l ? n.top : 0, p = {
top: Math.max(t.top + f, (u?.offsetTop ?? t.top) + f),
bottom: Math.min(t.top + t.height + f, (u?.offsetTop ?? 0) + (u?.height ?? 0))
};
return s === "top" ? Math.max(0, d + o - p.top - ((i.top ?? 0) + (i.bottom ?? 0) + a)) : Math.max(0, p.bottom - d - ((i.top ?? 0) + (i.bottom ?? 0) + a));
}
-function Zb(e, t, n, r, i, a, o, s) {
+function Qb(e, t, n, r, i, a, o, s) {
let { placement: c, axis: l, size: u } = a;
- return c === l ? Math.max(0, n[l] - (o.scroll[l] ?? 0) - (e[l] + (s ? t[l] : 0)) - (r[l] ?? 0) - r[Ub[l]] - i) : Math.max(0, e[u] + e[l] + (s ? t[l] : 0) - n[l] - n[u] + (o.scroll[l] ?? 0) - (r[l] ?? 0) - r[Ub[l]] - i);
+ return c === l ? Math.max(0, n[l] - (o.scroll[l] ?? 0) - (e[l] + (s ? t[l] : 0)) - (r[l] ?? 0) - r[Wb[l]] - i) : Math.max(0, e[u] + e[l] + (s ? t[l] : 0) - n[l] - n[u] + (o.scroll[l] ?? 0) - (r[l] ?? 0) - r[Wb[l]] - i);
}
-function Hte(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
- let v = Yb(e), { size: y, crossAxis: b, crossSize: x, placement: S, crossPlacement: C } = v, w = Xb(t, s, n, v, u, d, l, f, m, h, c), T = u, E = Zb(s, l, t, i, a + u, v, c, g);
+function Vte(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
+ let v = Xb(e), { size: y, crossAxis: b, crossSize: x, placement: S, crossPlacement: C } = v, w = Zb(t, s, n, v, u, d, l, f, m, h, c), T = u, E = Qb(s, l, t, i, a + u, v, c, g);
if (o && n[y] > E) {
- let e = Yb(`${Ub[S]} ${C}`), r = Xb(t, s, n, e, u, d, l, f, m, h, c);
- Zb(s, l, t, i, a + u, e, c, g) > E && (v = e, w = r, T = u);
+ let e = Xb(`${Wb[S]} ${C}`), r = Zb(t, s, n, e, u, d, l, f, m, h, c);
+ Qb(s, l, t, i, a + u, e, c, g) > E && (v = e, w = r, T = u);
}
let D = "bottom";
v.axis === "top" ? v.placement === "top" ? D = "top" : v.placement === "bottom" && (D = "bottom") : v.crossAxis === "top" && (v.crossPlacement === "top" ? D = "bottom" : v.crossPlacement === "bottom" && (D = "top"));
- let O = Jb(b, w[b], n[x], s, c, a, l);
+ let O = Yb(b, w[b], n[x], s, c, a, l);
w[b] += O;
- let k = Vte(w, s, l, f, i, a, n.height, D, c, g, _);
- p && p < k && (k = p), n.height = Math.min(n.height, k), w = Xb(t, s, n, v, T, d, l, f, m, h, c), O = Jb(b, w[b], n[x], s, c, a, l), w[b] += O;
- let A = {}, j = t[b] - w[b] - i[Hb[b]], M = j + .5 * t[x], N = m / 2 + h, P = Hb[b] === "left" ? (i.left ?? 0) + (i.right ?? 0) : (i.top ?? 0) + (i.bottom ?? 0), ee = n[x] - P - m / 2 - h;
- A[b] = z_(z_(M, t[b] + m / 2 - (w[b] + i[Hb[b]]), t[b] + t[x] - m / 2 - (w[b] + i[Hb[b]])), N, ee), {placement: S, crossPlacement: C} = v, m ? j = A[b] : C === "right" ? j += t[x] : C === "center" && (j += t[x] / 2);
+ let k = Bte(w, s, l, f, i, a, n.height, D, c, g, _);
+ p && p < k && (k = p), n.height = Math.min(n.height, k), w = Zb(t, s, n, v, T, d, l, f, m, h, c), O = Yb(b, w[b], n[x], s, c, a, l), w[b] += O;
+ let A = {}, j = t[b] - w[b] - i[Ub[b]], M = j + .5 * t[x], N = m / 2 + h, P = Ub[b] === "left" ? (i.left ?? 0) + (i.right ?? 0) : (i.top ?? 0) + (i.bottom ?? 0), ee = n[x] - P - m / 2 - h;
+ A[b] = z_(z_(M, t[b] + m / 2 - (w[b] + i[Ub[b]]), t[b] + t[x] - m / 2 - (w[b] + i[Ub[b]])), N, ee), {placement: S, crossPlacement: C} = v, m ? j = A[b] : C === "right" ? j += t[x] : C === "center" && (j += t[x] / 2);
let F = S === "left" || S === "top" ? n[y] : 0, I = {
x: S === "top" || S === "bottom" ? j : F,
y: S === "left" || S === "right" ? j : F
@@ -11962,17 +11962,17 @@ function Hte(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
triggerAnchorPoint: I
};
}
-function Ute(e) {
- let { placement: t, targetNode: n, overlayNode: r, scrollNode: i, padding: a, shouldFlip: o, boundaryElement: s, offset: c, crossOffset: l, maxHeight: u, arrowSize: d = 0, arrowBoundaryOffset: f = 0, targetRect: p } = e, m = Rte(), h = r instanceof HTMLElement ? Wte(r) : document.documentElement, g = h === document.documentElement, _ = window.getComputedStyle(h).position, v = !!_ && _ !== "static", y = g ? $b(n, !1, p) : ex(n, h, !1, p);
+function Hte(e) {
+ let { placement: t, targetNode: n, overlayNode: r, scrollNode: i, padding: a, shouldFlip: o, boundaryElement: s, offset: c, crossOffset: l, maxHeight: u, arrowSize: d = 0, arrowBoundaryOffset: f = 0, targetRect: p } = e, m = Lte(), h = r instanceof HTMLElement ? Ute(r) : document.documentElement, g = h === document.documentElement, _ = window.getComputedStyle(h).position, v = !!_ && _ !== "static", y = g ? ex(n, !1, p) : tx(n, h, !1, p);
if (!g) {
let { marginTop: e, marginLeft: t } = window.getComputedStyle(n);
y.top += parseInt(e, 10) || 0, y.left += parseInt(t, 10) || 0;
}
- let b = $b(r, !0), x = Bte(r);
+ let b = ex(r, !0), x = zte(r);
b.width += (x.left ?? 0) + (x.right ?? 0), b.height += (x.top ?? 0) + (x.bottom ?? 0);
- let S = zte(i), C = qb(s, m), w = qb(h, m), T;
+ let S = Rte(i), C = Jb(s, m), w = Jb(h, m), T;
if ((s.tagName === "BODY" || s.tagName === "HTML") && !g) {
- let e = Qb(h, !1);
+ let e = $b(h, !1);
T = {
top: -(e.top - C.top),
left: -(e.left - C.left),
@@ -11984,11 +11984,11 @@ function Ute(e) {
left: 0,
width: 0,
height: 0
- } : ex(s, h, !1);
+ } : tx(s, h, !1);
let E = Op(s, h);
- return Hte(t, y, b, S, x, a, o, C, w, T, c, l, v, u, d, f, E, m);
+ return Vte(t, y, b, S, x, a, o, C, w, T, c, l, v, u, d, f, E, m);
}
-function Qb(e, t) {
+function $b(e, t) {
let { top: n, left: r, width: i, height: a } = e.getBoundingClientRect();
return t && e instanceof e.ownerDocument.defaultView.HTMLElement && (i = e.offsetWidth, a = e.offsetHeight), {
top: n,
@@ -11997,8 +11997,8 @@ function Qb(e, t) {
height: a
};
}
-function $b(e, t, n) {
- let { top: r, left: i, width: a, height: o } = n || Qb(e, t), { scrollTop: s, scrollLeft: c, clientTop: l, clientLeft: u } = document.documentElement;
+function ex(e, t, n) {
+ let { top: r, left: i, width: a, height: o } = n || $b(e, t), { scrollTop: s, scrollLeft: c, clientTop: l, clientLeft: u } = document.documentElement;
return {
top: r + s - l,
left: i + c - u,
@@ -12006,29 +12006,29 @@ function $b(e, t, n) {
height: o
};
}
-function ex(e, t, n, r) {
+function tx(e, t, n, r) {
let i = window.getComputedStyle(e), a;
- if (i.position === "fixed") a = r || Qb(e, n);
+ if (i.position === "fixed") a = r || $b(e, n);
else {
- a = $b(e, n, r);
- let i = $b(t, n), o = window.getComputedStyle(t);
+ a = ex(e, n, r);
+ let i = ex(t, n), o = window.getComputedStyle(t);
i.top += (parseInt(o.borderTopWidth, 10) || 0) - t.scrollTop, i.left += (parseInt(o.borderLeftWidth, 10) || 0) - t.scrollLeft, a.top -= i.top, a.left -= i.left;
}
return a.top -= parseInt(i.marginTop, 10) || 0, a.left -= parseInt(i.marginLeft, 10) || 0, a;
}
-function Wte(e) {
+function Ute(e) {
let t = e.offsetParent;
- if (t && t === document.body && window.getComputedStyle(t).position === "static" && !tx(t) && (t = document.documentElement), t == null) for (t = e.parentElement; t && !tx(t);) t = t.parentElement;
+ if (t && t === document.body && window.getComputedStyle(t).position === "static" && !nx(t) && (t = document.documentElement), t == null) for (t = e.parentElement; t && !nx(t);) t = t.parentElement;
return t || document.documentElement;
}
-function tx(e) {
+function nx(e) {
let t = window.getComputedStyle(e);
return t.transform !== "none" || /transform|perspective/.test(t.willChange) || t.filter !== "none" || t.contain === "paint" || "backdropFilter" in t && t.backdropFilter !== "none" || "WebkitBackdropFilter" in t && t.WebkitBackdropFilter !== "none";
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/useOverlayPosition.mjs
-var nx = typeof document < "u" ? window.visualViewport : null;
-function Gte(e) {
+var rx = typeof document < "u" ? window.visualViewport : null;
+function Wte(e) {
let { direction: t } = vg(), { arrowSize: n, targetRef: r, overlayRef: i, arrowRef: a, scrollRef: o = i, placement: s = "bottom", containerPadding: c = 12, shouldFlip: l = !0, boundaryElement: u = typeof document < "u" ? document.body : null, offset: d = 0, crossOffset: f = 0, shouldUpdatePosition: p = !0, isOpen: m = !0, onClose: h, maxHeight: g, arrowBoundaryOffset: _ = 0, getTargetRect: v } = e, [y, b] = (0, B.useState)(null), x = [
p,
s,
@@ -12046,12 +12046,12 @@ function Gte(e) {
g,
_,
n
- ], S = (0, B.useRef)(nx?.scale);
+ ], S = (0, B.useRef)(rx?.scale);
(0, B.useEffect)(() => {
- m && (S.current = nx?.scale);
+ m && (S.current = rx?.scale);
}, [m]);
let C = (0, B.useCallback)(() => {
- if (p === !1 || !m || !i.current || !r.current || !u || nx?.scale !== S.current) return;
+ if (p === !1 || !m || !i.current || !r.current || !u || rx?.scale !== S.current) return;
let e = null;
if (o.current && jp(o.current)) {
let t = kp()?.getBoundingClientRect(), n = o.current.getBoundingClientRect();
@@ -12062,8 +12062,8 @@ function Gte(e) {
}
let h = i.current;
!g && i.current && (h.style.top = "0px", h.style.bottom = "", h.style.maxHeight = (window.visualViewport?.height ?? window.innerHeight) + "px");
- let y = Ute({
- placement: qte(s, t),
+ let y = Hte({
+ placement: Kte(s, t),
overlayNode: i.current,
targetNode: r.current,
scrollNode: o.current || i.current,
@@ -12073,7 +12073,7 @@ function Gte(e) {
offset: d,
crossOffset: f,
maxHeight: g,
- arrowSize: n ?? (a?.current ? Qb(a.current, !0).width : 0),
+ arrowSize: n ?? (a?.current ? $b(a.current, !0).width : 0),
arrowBoundaryOffset: _,
targetRect: v?.(r.current)
});
@@ -12086,10 +12086,10 @@ function Gte(e) {
}
b(y);
}, x);
- Hp(C, x), Kte(C), Zy({
+ Hp(C, x), Gte(C), Qy({
ref: i,
onResize: C
- }), Zy({
+ }), Qy({
ref: r,
onResize: C
});
@@ -12102,10 +12102,10 @@ function Gte(e) {
}, n = () => {
w.current && t();
};
- nx?.addEventListener("resize", t), nx?.addEventListener("scroll", n);
+ rx?.addEventListener("resize", t), rx?.addEventListener("scroll", n);
let r = wp(Ap(window), "scroll", n);
return () => {
- nx?.removeEventListener("resize", t), nx?.removeEventListener("scroll", n), r();
+ rx?.removeEventListener("resize", t), rx?.removeEventListener("scroll", n), r();
};
}, [C]);
let T = (0, B.useCallback)(() => {
@@ -12137,25 +12137,25 @@ function Gte(e) {
updatePosition: C
};
}
-function Kte(e) {
+function Gte(e) {
Hp(() => (window.addEventListener("resize", e, !1), () => {
window.removeEventListener("resize", e, !1);
}), [e]);
}
-function qte(e, t) {
+function Kte(e, t) {
return t === "rtl" ? e.replace("start", "right").replace("end", "left") : e.replace("start", "left").replace("end", "right");
}
//#endregion
//#region node_modules/react-aria/dist/private/overlays/usePopover.mjs
-function Jte(e, t) {
- let { triggerRef: n, popoverRef: r, groupRef: i, isNonModal: a, isKeyboardDismissDisabled: o, shouldCloseOnInteractOutside: s, ...c } = e, l = c.trigger === "SubmenuTrigger", { overlayProps: u, underlayProps: d } = Fb({
+function qte(e, t) {
+ let { triggerRef: n, popoverRef: r, groupRef: i, isNonModal: a, isKeyboardDismissDisabled: o, shouldCloseOnInteractOutside: s, ...c } = e, l = c.trigger === "SubmenuTrigger", { overlayProps: u, underlayProps: d } = Ib({
isOpen: t.isOpen,
onClose: t.close,
shouldCloseOnBlur: !0,
isDismissable: !a || l,
isKeyboardDismissDisabled: o,
shouldCloseOnInteractOutside: s
- }, i ?? r), { overlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = Gte({
+ }, i ?? r), { overlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = Wte({
...c,
targetRef: n,
overlayRef: r,
@@ -12163,7 +12163,7 @@ function Jte(e, t) {
onClose: a && !l ? t.close : null,
getTargetRect: c.getTargetRect ?? (t.point ? () => new DOMRect(t.point.x, t.point.y, 0, 0) : void 0)
});
- zb({ isDisabled: a || !t.isOpen }), (0, B.useEffect)(() => {
+ Bb({ isDisabled: a || !t.isOpen }), (0, B.useEffect)(() => {
if (t.isOpen && r.current) return a ? nte(i?.current ?? r.current) : K_([i?.current ?? r.current], { shouldUseInert: !0 });
}, [
a,
@@ -12182,10 +12182,10 @@ function Jte(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/radio/utils.mjs
-var rx = /* @__PURE__ */ new WeakMap();
+var ix = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/react-aria/dist/private/radio/useRadio.mjs
-function Yte(e, t, n) {
+function Jte(e, t, n) {
let { value: r, children: i, "aria-label": a, "aria-labelledby": o, onPressStart: s, onPressEnd: c, onPressChange: l, onPress: u, onPressUp: d, onClick: f } = e, p = e.isDisabled || t.isDisabled, m = t.selectedValue === r, h = (e) => {
e.stopPropagation(), t.setSelectedValue(r);
}, { pressProps: g, isPressed: _ } = zg({
@@ -12208,7 +12208,7 @@ function Yte(e, t, n) {
}
}), { focusableProps: b } = Lh(U(e, { onFocus: () => t.setLastFocusedValue(r) }), n), x = U(g, b), S = Eg(e, { labelable: !0 }), C = -1;
t.selectedValue == null ? (t.lastFocusedValue === r || t.lastFocusedValue == null) && (C = 0) : t.selectedValue === r && (C = 0), p && (C = void 0);
- let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = rx.get(t);
+ let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = ix.get(t);
x_(n, t.defaultSelectedValue, t.setSelectedValue), S_({ validationBehavior: O }, t, n);
let k = C_();
return {
@@ -12242,7 +12242,7 @@ function Yte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/radio/useRadioGroup.mjs
-function Xte(e, t) {
+function Yte(e, t) {
let { name: n, form: r, isReadOnly: i, isRequired: a, isDisabled: o, orientation: s = "vertical", validationBehavior: c = "aria" } = e, { direction: l } = vg(), { isInvalid: u, validationErrors: d, validationDetails: f } = t.displayValidation, { labelProps: p, fieldProps: m, descriptionProps: h, errorMessageProps: g } = F_({
...e,
labelElementType: "span",
@@ -12271,7 +12271,7 @@ function Xte(e, t) {
},
allowRepeats: !0
}), x = dh(n);
- return rx.set(t, {
+ return ix.set(t, {
name: x,
form: r,
descriptionId: h.id,
@@ -12300,9 +12300,9 @@ function Xte(e, t) {
}
//#endregion
//#region node_modules/react-aria/dist/private/select/useSelect.mjs
-var ix = /* @__PURE__ */ new WeakMap();
-function Zte(e, t, n) {
- let { keyboardDelegate: r, isDisabled: i, isRequired: a, name: o, form: s, validationBehavior: c = "aria" } = e, l = Xv({
+var ax = /* @__PURE__ */ new WeakMap();
+function Xte(e, t, n) {
+ let { keyboardDelegate: r, isDisabled: i, isRequired: a, name: o, form: s, validationBehavior: c = "aria" } = e, l = Zv({
usage: "search",
sensitivity: "base"
}), u = (0, B.useMemo)(() => r || new Q_(t.collection, t.disabledKeys, n, l), [
@@ -12311,7 +12311,7 @@ function Zte(e, t, n) {
t.disabledKeys,
l,
n
- ]), { menuTriggerProps: d, menuProps: f } = Iv({
+ ]), { menuTriggerProps: d, menuProps: f } = Lv({
isDisabled: i,
type: "listbox"
}, t, n), { keyboardProps: p } = Mh({
@@ -12330,7 +12330,7 @@ function Zte(e, t, n) {
allowRepeats: !0,
onKeyDown: e.onKeyDown,
onKeyUp: e.onKeyUp
- }), { typeSelectProps: m } = Rv({
+ }), { typeSelectProps: m } = zv({
keyboardDelegate: u,
selectionManager: t.selectionManager,
onTypeSelect(e) {
@@ -12344,7 +12344,7 @@ function Zte(e, t, n) {
});
t.selectionManager.selectionMode === "multiple" && (m = {});
let S = Eg(e, { labelable: !0 }), C = U(m, d, y), w = dh();
- return ix.set(t, {
+ return ax.set(t, {
isDisabled: i,
isRequired: a,
name: o,
@@ -12405,8 +12405,8 @@ function Zte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/select/HiddenSelect.mjs
-function ax(e, t, n) {
- let r = ix.get(t) || {}, { autoComplete: i, name: a = r.name, form: o = r.form, isDisabled: s = r.isDisabled } = e, { validationBehavior: c, isRequired: l } = r, { visuallyHiddenProps: u } = V_({ style: {
+function Zte(e, t, n) {
+ let r = ax.get(t) || {}, { autoComplete: i, name: a = r.name, form: o = r.form, isDisabled: s = r.isDisabled } = e, { validationBehavior: c, isRequired: l } = r, { visuallyHiddenProps: u } = V_({ style: {
position: "fixed",
top: 0,
left: 0
@@ -12442,7 +12442,7 @@ function ax(e, t, n) {
};
}
function Qte(e) {
- let { state: t, triggerRef: n, label: r, name: i, form: a, isDisabled: o } = e, s = (0, B.useRef)(null), c = (0, B.useRef)(null), { containerProps: l, selectProps: u } = ax({
+ let { state: t, triggerRef: n, label: r, name: i, form: a, isDisabled: o } = e, s = (0, B.useRef)(null), c = (0, B.useRef)(null), { containerProps: l, selectProps: u } = Zte({
...e,
selectRef: t.collection.size <= 300 ? s : c
}, t, n), d = Array.isArray(t.value) ? t.value : [t.value];
@@ -12466,7 +12466,7 @@ function Qte(e) {
value: e ?? ""
})))));
if (i) {
- let { validationBehavior: e } = ix.get(t) || {};
+ let { validationBehavior: e } = ax.get(t) || {};
d.length === 0 && (d = [null]);
let n = d.map((t, n) => {
let r = {
@@ -12561,7 +12561,7 @@ var ox = class {
let n = this.collection.getItem(e);
if (!n) return null;
let r = 0;
- for (let e of Vv(n, this.collection)) {
+ for (let e of Hv(n, this.collection)) {
if (e.colSpan && e.colSpan + r > t || (e.colSpan && (r = r + e.colSpan - 1), r === t)) return e.key ?? null;
r++;
}
@@ -12595,13 +12595,13 @@ var ox = class {
let t = this.collection.getItem(e);
if (!t) return null;
if (this.isRow(t)) {
- let e = Vv(t, this.collection);
- return (this.direction === "rtl" ? Wv(e)?.key : Hv(e)?.key) ?? null;
+ let e = Hv(t, this.collection);
+ return (this.direction === "rtl" ? Gv(e)?.key : Uv(e)?.key) ?? null;
}
if (this.isCell(t) && t.parentKey != null) {
let n = this.collection.getItem(t.parentKey);
if (!n) return null;
- let r = Vv(n, this.collection), i = (this.direction === "rtl" ? Uv(r, t.index - 1) : Uv(r, t.index + 1)) ?? null;
+ let r = Hv(n, this.collection), i = (this.direction === "rtl" ? Wv(r, t.index - 1) : Wv(r, t.index + 1)) ?? null;
return i ? i.key ?? null : this.focusMode === "row" ? t.parentKey ?? null : (this.direction === "rtl" ? this.getFirstKey(e) : this.getLastKey(e)) ?? null;
}
return null;
@@ -12610,13 +12610,13 @@ var ox = class {
let t = this.collection.getItem(e);
if (!t) return null;
if (this.isRow(t)) {
- let e = Vv(t, this.collection);
- return (this.direction === "rtl" ? Hv(e)?.key : Wv(e)?.key) ?? null;
+ let e = Hv(t, this.collection);
+ return (this.direction === "rtl" ? Uv(e)?.key : Gv(e)?.key) ?? null;
}
if (this.isCell(t) && t.parentKey != null) {
let n = this.collection.getItem(t.parentKey);
if (!n) return null;
- let r = Vv(n, this.collection), i = (this.direction === "rtl" ? Uv(r, t.index + 1) : Uv(r, t.index - 1)) ?? null;
+ let r = Hv(n, this.collection), i = (this.direction === "rtl" ? Wv(r, t.index + 1) : Wv(r, t.index - 1)) ?? null;
return i ? i.key ?? null : this.focusMode === "row" ? t.parentKey ?? null : (this.direction === "rtl" ? this.getLastKey(e) : this.getFirstKey(e)) ?? null;
}
return null;
@@ -12627,13 +12627,13 @@ var ox = class {
if (r = this.collection.getItem(n), !r) return null;
if (this.isCell(r) && !t && r.parentKey != null) {
let e = this.collection.getItem(r.parentKey);
- return e ? Hv(Vv(e, this.collection))?.key ?? null : null;
+ return e ? Uv(Hv(e, this.collection))?.key ?? null : null;
}
}
if (n = this.findNextKey(void 0, (e) => e.type === "item"), n != null && (r && this.isCell(r) && t || this.focusMode === "cell")) {
let e = this.collection.getItem(n);
if (!e) return null;
- n = Hv(Vv(e, this.collection))?.key ?? null;
+ n = Uv(Hv(e, this.collection))?.key ?? null;
}
return n;
}
@@ -12643,13 +12643,13 @@ var ox = class {
if (r = this.collection.getItem(n), !r) return null;
if (this.isCell(r) && !t && r.parentKey != null) {
let e = this.collection.getItem(r.parentKey);
- return e ? Wv(Vv(e, this.collection))?.key ?? null : null;
+ return e ? Gv(Hv(e, this.collection))?.key ?? null : null;
}
}
if (n = this.findPreviousKey(void 0, (e) => e.type === "item"), n != null && (r && this.isCell(r) && t || this.focusMode === "cell")) {
let e = this.collection.getItem(n);
if (!e) return null;
- n = Wv(Vv(e, this.collection))?.key ?? null;
+ n = Gv(Hv(e, this.collection))?.key ?? null;
}
return n;
}
@@ -12685,7 +12685,7 @@ var ox = class {
if (!t) return null;
if (t.textValue) {
let n = t.textValue.slice(0, e.length);
- if (this.collator.compare(n, e) === 0) return this.isRow(t) && this.focusMode === "cell" ? Hv(Vv(t, this.collection))?.key ?? null : t.key;
+ if (this.collator.compare(n, e) === 0) return this.isRow(t) && this.focusMode === "cell" ? Uv(Hv(t, this.collection))?.key ?? null : t.key;
}
n = this.findNextKey(n, (e) => e.type === "item"), n == null && !a && (n = this.getFirstKey(), a = !0);
}
@@ -12710,7 +12710,7 @@ var ox = class {
function nne(e, t, n) {
let { isVirtualized: r, disallowTypeAhead: i, keyboardDelegate: a, focusMode: o, scrollRef: s, getRowText: c, onRowAction: l, onCellAction: u, escapeKeyBehavior: d = "clearSelection", shouldSelectOnPressUp: f, keyboardNavigationBehavior: p = "arrow" } = e, { selectionManager: m } = t;
!e["aria-label"] && !e["aria-labelledby"] && console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
- let h = Xv({
+ let h = Zv({
usage: "search",
sensitivity: "base"
}), { direction: g } = vg(), _ = t.selectionManager.disabledBehavior, v = (0, B.useMemo)(() => a || new ox({
@@ -12730,7 +12730,7 @@ function nne(e, t, n) {
g,
h,
o
- ]), { collectionProps: y } = Bv({
+ ]), { collectionProps: y } = Vv({
ref: n,
selectionManager: m,
keyboardDelegate: v,
@@ -12748,7 +12748,7 @@ function nne(e, t, n) {
shouldSelectOnPressUp: f,
keyboardNavigationBehavior: p
});
- let x = Cte({
+ let x = Ste({
selectionManager: m,
hasItemActions: !!(l || u)
}), S = Eg(e, { labelable: !0 }), C = (0, B.useCallback)((e) => {
@@ -12760,12 +12760,12 @@ function nne(e, t, n) {
}, [m]), w = (0, B.useMemo)(() => ({
onBlur: y.onBlur,
onFocus: C
- }), [C, y.onBlur]), T = Gy(n, { isDisabled: t.collection.size !== 0 }), E = U(S, {
+ }), [C, y.onBlur]), T = Ky(n, { isDisabled: t.collection.size !== 0 }), E = U(S, {
role: "grid",
id: b,
"aria-multiselectable": m.selectionMode === "multiple" ? "true" : void 0
}, t.isKeyboardNavigationDisabled ? w : y, t.collection.size === 0 && { tabIndex: T ? -1 : 0 } || void 0, x);
- return r && (E["aria-rowcount"] = t.collection.size, E["aria-colcount"] = t.collection.columnCount), xte({ getRowText: c }, t), { gridProps: E };
+ return r && (E["aria-rowcount"] = t.collection.size, E["aria-colcount"] = t.collection.columnCount), bte({ getRowText: c }, t), { gridProps: E };
}
//#endregion
//#region node_modules/react-aria/dist/private/table/utils.mjs
@@ -13379,7 +13379,7 @@ var ine = class extends ox {
let n = this.collection.getItem(e);
if (!n) return null;
if (n.type === "column") {
- let e = Hv(Vv(n, this.collection));
+ let e = Uv(Hv(n, this.collection));
if (e) return e.key;
let t = this.getFirstKey();
return t == null || !this.collection.getItem(t) ? null : super.getKeyForItemInRowByIndex(t, n.index);
@@ -13400,13 +13400,13 @@ var ine = class extends ox {
let t = this.findNextKey(e.key, (e) => e.type === "column");
if (t != null) return t;
let n = this.collection.headerRows[e.level];
- for (let e of Vv(n, this.collection)) if (e.type === "column") return e.key;
+ for (let e of Hv(n, this.collection)) if (e.type === "column") return e.key;
return null;
}
findPreviousColumnKey(e) {
let t = this.findPreviousKey(e.key, (e) => e.type === "column");
if (t != null) return t;
- let n = this.collection.headerRows[e.level], r = [...Vv(n, this.collection)];
+ let n = this.collection.headerRows[e.level], r = [...Hv(n, this.collection)];
for (let e = r.length - 1; e >= 0; e--) {
let t = r[e];
if (t.type === "column") return t.key;
@@ -13435,7 +13435,7 @@ var ine = class extends ox {
let t = o.textValue.slice(0, e.length);
if (this.collator.compare(t, e) === 0) return o.key;
}
- for (let r of Vv(o, this.collection)) {
+ for (let r of Hv(o, this.collection)) {
let a = n.columns[r.index];
if (n.rowHeaderColumnKeys.has(a.key) && r.textValue) {
let a = r.textValue.slice(0, e.length);
@@ -13453,7 +13453,7 @@ function ane(e) {
return e && e.__esModule ? e.default : e;
}
function one(e, t, n) {
- let { keyboardDelegate: r, isVirtualized: i, layoutDelegate: a, layout: o } = e, s = Xv({
+ let { keyboardDelegate: r, isVirtualized: i, layoutDelegate: a, layout: o } = e, s = Zv({
usage: "search",
sensitivity: "base"
}), { direction: c } = vg(), l = t.selectionManager.disabledBehavior, u = (0, B.useMemo)(() => r || new ine({
@@ -13511,7 +13511,7 @@ function qx(e, t, n) {
}
(m.current != null && r.key !== m.current || !jp(n.current)) && ih(n.current);
}
- }, { itemProps: g, isPressed: _ } = qy({
+ }, { itemProps: g, isPressed: _ } = Jy({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
@@ -13654,7 +13654,7 @@ function une(e, t, n) {
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridRow.mjs
function dne(e, t, n) {
- let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = sx.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = qy({
+ let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = sx.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = Jy({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
@@ -13749,7 +13749,7 @@ function hne(e) {
return e && e.__esModule ? e.default : e;
}
function gne(e, t) {
- let { key: n } = e, { checkboxProps: r } = Tte(e, t);
+ let { key: n } = e, { checkboxProps: r } = wte(e, t);
return { checkboxProps: {
...r,
"aria-labelledby": `${r.id} ${dx(t, n)}`
@@ -13774,7 +13774,7 @@ function $x(e, t, n) {
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTab.mjs
function vne(e, t, n) {
- let { key: r, isDisabled: i, shouldSelectOnPressUp: a } = e, { selectionManager: o, selectedKey: s } = t, c = r === s, l = i || t.isDisabled || t.selectionManager.isDisabled(r), u = t.collection.getItem(r), { itemProps: d, isPressed: f } = qy({
+ let { key: r, isDisabled: i, shouldSelectOnPressUp: a } = e, { selectionManager: o, selectedKey: s } = t, c = r === s, l = i || t.isDisabled || t.selectionManager.isDisabled(r), u = t.collection.getItem(r), { itemProps: d, isPressed: f } = Jy({
selectionManager: o,
key: r,
ref: n,
@@ -13848,7 +13848,7 @@ var yne = class {
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTabList.mjs
function bne(e, t, n) {
- let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = e, { collection: a, selectionManager: o, disabledKeys: s } = t, { direction: c } = vg(), { collectionProps: l } = Bv({
+ let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = e, { collection: a, selectionManager: o, disabledKeys: s } = t, { direction: c } = vg(), { collectionProps: l } = Vv({
ref: n,
selectionManager: o,
keyboardDelegate: (0, B.useMemo)(() => new yne(a, c, r, s), [
@@ -13875,7 +13875,7 @@ function bne(e, t, n) {
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTabPanel.mjs
function xne(e, t, n) {
- let r = Gy(n) ? void 0 : 0, i = $x(t, e.id ?? t?.selectedKey, "tabpanel");
+ let r = Ky(n) ? void 0 : 0, i = $x(t, e.id ?? t?.selectedKey, "tabpanel");
return { tabPanelProps: U(fg({
...e,
id: i,
@@ -15231,14 +15231,14 @@ function uC() {
function dC() {
return lC ||= aC(), lC;
}
-var fC = (e) => oC(e, dC()), pC = (e) => sC(e, dC());
-function mC() {
+var gre = (e) => oC(e, dC()), _re = (e) => sC(e, dC());
+function fC() {
let e = lC;
e && (lC = "", cC(e));
}
//#endregion
//#region src/player/telemetry.ts
-function hC(e, t, n = {}) {
+function pC(e, t, n = {}) {
if (!t) return;
let r = 0, i = 0, a = 0, o = null;
t.addEventListener("seeking", () => {
@@ -15286,7 +15286,7 @@ function hC(e, t, n = {}) {
u(), l(!1);
}, { once: !0 }), c();
}
-function gre(e, t) {
+function vre(e, t) {
let n = 0, r = 0, i = !1, a = null, o = (n) => {
let i = ve(e.duration) || ve(t.duration);
!r && !n || (ce("/api/follow/activity", {
@@ -15322,7 +15322,7 @@ function gre(e, t) {
}
//#endregion
//#region src/player/videojs.ts
-var gC = "/vendor/videojs/8.24.1/", _C = (e) => new Promise((t, n) => {
+var mC = "/vendor/videojs/8.24.1/", hC = (e) => new Promise((t, n) => {
let r = document.head.querySelector(`script[src="${e}"]`);
if (r?.dataset.loaded) {
t();
@@ -15334,20 +15334,20 @@ var gC = "/vendor/videojs/8.24.1/", _C = (e) => new Promise((t, n) => {
}, { once: !0 }), i.addEventListener("error", () => {
i.remove(), n(/* @__PURE__ */ Error(`script unavailable: ${e}`));
}, { once: !0 }), r || (i.src = e, document.head.appendChild(i));
-}), vC = () => globalThis.videojs, yC = null;
-function bC() {
- let e = vC();
- return e ? Promise.resolve(e) : (yC ??= _C(`${gC}video.min.js`).then(() => _C(`${gC}lang/zh-CN.js`)).then(() => {
- let e = vC();
+}), gC = () => globalThis.videojs, _C = null;
+function vC() {
+ let e = gC();
+ return e ? Promise.resolve(e) : (_C ??= hC(`${mC}video.min.js`).then(() => hC(`${mC}lang/zh-CN.js`)).then(() => {
+ let e = gC();
if (!e) throw Error("videojs unavailable");
return e;
}).catch((e) => {
- throw yC = null, e;
- }), yC);
+ throw _C = null, e;
+ }), _C);
}
//#endregion
//#region src/player/immerse-player.ts
-var _re = {
+var yre = {
controls: !1,
preload: "auto",
posterImage: !1,
@@ -15359,37 +15359,37 @@ var _re = {
errorDisplay: !1,
textTrackSettings: !1
};
-function vre(e, t) {
+function bre(e, t) {
let { item: n, session: r } = t, i = null, a = !1;
- return Promise.all([sC(n, r), bC().catch(() => null)]).then(([o, s]) => {
+ return Promise.all([sC(n, r), vC().catch(() => null)]).then(([o, s]) => {
if (a) return;
let c = oC(n, r), l = String(o.type || "").includes("mpegurl");
if (!s) e.src = (l ? c : o).src;
else {
- let t = s(e, _re);
+ let t = s(e, yre);
i = t, l && t.one("error", () => {
a || t.src(c);
}), t.src(o);
}
- hC(n, e, t.onEnded ? { onEnded: t.onEnded } : {}), t.onLoaded?.();
+ pC(n, e, t.onEnded ? { onEnded: t.onEnded } : {}), t.onLoaded?.();
}), () => {
a || (a = !0, cC(r), i ? iC(i) : (e.pause(), e.removeAttribute("src"), e.load()));
};
}
//#endregion
//#region src/player/detail-player.ts
-var xC = /* @__PURE__ */ new WeakMap(), SC = null, CC = null, wC = null;
-function TC() {
- SC &&= (clearInterval(SC), null), CC &&= (clearInterval(CC), null), wC &&= (clearTimeout(wC), null);
+var yC = /* @__PURE__ */ new WeakMap(), bC = null, xC = null, SC = null;
+function CC() {
+ bC &&= (clearInterval(bC), null), xC &&= (clearInterval(xC), null), SC &&= (clearTimeout(SC), null);
}
-async function yre(e, t, n, r = {}) {
+async function xre(e, t, n, r = {}) {
let i = BS();
if (i && !i.isDisposed()) return i;
let a = PS(), o = r.resume ?? null;
o?.autoplay && (n = !0);
- let s = () => r.source ? Promise.resolve(r.source) : pC(e), c;
+ let s = () => r.source ? Promise.resolve(r.source) : _re(e), c;
try {
- c = await bC();
+ c = await vC();
} catch {
return t.controls = !0, s().then((e) => {
t.src = e.src, n && t.play().catch(() => {});
@@ -15432,7 +15432,7 @@ async function yre(e, t, n, r = {}) {
ready: !1,
updateStats: () => {}
};
- xC.set(l, y), y.updateStats = () => {
+ yC.set(l, y), y.updateStats = () => {
let n = y.chrome?.statsPanel;
if (!n || n.hidden || !g()) return;
let i = t.getVideoPlaybackQuality ? t.getVideoPlaybackQuality() : null, a = t.getBoundingClientRect(), o = `${t.videoWidth || e.width || "?"}×${t.videoHeight || e.height || "?"}`, s = v(), c = uC(), h = s ? XS(e.id, c) : [], _ = h.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), b = h.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
@@ -15488,11 +15488,11 @@ async function yre(e, t, n, r = {}) {
n.innerHTML = `${R("gauge")}<span class="sr-only">加载速度</span><span>${L(a)}</span>`;
}, C = () => {
let e = y.chrome?.netBadge;
- !e || !e.isConnected || (e.hidden = !1, S(), CC && clearInterval(CC), CC = setInterval(S, 500));
+ !e || !e.isConnected || (e.hidden = !1, S(), xC && clearInterval(xC), xC = setInterval(S, 500));
}, w = () => {
let e = y.chrome?.netBadge;
- e && (wC && clearTimeout(wC), wC = setTimeout(() => {
- e.hidden = !0, CC &&= (clearInterval(CC), null);
+ e && (SC && clearTimeout(SC), SC = setTimeout(() => {
+ e.hidden = !0, xC &&= (clearInterval(xC), null);
}, 1400));
};
return l.on([
@@ -15504,7 +15504,7 @@ async function yre(e, t, n, r = {}) {
S(), w();
}), l.on("error", () => {
if (b && !x && !l.isDisposed()) {
- x = !0, b = !1, l.src(fC(e)), n && l.play()?.catch(() => {});
+ x = !0, b = !1, l.src(gre(e)), n && l.play()?.catch(() => {});
return;
}
r.checkSourceStatus !== !1 && a.loadSourceStatus().then((t) => {
@@ -15528,14 +15528,14 @@ async function yre(e, t, n, r = {}) {
}), n && l.play()?.catch(() => {}));
}).catch(() => {}), l;
}
-var bre = "<canvas data-ambient-canvas=\"\" width=\"32\" height=\"18\"></canvas>";
-function EC(e, t = null) {
- if (e.querySelector(":scope > [data-ambient-canvas]") || e.insertAdjacentHTML("afterbegin", bre), e.querySelector(":scope > #playerStatsBtn")) return;
+var Sre = "<canvas data-ambient-canvas=\"\" width=\"32\" height=\"18\"></canvas>";
+function wC(e, t = null) {
+ if (e.querySelector(":scope > [data-ambient-canvas]") || e.insertAdjacentHTML("afterbegin", Sre), e.querySelector(":scope > #playerStatsBtn")) return;
let n = document.createElement("template");
n.innerHTML = ire(), e.insertBefore(n.content, t);
}
-function DC(e, t) {
- let n = xC.get(e);
+function TC(e, t) {
+ let n = yC.get(e);
if (!n || e.isDisposed()) return () => {};
let r = (e) => t.querySelector(`:scope > #${e}`), i = {
statsButton: r("playerStatsBtn"),
@@ -15547,14 +15547,14 @@ function DC(e, t) {
if (a && o) {
a.hidden = !n.ready;
let e = () => {
- o.hidden || (o.hidden = !0, a.setAttribute("aria-pressed", "false"), SC &&= (clearInterval(SC), null));
+ o.hidden || (o.hidden = !0, a.setAttribute("aria-pressed", "false"), bC &&= (clearInterval(bC), null));
};
a.onclick = () => {
if (!o.hidden) {
e();
return;
}
- document.dispatchEvent(new CustomEvent(JS, { detail: "stats" })), o.hidden = !1, a.setAttribute("aria-pressed", "true"), n.updateStats(), SC && clearInterval(SC), SC = setInterval(n.updateStats, 1e3);
+ document.dispatchEvent(new CustomEvent(JS, { detail: "stats" })), o.hidden = !1, a.setAttribute("aria-pressed", "true"), n.updateStats(), bC && clearInterval(bC), bC = setInterval(n.updateStats, 1e3);
};
let t = (t) => {
t.detail !== "stats" && e();
@@ -15562,14 +15562,14 @@ function DC(e, t) {
document.addEventListener(JS, t), s = () => document.removeEventListener(JS, t);
}
let c = e.el().querySelector("video"), l = c ? sre(c) : () => {}, u = !0, d = () => {
- u && (u = !1, s(), l(), n.chrome === i && (n.chrome = null, TC()));
+ u && (u = !1, s(), l(), n.chrome === i && (n.chrome = null, CC()));
};
return e.one("dispose", d), d;
}
-function OC(e, t) {
- if (t.kind === "immerse") return vre(e, t);
+function EC(e, t) {
+ if (t.kind === "immerse") return bre(e, t);
let { kind: n, item: r, media: i = null, handedOff: a, onPlayer: o } = t, s = PS(), c = t.chrome === !1 ? null : e.parentElement;
- c && EC(c, e);
+ c && wC(c, e);
let l = { resume: t.resume ?? null };
if (n === "follow") l = {
...l,
@@ -15589,16 +15589,16 @@ function OC(e, t) {
method: "POST",
body: JSON.stringify({ id: r.id })
}).catch(() => {});
- }, { once: !0 }), hC(r, e, {
+ }, { once: !0 }), pC(r, e, {
watched: "#watched",
mark: "#mark",
ratio: "#ratioTxt"
});
}
let u = null, d = !1, f = () => {}, p = () => {
- f(), !(!u || a?.(u)) && (BS() === u && (VS(null), TC()), iC(u));
+ f(), !(!u || a?.(u)) && (BS() === u && (VS(null), CC()), iC(u));
};
- return yre(r, e, t.autoplay ?? s.settings().detailAutoplay, l).then((t) => {
+ return xre(r, e, t.autoplay ?? s.settings().detailAutoplay, l).then((t) => {
if (u = t, d) {
p();
return;
@@ -15607,45 +15607,45 @@ function OC(e, t) {
o?.(null);
return;
}
- c && (f = DC(t, c)), n === "follow" && gre(r, e), o?.(t);
+ c && (f = TC(t, c)), n === "follow" && vre(r, e), o?.(t);
}), () => {
d = !0, p();
};
}
//#endregion
//#region src/player/playback.ts
-function kC(e) {
+function DC(e) {
e && (e.paused ? e.play()?.catch(() => {}) : e.pause());
}
-function xre(e, t) {
+function Cre(e, t) {
let n = e.duration, r = (e.currentTime || 0) + t;
e.currentTime = Number.isFinite(n) ? Math.max(0, Math.min(n, r)) : Math.max(0, r);
}
//#endregion
//#region src/jav-artwork.ts
-function AC(e) {
+function OC(e) {
return e === "thumbnail" ? "thumbnail" : "cover";
}
-function Sre(e, t) {
- return e.is_jav && e.code && e.has_cover && (AC(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
+function wre(e, t) {
+ return e.is_jav && e.code && e.has_cover && (OC(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
}
-var jC = .704;
-function MC(e, t) {
+var kC = .704;
+function AC(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return t && n.set("exclude_vertical", "1"), n.toString();
}
-var Cre = (e, t) => [
+var Tre = (e, t) => [
"catalog-grid",
"catalog",
e,
t
-], wre = (e, t) => [
+], Ere = (e, t) => [
"catalog-grid",
"entity",
e,
t
];
-async function Tre(e, t, n, r, i) {
+async function Dre(e, t, n, r, i) {
let a = new URLSearchParams(e);
a.set("limit", String(n)), a.set("offset", String(t)), t && a.set("count", "0");
let o = await G(`/api/items?${a}`, i), s = {
@@ -15655,22 +15655,22 @@ async function Tre(e, t, n, r, i) {
};
return !t && !s.items.length && !r && (s.libraryEmpty = (await G("/api/items?limit=1&thumb=0", i)).total === 0), s;
}
-var Ere = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, Dre = (e, t) => {
+var Ore = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, kre = (e, t) => {
let n = t.reduce((e, t) => e + t.items.length, 0);
return (e.has_more == null ? n < (e.total || 0) : e.has_more) ? n : void 0;
};
-function NC(e) {
- let t = MC(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
+function jC(e) {
+ let t = AC(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
return {
- queryKey: Cre(t, e.revision || 0),
- queryFn: ({ pageParam: e, signal: i }) => Tre(t, e, n, r, i),
+ queryKey: Tre(t, e.revision || 0),
+ queryFn: ({ pageParam: e, signal: i }) => Dre(t, e, n, r, i),
initialPageParam: 0,
- getNextPageParam: Ere(n)
+ getNextPageParam: Ore(n)
};
}
-function Ore(e) {
+function Are(e) {
return {
- queryKey: wre(e.entityKey || "", e.revision || 0),
+ queryKey: Ere(e.entityKey || "", e.revision || 0),
queryFn: async ({ pageParam: t, signal: n }) => {
if (!e.fetchPage) return {
items: [],
@@ -15685,12 +15685,12 @@ function Ore(e) {
};
},
initialPageParam: 0,
- getNextPageParam: Dre
+ getNextPageParam: kre
};
}
-async function kre(e, t) {
+async function jre(e, t) {
if (e.mode !== "catalog") return;
- let n = NC(e);
+ let n = jC(e);
await z.fetchInfiniteQuery({
...n,
queryFn: ({ pageParam: e }) => n.queryFn({
@@ -15699,7 +15699,7 @@ async function kre(e, t) {
})
});
}
-function Are(e, t, n) {
+function Mre(e, t, n) {
return n ? e.filter((e) => {
let n = e.part_group?.key;
if (n) {
@@ -15714,24 +15714,24 @@ function Are(e, t, n) {
return !0;
}) : [...e];
}
-var PC = (e, t) => !!e && !!Sre(e, t);
-function jre(e, t) {
- let n = (e) => PC(e, t) && !!(e.creator || (e.performers || []).length || e.studio);
- return e.slice(15).find(n) || e.slice(8).find(n) || e.slice(8).find((e) => PC(e, t)) || e[e.length - 1];
+var MC = (e, t) => !!e && !!wre(e, t);
+function Nre(e, t) {
+ let n = (e) => MC(e, t) && !!(e.creator || (e.performers || []).length || e.studio);
+ return e.slice(15).find(n) || e.slice(8).find(n) || e.slice(8).find((e) => MC(e, t)) || e[e.length - 1];
}
-function Mre(e, { collapse: t, mix: n, javImage: r }) {
+function Pre(e, { collapse: t, mix: n, javImage: r }) {
let i = {
parts: /* @__PURE__ */ new Set(),
editions: /* @__PURE__ */ new Set()
}, a = /* @__PURE__ */ new Set(), o = [], s = [];
for (let c of e) {
s.push(o.length);
- let e = Are(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
+ let e = Mre(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
kind: "card",
item: e
}));
if (n && e.length >= 8) {
- let t = jre(e, r);
+ let t = Nre(e, r);
t && l.splice(7, 0, {
kind: "mix",
seed: t
@@ -15744,16 +15744,16 @@ function Mre(e, { collapse: t, mix: n, javImage: r }) {
pageStarts: s
};
}
-function Nre(e, t, n) {
+function Fre(e, t, n) {
let r = Math.max(1, n), i = [];
for (let n = Math.max(r, Math.ceil(Math.max(0, t) / r) * r); n < e; n += r) i.push(n);
return i;
}
-function Pre(e, t) {
+function Ire(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return n.set("orient", "竖屏"), n.set("limit", "18"), n.set("offset", String(t)), n.toString();
}
-function Fre(e, t) {
+function Lre(e, t) {
let n = [...t].sort((e, t) => e.at - t.at), r = [], i = 0;
for (let t of n) r.push({
start: i,
@@ -15766,10 +15766,10 @@ function Fre(e, t) {
strip: null
}), r;
}
-function FC(e, t) {
- IC((t) => t.id === e, t);
+function NC(e, t) {
+ PC((t) => t.id === e, t);
}
-function IC(e, t) {
+function PC(e, t) {
z.setQueriesData({
queryKey: ["catalog-grid"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -15786,31 +15786,31 @@ function IC(e, t) {
}
//#endregion
//#region src/react/item-detail/item-detail.ts
-var LC = (e) => ["item", e], RC = (e) => [
+var FC = (e) => ["item", e], IC = (e) => [
"item-queue",
e.kind,
e.kind === "playlist" ? e.playlistId : e.seedId
-], Ire = (e, t) => [
+], Rre = (e, t) => [
"item-related",
e,
t
-], Lre = (e) => `/api/item?id=${e}`, Rre = (e, t) => `/api/related?id=${e}&limit=${t}`, zC = "/api/playlist", BC = "/api/feedback", VC = "/api/item-tag", HC = "/api/watch-later", UC = "/api/quality-goal", WC = "/api/preference", GC = class extends Error {};
-async function KC(e, t) {
- let n = await G(Lre(e), t);
- if (n.error) throw new GC(n.error);
+], zre = (e) => `/api/item?id=${e}`, Bre = (e, t) => `/api/related?id=${e}&limit=${t}`, LC = "/api/playlist", RC = "/api/feedback", zC = "/api/item-tag", BC = "/api/watch-later", VC = "/api/quality-goal", HC = "/api/preference", UC = class extends Error {};
+async function WC(e, t) {
+ let n = await G(zre(e), t);
+ if (n.error) throw new UC(n.error);
return n;
}
-async function qC(e, t, n) {
+async function GC(e, t, n) {
if (e.kind === "mix") {
- let r = e.seedId, [i, a] = await Promise.all([KC(r, n), t.mixRelated(r)]);
- return z.setQueryData(LC(i.id), i), {
+ let r = e.seedId, [i, a] = await Promise.all([WC(r, n), t.mixRelated(r)]);
+ return z.setQueryData(FC(i.id), i), {
kind: "mix",
seedId: r,
title: `Mix · ${P(i, t.tagLabel)}`,
items: [i, ...a.filter((e) => e.id !== i.id)]
};
}
- if (e.kind === "playlist") return JC(await G(`${zC}?id=${e.playlistId}`, n));
+ if (e.kind === "playlist") return KC(await G(`${LC}?id=${e.playlistId}`, n));
let r = await G(`/api/${e.kind}?id=${e.seedId}`, n);
if (r.error || !r.items?.length) throw Error(r.error || "这一组已不存在");
return {
@@ -15820,19 +15820,19 @@ async function qC(e, t, n) {
items: r.items
};
}
-var JC = (e) => ({
+var KC = (e) => ({
kind: "playlist",
playlistId: e.id,
title: e.name,
items: e.items || [],
currentAssetId: e.current_asset_id
-}), YC = (e) => e.disposal === "vanished";
-function XC(e, t) {
+}), qC = (e) => e.disposal === "vanished";
+function JC(e, t) {
if (e.kind === "mix") return t;
- let n = e.kind === "playlist" ? e.items.filter((e) => !YC(e)) : e.items;
+ let n = e.kind === "playlist" ? e.items.filter((e) => !qC(e)) : e.items;
return n.length ? t != null && n.some((e) => e.id === t) ? t : e.kind === "playlist" && n.some((t) => t.id === e.currentAssetId) ? e.currentAssetId : n[0].id : null;
}
-function zre(e, t) {
+function Vre(e, t) {
if (t?.kind !== "parts") return e;
let n = t.items.find((t) => t.id === e.id)?.part_label || "";
return e.part_label === n ? e : {
@@ -15840,15 +15840,15 @@ function zre(e, t) {
part_label: n
};
}
-async function Bre(e, t) {
+async function Hre(e, t) {
let { queue: n, actions: r } = e, i = null, a = !1;
if (n) {
- let o = RC(n);
+ let o = IC(n);
try {
let r = n.fresh ? void 0 : z.getQueryData(o);
a = !r && n.kind === "mix", i = r || await z.fetchQuery({
queryKey: o,
- queryFn: () => qC(n, e.helpers, t),
+ queryFn: () => GC(n, e.helpers, t),
staleTime: 0
});
} catch (n) {
@@ -15860,20 +15860,20 @@ async function Bre(e, t) {
return;
}
}
- let o = i ? XC(i, e.id) : e.id;
+ let o = i ? JC(i, e.id) : e.id;
if (o == null) {
r.redirect(i?.kind === "playlist" ? { kind: "playlists" } : { kind: "gone" });
return;
}
- let s, c = a && o === i?.seedId ? z.getQueryData(LC(o)) : void 0;
+ let s, c = a && o === i?.seedId ? z.getQueryData(FC(o)) : void 0;
try {
s = c || await z.fetchQuery({
- queryKey: LC(o),
- queryFn: () => KC(o, t),
+ queryKey: FC(o),
+ queryFn: () => WC(o, t),
staleTime: 0
});
} catch (e) {
- if (e instanceof GC) {
+ if (e instanceof UC) {
r.redirect({ kind: "gone" });
return;
}
@@ -15884,7 +15884,7 @@ async function Bre(e, t) {
id: Number(s.follow_item_id)
});
}
-function Vre(e) {
+function Ure(e) {
let t = e.entity_refs || {}, n = /* @__PURE__ */ new Set(), r = (e) => {
let t = me(e.name);
return !e.name || n.has(t) ? !1 : (n.add(t), !0);
@@ -15906,42 +15906,42 @@ function Vre(e) {
unowned: !i.length && !c.length && !String(e.creator || "").trim()
};
}
-var ZC = (e) => Math.min(Math.max(e || 0, 0), 100), QC = (e) => Math.round(ZC(e) / 20), Hre = (e) => {
- let t = QC(e);
+var YC = (e) => Math.min(Math.max(e || 0, 0), 100), XC = (e) => Math.round(YC(e) / 20), Wre = (e) => {
+ let t = XC(e);
return t ? `${t} 星` : "未评分";
-}, Ure = (e, t) => {
+}, Gre = (e, t) => {
let n = t * 20;
return n === (e || 0) ? 0 : n;
};
-function Wre(e, t) {
+function Kre(e, t) {
let n = /* @__PURE__ */ new Map();
return (e.tags || []).filter((e) => !t.isDurationTag(e.k)).forEach((e) => {
let r = me(t.tagLabel(e.k)), i = n.get(r);
(!i || me(e.k) === r && me(i.k) !== r) && n.set(r, e);
}), [...n.values()].slice(0, 40);
}
-var $C = (e, t) => (e.tags || []).some((e) => me(e.k) === me(t)), ew = (e, t) => ({
+var ZC = (e, t) => (e.tags || []).some((e) => me(e.k) === me(t)), QC = (e, t) => ({
...e,
tags: (e.tags || []).filter((e) => me(e.k) !== me(t))
-}), tw = (e, t) => $C(e, t.k) ? e : {
+}), $C = (e, t) => ZC(e, t.k) ? e : {
...e,
tags: [...e.tags || [], t]
-}, nw = "peach.recentTags";
-function rw() {
+}, ew = "peach.recentTags";
+function tw() {
try {
- let e = JSON.parse(localStorage.getItem(nw) || "[]");
+ let e = JSON.parse(localStorage.getItem(ew) || "[]");
return Array.isArray(e) ? e.map(String) : [];
} catch {
return [];
}
}
-function Gre(e) {
+function qre(e) {
try {
- let t = rw().filter((t) => me(t) !== me(e));
- localStorage.setItem(nw, JSON.stringify([e, ...t].slice(0, 12)));
+ let t = tw().filter((t) => me(t) !== me(e));
+ localStorage.setItem(ew, JSON.stringify([e, ...t].slice(0, 12)));
} catch {}
}
-function Kre(e, t, n) {
+function Jre(e, t, n) {
let r = me(e), i = new Map(t.map((e) => [me(e.k), e])), a = t.filter((e) => !r || me(e.k).includes(r)).slice(0, 120), o = r ? [] : n.map((e) => i.get(me(e)) || {
k: e,
n: 0
@@ -15952,73 +15952,73 @@ function Kre(e, t, n) {
create: r && !s ? e.trim() : ""
};
}
-var qre = {
+var Yre = {
中字: "subtitle",
无码: "uncensored",
无码破解: "cracked",
有码: "censored"
-}, Jre = {
+}, Xre = {
mix: "Mix",
parts: "分卷",
editions: "版本",
playlist: "播放列表"
};
-function Yre(e) {
+function Zre(e) {
let t = e.items.length, n = e.kind === "parts" ? `${t} 卷` : e.kind === "editions" ? `${t} 个版本` : `${t} 个视频`;
return {
- title: Jre[e.kind],
+ title: Xre[e.kind],
summary: e.kind === "editions" ? n : `${e.title} · ${n}`
};
}
-var iw = (e = "") => /^(?:\d+|[a-h])$/i.test(e) ? `第 ${e} 卷` : e, Xre = (e, t) => t?.kind === "parts" && e.part_label ? `<small class="javedition partlabel">${L(iw(e.part_label))}</small>` : "";
-function Zre(e, t, n, r) {
+var nw = (e = "") => /^(?:\d+|[a-h])$/i.test(e) ? `第 ${e} 卷` : e, Qre = (e, t) => t?.kind === "parts" && e.part_label ? `<small class="javedition partlabel">${L(nw(e.part_label))}</small>` : "";
+function $re(e, t, n, r) {
let i = e.filter((e) => e !== t), a = i.indexOf(n);
return i.splice(a + +!!r, 0, t), i;
}
-var Qre = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
-function $re(e, t) {
+var eie = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
+function tie(e, t) {
return t ? "offline" : e.location === "online" && !e.follow_item_id ? "online" : e.cost === "metered" && e.location !== "online" ? "metered" : "";
}
-function eie(e) {
+function nie(e) {
let t = Number(e.duration) > 0 ? Number(e.duration) : 0;
return !e.play_seconds || !t ? null : Math.min(Number(e.play_seconds) / t, 1) * 100;
}
-function aw(e, t) {
+function rw(e, t) {
return e === "dislike" ? t.feedback === "dislike" ? "已标记不合口味" : "已取消不合口味" : e === "seen" ? t.feedback === "seen" ? "已标记看过" : "已取消看过" : e === "dispose" ? t.disposal === "trash" ? "已移入回收站" : "已移出回收站" : "已记录一次高潮";
}
//#endregion
//#region src/react/immerse/immerse.ts
-var tie = (e, t, n) => [
+var rie = (e, t, n) => [
"immerse-list",
e,
t,
n
];
-function nie(e) {
+function iie(e) {
let t = new URLSearchParams();
for (let [n, r] of Object.entries(e)) r && t.set(n, String(r));
return t.delete("orient"), t.set("sort", "rand"), t.set("limit", "60"), t.set("offset", "0"), t.set("thumb", ""), t.toString();
}
-var rie = (e, t) => e.cost !== "metered" && !!e.duration && !t(String(e.location ?? ""));
-function iie(e, t = Math.random) {
+var aie = (e, t) => e.cost !== "metered" && !!e.duration && !t(String(e.location ?? ""));
+function oie(e, t = Math.random) {
for (let n = e.length - 1; n > 0; n--) {
let r = Math.floor(t() * (n + 1));
[e[n], e[r]] = [e[r], e[n]];
}
return e;
}
-async function aie(e, t) {
- return iie(((await G(`/api/items?${e}`)).items || []).filter((e) => rie(e, t)));
+async function sie(e, t) {
+ return oie(((await G(`/api/items?${e}`)).items || []).filter((e) => aie(e, t)));
}
-var ow = (e) => z.ensureQueryData({
- queryKey: LC(e),
- queryFn: ({ signal: t }) => KC(e, t)
+var iw = (e) => z.ensureQueryData({
+ queryKey: FC(e),
+ queryFn: ({ signal: t }) => WC(e, t)
});
-function oie(e, t) {
+function cie(e, t) {
let n = new Set(e.map((e) => e.id));
return e.concat(t.filter((e) => !n.has(e.id)));
}
-function sie(e) {
+function lie(e) {
let t = e.performers || [], n = t.length ? t.slice(0, 3).join("、") + (t.length > 3 ? ` 等 ${t.length} 人` : "") : e.creator || "未归属", r = t.length ? "performer" : e.creator ? "creator" : "";
return {
who: n,
@@ -16027,63 +16027,63 @@ function sie(e) {
ref: r && e.entity_refs?.[r]?.[0] || null
};
}
-function cie(e, t, n) {
+function uie(e, t, n) {
if (!e || !t || !n || !Number.isFinite(n)) return null;
let r = e / t;
return (r > n ? r / n : n / r) > 1.05 ? "contain" : "cover";
}
-function lie(e, t) {
+function die(e, t) {
return e.videoWidth && e.videoHeight ? e.videoWidth >= e.videoHeight : !!(t.width && t.height && t.width > 0 && t.height > 0 && t.width >= t.height);
}
-var uie = 15e3, sw = {
+var fie = 15e3, aw = {
open: !1,
idle: !1,
wide: !1,
loading: null,
shown: null
-}, cw = null, lw = null, uw = sw, dw = /* @__PURE__ */ new Set(), fw = 0, pw = 0, mw = 0, hw = "", gw = [], _w = 0, vw = !1, yw = !1, bw = null, xw = /* @__PURE__ */ new Set(), Sw = "", Cw = null, ww = 0, Tw = null, Ew = !1;
-function Dw() {
- if (!cw) throw Error("沉浸模式还没有接上宿主(configureImmerse)");
- return cw;
+}, ow = null, sw = null, cw = aw, lw = /* @__PURE__ */ new Set(), uw = 0, dw = 0, fw = 0, pw = "", mw = [], hw = 0, gw = !1, _w = !1, vw = null, yw = /* @__PURE__ */ new Set(), bw = "", xw = null, Sw = 0, Cw = null, ww = !1;
+function Tw() {
+ if (!ow) throw Error("沉浸模式还没有接上宿主(configureImmerse)");
+ return ow;
}
-function die(e) {
- return dw.add(e), () => {
- dw.delete(e);
+function pie(e) {
+ return lw.add(e), () => {
+ lw.delete(e);
};
}
-function fie() {
- for (let e of [...dw]) e();
+function mie() {
+ for (let e of [...lw]) e();
}
-function Ow() {
- (0, $f.flushSync)(fie);
+function Ew() {
+ (0, $f.flushSync)(mie);
}
-function kw() {
- let e = Cw ? ZS(Cw.id) : 0;
- return e ? `${Sw} · ${$S(e)}` : Sw;
+function Dw() {
+ let e = xw ? ZS(xw.id) : 0;
+ return e ? `${bw} · ${$S(e)}` : bw;
}
-function Aw(e, t = null) {
- if (clearInterval(ww), ww = 0, e === null) {
- uw = {
- ...uw,
+function Ow(e, t = null) {
+ if (clearInterval(Sw), Sw = 0, e === null) {
+ cw = {
+ ...cw,
loading: null
- }, Ow();
+ }, Ew();
return;
}
- Sw = e, Cw = t, uw = {
- ...uw,
- loading: kw()
- }, Ow(), ww = window.setInterval(() => {
- Cw = gw[_w] ?? null, uw = {
- ...uw,
- loading: kw()
- }, Ow();
+ bw = e, xw = t, cw = {
+ ...cw,
+ loading: Dw()
+ }, Ew(), Sw = window.setInterval(() => {
+ xw = mw[hw] ?? null, cw = {
+ ...cw,
+ loading: Dw()
+ }, Ew();
}, 500);
}
-function pie(e) {
+function hie(e) {
let t = document.createElement("div");
t.dataset.immerseSlide = "", e && (t.style.transform = `translateY(${e}%)`);
let n = document.createElement("video");
- n.className = "video-js", n.playsInline = !0, n.preload = "auto", t.append(n), lw.track.append(t);
+ n.className = "video-js", n.playsInline = !0, n.preload = "auto", t.append(n), sw.track.append(t);
let r = aC(), i = () => {}, a = {
el: t,
video: n,
@@ -16095,250 +16095,250 @@ function pie(e) {
}),
leave: i
};
- return xw.add(a), a;
+ return yw.add(a), a;
}
-function mie(e, t) {
+function gie(e, t) {
return new Promise((n) => {
- e.release = OC(e.video, {
+ e.release = EC(e.video, {
kind: "immerse",
item: t,
session: e.session,
onLoaded: n,
onEnded: () => {
- uw.open && Lw(1);
+ cw.open && Fw(1);
}
}), e.gone.then(n);
});
}
-function jw(e) {
- !e || e.disposed || (e.disposed = !0, xw.delete(e), e.leave(), e.release(), e.el.remove(), bw === e && (bw = null));
+function kw(e) {
+ !e || e.disposed || (e.disposed = !0, yw.delete(e), e.leave(), e.release(), e.el.remove(), vw === e && (vw = null));
}
-var Mw = [
+var Aw = [
"loadeddata",
"canplay",
"error"
];
-function hie(e) {
+function _ie(e) {
let { video: t } = e;
return t.readyState >= 3 ? Promise.resolve() : new Promise((n) => {
let r = !1, i = () => {
- r || (r = !0, clearTimeout(a), Mw.forEach((e) => t.removeEventListener(e, i)), n());
+ r || (r = !0, clearTimeout(a), Aw.forEach((e) => t.removeEventListener(e, i)), n());
};
- Mw.forEach((e) => t.addEventListener(e, i, { once: !0 }));
- let a = setTimeout(i, uie);
+ Aw.forEach((e) => t.addEventListener(e, i, { once: !0 }));
+ let a = setTimeout(i, fie);
e.gone.then(i);
});
}
-function Nw(e) {
- let t = e.closest("[data-immerse-track]"), n = t && t.clientWidth && t.clientHeight ? t.clientWidth / t.clientHeight : window.innerWidth / window.innerHeight, r = cie(e.videoWidth, e.videoHeight, n);
+function jw(e) {
+ let t = e.closest("[data-immerse-track]"), n = t && t.clientWidth && t.clientHeight ? t.clientWidth / t.clientHeight : window.innerWidth / window.innerHeight, r = uie(e.videoWidth, e.videoHeight, n);
r === "contain" ? e.dataset.fit = "contain" : r && delete e.dataset.fit;
}
-var Pw = () => lw?.track.querySelectorAll("video").forEach(Nw);
-function gie(e) {
- delete e.dataset.fit, e.readyState >= 1 ? Nw(e) : e.addEventListener("loadedmetadata", () => Nw(e), { once: !0 });
+var Mw = () => sw?.track.querySelectorAll("video").forEach(jw);
+function vie(e) {
+ delete e.dataset.fit, e.readyState >= 1 ? jw(e) : e.addEventListener("loadedmetadata", () => jw(e), { once: !0 });
}
-function _ie(e) {
- uw = {
- ...uw,
+function yie(e) {
+ cw = {
+ ...cw,
wide: e
- }, Ow(), Pw();
+ }, Ew(), Mw();
}
-var Fw = () => {
- let e = hw;
+var Nw = () => {
+ let e = pw;
return z.fetchQuery({
- queryKey: tie(e, pw, mw),
- queryFn: () => aie(e, Dw().sourceOffline),
+ queryKey: rie(e, dw, fw),
+ queryFn: () => sie(e, Tw().sourceOffline),
staleTime: Infinity
});
};
-function vie(e, t) {
+function bie(e, t) {
let n = () => ve(e.duration) || ve(t.duration);
e.addEventListener("timeupdate", () => {
let t = n();
- t && lw && (lw.progress.style.width = `${(e.currentTime / t * 100).toFixed(2)}%`);
- }), Tw = {
+ t && sw && (sw.progress.style.width = `${(e.currentTime / t * 100).toFixed(2)}%`);
+ }), Cw = {
video: e,
duration: n
};
}
-async function Iw(e = 0) {
- let t = gw[_w];
- if (!t || vw) return;
- let n = fw;
- Dw().route(t.id), vw = !0, Aw(e ? "切换中…" : "加载中…", t);
+async function Pw(e = 0) {
+ let t = mw[hw];
+ if (!t || gw) return;
+ let n = uw;
+ Tw().route(t.id), gw = !0, Ow(e ? "切换中…" : "加载中…", t);
let r = null;
try {
- if (await ow(t.id).catch((e) => {
- if (!(e instanceof GC)) throw e;
- }), n !== fw) return;
- let i = bw, a = !!(e && i);
- a || jw(i);
- let o = pie(a ? e > 0 ? 100 : -100 : 0);
- if (r = o, gie(o.video), await mie(o, t), await hie(o), o.disposed || (_ie(lie(o.video, t)), a && i && (requestAnimationFrame(() => requestAnimationFrame(() => {
+ if (await iw(t.id).catch((e) => {
+ if (!(e instanceof UC)) throw e;
+ }), n !== uw) return;
+ let i = vw, a = !!(e && i);
+ a || kw(i);
+ let o = hie(a ? e > 0 ? 100 : -100 : 0);
+ if (r = o, vie(o.video), await gie(o, t), await _ie(o), o.disposed || (yie(die(o.video, t)), a && i && (requestAnimationFrame(() => requestAnimationFrame(() => {
i.el.style.transform = `translateY(${e > 0 ? -100 : 100}%)`, o.el.style.transform = "";
- })), await new Promise((e) => setTimeout(e, 210)), jw(i), o.el.style.transform = ""), o.disposed)) return;
- bw = o, r = null, o.video.play()?.catch(() => {}), uw = {
- ...uw,
+ })), await new Promise((e) => setTimeout(e, 210)), kw(i), o.el.style.transform = ""), o.disposed)) return;
+ vw = o, r = null, o.video.play()?.catch(() => {}), cw = {
+ ...cw,
idle: !1,
shown: {
item: t,
- index: _w,
- length: gw.length
+ index: hw,
+ length: mw.length
}
- }, vie(o.video, t), K("/api/play", { id: t.id }).catch(() => {}), Aw(null);
+ }, bie(o.video, t), K("/api/play", { id: t.id }).catch(() => {}), Ow(null);
} catch {
- jw(r), n === fw && Aw(null);
+ kw(r), n === uw && Ow(null);
} finally {
- n === fw && (vw = !1);
+ n === uw && (gw = !1);
}
}
-async function Lw(e) {
- if (vw || !uw.open) return;
- let t = fw;
- if (_w += e, Aw("切换中…", gw[_w] ?? null), _w >= gw.length - 3 && !yw) {
- yw = !0;
+async function Fw(e) {
+ if (gw || !cw.open) return;
+ let t = uw;
+ if (hw += e, Ow("切换中…", mw[hw] ?? null), hw >= mw.length - 3 && !_w) {
+ _w = !0;
try {
- mw += 1;
- let e = await Fw();
- t === fw && (gw = oie(gw, e));
+ fw += 1;
+ let e = await Nw();
+ t === uw && (mw = cie(mw, e));
} catch {} finally {
- yw = !1;
+ _w = !1;
}
}
- t === fw && (_w >= gw.length && (_w = 0), _w < 0 && (_w = gw.length - 1), await Iw(e));
+ t === uw && (hw >= mw.length && (hw = 0), hw < 0 && (hw = mw.length - 1), await Pw(e));
}
-async function yie(e) {
- let t = ++fw;
- Rw(), pw += 1, mw = 0, hw = nie(Dw().filters()), z.removeQueries({ queryKey: ["immerse-list"] }), uw = {
- ...uw,
+async function xie(e) {
+ let t = ++uw;
+ Iw(), dw += 1, fw = 0, pw = iie(Tw().filters()), z.removeQueries({ queryKey: ["immerse-list"] }), cw = {
+ ...cw,
open: !0,
idle: !0,
shown: null
- }, document.body.setAttribute("data-immerse-open", ""), Aw("加载内容…");
+ }, document.body.setAttribute("data-immerse-open", ""), Ow("加载内容…");
try {
- let n = await Fw();
+ let n = await Nw();
if (e && !n.some((t) => t.id === e)) {
- let t = await ow(e).catch((e) => {
- if (e instanceof GC) return null;
+ let t = await iw(e).catch((e) => {
+ if (e instanceof UC) return null;
throw e;
});
t?.id && (n = [t, ...n.filter((t) => t.id !== e)]);
}
- if (t !== fw) return;
- if (gw = n, !gw.length) {
- zw(), Dw().warn("当前筛选下没有可直接播放的内容");
+ if (t !== uw) return;
+ if (mw = n, !mw.length) {
+ Lw(), Tw().warn("当前筛选下没有可直接播放的内容");
return;
}
- _w = Math.max(0, gw.findIndex((t) => t.id === e)), await Iw();
+ hw = Math.max(0, mw.findIndex((t) => t.id === e)), await Pw();
} catch {
- if (t !== fw) return;
- Aw(null), zw();
+ if (t !== uw) return;
+ Ow(null), Lw();
}
}
-function Rw() {
- clearInterval(ww), ww = 0, Gw(), Uw = null, Tw = null, Ew = !1, [...xw].forEach(jw), vw = !1;
+function Iw() {
+ clearInterval(Sw), Sw = 0, Uw(), Vw = null, Cw = null, ww = !1, [...yw].forEach(kw), gw = !1;
}
-function zw() {
- uw.open && (fw++, Rw(), uw = sw, document.body.removeAttribute("data-immerse-open"), Ow(), Dw().closed());
+function Lw() {
+ cw.open && (uw++, Iw(), cw = aw, document.body.removeAttribute("data-immerse-open"), Ew(), Tw().closed());
}
-var Bw = 0, Vw = null, Hw = 0, Uw = null, Ww = 0;
-function Gw() {
- clearTimeout(Bw), Bw = 0, Vw = null;
+var Rw = 0, zw = null, Bw = 0, Vw = null, Hw = 0;
+function Uw() {
+ clearTimeout(Rw), Rw = 0, zw = null;
}
-function bie(e) {
- let t = bw?.video;
+function Sie(e) {
+ let t = vw?.video;
if (!t) return;
let n = e < window.innerWidth / 2 ? -1 : 1, r = Date.now();
- if (Vw && Vw.side === n && r - Vw.at <= 280) {
- Gw(), xre(t, Dw().seekSeconds() * n);
+ if (zw && zw.side === n && r - zw.at <= 280) {
+ Uw(), Cre(t, Tw().seekSeconds() * n);
return;
}
- Bw && (clearTimeout(Bw), Bw = 0, kC(t)), Vw = {
+ Rw && (clearTimeout(Rw), Rw = 0, DC(t)), zw = {
side: n,
at: r
- }, Bw = window.setTimeout(() => {
- Bw = 0, Vw = null, uw.open && kC(bw?.video);
+ }, Rw = window.setTimeout(() => {
+ Rw = 0, zw = null, cw.open && DC(vw?.video);
}, 280);
}
-function xie() {
- Date.now() < Hw || kC(bw?.video);
+function Cie() {
+ Date.now() < Bw || DC(vw?.video);
}
-var Kw = (e) => lw?.bar.toggleAttribute("data-scrubbing", e);
-function qw(e) {
- lw && (lw.progress.style.width = `${(e * 100).toFixed(2)}%`);
+var Ww = (e) => sw?.bar.toggleAttribute("data-scrubbing", e);
+function Gw(e) {
+ sw && (sw.progress.style.width = `${(e * 100).toFixed(2)}%`);
}
-function Jw(e) {
+function Kw(e) {
let t = e.target;
if (e.touches.length !== 1 || !t?.closest("[data-immerse-track]")) {
- Uw = null;
+ Vw = null;
return;
}
- let n = bw?.video;
- Uw = {
+ let n = vw?.video;
+ Vw = {
x: e.touches[0].clientX,
y: e.touches[0].clientY,
axis: "",
from: n && n.currentTime || 0
};
}
-function Yw(e) {
- if (!Uw || e.touches.length !== 1) return;
- let t = e.touches[0].clientX - Uw.x, n = e.touches[0].clientY - Uw.y;
- if (!Uw.axis) {
+function qw(e) {
+ if (!Vw || e.touches.length !== 1) return;
+ let t = e.touches[0].clientX - Vw.x, n = e.touches[0].clientY - Vw.y;
+ if (!Vw.axis) {
if (Math.abs(t) < 12 && Math.abs(n) < 12) return;
- Uw.axis = Math.abs(t) > Math.abs(n) ? "x" : "y", Uw.axis === "x" && Kw(!0);
+ Vw.axis = Math.abs(t) > Math.abs(n) ? "x" : "y", Vw.axis === "x" && Ww(!0);
}
- if (Uw.axis !== "x") return;
- let r = bw?.video, i = r && r.duration || 0;
- i && (e.preventDefault(), Uw.to = Math.min(i, Math.max(0, Uw.from + t / window.innerWidth * i)), qw(Uw.to / i));
+ if (Vw.axis !== "x") return;
+ let r = vw?.video, i = r && r.duration || 0;
+ i && (e.preventDefault(), Vw.to = Math.min(i, Math.max(0, Vw.from + t / window.innerWidth * i)), Gw(Vw.to / i));
}
-function Xw(e) {
- if (!Uw) return;
- let t = Uw;
- if (Uw = null, Hw = Date.now() + 700, Kw(!1), t.axis === "x") {
- let e = bw?.video;
+function Jw(e) {
+ if (!Vw) return;
+ let t = Vw;
+ if (Vw = null, Bw = Date.now() + 700, Ww(!1), t.axis === "x") {
+ let e = vw?.video;
e && t.to != null && (e.currentTime = t.to);
return;
}
let n = e.changedTouches[0], r = n.clientX - t.x, i = t.y - n.clientY;
if (Math.abs(i) > 60) {
- Gw(), Lw(i > 0 ? 1 : -1);
+ Uw(), Fw(i > 0 ? 1 : -1);
return;
}
- Math.abs(r) <= 14 && Math.abs(i) <= 14 && (e.preventDefault(), bie(n.clientX));
+ Math.abs(r) <= 14 && Math.abs(i) <= 14 && (e.preventDefault(), Sie(n.clientX));
}
-function Zw() {
- Uw = null, Kw(!1);
+function Yw() {
+ Vw = null, Ww(!1);
}
-function Qw(e) {
+function Xw(e) {
let t = Date.now();
- t - Ww < 260 || (Ww = t, Lw(e.deltaY > 0 ? 1 : -1));
+ t - Hw < 260 || (Hw = t, Fw(e.deltaY > 0 ? 1 : -1));
}
-function $w(e) {
- let t = lw.bar.getBoundingClientRect();
+function Zw(e) {
+ let t = sw.bar.getBoundingClientRect();
return Math.min(1, Math.max(0, (e.clientX - t.left) / t.width));
}
-function Sie(e) {
- Tw?.duration() && (Ew = !0, Kw(!0), e.currentTarget.setPointerCapture(e.pointerId), qw($w(e)), e.preventDefault());
+function wie(e) {
+ Cw?.duration() && (ww = !0, Ww(!0), e.currentTarget.setPointerCapture(e.pointerId), Gw(Zw(e)), e.preventDefault());
}
-function Cie(e) {
- Ew && qw($w(e));
+function Tie(e) {
+ ww && Gw(Zw(e));
}
-function wie(e) {
- if (!Ew) return;
- Ew = !1, Kw(!1);
- let t = Tw?.duration();
- Tw && t && (Tw.video.currentTime = t * $w(e));
+function Eie(e) {
+ if (!ww) return;
+ ww = !1, Ww(!1);
+ let t = Cw?.duration();
+ Cw && t && (Cw.video.currentTime = t * Zw(e));
}
-function Tie() {
- Ew = !1, Kw(!1);
+function Die() {
+ ww = !1, Ww(!1);
}
-async function eT(e, t) {
- let n = await K(BC, {
+async function Qw(e, t) {
+ let n = await K(RC, {
id: e,
kind: t
- }), r = z.getQueryData(LC(e));
- if (!r) return FC(e, {
+ }), r = z.getQueryData(FC(e));
+ if (!r) return NC(e, {
feedback: n.feedback ?? void 0,
o_count: n.o_count
}), n;
@@ -16347,7 +16347,7 @@ async function eT(e, t) {
feedback: n.feedback ?? void 0,
o_count: n.o_count
};
- return z.setQueryData(LC(e), i), FC(e, {
+ return z.setQueryData(FC(e), i), NC(e, {
feedback: i.feedback,
disposal: i.disposal,
watch_later: i.watch_later,
@@ -16355,7 +16355,7 @@ async function eT(e, t) {
o_count: i.o_count
}), n;
}
-var Eie = [
+var Oie = [
{
kind: "dislike",
glyph: "thumbs-down",
@@ -16372,31 +16372,31 @@ var Eie = [
label: "记一次高潮"
}
];
-function tT(e) {
+function $w(e) {
return TS({
- queryKey: LC(e ?? 0),
- queryFn: ({ signal: t }) => KC(e, t),
+ queryKey: FC(e ?? 0),
+ queryFn: ({ signal: t }) => WC(e, t),
enabled: e != null,
staleTime: Infinity
}).data;
}
-function Die({ kind: e, glyph: t, label: n, id: r }) {
- let i = tT(r), a = OS({
+function kie({ kind: e, glyph: t, label: n, id: r }) {
+ let i = $w(r), a = OS({
mutationFn: async (t) => {
- let n = z.getQueryData(LC(t))?.feedback || null;
+ let n = z.getQueryData(FC(t))?.feedback || null;
return {
- result: await eT(t, e),
+ result: await Qw(t, e),
before: n
};
},
onSuccess: ({ result: t, before: n }, r) => {
- Dw().toast(aw(e, t), { undo: async () => {
- e === "o" ? await eT(r, "o-undo") : (t.feedback && await eT(r, t.feedback), n && await eT(r, n));
+ Tw().toast(rw(e, t), { undo: async () => {
+ e === "o" ? await Qw(r, "o-undo") : (t.feedback && await Qw(r, t.feedback), n && await Qw(r, n));
} }), e === "dislike" && t.feedback === "dislike" && setTimeout(() => {
- Lw(1);
+ Fw(1);
}, 260);
},
- onError: (e) => Dw().failure("更新反馈", e)
+ onError: (e) => Tw().failure("更新反馈", e)
}), o = a.isPending, s = e !== "o" && i ? i.feedback === e ? "true" : "false" : void 0;
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-immerse-action": "",
@@ -16427,11 +16427,11 @@ function Die({ kind: e, glyph: t, label: n, id: r }) {
})]
});
}
-function Oie({ shown: e }) {
- let t = e?.item ?? null, n = tT(t?.id ?? null), r = n ? sie(n) : null, i = Dw(), a = (e) => {
- e.preventDefault(), n && (zw(), n.performers?.[0] ? i.openEntity("performer", n.performers[0]) : n.creator ? i.openEntity("creator", n.creator) : i.openUnowned());
+function Aie({ shown: e }) {
+ let t = e?.item ?? null, n = $w(t?.id ?? null), r = n ? lie(n) : null, i = Tw(), a = (e) => {
+ e.preventDefault(), n && (Lw(), n.performers?.[0] ? i.openEntity("performer", n.performers[0]) : n.creator ? i.openEntity("creator", n.creator) : i.openUnowned());
}, o = () => {
- t && (zw(), i.openItem(t.id));
+ t && (Lw(), i.openItem(t.id));
}, s = r ? w(r.name, r.ref, ae(r.name), r.kind || "performer") : "";
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-immerse-ui": "",
@@ -16460,18 +16460,18 @@ function Oie({ shown: e }) {
})]
});
}
-var kie = { __html: Ke("媒体加载中") };
-function Aie({ view: e }) {
+var jie = { __html: Ke("媒体加载中") };
+function Mie({ view: e }) {
let t = (0, B.useRef)(null), n = (0, B.useRef)(null), r = (0, B.useRef)(null), i = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => {
let e = t.current;
- return lw = {
+ return sw = {
root: e,
track: n.current,
bar: r.current,
progress: i.current
- }, e.addEventListener("touchstart", Jw, { passive: !0 }), e.addEventListener("touchmove", Yw, { passive: !1 }), e.addEventListener("touchend", Xw, { passive: !1 }), e.addEventListener("touchcancel", Zw, { passive: !0 }), e.addEventListener("wheel", Qw, { passive: !0 }), () => {
- e.removeEventListener("touchstart", Jw), e.removeEventListener("touchmove", Yw), e.removeEventListener("touchend", Xw), e.removeEventListener("touchcancel", Zw), e.removeEventListener("wheel", Qw), lw = null;
+ }, e.addEventListener("touchstart", Kw, { passive: !0 }), e.addEventListener("touchmove", qw, { passive: !1 }), e.addEventListener("touchend", Jw, { passive: !1 }), e.addEventListener("touchcancel", Yw, { passive: !0 }), e.addEventListener("wheel", Xw, { passive: !0 }), () => {
+ e.removeEventListener("touchstart", Kw), e.removeEventListener("touchmove", qw), e.removeEventListener("touchend", Jw), e.removeEventListener("touchcancel", Yw), e.removeEventListener("wheel", Xw), sw = null;
};
}, []);
let a = e.shown?.item.id ?? null, o = (e) => e ? "" : void 0;
@@ -16488,10 +16488,10 @@ function Aie({ view: e }) {
children: [/* @__PURE__ */ (0, V.jsx)("div", {
ref: n,
"data-immerse-track": "",
- onClick: xie
+ onClick: Cie
}), /* @__PURE__ */ (0, V.jsx)("div", {
"data-immerse-actions": "",
- children: Eie.map((e) => /* @__PURE__ */ (0, V.jsx)(Die, {
+ children: Oie.map((e) => /* @__PURE__ */ (0, V.jsx)(kie, {
...e,
id: a
}, e.kind))
@@ -16504,7 +16504,7 @@ function Aie({ view: e }) {
hidden: e.loading === null,
children: [/* @__PURE__ */ (0, V.jsx)("span", {
"data-immerse-spinner": "",
- dangerouslySetInnerHTML: kie
+ dangerouslySetInnerHTML: jie
}), /* @__PURE__ */ (0, V.jsx)("span", { children: e.loading ?? "" })]
}),
/* @__PURE__ */ (0, V.jsx)("button", {
@@ -16512,7 +16512,7 @@ function Aie({ view: e }) {
"data-immerse-close": "",
title: "关闭",
"aria-label": "关闭",
- onClick: zw,
+ onClick: Lw,
children: /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: "#i-x" })
@@ -16521,38 +16521,38 @@ function Aie({ view: e }) {
/* @__PURE__ */ (0, V.jsx)("div", {
ref: r,
"data-immerse-bar": "",
- onPointerDown: Sie,
- onPointerMove: Cie,
- onPointerUp: wie,
- onPointerCancel: Tie,
+ onPointerDown: wie,
+ onPointerMove: Tie,
+ onPointerUp: Eie,
+ onPointerCancel: Die,
children: /* @__PURE__ */ (0, V.jsx)("i", { ref: i })
}),
- /* @__PURE__ */ (0, V.jsx)(Oie, { shown: e.shown })
+ /* @__PURE__ */ (0, V.jsx)(Aie, { shown: e.shown })
]
});
}
-var jie = {
- open: yie,
- close: zw,
- isOpen: () => uw.open,
- activeVideo: () => uw.open ? bw?.video ?? null : null
+var eT = {
+ open: xie,
+ close: Lw,
+ isOpen: () => cw.open,
+ activeVideo: () => cw.open ? vw?.video ?? null : null
};
-function Mie(e) {
- if (!uw.open) return;
+function tT(e) {
+ if (!cw.open) return;
let t = e.target;
- t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) || e.ctrlKey || e.metaKey || e.altKey || (e.key === "ArrowDown" && Lw(1), e.key === "ArrowUp" && Lw(-1));
+ t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) || e.ctrlKey || e.metaKey || e.altKey || (e.key === "ArrowDown" && Fw(1), e.key === "ArrowUp" && Fw(-1));
}
function Nie(e) {
- let t = !cw;
- return cw = e, t && (document.addEventListener("keydown", Mie), addEventListener("resize", () => {
- uw.open && Pw();
+ let t = !ow;
+ return ow = e, t && (document.addEventListener("keydown", tT), addEventListener("resize", () => {
+ cw.open && Mw();
}), addEventListener("pagehide", () => {
- xw.forEach((e) => cC(e.session));
- })), jie;
+ yw.forEach((e) => cC(e.session));
+ })), eT;
}
function Pie() {
- let e = (0, B.useSyncExternalStore)(die, () => uw);
- return cw ? /* @__PURE__ */ (0, V.jsx)(Aie, { view: e }) : null;
+ let e = (0, B.useSyncExternalStore)(pie, () => cw);
+ return ow ? /* @__PURE__ */ (0, V.jsx)(Mie, { view: e }) : null;
}
//#endregion
//#region src/manage-header.ts
@@ -16824,7 +16824,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })), mT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })), nae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16832,7 +16832,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 2C15.866 2 19 5.13401 19 9C19 9.11351 18.9973 9.22639 18.992 9.33857C21.3265 10.16 23 12.3846 23 15C23 18.3137 20.3137 21 17 21H7C3.68629 21 1 18.3137 1 15C1 12.3846 2.67346 10.16 5.00804 9.33857C5.0027 9.22639 5 9.11351 5 9C5 5.13401 8.13401 2 12 2ZM12 4C9.23858 4 7 6.23858 7 9C7 9.08147 7.00193 9.16263 7.00578 9.24344L7.07662 10.7309L5.67183 11.2252C4.0844 11.7837 3 13.2889 3 15C3 17.2091 4.79086 19 7 19H17C19.2091 19 21 17.2091 21 15C21 12.79 19.21 11 17 11C15.233 11 13.7337 12.1457 13.2042 13.7347L11.3064 13.1021C12.1005 10.7185 14.35 9 17 9C17 6.23858 14.7614 4 12 4Z" })), hT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 2C15.866 2 19 5.13401 19 9C19 9.11351 18.9973 9.22639 18.992 9.33857C21.3265 10.16 23 12.3846 23 15C23 18.3137 20.3137 21 17 21H7C3.68629 21 1 18.3137 1 15C1 12.3846 2.67346 10.16 5.00804 9.33857C5.0027 9.22639 5 9.11351 5 9C5 5.13401 8.13401 2 12 2ZM12 4C9.23858 4 7 6.23858 7 9C7 9.08147 7.00193 9.16263 7.00578 9.24344L7.07662 10.7309L5.67183 11.2252C4.0844 11.7837 3 13.2889 3 15C3 17.2091 4.79086 19 7 19H17C19.2091 19 21 17.2091 21 15C21 12.79 19.21 11 17 11C15.233 11 13.7337 12.1457 13.2042 13.7347L11.3064 13.1021C12.1005 10.7185 14.35 9 17 9C17 6.23858 14.7614 4 12 4Z" })), mT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16840,7 +16840,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z" })), gT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z" })), hT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16848,7 +16848,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" })), _T = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" })), gT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16856,7 +16856,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" })), nae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" })), rae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16864,7 +16864,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" })), vT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" })), _T = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16872,7 +16872,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" })), yT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" })), vT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16880,7 +16880,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" })), rae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" })), iae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16888,7 +16888,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" })), iae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" })), aae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16896,7 +16896,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M13 12H16L12 16L8 12H11V8H13V12ZM15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918Z" })), aae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M13 12H16L12 16L8 12H11V8H13V12ZM15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918Z" })), oae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16904,7 +16904,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H13V17H8V15Z" })), oae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H13V17H8V15Z" })), sae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16912,7 +16912,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z" })), sae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z" })), cae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16920,7 +16920,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), cae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), lae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16928,7 +16928,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" })), bT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" })), yT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16936,7 +16936,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M5 14H19V4H5V14ZM5 16V20H19V16H5ZM4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2ZM15 17H17V19H15V17Z" })), xT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M5 14H19V4H5V14ZM5 16V20H19V16H5ZM4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2ZM15 17H17V19H15V17Z" })), bT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16944,7 +16944,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" })), lae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" })), uae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16952,7 +16952,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" })), uae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" })), dae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16960,7 +16960,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" })), dae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" })), fae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16968,7 +16968,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" })), fae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" })), pae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16976,7 +16976,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z" })), pae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z" })), mae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16984,7 +16984,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM11 13H4V19H11V13ZM20 13H13V19H20V13ZM11 5H4V11H11V5ZM20 5H13V11H20V5Z" })), ST = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM11 13H4V19H11V13ZM20 13H13V19H20V13ZM11 5H4V11H11V5ZM20 5H13V11H20V5Z" })), xT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -16992,7 +16992,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z" })), mae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z" })), hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17000,7 +17000,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })), CT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })), ST = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17008,7 +17008,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM11.6113 4.22157L3.83316 11.9997L12.3184 20.485L20.0966 12.7069L19.036 5.28223L11.6113 4.22157ZM13.7327 10.5855C12.9516 9.80448 12.9516 8.53815 13.7327 7.7571C14.5137 6.97606 15.78 6.97606 16.5611 7.7571C17.3421 8.53815 17.3421 9.80448 16.5611 10.5855C15.78 11.3666 14.5137 11.3666 13.7327 10.5855Z" })), wT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM11.6113 4.22157L3.83316 11.9997L12.3184 20.485L20.0966 12.7069L19.036 5.28223L11.6113 4.22157ZM13.7327 10.5855C12.9516 9.80448 12.9516 8.53815 13.7327 7.7571C14.5137 6.97606 15.78 6.97606 16.5611 7.7571C17.3421 8.53815 17.3421 9.80448 16.5611 10.5855C15.78 11.3666 14.5137 11.3666 13.7327 10.5855Z" })), CT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17016,7 +17016,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" })), TT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" })), wT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17024,7 +17024,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M3 17C5.20914 17 7 18.7909 7 21H3V17ZM3 10C9.07513 10 14 14.9249 14 21H12C12 16.0294 7.97056 12 3 12V10ZM3 3C12.9411 3 21 11.0589 21 21H19C19 12.1634 11.8366 5 3 5V3Z" })), ET = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M3 17C5.20914 17 7 18.7909 7 21H3V17ZM3 10C9.07513 10 14 14.9249 14 21H12C12 16.0294 7.97056 12 3 12V10ZM3 3C12.9411 3 21 11.0589 21 21H19C19 12.1634 11.8366 5 3 5V3Z" })), TT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17032,7 +17032,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" })), hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" })), gae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17040,7 +17040,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" })), gae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" })), _ae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17048,7 +17048,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M4 8H20V5H4V8ZM14 19V10H10V19H14ZM16 19H20V10H16V19ZM8 19V10H4V19H8ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3Z" })), _ae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M4 8H20V5H4V8ZM14 19V10H10V19H14ZM16 19H20V10H16V19ZM8 19V10H4V19H8ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3Z" })), vae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17056,7 +17056,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M9.40017 16H3C1.89543 16 1 15.1046 1 14V11.8957C1 11.6344 1.05118 11.3757 1.15064 11.1342L4.24501 3.61925C4.3993 3.24455 4.76447 3 5.16969 3H22C22.5523 3 23 3.44772 23 4V14C23 14.5523 22.5523 15 22 15H18.5182C18.1932 15 17.8886 15.1579 17.7012 15.4233L12.2478 23.149C12.1053 23.3508 11.8367 23.4184 11.6157 23.3078L9.80163 22.4008C8.74998 21.875 8.20687 20.6874 8.49694 19.548L9.40017 16ZM17 13.4125V5H5.83939L3 11.8957V14H9.40017C10.7049 14 11.6602 15.229 11.3384 16.4934L10.4351 20.0414C10.3771 20.2693 10.4857 20.5068 10.6961 20.612L11.3572 20.9425L16.0673 14.27C16.3172 13.9159 16.6366 13.6257 17 13.4125ZM19 13H21V5H19V13Z" })), vae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M9.40017 16H3C1.89543 16 1 15.1046 1 14V11.8957C1 11.6344 1.05118 11.3757 1.15064 11.1342L4.24501 3.61925C4.3993 3.24455 4.76447 3 5.16969 3H22C22.5523 3 23 3.44772 23 4V14C23 14.5523 22.5523 15 22 15H18.5182C18.1932 15 17.8886 15.1579 17.7012 15.4233L12.2478 23.149C12.1053 23.3508 11.8367 23.4184 11.6157 23.3078L9.80163 22.4008C8.74998 21.875 8.20687 20.6874 8.49694 19.548L9.40017 16ZM17 13.4125V5H5.83939L3 11.8957V14H9.40017C10.7049 14 11.6602 15.229 11.3384 16.4934L10.4351 20.0414C10.3771 20.2693 10.4857 20.5068 10.6961 20.612L11.3572 20.9425L16.0673 14.27C16.3172 13.9159 16.6366 13.6257 17 13.4125ZM19 13H21V5H19V13Z" })), yae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17064,7 +17064,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M14.5998 8.00033H21C22.1046 8.00033 23 8.89576 23 10.0003V12.1047C23 12.3659 22.9488 12.6246 22.8494 12.8662L19.755 20.3811C19.6007 20.7558 19.2355 21.0003 18.8303 21.0003H2C1.44772 21.0003 1 20.5526 1 20.0003V10.0003C1 9.44804 1.44772 9.00033 2 9.00033H5.48184C5.80677 9.00033 6.11143 8.84246 6.29881 8.57701L11.7522 0.851355C11.8947 0.649486 12.1633 0.581978 12.3843 0.692483L14.1984 1.59951C15.25 2.12534 15.7931 3.31292 15.5031 4.45235L14.5998 8.00033ZM7 10.5878V19.0003H18.1606L21 12.1047V10.0003H14.5998C13.2951 10.0003 12.3398 8.77128 12.6616 7.50691L13.5649 3.95894C13.6229 3.73105 13.5143 3.49353 13.3039 3.38837L12.6428 3.0578L7.93275 9.73038C7.68285 10.0844 7.36341 10.3746 7 10.5878ZM5 11.0003H3V19.0003H5V11.0003Z" })), DT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M14.5998 8.00033H21C22.1046 8.00033 23 8.89576 23 10.0003V12.1047C23 12.3659 22.9488 12.6246 22.8494 12.8662L19.755 20.3811C19.6007 20.7558 19.2355 21.0003 18.8303 21.0003H2C1.44772 21.0003 1 20.5526 1 20.0003V10.0003C1 9.44804 1.44772 9.00033 2 9.00033H5.48184C5.80677 9.00033 6.11143 8.84246 6.29881 8.57701L11.7522 0.851355C11.8947 0.649486 12.1633 0.581978 12.3843 0.692483L14.1984 1.59951C15.25 2.12534 15.7931 3.31292 15.5031 4.45235L14.5998 8.00033ZM7 10.5878V19.0003H18.1606L21 12.1047V10.0003H14.5998C13.2951 10.0003 12.3398 8.77128 12.6616 7.50691L13.5649 3.95894C13.6229 3.73105 13.5143 3.49353 13.3039 3.38837L12.6428 3.0578L7.93275 9.73038C7.68285 10.0844 7.36341 10.3746 7 10.5878ZM5 11.0003H3V19.0003H5V11.0003Z" })), ET = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17072,7 +17072,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), OT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), DT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17080,7 +17080,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" })), yae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" })), bae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17088,7 +17088,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z" })), bae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z" })), xae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17096,7 +17096,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M17 6C16.4477 6 16 5.55228 16 5C16 4.44772 16.4477 4 17 4C17.5523 4 18 4.44772 18 5C18 5.55228 17.5523 6 17 6ZM17 8C18.6569 8 20 6.65685 20 5C20 3.34315 18.6569 2 17 2C15.3431 2 14 3.34315 14 5C14 6.65685 15.3431 8 17 8ZM7 3C4.79086 3 3 4.79086 3 7V9H5V7C5 5.89543 5.89543 5 7 5H10V3H7ZM17 21C19.2091 21 21 19.2091 21 17V15H19V17C19 18.1046 18.1046 19 17 19H14V21H17ZM8 13C8 12.4477 7.55228 12 7 12C6.44772 12 6 12.4477 6 13C6 13.5523 6.44772 14 7 14C7.55228 14 8 13.5523 8 13ZM10 13C10 14.6569 8.65685 16 7 16C5.34315 16 4 14.6569 4 13C4 11.3431 5.34315 10 7 10C8.65685 10 10 11.3431 10 13ZM17 11C15.8954 11 15 11.8954 15 13H13C13 10.7909 14.7909 9 17 9C19.2091 9 21 10.7909 21 13H19C19 11.8954 18.1046 11 17 11ZM5 21C5 19.8954 5.89543 19 7 19C8.10457 19 9 19.8954 9 21H11C11 18.7909 9.20914 17 7 17C4.79086 17 3 18.7909 3 21H5Z" })), xae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M17 6C16.4477 6 16 5.55228 16 5C16 4.44772 16.4477 4 17 4C17.5523 4 18 4.44772 18 5C18 5.55228 17.5523 6 17 6ZM17 8C18.6569 8 20 6.65685 20 5C20 3.34315 18.6569 2 17 2C15.3431 2 14 3.34315 14 5C14 6.65685 15.3431 8 17 8ZM7 3C4.79086 3 3 4.79086 3 7V9H5V7C5 5.89543 5.89543 5 7 5H10V3H7ZM17 21C19.2091 21 21 19.2091 21 17V15H19V17C19 18.1046 18.1046 19 17 19H14V21H17ZM8 13C8 12.4477 7.55228 12 7 12C6.44772 12 6 12.4477 6 13C6 13.5523 6.44772 14 7 14C7.55228 14 8 13.5523 8 13ZM10 13C10 14.6569 8.65685 16 7 16C5.34315 16 4 14.6569 4 13C4 11.3431 5.34315 10 7 10C8.65685 10 10 11.3431 10 13ZM17 11C15.8954 11 15 11.8954 15 13H13C13 10.7909 14.7909 9 17 9C19.2091 9 21 10.7909 21 13H19C19 11.8954 18.1046 11 17 11ZM5 21C5 19.8954 5.89543 19 7 19C8.10457 19 9 19.8954 9 21H11C11 18.7909 9.20914 17 7 17C4.79086 17 3 18.7909 3 21H5Z" })), Sae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -17104,100 +17104,100 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z" })), Sae = (e, t) => {
+}, B.createElement("path", { d: "M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z" })), Cae = (e, t) => {
let n = Array(e.length + t.length);
for (let t = 0; t < e.length; t++) n[t] = e[t];
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
return n;
-}, Cae = (e, t) => ({
+}, wae = (e, t) => ({
classGroupId: e,
validator: t
-}), kT = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
+}), OT = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
nextPart: e,
validators: t,
classGroupId: n
-}), AT = "-", jT = [], wae = "arbitrary..", Tae = (e) => {
- let t = Dae(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
+}), kT = "-", AT = [], Tae = "arbitrary..", Eae = (e) => {
+ let t = Oae(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
return {
getClassGroupId: (e) => {
- if (e.startsWith("[") && e.endsWith("]")) return Eae(e);
- let n = e.split(AT);
- return MT(n, +(n[0] === "" && n.length > 1), t);
+ if (e.startsWith("[") && e.endsWith("]")) return Dae(e);
+ let n = e.split(kT);
+ return jT(n, +(n[0] === "" && n.length > 1), t);
},
getConflictingClassGroupIds: (e, t) => {
if (t) {
let t = r[e], i = n[e];
- return t ? i ? Sae(i, t) : t : i || jT;
+ return t ? i ? Cae(i, t) : t : i || AT;
}
- return n[e] || jT;
+ return n[e] || AT;
}
};
-}, MT = (e, t, n) => {
+}, jT = (e, t, n) => {
if (e.length - t === 0) return n.classGroupId;
let r = e[t], i = n.nextPart.get(r);
if (i) {
- let n = MT(e, t + 1, i);
+ let n = jT(e, t + 1, i);
if (n) return n;
}
let a = n.validators;
if (a === null) return;
- let o = t === 0 ? e.join(AT) : e.slice(t).join(AT), s = a.length;
+ let o = t === 0 ? e.join(kT) : e.slice(t).join(kT), s = a.length;
for (let e = 0; e < s; e++) {
let t = a[e];
if (t.validator(o)) return t.classGroupId;
}
-}, Eae = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
+}, Dae = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
- return r ? wae + r : void 0;
-})(), Dae = (e) => {
+ return r ? Tae + r : void 0;
+})(), Oae = (e) => {
let { theme: t, classGroups: n } = e;
- return Oae(n, t);
-}, Oae = (e, t) => {
- let n = kT();
+ return kae(n, t);
+}, kae = (e, t) => {
+ let n = OT();
for (let r in e) {
let i = e[r];
- NT(i, n, r, t);
+ MT(i, n, r, t);
}
return n;
-}, NT = (e, t, n, r) => {
+}, MT = (e, t, n, r) => {
let i = e.length;
for (let a = 0; a < i; a++) {
let i = e[a];
- kae(i, t, n, r);
+ Aae(i, t, n, r);
}
-}, kae = (e, t, n, r) => {
+}, Aae = (e, t, n, r) => {
if (typeof e == "string") {
- Aae(e, t, n);
+ jae(e, t, n);
return;
}
if (typeof e == "function") {
- jae(e, t, n, r);
+ Mae(e, t, n, r);
return;
}
- Mae(e, t, n, r);
-}, Aae = (e, t, n) => {
- let r = e === "" ? t : PT(t, e);
+ Nae(e, t, n, r);
+}, jae = (e, t, n) => {
+ let r = e === "" ? t : NT(t, e);
r.classGroupId = n;
-}, jae = (e, t, n, r) => {
- if (Nae(e)) {
- NT(e(r), t, n, r);
+}, Mae = (e, t, n, r) => {
+ if (Pae(e)) {
+ MT(e(r), t, n, r);
return;
}
- t.validators === null && (t.validators = []), t.validators.push(Cae(n, e));
-}, Mae = (e, t, n, r) => {
+ t.validators === null && (t.validators = []), t.validators.push(wae(n, e));
+}, Nae = (e, t, n, r) => {
let i = Object.entries(e), a = i.length;
for (let e = 0; e < a; e++) {
let [a, o] = i[e];
- NT(o, PT(t, a), n, r);
+ MT(o, NT(t, a), n, r);
}
-}, PT = (e, t) => {
- let n = e, r = t.split(AT), i = r.length;
+}, NT = (e, t) => {
+ let n = e, r = t.split(kT), i = r.length;
for (let e = 0; e < i; e++) {
let t = r[e], i = n.nextPart.get(t);
- i || (i = kT(), n.nextPart.set(t, i)), n = i;
+ i || (i = OT(), n.nextPart.set(t, i)), n = i;
}
return n;
-}, Nae = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Pae = (e) => {
+}, Pae = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Fae = (e) => {
if (e < 1) return {
get: () => void 0,
set: () => {}
@@ -17215,19 +17215,19 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
e in n ? n[e] = t : i(e, t);
}
};
-}, FT = "!", IT = ":", Fae = [], LT = (e, t, n, r, i) => ({
+}, PT = "!", FT = ":", Iae = [], IT = (e, t, n, r, i) => ({
modifiers: e,
hasImportantModifier: t,
baseClassName: n,
maybePostfixModifierPosition: r,
isExternal: i
-}), Iae = (e) => {
+}), Lae = (e) => {
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
for (let s = 0; s < o; s++) {
let o = e[s];
if (n === 0 && r === 0) {
- if (o === IT) {
+ if (o === FT) {
t.push(e.slice(i, s)), i = s + 1;
continue;
}
@@ -17239,13 +17239,13 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
}
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
- s.endsWith(FT) ? (c = s.slice(0, -1), l = !0) : s.startsWith(FT) && (c = s.slice(1), l = !0);
+ s.endsWith(PT) ? (c = s.slice(0, -1), l = !0) : s.startsWith(PT) && (c = s.slice(1), l = !0);
let u = a && a > i ? a - i : void 0;
- return LT(t, l, c, u);
+ return IT(t, l, c, u);
};
if (t) {
- let e = t + IT, n = r;
- r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : LT(Fae, !1, t, void 0, !0);
+ let e = t + FT, n = r;
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : IT(Iae, !1, t, void 0, !0);
}
if (n) {
let e = r;
@@ -17255,7 +17255,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
});
}
return r;
-}, Lae = (e) => {
+}, Rae = (e) => {
let t = /* @__PURE__ */ new Map();
return e.orderSensitiveModifiers.forEach((e, n) => {
t.set(e, 1e6 + n);
@@ -17267,18 +17267,18 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
}
return r.length > 0 && (r.sort(), n.push(...r)), n;
};
-}, Rae = (e) => ({
- cache: Pae(e.cacheSize),
- parseClassName: Iae(e),
- sortModifiers: Lae(e),
- postfixLookupClassGroupIds: zae(e),
- ...Tae(e)
-}), zae = (e) => {
+}, zae = (e) => ({
+ cache: Fae(e.cacheSize),
+ parseClassName: Lae(e),
+ sortModifiers: Rae(e),
+ postfixLookupClassGroupIds: Bae(e),
+ ...Eae(e)
+}), Bae = (e) => {
let t = Object.create(null), n = e.postfixLookupClassGroups;
if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
return t;
-}, Bae = /\s+/, Vae = (e, t) => {
- let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(Bae), l = "";
+}, Vae = /\s+/, Hae = (e, t) => {
+ let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(Vae), l = "";
for (let e = c.length - 1; e >= 0; --e) {
let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
if (u) {
@@ -17302,7 +17302,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
}
h = !1;
}
- let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + FT : _, y = v + g;
+ let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + PT : _, y = v + g;
if (s.indexOf(y) > -1) continue;
s.push(y);
let b = i(g, h);
@@ -17313,34 +17313,34 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
l = t + (l.length > 0 ? " " + l : l);
}
return l;
-}, Hae = (...e) => {
+}, Uae = (...e) => {
let t = 0, n, r, i = "";
- for (; t < e.length;) (n = e[t++]) && (r = RT(n)) && (i && (i += " "), i += r);
+ for (; t < e.length;) (n = e[t++]) && (r = LT(n)) && (i && (i += " "), i += r);
return i;
-}, RT = (e) => {
+}, LT = (e) => {
if (typeof e == "string") return e;
let t, n = "";
- for (let r = 0; r < e.length; r++) e[r] && (t = RT(e[r])) && (n && (n += " "), n += t);
+ for (let r = 0; r < e.length; r++) e[r] && (t = LT(e[r])) && (n && (n += " "), n += t);
return n;
-}, zT = (e, ...t) => {
- let n, r, i, a, o = (o) => (n = Rae(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
+}, RT = (e, ...t) => {
+ let n, r, i, a, o = (o) => (n = zae(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
let t = r(e);
if (t) return t;
- let a = Vae(e, n);
+ let a = Hae(e, n);
return i(e, a), a;
};
- return a = o, (...e) => a(Hae(...e));
-}, Uae = [], BT = (e) => {
- let t = (t) => t[e] || Uae;
+ return a = o, (...e) => a(Uae(...e));
+}, Wae = [], zT = (e) => {
+ let t = (t) => t[e] || Wae;
return t.isThemeGetter = !0, t.themeKey = e, t;
-}, VT = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, HT = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Wae = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Gae = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Kae = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, qae = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, Jae = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Yae = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, UT = (e) => Wae.test(e), WT = (e) => !!e && !Number.isNaN(Number(e)), GT = (e) => !!e && Number.isInteger(Number(e)), KT = (e) => e.endsWith("%") && WT(e.slice(0, -1)), qT = (e) => Gae.test(e), JT = () => !0, Xae = (e) => Kae.test(e) && !qae.test(e), YT = () => !1, Zae = (e) => Jae.test(e), Qae = (e) => Yae.test(e), $ae = (e) => !q(e) && !eE(e), eoe = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), toe = (e) => iE(e, cE, YT), q = (e) => VT.test(e), XT = (e) => iE(e, lE, Xae), ZT = (e) => iE(e, loe, WT), noe = (e) => iE(e, dE, JT), roe = (e) => iE(e, uE, YT), QT = (e) => iE(e, oE, YT), ioe = (e) => iE(e, sE, Qae), $T = (e) => iE(e, fE, Zae), eE = (e) => HT.test(e), tE = (e) => aE(e, lE), aoe = (e) => aE(e, uE), nE = (e) => aE(e, oE), ooe = (e) => aE(e, cE), soe = (e) => aE(e, sE), rE = (e) => aE(e, fE, !0), coe = (e) => aE(e, dE, !0), iE = (e, t, n) => {
- let r = VT.exec(e);
+}, BT = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, VT = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Gae = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Kae = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, qae = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Jae = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, Yae = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Xae = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, HT = (e) => Gae.test(e), UT = (e) => !!e && !Number.isNaN(Number(e)), WT = (e) => !!e && Number.isInteger(Number(e)), GT = (e) => e.endsWith("%") && UT(e.slice(0, -1)), KT = (e) => Kae.test(e), qT = () => !0, Zae = (e) => qae.test(e) && !Jae.test(e), JT = () => !1, Qae = (e) => Yae.test(e), $ae = (e) => Xae.test(e), eoe = (e) => !q(e) && !eE(e), toe = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), YT = (e) => iE(e, cE, JT), q = (e) => BT.test(e), XT = (e) => iE(e, lE, Zae), ZT = (e) => iE(e, loe, UT), noe = (e) => iE(e, dE, qT), roe = (e) => iE(e, uE, JT), QT = (e) => iE(e, oE, JT), ioe = (e) => iE(e, sE, $ae), $T = (e) => iE(e, fE, Qae), eE = (e) => VT.test(e), tE = (e) => aE(e, lE), aoe = (e) => aE(e, uE), nE = (e) => aE(e, oE), ooe = (e) => aE(e, cE), soe = (e) => aE(e, sE), rE = (e) => aE(e, fE, !0), coe = (e) => aE(e, dE, !0), iE = (e, t, n) => {
+ let r = BT.exec(e);
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
}, aE = (e, t, n = !1) => {
- let r = HT.exec(e);
+ let r = VT.exec(e);
return r ? r[1] ? t(r[1]) : n : !1;
}, oE = (e) => e === "position" || e === "percentage", sE = (e) => e === "image" || e === "url", cE = (e) => e === "length" || e === "size" || e === "bg-size", lE = (e) => e === "length", loe = (e) => e === "number", uE = (e) => e === "family-name", dE = (e) => e === "number" || e === "weight", fE = (e) => e === "shadow", pE = () => {
- let e = BT("color"), t = BT("font"), n = BT("text"), r = BT("font-weight"), i = BT("tracking"), a = BT("leading"), o = BT("breakpoint"), s = BT("container"), c = BT("spacing"), l = BT("radius"), u = BT("shadow"), d = BT("inset-shadow"), f = BT("text-shadow"), p = BT("drop-shadow"), m = BT("blur"), h = BT("perspective"), g = BT("aspect"), _ = BT("ease"), v = BT("animate"), y = () => [
+ let e = zT("color"), t = zT("font"), n = zT("text"), r = zT("font-weight"), i = zT("tracking"), a = zT("leading"), o = zT("breakpoint"), s = zT("container"), c = zT("spacing"), l = zT("radius"), u = zT("shadow"), d = zT("inset-shadow"), f = zT("text-shadow"), p = zT("drop-shadow"), m = zT("blur"), h = zT("perspective"), g = zT("aspect"), _ = zT("ease"), v = zT("animate"), y = () => [
"auto",
"avoid",
"all",
@@ -17382,12 +17382,12 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
q,
c
], T = () => [
- UT,
+ HT,
"full",
"auto",
...w()
], E = () => [
- GT,
+ WT,
"none",
"subgrid",
eE,
@@ -17396,15 +17396,15 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"auto",
{ span: [
"full",
- GT,
+ WT,
eE,
q
] },
- GT,
+ WT,
eE,
q
], O = () => [
- GT,
+ WT,
"auto",
eE,
q
@@ -17434,7 +17434,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"center-safe",
"end-safe"
], M = () => ["auto", ...w()], N = () => [
- UT,
+ HT,
"auto",
"full",
"dvw",
@@ -17449,7 +17449,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
...w()
], P = () => [
s,
- UT,
+ HT,
"screen",
"full",
"dvw",
@@ -17460,7 +17460,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"fit",
...w()
], ee = () => [
- UT,
+ HT,
"screen",
"full",
"lh",
@@ -17491,10 +17491,10 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"cover",
"contain",
ooe,
- toe,
+ YT,
{ size: [eE, q] }
], re = () => [
- KT,
+ GT,
tE,
XT
], ie = () => [
@@ -17506,7 +17506,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
q
], ae = () => [
"",
- WT,
+ UT,
tE,
XT
], oe = () => [
@@ -17532,8 +17532,8 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"color",
"luminosity"
], ce = () => [
- WT,
- KT,
+ UT,
+ GT,
nE,
QT
], le = () => [
@@ -17544,20 +17544,20 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
q
], ue = () => [
"none",
- WT,
+ UT,
eE,
q
], L = () => [
"none",
- WT,
+ UT,
eE,
q
], de = () => [
- WT,
+ UT,
eE,
q
], fe = () => [
- UT,
+ HT,
"full",
...w()
];
@@ -17571,17 +17571,17 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"bounce"
],
aspect: ["video"],
- blur: [qT],
- breakpoint: [qT],
- color: [JT],
- container: [qT],
- "drop-shadow": [qT],
+ blur: [KT],
+ breakpoint: [KT],
+ color: [qT],
+ container: [KT],
+ "drop-shadow": [KT],
ease: [
"in",
"out",
"in-out"
],
- font: [$ae],
+ font: [eoe],
"font-weight": [
"thin",
"extralight",
@@ -17593,7 +17593,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"extrabold",
"black"
],
- "inset-shadow": [qT],
+ "inset-shadow": [KT],
leading: [
"none",
"tight",
@@ -17610,11 +17610,11 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"distant",
"none"
],
- radius: [qT],
- shadow: [qT],
- spacing: ["px", WT],
- text: [qT],
- "text-shadow": [qT],
+ radius: [KT],
+ shadow: [KT],
+ spacing: ["px", UT],
+ text: [KT],
+ "text-shadow": [KT],
tracking: [
"tighter",
"tight",
@@ -17628,7 +17628,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
aspect: [{ aspect: [
"auto",
"square",
- UT,
+ HT,
q,
eE,
g
@@ -17641,9 +17641,9 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
eE,
q
] }],
- "container-named": [eoe],
+ "container-named": [toe],
columns: [{ columns: [
- WT,
+ UT,
"auto",
q,
eE,
@@ -17743,13 +17743,13 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"collapse"
],
z: [{ z: [
- GT,
+ WT,
"auto",
eE,
q
] }],
basis: [{ basis: [
- UT,
+ HT,
"full",
"auto",
s,
@@ -17767,8 +17767,8 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"wrap-reverse"
] }],
flex: [{ flex: [
- WT,
UT,
+ HT,
"auto",
"initial",
"none",
@@ -17776,18 +17776,18 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
grow: [{ grow: [
"",
- WT,
+ UT,
eE,
q
] }],
shrink: [{ shrink: [
"",
- WT,
+ UT,
eE,
q
] }],
order: [{ order: [
- GT,
+ WT,
"first",
"last",
"none",
@@ -17919,7 +17919,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"expanded",
"extra-expanded",
"ultra-expanded",
- KT,
+ GT,
q
] }],
"font-family": [{ font: [
@@ -17940,7 +17940,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
q
] }],
"line-clamp": [{ "line-clamp": [
- WT,
+ UT,
"none",
eE,
ZT
@@ -17981,7 +17981,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
],
"text-decoration-style": [{ decoration: [...oe(), "wavy"] }],
"text-decoration-thickness": [{ decoration: [
- WT,
+ UT,
"from-font",
"auto",
eE,
@@ -17989,7 +17989,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
"text-decoration-color": [{ decoration: F() }],
"underline-offset": [{ "underline-offset": [
- WT,
+ UT,
"auto",
eE,
q
@@ -18013,7 +18013,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
indent: [{ indent: w() }],
"tab-size": [{ tab: [
- GT,
+ WT,
eE,
q
] }],
@@ -18091,7 +18091,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"l",
"tl"
] },
- GT,
+ WT,
eE,
q
],
@@ -18102,7 +18102,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
],
conic: [
"",
- GT,
+ WT,
eE,
q
]
@@ -18175,13 +18175,13 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"hidden"
] }],
"outline-offset": [{ "outline-offset": [
- WT,
+ UT,
eE,
q
] }],
"outline-w": [{ outline: [
"",
- WT,
+ UT,
tE,
XT
] }],
@@ -18205,7 +18205,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"ring-w": [{ ring: ae() }],
"ring-w-inset": ["ring-inset"],
"ring-color": [{ ring: F() }],
- "ring-offset-w": [{ "ring-offset": [WT, XT] }],
+ "ring-offset-w": [{ "ring-offset": [UT, XT] }],
"ring-offset-color": [{ "ring-offset": F() }],
"inset-ring-w": [{ "inset-ring": ae() }],
"inset-ring-color": [{ "inset-ring": F() }],
@@ -18217,7 +18217,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
"text-shadow-color": [{ "text-shadow": F() }],
opacity: [{ opacity: [
- WT,
+ UT,
eE,
q
] }],
@@ -18241,7 +18241,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"intersect",
"exclude"
] }],
- "mask-image-linear-pos": [{ "mask-linear": [WT] }],
+ "mask-image-linear-pos": [{ "mask-linear": [UT] }],
"mask-image-linear-from-pos": [{ "mask-linear-from": ce() }],
"mask-image-linear-to-pos": [{ "mask-linear-to": ce() }],
"mask-image-linear-from-color": [{ "mask-linear-from": F() }],
@@ -18281,7 +18281,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
farthest: ["side", "corner"]
}] }],
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
- "mask-image-conic-pos": [{ "mask-conic": [WT] }],
+ "mask-image-conic-pos": [{ "mask-conic": [UT] }],
"mask-image-conic-from-pos": [{ "mask-conic-from": ce() }],
"mask-image-conic-to-pos": [{ "mask-conic-to": ce() }],
"mask-image-conic-from-color": [{ "mask-conic-from": F() }],
@@ -18316,12 +18316,12 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
blur: [{ blur: le() }],
brightness: [{ brightness: [
- WT,
+ UT,
eE,
q
] }],
contrast: [{ contrast: [
- WT,
+ UT,
eE,
q
] }],
@@ -18335,29 +18335,29 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"drop-shadow-color": [{ "drop-shadow": F() }],
grayscale: [{ grayscale: [
"",
- WT,
+ UT,
eE,
q
] }],
"hue-rotate": [{ "hue-rotate": [
- WT,
+ UT,
eE,
q
] }],
invert: [{ invert: [
"",
- WT,
+ UT,
eE,
q
] }],
saturate: [{ saturate: [
- WT,
+ UT,
eE,
q
] }],
sepia: [{ sepia: [
"",
- WT,
+ UT,
eE,
q
] }],
@@ -18369,45 +18369,45 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
"backdrop-blur": [{ "backdrop-blur": le() }],
"backdrop-brightness": [{ "backdrop-brightness": [
- WT,
+ UT,
eE,
q
] }],
"backdrop-contrast": [{ "backdrop-contrast": [
- WT,
+ UT,
eE,
q
] }],
"backdrop-grayscale": [{ "backdrop-grayscale": [
"",
- WT,
+ UT,
eE,
q
] }],
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
- WT,
+ UT,
eE,
q
] }],
"backdrop-invert": [{ "backdrop-invert": [
"",
- WT,
+ UT,
eE,
q
] }],
"backdrop-opacity": [{ "backdrop-opacity": [
- WT,
+ UT,
eE,
q
] }],
"backdrop-saturate": [{ "backdrop-saturate": [
- WT,
+ UT,
eE,
q
] }],
"backdrop-sepia": [{ "backdrop-sepia": [
"",
- WT,
+ UT,
eE,
q
] }],
@@ -18430,7 +18430,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
"transition-behavior": [{ transition: ["normal", "discrete"] }],
duration: [{ duration: [
- WT,
+ UT,
"initial",
eE,
q
@@ -18443,7 +18443,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
q
] }],
delay: [{ delay: [
- WT,
+ UT,
eE,
q
] }],
@@ -18488,7 +18488,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
"translate-z": [{ "translate-z": fe() }],
"translate-none": ["translate-none"],
zoom: [{ zoom: [
- GT,
+ WT,
eE,
q
] }],
@@ -18632,7 +18632,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
] }],
fill: [{ fill: ["none", ...F()] }],
"stroke-w": [{ stroke: [
- WT,
+ UT,
tE,
XT,
ZT
@@ -18902,7 +18902,7 @@ var Zie = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
}, _E = (e, t, n) => {
let r = t[n];
r !== void 0 && (e[n] = e[n] ? e[n].concat(r) : r);
-}, doe = (e, ...t) => typeof e == "function" ? zT(pE, e, ...t) : zT(() => uoe(pE(), e), ...t), foe = [
+}, doe = (e, ...t) => typeof e == "function" ? RT(pE, e, ...t) : RT(() => uoe(pE(), e), ...t), foe = [
"large-title",
"display-1",
"display-2",
@@ -19266,1838 +19266,1703 @@ function AE(e = "") {
};
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/utils.mjs
-var jE = Symbol("default");
-function ME({ values: e, children: t }) {
- for (let [n, r] of e) t = /*#__PURE__*/ B.createElement(n.Provider, { value: r }, t);
- return t;
+//#region src/react/boardui/components/application/settings/settings-rows.tsx
+function Coe({ className: e, children: t }) {
+ return /* @__PURE__ */ (0, V.jsx)("div", {
+ className: vE("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
+ children: t
+ });
}
-function NE(e) {
- let { className: t, style: n, children: r, defaultClassName: i, defaultChildren: a, defaultStyle: o, values: s, render: c } = e;
- return (0, B.useMemo)(() => {
- let e, l, u;
- return e = typeof t == "function" ? t({
- ...s,
- defaultClassName: i
- }) : t, l = typeof n == "function" ? n({
- ...s,
- defaultStyle: o || {}
- }) : n, u = typeof r == "function" ? r({
- ...s,
- defaultChildren: a
- }) : r ?? a, {
- className: e ?? i,
- style: l || o ? {
- ...o,
- ...l
- } : void 0,
- children: u ?? a,
- "data-rac": "",
- render: c ? (e) => c(e, s) : void 0
- };
- }, [
- t,
- n,
- r,
- i,
- a,
- o,
- s,
- c
- ]);
+function jE({ className: e, children: t }) {
+ return /* @__PURE__ */ (0, V.jsx)("p", {
+ className: vE("w-full px-3 text-body-2-medium text-text-secondary", e),
+ children: t
+ });
}
-function PE(e, t) {
- let n = (0, B.useContext)(e);
- if (t === null) return null;
- if (n && typeof n == "object" && "slots" in n && n.slots) {
- let e = t || jE;
- if (!n.slots[e]) {
- let e = new Intl.ListFormat().format(Object.keys(n.slots).map((e) => `"${e}"`)), r = t ? `Invalid slot "${t}".` : "A slot prop is required.";
- throw Error(`${r} Valid slot names are ${e}.`);
- }
- return n.slots[e];
+function ME({ label: e, description: t, children: n }) {
+ return /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: vE("flex min-h-[52px] w-full items-center justify-between gap-4 py-2.5 pr-2.5", "border-b border-separator-border last:border-b-0"),
+ children: [/* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex min-w-0 flex-col",
+ children: [/* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-body-regular text-text-primary",
+ children: e
+ }), t && /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-body-2-regular text-text-secondary",
+ children: t
+ })]
+ }), n]
+ });
+}
+//#endregion
+//#region src/react/boardui/components/base/buttons/link-button.tsx
+var NE = yE({
+ base: [
+ "inline-flex items-center justify-center gap-1 whitespace-nowrap",
+ "font-sans select-none cursor-pointer rounded-sm",
+ "underline-offset-3 hover:underline",
+ "transition-colors duration-150 ease",
+ "outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring",
+ "disabled:cursor-not-allowed disabled:no-underline aria-disabled:cursor-not-allowed aria-disabled:no-underline"
+ ].join(" "),
+ size: {
+ medium: "text-body-medium",
+ small: "text-body-medium",
+ xs: "text-caption-1-semibold"
+ },
+ icon: {
+ medium: "size-5 shrink-0",
+ small: "size-[18px] shrink-0",
+ xs: "size-3.5 shrink-0"
+ },
+ variant: {
+ primary: ["text-accent-600 active:text-accent-800", "disabled:text-text-tertiary aria-disabled:text-text-tertiary"].join(" "),
+ secondary: ["text-text-secondary active:text-text-primary", "disabled:text-text-tertiary aria-disabled:text-text-tertiary"].join(" ")
}
- return n;
+});
+function PE({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
+ let c = vE(NE.base, NE.size[t], NE.variant[e], a), l = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+ n ? /* @__PURE__ */ (0, V.jsx)(n, {
+ className: NE.icon[t],
+ "aria-hidden": !0
+ }) : null,
+ i != null && /* @__PURE__ */ (0, V.jsx)("span", { children: i }),
+ r ? /* @__PURE__ */ (0, V.jsx)(r, {
+ className: NE.icon[t],
+ "aria-hidden": !0
+ }) : null
+ ] });
+ if (s.href !== void 0) {
+ let { ref: e, href: t, ...n } = s;
+ return /* @__PURE__ */ (0, V.jsx)("a", {
+ ref: e,
+ href: o ? void 0 : t,
+ "aria-disabled": o || void 0,
+ className: c,
+ ...n,
+ children: l
+ });
+ }
+ let { ref: u, type: d = "button", ...f } = s;
+ return /* @__PURE__ */ (0, V.jsx)("button", {
+ ref: u,
+ type: d,
+ disabled: o,
+ className: c,
+ ...f,
+ children: l
+ });
}
-function FE(e, t, n) {
- let { ref: r, ...i } = PE(n, e.slot) || {}, a = Nh((0, B.useMemo)(() => mh(t, r), [t, r])), o = U(i, e);
- return "style" in i && i.style && "style" in e && e.style && (o.style = typeof i.style == "function" || typeof e.style == "function" ? (t) => {
- let n = typeof i.style == "function" ? i.style(t) : i.style, r = {
- ...t.defaultStyle,
- ...n
- }, a = typeof e.style == "function" ? e.style({
- ...t,
- defaultStyle: r
- }) : e.style;
- return {
- ...r,
- ...a
- };
- } : {
- ...i.style,
- ...e.style
- }), [o, a];
+//#endregion
+//#region src/react/settings/section.tsx
+function FE({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
+ let a = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [n ? /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex w-full flex-wrap items-center justify-between gap-2",
+ children: [/* @__PURE__ */ (0, V.jsx)("div", {
+ className: "min-w-0 flex-1",
+ children: /* @__PURE__ */ (0, V.jsx)(jE, { children: e })
+ }), n]
+ }) : /* @__PURE__ */ (0, V.jsx)(jE, { children: e }), /* @__PURE__ */ (0, V.jsx)(Coe, { children: i })] });
+ return r ? /* @__PURE__ */ (0, V.jsx)("form", {
+ id: t,
+ "aria-label": e,
+ noValidate: !0,
+ onSubmit: r,
+ className: "flex w-full flex-col gap-2",
+ children: a
+ }) : /* @__PURE__ */ (0, V.jsx)("section", {
+ id: t,
+ "aria-label": e,
+ className: "flex w-full flex-col gap-2",
+ children: a
+ });
}
-function IE(e = !0) {
- let [t, n] = (0, B.useState)(e), r = (0, B.useRef)(!1), i = (0, B.useCallback)((e) => {
- r.current = !0, n(!!e);
- }, []);
- return Hp(() => {
- r.current || n(!1);
- }, []), [i, t];
+function IE({ children: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex flex-col",
+ children: e
+ });
}
-function LE(e) {
- let t = /^(data-.*)$/, n = {};
- for (let r in e) t.test(r) || (n[r] = e[r]);
- return n;
+function LE({ divided: e = !1, children: t }) {
+ return e ? /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex flex-col gap-4 border-t border-separator-border py-4 pr-3",
+ children: t
+ }) : /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex flex-col gap-4 py-4 pr-3",
+ children: t
+ });
}
-function Coe(e, t, n) {
- let { render: r, ...i } = t, a = (0, B.useRef)(null), o = (0, B.useMemo)(() => mh(n, a), [n, a]);
- Hp(() => {}, [e, r]);
- let s = {
- ...i,
- ref: o
- };
- return r ? r(s, void 0) : /*#__PURE__*/ B.createElement(e, s);
+function RE({ status: e, children: t }) {
+ return /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "-ml-3 flex flex-wrap items-center justify-end gap-3 rounded-b-2xl border-t border-separator-border bg-card-footer px-3 py-3",
+ children: [e ? /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "mr-auto min-w-0 text-body-2-regular text-text-secondary",
+ children: e
+ }) : null, t]
+ });
}
-var RE = {}, zE = new Proxy({}, { get(e, t) {
- if (typeof t != "string") return;
- let n = RE[t];
- return n || (n = /*#__PURE__*/ (0, B.forwardRef)(Coe.bind(null, t)), RE[t] = n), n;
-} }), BE = /*#__PURE__*/ (0, B.createContext)(null), VE = /*#__PURE__*/ (0, B.createContext)(null), HE = /*#__PURE__*/ (0, B.createContext)(null), UE = {
- CollectionRoot({ collection: e, renderDropIndicator: t }) {
- return WE(e, null, t);
- },
- CollectionBranch({ collection: e, parent: t, renderDropIndicator: n }) {
- return WE(e, t, n);
- }
-};
-function WE(e, t, n) {
- return dp({
- items: t ? e.getChildren(t.key) : e,
- dependencies: [n],
- children(t) {
- if (t.type === "content") return /*#__PURE__*/ B.createElement(B.Fragment, null);
- let r = t.render(t);
- return !n || t.type !== "item" ? r : /*#__PURE__*/ B.createElement(B.Fragment, null, n({
- type: "item",
- key: t.key,
- dropPosition: "before"
- }), r, woe(e, t, n));
- }
+function zE({ role: e, children: t }) {
+ return /* @__PURE__ */ (0, V.jsx)("p", {
+ role: e,
+ className: "text-body-2-regular text-text-secondary",
+ children: t
});
}
-function woe(e, t, n) {
- let r = t.key, i = e.getKeyAfter(r), a = i == null ? null : e.getItem(i);
- for (; a != null && a.type !== "item";) i = e.getKeyAfter(a.key), a = i == null ? null : e.getItem(i);
- let o = t.nextKey == null ? null : e.getItem(t.nextKey);
- for (; o != null && o.type !== "item";) o = o.nextKey == null ? null : e.getItem(o.nextKey);
- let s = [];
- if (o == null) {
- let r = t;
- for (; r?.type === "item" && (!a || r.parentKey !== a.parentKey && a.level < r.level);) {
- let t = n({
- type: "item",
- key: r.key,
- dropPosition: "after"
- });
- /*#__PURE__*/ (0, B.isValidElement)(t) && s.push(/*#__PURE__*/ (0, B.cloneElement)(t, { key: `${r.key}-after` })), r = r.parentKey == null ? null : e.getItem(r.parentKey);
- }
- }
- return s;
+function BE({ children: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("p", {
+ role: "alert",
+ className: "text-body-2-regular text-text-error-primary",
+ children: e
+ });
}
-var GE = /*#__PURE__*/ (0, B.createContext)(UE);
-function KE(e) {
- return (0, B.useMemo)(() => e == null ? null : /* @__PURE__ */ new Set([e]), [e]);
+function VE({ children: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-body-medium text-text-primary",
+ children: e
+ });
}
-//#endregion
-//#region node_modules/react-aria-components/dist/private/Label.mjs
-var qE = /*#__PURE__*/ (0, B.createContext)({}), Toe = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, qE);
- let { elementType: n = "label", ...r } = e, i = zE[n];
- return /*#__PURE__*/ B.createElement(i, {
- className: "react-aria-Label",
- ...r,
- ref: t
+function HE({ href: e, children: t, leadingIcon: n }) {
+ return /* @__PURE__ */ (0, V.jsx)(PE, {
+ href: e,
+ target: "_blank",
+ rel: "noopener noreferrer",
+ size: "small",
+ leadingIcon: n,
+ trailingIcon: _T,
+ className: "min-w-0 max-w-full",
+ children: /* @__PURE__ */ (0, V.jsx)("span", {
+ className: "min-w-0 whitespace-normal break-all",
+ children: t
+ })
});
-}), Eoe = /*#__PURE__*/ (0, B.createContext)(null), JE = /*#__PURE__*/ (0, B.createContext)({}), YE = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, JE);
- let n = e, { isPending: r } = n, { buttonProps: i, isPressed: a } = Aee(e, t);
- i = Ooe(i, r);
- let { focusProps: o, isFocused: s, isFocusVisible: c } = ry(e), { hoverProps: l, isHovered: u } = sy({
- ...e,
- isDisabled: e.isDisabled || r
- }), d = {
- isHovered: u,
- isPressed: (n.isPressed || a) && !r,
- isFocused: s,
- isFocusVisible: c,
- isDisabled: e.isDisabled || !1,
- isPending: r ?? !1
- }, f = NE({
- ...e,
- values: d,
- defaultClassName: "react-aria-Button"
- }), p = dh(i.id), m = dh(), h = i["aria-labelledby"];
- r && (h ? h = `${h} ${m}` : i["aria-label"] && (h = `${p} ${m}`));
- let g = (0, B.useRef)(r);
- (0, B.useEffect)(() => {
- let e = { "aria-labelledby": h || p };
- (!g.current && s && r || g.current && s && !r) && f_(e, "assertive"), g.current = r;
- }, [
- r,
- s,
- h,
- p
- ]);
- let _ = Eg(e, { global: !0 });
- return delete _.onClick, /*#__PURE__*/ B.createElement(zE.button, {
- ...U(_, f, i, o, l),
- type: i.type === "submit" && r ? "button" : i.type,
- id: p,
- ref: t,
- "aria-labelledby": h,
- slot: e.slot || void 0,
- "aria-disabled": r ? "true" : i["aria-disabled"],
- "data-disabled": e.isDisabled || void 0,
- "data-pressed": d.isPressed || void 0,
- "data-hovered": u || void 0,
- "data-focused": s || void 0,
- "data-pending": r || void 0,
- "data-focus-visible": c || void 0
- }, /*#__PURE__*/ B.createElement(Eoe.Provider, { value: { id: m } }, f.children));
-}), Doe = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
-function Ooe(e, t) {
- if (t) {
- for (let t in e) t.startsWith("on") && !Doe.test(t) && (e[t] = void 0);
- e.href = void 0, e.target = void 0;
- }
- return e;
}
-//#endregion
-//#region node_modules/react-aria-components/dist/private/Heading.mjs
-var XE = /*#__PURE__*/ (0, B.createContext)({}), ZE = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, XE);
- let { children: n, level: r = 3, className: i, ...a } = e, o = zE[`h${r}`];
- return /*#__PURE__*/ B.createElement(o, {
- ...a,
- ref: t,
- className: i ?? "react-aria-Heading"
- }, n);
-}), QE = /*#__PURE__*/ (0, B.createContext)({}), koe = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, QE);
- let { elementType: n = "span", ...r } = e, i = zE[n];
- return /*#__PURE__*/ B.createElement(i, {
- className: "react-aria-Text",
- ...r,
- ref: t
+function UE({ children: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("dl", {
+ className: "flex flex-col",
+ children: e
});
-}), $E = /*#__PURE__*/ (0, B.createContext)(null), eD = /*#__PURE__*/ (0, B.createContext)(null), tD = /*#__PURE__*/ (0, B.createContext)(null), nD = /*#__PURE__*/ (0, B.createContext)(null), Aoe = /*#__PURE__*/ (0, B.createContext)(null), rD = /*#__PURE__*/ (0, B.createContext)(null);
-function joe(e, t) {
- let { validationBehavior: n } = PE(eD) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, B.useContext)(Aoe), a = Nh((0, B.useMemo)(() => mh(t, e.inputRef === void 0 ? null : e.inputRef), [t, e.inputRef])), o = {
- ...LE(e),
- children: typeof e.children == "function" || e.children,
- value: e.value,
- validationBehavior: r
- };
- return [i ? $ee(o, i, a) : N_(o, R_(e), a), a];
}
-var Moe = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { inputRef: n = null, ...r } = e;
- [e, t] = FE(r, t, tD);
- let [i, a] = joe(e, n);
- return /*#__PURE__*/ B.createElement(rD.Provider, { value: {
- ...i,
- inputRef: a,
- defaultClassName: "react-aria-Checkbox",
- isIndeterminate: e.isIndeterminate,
- isRequired: e.isRequired
- } }, /*#__PURE__*/ B.createElement(Noe, {
- ...e,
- ref: t
- }));
-}), Noe = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isIndeterminate: d, isRequired: f } = (0, B.useContext)(rD), { isFocused: p, isFocusVisible: m, focusProps: h } = ry(), g = a || o, { hoverProps: _, isHovered: v } = sy({
- ...e,
- isDisabled: g
- }), y = NE({
- ...e,
- defaultClassName: u,
- values: {
- isSelected: i,
- isIndeterminate: d || !1,
- isPressed: s,
- isHovered: v,
- isFocused: p,
- isFocusVisible: m,
- isDisabled: a,
- isReadOnly: o,
- isInvalid: c,
- isRequired: f || !1
- }
- }), b = Eg(e, { global: !0 });
- return delete b.id, delete b.onClick, /*#__PURE__*/ B.createElement(zE.label, {
- ...U(b, n, _, y),
- ref: t,
- slot: e.slot || void 0,
- "data-selected": i || void 0,
- "data-indeterminate": d || void 0,
- "data-pressed": s || void 0,
- "data-hovered": v || void 0,
- "data-focused": p || void 0,
- "data-focus-visible": m || void 0,
- "data-disabled": a || void 0,
- "data-readonly": o || void 0,
- "data-invalid": c || void 0,
- "data-required": f || void 0
- }, /*#__PURE__*/ B.createElement(H_, { elementType: "span" }, /*#__PURE__*/ B.createElement("input", {
- ...U(r, h),
- ref: l
- })), y.children);
-}), iD = /*#__PURE__*/ (0, B.createContext)({}), Poe = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, iD);
- let { isDisabled: n, isInvalid: r, isReadOnly: i, onHoverStart: a, onHoverChange: o, onHoverEnd: s, ...c } = e;
- n ??= !!e["aria-disabled"] && e["aria-disabled"] !== "false", r ??= !!e["aria-invalid"] && e["aria-invalid"] !== "false";
- let { hoverProps: l, isHovered: u } = sy({
- onHoverStart: a,
- onHoverChange: o,
- onHoverEnd: s,
- isDisabled: n
- }), { isFocused: d, isFocusVisible: f, focusProps: p } = ry({ within: !0 }), m = NE({
- ...e,
- values: {
- isHovered: u,
- isFocusWithin: d,
- isFocusVisible: f,
- isDisabled: n,
- isInvalid: r
- },
- defaultClassName: "react-aria-Group"
+function WE({ term: e, children: t }) {
+ return /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex min-h-11 items-center justify-between gap-4 border-b border-separator-border py-2.5 pr-3 last:border-b-0",
+ children: [/* @__PURE__ */ (0, V.jsx)("dt", {
+ className: "flex shrink-0 items-center gap-2 text-body-regular text-text-secondary",
+ children: e
+ }), /* @__PURE__ */ (0, V.jsx)("dd", {
+ className: "flex min-w-0 flex-wrap items-center justify-end gap-2 text-right text-body-regular break-all text-text-primary",
+ children: t
+ })]
});
- return /*#__PURE__*/ B.createElement(zE.div, {
- ...U(c, p, l),
- ...m,
- ref: t,
- role: e.role ?? "group",
- slot: e.slot ?? void 0,
- "data-focus-within": d || void 0,
- "data-hovered": u || void 0,
- "data-focus-visible": f || void 0,
- "data-disabled": n || void 0,
- "data-invalid": r || void 0,
- "data-readonly": i || void 0
- }, m.children);
-}), aD = /*#__PURE__*/ (0, B.createContext)({}), Foe = (e) => {
- let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, ...i } = e;
- return i;
-}, Ioe = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, aD);
- let { hoverProps: n, isHovered: r } = sy({
- ...e,
- isDisabled: e.disabled
- }), { isFocused: i, isFocusVisible: a, focusProps: o } = ry({
- isTextInput: !0,
- autoFocus: e.autoFocus
- }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = NE({
- ...e,
- values: {
- isHovered: r,
- isFocused: i,
- isFocusVisible: a,
- isDisabled: e.disabled || !1,
- isInvalid: s
+}
+function GE({ summary: e, defaultOpen: t = !1, children: n }) {
+ let r = (0, B.useId)(), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(!1), [s, c] = (0, B.useState)(t);
+ return /* @__PURE__ */ (0, V.jsxs)("details", {
+ ref: (e) => {
+ i.current = e, e && t && !o.current && (o.current = !0, e.open = !0);
},
- defaultClassName: "react-aria-Input"
+ children: [/* @__PURE__ */ (0, V.jsxs)("summary", {
+ "aria-expanded": s,
+ "aria-controls": r,
+ onClick: (e) => {
+ e.preventDefault(), !(!i.current || !a.current) && (We(i.current, a.current, !s), c(!s));
+ },
+ className: "flex w-fit cursor-pointer list-none items-center gap-1 rounded-sm text-body-2-medium text-text-secondary outline-none select-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
+ children: [/* @__PURE__ */ (0, V.jsx)(uT, {
+ "aria-hidden": !0,
+ className: s ? "size-4 shrink-0 rotate-90 transition-transform" : "size-4 shrink-0 transition-transform"
+ }), e]
+ }), /* @__PURE__ */ (0, V.jsx)("div", {
+ ref: a,
+ id: r,
+ inert: !s,
+ children: /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex flex-col gap-2 pt-3",
+ children: n
+ })
+ })]
});
- return /*#__PURE__*/ B.createElement(zE.input, {
- ...U(Foe(e), o, n),
- ...c,
- ref: t,
- "data-focused": i || void 0,
- "data-disabled": e.disabled || void 0,
- "data-hovered": r || void 0,
- "data-focus-visible": a || void 0,
- "data-invalid": s || void 0
+}
+function woe({ name: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("svg", {
+ "aria-hidden": !0,
+ viewBox: "0 0 24 24",
+ fill: "none",
+ className: "size-4 shrink-0 stroke-current stroke-2",
+ children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
-}), oD = {};
-oD = {
- colorSwatchPicker: "تغييرات الألوان",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "حدد عنصرًا",
- tableResizer: "أداة تغيير الحجم"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/bg-BG.mjs
-var sD = {};
-sD = {
- colorSwatchPicker: "Цветови мостри",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Изберете предмет",
- tableResizer: "Преоразмерител"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/cs-CZ.mjs
-var cD = {};
-cD = {
- colorSwatchPicker: "Vzorky barev",
- dropzoneLabel: "Místo pro přetažení",
- selectPlaceholder: "Vyberte položku",
- tableResizer: "Změna velikosti"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/da-DK.mjs
-var lD = {};
-lD = {
- colorSwatchPicker: "Farveprøver",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Vælg et element",
- tableResizer: "Størrelsesændring"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/de-DE.mjs
-var uD = {};
-uD = {
- colorSwatchPicker: "Farbfelder",
- dropzoneLabel: "Ablegebereich",
- selectPlaceholder: "Element wählen",
- tableResizer: "Größenanpassung"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/el-GR.mjs
-var dD = {};
-dD = {
- colorSwatchPicker: "Χρωματικά δείγματα",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Επιλέξτε ένα αντικείμενο",
- tableResizer: "Αλλαγή μεγέθους"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/en-US.mjs
-var fD = {};
-fD = {
- selectPlaceholder: "Select an item",
- tableResizer: "Resizer",
- dropzoneLabel: "DropZone",
- colorSwatchPicker: "Color swatches"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/es-ES.mjs
-var pD = {};
-pD = {
- colorSwatchPicker: "Muestras de colores",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Seleccionar un artículo",
- tableResizer: "Cambiador de tamaño"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/et-EE.mjs
-var mD = {};
-mD = {
- colorSwatchPicker: "Värvinäidised",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Valige üksus",
- tableResizer: "Suuruse muutja"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/fi-FI.mjs
-var hD = {};
-hD = {
- colorSwatchPicker: "Värimallit",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Valitse kohde",
- tableResizer: "Koon muuttaja"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/fr-FR.mjs
-var gD = {};
-gD = {
- colorSwatchPicker: "Échantillons de couleurs",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Sélectionner un élément",
- tableResizer: "Redimensionneur"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/he-IL.mjs
-var _D = {};
-_D = {
- colorSwatchPicker: "דוגמיות צבע",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "בחר פריט",
- tableResizer: "שינוי גודל"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/hr-HR.mjs
-var vD = {};
-vD = {
- colorSwatchPicker: "Uzorci boja",
- dropzoneLabel: "Zona spuštanja",
- selectPlaceholder: "Odaberite stavku",
- tableResizer: "Promjena veličine"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/hu-HU.mjs
-var yD = {};
-yD = {
- colorSwatchPicker: "Színtárak",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Válasszon ki egy elemet",
- tableResizer: "Átméretező"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/it-IT.mjs
-var bD = {};
-bD = {
- colorSwatchPicker: "Campioni di colore",
- dropzoneLabel: "Zona di rilascio",
- selectPlaceholder: "Seleziona un elemento",
- tableResizer: "Ridimensionamento"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/ja-JP.mjs
-var xD = {};
-xD = {
- colorSwatchPicker: "カラースウォッチ",
- dropzoneLabel: "ドロップゾーン",
- selectPlaceholder: "項目を選択",
- tableResizer: "サイズ変更ツール"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/ko-KR.mjs
-var SD = {};
-SD = {
- colorSwatchPicker: "색상 견본",
- dropzoneLabel: "드롭 영역",
- selectPlaceholder: "항목 선택",
- tableResizer: "크기 조정기"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/lt-LT.mjs
-var CD = {};
-CD = {
- colorSwatchPicker: "Spalvų pavyzdžiai",
- dropzoneLabel: "„DropZone“",
- selectPlaceholder: "Pasirinkite elementą",
- tableResizer: "Dydžio keitiklis"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/lv-LV.mjs
-var wD = {};
-wD = {
- colorSwatchPicker: "Krāsu paraugi",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Izvēlēties vienumu",
- tableResizer: "Izmēra mainītājs"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/nb-NO.mjs
-var TD = {};
-TD = {
- colorSwatchPicker: "Fargekart",
- dropzoneLabel: "Droppsone",
- selectPlaceholder: "Velg et element",
- tableResizer: "Størrelsesendrer"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/nl-NL.mjs
-var ED = {};
-ED = {
- colorSwatchPicker: "kleurstalen",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Selecteer een item",
- tableResizer: "Resizer"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/pl-PL.mjs
-var DD = {};
-DD = {
- colorSwatchPicker: "Próbki kolorów",
- dropzoneLabel: "Strefa upuszczania",
- selectPlaceholder: "Wybierz element",
- tableResizer: "Zmiana rozmiaru"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/pt-BR.mjs
-var OD = {};
-OD = {
- colorSwatchPicker: "Amostras de cores",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Selecione um item",
- tableResizer: "Redimensionador"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/pt-PT.mjs
-var kD = {};
-kD = {
- colorSwatchPicker: "Amostras de cores",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Selecione um item",
- tableResizer: "Redimensionador"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/ro-RO.mjs
-var AD = {};
-AD = {
- colorSwatchPicker: "Specimene de culoare",
- dropzoneLabel: "Zonă de plasare",
- selectPlaceholder: "Selectați un element",
- tableResizer: "Instrument de redimensionare"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/ru-RU.mjs
-var jD = {};
-jD = {
- colorSwatchPicker: "Цветовые образцы",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Выберите элемент",
- tableResizer: "Средство изменения размера"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/sk-SK.mjs
-var MD = {};
-MD = {
- colorSwatchPicker: "Vzorkovníky farieb",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Vyberte položku",
- tableResizer: "Nástroj na zmenu veľkosti"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/sl-SI.mjs
-var ND = {};
-ND = {
- colorSwatchPicker: "Barvne palete",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Izberite element",
- tableResizer: "Spreminjanje velikosti"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/sr-SP.mjs
-var PD = {};
-PD = {
- colorSwatchPicker: "Uzorci boje",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Izaberite stavku",
- tableResizer: "Promena veličine"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/sv-SE.mjs
-var FD = {};
-FD = {
- colorSwatchPicker: "Färgrutor",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Välj en artikel",
- tableResizer: "Storleksändrare"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/tr-TR.mjs
-var ID = {};
-ID = {
- colorSwatchPicker: "Renk örnekleri",
- dropzoneLabel: "Bırakma Bölgesi",
- selectPlaceholder: "Bir öğe seçin",
- tableResizer: "Yeniden boyutlandırıcı"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/uk-UA.mjs
-var LD = {};
-LD = {
- colorSwatchPicker: "Зразки кольорів",
- dropzoneLabel: "DropZone",
- selectPlaceholder: "Виберіть елемент",
- tableResizer: "Засіб змінення розміру"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/zh-CN.mjs
-var RD = {};
-RD = {
- colorSwatchPicker: "颜色色板",
- dropzoneLabel: "放置区域",
- selectPlaceholder: "选择一个项目",
- tableResizer: "尺寸调整器"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intl/zh-TW.mjs
-var zD = {};
-zD = {
- colorSwatchPicker: "色票",
- dropzoneLabel: "放置區",
- selectPlaceholder: "選取項目",
- tableResizer: "大小調整器"
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/intlStrings.mjs
-var BD = {};
-BD = {
- "ar-AE": oD,
- "bg-BG": sD,
- "cs-CZ": cD,
- "da-DK": lD,
- "de-DE": uD,
- "el-GR": dD,
- "en-US": fD,
- "es-ES": pD,
- "et-EE": mD,
- "fi-FI": hD,
- "fr-FR": gD,
- "he-IL": _D,
- "hr-HR": vD,
- "hu-HU": yD,
- "it-IT": bD,
- "ja-JP": xD,
- "ko-KR": SD,
- "lt-LT": CD,
- "lv-LV": wD,
- "nb-NO": TD,
- "nl-NL": ED,
- "pl-PL": DD,
- "pt-BR": OD,
- "pt-PT": kD,
- "ro-RO": AD,
- "ru-RU": jD,
- "sk-SK": MD,
- "sl-SI": ND,
- "sr-SP": PD,
- "sv-SE": FD,
- "tr-TR": ID,
- "uk-UA": LD,
- "zh-CN": RD,
- "zh-TW": zD
-};
-//#endregion
-//#region node_modules/react-aria-components/dist/private/DragAndDrop.mjs
-var VD = /*#__PURE__*/ (0, B.createContext)({}), HD = /*#__PURE__*/ (0, B.createContext)(null), Loe = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { render: n } = (0, B.useContext)(HD);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, n(e, t));
-});
-function UD(e, t) {
- let n = e?.renderDropIndicator, r = e?.isVirtualDragging?.(), i = (0, B.useCallback)((e) => {
- if (r || t?.isDropTarget(e)) return n ? n(e) : /*#__PURE__*/ B.createElement(Loe, { target: e });
- }, [
- t?.target,
- r,
- n
- ]);
- return e?.useDropIndicator ? i : void 0;
}
-function WD(e, t, n) {
- let r = e.focusedKey, i = null;
- if (t?.isVirtualDragging?.() && n?.target?.type === "item" && (i = n.target.key, n.target.dropPosition === "after")) {
- let e = n.collection.getKeyAfter(i), t = null;
- if (e != null) {
- let r = n.collection.getItem(i)?.level ?? 0;
- for (; e != null;) {
- let i = n.collection.getItem(e);
- if (!i) break;
- if (i.type !== "item") {
- e = n.collection.getKeyAfter(e);
- continue;
- }
- if ((i.level ?? 0) <= r) break;
- t = e, e = n.collection.getKeyAfter(e);
- }
- }
- i = e ?? t ?? i;
- }
- return (0, B.useMemo)(() => new Set([r, i].filter((e) => e != null)), [r, i]);
+function KE({ mark: e }) {
+ return e.startsWith("data:image/png;base64,") ? /* @__PURE__ */ (0, V.jsx)("img", {
+ src: e,
+ alt: "",
+ width: 16,
+ height: 16,
+ className: "size-4 shrink-0"
+ }) : /* @__PURE__ */ (0, V.jsx)(woe, { name: e });
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/Header.mjs
-var GD = /*#__PURE__*/ (0, B.createContext)({}), Roe = /*#__PURE__*/ (0, B.createContext)(null);
-function KD(e) {
- let t = (0, B.useRef)({});
- return /*#__PURE__*/ B.createElement(Roe.Provider, { value: t }, e.children);
+//#region src/react/activity/tasks.ts
+var qE = "/api/tasks", JE = ["tasks"], Toe = (e, t) => G(`${qE}?${new URLSearchParams({
+ before_finished_at: e.finished_at || "",
+ before_id: String(e.id)
+})}`, t);
+function YE(...e) {
+ let t = /* @__PURE__ */ new Map();
+ for (let n of e) for (let e of n) t.has(e.id) || t.set(e.id, e);
+ return [...t.values()].sort((e, t) => {
+ let n = e.finished_at || "", r = t.finished_at || "";
+ return n === r ? t.id - e.id : n < r ? 1 : -1;
+ });
}
-//#endregion
-//#region node_modules/react-aria-components/dist/private/SelectionIndicator.mjs
-var qD = /*#__PURE__*/ (0, B.createContext)({ isSelected: !1 }), JD = /*#__PURE__*/ (0, B.createContext)({}), zoe = /*#__PURE__*/ tg(class extends tp {
- static {
- this.type = "separator";
+var Eoe = 2e3, Doe = 1e4, Ooe = (e) => e?.running.length ? Eoe : Doe, XE = (e) => G(qE, e);
+async function koe(e) {
+ await z.fetchQuery({
+ queryKey: JE,
+ queryFn: () => XE(e)
+ });
+}
+var ZE = {
+ manual: "手动",
+ scheduled: "定时",
+ startup: "启动",
+ cli: "命令行"
+}, Aoe = {
+ pending: "排队中",
+ running: "进行中",
+ succeeded: "已完成",
+ failed: "失败",
+ cancelled: "已取消",
+ interrupted: "被打断"
+}, joe = (e) => Aoe[e] || e, Moe = {
+ checked: "已检查",
+ total: "总数",
+ scanned: "已扫描",
+ identified: "已识别",
+ candidates: "资料候选",
+ covers: "封面",
+ changed: "已改动",
+ operation: "操作",
+ ok: "取得",
+ miss: "未取得",
+ kept: "保留",
+ planned: "计划",
+ done: "已处理",
+ added: "新增",
+ written: "已写入",
+ removed: "已移除",
+ exit_code: "退出码",
+ issue_count: "问题",
+ followups: "派出后继",
+ followups_duplicate: "已在排队",
+ followups_truncated: "超上限未派",
+ followups_depth_exceeded: "超深度未派",
+ outcome: "结果",
+ name: "实体",
+ matched: "图库命中",
+ size: "尺寸",
+ source: "来源",
+ cover_network: "封面连不上图片主机"
+};
+function Noe(e) {
+ let t = /* @__PURE__ */ new Map();
+ for (let n of e) {
+ if (!n.followup_key || n.parent_run_id == null) continue;
+ let e = t.get(n.parent_run_id);
+ e ? e.push(n) : t.set(n.parent_run_id, [n]);
}
- filter(e, t) {
- let n = t.getItem(this.prevKey);
- if (n && n.type !== "separator") {
- let n = this.clone();
- return t.addDescendants(n, e), n;
+ return t;
+}
+function Poe(e, t) {
+ let n = [], r = /* @__PURE__ */ new Map();
+ for (let i of e) {
+ if (!t(i)) {
+ r = /* @__PURE__ */ new Map(), n.push({
+ run: i,
+ runs: [i]
+ });
+ continue;
+ }
+ let e = r.get(i.task_key);
+ if (e) e.runs.push(i);
+ else {
+ let e = {
+ run: i,
+ runs: [i]
+ };
+ r.set(i.task_key, e), n.push(e);
}
- return null;
}
-}, function(e, t) {
- [e, t] = FE(e, t, JD);
- let { elementType: n, orientation: r, style: i, className: a, slot: o, ...s } = e, c = n || "hr";
- c === "hr" && r === "vertical" && (c = "div");
- let l = zE[c], { separatorProps: u } = $te({
- ...s,
- elementType: n,
- orientation: r
- }), d = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(l, {
- render: e.render,
- ...U(d, u),
- style: i,
- className: a ?? "react-aria-Separator",
- ref: t,
- slot: o || void 0
+ return n;
+}
+var Foe = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), QE = (e) => e.status === "pending" || e.status === "running";
+function Ioe(e) {
+ let t = `${e.task_label}:`, n = e.progress_label || "", r = n.startsWith(t) ? n.slice(t.length) : n === e.task_label ? "" : n, i = e.progress_total || 0;
+ return [r, e.error || tD(e.result_summary) || (QE(e) && i > 0 ? `${e.progress_current || 0} / ${i} 项` : "")].filter(Boolean).join(" · ");
+}
+function $E(e) {
+ if (typeof e != "number" || !Number.isFinite(e) || e < 0) return "";
+ let t = Math.floor(e);
+ if (t < 60) return `${t} 秒`;
+ let n = Math.floor(t / 60);
+ return n < 60 ? `${n} 分 ${t % 60} 秒` : `${Math.floor(n / 60)} 小时 ${n % 60} 分`;
+}
+function eD(e) {
+ if (!e) return "";
+ let t = new Date(e);
+ return Number.isNaN(t.getTime()) ? "" : t.toLocaleString(void 0, {
+ month: "2-digit",
+ day: "2-digit",
+ hour: "2-digit",
+ minute: "2-digit"
});
-});
-//#endregion
-//#region node_modules/react-aria/dist/private/utils/inertValue.mjs
-function YD(e) {
- let t = B.version.split(".");
- return parseInt(t[0], 10) >= 19 ? e : e ? "true" : void 0;
+}
+var Loe = /* @__PURE__ */ new Set([
+ "blocked_by",
+ "status",
+ "run_id",
+ "request_id",
+ "started_at",
+ "completed_at",
+ "finished_at"
+]);
+function tD(e) {
+ return Object.entries(e || {}).filter(([e, t]) => !Loe.has(e) && (typeof t == "number" || typeof t == "string") && String(t) !== "").map(([e, t]) => `${Moe[e] || e} ${t}`).join(" · ");
}
//#endregion
-//#region node_modules/react-stately/dist/private/list/ListCollection.mjs
-var XD = class {
- constructor(e) {
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
- let t = (e) => {
- if (this.keyMap.set(e.key, e), e.childNodes && e.type === "section") for (let n of e.childNodes) t(n);
+//#region src/react/activity/downloads-panel.tsx
+var nD = "/api/downloads", rD = ["downloads"], Roe = "/api/downloads/cancel", iD = (e) => e?.tasks.some((e) => e.cancellable) ? 5e3 : 3e4, zoe = {
+ ingested: "lime",
+ failed: "rose",
+ cancelled: "yellow",
+ stalled: "yellow"
+}, Boe = (e) => e.title || e.display_name || e.remote_name || e.code || `磁力 ${e.info_hash?.slice(0, 8) ?? e.id}`, aD = (e) => e.failure_label ? [e.failure_label, e.failure_detail].filter(Boolean).join(":") : "";
+function Voe() {
+ let e = (0, B.useId)(), t = TS({
+ queryKey: rD,
+ queryFn: ({ signal: e }) => G(`${nD}?limit=50`, e),
+ refetchInterval: (e) => iD(e.state.data)
+ }), n = t.data;
+ return !n?.tasks.length && !t.error ? null : /* @__PURE__ */ (0, V.jsxs)("section", {
+ "aria-labelledby": e,
+ className: "flex min-w-0 flex-col gap-3",
+ children: [
+ /* @__PURE__ */ (0, V.jsx)("h3", {
+ id: e,
+ className: "text-title-2-semibold text-text-primary",
+ children: "云下载"
+ }),
+ t.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "error",
+ children: W(t.error)
+ }) : null,
+ n?.tasks.length ? /* @__PURE__ */ (0, V.jsx)("ul", {
+ "aria-live": "polite",
+ className: "flex min-w-0 flex-col gap-3",
+ children: n.tasks.map((e) => /* @__PURE__ */ (0, V.jsx)(Hoe, {
+ task: e,
+ writable: n.available
+ }, e.id))
+ }) : null
+ ]
+ });
+}
+function Hoe({ task: e, writable: t }) {
+ let n = lS(), r = AE(), [i, a] = (0, B.useState)(!1), o = aD(e), s = e.state === "failed", c = [
+ e.provider_label,
+ e.code,
+ e.target,
+ eD(e.submitted_at)
+ ].filter(Boolean).join(" · "), l = () => {
+ n.invalidateQueries({ queryKey: rD });
+ }, u = () => {
+ r.run("cancel", (t) => K(Roe, { id: e.id }, "POST", t), l);
+ }, d = () => {
+ let t = {
+ magnet: e.source_uri,
+ provider: e.provider,
+ target: e.target,
+ code: e.code,
+ title: e.title,
+ origin: e.origin
};
- for (let n of e) t(n);
- let n = null, r = 0, i = 0;
- for (let [e, t] of this.keyMap) n ? (n.nextKey = e, t.prevKey = n.key) : (this.firstKey = e, t.prevKey = void 0), t.type === "item" && (t.index = r++), (t.type === "section" || t.type === "item") && i++, n = t, n.nextKey = void 0;
- this._size = i, this.lastKey = n?.key ?? null;
- }
- *[Symbol.iterator]() {
- yield* this.iterable;
- }
- get size() {
- return this._size;
- }
- getKeys() {
- return this.keyMap.keys();
- }
- getKeyBefore(e) {
- let t = this.keyMap.get(e);
- return t ? t.prevKey ?? null : null;
- }
- getKeyAfter(e) {
- let t = this.keyMap.get(e);
- return t ? t.nextKey ?? null : null;
- }
- getFirstKey() {
- return this.firstKey;
- }
- getLastKey() {
- return this.lastKey;
- }
- getItem(e) {
- return this.keyMap.get(e) ?? null;
- }
- at(e) {
- let t = [...this.getKeys()];
- return this.getItem(t[e]);
- }
- getChildren(e) {
- return this.keyMap.get(e)?.childNodes || [];
- }
-}, ZD = class e extends Set {
- constructor(t, n, r) {
- super(t), t instanceof e ? (this.anchorKey = n ?? t.anchorKey, this.currentKey = r ?? t.currentKey) : (this.anchorKey = n ?? null, this.currentKey = r ?? null);
- }
+ r.run("resubmit", (e) => K(nD, t, "POST", e), l);
+ }, f = () => {
+ navigator.clipboard.writeText(e.source_uri).then(() => a(!0), () => a(!1));
+ };
+ return /* @__PURE__ */ (0, V.jsxs)("li", {
+ "data-download-state": e.state,
+ "data-download-id": e.id,
+ className: wE({
+ padding: "none",
+ bordered: "line",
+ className: s ? "flex flex-col border-border-error-default" : "flex flex-col"
+ }),
+ children: [/* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-1.5 px-5 pt-5 pb-4",
+ children: [
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-wrap items-center gap-2",
+ children: [/* @__PURE__ */ (0, V.jsx)("strong", {
+ className: "min-w-0 break-words text-title-1-medium text-text-primary",
+ children: Boe(e)
+ }), /* @__PURE__ */ (0, V.jsx)(xE, {
+ color: zoe[e.state] ?? "neutral",
+ children: e.state_label
+ })]
+ }),
+ /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
+ children: c
+ }),
+ e.state === "remote_running" && e.progress != null ? /* @__PURE__ */ (0, V.jsx)(kE, {
+ label: "远端下载进度",
+ value: Math.round(e.progress * 100),
+ max: 100
+ }) : null,
+ e.ledger_path ? /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "min-w-0 break-all text-caption-1-regular text-text-secondary",
+ children: e.ledger_path
+ }) : null,
+ r.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: r.error }) : null,
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-wrap items-center gap-2 pt-1",
+ children: [
+ t && e.cancellable ? /* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "secondary",
+ size: "small",
+ ...X(r.busy === "cancel"),
+ onClick: u,
+ children: "取消"
+ }) : null,
+ t && e.resubmittable ? /* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "secondary",
+ size: "small",
+ ...X(r.busy === "resubmit"),
+ onClick: d,
+ children: "重新提交"
+ }) : null,
+ /* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "ghost",
+ size: "small",
+ onClick: f,
+ children: i ? "已复制磁力" : "复制磁力"
+ })
+ ]
+ })
+ ]
+ }), o ? /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex min-h-14 flex-col justify-center rounded-b-2xl border-t border-separator-border bg-card-footer px-5 py-3",
+ children: /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-caption-1-regular text-text-secondary",
+ children: o
+ })
+ }) : null]
+ });
+}
+//#endregion
+//#region src/react/activity/activity-page.tsx
+var Uoe = {
+ succeeded: "lime",
+ failed: "rose",
+ cancelled: "yellow",
+ interrupted: "yellow"
};
+function oD({ status: e }) {
+ return /* @__PURE__ */ (0, V.jsx)(xE, {
+ color: Uoe[e] ?? "neutral",
+ children: joe(e)
+ });
+}
+function Woe({ rows: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("ul", {
+ className: "flex min-w-0 flex-col",
+ children: e.map((e) => {
+ let t = Ioe(e);
+ return /* @__PURE__ */ (0, V.jsxs)("li", {
+ "data-status": e.status,
+ "data-followup-key": e.followup_key,
+ className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-t border-separator-border px-5 py-2.5",
+ children: [
+ /* @__PURE__ */ (0, V.jsx)("span", {
+ className: "min-w-0 break-words text-caption-1-regular text-text-primary",
+ children: e.task_label
+ }),
+ /* @__PURE__ */ (0, V.jsx)(oD, { status: e.status }),
+ t ? /* @__PURE__ */ (0, V.jsx)("span", {
+ className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
+ children: t
+ }) : null
+ ]
+ }, e.id);
+ })
+ });
+}
+function sD({ run: e, meta: t, children: n, footer: r, followups: i }) {
+ return /* @__PURE__ */ (0, V.jsxs)("li", {
+ "data-status": e.status,
+ "data-task-key": e.task_key,
+ "data-run-id": e.id,
+ className: wE({
+ padding: "none",
+ bordered: "line",
+ className: e.status === "failed" ? "flex flex-col border-border-error-default" : "flex flex-col"
+ }),
+ children: [
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-1.5 px-5 pt-5 pb-4",
+ children: [
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-wrap items-center gap-2",
+ children: [/* @__PURE__ */ (0, V.jsx)("strong", {
+ className: "min-w-0 break-words text-title-1-medium text-text-primary",
+ children: e.task_label
+ }), /* @__PURE__ */ (0, V.jsx)(oD, { status: e.status })]
+ }),
+ /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-caption-1-regular text-text-secondary",
+ children: t
+ }),
+ n
+ ]
+ }),
+ i?.length ? /* @__PURE__ */ (0, V.jsx)(Woe, { rows: i }) : null,
+ r ? /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex min-h-14 flex-col justify-center rounded-b-2xl border-t border-separator-border bg-card-footer px-5 py-3",
+ children: /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-caption-1-regular text-text-secondary",
+ children: r
+ })
+ }) : null
+ ]
+ });
+}
+function Goe({ run: e, followups: t }) {
+ let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = $E(e.elapsed_seconds), o = [ZE[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
+ return /* @__PURE__ */ (0, V.jsx)(sD, {
+ run: e,
+ meta: o,
+ followups: t,
+ children: n > 0 ? /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-1.5",
+ children: [/* @__PURE__ */ (0, V.jsx)(kE, {
+ label: i,
+ value: r,
+ max: n
+ }), /* @__PURE__ */ (0, V.jsxs)("p", {
+ className: "text-caption-1-regular text-text-secondary",
+ children: [
+ i,
+ " · ",
+ r,
+ " / ",
+ n,
+ " 项"
+ ]
+ })]
+ }) : /* @__PURE__ */ (0, V.jsx)(EE, { label: i })
+ });
+}
+function cD({ run: e, followups: t, runs: n }) {
+ let r = tD(e.result_summary), i = $E(e.elapsed_seconds), a = n && n.length > 1 ? n[n.length - 1] : void 0, o = (a ? [
+ ZE[e.trigger] || e.trigger,
+ `近 ${n.length} 轮`,
+ `${eD(a.finished_at)} – ${eD(e.finished_at)}`
+ ] : [
+ ZE[e.trigger] || e.trigger,
+ eD(e.finished_at),
+ i && `用时 ${i}`
+ ]).filter(Boolean).join(" · ");
+ return /* @__PURE__ */ (0, V.jsx)(sD, {
+ run: e,
+ meta: o,
+ footer: e.error,
+ followups: t,
+ children: r ? /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "text-caption-1-regular text-text-secondary",
+ children: r
+ }) : null
+ });
+}
+function lD({ title: e, children: t }) {
+ let n = (0, B.useId)();
+ return /* @__PURE__ */ (0, V.jsxs)("section", {
+ "aria-labelledby": n,
+ className: "flex min-w-0 flex-col gap-3",
+ children: [/* @__PURE__ */ (0, V.jsx)("h3", {
+ id: n,
+ className: "text-title-2-semibold text-text-primary",
+ children: e
+ }), t]
+ });
+}
+function uD({ live: e = !1, children: t }) {
+ return /* @__PURE__ */ (0, V.jsx)("ul", {
+ "aria-live": e ? "polite" : void 0,
+ className: "flex min-w-0 flex-col gap-3",
+ children: t
+ });
+}
+function Koe() {
+ let e = TS({
+ queryKey: JE,
+ queryFn: ({ signal: e }) => XE(e),
+ refetchInterval: (e) => Ooe(e.state.data)
+ }), t = e.data, n = t?.finished, [r, i] = (0, B.useState)([]), [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(n);
+ n !== s && (c(n), r.length && s && i(YE(r, s)));
+ let l = OS({
+ mutationFn: ({ oldest: e }) => Toe(e),
+ onSuccess: (e, { shown: t }) => {
+ i((n) => YE(n, t, e.finished || [])), o(!!e.finished_has_more);
+ }
+ }), u = e.error ? W(e.error) : "";
+ if (!t) return /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "error",
+ children: u || "读取任务中心失败"
+ }) });
+ let d = YE(t.finished || [], r), f = [
+ ...t.running || [],
+ ...t.skipped || [],
+ ...d
+ ], p = Noe(f), m = new Set(f.map((e) => e.id)), h = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && m.has(e.parent_run_id))), g = h(d), _ = g[g.length - 1], v = !!_ && (r.length ? a : !!t.finished_has_more), y = () => {
+ !l.isPending && _ && l.mutate({
+ oldest: _,
+ shown: d
+ });
+ }, b = g.filter((e) => p.get(e.id)?.some(QE)), x = h(t.running || []), S = h(t.skipped || []), C = g.filter((e) => !b.includes(e) && !S.some((t) => t.id === e.id)), w = Poe(C, (e) => Foe(e) && !p.get(e.id)?.length), T = !x.length && !b.length && !S.length && !C.length;
+ return /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
+ u ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "error",
+ children: u
+ }) : null,
+ t.available === !1 ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "warning",
+ children: t.message || "账本上还没有任务中心的表"
+ }) : null,
+ T ? /* @__PURE__ */ (0, V.jsx)(TE, {
+ shell: "plain",
+ icon: bT,
+ title: "还没有任务记录",
+ children: "扫描、追更检查、批量操作和命令行批处理跑起来之后,这里会显示它们的进度与结果。"
+ }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+ /* @__PURE__ */ (0, V.jsx)(lD, {
+ title: "正在进行",
+ children: x.length || b.length ? /* @__PURE__ */ (0, V.jsxs)(uD, {
+ live: !0,
+ children: [x.map((e) => /* @__PURE__ */ (0, V.jsx)(Goe, {
+ run: e,
+ followups: p.get(e.id)
+ }, e.id)), b.map((e) => /* @__PURE__ */ (0, V.jsx)(cD, {
+ run: e,
+ followups: p.get(e.id)
+ }, e.id))]
+ }) : /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "neutral",
+ children: "没有任务在跑。"
+ })
+ }),
+ S.length ? /* @__PURE__ */ (0, V.jsx)(lD, {
+ title: "被挡下的",
+ children: /* @__PURE__ */ (0, V.jsx)(uD, { children: S.map((e) => /* @__PURE__ */ (0, V.jsx)(cD, {
+ run: e,
+ followups: p.get(e.id)
+ }, e.id)) })
+ }) : null,
+ C.length || v ? /* @__PURE__ */ (0, V.jsxs)(lD, {
+ title: "最近完成",
+ children: [
+ C.length ? /* @__PURE__ */ (0, V.jsx)(uD, { children: w.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, V.jsx)(cD, {
+ run: e,
+ runs: t,
+ followups: p.get(e.id)
+ }, e.id)) }) : null,
+ l.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "error",
+ children: W(l.error)
+ }) : null,
+ v ? /* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "secondary",
+ size: "small",
+ leadingIcon: cT,
+ className: "self-start",
+ ...X(l.isPending),
+ onClick: y,
+ children: "加载更早"
+ }) : null
+ ]
+ }) : null
+ ] }),
+ /* @__PURE__ */ (0, V.jsx)(Voe, {})
+ ] });
+}
//#endregion
-//#region node_modules/react-stately/dist/private/selection/useMultipleSelectionState.mjs
-function Boe(e, t) {
- if (e.size !== t.size) return !1;
- for (let n of e) if (!t.has(n)) return !1;
- return !0;
+//#region src/react/components/use-stuck.ts
+function dD(e) {
+ (0, B.useEffect)(() => {
+ let t = e.current;
+ if (!t) return;
+ let n = 0, r = () => {
+ n = 0;
+ let e = parseFloat(getComputedStyle(t).top), r = window.scrollY > 0 && Number.isFinite(e) && t.getBoundingClientRect().top <= e + 1;
+ t.toggleAttribute("data-stuck", r);
+ }, i = () => {
+ n ||= requestAnimationFrame(r);
+ };
+ return r(), addEventListener("scroll", i, { passive: !0 }), addEventListener("resize", i), () => {
+ cancelAnimationFrame(n), removeEventListener("scroll", i), removeEventListener("resize", i);
+ };
+ }, [e]);
}
-function QD(e) {
- let { selectionMode: t = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = e, o = (0, B.useRef)(!1), [, s] = (0, B.useState)(!1), c = (0, B.useRef)(null), l = (0, B.useRef)(null), [, u] = (0, B.useState)(null), [d, f] = L_((0, B.useMemo)(() => $D(e.selectedKeys), [e.selectedKeys]), (0, B.useMemo)(() => $D(e.defaultSelectedKeys, new ZD()), [e.defaultSelectedKeys]), e.onSelectionChange), p = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), [m, h] = (0, B.useState)(i);
- i === "replace" && m === "toggle" && typeof d == "object" && d.size === 0 && h("replace");
- let g = (0, B.useRef)(i);
- return (0, B.useEffect)(() => {
- i !== g.current && (h(i), g.current = i);
- }, [i]), {
- selectionMode: t,
- disallowEmptySelection: n,
- selectionBehavior: m,
- setSelectionBehavior: h,
- get isFocused() {
- return o.current;
- },
- setFocused(e) {
- o.current = e, s(e);
- },
- get focusedKey() {
- return c.current;
- },
- get childFocusStrategy() {
- return l.current;
- },
- setFocusedKey(e, t = "first") {
- c.current = e, l.current = t, u(e);
- },
- selectedKeys: d,
- setSelectedKeys(e) {
- (r || !Boe(e, d)) && f(e);
- },
- disabledKeys: p,
- disabledBehavior: a
- };
+//#endregion
+//#region src/react/components/filter-glass.tsx
+function qoe({ title: e, children: t }) {
+ let n = (0, B.useRef)(null);
+ return dD(n), /* @__PURE__ */ (0, V.jsxs)("div", {
+ ref: n,
+ role: "group",
+ "aria-label": e,
+ "data-filter-glass": !0,
+ "data-glass-pane": "",
+ className: "sticky top-topbar z-10 mb-5.5 flex flex-wrap items-center gap-x-2.5 gap-y-2 px-4 py-2.5",
+ children: [/* @__PURE__ */ (0, V.jsx)("h3", {
+ className: "mr-1 text-body-medium",
+ children: e
+ }), t]
+ });
+}
+function fD({ label: e, topLabel: t, top: n, bottom: r, className: i, topClassName: a, bottomClassName: o, panes: s, attrs: c, busy: l, bottomRef: u }) {
+ let d = (0, B.useRef)(null);
+ return dD(d), /* @__PURE__ */ (0, V.jsxs)("div", {
+ ref: d,
+ role: "group",
+ "aria-label": e,
+ "data-filter-glass": !0,
+ "data-glass-pane": "",
+ ...c,
+ className: vE("sticky top-topbar z-10 mb-5.5 flex flex-col", i),
+ children: [
+ s,
+ /* @__PURE__ */ (0, V.jsx)("div", {
+ role: "group",
+ "aria-label": t,
+ "data-filter-row": "top",
+ className: vE("flex h-12 min-w-0 items-center gap-1.75 overflow-x-auto overscroll-x-contain px-3 py-2", a),
+ children: n
+ }),
+ /* @__PURE__ */ (0, V.jsx)("div", {
+ ref: u,
+ "data-filter-row": "bottom",
+ "aria-busy": l || void 0,
+ className: vE("flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2", o),
+ children: r
+ })
+ ]
+ });
+}
+var Joe = "flex h-7.5 flex-none cursor-pointer items-center gap-1.75 rounded-lg border border-dashed border-(--glass-low) bg-transparent px-2.5 text-body-2-regular leading-5 whitespace-nowrap text-inherit outline-none hover:border-solid focus-visible:ring-2 focus-visible:ring-border-focus-ring";
+function pD({ children: e, pressed: t, onPress: n, className: r, ...i }) {
+ return /* @__PURE__ */ (0, V.jsx)("button", {
+ type: "button",
+ ...i,
+ "aria-pressed": t,
+ className: vE(Joe, r),
+ onClick: n,
+ children: e
+ });
}
-function $D(e, t) {
- return e ? e === "all" ? "all" : new ZD(e) : t;
+var Yoe = "h-7.5 cursor-pointer rounded-full border border-(--glass-low) bg-transparent px-3 text-body-2-regular leading-none whitespace-nowrap text-inherit outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-busy:cursor-wait aria-busy:opacity-55";
+function mD({ children: e, onPress: t, busy: n = !1 }) {
+ return /* @__PURE__ */ (0, V.jsx)("button", {
+ type: "button",
+ "data-glass-pill": "",
+ className: Yoe,
+ "aria-busy": n || void 0,
+ "aria-disabled": n || void 0,
+ onClick: () => {
+ n || t();
+ },
+ children: e
+ });
}
//#endregion
-//#region node_modules/react-stately/dist/private/selection/SelectionManager.mjs
-var eO = class e {
- constructor(e, t, n) {
- this.collection = e, this.state = t, this.allowsCellSelection = n?.allowsCellSelection ?? !1, this._isSelectAll = null, this.layoutDelegate = n?.layoutDelegate || null, this.fullCollection = n?.fullCollection || null;
- }
- get selectionMode() {
- return this.state.selectionMode;
- }
- get disallowEmptySelection() {
- return this.state.disallowEmptySelection;
- }
- get selectionBehavior() {
- return this.state.selectionBehavior;
- }
- setSelectionBehavior(e) {
- this.state.setSelectionBehavior(e);
- }
- get isFocused() {
- return this.state.isFocused;
- }
- setFocused(e) {
- this.state.setFocused(e);
- }
- get focusedKey() {
- return this.state.focusedKey;
- }
- get childFocusStrategy() {
- return this.state.childFocusStrategy;
- }
- setFocusedKey(e, t) {
- (e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, t);
- }
- get selectedKeys() {
- return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
- }
- get rawSelection() {
- return this.state.selectedKeys;
- }
- isSelected(e) {
- if (this.state.selectionMode === "none") return !1;
- let t = this.getKey(e);
- return t == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(t) : this.state.selectedKeys.has(t);
- }
- get isEmpty() {
- return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
- }
- get isSelectAll() {
- if (this.isEmpty) return !1;
- if (this.state.selectedKeys === "all") return !0;
- if (this._isSelectAll != null) return this._isSelectAll;
- let e = this.getSelectAllKeys(), t = this.state.selectedKeys;
- return this._isSelectAll = e.every((e) => t.has(e)), this._isSelectAll;
- }
- get firstSelectedKey() {
- let e = null;
- for (let t of this.state.selectedKeys) {
- let n = this.collection.getItem(t);
- (!e || n && Gv(this.collection, n, e) < 0) && (e = n);
- }
- return e?.key ?? null;
- }
- get lastSelectedKey() {
- let e = null;
- for (let t of this.state.selectedKeys) {
- let n = this.collection.getItem(t);
- (!e || n && Gv(this.collection, n, e) > 0) && (e = n);
- }
- return e?.key ?? null;
- }
- get disabledKeys() {
- return this.state.disabledKeys;
- }
- get disabledBehavior() {
- return this.state.disabledBehavior;
- }
- extendSelection(e) {
- if (this.selectionMode === "none") return;
- if (this.selectionMode === "single") {
- this.replaceSelection(e);
- return;
- }
- let t = this.getKey(e);
- if (t == null) return;
- let n;
- if (this.state.selectedKeys === "all") n = new ZD([t], t, t);
- else {
- let e = this.state.selectedKeys, r = e.anchorKey ?? t;
- n = new ZD(e, r, t);
- for (let i of this.getKeyRange(r, e.currentKey ?? t)) n.delete(i);
- for (let e of this.getKeyRange(t, r)) this.canSelectItem(e) && n.add(e);
+//#region src/react/components/use-view-glide.ts
+function Xoe(e, t, n) {
+ if (!t.contains(e)) return null;
+ let r = 0, i = 0;
+ for (let n = e; n && n !== t; n = n.offsetParent) r += n.offsetLeft, i += n.offsetTop;
+ let a = e.getBoundingClientRect();
+ for (let o = e.parentElement; o && o !== t; o = o.parentElement) {
+ r -= o.scrollLeft, i -= o.scrollTop;
+ let e = () => o.getBoundingClientRect();
+ if (n === "x" && o.scrollWidth > o.clientWidth && getComputedStyle(o).overflowX !== "visible") {
+ let t = e();
+ if (a.right <= t.left || a.left >= t.right) return null;
}
- this.state.setSelectedKeys(n);
- }
- getKeyRange(e, t) {
- let n = this.collection.getItem(e), r = this.collection.getItem(t);
- return n && r ? Gv(this.collection, n, r) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
- }
- getKeyRangeInternal(e, t) {
- if (this.layoutDelegate?.getKeyRange) return this.layoutDelegate.getKeyRange(e, t);
- let n = [], r = e;
- for (; r != null;) {
- let e = this.collection.getItem(r);
- if (e && (e.type === "item" || e.type === "cell" && this.allowsCellSelection) && n.push(r), r === t) return n;
- r = this.collection.getKeyAfter(r);
+ if (n === "y" && o.scrollHeight > o.clientHeight && getComputedStyle(o).overflowY !== "visible") {
+ let t = e();
+ if (a.bottom <= t.top || a.top >= t.bottom) return null;
}
- return [];
- }
- getKey(e) {
- let t = this.collection.getItem(e);
- if (!t || t.type === "cell" && this.allowsCellSelection) return e;
- for (; t && t.type !== "item" && t.parentKey != null;) t = this.collection.getItem(t.parentKey);
- return !t || t.type !== "item" ? null : t.key;
}
- toggleSelection(e) {
- if (this.selectionMode === "none") return;
- if (this.selectionMode === "single" && !this.isSelected(e)) {
- this.replaceSelection(e);
+ return {
+ x: r,
+ y: i,
+ w: e.offsetWidth,
+ h: e.offsetHeight
+ };
+}
+function hD(e, t, n, r, { axis: i = "x" } = {}) {
+ let a = (0, B.useRef)(null), o = (0, B.useCallback)((r, o) => {
+ let s = e.current, c = t.current, l = s?.parentElement;
+ if (!s) return;
+ let u = c && c.offsetWidth ? r ?? c.querySelector(n) : null, d = u && l ? Xoe(u, l, i) : null;
+ if (!d || !d.w) {
+ s.hidden = !0;
return;
}
- let t = this.getKey(e);
- if (t == null) return;
- let n = new ZD(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
- n.has(t) ? n.delete(t) : this.canSelectItem(t) && (n.add(t), n.anchorKey = t, n.currentKey = t), !(this.disallowEmptySelection && n.size === 0) && this.state.setSelectedKeys(n);
- }
- replaceSelection(e) {
- if (this.selectionMode === "none") return;
- let t = this.getKey(e);
- if (t == null) return;
- let n = this.canSelectItem(t) ? new ZD([t], t, t) : new ZD();
- this.state.setSelectedKeys(n);
- }
- setSelectedKeys(e) {
- if (this.selectionMode === "none") return;
- let t = new ZD();
- for (let n of e) {
- let e = this.getKey(n);
- if (e != null && (t.add(e), this.selectionMode === "single")) break;
- }
- this.state.setSelectedKeys(t);
- }
- getSelectAllKeys() {
- let e = this.fullCollection ?? this.collection, t = [], n = (r) => {
- for (; r != null;) {
- if (this.canSelectItemIn(r, e)) {
- let i = e.getItem(r);
- i?.type === "item" && t.push(r), i?.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && n(Hv(Vv(i, e))?.key ?? null);
- }
- r = e.getKeyAfter(r);
- }
- };
- return n(e.getFirstKey()), t;
- }
- selectAll() {
- !this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
- }
- clearSelection() {
- !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new ZD());
- }
- toggleSelectAll() {
- this.isSelectAll ? this.clearSelection() : this.selectAll();
- }
- select(e, t) {
- this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || t && (t.pointerType === "touch" || t.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
- }
- isSelectionEqual(e) {
- if (e === this.state.selectedKeys) return !0;
- let t = this.selectedKeys;
- if (e.size !== t.size) return !1;
- for (let n of e) if (!t.has(n)) return !1;
- for (let n of t) if (!e.has(n)) return !1;
- return !0;
- }
- canSelectItem(e) {
- return this.canSelectItemIn(e, this.collection);
- }
- canSelectItemIn(e, t) {
- if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
- let n = t.getItem(e);
- return !(!n || n?.props?.isDisabled || n.type === "cell" && !this.allowsCellSelection);
- }
- isDisabled(e) {
- let t = this.collection.getItem(e);
- return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!t?.props?.isDisabled) && t?.props?.disabledBehavior !== "selection";
- }
- isLink(e) {
- return !!this.collection.getItem(e)?.props?.href;
- }
- getItemProps(e) {
- return this.collection.getItem(e)?.props;
- }
- withCollection(t) {
- return new e(t, this.state, {
- allowsCellSelection: this.allowsCellSelection,
- layoutDelegate: this.layoutDelegate || void 0,
- fullCollection: this.fullCollection ?? this.collection
- });
- }
-}, Voe = class {
- build(e, t) {
- return this.context = t, tO(() => this.iterateCollection(e));
- }
- *iterateCollection(e) {
- let { children: t, items: n } = e;
- if (B.isValidElement(t) && t.type === B.Fragment) yield* this.iterateCollection({
- children: t.props.children,
- items: n
- });
- else if (typeof t == "function") {
- if (!n) throw Error("props.children was a function but props.items is missing");
- let e = 0;
- for (let r of n) yield* this.getFullNode({
- value: r,
- index: e
- }, { renderer: t }), e++;
- } else {
- let e = [];
- B.Children.forEach(t, (t) => {
- t && e.push(t);
- });
- let n = 0;
- for (let t of e) {
- let e = this.getFullNode({
- element: t,
- index: n
- }, {});
- for (let t of e) n++, yield t;
- }
- }
- }
- getKey(e, t, n, r) {
- if (e.key != null) return e.key;
- if (t.type === "cell" && t.key != null) return `${r}${t.key}`;
- let i = t.value;
- if (i != null) {
- let e = i.key ?? i.id;
- if (e == null) throw Error("No key found for item");
- return e;
- }
- return r ? `${r}.${t.index}` : `$.${t.index}`;
- }
- getChildState(e, t) {
- return { renderer: t.renderer || e.renderer };
- }
- *getFullNode(e, t, n, r) {
- if (B.isValidElement(e.element) && e.element.type === B.Fragment) {
- let i = [];
- B.Children.forEach(e.element.props.children, (e) => {
- i.push(e);
+ let f = s.hidden ? null : a.current;
+ s.hidden = !1, a.current = d, Fe(s, o ? f : null, d, i);
+ }, [
+ e,
+ t,
+ n,
+ i
+ ]), s = (0, B.useRef)(!1);
+ return (0, B.useLayoutEffect)(() => {
+ let t = e.current;
+ t && !s.current && (t.hidden = !0), o(null, s.current), s.current = !0;
+ }, [o, r]), (0, B.useEffect)(() => {
+ let t = e.current?.parentElement, n = 0, r = () => {
+ n ||= requestAnimationFrame(() => {
+ n = 0, o(null, !1);
});
- let a = e.index ?? 0;
- for (let e of i) yield* this.getFullNode({
- element: e,
- index: a++
- }, t, n, r);
- return;
- }
- let i = e.element;
- if (!i && e.value && t && t.renderer) {
- let n = this.cache.get(e.value);
- if (n && (!n.shouldInvalidate || !n.shouldInvalidate(this.context))) {
- n.index = e.index, n.parentKey = r ? r.key : null, yield n;
- return;
- }
- i = t.renderer(e.value);
- }
- if (B.isValidElement(i)) {
- let a = i.type;
- if (typeof a != "function" && typeof a.getCollectionNode != "function") {
- let e = i.type;
- throw Error(`Unknown element <${e}> in collection.`);
- }
- let o = a.getCollectionNode(i.props, this.context), s = e.index ?? 0, c = o.next();
- for (; !c.done && c.value;) {
- let a = c.value;
- e.index = s;
- let l = a.key ?? null;
- l ??= a.element ? null : this.getKey(i, e, t, n);
- let u = [...this.getFullNode({
- ...a,
- key: l,
- index: s,
- wrapper: Hoe(e.wrapper, a.wrapper)
- }, this.getChildState(t, a), n ? `${n}${i.key}` : i.key, r)];
- for (let t of u) {
- if (t.value = a.value ?? e.value ?? null, t.value && this.cache.set(t.value, t), e.type && t.type !== e.type) throw Error(`Unsupported type <${nO(t.type)}> in <${nO(r?.type ?? "unknown parent type")}>. Only <${nO(e.type)}> is supported.`);
- s++, yield t;
- }
- c = o.next(u);
- }
- return;
- }
- if (e.key == null || e.type == null) return;
- let a = this, o = {
- type: e.type,
- props: e.props,
- key: e.key,
- parentKey: r ? r.key : null,
- value: e.value ?? null,
- level: (r?.level ?? 0) + +(r?.type === "item"),
- index: e.index,
- rendered: e.rendered,
- textValue: e.textValue ?? "",
- "aria-label": e["aria-label"],
- wrapper: e.wrapper,
- shouldInvalidate: e.shouldInvalidate,
- hasChildNodes: e.hasChildNodes || !1,
- childNodes: tO(function* () {
- if (!e.hasChildNodes || !e.childNodes) return;
- let n = 0;
- for (let r of e.childNodes()) {
- r.key != null && (r.key = `${o.key}${r.key}`);
- let e = a.getFullNode({
- ...r,
- index: n
- }, a.getChildState(t, r), o.key, o);
- for (let t of e) n++, yield t;
- }
- })
};
- yield o;
- }
- constructor() {
- this.cache = /* @__PURE__ */ new WeakMap();
- }
-};
-function tO(e) {
- let t = [], n = null;
- return { *[Symbol.iterator]() {
- for (let e of t) yield e;
- n ||= e();
- for (let e of n) t.push(e), yield e;
- } };
-}
-function Hoe(e, t) {
- if (e && t) return (n) => e(t(n));
- if (e) return e;
- if (t) return t;
-}
-function nO(e) {
- return e[0].toUpperCase() + e.slice(1);
+ return t?.addEventListener("scroll", r, {
+ capture: !0,
+ passive: !0
+ }), addEventListener("resize", r, { passive: !0 }), () => {
+ cancelAnimationFrame(n), t?.removeEventListener("scroll", r, { capture: !0 }), removeEventListener("resize", r);
+ };
+ }, [e, o]), {
+ hover: (0, B.useCallback)((e) => {
+ e.pointerType !== "touch" && o(e.currentTarget, !0);
+ }, [o]),
+ leave: (0, B.useCallback)((e) => {
+ e.pointerType !== "touch" && o(null, !0);
+ }, [o]),
+ sync: (0, B.useCallback)(() => {
+ e.current?.getAnimations().forEach((e) => e.cancel()), o(null, !1);
+ }, [e, o])
+ };
}
//#endregion
-//#region node_modules/react-stately/dist/private/collections/useCollection.mjs
-function rO(e, t, n) {
- let r = (0, B.useMemo)(() => new Voe(), []), { children: i, items: a, collection: o } = e;
- return (0, B.useMemo)(() => o || t(r.build({
- children: i,
- items: a
- }, n)), [
+//#region node_modules/react-aria-components/dist/private/utils.mjs
+var gD = Symbol("default");
+function _D({ values: e, children: t }) {
+ for (let [n, r] of e) t = /*#__PURE__*/ B.createElement(n.Provider, { value: r }, t);
+ return t;
+}
+function vD(e) {
+ let { className: t, style: n, children: r, defaultClassName: i, defaultChildren: a, defaultStyle: o, values: s, render: c } = e;
+ return (0, B.useMemo)(() => {
+ let e, l, u;
+ return e = typeof t == "function" ? t({
+ ...s,
+ defaultClassName: i
+ }) : t, l = typeof n == "function" ? n({
+ ...s,
+ defaultStyle: o || {}
+ }) : n, u = typeof r == "function" ? r({
+ ...s,
+ defaultChildren: a
+ }) : r ?? a, {
+ className: e ?? i,
+ style: l || o ? {
+ ...o,
+ ...l
+ } : void 0,
+ children: u ?? a,
+ "data-rac": "",
+ render: c ? (e) => c(e, s) : void 0
+ };
+ }, [
+ t,
+ n,
r,
i,
a,
o,
- n,
- t
+ s,
+ c
]);
}
-//#endregion
-//#region node_modules/react-stately/dist/private/list/useListState.mjs
-function iO(e) {
- let { filter: t, layoutDelegate: n } = e, r = QD(e), i = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = rO(e, (0, B.useCallback)((e) => t ? new XD(t(e)) : new XD(e), [t]), (0, B.useMemo)(() => ({ suppressTextValueWarning: e.suppressTextValueWarning }), [e.suppressTextValueWarning])), o = (0, B.useMemo)(() => new eO(a, r, { layoutDelegate: n }), [
- a,
- r,
- n
- ]);
- return aO(a, o), {
- collection: a,
- disabledKeys: i,
- selectionManager: o
- };
+function yD(e, t) {
+ let n = (0, B.useContext)(e);
+ if (t === null) return null;
+ if (n && typeof n == "object" && "slots" in n && n.slots) {
+ let e = t || gD;
+ if (!n.slots[e]) {
+ let e = new Intl.ListFormat().format(Object.keys(n.slots).map((e) => `"${e}"`)), r = t ? `Invalid slot "${t}".` : "A slot prop is required.";
+ throw Error(`${r} Valid slot names are ${e}.`);
+ }
+ return n.slots[e];
+ }
+ return n;
}
-function Uoe(e, t) {
- let n = (0, B.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
- return aO(n, r), {
- collection: n,
- selectionManager: r,
- disabledKeys: e.disabledKeys
+function bD(e, t, n) {
+ let { ref: r, ...i } = yD(n, e.slot) || {}, a = Nh((0, B.useMemo)(() => mh(t, r), [t, r])), o = U(i, e);
+ return "style" in i && i.style && "style" in e && e.style && (o.style = typeof i.style == "function" || typeof e.style == "function" ? (t) => {
+ let n = typeof i.style == "function" ? i.style(t) : i.style, r = {
+ ...t.defaultStyle,
+ ...n
+ }, a = typeof e.style == "function" ? e.style({
+ ...t,
+ defaultStyle: r
+ }) : e.style;
+ return {
+ ...r,
+ ...a
+ };
+ } : {
+ ...i.style,
+ ...e.style
+ }), [o, a];
+}
+function xD(e = !0) {
+ let [t, n] = (0, B.useState)(e), r = (0, B.useRef)(!1), i = (0, B.useCallback)((e) => {
+ r.current = !0, n(!!e);
+ }, []);
+ return Hp(() => {
+ r.current || n(!1);
+ }, []), [i, t];
+}
+function SD(e) {
+ let t = /^(data-.*)$/, n = {};
+ for (let r in e) t.test(r) || (n[r] = e[r]);
+ return n;
+}
+function Zoe(e, t, n) {
+ let { render: r, ...i } = t, a = (0, B.useRef)(null), o = (0, B.useMemo)(() => mh(n, a), [n, a]);
+ Hp(() => {}, [e, r]);
+ let s = {
+ ...i,
+ ref: o
};
+ return r ? r(s, void 0) : /*#__PURE__*/ B.createElement(e, s);
}
-function aO(e, t) {
- let n = (0, B.useRef)(null);
- (0, B.useEffect)(() => {
- if (t.focusedKey != null && !e.getItem(t.focusedKey) && n.current) {
- let r = n.current.getKeyAfter(t.focusedKey), i = null;
- for (; r != null;) {
- let a = e.getItem(r);
- if (a && a.type === "item" && !t.isDisabled(r)) {
- i = r;
- break;
- }
- r = n.current.getKeyAfter(r);
- }
- if (i == null) for (r = n.current.getKeyBefore(t.focusedKey); r != null;) {
- let a = e.getItem(r);
- if (a && a.type === "item" && !t.isDisabled(r)) {
- i = r;
- break;
- }
- r = n.current.getKeyBefore(r);
- }
- t.setFocusedKey(i);
+var CD = {}, wD = new Proxy({}, { get(e, t) {
+ if (typeof t != "string") return;
+ let n = CD[t];
+ return n || (n = /*#__PURE__*/ (0, B.forwardRef)(Zoe.bind(null, t)), CD[t] = n), n;
+} }), TD = /*#__PURE__*/ (0, B.createContext)(null), ED = /*#__PURE__*/ (0, B.createContext)(null), DD = /*#__PURE__*/ (0, B.createContext)(null), OD = {
+ CollectionRoot({ collection: e, renderDropIndicator: t }) {
+ return kD(e, null, t);
+ },
+ CollectionBranch({ collection: e, parent: t, renderDropIndicator: n }) {
+ return kD(e, t, n);
+ }
+};
+function kD(e, t, n) {
+ return dp({
+ items: t ? e.getChildren(t.key) : e,
+ dependencies: [n],
+ children(t) {
+ if (t.type === "content") return /*#__PURE__*/ B.createElement(B.Fragment, null);
+ let r = t.render(t);
+ return !n || t.type !== "item" ? r : /*#__PURE__*/ B.createElement(B.Fragment, null, n({
+ type: "item",
+ key: t.key,
+ dropPosition: "before"
+ }), r, Qoe(e, t, n));
}
- n.current = e;
- }, [e, t]);
+ });
+}
+function Qoe(e, t, n) {
+ let r = t.key, i = e.getKeyAfter(r), a = i == null ? null : e.getItem(i);
+ for (; a != null && a.type !== "item";) i = e.getKeyAfter(a.key), a = i == null ? null : e.getItem(i);
+ let o = t.nextKey == null ? null : e.getItem(t.nextKey);
+ for (; o != null && o.type !== "item";) o = o.nextKey == null ? null : e.getItem(o.nextKey);
+ let s = [];
+ if (o == null) {
+ let r = t;
+ for (; r?.type === "item" && (!a || r.parentKey !== a.parentKey && a.level < r.level);) {
+ let t = n({
+ type: "item",
+ key: r.key,
+ dropPosition: "after"
+ });
+ /*#__PURE__*/ (0, B.isValidElement)(t) && s.push(/*#__PURE__*/ (0, B.cloneElement)(t, { key: `${r.key}-after` })), r = r.parentKey == null ? null : e.getItem(r.parentKey);
+ }
+ }
+ return s;
+}
+var AD = /*#__PURE__*/ (0, B.createContext)(OD);
+function jD(e) {
+ return (0, B.useMemo)(() => e == null ? null : /* @__PURE__ */ new Set([e]), [e]);
}
//#endregion
-//#region node_modules/react-aria/dist/private/utils/useLoadMoreSentinel.mjs
-function oO(e, t) {
- let { collection: n, onLoadMore: r, scrollOffset: i = 1, direction: a = "end" } = e, o = (0, B.useRef)(null), s = ug((e) => {
- for (let t of e) t.isIntersecting && r && r();
+//#region node_modules/react-aria-components/dist/private/Label.mjs
+var MD = /*#__PURE__*/ (0, B.createContext)({}), $oe = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, MD);
+ let { elementType: n = "label", ...r } = e, i = wD[n];
+ return /*#__PURE__*/ B.createElement(i, {
+ className: "react-aria-Label",
+ ...r,
+ ref: t
});
- Hp(() => {
- if (t.current) {
- let e = 100 * i, n = a === "start" ? `${e}% 0px 0px 0px` : `0px ${e}% ${e}% ${e}%`;
- o.current = new IntersectionObserver(s, {
- root: h_(t?.current),
- rootMargin: n
- }), o.current.observe(t.current);
- }
- return () => {
- o.current && o.current.disconnect();
- };
+}), ese = /*#__PURE__*/ (0, B.createContext)(null), ND = /*#__PURE__*/ (0, B.createContext)({}), PD = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, ND);
+ let n = e, { isPending: r } = n, { buttonProps: i, isPressed: a } = Aee(e, t);
+ i = nse(i, r);
+ let { focusProps: o, isFocused: s, isFocusVisible: c } = iy(e), { hoverProps: l, isHovered: u } = cy({
+ ...e,
+ isDisabled: e.isDisabled || r
+ }), d = {
+ isHovered: u,
+ isPressed: (n.isPressed || a) && !r,
+ isFocused: s,
+ isFocusVisible: c,
+ isDisabled: e.isDisabled || !1,
+ isPending: r ?? !1
+ }, f = vD({
+ ...e,
+ values: d,
+ defaultClassName: "react-aria-Button"
+ }), p = dh(i.id), m = dh(), h = i["aria-labelledby"];
+ r && (h ? h = `${h} ${m}` : i["aria-label"] && (h = `${p} ${m}`));
+ let g = (0, B.useRef)(r);
+ (0, B.useEffect)(() => {
+ let e = { "aria-labelledby": h || p };
+ (!g.current && s && r || g.current && s && !r) && f_(e, "assertive"), g.current = r;
}, [
- n,
- t,
- i,
- a
+ r,
+ s,
+ h,
+ p
]);
+ let _ = Eg(e, { global: !0 });
+ return delete _.onClick, /*#__PURE__*/ B.createElement(wD.button, {
+ ...U(_, f, i, o, l),
+ type: i.type === "submit" && r ? "button" : i.type,
+ id: p,
+ ref: t,
+ "aria-labelledby": h,
+ slot: e.slot || void 0,
+ "aria-disabled": r ? "true" : i["aria-disabled"],
+ "data-disabled": e.isDisabled || void 0,
+ "data-pressed": d.isPressed || void 0,
+ "data-hovered": u || void 0,
+ "data-focused": s || void 0,
+ "data-pending": r || void 0,
+ "data-focus-visible": c || void 0
+ }, /*#__PURE__*/ B.createElement(ese.Provider, { value: { id: m } }, f.children));
+}), tse = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
+function nse(e, t) {
+ if (t) {
+ for (let t in e) t.startsWith("on") && !tse.test(t) && (e[t] = void 0);
+ e.href = void 0, e.target = void 0;
+ }
+ return e;
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/ListBox.mjs
-var sO = /*#__PURE__*/ (0, B.createContext)(null), cO = /*#__PURE__*/ (0, B.createContext)(null), Woe = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, sO);
- let n = (0, B.useContext)(cO);
- return n ? /*#__PURE__*/ B.createElement(lO, {
- state: n,
- props: e,
- listBoxRef: t
- }) : /*#__PURE__*/ B.createElement(qh, { content: /*#__PURE__*/ B.createElement(ag, e) }, (n) => /*#__PURE__*/ B.createElement(Goe, {
- props: e,
- listBoxRef: t,
- collection: n
+//#region node_modules/react-aria-components/dist/private/Heading.mjs
+var FD = /*#__PURE__*/ (0, B.createContext)({}), ID = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, FD);
+ let { children: n, level: r = 3, className: i, ...a } = e, o = wD[`h${r}`];
+ return /*#__PURE__*/ B.createElement(o, {
+ ...a,
+ ref: t,
+ className: i ?? "react-aria-Heading"
+ }, n);
+}), LD = /*#__PURE__*/ (0, B.createContext)({}), rse = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, LD);
+ let { elementType: n = "span", ...r } = e, i = wD[n];
+ return /*#__PURE__*/ B.createElement(i, {
+ className: "react-aria-Text",
+ ...r,
+ ref: t
+ });
+}), RD = /*#__PURE__*/ (0, B.createContext)(null), zD = /*#__PURE__*/ (0, B.createContext)(null), BD = /*#__PURE__*/ (0, B.createContext)(null), VD = /*#__PURE__*/ (0, B.createContext)(null), ise = /*#__PURE__*/ (0, B.createContext)(null), HD = /*#__PURE__*/ (0, B.createContext)(null);
+function ase(e, t) {
+ let { validationBehavior: n } = yD(zD) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, B.useContext)(ise), a = Nh((0, B.useMemo)(() => mh(t, e.inputRef === void 0 ? null : e.inputRef), [t, e.inputRef])), o = {
+ ...SD(e),
+ children: typeof e.children == "function" || e.children,
+ value: e.value,
+ validationBehavior: r
+ };
+ return [i ? $ee(o, i, a) : N_(o, R_(e), a), a];
+}
+var ose = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { inputRef: n = null, ...r } = e;
+ [e, t] = bD(r, t, BD);
+ let [i, a] = ase(e, n);
+ return /*#__PURE__*/ B.createElement(HD.Provider, { value: {
+ ...i,
+ inputRef: a,
+ defaultClassName: "react-aria-Checkbox",
+ isIndeterminate: e.isIndeterminate,
+ isRequired: e.isRequired
+ } }, /*#__PURE__*/ B.createElement(sse, {
+ ...e,
+ ref: t
}));
-});
-function Goe({ props: e, listBoxRef: t, collection: n }) {
- e = {
+}), sse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isIndeterminate: d, isRequired: f } = (0, B.useContext)(HD), { isFocused: p, isFocusVisible: m, focusProps: h } = iy(), g = a || o, { hoverProps: _, isHovered: v } = cy({
...e,
- collection: n,
- children: null,
- items: null
- };
- let { layoutDelegate: r } = (0, B.useContext)(GE), i = iO({
+ isDisabled: g
+ }), y = vD({
...e,
- layoutDelegate: r
- });
- return /*#__PURE__*/ B.createElement(lO, {
- state: i,
- props: e,
- listBoxRef: t
- });
-}
-function lO({ state: e, props: t, listBoxRef: n }) {
- [t, n] = FE(t, n, BE);
- let { dragAndDropHooks: r, layout: i = "stack", orientation: a = "vertical", filter: o } = t, s = Uoe(e, o), { collection: c, selectionManager: l } = s, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: f } = vg(), { disabledBehavior: p, disabledKeys: m } = l, h = Xv({
- usage: "search",
- sensitivity: "base"
- }), { isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v, CollectionRoot: y } = (0, B.useContext)(GE), b = (0, B.useMemo)(() => t.keyboardDelegate || new Q_({
- collection: c,
- collator: h,
- ref: n,
- disabledKeys: m,
- disabledBehavior: p,
- layout: i,
- orientation: a,
- direction: f,
- layoutDelegate: _
- }), [
- c,
- h,
- n,
- p,
- m,
- a,
- f,
- t.keyboardDelegate,
- i,
- _
- ]), { listBoxProps: x } = Ete({
- ...t,
- shouldSelectOnPressUp: u || t.shouldSelectOnPressUp,
- keyboardDelegate: b,
- isVirtualized: g
- }, s, n);
- (0, B.useRef)(u), (0, B.useRef)(d), (0, B.useEffect)(() => {}, [u, d]);
- let S, C, w, T = !1, E = null, D = (0, B.useRef)(null);
- if (u && r) {
- S = r.useDraggableCollectionState({
- collection: c,
- selectionManager: l,
- preview: r.renderDragPreview ? D : void 0
- }), r.useDraggableCollection({}, S, n);
- let e = r.DragPreview;
- E = r.renderDragPreview ? /*#__PURE__*/ B.createElement(e, { ref: D }, r.renderDragPreview) : null;
- }
- if (d && r) {
- C = r.useDroppableCollectionState({
- collection: c,
- selectionManager: l
- });
- let e = r.dropTargetDelegate || v || new r.ListDropTargetDelegate(c, n, {
- orientation: a,
- layout: i,
- direction: f
- });
- w = r.useDroppableCollection({
- keyboardDelegate: b,
- dropTargetDelegate: e
- }, C, n), T = C.isDropTarget({ type: "root" });
- }
- let { focusProps: O, isFocused: k, isFocusVisible: A } = ry(), j = s.collection.size === 0, M = {
- isDropTarget: T,
- isEmpty: j,
- isFocused: k,
- isFocusVisible: A,
- layout: t.layout || "stack",
- orientation: a,
- state: s
- }, N = NE({
- ...t,
- children: void 0,
- defaultClassName: "react-aria-ListBox",
- values: M
- }), P = null;
- j && t.renderEmptyState && (P = /*#__PURE__*/ B.createElement("div", {
- role: "option",
- style: { display: "contents" }
- }, t.renderEmptyState(M)));
- let ee = Eg(t, { global: !0 });
- return /*#__PURE__*/ B.createElement(Yg, null, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(ee, N, x, O, w?.collectionProps),
- ref: n,
- slot: t.slot || void 0,
- onScroll: t.onScroll,
- "data-drop-target": T || void 0,
- "data-empty": j || void 0,
- "data-focused": k || void 0,
- "data-focus-visible": A || void 0,
- "data-layout": t.layout || "stack",
- "data-orientation": a
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [sO, t],
- [cO, s],
- [VD, {
- dragAndDropHooks: r,
- dragState: S,
- dropState: C
- }],
- [JD, { elementType: "div" }],
- [HD, { render: Joe }],
- [HE, {
- name: "ListBoxSection",
- render: Koe
- }]
- ] }, /*#__PURE__*/ B.createElement(KD, null, /*#__PURE__*/ B.createElement(y, {
- collection: c,
- scrollRef: n,
- persistedKeys: WD(l, r, C),
- renderDropIndicator: UD(r, C)
- }))), P, E));
-}
-function Koe(e, t, n, r = "react-aria-ListBoxSection") {
- let i = (0, B.useContext)(cO), { dragAndDropHooks: a, dropState: o } = (0, B.useContext)(VD), { CollectionBranch: s } = (0, B.useContext)(GE), [c, l] = IE(), { headingProps: u, groupProps: d } = Dte({
- heading: l,
- "aria-label": e["aria-label"] ?? void 0
- }), f = NE({
- ...e,
- id: void 0,
- children: void 0,
- defaultClassName: r,
- values: void 0
- }), p = Eg(e, { global: !0 });
- return delete p.id, /*#__PURE__*/ B.createElement(zE.section, {
- ...U(p, f, d),
- ref: t
- }, /*#__PURE__*/ B.createElement(GD.Provider, { value: {
- ...u,
- ref: c
- } }, /*#__PURE__*/ B.createElement(s, {
- collection: i.collection,
- parent: n,
- renderDropIndicator: UD(a, o)
- })));
-}
-var qoe = /*#__PURE__*/ tg(ip, function(e, t, n) {
- let r = Nh(t), i = (0, B.useContext)(cO), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, B.useContext)(VD), c = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { optionProps: l, labelProps: u, descriptionProps: d, ...f } = Ote({
- key: n.key,
- "aria-label": e?.["aria-label"]
- }, i, r), { hoverProps: p, isHovered: m } = sy({
- isDisabled: !f.allowsSelection && !f.hasAction && !c,
- onHoverStart: n.props.onHoverStart,
- onHoverChange: n.props.onHoverChange,
- onHoverEnd: n.props.onHoverEnd
- }), { keyboardProps: h } = Mh(e), { focusProps: g } = vh(e), _ = null;
- o && a && (_ = a.useDraggableItem({
- key: n.key,
- hasAction: f.hasAction
- }, o));
- let v = null;
- s && a && (v = a.useDroppableItem({ target: {
- type: "item",
- key: n.key,
- dropPosition: "on"
- } }, s, r));
- let y = o && o.isDragging(n.key), b = NE({
- ...e,
- id: void 0,
- children: e.children,
- defaultClassName: "react-aria-ListBoxItem",
+ defaultClassName: u,
values: {
- ...f,
- isHovered: m,
- selectionMode: i.selectionManager.selectionMode,
- selectionBehavior: i.selectionManager.selectionBehavior,
- allowsDragging: !!o,
- isDragging: y,
- isDropTarget: v?.isDropTarget
+ isSelected: i,
+ isIndeterminate: d || !1,
+ isPressed: s,
+ isHovered: v,
+ isFocused: p,
+ isFocusVisible: m,
+ isDisabled: a,
+ isReadOnly: o,
+ isInvalid: c,
+ isRequired: f || !1
}
- });
- (0, B.useEffect)(() => {
- n.textValue;
- }, [n.textValue]);
- let x = e.href ? zE.a : zE.div, S = Eg(e, { global: !0 });
- return delete S.id, delete S.onClick, e.href && l.tabIndex == null && (l.tabIndex = -1), /*#__PURE__*/ B.createElement(x, {
- ...U(S, b, l, p, h, g, _?.dragProps, v?.dropProps),
- ref: r,
- "data-allows-dragging": !!o || void 0,
- "data-selected": f.isSelected || void 0,
- "data-disabled": f.isDisabled || void 0,
- "data-hovered": m || void 0,
- "data-focused": f.isFocused || void 0,
- "data-focus-visible": f.isFocusVisible || void 0,
- "data-pressed": f.isPressed || void 0,
- "data-dragging": y || void 0,
- "data-drop-target": v?.isDropTarget || void 0,
- "data-selection-mode": i.selectionManager.selectionMode === "none" ? void 0 : i.selectionManager.selectionMode
- }, /*#__PURE__*/ B.createElement(ME, { values: [[QE, { slots: {
- [jE]: u,
- label: u,
- description: d
- } }], [qD, { isSelected: f.isSelected }]] }, b.children));
-});
-function Joe(e, t) {
- t = Nh(t);
- let { dragAndDropHooks: n, dropState: r } = (0, B.useContext)(VD), { dropIndicatorProps: i, isHidden: a, isDropTarget: o } = n.useDropIndicator(e, r, t);
- return a ? null : /*#__PURE__*/ B.createElement(Xoe, {
+ }), b = Eg(e, { global: !0 });
+ return delete b.id, delete b.onClick, /*#__PURE__*/ B.createElement(wD.label, {
+ ...U(b, n, _, y),
+ ref: t,
+ slot: e.slot || void 0,
+ "data-selected": i || void 0,
+ "data-indeterminate": d || void 0,
+ "data-pressed": s || void 0,
+ "data-hovered": v || void 0,
+ "data-focused": p || void 0,
+ "data-focus-visible": m || void 0,
+ "data-disabled": a || void 0,
+ "data-readonly": o || void 0,
+ "data-invalid": c || void 0,
+ "data-required": f || void 0
+ }, /*#__PURE__*/ B.createElement(H_, { elementType: "span" }, /*#__PURE__*/ B.createElement("input", {
+ ...U(r, h),
+ ref: l
+ })), y.children);
+}), UD = /*#__PURE__*/ (0, B.createContext)({}), cse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, UD);
+ let { isDisabled: n, isInvalid: r, isReadOnly: i, onHoverStart: a, onHoverChange: o, onHoverEnd: s, ...c } = e;
+ n ??= !!e["aria-disabled"] && e["aria-disabled"] !== "false", r ??= !!e["aria-invalid"] && e["aria-invalid"] !== "false";
+ let { hoverProps: l, isHovered: u } = cy({
+ onHoverStart: a,
+ onHoverChange: o,
+ onHoverEnd: s,
+ isDisabled: n
+ }), { isFocused: d, isFocusVisible: f, focusProps: p } = iy({ within: !0 }), m = vD({
...e,
- dropIndicatorProps: i,
- isDropTarget: o,
- ref: t
+ values: {
+ isHovered: u,
+ isFocusWithin: d,
+ isFocusVisible: f,
+ isDisabled: n,
+ isInvalid: r
+ },
+ defaultClassName: "react-aria-Group"
});
-}
-function Yoe(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, ...i } = e, a = NE({
- ...i,
- defaultClassName: "react-aria-DropIndicator",
- values: { isDropTarget: r }
+ return /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(c, p, l),
+ ...m,
+ ref: t,
+ role: e.role ?? "group",
+ slot: e.slot ?? void 0,
+ "data-focus-within": d || void 0,
+ "data-hovered": u || void 0,
+ "data-focus-visible": f || void 0,
+ "data-disabled": n || void 0,
+ "data-invalid": r || void 0,
+ "data-readonly": i || void 0
+ }, m.children);
+}), WD = /*#__PURE__*/ (0, B.createContext)({}), lse = (e) => {
+ let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, ...i } = e;
+ return i;
+}, use = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, WD);
+ let { hoverProps: n, isHovered: r } = cy({
+ ...e,
+ isDisabled: e.disabled
+ }), { isFocused: i, isFocusVisible: a, focusProps: o } = iy({
+ isTextInput: !0,
+ autoFocus: e.autoFocus
+ }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = vD({
+ ...e,
+ values: {
+ isHovered: r,
+ isFocused: i,
+ isFocusVisible: a,
+ isDisabled: e.disabled || !1,
+ isInvalid: s
+ },
+ defaultClassName: "react-aria-Input"
});
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(zE.div, {
- ...n,
- ...a,
- role: "option",
+ return /*#__PURE__*/ B.createElement(wD.input, {
+ ...U(lse(e), o, n),
+ ...c,
ref: t,
- "data-drop-target": r || void 0
- }));
-}
-var Xoe = /*#__PURE__*/ (0, B.forwardRef)(Yoe);
-tg(rp, function(e, t, n) {
- let r = (0, B.useContext)(cO), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, B.useRef)(null);
- oO((0, B.useMemo)(() => ({
- onLoadMore: a,
- collection: r?.collection,
- sentinelRef: c,
- scrollOffset: o
- }), [
- a,
- o,
- r?.collection
- ]), c);
- let l = NE({
- ...s,
- id: void 0,
- children: n.rendered,
- defaultClassName: "react-aria-ListBoxLoadingIndicator",
- values: void 0
+ "data-focused": i || void 0,
+ "data-disabled": e.disabled || void 0,
+ "data-hovered": r || void 0,
+ "data-focus-visible": a || void 0,
+ "data-invalid": s || void 0
});
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement("div", {
- style: {
- position: "relative",
- width: 0,
- height: 0
- },
- inert: YD(!0)
- }, /*#__PURE__*/ B.createElement("div", {
- "data-testid": "loadMoreSentinel",
- ref: c,
- style: {
- position: "absolute",
- height: 1,
- width: 1
- }
- })), i && l.children && /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(Eg(e, { global: !0 }), { tabIndex: -1 }),
- ...l,
- role: "option",
- ref: t
- }, l.children)));
-});
+}), GD = {};
+GD = {
+ colorSwatchPicker: "تغييرات الألوان",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "حدد عنصرًا",
+ tableResizer: "أداة تغيير الحجم"
+};
//#endregion
-//#region node_modules/react-aria-components/dist/private/OverlayArrow.mjs
-var Zoe = /*#__PURE__*/ (0, B.createContext)({ placement: "bottom" });
+//#region node_modules/react-aria-components/dist/private/intl/bg-BG.mjs
+var KD = {};
+KD = {
+ colorSwatchPicker: "Цветови мостри",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Изберете предмет",
+ tableResizer: "Преоразмерител"
+};
//#endregion
-//#region node_modules/react-stately/dist/private/overlays/useOverlayTriggerState.mjs
-function uO(e) {
- let [t, n] = L_(e.isOpen, e.defaultOpen || !1, e.onOpenChange), [r, i] = (0, B.useState)(null);
- return {
- isOpen: t,
- setOpen: n,
- open: (0, B.useCallback)(() => {
- n(!0);
- }, [n]),
- close: (0, B.useCallback)(() => {
- n(!1);
- }, [n]),
- toggle: (0, B.useCallback)(() => {
- n(!t);
- }, [n, t]),
- point: r,
- setPoint: i
- };
-}
+//#region node_modules/react-aria-components/dist/private/intl/cs-CZ.mjs
+var qD = {};
+qD = {
+ colorSwatchPicker: "Vzorky barev",
+ dropzoneLabel: "Místo pro přetažení",
+ selectPlaceholder: "Vyberte položku",
+ tableResizer: "Změna velikosti"
+};
//#endregion
-//#region node_modules/react-aria/dist/private/utils/animation.mjs
-function dO(e, t = !0) {
- let [n, r] = (0, B.useState)(!0), i = n && t;
- return Hp(() => {
- if (i && e.current && "getAnimations" in e.current) for (let t of e.current.getAnimations()) t instanceof CSSTransition && t.cancel();
- }, [e, i]), pO(e, i, (0, B.useCallback)(() => r(!1), [])), i;
-}
-function fO(e, t) {
- let [n, r] = (0, B.useState)(t ? "open" : "closed");
- switch (n) {
- case "open":
- t || r("exiting");
- break;
- case "closed":
- case "exiting": t && r("open");
- }
- let i = n === "exiting";
- return pO(e, i, (0, B.useCallback)(() => {
- r((e) => e === "exiting" ? "closed" : e);
- }, [])), i;
-}
-function pO(e, t, n) {
- Hp(() => {
- if (t && e.current) {
- if (!("getAnimations" in e.current)) {
- n();
- return;
- }
- let t = e.current.getAnimations();
- if (t.length === 0) {
- n();
- return;
- }
- let r = !1;
- return Promise.allSettled(t.map((e) => e.finished)).then(() => {
- r || (0, $f.flushSync)(() => {
- n();
- });
- }), () => {
- r = !0;
- };
- }
- }, [
- e,
- t,
- n
- ]);
-}
+//#region node_modules/react-aria-components/dist/private/intl/da-DK.mjs
+var JD = {};
+JD = {
+ colorSwatchPicker: "Farveprøver",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Vælg et element",
+ tableResizer: "Størrelsesændring"
+};
//#endregion
-//#region node_modules/react-aria-components/dist/private/Popover.mjs
-var mO = /*#__PURE__*/ (0, B.createContext)(null), hO = /*#__PURE__*/ (0, B.createContext)(null), gO = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, mO);
- let n = (0, B.useContext)(EO), r = uO(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = fO(t, i.isOpen), o = e.isExiting || !e.shouldSkipAnimation && a || !1, s = Vh(), { direction: c } = vg();
- if (s) {
- let t = e.children;
- return typeof t == "function" && (t = t({
- trigger: e.trigger || null,
- placement: "bottom",
- isEntering: !1,
- isExiting: !1,
- defaultChildren: null
- })), /*#__PURE__*/ B.createElement(B.Fragment, null, t);
- }
- return i && !i.isOpen && !o ? null : /*#__PURE__*/ B.createElement(Qoe, {
- ...e,
- triggerRef: e.triggerRef,
- state: i,
- popoverRef: t,
- isExiting: o,
- dir: c
- });
-});
-function Qoe({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContexts: r, ...i }) {
- let a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useContext)(hO), c = s && i.trigger === "SubmenuTrigger", { popoverProps: l, underlayProps: u, arrowProps: d, placement: f, triggerAnchorPoint: p } = Jte({
- ...i,
- offset: i.offset ?? 8,
- arrowRef: a,
- groupRef: c ? s : o
- }, e), m = i.popoverRef, h = dO(m, !!f), g = i.isEntering || !i.shouldSkipAnimation && h || !1, _ = NE({
- ...i,
- defaultClassName: "react-aria-Popover",
- values: {
- trigger: i.trigger || null,
- placement: f,
- isEntering: g,
- isExiting: t
- }
- }), v = !i.isNonModal || i.trigger === "SubmenuTrigger" || i.trigger === "PreviewTrigger", [y, b] = (0, B.useState)(i.trigger === "PreviewTrigger");
- Hp(() => {
- m.current && b(v && !m.current.querySelector("[role=dialog]"));
- }, [m, v]), (0, B.useEffect)(() => {
- y && i.trigger !== "PreviewTrigger" && (i.trigger !== "SubmenuTrigger" || Km() !== "pointer") && m.current && !jp(m.current) && ih(m.current);
- }, [
- y,
- m,
- i.trigger
- ]);
- let x = (0, B.useMemo)(() => {
- let e = _.children;
- if (r) for (let t of r) e = /*#__PURE__*/ B.createElement(t.Provider, { value: null }, e);
- return e;
- }, [_.children, r]), [S, C] = (0, B.useState)(null), w = (0, B.useCallback)(() => {
- i.triggerRef.current && C(i.triggerRef.current.getBoundingClientRect().width + "px");
- }, [i.triggerRef]);
- Hp(w, [w]), Zy({
- ref: _.style?.["--trigger-width"] ? void 0 : i.triggerRef,
- onResize: w
- });
- let T = {
- ...l.style,
- "--trigger-anchor-point": p ? `${p.x}px ${p.y}px` : void 0,
- ..._.style,
- "--trigger-width": _.style?.["--trigger-width"] || S
- }, E = /*#__PURE__*/ B.createElement(zE.div, {
- ...U(Eg(i, { global: !0 }), l),
- ..._,
- id: y ? i.id : void 0,
- role: y ? "dialog" : void 0,
- tabIndex: y ? -1 : void 0,
- "aria-label": i["aria-label"],
- "aria-labelledby": i["aria-labelledby"],
- ref: m,
- slot: i.slot || void 0,
- style: T,
- dir: i.dir,
- "data-trigger": i.trigger,
- "data-placement": f,
- "data-entering": g || void 0,
- "data-exiting": t || void 0
- }, !i.isNonModal && /*#__PURE__*/ B.createElement(Nb, { onDismiss: e.close }), /*#__PURE__*/ B.createElement(Zoe.Provider, { value: {
- ...d,
- placement: f,
- ref: a
- } }, x), /*#__PURE__*/ B.createElement(Nb, { onDismiss: e.close }));
- return c ? /*#__PURE__*/ B.createElement(ty, {
- ...i,
- shouldContainFocus: y && i.trigger !== "PreviewTrigger",
- isExiting: t,
- portalContainer: n ?? s?.current ?? void 0
- }, E) : /*#__PURE__*/ B.createElement(ty, {
- ...i,
- shouldContainFocus: y && i.trigger !== "PreviewTrigger",
- isExiting: t,
- portalContainer: n
- }, !i.isNonModal && e.isOpen && /*#__PURE__*/ B.createElement("div", {
- "data-testid": "underlay",
- ...u,
- style: {
- position: "fixed",
- inset: 0
- }
- }), /*#__PURE__*/ B.createElement("div", {
- ref: o,
- style: { display: "contents" }
- }, /*#__PURE__*/ B.createElement(hO.Provider, { value: o }, E)));
-}
+//#region node_modules/react-aria-components/dist/private/intl/de-DE.mjs
+var YD = {};
+YD = {
+ colorSwatchPicker: "Farbfelder",
+ dropzoneLabel: "Ablegebereich",
+ selectPlaceholder: "Element wählen",
+ tableResizer: "Größenanpassung"
+};
//#endregion
-//#region node_modules/react-aria-components/dist/private/Keyboard.mjs
-var $oe = /*#__PURE__*/ (0, B.createContext)({});
+//#region node_modules/react-aria-components/dist/private/intl/el-GR.mjs
+var XD = {};
+XD = {
+ colorSwatchPicker: "Χρωματικά δείγματα",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Επιλέξτε ένα αντικείμενο",
+ tableResizer: "Αλλαγή μεγέθους"
+};
//#endregion
-//#region node_modules/react-stately/dist/private/menu/useMenuTriggerState.mjs
-function _O(e) {
- let t = uO(e), [n, r] = (0, B.useState)(null), [i, a] = (0, B.useState)([]), o = () => {
- a([]), t.close();
- }, s = (e, t) => {
- a((n) => t > n.length ? n : [...n.slice(0, t), e]);
- }, c = (e, t) => {
- a((n) => n[t] === e ? n.slice(0, t) : n);
- };
- return {
- focusStrategy: n,
- ...t,
- open(e = null) {
- r(e), t.open();
- },
- toggle(e = null) {
- r(e), t.toggle();
- },
- close() {
- o();
- },
- expandedKeysStack: i,
- openSubmenu: s,
- closeSubmenu: c
- };
-}
+//#region node_modules/react-aria-components/dist/private/intl/en-US.mjs
+var ZD = {};
+ZD = {
+ selectPlaceholder: "Select an item",
+ tableResizer: "Resizer",
+ dropzoneLabel: "DropZone",
+ colorSwatchPicker: "Color swatches"
+};
//#endregion
-//#region node_modules/react-stately/dist/private/tree/TreeCollection.mjs
-var ese = class {
- constructor(e, { expandedKeys: t } = {}) {
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e, t ||= /* @__PURE__ */ new Set();
- let n = (e) => {
- if (this.keyMap.set(e.key, e), e.childNodes && (e.type === "section" || t.has(e.key))) for (let t of e.childNodes) n(t);
- };
- for (let t of e) n(t);
- let r = null, i = 0;
- for (let [e, t] of this.keyMap) r ? (r.nextKey = e, t.prevKey = r.key) : (this.firstKey = e, t.prevKey = void 0), t.type === "item" && (t.index = i++), r = t, r.nextKey = void 0;
- this.lastKey = r?.key ?? null;
- }
- *[Symbol.iterator]() {
- yield* this.iterable;
- }
- get size() {
- return this.keyMap.size;
- }
- getKeys() {
- return this.keyMap.keys();
- }
- getKeyBefore(e) {
- let t = this.keyMap.get(e);
- return t ? t.prevKey ?? null : null;
- }
- getKeyAfter(e) {
- let t = this.keyMap.get(e);
- return t ? t.nextKey ?? null : null;
- }
- getFirstKey() {
+//#region node_modules/react-aria-components/dist/private/intl/es-ES.mjs
+var QD = {};
+QD = {
+ colorSwatchPicker: "Muestras de colores",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Seleccionar un artículo",
+ tableResizer: "Cambiador de tamaño"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/et-EE.mjs
+var $D = {};
+$D = {
+ colorSwatchPicker: "Värvinäidised",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Valige üksus",
+ tableResizer: "Suuruse muutja"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/fi-FI.mjs
+var eO = {};
+eO = {
+ colorSwatchPicker: "Värimallit",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Valitse kohde",
+ tableResizer: "Koon muuttaja"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/fr-FR.mjs
+var tO = {};
+tO = {
+ colorSwatchPicker: "Échantillons de couleurs",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Sélectionner un élément",
+ tableResizer: "Redimensionneur"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/he-IL.mjs
+var nO = {};
+nO = {
+ colorSwatchPicker: "דוגמיות צבע",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "בחר פריט",
+ tableResizer: "שינוי גודל"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/hr-HR.mjs
+var rO = {};
+rO = {
+ colorSwatchPicker: "Uzorci boja",
+ dropzoneLabel: "Zona spuštanja",
+ selectPlaceholder: "Odaberite stavku",
+ tableResizer: "Promjena veličine"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/hu-HU.mjs
+var iO = {};
+iO = {
+ colorSwatchPicker: "Színtárak",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Válasszon ki egy elemet",
+ tableResizer: "Átméretező"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/it-IT.mjs
+var aO = {};
+aO = {
+ colorSwatchPicker: "Campioni di colore",
+ dropzoneLabel: "Zona di rilascio",
+ selectPlaceholder: "Seleziona un elemento",
+ tableResizer: "Ridimensionamento"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/ja-JP.mjs
+var oO = {};
+oO = {
+ colorSwatchPicker: "カラースウォッチ",
+ dropzoneLabel: "ドロップゾーン",
+ selectPlaceholder: "項目を選択",
+ tableResizer: "サイズ変更ツール"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/ko-KR.mjs
+var sO = {};
+sO = {
+ colorSwatchPicker: "색상 견본",
+ dropzoneLabel: "드롭 영역",
+ selectPlaceholder: "항목 선택",
+ tableResizer: "크기 조정기"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/lt-LT.mjs
+var cO = {};
+cO = {
+ colorSwatchPicker: "Spalvų pavyzdžiai",
+ dropzoneLabel: "„DropZone“",
+ selectPlaceholder: "Pasirinkite elementą",
+ tableResizer: "Dydžio keitiklis"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/lv-LV.mjs
+var lO = {};
+lO = {
+ colorSwatchPicker: "Krāsu paraugi",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Izvēlēties vienumu",
+ tableResizer: "Izmēra mainītājs"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/nb-NO.mjs
+var uO = {};
+uO = {
+ colorSwatchPicker: "Fargekart",
+ dropzoneLabel: "Droppsone",
+ selectPlaceholder: "Velg et element",
+ tableResizer: "Størrelsesendrer"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/nl-NL.mjs
+var dO = {};
+dO = {
+ colorSwatchPicker: "kleurstalen",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Selecteer een item",
+ tableResizer: "Resizer"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/pl-PL.mjs
+var fO = {};
+fO = {
+ colorSwatchPicker: "Próbki kolorów",
+ dropzoneLabel: "Strefa upuszczania",
+ selectPlaceholder: "Wybierz element",
+ tableResizer: "Zmiana rozmiaru"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/pt-BR.mjs
+var pO = {};
+pO = {
+ colorSwatchPicker: "Amostras de cores",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Selecione um item",
+ tableResizer: "Redimensionador"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/pt-PT.mjs
+var mO = {};
+mO = {
+ colorSwatchPicker: "Amostras de cores",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Selecione um item",
+ tableResizer: "Redimensionador"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/ro-RO.mjs
+var hO = {};
+hO = {
+ colorSwatchPicker: "Specimene de culoare",
+ dropzoneLabel: "Zonă de plasare",
+ selectPlaceholder: "Selectați un element",
+ tableResizer: "Instrument de redimensionare"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/ru-RU.mjs
+var gO = {};
+gO = {
+ colorSwatchPicker: "Цветовые образцы",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Выберите элемент",
+ tableResizer: "Средство изменения размера"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/sk-SK.mjs
+var _O = {};
+_O = {
+ colorSwatchPicker: "Vzorkovníky farieb",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Vyberte položku",
+ tableResizer: "Nástroj na zmenu veľkosti"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/sl-SI.mjs
+var vO = {};
+vO = {
+ colorSwatchPicker: "Barvne palete",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Izberite element",
+ tableResizer: "Spreminjanje velikosti"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/sr-SP.mjs
+var yO = {};
+yO = {
+ colorSwatchPicker: "Uzorci boje",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Izaberite stavku",
+ tableResizer: "Promena veličine"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/sv-SE.mjs
+var bO = {};
+bO = {
+ colorSwatchPicker: "Färgrutor",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Välj en artikel",
+ tableResizer: "Storleksändrare"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/tr-TR.mjs
+var xO = {};
+xO = {
+ colorSwatchPicker: "Renk örnekleri",
+ dropzoneLabel: "Bırakma Bölgesi",
+ selectPlaceholder: "Bir öğe seçin",
+ tableResizer: "Yeniden boyutlandırıcı"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/uk-UA.mjs
+var SO = {};
+SO = {
+ colorSwatchPicker: "Зразки кольорів",
+ dropzoneLabel: "DropZone",
+ selectPlaceholder: "Виберіть елемент",
+ tableResizer: "Засіб змінення розміру"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/zh-CN.mjs
+var CO = {};
+CO = {
+ colorSwatchPicker: "颜色色板",
+ dropzoneLabel: "放置区域",
+ selectPlaceholder: "选择一个项目",
+ tableResizer: "尺寸调整器"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intl/zh-TW.mjs
+var wO = {};
+wO = {
+ colorSwatchPicker: "色票",
+ dropzoneLabel: "放置區",
+ selectPlaceholder: "選取項目",
+ tableResizer: "大小調整器"
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/intlStrings.mjs
+var TO = {};
+TO = {
+ "ar-AE": GD,
+ "bg-BG": KD,
+ "cs-CZ": qD,
+ "da-DK": JD,
+ "de-DE": YD,
+ "el-GR": XD,
+ "en-US": ZD,
+ "es-ES": QD,
+ "et-EE": $D,
+ "fi-FI": eO,
+ "fr-FR": tO,
+ "he-IL": nO,
+ "hr-HR": rO,
+ "hu-HU": iO,
+ "it-IT": aO,
+ "ja-JP": oO,
+ "ko-KR": sO,
+ "lt-LT": cO,
+ "lv-LV": lO,
+ "nb-NO": uO,
+ "nl-NL": dO,
+ "pl-PL": fO,
+ "pt-BR": pO,
+ "pt-PT": mO,
+ "ro-RO": hO,
+ "ru-RU": gO,
+ "sk-SK": _O,
+ "sl-SI": vO,
+ "sr-SP": yO,
+ "sv-SE": bO,
+ "tr-TR": xO,
+ "uk-UA": SO,
+ "zh-CN": CO,
+ "zh-TW": wO
+};
+//#endregion
+//#region node_modules/react-aria-components/dist/private/DragAndDrop.mjs
+var EO = /*#__PURE__*/ (0, B.createContext)({}), DO = /*#__PURE__*/ (0, B.createContext)(null), dse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { render: n } = (0, B.useContext)(DO);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, n(e, t));
+});
+function OO(e, t) {
+ let n = e?.renderDropIndicator, r = e?.isVirtualDragging?.(), i = (0, B.useCallback)((e) => {
+ if (r || t?.isDropTarget(e)) return n ? n(e) : /*#__PURE__*/ B.createElement(dse, { target: e });
+ }, [
+ t?.target,
+ r,
+ n
+ ]);
+ return e?.useDropIndicator ? i : void 0;
+}
+function kO(e, t, n) {
+ let r = e.focusedKey, i = null;
+ if (t?.isVirtualDragging?.() && n?.target?.type === "item" && (i = n.target.key, n.target.dropPosition === "after")) {
+ let e = n.collection.getKeyAfter(i), t = null;
+ if (e != null) {
+ let r = n.collection.getItem(i)?.level ?? 0;
+ for (; e != null;) {
+ let i = n.collection.getItem(e);
+ if (!i) break;
+ if (i.type !== "item") {
+ e = n.collection.getKeyAfter(e);
+ continue;
+ }
+ if ((i.level ?? 0) <= r) break;
+ t = e, e = n.collection.getKeyAfter(e);
+ }
+ }
+ i = e ?? t ?? i;
+ }
+ return (0, B.useMemo)(() => new Set([r, i].filter((e) => e != null)), [r, i]);
+}
+//#endregion
+//#region node_modules/react-aria-components/dist/private/Header.mjs
+var AO = /*#__PURE__*/ (0, B.createContext)({}), fse = /*#__PURE__*/ (0, B.createContext)(null);
+function jO(e) {
+ let t = (0, B.useRef)({});
+ return /*#__PURE__*/ B.createElement(fse.Provider, { value: t }, e.children);
+}
+//#endregion
+//#region node_modules/react-aria-components/dist/private/SelectionIndicator.mjs
+var MO = /*#__PURE__*/ (0, B.createContext)({ isSelected: !1 }), NO = /*#__PURE__*/ (0, B.createContext)({}), pse = /*#__PURE__*/ tg(class extends tp {
+ static {
+ this.type = "separator";
+ }
+ filter(e, t) {
+ let n = t.getItem(this.prevKey);
+ if (n && n.type !== "separator") {
+ let n = this.clone();
+ return t.addDescendants(n, e), n;
+ }
+ return null;
+ }
+}, function(e, t) {
+ [e, t] = bD(e, t, NO);
+ let { elementType: n, orientation: r, style: i, className: a, slot: o, ...s } = e, c = n || "hr";
+ c === "hr" && r === "vertical" && (c = "div");
+ let l = wD[c], { separatorProps: u } = $te({
+ ...s,
+ elementType: n,
+ orientation: r
+ }), d = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(l, {
+ render: e.render,
+ ...U(d, u),
+ style: i,
+ className: a ?? "react-aria-Separator",
+ ref: t,
+ slot: o || void 0
+ });
+});
+//#endregion
+//#region node_modules/react-aria/dist/private/utils/inertValue.mjs
+function PO(e) {
+ let t = B.version.split(".");
+ return parseInt(t[0], 10) >= 19 ? e : e ? "true" : void 0;
+}
+//#endregion
+//#region node_modules/react-stately/dist/private/list/ListCollection.mjs
+var FO = class {
+ constructor(e) {
+ this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
+ let t = (e) => {
+ if (this.keyMap.set(e.key, e), e.childNodes && e.type === "section") for (let n of e.childNodes) t(n);
+ };
+ for (let n of e) t(n);
+ let n = null, r = 0, i = 0;
+ for (let [e, t] of this.keyMap) n ? (n.nextKey = e, t.prevKey = n.key) : (this.firstKey = e, t.prevKey = void 0), t.type === "item" && (t.index = r++), (t.type === "section" || t.type === "item") && i++, n = t, n.nextKey = void 0;
+ this._size = i, this.lastKey = n?.key ?? null;
+ }
+ *[Symbol.iterator]() {
+ yield* this.iterable;
+ }
+ get size() {
+ return this._size;
+ }
+ getKeys() {
+ return this.keyMap.keys();
+ }
+ getKeyBefore(e) {
+ let t = this.keyMap.get(e);
+ return t ? t.prevKey ?? null : null;
+ }
+ getKeyAfter(e) {
+ let t = this.keyMap.get(e);
+ return t ? t.nextKey ?? null : null;
+ }
+ getFirstKey() {
return this.firstKey;
}
getLastKey() {
@@ -21110,966 +20975,1004 @@ var ese = class {
let t = [...this.getKeys()];
return this.getItem(t[e]);
}
+ getChildren(e) {
+ return this.keyMap.get(e)?.childNodes || [];
+ }
+}, IO = class e extends Set {
+ constructor(t, n, r) {
+ super(t), t instanceof e ? (this.anchorKey = n ?? t.anchorKey, this.currentKey = r ?? t.currentKey) : (this.anchorKey = n ?? null, this.currentKey = r ?? null);
+ }
};
//#endregion
-//#region node_modules/react-stately/dist/private/tree/useTreeState.mjs
-function tse(e) {
- let { onExpandedChange: t } = e, [n, r] = L_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), t), i = QD(e), a = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), o = rO(e, (0, B.useCallback)((e) => new ese(e, { expandedKeys: n }), [n]), null);
+//#region node_modules/react-stately/dist/private/selection/useMultipleSelectionState.mjs
+function mse(e, t) {
+ if (e.size !== t.size) return !1;
+ for (let n of e) if (!t.has(n)) return !1;
+ return !0;
+}
+function LO(e) {
+ let { selectionMode: t = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = e, o = (0, B.useRef)(!1), [, s] = (0, B.useState)(!1), c = (0, B.useRef)(null), l = (0, B.useRef)(null), [, u] = (0, B.useState)(null), [d, f] = L_((0, B.useMemo)(() => RO(e.selectedKeys), [e.selectedKeys]), (0, B.useMemo)(() => RO(e.defaultSelectedKeys, new IO()), [e.defaultSelectedKeys]), e.onSelectionChange), p = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), [m, h] = (0, B.useState)(i);
+ i === "replace" && m === "toggle" && typeof d == "object" && d.size === 0 && h("replace");
+ let g = (0, B.useRef)(i);
return (0, B.useEffect)(() => {
- i.focusedKey != null && !o.getItem(i.focusedKey) && i.setFocusedKey(null);
- }, [o, i.focusedKey]), {
- collection: o,
- expandedKeys: n,
- disabledKeys: a,
- toggleKey: (e) => {
- r(nse(n, e));
+ i !== g.current && (h(i), g.current = i);
+ }, [i]), {
+ selectionMode: t,
+ disallowEmptySelection: n,
+ selectionBehavior: m,
+ setSelectionBehavior: h,
+ get isFocused() {
+ return o.current;
},
- setExpandedKeys: r,
- selectionManager: new eO(o, i)
+ setFocused(e) {
+ o.current = e, s(e);
+ },
+ get focusedKey() {
+ return c.current;
+ },
+ get childFocusStrategy() {
+ return l.current;
+ },
+ setFocusedKey(e, t = "first") {
+ c.current = e, l.current = t, u(e);
+ },
+ selectedKeys: d,
+ setSelectedKeys(e) {
+ (r || !mse(e, d)) && f(e);
+ },
+ disabledKeys: p,
+ disabledBehavior: a
};
}
-function nse(e, t) {
- let n = new Set(e);
- return n.has(t) ? n.delete(t) : n.add(t), n;
+function RO(e, t) {
+ return e ? e === "all" ? "all" : new IO(e) : t;
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/Menu.mjs
-var vO = /*#__PURE__*/ (0, B.createContext)(null), yO = /*#__PURE__*/ (0, B.createContext)(null), bO = /*#__PURE__*/ (0, B.createContext)(null), xO = /*#__PURE__*/ (0, B.createContext)(null);
-function rse(e) {
- let t = _O(e), n = (0, B.useRef)(null), { menuTriggerProps: r, menuProps: i } = Iv({
- ...e,
- type: "menu"
- }, t, n), a = (0, B.useRef)(null);
- return Vh() ? null : /*#__PURE__*/ B.createElement(ME, { values: [
- [vO, {
- ...i,
- ref: a
- }],
- [EO, t],
- [bO, t],
- [mO, {
- trigger: "MenuTrigger",
- triggerRef: n,
- scrollRef: a,
- placement: "bottom start",
- "aria-labelledby": i["aria-labelledby"],
- offset: e.trigger === "contextMenu" ? 0 : void 0
- }]
- ] }, /*#__PURE__*/ B.createElement(pte, {
- ...r,
- ref: n,
- isPressed: t.isOpen
- }, e.children));
-}
-var ise = /*#__PURE__*/ (0, B.createContext)(null);
-(class extends tp {
- static {
- this.type = "submenutrigger";
+//#region node_modules/react-stately/dist/private/selection/SelectionManager.mjs
+var zO = class e {
+ constructor(e, t, n) {
+ this.collection = e, this.state = t, this.allowsCellSelection = n?.allowsCellSelection ?? !1, this._isSelectAll = null, this.layoutDelegate = n?.layoutDelegate || null, this.fullCollection = n?.fullCollection || null;
}
- filter(e, t, n) {
- let r = e.getItem(this.firstChildKey);
- if (r && n(r.textValue, this)) {
- let n = this.clone();
- return t.addDescendants(n, e), n;
- }
- return null;
+ get selectionMode() {
+ return this.state.selectionMode;
}
-});
-var ase = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- return [e, t] = FE(e, t, vO), /*#__PURE__*/ B.createElement(qh, { content: /*#__PURE__*/ B.createElement(ag, e) }, (n) => /*#__PURE__*/ B.createElement(ose, {
- props: e,
- collection: n,
- menuRef: t
- }));
-});
-function ose({ props: e, collection: t, menuRef: n }) {
- [e, n] = FE(e, n, BE);
- let { filter: r, ...i } = e, a = (0, B.useMemo)(() => r ? t.filter(r) : t, [t, r]), o = tse({
- ...e,
- collection: a,
- children: void 0
- }), s = (0, B.useContext)(bO), { isVirtualized: c, CollectionRoot: l } = (0, B.useContext)(GE), { menuProps: u } = kte({
- ...e,
- isVirtualized: c,
- onClose: e.onClose || s?.close
- }, o, n), d = NE({
- ...e,
- children: void 0,
- defaultClassName: "react-aria-Menu",
- values: { isEmpty: o.collection.size === 0 }
- }), f = null;
- o.collection.size === 0 && e.renderEmptyState && (f = /*#__PURE__*/ B.createElement("div", {
- role: "menuitem",
- style: { display: "contents" }
- }, e.renderEmptyState()));
- let p = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(Yg, null, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(p, d, u),
- ref: n,
- slot: e.slot || void 0,
- "data-empty": o.collection.size === 0 || void 0,
- onScroll: e.onScroll
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [yO, o],
- [JD, { elementType: "div" }],
- [HE, {
- name: "MenuSection",
- render: SO
- }],
- [ise, {
- parentMenuRef: n,
- shouldUseVirtualFocus: i?.shouldUseVirtualFocus
- }],
- [wO, { shouldCloseOnSelect: e.shouldCloseOnSelect }],
- [BE, null],
- [VE, null],
- [xO, o.selectionManager],
- [bO, s ?? _O({})]
- ] }, /*#__PURE__*/ B.createElement(KD, null, /*#__PURE__*/ B.createElement(l, {
- collection: o.collection,
- persistedKeys: KE(o.selectionManager.focusedKey),
- scrollRef: n
- }))), f));
-}
-var sse = class extends eO {
- constructor(e, t) {
- super(e.collection, t), this.parent = e;
+ get disallowEmptySelection() {
+ return this.state.disallowEmptySelection;
}
- get focusedKey() {
- return this.parent.focusedKey;
+ get selectionBehavior() {
+ return this.state.selectionBehavior;
}
- get isFocused() {
- return this.parent.isFocused;
+ setSelectionBehavior(e) {
+ this.state.setSelectionBehavior(e);
}
- setFocusedKey(e, t) {
- return this.parent.setFocusedKey(e, t);
+ get isFocused() {
+ return this.state.isFocused;
}
setFocused(e) {
- this.parent.setFocused(e);
+ this.state.setFocused(e);
+ }
+ get focusedKey() {
+ return this.state.focusedKey;
}
get childFocusStrategy() {
- return this.parent.childFocusStrategy;
+ return this.state.childFocusStrategy;
}
-};
-function SO(e, t, n, r = "react-aria-MenuSection") {
- let i = (0, B.useContext)(yO), { CollectionBranch: a } = (0, B.useContext)(GE), [o, s] = IE(), { headingProps: c, groupProps: l } = jte({
- heading: s,
- "aria-label": n.props["aria-label"] ?? void 0
- }), u = NE({
- ...e,
- id: void 0,
- children: void 0,
- defaultClassName: r,
- className: n.props?.className,
- style: n.props?.style,
- values: void 0
- }), d = (0, B.useContext)(xO), f = QD(e), p = e.selectionMode == null ? d : new sse(d, f), m = PE(wO)?.shouldCloseOnSelect, h = Eg(e, { global: !0 });
- return delete h.id, /*#__PURE__*/ B.createElement(zE.section, {
- ...U(h, u, l),
- ref: t
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [GD, {
- ...c,
- ref: o
- }],
- [xO, p],
- [wO, { shouldCloseOnSelect: e.shouldCloseOnSelect ?? m }]
- ] }, /*#__PURE__*/ B.createElement(a, {
- collection: i.collection,
- parent: n
- })));
-}
-var CO = /*#__PURE__*/ ng(ap, SO), wO = /*#__PURE__*/ (0, B.createContext)(null), TO = /*#__PURE__*/ tg(ip, function(e, t, n) {
- [e, t] = FE(e, t, wO);
- let r = PE(wO)?.id, i = (0, B.useContext)(yO), a = Nh(t), o = (0, B.useContext)(xO), { isVirtualized: s } = (0, B.useContext)(GE), { menuItemProps: c, labelProps: l, descriptionProps: u, keyboardShortcutProps: d, ...f } = Ate({
- ...e,
- id: r,
- key: n.key,
- selectionManager: o,
- isVirtualized: s
- }, i, a), { hoverProps: p, isHovered: m } = sy({ isDisabled: f.isDisabled }), h = NE({
- ...e,
- id: void 0,
- children: n.rendered,
- defaultClassName: "react-aria-MenuItem",
- values: {
- ...f,
- isHovered: m,
- isFocusVisible: f.isFocusVisible,
- selectionMode: o.selectionMode,
- selectionBehavior: o.selectionBehavior,
- hasSubmenu: !!e["aria-haspopup"],
- isOpen: e["aria-expanded"] === "true"
+ setFocusedKey(e, t) {
+ (e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, t);
+ }
+ get selectedKeys() {
+ return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
+ }
+ get rawSelection() {
+ return this.state.selectedKeys;
+ }
+ isSelected(e) {
+ if (this.state.selectionMode === "none") return !1;
+ let t = this.getKey(e);
+ return t == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(t) : this.state.selectedKeys.has(t);
+ }
+ get isEmpty() {
+ return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
+ }
+ get isSelectAll() {
+ if (this.isEmpty) return !1;
+ if (this.state.selectedKeys === "all") return !0;
+ if (this._isSelectAll != null) return this._isSelectAll;
+ let e = this.getSelectAllKeys(), t = this.state.selectedKeys;
+ return this._isSelectAll = e.every((e) => t.has(e)), this._isSelectAll;
+ }
+ get firstSelectedKey() {
+ let e = null;
+ for (let t of this.state.selectedKeys) {
+ let n = this.collection.getItem(t);
+ (!e || n && Kv(this.collection, n, e) < 0) && (e = n);
}
- }), g = e.href ? zE.a : zE.div, _ = Eg(e, { global: !0 });
- return delete _.id, delete _.onClick, /*#__PURE__*/ B.createElement(g, {
- ...U(_, h, c, p),
- ref: a,
- "data-disabled": f.isDisabled || void 0,
- "data-hovered": m || void 0,
- "data-focused": f.isFocused || void 0,
- "data-focus-visible": f.isFocusVisible || void 0,
- "data-pressed": f.isPressed || void 0,
- "data-selected": f.isSelected || void 0,
- "data-selection-mode": o.selectionMode === "none" ? void 0 : o.selectionMode,
- "data-has-submenu": !!e["aria-haspopup"] || void 0,
- "data-open": e["aria-expanded"] === "true" || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [QE, { slots: {
- [jE]: l,
- label: l,
- description: u
- } }],
- [$oe, d],
- [qD, { isSelected: f.isSelected }]
- ] }, h.children));
-});
-tg(rp, function(e, t, n) {
- let r = (0, B.useContext)(yO), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, B.useRef)(null);
- oO((0, B.useMemo)(() => ({
- onLoadMore: a,
- collection: r?.collection,
- sentinelRef: c,
- scrollOffset: o
- }), [
- a,
- o,
- r?.collection
- ]), c);
- let l = NE({
- ...s,
- id: void 0,
- children: n.rendered,
- defaultClassName: "react-aria-MenuLoadingIndicator",
- values: void 0
- });
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement("div", {
- style: {
- position: "relative",
- width: 0,
- height: 0
- },
- inert: YD(!0)
- }, /*#__PURE__*/ B.createElement("div", {
- "data-testid": "loadMoreSentinel",
- ref: c,
- style: {
- position: "absolute",
- height: 1,
- width: 1
+ return e?.key ?? null;
+ }
+ get lastSelectedKey() {
+ let e = null;
+ for (let t of this.state.selectedKeys) {
+ let n = this.collection.getItem(t);
+ (!e || n && Kv(this.collection, n, e) > 0) && (e = n);
}
- })), i && l.children && /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(Eg(e, { global: !0 }), { tabIndex: -1 }),
- ...l,
- role: "menuitem",
- ref: t
- }, l.children)));
-});
-//#endregion
-//#region node_modules/react-aria-components/dist/private/Dialog.mjs
-var cse = /*#__PURE__*/ (0, B.createContext)(null), EO = /*#__PURE__*/ (0, B.createContext)(null), DO = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let n = e["aria-labelledby"];
- [e, t] = FE(e, t, cse);
- let { dialogProps: r, titleProps: i, contentProps: a } = hte({
- ...e,
- "aria-labelledby": n
- }, t), o = (0, B.useContext)(EO);
- !r["aria-label"] && !r["aria-labelledby"] && e["aria-labelledby"] && (r["aria-labelledby"] = e["aria-labelledby"]);
- let s = NE({
- defaultClassName: "react-aria-Dialog",
- className: e.className,
- style: e.style,
- children: e.children,
- values: { close: o?.close || (() => {}) }
- }), c = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(zE.section, {
- ...U(c, s, r),
- render: e.render,
- ref: t,
- slot: e.slot || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [XE, { slots: {
- [jE]: {},
- title: {
- ...i,
- level: 2
+ return e?.key ?? null;
+ }
+ get disabledKeys() {
+ return this.state.disabledKeys;
+ }
+ get disabledBehavior() {
+ return this.state.disabledBehavior;
+ }
+ extendSelection(e) {
+ if (this.selectionMode === "none") return;
+ if (this.selectionMode === "single") {
+ this.replaceSelection(e);
+ return;
+ }
+ let t = this.getKey(e);
+ if (t == null) return;
+ let n;
+ if (this.state.selectedKeys === "all") n = new IO([t], t, t);
+ else {
+ let e = this.state.selectedKeys, r = e.anchorKey ?? t;
+ n = new IO(e, r, t);
+ for (let i of this.getKeyRange(r, e.currentKey ?? t)) n.delete(i);
+ for (let e of this.getKeyRange(t, r)) this.canSelectItem(e) && n.add(e);
+ }
+ this.state.setSelectedKeys(n);
+ }
+ getKeyRange(e, t) {
+ let n = this.collection.getItem(e), r = this.collection.getItem(t);
+ return n && r ? Kv(this.collection, n, r) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
+ }
+ getKeyRangeInternal(e, t) {
+ if (this.layoutDelegate?.getKeyRange) return this.layoutDelegate.getKeyRange(e, t);
+ let n = [], r = e;
+ for (; r != null;) {
+ let e = this.collection.getItem(r);
+ if (e && (e.type === "item" || e.type === "cell" && this.allowsCellSelection) && n.push(r), r === t) return n;
+ r = this.collection.getKeyAfter(r);
+ }
+ return [];
+ }
+ getKey(e) {
+ let t = this.collection.getItem(e);
+ if (!t || t.type === "cell" && this.allowsCellSelection) return e;
+ for (; t && t.type !== "item" && t.parentKey != null;) t = this.collection.getItem(t.parentKey);
+ return !t || t.type !== "item" ? null : t.key;
+ }
+ toggleSelection(e) {
+ if (this.selectionMode === "none") return;
+ if (this.selectionMode === "single" && !this.isSelected(e)) {
+ this.replaceSelection(e);
+ return;
+ }
+ let t = this.getKey(e);
+ if (t == null) return;
+ let n = new IO(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
+ n.has(t) ? n.delete(t) : this.canSelectItem(t) && (n.add(t), n.anchorKey = t, n.currentKey = t), !(this.disallowEmptySelection && n.size === 0) && this.state.setSelectedKeys(n);
+ }
+ replaceSelection(e) {
+ if (this.selectionMode === "none") return;
+ let t = this.getKey(e);
+ if (t == null) return;
+ let n = this.canSelectItem(t) ? new IO([t], t, t) : new IO();
+ this.state.setSelectedKeys(n);
+ }
+ setSelectedKeys(e) {
+ if (this.selectionMode === "none") return;
+ let t = new IO();
+ for (let n of e) {
+ let e = this.getKey(n);
+ if (e != null && (t.add(e), this.selectionMode === "single")) break;
+ }
+ this.state.setSelectedKeys(t);
+ }
+ getSelectAllKeys() {
+ let e = this.fullCollection ?? this.collection, t = [], n = (r) => {
+ for (; r != null;) {
+ if (this.canSelectItemIn(r, e)) {
+ let i = e.getItem(r);
+ i?.type === "item" && t.push(r), i?.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && n(Uv(Hv(i, e))?.key ?? null);
+ }
+ r = e.getKeyAfter(r);
}
- } }],
- [QE, { slots: {
- [jE]: {},
- description: a
- } }],
- [JE, { slots: {
- [jE]: {},
- close: { onPress: () => o?.close() }
- } }]
- ] }, s.children));
-}), OO = typeof document < "u" && window.visualViewport;
-function lse() {
- let e = Om(), [t, n] = (0, B.useState)(() => e ? {
- width: 0,
- height: 0
- } : kO());
- return (0, B.useEffect)(() => {
- let e = (e) => {
- n((t) => e.width === t.width && e.height === t.height ? t : e);
- }, t = () => {
- OO && OO.scale > 1 || e(kO());
- }, r, i = (t) => {
- OO && OO.scale > 1 || lg(H(t)) && (r = requestAnimationFrame(() => {
- let t = kp();
- (!t || !lg(t)) && e({
- width: document.documentElement.clientWidth,
- height: document.documentElement.clientHeight
- });
- }));
};
- return e(kO()), em() && nm() && window.addEventListener("blur", i, !0), OO ? OO.addEventListener("resize", t) : window.addEventListener("resize", t), () => {
- cancelAnimationFrame(r), em() && nm() && window.removeEventListener("blur", i, !0), OO ? OO.removeEventListener("resize", t) : window.removeEventListener("resize", t);
+ return n(e.getFirstKey()), t;
+ }
+ selectAll() {
+ !this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
+ }
+ clearSelection() {
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new IO());
+ }
+ toggleSelectAll() {
+ this.isSelectAll ? this.clearSelection() : this.selectAll();
+ }
+ select(e, t) {
+ this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || t && (t.pointerType === "touch" || t.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
+ }
+ isSelectionEqual(e) {
+ if (e === this.state.selectedKeys) return !0;
+ let t = this.selectedKeys;
+ if (e.size !== t.size) return !1;
+ for (let n of e) if (!t.has(n)) return !1;
+ for (let n of t) if (!e.has(n)) return !1;
+ return !0;
+ }
+ canSelectItem(e) {
+ return this.canSelectItemIn(e, this.collection);
+ }
+ canSelectItemIn(e, t) {
+ if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
+ let n = t.getItem(e);
+ return !(!n || n?.props?.isDisabled || n.type === "cell" && !this.allowsCellSelection);
+ }
+ isDisabled(e) {
+ let t = this.collection.getItem(e);
+ return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!t?.props?.isDisabled) && t?.props?.disabledBehavior !== "selection";
+ }
+ isLink(e) {
+ return !!this.collection.getItem(e)?.props?.href;
+ }
+ getItemProps(e) {
+ return this.collection.getItem(e)?.props;
+ }
+ withCollection(t) {
+ return new e(t, this.state, {
+ allowsCellSelection: this.allowsCellSelection,
+ layoutDelegate: this.layoutDelegate || void 0,
+ fullCollection: this.fullCollection ?? this.collection
+ });
+ }
+}, hse = class {
+ build(e, t) {
+ return this.context = t, BO(() => this.iterateCollection(e));
+ }
+ *iterateCollection(e) {
+ let { children: t, items: n } = e;
+ if (B.isValidElement(t) && t.type === B.Fragment) yield* this.iterateCollection({
+ children: t.props.children,
+ items: n
+ });
+ else if (typeof t == "function") {
+ if (!n) throw Error("props.children was a function but props.items is missing");
+ let e = 0;
+ for (let r of n) yield* this.getFullNode({
+ value: r,
+ index: e
+ }, { renderer: t }), e++;
+ } else {
+ let e = [];
+ B.Children.forEach(t, (t) => {
+ t && e.push(t);
+ });
+ let n = 0;
+ for (let t of e) {
+ let e = this.getFullNode({
+ element: t,
+ index: n
+ }, {});
+ for (let t of e) n++, yield t;
+ }
+ }
+ }
+ getKey(e, t, n, r) {
+ if (e.key != null) return e.key;
+ if (t.type === "cell" && t.key != null) return `${r}${t.key}`;
+ let i = t.value;
+ if (i != null) {
+ let e = i.key ?? i.id;
+ if (e == null) throw Error("No key found for item");
+ return e;
+ }
+ return r ? `${r}.${t.index}` : `$.${t.index}`;
+ }
+ getChildState(e, t) {
+ return { renderer: t.renderer || e.renderer };
+ }
+ *getFullNode(e, t, n, r) {
+ if (B.isValidElement(e.element) && e.element.type === B.Fragment) {
+ let i = [];
+ B.Children.forEach(e.element.props.children, (e) => {
+ i.push(e);
+ });
+ let a = e.index ?? 0;
+ for (let e of i) yield* this.getFullNode({
+ element: e,
+ index: a++
+ }, t, n, r);
+ return;
+ }
+ let i = e.element;
+ if (!i && e.value && t && t.renderer) {
+ let n = this.cache.get(e.value);
+ if (n && (!n.shouldInvalidate || !n.shouldInvalidate(this.context))) {
+ n.index = e.index, n.parentKey = r ? r.key : null, yield n;
+ return;
+ }
+ i = t.renderer(e.value);
+ }
+ if (B.isValidElement(i)) {
+ let a = i.type;
+ if (typeof a != "function" && typeof a.getCollectionNode != "function") {
+ let e = i.type;
+ throw Error(`Unknown element <${e}> in collection.`);
+ }
+ let o = a.getCollectionNode(i.props, this.context), s = e.index ?? 0, c = o.next();
+ for (; !c.done && c.value;) {
+ let a = c.value;
+ e.index = s;
+ let l = a.key ?? null;
+ l ??= a.element ? null : this.getKey(i, e, t, n);
+ let u = [...this.getFullNode({
+ ...a,
+ key: l,
+ index: s,
+ wrapper: gse(e.wrapper, a.wrapper)
+ }, this.getChildState(t, a), n ? `${n}${i.key}` : i.key, r)];
+ for (let t of u) {
+ if (t.value = a.value ?? e.value ?? null, t.value && this.cache.set(t.value, t), e.type && t.type !== e.type) throw Error(`Unsupported type <${VO(t.type)}> in <${VO(r?.type ?? "unknown parent type")}>. Only <${VO(e.type)}> is supported.`);
+ s++, yield t;
+ }
+ c = o.next(u);
+ }
+ return;
+ }
+ if (e.key == null || e.type == null) return;
+ let a = this, o = {
+ type: e.type,
+ props: e.props,
+ key: e.key,
+ parentKey: r ? r.key : null,
+ value: e.value ?? null,
+ level: (r?.level ?? 0) + +(r?.type === "item"),
+ index: e.index,
+ rendered: e.rendered,
+ textValue: e.textValue ?? "",
+ "aria-label": e["aria-label"],
+ wrapper: e.wrapper,
+ shouldInvalidate: e.shouldInvalidate,
+ hasChildNodes: e.hasChildNodes || !1,
+ childNodes: BO(function* () {
+ if (!e.hasChildNodes || !e.childNodes) return;
+ let n = 0;
+ for (let r of e.childNodes()) {
+ r.key != null && (r.key = `${o.key}${r.key}`);
+ let e = a.getFullNode({
+ ...r,
+ index: n
+ }, a.getChildState(t, r), o.key, o);
+ for (let t of e) n++, yield t;
+ }
+ })
};
- }, []), t;
+ yield o;
+ }
+ constructor() {
+ this.cache = /* @__PURE__ */ new WeakMap();
+ }
+};
+function BO(e) {
+ let t = [], n = null;
+ return { *[Symbol.iterator]() {
+ for (let e of t) yield e;
+ n ||= e();
+ for (let e of n) t.push(e), yield e;
+ } };
}
-function kO() {
- return {
- width: OO ? Math.min(OO.width * OO.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
- height: OO ? OO.height * OO.scale : document.documentElement.clientHeight
- };
+function gse(e, t) {
+ if (e && t) return (n) => e(t(n));
+ if (e) return e;
+ if (t) return t;
+}
+function VO(e) {
+ return e[0].toUpperCase() + e.slice(1);
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/Modal.mjs
-var use = /*#__PURE__*/ (0, B.createContext)(null), AO = /*#__PURE__*/ (0, B.createContext)(null), dse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- if ((0, B.useContext)(AO)) return /*#__PURE__*/ B.createElement(MO, {
- ...e,
- modalRef: t
- }, e.children);
- let { isDismissable: n, isKeyboardDismissDisabled: r, isOpen: i, defaultOpen: a, onOpenChange: o, children: s, isEntering: c, isExiting: l, UNSTABLE_portalContainer: u, shouldCloseOnInteractOutside: d, ...f } = e;
- return /*#__PURE__*/ B.createElement(jO, {
- isDismissable: n,
- isKeyboardDismissDisabled: r,
- isOpen: i,
- defaultOpen: a,
- onOpenChange: o,
- isEntering: c,
- isExiting: l,
- UNSTABLE_portalContainer: u,
- shouldCloseOnInteractOutside: d
- }, /*#__PURE__*/ B.createElement(MO, {
- ...f,
- modalRef: t
- }, s));
-});
-function fse(e, t) {
- [e, t] = FE(e, t, use);
- let n = (0, B.useContext)(EO), r = uO(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = Nh(t), o = (0, B.useRef)(null), s = fO(a, i.isOpen), c = fO(o, i.isOpen), l = s || c || e.isExiting || !1, u = Om();
- return !i.isOpen && !l || u ? null : /*#__PURE__*/ B.createElement(pse, {
- ...e,
- state: i,
- isExiting: l,
- overlayRef: a,
- modalRef: o
- });
+//#region node_modules/react-stately/dist/private/collections/useCollection.mjs
+function HO(e, t, n) {
+ let r = (0, B.useMemo)(() => new hse(), []), { children: i, items: a, collection: o } = e;
+ return (0, B.useMemo)(() => o || t(r.build({
+ children: i,
+ items: a
+ }, n)), [
+ r,
+ i,
+ a,
+ o,
+ n,
+ t
+ ]);
}
-var jO = /*#__PURE__*/ (0, B.forwardRef)(fse);
-function pse({ UNSTABLE_portalContainer: e, ...t }) {
- let n = t.modalRef, { state: r } = t, { modalProps: i, underlayProps: a } = Ite(t, r, n), o = dO(t.overlayRef) || t.isEntering || !1, s = NE({
- ...t,
- defaultClassName: "react-aria-ModalOverlay",
- values: {
- isEntering: o,
- isExiting: t.isExiting,
- state: r
- }
- }), c = lse(), l, u;
- if (typeof document < "u") {
- let e = m_(document.body) ? document.body : document.scrollingElement || document.documentElement, t = e.getBoundingClientRect().width % 1, n = e.getBoundingClientRect().height % 1;
- l = e.scrollWidth - t, u = e.scrollHeight - n;
- }
- let d = {
- ...s.style,
- "--visual-viewport-width": c.width + "px",
- "--visual-viewport-height": c.height + "px",
- "--page-width": l === void 0 ? void 0 : l + "px",
- "--page-height": u === void 0 ? void 0 : u + "px"
+//#endregion
+//#region node_modules/react-stately/dist/private/list/useListState.mjs
+function UO(e) {
+ let { filter: t, layoutDelegate: n } = e, r = LO(e), i = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = HO(e, (0, B.useCallback)((e) => t ? new FO(t(e)) : new FO(e), [t]), (0, B.useMemo)(() => ({ suppressTextValueWarning: e.suppressTextValueWarning }), [e.suppressTextValueWarning])), o = (0, B.useMemo)(() => new zO(a, r, { layoutDelegate: n }), [
+ a,
+ r,
+ n
+ ]);
+ return WO(a, o), {
+ collection: a,
+ disabledKeys: i,
+ selectionManager: o
};
- return /*#__PURE__*/ B.createElement(ty, {
- isExiting: t.isExiting,
- portalContainer: e
- }, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(Eg(t, { global: !0 }), a),
- ...s,
- style: d,
- ref: t.overlayRef,
- "data-entering": o || void 0,
- "data-exiting": t.isExiting || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [[AO, {
- modalProps: i,
- modalRef: n,
- isExiting: t.isExiting,
- isDismissable: t.isDismissable
- }], [EO, r]] }, s.children)));
}
-function MO(e) {
- let { modalProps: t, modalRef: n, isExiting: r, isDismissable: i } = (0, B.useContext)(AO), a = (0, B.useContext)(EO), o = Nh((0, B.useMemo)(() => mh(e.modalRef, n), [e.modalRef, n])), s = dO(o), c = NE({
- ...e,
- defaultClassName: "react-aria-Modal",
- values: {
- isEntering: s,
- isExiting: r,
- state: a
+function _se(e, t) {
+ let n = (0, B.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
+ return WO(n, r), {
+ collection: n,
+ selectionManager: r,
+ disabledKeys: e.disabledKeys
+ };
+}
+function WO(e, t) {
+ let n = (0, B.useRef)(null);
+ (0, B.useEffect)(() => {
+ if (t.focusedKey != null && !e.getItem(t.focusedKey) && n.current) {
+ let r = n.current.getKeyAfter(t.focusedKey), i = null;
+ for (; r != null;) {
+ let a = e.getItem(r);
+ if (a && a.type === "item" && !t.isDisabled(r)) {
+ i = r;
+ break;
+ }
+ r = n.current.getKeyAfter(r);
+ }
+ if (i == null) for (r = n.current.getKeyBefore(t.focusedKey); r != null;) {
+ let a = e.getItem(r);
+ if (a && a.type === "item" && !t.isDisabled(r)) {
+ i = r;
+ break;
+ }
+ r = n.current.getKeyBefore(r);
+ }
+ t.setFocusedKey(i);
}
- });
- return /*#__PURE__*/ B.createElement(zE.div, {
- ...U(Eg(e, { global: !0 }), t),
- ...c,
- ref: o,
- "data-entering": s || void 0,
- "data-exiting": r || void 0
- }, i && /*#__PURE__*/ B.createElement(Nb, { onDismiss: a.close }), c.children);
+ n.current = e;
+ }, [e, t]);
}
//#endregion
-//#region node_modules/react-stately/dist/private/radio/useRadioGroupState.mjs
-var mse = Math.round(Math.random() * 1e10), hse = 0;
-function gse(e) {
- let t = (0, B.useMemo)(() => e.name || `radio-group-${mse}-${++hse}`, [e.name]), [n, r] = L_(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, B.useState)(n), [a, o] = (0, B.useState)(null), s = O_({
- ...e,
- value: n
- }), c = (t) => {
- !e.isReadOnly && !e.isDisabled && (r(t), s.commitValidation());
- }, l = s.displayValidation.isInvalid;
- return {
- ...s,
- name: t,
- selectedValue: n,
- defaultSelectedValue: e.value === void 0 ? e.defaultValue ?? null : i,
- setSelectedValue: c,
- lastFocusedValue: a,
- setLastFocusedValue: o,
- isDisabled: e.isDisabled || !1,
- isReadOnly: e.isReadOnly || !1,
- isRequired: e.isRequired || !1,
- validationState: e.validationState || (l ? "invalid" : null),
- isInvalid: l
- };
+//#region node_modules/react-aria/dist/private/utils/useLoadMoreSentinel.mjs
+function GO(e, t) {
+ let { collection: n, onLoadMore: r, scrollOffset: i = 1, direction: a = "end" } = e, o = (0, B.useRef)(null), s = ug((e) => {
+ for (let t of e) t.isIntersecting && r && r();
+ });
+ Hp(() => {
+ if (t.current) {
+ let e = 100 * i, n = a === "start" ? `${e}% 0px 0px 0px` : `0px ${e}% ${e}% ${e}%`;
+ o.current = new IntersectionObserver(s, {
+ root: h_(t?.current),
+ rootMargin: n
+ }), o.current.observe(t.current);
+ }
+ return () => {
+ o.current && o.current.disconnect();
+ };
+ }, [
+ n,
+ t,
+ i,
+ a
+ ]);
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/RadioGroup.mjs
-var _se = /*#__PURE__*/ (0, B.createContext)(null), vse = /*#__PURE__*/ (0, B.createContext)(null), NO = /*#__PURE__*/ (0, B.createContext)(null), PO = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, _se);
- let { validationBehavior: n } = PE(eD) || {}, r = e.validationBehavior ?? n ?? "native", i = gse({
+//#region node_modules/react-aria-components/dist/private/ListBox.mjs
+var KO = /*#__PURE__*/ (0, B.createContext)(null), qO = /*#__PURE__*/ (0, B.createContext)(null), vse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, KO);
+ let n = (0, B.useContext)(qO);
+ return n ? /*#__PURE__*/ B.createElement(JO, {
+ state: n,
+ props: e,
+ listBoxRef: t
+ }) : /*#__PURE__*/ B.createElement(qh, { content: /*#__PURE__*/ B.createElement(ag, e) }, (n) => /*#__PURE__*/ B.createElement(yse, {
+ props: e,
+ listBoxRef: t,
+ collection: n
+ }));
+});
+function yse({ props: e, listBoxRef: t, collection: n }) {
+ e = {
...e,
- validationBehavior: r
- }), [a, o] = IE(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = Xte({
+ collection: n,
+ children: null,
+ items: null
+ };
+ let { layoutDelegate: r } = (0, B.useContext)(AD), i = UO({
...e,
- label: o,
- validationBehavior: r
- }, i), f = NE({
- ...e,
- values: {
- orientation: e.orientation || "vertical",
- isDisabled: i.isDisabled,
- isReadOnly: i.isReadOnly,
- isRequired: i.isRequired,
- isInvalid: i.isInvalid,
- state: i
- },
- defaultClassName: "react-aria-RadioGroup"
- }), p = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(zE.div, {
- ...U(p, f, s),
- ref: t,
- slot: e.slot || void 0,
- "data-orientation": e.orientation || "vertical",
- "data-invalid": i.isInvalid || void 0,
- "data-disabled": i.isDisabled || void 0,
- "data-readonly": i.isReadOnly || void 0,
- "data-required": i.isRequired || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [NO, i],
- [qE, {
- ...c,
- ref: a,
- elementType: "span"
+ layoutDelegate: r
+ });
+ return /*#__PURE__*/ B.createElement(JO, {
+ state: i,
+ props: e,
+ listBoxRef: t
+ });
+}
+function JO({ state: e, props: t, listBoxRef: n }) {
+ [t, n] = bD(t, n, TD);
+ let { dragAndDropHooks: r, layout: i = "stack", orientation: a = "vertical", filter: o } = t, s = _se(e, o), { collection: c, selectionManager: l } = s, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: f } = vg(), { disabledBehavior: p, disabledKeys: m } = l, h = Zv({
+ usage: "search",
+ sensitivity: "base"
+ }), { isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v, CollectionRoot: y } = (0, B.useContext)(AD), b = (0, B.useMemo)(() => t.keyboardDelegate || new Q_({
+ collection: c,
+ collator: h,
+ ref: n,
+ disabledKeys: m,
+ disabledBehavior: p,
+ layout: i,
+ orientation: a,
+ direction: f,
+ layoutDelegate: _
+ }), [
+ c,
+ h,
+ n,
+ p,
+ m,
+ a,
+ f,
+ t.keyboardDelegate,
+ i,
+ _
+ ]), { listBoxProps: x } = Tte({
+ ...t,
+ shouldSelectOnPressUp: u || t.shouldSelectOnPressUp,
+ keyboardDelegate: b,
+ isVirtualized: g
+ }, s, n);
+ (0, B.useRef)(u), (0, B.useRef)(d), (0, B.useEffect)(() => {}, [u, d]);
+ let S, C, w, T = !1, E = null, D = (0, B.useRef)(null);
+ if (u && r) {
+ S = r.useDraggableCollectionState({
+ collection: c,
+ selectionManager: l,
+ preview: r.renderDragPreview ? D : void 0
+ }), r.useDraggableCollection({}, S, n);
+ let e = r.DragPreview;
+ E = r.renderDragPreview ? /*#__PURE__*/ B.createElement(e, { ref: D }, r.renderDragPreview) : null;
+ }
+ if (d && r) {
+ C = r.useDroppableCollectionState({
+ collection: c,
+ selectionManager: l
+ });
+ let e = r.dropTargetDelegate || v || new r.ListDropTargetDelegate(c, n, {
+ orientation: a,
+ layout: i,
+ direction: f
+ });
+ w = r.useDroppableCollection({
+ keyboardDelegate: b,
+ dropTargetDelegate: e
+ }, C, n), T = C.isDropTarget({ type: "root" });
+ }
+ let { focusProps: O, isFocused: k, isFocusVisible: A } = iy(), j = s.collection.size === 0, M = {
+ isDropTarget: T,
+ isEmpty: j,
+ isFocused: k,
+ isFocusVisible: A,
+ layout: t.layout || "stack",
+ orientation: a,
+ state: s
+ }, N = vD({
+ ...t,
+ children: void 0,
+ defaultClassName: "react-aria-ListBox",
+ values: M
+ }), P = null;
+ j && t.renderEmptyState && (P = /*#__PURE__*/ B.createElement("div", {
+ role: "option",
+ style: { display: "contents" }
+ }, t.renderEmptyState(M)));
+ let ee = Eg(t, { global: !0 });
+ return /*#__PURE__*/ B.createElement(Yg, null, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(ee, N, x, O, w?.collectionProps),
+ ref: n,
+ slot: t.slot || void 0,
+ onScroll: t.onScroll,
+ "data-drop-target": T || void 0,
+ "data-empty": j || void 0,
+ "data-focused": k || void 0,
+ "data-focus-visible": A || void 0,
+ "data-layout": t.layout || "stack",
+ "data-orientation": a
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [KO, t],
+ [qO, s],
+ [EO, {
+ dragAndDropHooks: r,
+ dragState: S,
+ dropState: C
}],
- [QE, { slots: {
- description: l,
- errorMessage: u
- } }],
- [$E, d]
- ] }, /*#__PURE__*/ B.createElement(KD, null, f.children)));
-}), FO = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { inputRef: n = null, ...r } = e;
- [e, t] = FE(r, t, vse);
- let i = B.useContext(NO), a = Nh((0, B.useMemo)(() => mh(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = Yte({
- ...LE(e),
- children: typeof e.children == "function" || e.children
- }, i, a);
- return /*#__PURE__*/ B.createElement(IO.Provider, { value: {
- ...o,
- inputRef: a,
- defaultClassName: "react-aria-Radio"
- } }, /*#__PURE__*/ B.createElement(yse, {
+ [NO, { elementType: "div" }],
+ [DO, { render: Sse }],
+ [DD, {
+ name: "ListBoxSection",
+ render: bse
+ }]
+ ] }, /*#__PURE__*/ B.createElement(jO, null, /*#__PURE__*/ B.createElement(y, {
+ collection: c,
+ scrollRef: n,
+ persistedKeys: kO(l, r, C),
+ renderDropIndicator: OO(r, C)
+ }))), P, E));
+}
+function bse(e, t, n, r = "react-aria-ListBoxSection") {
+ let i = (0, B.useContext)(qO), { dragAndDropHooks: a, dropState: o } = (0, B.useContext)(EO), { CollectionBranch: s } = (0, B.useContext)(AD), [c, l] = xD(), { headingProps: u, groupProps: d } = Ete({
+ heading: l,
+ "aria-label": e["aria-label"] ?? void 0
+ }), f = vD({
...e,
+ id: void 0,
+ children: void 0,
+ defaultClassName: r,
+ values: void 0
+ }), p = Eg(e, { global: !0 });
+ return delete p.id, /*#__PURE__*/ B.createElement(wD.section, {
+ ...U(p, f, d),
ref: t
- }));
-}), IO = /*#__PURE__*/ (0, B.createContext)(null), yse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, B.useContext)(IO), l = B.useContext(NO), { isFocused: u, isFocusVisible: d, focusProps: f } = ry(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = sy({
- ...e,
- isDisabled: p
- }), g = NE({
+ }, /*#__PURE__*/ B.createElement(AO.Provider, { value: {
+ ...u,
+ ref: c
+ } }, /*#__PURE__*/ B.createElement(s, {
+ collection: i.collection,
+ parent: n,
+ renderDropIndicator: OO(a, o)
+ })));
+}
+var xse = /*#__PURE__*/ tg(ip, function(e, t, n) {
+ let r = Nh(t), i = (0, B.useContext)(qO), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, B.useContext)(EO), c = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { optionProps: l, labelProps: u, descriptionProps: d, ...f } = Dte({
+ key: n.key,
+ "aria-label": e?.["aria-label"]
+ }, i, r), { hoverProps: p, isHovered: m } = cy({
+ isDisabled: !f.allowsSelection && !f.hasAction && !c,
+ onHoverStart: n.props.onHoverStart,
+ onHoverChange: n.props.onHoverChange,
+ onHoverEnd: n.props.onHoverEnd
+ }), { keyboardProps: h } = Mh(e), { focusProps: g } = vh(e), _ = null;
+ o && a && (_ = a.useDraggableItem({
+ key: n.key,
+ hasAction: f.hasAction
+ }, o));
+ let v = null;
+ s && a && (v = a.useDroppableItem({ target: {
+ type: "item",
+ key: n.key,
+ dropPosition: "on"
+ } }, s, r));
+ let y = o && o.isDragging(n.key), b = vD({
...e,
- defaultClassName: s,
+ id: void 0,
+ children: e.children,
+ defaultClassName: "react-aria-ListBoxItem",
values: {
- isSelected: i,
- isPressed: o,
- isHovered: h,
- isFocused: u,
- isFocusVisible: d,
- isDisabled: a,
- isReadOnly: l.isReadOnly,
- isInvalid: l.isInvalid,
- isRequired: l.isRequired
+ ...f,
+ isHovered: m,
+ selectionMode: i.selectionManager.selectionMode,
+ selectionBehavior: i.selectionManager.selectionBehavior,
+ allowsDragging: !!o,
+ isDragging: y,
+ isDropTarget: v?.isDropTarget
}
- }), _ = Eg(e, { global: !0 });
- return delete _.id, delete _.onClick, /*#__PURE__*/ B.createElement(zE.label, {
- ...U(_, n, m, g),
- ref: t,
- "data-selected": i || void 0,
- "data-pressed": o || void 0,
- "data-hovered": h || void 0,
- "data-focused": u || void 0,
- "data-focus-visible": d || void 0,
- "data-disabled": a || void 0,
- "data-readonly": l.isReadOnly || void 0,
- "data-invalid": l.isInvalid || void 0,
- "data-required": l.isRequired || void 0
- }, /*#__PURE__*/ B.createElement(H_, { elementType: "span" }, /*#__PURE__*/ B.createElement("input", {
- ...U(r, f),
- ref: c
- })), g.children);
+ });
+ (0, B.useEffect)(() => {
+ n.textValue;
+ }, [n.textValue]);
+ let x = e.href ? wD.a : wD.div, S = Eg(e, { global: !0 });
+ return delete S.id, delete S.onClick, e.href && l.tabIndex == null && (l.tabIndex = -1), /*#__PURE__*/ B.createElement(x, {
+ ...U(S, b, l, p, h, g, _?.dragProps, v?.dropProps),
+ ref: r,
+ "data-allows-dragging": !!o || void 0,
+ "data-selected": f.isSelected || void 0,
+ "data-disabled": f.isDisabled || void 0,
+ "data-hovered": m || void 0,
+ "data-focused": f.isFocused || void 0,
+ "data-focus-visible": f.isFocusVisible || void 0,
+ "data-pressed": f.isPressed || void 0,
+ "data-dragging": y || void 0,
+ "data-drop-target": v?.isDropTarget || void 0,
+ "data-selection-mode": i.selectionManager.selectionMode === "none" ? void 0 : i.selectionManager.selectionMode
+ }, /*#__PURE__*/ B.createElement(_D, { values: [[LD, { slots: {
+ [gD]: u,
+ label: u,
+ description: d
+ } }], [MO, { isSelected: f.isSelected }]] }, b.children));
});
-//#endregion
-//#region node_modules/react-stately/dist/private/select/useSelectState.mjs
-function bse(e) {
- let { selectionMode: t = "single", shouldCloseOnSelect: n = t === "single" } = e, r = uO(e), [i, a] = (0, B.useState)(null), o = (0, B.useMemo)(() => e.defaultValue === void 0 ? t === "single" ? e.defaultSelectedKey ?? null : [] : e.defaultValue, [
- e.defaultValue,
- e.defaultSelectedKey,
- t
- ]), [s, c] = L_((0, B.useMemo)(() => e.value === void 0 ? t === "single" ? e.selectedKey : void 0 : e.value, [
- e.value,
- e.selectedKey,
- t
- ]), o, e.onChange), l = t === "single" && Array.isArray(s) ? s[0] : s, u = (n) => {
- if (t === "single") {
- let t = Array.isArray(n) ? n[0] ?? null : n;
- c(t), t !== l && e.onSelectionChange?.(t);
- } else {
- let e = [];
- Array.isArray(n) ? e = n : n != null && (e = [n]), c(e);
- }
- }, d = iO({
+function Sse(e, t) {
+ t = Nh(t);
+ let { dragAndDropHooks: n, dropState: r } = (0, B.useContext)(EO), { dropIndicatorProps: i, isHidden: a, isDropTarget: o } = n.useDropIndicator(e, r, t);
+ return a ? null : /*#__PURE__*/ B.createElement(wse, {
...e,
- selectionMode: t,
- disallowEmptySelection: t === "single",
- allowDuplicateSelectionEvents: !0,
- selectedKeys: (0, B.useMemo)(() => xse(l), [l]),
- onSelectionChange: (e) => {
- if (e !== "all") {
- if (t === "single") {
- let t = e.values().next().value ?? null;
- u(t);
- } else u([...e]);
- n && r.close(), m.commitValidation();
- }
+ dropIndicatorProps: i,
+ isDropTarget: o,
+ ref: t
+ });
+}
+function Cse(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, ...i } = e, a = vD({
+ ...i,
+ defaultClassName: "react-aria-DropIndicator",
+ values: { isDropTarget: r }
+ });
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(wD.div, {
+ ...n,
+ ...a,
+ role: "option",
+ ref: t,
+ "data-drop-target": r || void 0
+ }));
+}
+var wse = /*#__PURE__*/ (0, B.forwardRef)(Cse);
+tg(rp, function(e, t, n) {
+ let r = (0, B.useContext)(qO), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, B.useRef)(null);
+ GO((0, B.useMemo)(() => ({
+ onLoadMore: a,
+ collection: r?.collection,
+ sentinelRef: c,
+ scrollOffset: o
+ }), [
+ a,
+ o,
+ r?.collection
+ ]), c);
+ let l = vD({
+ ...s,
+ id: void 0,
+ children: n.rendered,
+ defaultClassName: "react-aria-ListBoxLoadingIndicator",
+ values: void 0
+ });
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement("div", {
+ style: {
+ position: "relative",
+ width: 0,
+ height: 0
+ },
+ inert: PO(!0)
+ }, /*#__PURE__*/ B.createElement("div", {
+ "data-testid": "loadMoreSentinel",
+ ref: c,
+ style: {
+ position: "absolute",
+ height: 1,
+ width: 1
}
- }), f = d.selectionManager.firstSelectedKey, p = (0, B.useMemo)(() => [...d.selectionManager.selectedKeys].map((e) => d.collection.getItem(e)).filter((e) => e != null), [d.selectionManager.selectedKeys, d.collection]), m = O_({
- ...e,
- value: Array.isArray(l) && l.length === 0 ? null : l
- }), [h, g] = (0, B.useState)(!1), [_] = (0, B.useState)(l);
+ })), i && l.children && /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(Eg(e, { global: !0 }), { tabIndex: -1 }),
+ ...l,
+ role: "option",
+ ref: t
+ }, l.children)));
+});
+//#endregion
+//#region node_modules/react-aria-components/dist/private/OverlayArrow.mjs
+var Tse = /*#__PURE__*/ (0, B.createContext)({ placement: "bottom" });
+//#endregion
+//#region node_modules/react-stately/dist/private/overlays/useOverlayTriggerState.mjs
+function YO(e) {
+ let [t, n] = L_(e.isOpen, e.defaultOpen || !1, e.onOpenChange), [r, i] = (0, B.useState)(null);
return {
- ...m,
- ...d,
- ...r,
- value: l,
- defaultValue: o ?? _,
- setValue: u,
- selectedKey: f,
- setSelectedKey: u,
- selectedItem: p[0] ?? null,
- selectedItems: p,
- defaultSelectedKey: e.defaultSelectedKey ?? (e.selectionMode === "single" ? _ : null),
- focusStrategy: i,
- open(t = null) {
- (d.collection.size !== 0 || e.allowsEmptyCollection) && (a(t), r.open());
- },
- toggle(t = null) {
- (d.collection.size !== 0 || e.allowsEmptyCollection) && (a(t), r.toggle());
- },
- isFocused: h,
- setFocused: g
+ isOpen: t,
+ setOpen: n,
+ open: (0, B.useCallback)(() => {
+ n(!0);
+ }, [n]),
+ close: (0, B.useCallback)(() => {
+ n(!1);
+ }, [n]),
+ toggle: (0, B.useCallback)(() => {
+ n(!t);
+ }, [n, t]),
+ point: r,
+ setPoint: i
};
}
-function xse(e) {
- if (e !== void 0) return e === null ? [] : Array.isArray(e) ? e : [e];
-}
//#endregion
-//#region node_modules/react-aria-components/dist/private/Select.mjs
-function Sse(e) {
- return e && e.__esModule ? e.default : e;
+//#region node_modules/react-aria/dist/private/utils/animation.mjs
+function XO(e, t = !0) {
+ let [n, r] = (0, B.useState)(!0), i = n && t;
+ return Hp(() => {
+ if (i && e.current && "getAnimations" in e.current) for (let t of e.current.getAnimations()) t instanceof CSSTransition && t.cancel();
+ }, [e, i]), QO(e, i, (0, B.useCallback)(() => r(!1), [])), i;
}
-var LO = /*#__PURE__*/ (0, B.createContext)(null), RO = /*#__PURE__*/ (0, B.createContext)(null), Cse = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, LO);
- let { children: n, isDisabled: r = !1, isInvalid: i = !1, isRequired: a = !1 } = e, o = (0, B.useMemo)(() => typeof n == "function" ? n({
- isOpen: !1,
- isDisabled: r,
- isInvalid: i,
- isRequired: a,
- isFocused: !1,
- isFocusVisible: !1,
- defaultChildren: null
- }) : n, [
- n,
- r,
- i,
- a
+function ZO(e, t) {
+ let [n, r] = (0, B.useState)(t ? "open" : "closed");
+ switch (n) {
+ case "open":
+ t || r("exiting");
+ break;
+ case "closed":
+ case "exiting": t && r("open");
+ }
+ let i = n === "exiting";
+ return QO(e, i, (0, B.useCallback)(() => {
+ r((e) => e === "exiting" ? "closed" : e);
+ }, [])), i;
+}
+function QO(e, t, n) {
+ Hp(() => {
+ if (t && e.current) {
+ if (!("getAnimations" in e.current)) {
+ n();
+ return;
+ }
+ let t = e.current.getAnimations();
+ if (t.length === 0) {
+ n();
+ return;
+ }
+ let r = !1;
+ return Promise.allSettled(t.map((e) => e.finished)).then(() => {
+ r || (0, $f.flushSync)(() => {
+ n();
+ });
+ }), () => {
+ r = !0;
+ };
+ }
+ }, [
+ e,
+ t,
+ n
]);
- return /*#__PURE__*/ B.createElement(qh, { content: o }, (n) => /*#__PURE__*/ B.createElement(Tse, {
- props: e,
- collection: n,
- selectRef: t
- }));
-}), wse = [
- qE,
- JE,
- QE
-];
-function Tse({ props: e, selectRef: t, collection: n }) {
- let { validationBehavior: r } = PE(eD) || {}, i = e.validationBehavior ?? r ?? "native", a = bse({
- ...e,
- collection: n,
- children: void 0,
- validationBehavior: i
- }), { isFocusVisible: o, focusProps: s } = ry({ within: !0 }), c = (0, B.useRef)(null), [l, u] = IE(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: d, triggerProps: f, valueProps: p, menuProps: m, descriptionProps: h, errorMessageProps: g, hiddenSelectProps: _, ...v } = Zte({
- ...LE(e),
- label: u,
- validationBehavior: i
- }, a, c), y = (0, B.useMemo)(() => ({
- isOpen: a.isOpen,
- isFocused: a.isFocused,
- isFocusVisible: o,
- isDisabled: e.isDisabled || !1,
- isInvalid: v.isInvalid || !1,
- isRequired: e.isRequired || !1
- }), [
- a.isOpen,
- a.isFocused,
- o,
- e.isDisabled,
- v.isInvalid,
- e.isRequired
- ]), b = NE({
- ...e,
- values: y,
- defaultClassName: "react-aria-Select"
- }), x = Eg(e, { global: !0 });
- delete x.id;
- let S = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(ME, { values: [
- [LO, e],
- [RO, a],
- [zO, p],
- [qE, {
- ...d,
- ref: l,
- elementType: "span"
- }],
- [JE, {
- ...f,
- ref: c,
- isPressed: a.isOpen,
- autoFocus: e.autoFocus
- }],
- [EO, a],
- [mO, {
- trigger: "Select",
- triggerRef: c,
- scrollRef: S,
- placement: "bottom start",
- "aria-labelledby": m["aria-labelledby"],
- clearContexts: wse
- }],
- [sO, {
- ...m,
- ref: S
- }],
- [cO, a],
- [QE, { slots: {
- description: h,
- errorMessage: g
- } }],
- [$E, v]
- ] }, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(x, b, s),
- ref: t,
- slot: e.slot || void 0,
- "data-focused": a.isFocused || void 0,
- "data-focus-visible": o || void 0,
- "data-open": a.isOpen || void 0,
- "data-disabled": e.isDisabled || void 0,
- "data-invalid": v.isInvalid || void 0,
- "data-required": e.isRequired || void 0
- }, b.children, /*#__PURE__*/ B.createElement(Qte, {
- ..._,
- autoComplete: e.autoComplete
- })));
}
-for (var zO = /*#__PURE__*/ (0, B.createContext)(null), Ese = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, zO);
- let n = (0, B.useContext)(RO), { placeholder: r } = PE(LO), i = n.selectedItems.map((e) => {
- let t = e.props?.children;
+//#endregion
+//#region node_modules/react-aria-components/dist/private/Popover.mjs
+var $O = /*#__PURE__*/ (0, B.createContext)(null), ek = /*#__PURE__*/ (0, B.createContext)(null), tk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, $O);
+ let n = (0, B.useContext)(dk), r = YO(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = ZO(t, i.isOpen), o = e.isExiting || !e.shouldSkipAnimation && a || !1, s = Vh(), { direction: c } = vg();
+ if (s) {
+ let t = e.children;
return typeof t == "function" && (t = t({
- isHovered: !1,
- isPressed: !1,
- isSelected: !1,
- isFocused: !1,
- isFocusVisible: !1,
- isDisabled: !1,
- selectionMode: "single",
- selectionBehavior: "toggle"
- })), t;
- }), a = gte(), o = (0, B.useMemo)(() => n.selectedItems.map((e) => e?.textValue), [n.selectedItems]), s = n.selectionManager.selectionMode, c = (0, B.useMemo)(() => s === "single" ? o[0] ?? "" : a.format(o), [
- s,
- a,
- o
- ]), l = (0, B.useMemo)(() => {
- if (s === "single") return i[0];
- let e = a.formatToParts(o);
- if (e.length === 0) return null;
- let t = 0;
- return e.map((e) => e.type === "element" ? /*#__PURE__*/ B.createElement(B.Fragment, { key: t }, i[t++]) : e.value);
- }, [
- s,
- a,
- o,
- i
- ]), u = wg(Sse(BD), "react-aria-components"), d = NE({
+ trigger: e.trigger || null,
+ placement: "bottom",
+ isEntering: !1,
+ isExiting: !1,
+ defaultChildren: null
+ })), /*#__PURE__*/ B.createElement(B.Fragment, null, t);
+ }
+ return i && !i.isOpen && !o ? null : /*#__PURE__*/ B.createElement(Ese, {
...e,
- defaultChildren: l ?? r ?? u.format("selectPlaceholder"),
- defaultClassName: "react-aria-SelectValue",
+ triggerRef: e.triggerRef,
+ state: i,
+ popoverRef: t,
+ isExiting: o,
+ dir: c
+ });
+});
+function Ese({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContexts: r, ...i }) {
+ let a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useContext)(ek), c = s && i.trigger === "SubmenuTrigger", { popoverProps: l, underlayProps: u, arrowProps: d, placement: f, triggerAnchorPoint: p } = qte({
+ ...i,
+ offset: i.offset ?? 8,
+ arrowRef: a,
+ groupRef: c ? s : o
+ }, e), m = i.popoverRef, h = XO(m, !!f), g = i.isEntering || !i.shouldSkipAnimation && h || !1, _ = vD({
+ ...i,
+ defaultClassName: "react-aria-Popover",
values: {
- selectedItem: n.selectedItems[0]?.value ?? null,
- selectedItems: (0, B.useMemo)(() => n.selectedItems.map((e) => e.value ?? null), [n.selectedItems]),
- selectedText: c,
- isPlaceholder: n.selectedItems.length === 0,
- state: n
+ trigger: i.trigger || null,
+ placement: f,
+ isEntering: g,
+ isExiting: t
}
- }), f = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(zE.span, {
- ref: t,
- ...f,
+ }), v = !i.isNonModal || i.trigger === "SubmenuTrigger" || i.trigger === "PreviewTrigger", [y, b] = (0, B.useState)(i.trigger === "PreviewTrigger");
+ Hp(() => {
+ m.current && b(v && !m.current.querySelector("[role=dialog]"));
+ }, [m, v]), (0, B.useEffect)(() => {
+ y && i.trigger !== "PreviewTrigger" && (i.trigger !== "SubmenuTrigger" || Km() !== "pointer") && m.current && !jp(m.current) && ih(m.current);
+ }, [
+ y,
+ m,
+ i.trigger
+ ]);
+ let x = (0, B.useMemo)(() => {
+ let e = _.children;
+ if (r) for (let t of r) e = /*#__PURE__*/ B.createElement(t.Provider, { value: null }, e);
+ return e;
+ }, [_.children, r]), [S, C] = (0, B.useState)(null), w = (0, B.useCallback)(() => {
+ i.triggerRef.current && C(i.triggerRef.current.getBoundingClientRect().width + "px");
+ }, [i.triggerRef]);
+ Hp(w, [w]), Qy({
+ ref: _.style?.["--trigger-width"] ? void 0 : i.triggerRef,
+ onResize: w
+ });
+ let T = {
+ ...l.style,
+ "--trigger-anchor-point": p ? `${p.x}px ${p.y}px` : void 0,
+ ..._.style,
+ "--trigger-width": _.style?.["--trigger-width"] || S
+ }, E = /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(Eg(i, { global: !0 }), l),
+ ..._,
+ id: y ? i.id : void 0,
+ role: y ? "dialog" : void 0,
+ tabIndex: y ? -1 : void 0,
+ "aria-label": i["aria-label"],
+ "aria-labelledby": i["aria-labelledby"],
+ ref: m,
+ slot: i.slot || void 0,
+ style: T,
+ dir: i.dir,
+ "data-trigger": i.trigger,
+ "data-placement": f,
+ "data-entering": g || void 0,
+ "data-exiting": t || void 0
+ }, !i.isNonModal && /*#__PURE__*/ B.createElement(Pb, { onDismiss: e.close }), /*#__PURE__*/ B.createElement(Tse.Provider, { value: {
...d,
- "data-placeholder": n.selectedItems.length === 0 || void 0
- }, /*#__PURE__*/ B.createElement(QE.Provider, { value: void 0 }, d.children));
-}), Dse = /*#__PURE__*/ (0, B.createContext)(null), BO = /*#__PURE__*/ (0, B.createContext)(null), Ose = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { inputRef: n = null, ...r } = e;
- [e, t] = FE(r, t, Dse);
- let i = Nh((0, B.useMemo)(() => mh(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), a = R_(e), o = ene({
- ...LE(e),
- children: typeof e.children == "function" || e.children
- }, a, i);
- return /*#__PURE__*/ B.createElement(ME, { values: [[BO, a], [VO, {
- ...o,
- inputRef: i,
- defaultClassName: "react-aria-Switch"
- }]] }, /*#__PURE__*/ B.createElement(kse, {
- ...e,
- ref: t
- }));
-}), VO = /*#__PURE__*/ (0, B.createContext)(null), kse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isRequired: d } = (0, B.useContext)(VO), { isFocused: f, isFocusVisible: p, focusProps: m } = ry(), h = a || o, g = (0, B.useContext)(BO), { hoverProps: _, isHovered: v } = sy({
- ...e,
- isDisabled: h
- }), y = NE({
- ...e,
- defaultClassName: u,
- values: {
- isSelected: i,
- isPressed: s,
- isHovered: v,
- isFocused: f,
- isFocusVisible: p,
- isDisabled: a,
- isReadOnly: o,
- isInvalid: c,
- isRequired: d || !1,
- state: g
- }
- }), b = Eg(e, { global: !0 });
- return delete b.id, delete b.onClick, /*#__PURE__*/ B.createElement(zE.label, {
- ...U(b, n, _, y),
- ref: t,
- slot: e.slot || void 0,
- "data-selected": i || void 0,
- "data-pressed": s || void 0,
- "data-hovered": v || void 0,
- "data-focused": f || void 0,
- "data-focus-visible": p || void 0,
- "data-disabled": a || void 0,
- "data-readonly": o || void 0,
- "data-invalid": c || void 0,
- "data-required": d || void 0
- }, /*#__PURE__*/ B.createElement(H_, { elementType: "span" }, /*#__PURE__*/ B.createElement("input", {
- ...U(r, m),
- ref: l
- })), y.children);
-}), HO = 10, UO = 5, Ase = class {
- setup(e, t, n) {
- this.delegate = e, this.state = t, this.direction = n;
- }
- getDropTargetFromPoint(e, t, n) {
- let r = this.delegate.getDropTargetFromPoint(e, t, n);
- return !r || r.type === "root" ? r : this.resolveDropTarget(r, e, t, n);
- }
- resolveDropTarget(e, t, n, r) {
- let i = this.pointerTracking, a = n - i.lastY, o = t - i.lastX, s = i.yDirection, c = i.xDirection;
- if (Math.abs(a) > UO && (s = a > 0 ? "down" : "up", i.yDirection = s, i.lastY = n), Math.abs(o) > HO && (c = o > 0 ? "right" : "left", i.xDirection = c, i.lastX = t), e.dropPosition === "before") {
- let t = this.state.collection.getKeyBefore(e.key);
- for (; t != null;) {
- let e = this.state.collection.getItem(t);
- if (e?.type === "item") break;
- t = e?.parentKey ?? null;
- }
- if (t != null) {
- let n = {
- type: "item",
- key: t,
- dropPosition: "after"
- };
- r(n) && (e = n);
- }
- }
- let l = this.getPotentialTargets(e, r);
- if (l.length === 0) return { type: "root" };
- let u;
- return l.length > 1 ? u = this.selectTarget(l, e, t, n, s, c) : (u = l[0], i.boundaryContext = null), u;
- }
- getPotentialTargets(e, t) {
- if (e.dropPosition === "on") return [e];
- let n = e, r = this.state.collection, i = r.getItem(n.key);
- for (; i && i?.type !== "item" && i.nextKey != null;) n.key = i.nextKey, i = r.getItem(i.nextKey);
- let a = [n];
- if (i && i.hasChildNodes && this.state.expandedKeys.has(i.key) && r.getChildren && n.dropPosition === "after") {
- let e = i.firstChildKey == null ? null : r.getItem(i.firstChildKey);
- for (; e && e.type !== "item";) e = e.nextKey == null ? null : r.getItem(e.nextKey);
- if (e?.type === "item") {
- let n = {
- type: "item",
- key: e.key,
- dropPosition: "before"
- };
- return t(n) ? [n] : [];
- }
- }
- if (i?.nextKey != null) return [e];
- let o = i?.parentKey, s = [];
- for (; o != null;) {
- let e = r.getItem(o), n = e?.nextKey == null ? null : r.getItem(e.nextKey);
- if (!n || n.parentKey !== o) {
- if (e?.type === "item") {
- let e = {
- type: "item",
- key: o,
- dropPosition: "after"
- };
- t(e) && s.push(e);
- }
- if (n) break;
- }
- o = e?.parentKey;
- }
- if (s.length > 0 && a.push(...s), a.length === 1) {
- let e = r.getKeyAfter(n.key), a = e == null ? null : r.getItem(e);
- if (e != null && a && i && a.level != null && i.level != null && a.level > i.level) {
- let n = {
- type: "item",
- key: e,
- dropPosition: "before"
- };
- if (t(n)) return [n];
- }
- }
- return a.filter(t);
- }
- selectTarget(e, t, n, r, i, a) {
- if (e.length < 2) return e[0];
- let o = this.pointerTracking, s = this.state.collection.getItem(t.key)?.parentKey;
- if (s == null) return e[0];
- (!o.boundaryContext || o.boundaryContext.parentKey !== s) && (o.boundaryContext = {
- parentKey: s,
- preferredTargetIndex: o.yDirection === "up" ? e.length - 1 : 0,
- lastSwitchY: r,
- lastSwitchX: n
- });
- let c = o.boundaryContext, l = Math.abs(n - c.lastSwitchX);
- if (Math.abs(r - c.lastSwitchY) > UO && i) {
- let t = c.preferredTargetIndex || 0;
- i === "down" && t === 0 ? c.preferredTargetIndex = e.length - 1 : i === "up" && t === e.length - 1 && (c.preferredTargetIndex = 0), o.xDirection = null;
- }
- if (l > HO && a) {
- let t = c.preferredTargetIndex || 0;
- a === "left" ? this.direction === "ltr" ? t < e.length - 1 && (c.preferredTargetIndex = t + 1, c.lastSwitchX = n) : t > 0 && (c.preferredTargetIndex = t - 1, c.lastSwitchX = n) : a === "right" && (this.direction === "ltr" ? t > 0 && (c.preferredTargetIndex = t - 1, c.lastSwitchX = n) : t < e.length - 1 && (c.preferredTargetIndex = t + 1, c.lastSwitchX = n)), o.yDirection = null;
+ placement: f,
+ ref: a
+ } }, x), /*#__PURE__*/ B.createElement(Pb, { onDismiss: e.close }));
+ return c ? /*#__PURE__*/ B.createElement(ny, {
+ ...i,
+ shouldContainFocus: y && i.trigger !== "PreviewTrigger",
+ isExiting: t,
+ portalContainer: n ?? s?.current ?? void 0
+ }, E) : /*#__PURE__*/ B.createElement(ny, {
+ ...i,
+ shouldContainFocus: y && i.trigger !== "PreviewTrigger",
+ isExiting: t,
+ portalContainer: n
+ }, !i.isNonModal && e.isOpen && /*#__PURE__*/ B.createElement("div", {
+ "data-testid": "underlay",
+ ...u,
+ style: {
+ position: "fixed",
+ inset: 0
}
- return e[Math.max(0, Math.min(c.preferredTargetIndex || 0, e.length - 1))];
- }
- constructor() {
- this.delegate = null, this.state = null, this.direction = "ltr", this.pointerTracking = {
- lastY: 0,
- lastX: 0,
- yDirection: null,
- xDirection: null,
- boundaryContext: null
+ }), /*#__PURE__*/ B.createElement("div", {
+ ref: o,
+ style: { display: "contents" }
+ }, /*#__PURE__*/ B.createElement(ek.Provider, { value: o }, E)));
+}
+//#endregion
+//#region node_modules/react-aria-components/dist/private/Keyboard.mjs
+var Dse = /*#__PURE__*/ (0, B.createContext)({});
+//#endregion
+//#region node_modules/react-stately/dist/private/menu/useMenuTriggerState.mjs
+function nk(e) {
+ let t = YO(e), [n, r] = (0, B.useState)(null), [i, a] = (0, B.useState)([]), o = () => {
+ a([]), t.close();
+ }, s = (e, t) => {
+ a((n) => t > n.length ? n : [...n.slice(0, t), e]);
+ }, c = (e, t) => {
+ a((n) => n[t] === e ? n.slice(0, t) : n);
+ };
+ return {
+ focusStrategy: n,
+ ...t,
+ open(e = null) {
+ r(e), t.open();
+ },
+ toggle(e = null) {
+ r(e), t.toggle();
+ },
+ close() {
+ o();
+ },
+ expandedKeysStack: i,
+ openSubmenu: s,
+ closeSubmenu: c
+ };
+}
+//#endregion
+//#region node_modules/react-stately/dist/private/tree/TreeCollection.mjs
+var Ose = class {
+ constructor(e, { expandedKeys: t } = {}) {
+ this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e, t ||= /* @__PURE__ */ new Set();
+ let n = (e) => {
+ if (this.keyMap.set(e.key, e), e.childNodes && (e.type === "section" || t.has(e.key))) for (let t of e.childNodes) n(t);
};
- }
-}, jse = class {
- constructor(e) {
- this.keyMap = /* @__PURE__ */ new Map(), this.keyMap = /* @__PURE__ */ new Map(), this.columnCount = e?.columnCount, this.rows = [];
- let t = (r) => {
- let i = this.keyMap.get(r.key);
- e.visitNode && (r = e.visitNode(r)), this.keyMap.set(r.key, r);
- let a = /* @__PURE__ */ new Set(), o = null, s = !1;
- if (r.type === "item") {
- for (let e of r.childNodes) if (e.props?.colSpan !== void 0) {
- s = !0;
- break;
- }
- }
- for (let e of r.childNodes) e.type === "cell" && s && (e.colspan = e.props?.colSpan, e.colSpan = e.props?.colSpan, e.colIndex = o ? (o.colIndex ?? o.index) + (o.colSpan ?? 1) : e.index), e.type === "cell" && e.parentKey == null && (e.parentKey = r.key), a.add(e.key), o ? (o.nextKey = e.key, e.prevKey = o.key) : e.prevKey = null, t(e), o = e;
- if (o && (o.nextKey = null), i) for (let e of i.childNodes) a.has(e.key) || n(e);
- }, n = (e) => {
- this.keyMap.delete(e.key);
- for (let t of e.childNodes) this.keyMap.get(t.key) === t && n(t);
- }, r = null;
- for (let [n, i] of e.items.entries()) {
- let e = {
- ...i,
- level: i.level ?? 0,
- key: i.key ?? "row-" + n,
- type: i.type ?? "row",
- value: i.value ?? null,
- hasChildNodes: !0,
- childNodes: [...i.childNodes],
- rendered: i.rendered,
- textValue: i.textValue ?? "",
- index: i.index ?? n
- };
- r ? (r.nextKey = e.key, e.prevKey = r.key) : e.prevKey = null, this.rows.push(e), t(e), r = e;
- }
- r && (r.nextKey = null);
+ for (let t of e) n(t);
+ let r = null, i = 0;
+ for (let [e, t] of this.keyMap) r ? (r.nextKey = e, t.prevKey = r.key) : (this.firstKey = e, t.prevKey = void 0), t.type === "item" && (t.index = i++), r = t, r.nextKey = void 0;
+ this.lastKey = r?.key ?? null;
}
*[Symbol.iterator]() {
- yield* [...this.rows];
+ yield* this.iterable;
}
get size() {
- return [...this.rows].length;
+ return this.keyMap.size;
}
getKeys() {
return this.keyMap.keys();
@@ -22083,11 +21986,10 @@ for (var zO = /*#__PURE__*/ (0, B.createContext)(null), Ese = /*#__PURE__*/ Bh(f
return t ? t.nextKey ?? null : null;
}
getFirstKey() {
- return [...this.rows][0]?.key;
+ return this.firstKey;
}
getLastKey() {
- let e = [...this.rows];
- return e[e.length - 1]?.key;
+ return this.lastKey;
}
getItem(e) {
return this.keyMap.get(e) ?? null;
@@ -22096,2703 +21998,2304 @@ for (var zO = /*#__PURE__*/ (0, B.createContext)(null), Ese = /*#__PURE__*/ Bh(f
let t = [...this.getKeys()];
return this.getItem(t[e]);
}
- getChildren(e) {
- return this.keyMap.get(e)?.childNodes || [];
+};
+//#endregion
+//#region node_modules/react-stately/dist/private/tree/useTreeState.mjs
+function kse(e) {
+ let { onExpandedChange: t } = e, [n, r] = L_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), t), i = LO(e), a = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), o = HO(e, (0, B.useCallback)((e) => new Ose(e, { expandedKeys: n }), [n]), null);
+ return (0, B.useEffect)(() => {
+ i.focusedKey != null && !o.getItem(i.focusedKey) && i.setFocusedKey(null);
+ }, [o, i.focusedKey]), {
+ collection: o,
+ expandedKeys: n,
+ disabledKeys: a,
+ toggleKey: (e) => {
+ r(Ase(n, e));
+ },
+ setExpandedKeys: r,
+ selectionManager: new zO(o, i)
+ };
+}
+function Ase(e, t) {
+ let n = new Set(e);
+ return n.has(t) ? n.delete(t) : n.add(t), n;
+}
+//#endregion
+//#region node_modules/react-aria-components/dist/private/Menu.mjs
+var rk = /*#__PURE__*/ (0, B.createContext)(null), ik = /*#__PURE__*/ (0, B.createContext)(null), ak = /*#__PURE__*/ (0, B.createContext)(null), ok = /*#__PURE__*/ (0, B.createContext)(null);
+function jse(e) {
+ let t = nk(e), n = (0, B.useRef)(null), { menuTriggerProps: r, menuProps: i } = Lv({
+ ...e,
+ type: "menu"
+ }, t, n), a = (0, B.useRef)(null);
+ return Vh() ? null : /*#__PURE__*/ B.createElement(_D, { values: [
+ [rk, {
+ ...i,
+ ref: a
+ }],
+ [dk, t],
+ [ak, t],
+ [$O, {
+ trigger: "MenuTrigger",
+ triggerRef: n,
+ scrollRef: a,
+ placement: "bottom start",
+ "aria-labelledby": i["aria-labelledby"],
+ offset: e.trigger === "contextMenu" ? 0 : void 0
+ }]
+ ] }, /*#__PURE__*/ B.createElement(fte, {
+ ...r,
+ ref: n,
+ isPressed: t.isOpen
+ }, e.children));
+}
+var Mse = /*#__PURE__*/ (0, B.createContext)(null);
+(class extends tp {
+ static {
+ this.type = "submenutrigger";
}
-}, WO = "row-header-column-" + Math.random().toString(36).slice(2), GO = "row-header-column-" + Math.random().toString(36).slice(2); WO === GO;) GO = "row-header-column-" + Math.random().toString(36).slice(2);
-function KO(e, t) {
- if (t.length === 0) return [];
- let n = [], r = /* @__PURE__ */ new Map();
- for (let i of t) {
- let t = i.parentKey, a = [i];
- for (; t != null;) {
- let n = e.get(t);
- if (!n) break;
- if (r.has(n)) {
- n.colSpan ??= 0, n.colSpan++, n.colspan = n.colSpan;
- let { column: e, index: t } = r.get(n);
- if (t > a.length) break;
- for (let n = t; n < a.length; n++) e.splice(n, 0, null);
- for (let t = a.length; t < e.length; t++) e[t] && r.has(e[t]) && (r.get(e[t]).index = t);
- } else n.colSpan = 1, n.colspan = 1, a.push(n), r.set(n, {
- column: a,
- index: a.length - 1
- });
- t = n.parentKey;
+ filter(e, t, n) {
+ let r = e.getItem(this.firstChildKey);
+ if (r && n(r.textValue, this)) {
+ let n = this.clone();
+ return t.addDescendants(n, e), n;
}
- n.push(a), i.index = n.length - 1;
+ return null;
}
- let i = Math.max(...n.map((e) => e.length)), a = Array(i).fill(0).map(() => []), o = 0;
- for (let e of n) {
- let t = i - 1;
- for (let n of e) {
- if (n) {
- let e = a[t], r = e.reduce((e, t) => e + (t.colSpan ?? 1), 0);
- if (r < o) {
- let i = {
- type: "placeholder",
- key: "placeholder-" + n.key,
- colspan: o - r,
- colSpan: o - r,
- index: r,
- value: null,
- rendered: null,
- level: t,
- hasChildNodes: !1,
- childNodes: [],
- textValue: ""
- };
- e.length > 0 && (e[e.length - 1].nextKey = i.key, i.prevKey = e[e.length - 1].key), e.push(i);
- }
- e.length > 0 && (e[e.length - 1].nextKey = n.key, n.prevKey = e[e.length - 1].key), n.level = t, n.colIndex = o, e.push(n);
- }
- t--;
- }
- o++;
+});
+var Nse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ return [e, t] = bD(e, t, rk), /*#__PURE__*/ B.createElement(qh, { content: /*#__PURE__*/ B.createElement(ag, e) }, (n) => /*#__PURE__*/ B.createElement(Pse, {
+ props: e,
+ collection: n,
+ menuRef: t
+ }));
+});
+function Pse({ props: e, collection: t, menuRef: n }) {
+ [e, n] = bD(e, n, TD);
+ let { filter: r, ...i } = e, a = (0, B.useMemo)(() => r ? t.filter(r) : t, [t, r]), o = kse({
+ ...e,
+ collection: a,
+ children: void 0
+ }), s = (0, B.useContext)(ak), { isVirtualized: c, CollectionRoot: l } = (0, B.useContext)(AD), { menuProps: u } = Ote({
+ ...e,
+ isVirtualized: c,
+ onClose: e.onClose || s?.close
+ }, o, n), d = vD({
+ ...e,
+ children: void 0,
+ defaultClassName: "react-aria-Menu",
+ values: { isEmpty: o.collection.size === 0 }
+ }), f = null;
+ o.collection.size === 0 && e.renderEmptyState && (f = /*#__PURE__*/ B.createElement("div", {
+ role: "menuitem",
+ style: { display: "contents" }
+ }, e.renderEmptyState()));
+ let p = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(Yg, null, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(p, d, u),
+ ref: n,
+ slot: e.slot || void 0,
+ "data-empty": o.collection.size === 0 || void 0,
+ onScroll: e.onScroll
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [ik, o],
+ [NO, { elementType: "div" }],
+ [DD, {
+ name: "MenuSection",
+ render: sk
+ }],
+ [Mse, {
+ parentMenuRef: n,
+ shouldUseVirtualFocus: i?.shouldUseVirtualFocus
+ }],
+ [lk, { shouldCloseOnSelect: e.shouldCloseOnSelect }],
+ [TD, null],
+ [ED, null],
+ [ok, o.selectionManager],
+ [ak, s ?? nk({})]
+ ] }, /*#__PURE__*/ B.createElement(jO, null, /*#__PURE__*/ B.createElement(l, {
+ collection: o.collection,
+ persistedKeys: jD(o.selectionManager.focusedKey),
+ scrollRef: n
+ }))), f));
+}
+var Fse = class extends zO {
+ constructor(e, t) {
+ super(e.collection, t), this.parent = e;
}
- let s = 0;
- for (let e of a) {
- let n = e.reduce((e, t) => e + (t.colSpan ?? 1), 0);
- if (n < t.length) {
- let r = {
- type: "placeholder",
- key: "placeholder-" + e[e.length - 1].key,
- colSpan: t.length - n,
- colspan: t.length - n,
- index: n,
- value: null,
- rendered: null,
- level: s,
- hasChildNodes: !1,
- childNodes: [],
- textValue: "",
- prevKey: e[e.length - 1].key
- };
- e.push(r);
- }
- s++;
+ get focusedKey() {
+ return this.parent.focusedKey;
}
- return a.map((e, t) => ({
- type: "headerrow",
- key: "headerrow-" + t,
- index: t,
- value: null,
- rendered: null,
- level: 0,
- hasChildNodes: !0,
- childNodes: e,
- textValue: ""
- }));
+ get isFocused() {
+ return this.parent.isFocused;
+ }
+ setFocusedKey(e, t) {
+ return this.parent.setFocusedKey(e, t);
+ }
+ setFocused(e) {
+ this.parent.setFocused(e);
+ }
+ get childFocusStrategy() {
+ return this.parent.childFocusStrategy;
+ }
+};
+function sk(e, t, n, r = "react-aria-MenuSection") {
+ let i = (0, B.useContext)(ik), { CollectionBranch: a } = (0, B.useContext)(AD), [o, s] = xD(), { headingProps: c, groupProps: l } = Ate({
+ heading: s,
+ "aria-label": n.props["aria-label"] ?? void 0
+ }), u = vD({
+ ...e,
+ id: void 0,
+ children: void 0,
+ defaultClassName: r,
+ className: n.props?.className,
+ style: n.props?.style,
+ values: void 0
+ }), d = (0, B.useContext)(ok), f = LO(e), p = e.selectionMode == null ? d : new Fse(d, f), m = yD(lk)?.shouldCloseOnSelect, h = Eg(e, { global: !0 });
+ return delete h.id, /*#__PURE__*/ B.createElement(wD.section, {
+ ...U(h, u, l),
+ ref: t
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [AO, {
+ ...c,
+ ref: o
+ }],
+ [ok, p],
+ [lk, { shouldCloseOnSelect: e.shouldCloseOnSelect ?? m }]
+ ] }, /*#__PURE__*/ B.createElement(a, {
+ collection: i.collection,
+ parent: n
+ })));
}
-var Mse = class extends jse {
- constructor(e, t, n) {
- let r = /* @__PURE__ */ new Set(), i = null, a = [];
- if (n?.showSelectionCheckboxes) {
- let e = {
- type: "column",
- key: WO,
- value: null,
- textValue: "",
- level: 0,
- index: +!!n?.showDragButtons,
- hasChildNodes: !1,
- rendered: null,
- childNodes: [],
- props: { isSelectionCell: !0 }
- };
- a.unshift(e);
- }
- if (n?.showDragButtons) {
- let e = {
- type: "column",
- key: GO,
- value: null,
- textValue: "",
- level: 0,
- index: 0,
- hasChildNodes: !1,
- rendered: null,
- childNodes: [],
- props: { isDragButtonCell: !0 }
- };
- a.unshift(e);
- }
- let o = [], s = /* @__PURE__ */ new Map(), c = (e) => {
- switch (e.type) {
- case "body":
- i = e;
- break;
- case "column":
- s.set(e.key, e), e.hasChildNodes || (a.push(e), e.props.isRowHeader && r.add(e.key));
- break;
- case "item":
- o.push(e);
- return;
- }
- for (let t of e.childNodes) c(t);
- };
- for (let t of e) c(t);
- let l = KO(s, a);
- if (l.forEach((e, t) => o.splice(t, 0, e)), super({
- columnCount: a.length,
- items: o,
- visitNode: (e) => (e.column = a[e.index], e)
- }), this._size = 0, this.columns = a, this.rowHeaderColumnKeys = r, this.body = i, this.headerRows = l, this._size = [...i.childNodes].length, this.rowHeaderColumnKeys.size === 0) {
- let e = this.columns.find((e) => !e.props?.isDragButtonCell && !e.props?.isSelectionCell);
- e && this.rowHeaderColumnKeys.add(e.key);
+var ck = /*#__PURE__*/ ng(ap, sk), lk = /*#__PURE__*/ (0, B.createContext)(null), uk = /*#__PURE__*/ tg(ip, function(e, t, n) {
+ [e, t] = bD(e, t, lk);
+ let r = yD(lk)?.id, i = (0, B.useContext)(ik), a = Nh(t), o = (0, B.useContext)(ok), { isVirtualized: s } = (0, B.useContext)(AD), { menuItemProps: c, labelProps: l, descriptionProps: u, keyboardShortcutProps: d, ...f } = kte({
+ ...e,
+ id: r,
+ key: n.key,
+ selectionManager: o,
+ isVirtualized: s
+ }, i, a), { hoverProps: p, isHovered: m } = cy({ isDisabled: f.isDisabled }), h = vD({
+ ...e,
+ id: void 0,
+ children: n.rendered,
+ defaultClassName: "react-aria-MenuItem",
+ values: {
+ ...f,
+ isHovered: m,
+ isFocusVisible: f.isFocusVisible,
+ selectionMode: o.selectionMode,
+ selectionBehavior: o.selectionBehavior,
+ hasSubmenu: !!e["aria-haspopup"],
+ isOpen: e["aria-expanded"] === "true"
}
- }
- *[Symbol.iterator]() {
- yield* this.body.childNodes;
- }
- get size() {
- return this._size;
- }
- getKeys() {
- return this.keyMap.keys();
- }
- getKeyBefore(e) {
- return this.keyMap.get(e)?.prevKey ?? null;
- }
- getKeyAfter(e) {
- return this.keyMap.get(e)?.nextKey ?? null;
- }
- getFirstKey() {
- return Hv(this.body.childNodes)?.key ?? null;
- }
- getLastKey() {
- return Wv(this.body.childNodes)?.key ?? null;
- }
- getItem(e) {
- return e === this.body.key ? this.body : this.keyMap.get(e) ?? null;
- }
- at(e) {
- let t = [...this.getKeys()];
- return this.getItem(t[e]);
- }
- getChildren(e) {
- if (e === this.body.key) return this.body.childNodes;
- let t = this.getItem(e);
- return t?.type === "item" ? [...t.childNodes].filter((e) => e.type === "cell") : super.getChildren(e);
- }
- getTextValue(e) {
- let t = this.getItem(e);
- if (!t) return "";
- if (t.textValue) return t.textValue;
- let n = this.rowHeaderColumnKeys;
- if (n) {
- let e = [];
- for (let r of t.childNodes) {
- let t = this.columns[r.index];
- if (n.has(t.key) && r.textValue && e.push(r.textValue), e.length === n.size) break;
- }
- return e.join(" ");
+ }), g = e.href ? wD.a : wD.div, _ = Eg(e, { global: !0 });
+ return delete _.id, delete _.onClick, /*#__PURE__*/ B.createElement(g, {
+ ...U(_, h, c, p),
+ ref: a,
+ "data-disabled": f.isDisabled || void 0,
+ "data-hovered": m || void 0,
+ "data-focused": f.isFocused || void 0,
+ "data-focus-visible": f.isFocusVisible || void 0,
+ "data-pressed": f.isPressed || void 0,
+ "data-selected": f.isSelected || void 0,
+ "data-selection-mode": o.selectionMode === "none" ? void 0 : o.selectionMode,
+ "data-has-submenu": !!e["aria-haspopup"] || void 0,
+ "data-open": e["aria-expanded"] === "true" || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [LD, { slots: {
+ [gD]: l,
+ label: l,
+ description: u
+ } }],
+ [Dse, d],
+ [MO, { isSelected: f.isSelected }]
+ ] }, h.children));
+});
+tg(rp, function(e, t, n) {
+ let r = (0, B.useContext)(ik), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, B.useRef)(null);
+ GO((0, B.useMemo)(() => ({
+ onLoadMore: a,
+ collection: r?.collection,
+ sentinelRef: c,
+ scrollOffset: o
+ }), [
+ a,
+ o,
+ r?.collection
+ ]), c);
+ let l = vD({
+ ...s,
+ id: void 0,
+ children: n.rendered,
+ defaultClassName: "react-aria-MenuLoadingIndicator",
+ values: void 0
+ });
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement("div", {
+ style: {
+ position: "relative",
+ width: 0,
+ height: 0
+ },
+ inert: PO(!0)
+ }, /*#__PURE__*/ B.createElement("div", {
+ "data-testid": "loadMoreSentinel",
+ ref: c,
+ style: {
+ position: "absolute",
+ height: 1,
+ width: 1
}
- return "";
- }
-};
+ })), i && l.children && /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(Eg(e, { global: !0 }), { tabIndex: -1 }),
+ ...l,
+ role: "menuitem",
+ ref: t
+ }, l.children)));
+});
//#endregion
-//#region node_modules/react-stately/dist/private/grid/useGridState.mjs
-function Nse(e) {
- let { collection: t, focusMode: n } = e, r = e.UNSAFE_selectionState || QD(e), i = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = r.setFocusedKey;
- r.setFocusedKey = (e, r) => {
- if (n === "cell" && e != null) {
- let n = t.getItem(e);
- if (n?.type === "item") {
- let i = Vv(n, t);
- e = r === "last" ? Wv(i)?.key ?? null : Hv(i)?.key ?? null;
+//#region node_modules/react-aria-components/dist/private/Dialog.mjs
+var Ise = /*#__PURE__*/ (0, B.createContext)(null), dk = /*#__PURE__*/ (0, B.createContext)(null), fk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let n = e["aria-labelledby"];
+ [e, t] = bD(e, t, Ise);
+ let { dialogProps: r, titleProps: i, contentProps: a } = mte({
+ ...e,
+ "aria-labelledby": n
+ }, t), o = (0, B.useContext)(dk);
+ !r["aria-label"] && !r["aria-labelledby"] && e["aria-labelledby"] && (r["aria-labelledby"] = e["aria-labelledby"]);
+ let s = vD({
+ defaultClassName: "react-aria-Dialog",
+ className: e.className,
+ style: e.style,
+ children: e.children,
+ values: { close: o?.close || (() => {}) }
+ }), c = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(wD.section, {
+ ...U(c, s, r),
+ render: e.render,
+ ref: t,
+ slot: e.slot || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [FD, { slots: {
+ [gD]: {},
+ title: {
+ ...i,
+ level: 2
}
+ } }],
+ [LD, { slots: {
+ [gD]: {},
+ description: a
+ } }],
+ [ND, { slots: {
+ [gD]: {},
+ close: { onPress: () => o?.close() }
+ } }]
+ ] }, s.children));
+}), pk = typeof document < "u" && window.visualViewport;
+function Lse() {
+ let e = Om(), [t, n] = (0, B.useState)(() => e ? {
+ width: 0,
+ height: 0
+ } : mk());
+ return (0, B.useEffect)(() => {
+ let e = (e) => {
+ n((t) => e.width === t.width && e.height === t.height ? t : e);
+ }, t = () => {
+ pk && pk.scale > 1 || e(mk());
+ }, r, i = (t) => {
+ pk && pk.scale > 1 || lg(H(t)) && (r = requestAnimationFrame(() => {
+ let t = kp();
+ (!t || !lg(t)) && e({
+ width: document.documentElement.clientWidth,
+ height: document.documentElement.clientHeight
+ });
+ }));
+ };
+ return e(mk()), em() && nm() && window.addEventListener("blur", i, !0), pk ? pk.addEventListener("resize", t) : window.addEventListener("resize", t), () => {
+ cancelAnimationFrame(r), em() && nm() && window.removeEventListener("blur", i, !0), pk ? pk.removeEventListener("resize", t) : window.removeEventListener("resize", t);
+ };
+ }, []), t;
+}
+function mk() {
+ return {
+ width: pk ? Math.min(pk.width * pk.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
+ height: pk ? pk.height * pk.scale : document.documentElement.clientHeight
+ };
+}
+//#endregion
+//#region node_modules/react-aria-components/dist/private/Modal.mjs
+var Rse = /*#__PURE__*/ (0, B.createContext)(null), hk = /*#__PURE__*/ (0, B.createContext)(null), zse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ if ((0, B.useContext)(hk)) return /*#__PURE__*/ B.createElement(_k, {
+ ...e,
+ modalRef: t
+ }, e.children);
+ let { isDismissable: n, isKeyboardDismissDisabled: r, isOpen: i, defaultOpen: a, onOpenChange: o, children: s, isEntering: c, isExiting: l, UNSTABLE_portalContainer: u, shouldCloseOnInteractOutside: d, ...f } = e;
+ return /*#__PURE__*/ B.createElement(gk, {
+ isDismissable: n,
+ isKeyboardDismissDisabled: r,
+ isOpen: i,
+ defaultOpen: a,
+ onOpenChange: o,
+ isEntering: c,
+ isExiting: l,
+ UNSTABLE_portalContainer: u,
+ shouldCloseOnInteractOutside: d
+ }, /*#__PURE__*/ B.createElement(_k, {
+ ...f,
+ modalRef: t
+ }, s));
+});
+function Bse(e, t) {
+ [e, t] = bD(e, t, Rse);
+ let n = (0, B.useContext)(dk), r = YO(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = Nh(t), o = (0, B.useRef)(null), s = ZO(a, i.isOpen), c = ZO(o, i.isOpen), l = s || c || e.isExiting || !1, u = Om();
+ return !i.isOpen && !l || u ? null : /*#__PURE__*/ B.createElement(Vse, {
+ ...e,
+ state: i,
+ isExiting: l,
+ overlayRef: a,
+ modalRef: o
+ });
+}
+var gk = /*#__PURE__*/ (0, B.forwardRef)(Bse);
+function Vse({ UNSTABLE_portalContainer: e, ...t }) {
+ let n = t.modalRef, { state: r } = t, { modalProps: i, underlayProps: a } = Fte(t, r, n), o = XO(t.overlayRef) || t.isEntering || !1, s = vD({
+ ...t,
+ defaultClassName: "react-aria-ModalOverlay",
+ values: {
+ isEntering: o,
+ isExiting: t.isExiting,
+ state: r
}
- a(e, r);
+ }), c = Lse(), l, u;
+ if (typeof document < "u") {
+ let e = m_(document.body) ? document.body : document.scrollingElement || document.documentElement, t = e.getBoundingClientRect().width % 1, n = e.getBoundingClientRect().height % 1;
+ l = e.scrollWidth - t, u = e.scrollHeight - n;
+ }
+ let d = {
+ ...s.style,
+ "--visual-viewport-width": c.width + "px",
+ "--visual-viewport-height": c.height + "px",
+ "--page-width": l === void 0 ? void 0 : l + "px",
+ "--page-height": u === void 0 ? void 0 : u + "px"
};
- let o = (0, B.useMemo)(() => new eO(t, r), [t, r]), s = (0, B.useRef)(null);
- return (0, B.useEffect)(() => {
- if (r.focusedKey != null && s.current && !t.getItem(r.focusedKey)) {
- let e = s.current.getItem(r.focusedKey), n = e?.parentKey != null && (e.type === "cell" || e.type === "rowheader" || e.type === "column") ? s.current.getItem(e.parentKey) : e;
- if (!n) {
- r.setFocusedKey(null);
- return;
- }
- let i = s.current.rows, a = t.rows, c = i.length - a.length, l = Math.min(c > 1 ? Math.max(n.index - c + 1, 0) : n.index, a.length - 1), u = null;
- for (let e = Math.max(0, l); e < a.length; e++) if (!o.isDisabled(a[e].key) && a[e].type !== "headerrow") {
- u = a[e];
- break;
- }
- if (u === null) {
- for (let e = l - 1; e >= 0; e--) if (!o.isDisabled(a[e].key) && a[e].type !== "headerrow") {
- u = a[e];
- break;
- }
- }
- if (u) {
- let i = u.hasChildNodes ? [...Vv(u, t)] : [], a = u.hasChildNodes && n !== e && e && e.index < i.length ? i[e.index].key : u.key;
- r.setFocusedKey(a);
- } else r.setFocusedKey(null);
+ return /*#__PURE__*/ B.createElement(ny, {
+ isExiting: t.isExiting,
+ portalContainer: e
+ }, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(Eg(t, { global: !0 }), a),
+ ...s,
+ style: d,
+ ref: t.overlayRef,
+ "data-entering": o || void 0,
+ "data-exiting": t.isExiting || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [[hk, {
+ modalProps: i,
+ modalRef: n,
+ isExiting: t.isExiting,
+ isDismissable: t.isDismissable
+ }], [dk, r]] }, s.children)));
+}
+function _k(e) {
+ let { modalProps: t, modalRef: n, isExiting: r, isDismissable: i } = (0, B.useContext)(hk), a = (0, B.useContext)(dk), o = Nh((0, B.useMemo)(() => mh(e.modalRef, n), [e.modalRef, n])), s = XO(o), c = vD({
+ ...e,
+ defaultClassName: "react-aria-Modal",
+ values: {
+ isEntering: s,
+ isExiting: r,
+ state: a
}
- s.current = t;
- }, [
- t,
- o,
- r,
- r.focusedKey
- ]), {
- collection: t,
- disabledKeys: i,
- isKeyboardNavigationDisabled: !1,
- selectionManager: o
+ });
+ return /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(Eg(e, { global: !0 }), t),
+ ...c,
+ ref: o,
+ "data-entering": s || void 0,
+ "data-exiting": r || void 0
+ }, i && /*#__PURE__*/ B.createElement(Pb, { onDismiss: a.close }), c.children);
+}
+//#endregion
+//#region node_modules/react-stately/dist/private/radio/useRadioGroupState.mjs
+var Hse = Math.round(Math.random() * 1e10), Use = 0;
+function Wse(e) {
+ let t = (0, B.useMemo)(() => e.name || `radio-group-${Hse}-${++Use}`, [e.name]), [n, r] = L_(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, B.useState)(n), [a, o] = (0, B.useState)(null), s = O_({
+ ...e,
+ value: n
+ }), c = (t) => {
+ !e.isReadOnly && !e.isDisabled && (r(t), s.commitValidation());
+ }, l = s.displayValidation.isInvalid;
+ return {
+ ...s,
+ name: t,
+ selectedValue: n,
+ defaultSelectedValue: e.value === void 0 ? e.defaultValue ?? null : i,
+ setSelectedValue: c,
+ lastFocusedValue: a,
+ setLastFocusedValue: o,
+ isDisabled: e.isDisabled || !1,
+ isReadOnly: e.isReadOnly || !1,
+ isRequired: e.isRequired || !1,
+ validationState: e.validationState || (l ? "invalid" : null),
+ isInvalid: l
};
}
//#endregion
-//#region node_modules/react-stately/dist/private/table/useTableState.mjs
-var Pse = {
- ascending: "descending",
- descending: "ascending"
-};
-function Fse(e) {
- let [t, n] = (0, B.useState)(!1), { selectionMode: r = "none", showSelectionCheckboxes: i, showDragButtons: a, treeColumn: o = null } = e, s = (0, B.useMemo)(() => ({
- showSelectionCheckboxes: i && r !== "none",
- showDragButtons: a,
- selectionMode: r,
- columns: []
- }), [
- e.children,
- i,
- r,
- a
- ]), c = rO(e, (0, B.useCallback)((e) => new Mse(e, null, s), [s]), s), { disabledKeys: l, selectionManager: u } = Nse({
+//#region node_modules/react-aria-components/dist/private/RadioGroup.mjs
+var Gse = /*#__PURE__*/ (0, B.createContext)(null), Kse = /*#__PURE__*/ (0, B.createContext)(null), vk = /*#__PURE__*/ (0, B.createContext)(null), yk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, Gse);
+ let { validationBehavior: n } = yD(zD) || {}, r = e.validationBehavior ?? n ?? "native", i = Wse({
...e,
- collection: c,
- disabledBehavior: e.disabledBehavior || "selection"
- }), [d, f] = L_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
+ validationBehavior: r
+ }), [a, o] = xD(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = Yte({
+ ...e,
+ label: o,
+ validationBehavior: r
+ }, i), f = vD({
+ ...e,
+ values: {
+ orientation: e.orientation || "vertical",
+ isDisabled: i.isDisabled,
+ isReadOnly: i.isReadOnly,
+ isRequired: i.isRequired,
+ isInvalid: i.isInvalid,
+ state: i
+ },
+ defaultClassName: "react-aria-RadioGroup"
+ }), p = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(p, f, s),
+ ref: t,
+ slot: e.slot || void 0,
+ "data-orientation": e.orientation || "vertical",
+ "data-invalid": i.isInvalid || void 0,
+ "data-disabled": i.isDisabled || void 0,
+ "data-readonly": i.isReadOnly || void 0,
+ "data-required": i.isRequired || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [vk, i],
+ [MD, {
+ ...c,
+ ref: a,
+ elementType: "span"
+ }],
+ [LD, { slots: {
+ description: l,
+ errorMessage: u
+ } }],
+ [RD, d]
+ ] }, /*#__PURE__*/ B.createElement(jO, null, f.children)));
+}), bk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { inputRef: n = null, ...r } = e;
+ [e, t] = bD(r, t, Kse);
+ let i = B.useContext(vk), a = Nh((0, B.useMemo)(() => mh(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = Jte({
+ ...SD(e),
+ children: typeof e.children == "function" || e.children
+ }, i, a);
+ return /*#__PURE__*/ B.createElement(xk.Provider, { value: {
+ ...o,
+ inputRef: a,
+ defaultClassName: "react-aria-Radio"
+ } }, /*#__PURE__*/ B.createElement(qse, {
+ ...e,
+ ref: t
+ }));
+}), xk = /*#__PURE__*/ (0, B.createContext)(null), qse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, B.useContext)(xk), l = B.useContext(vk), { isFocused: u, isFocusVisible: d, focusProps: f } = iy(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = cy({
+ ...e,
+ isDisabled: p
+ }), g = vD({
+ ...e,
+ defaultClassName: s,
+ values: {
+ isSelected: i,
+ isPressed: o,
+ isHovered: h,
+ isFocused: u,
+ isFocusVisible: d,
+ isDisabled: a,
+ isReadOnly: l.isReadOnly,
+ isInvalid: l.isInvalid,
+ isRequired: l.isRequired
+ }
+ }), _ = Eg(e, { global: !0 });
+ return delete _.id, delete _.onClick, /*#__PURE__*/ B.createElement(wD.label, {
+ ...U(_, n, m, g),
+ ref: t,
+ "data-selected": i || void 0,
+ "data-pressed": o || void 0,
+ "data-hovered": h || void 0,
+ "data-focused": u || void 0,
+ "data-focus-visible": d || void 0,
+ "data-disabled": a || void 0,
+ "data-readonly": l.isReadOnly || void 0,
+ "data-invalid": l.isInvalid || void 0,
+ "data-required": l.isRequired || void 0
+ }, /*#__PURE__*/ B.createElement(H_, { elementType: "span" }, /*#__PURE__*/ B.createElement("input", {
+ ...U(r, f),
+ ref: c
+ })), g.children);
+});
+//#endregion
+//#region node_modules/react-stately/dist/private/select/useSelectState.mjs
+function Jse(e) {
+ let { selectionMode: t = "single", shouldCloseOnSelect: n = t === "single" } = e, r = YO(e), [i, a] = (0, B.useState)(null), o = (0, B.useMemo)(() => e.defaultValue === void 0 ? t === "single" ? e.defaultSelectedKey ?? null : [] : e.defaultValue, [
+ e.defaultValue,
+ e.defaultSelectedKey,
+ t
+ ]), [s, c] = L_((0, B.useMemo)(() => e.value === void 0 ? t === "single" ? e.selectedKey : void 0 : e.value, [
+ e.value,
+ e.selectedKey,
+ t
+ ]), o, e.onChange), l = t === "single" && Array.isArray(s) ? s[0] : s, u = (n) => {
+ if (t === "single") {
+ let t = Array.isArray(n) ? n[0] ?? null : n;
+ c(t), t !== l && e.onSelectionChange?.(t);
+ } else {
+ let e = [];
+ Array.isArray(n) ? e = n : n != null && (e = [n]), c(e);
+ }
+ }, d = UO({
+ ...e,
+ selectionMode: t,
+ disallowEmptySelection: t === "single",
+ allowDuplicateSelectionEvents: !0,
+ selectedKeys: (0, B.useMemo)(() => Yse(l), [l]),
+ onSelectionChange: (e) => {
+ if (e !== "all") {
+ if (t === "single") {
+ let t = e.values().next().value ?? null;
+ u(t);
+ } else u([...e]);
+ n && r.close(), m.commitValidation();
+ }
+ }
+ }), f = d.selectionManager.firstSelectedKey, p = (0, B.useMemo)(() => [...d.selectionManager.selectedKeys].map((e) => d.collection.getItem(e)).filter((e) => e != null), [d.selectionManager.selectedKeys, d.collection]), m = O_({
+ ...e,
+ value: Array.isArray(l) && l.length === 0 ? null : l
+ }), [h, g] = (0, B.useState)(!1), [_] = (0, B.useState)(l);
return {
- collection: c,
- disabledKeys: l,
- selectionManager: u,
- showSelectionCheckboxes: e.showSelectionCheckboxes || !1,
- sortDescriptor: e.sortDescriptor ?? null,
- isKeyboardNavigationDisabled: c.size === 0 || t,
- setKeyboardNavigationDisabled: n,
- sort(t, n) {
- e.onSortChange?.({
- column: t,
- direction: n ?? (e.sortDescriptor?.column === t ? Pse[e.sortDescriptor.direction] : "ascending")
- });
+ ...m,
+ ...d,
+ ...r,
+ value: l,
+ defaultValue: o ?? _,
+ setValue: u,
+ selectedKey: f,
+ setSelectedKey: u,
+ selectedItem: p[0] ?? null,
+ selectedItems: p,
+ defaultSelectedKey: e.defaultSelectedKey ?? (e.selectionMode === "single" ? _ : null),
+ focusStrategy: i,
+ open(t = null) {
+ (d.collection.size !== 0 || e.allowsEmptyCollection) && (a(t), r.open());
},
- expandedKeys: d,
- toggleKey(e) {
- f((t) => {
- let n = new Set(t);
- return n.has(e) ? n.delete(e) : n.add(e), n;
- });
+ toggle(t = null) {
+ (d.collection.size !== 0 || e.allowsEmptyCollection) && (a(t), r.toggle());
},
- treeColumn: o
+ isFocused: h,
+ setFocused: g
};
}
-function Ise(e, t) {
- let n = (0, B.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
- return {
- ...e,
- collection: n,
- selectionManager: r
- };
+function Yse(e) {
+ if (e !== void 0) return e === null ? [] : Array.isArray(e) ? e : [e];
}
//#endregion
-//#region node_modules/react-aria-components/dist/private/Table.mjs
-var Lse = class extends op {
- withExpandedKeys(e) {
- let t = this.clone();
- return t.expandedKeys = e, t.frozen = this.frozen, t.rows = Array.from(t.getRows()), t;
- }
- addNode(e) {
- super.addNode(e), this.columnsDirty ||= e.type === "column", e.type === "tableheader" && (this.head = e);
- }
- getRows() {
- let e = [];
- for (let t of this) (t.type === "tablebody" || t.type === "tablefooter") && e.push(...this.getChildren(t.key));
- return e;
- }
- get body() {
- for (let e of this) if (e.type === "tablebody") return e;
- return new $O(-2);
- }
- commit(e, t, n = !1) {
- this.updateColumns(n), this.firstKey = e, this.lastKey = t, this.rows = [];
- for (let e of this.getRows()) {
- let t = e.lastChildKey;
- if (t != null) {
- let e = this.getItem(t);
- for (; e && e.type !== "cell";) e = e.prevKey == null ? null : this.getItem(e.prevKey);
- if (e) {
- let t = (e.colIndex ?? e.index) + (e.colSpan ?? 1);
- if (t !== this.columns.length && !n) throw Error(`Cell count must match column count. Found ${t} cells and ${this.columns.length} columns.`);
- }
- }
- this.rows.push(e);
- }
- super.commit(e, t, n);
- }
- updateColumns(e) {
- if (!this.columnsDirty) return;
- this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.columns = [];
- let t = /* @__PURE__ */ new Map(), n = (e) => {
- e.type === "column" && (t.set(e.key, e), e.hasChildNodes || (e.index = this.columns.length, this.columns.push(e), e.props.isRowHeader && this.rowHeaderColumnKeys.add(e.key)));
- for (let t of this.getChildren(e.key)) n(t);
- };
- for (let e of this.getChildren(this.head.key)) n(e);
- if (this.headerRows = KO(t, this.columns), this.columnsDirty = !1, this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !e) throw Error("A table must have at least one Column with the isRowHeader prop set to true");
- }
- get columnCount() {
- return this.columns.length;
- }
- *[Symbol.iterator]() {
- let e = this.firstKey;
- for (; e != null;) {
- let t = this.getItem(e);
- t && (yield t), e = t?.nextKey ?? null;
- }
- }
- getFirstKey() {
- for (let e of this) if (e.type === "tablebody") return e.firstChildKey ?? null;
- return null;
- }
- getLastKey() {
- let e = this.lastKey;
- if (e == null) return null;
- let t = this.getItem(e);
- for (; t?.lastChildKey != null && (t.type !== "item" || this.expandedKeys.has(t.key));) t = this.getItem(t.lastChildKey);
- return t?.key;
- }
- getKeyAfter(e) {
- let t = this.getItem(e);
- if (t?.type === "column") return t.nextKey ?? null;
- if (!t) return null;
- if (t.type === "item" && t.firstChildKey != null && this.expandedKeys.has(t.key)) {
- let e = this.getItem(t.firstChildKey);
- for (; e;) {
- if (e.type === "item") return e.key;
- e = e.nextKey == null ? null : this.getItem(e.nextKey);
- }
- }
- return super.getKeyAfter(e);
- }
- getKeyBefore(e) {
- let t = this.getItem(e);
- if (t?.type === "column") return t.prevKey ?? null;
- if (!t) return null;
- let n = null;
- if (t.prevKey != null) {
- for (t = this.getItem(t.prevKey); t && (t.type !== "item" || this.expandedKeys.has(t.key)) && t.lastChildKey != null;) t = this.getItem(t.lastChildKey);
- n = t?.key ?? null;
- }
- return n ??= t.parentKey, n != null && this.getItem(n)?.type === "tableheader" ? null : n;
- }
- getChildren(e) {
- let t = this.getItem(e);
- if (!t) {
- for (let t of this.headerRows) if (t.key === e) return t.childNodes;
- }
- let n = this;
- return t?.type === "tablebody" || t?.type === "tablefooter" ? { *[Symbol.iterator]() {
- let e = t.firstChildKey, r = e == null ? null : n.getItem(e);
- for (; r;) {
- yield r;
- let e = n.getKeyAfter(r.key);
- if (r = e == null ? null : n.getItem(e), r && r.parentKey === t.parentKey) break;
- }
- } } : { *[Symbol.iterator]() {
- let t = n.getItem(e), r = t?.firstChildKey == null ? null : n.getItem(t.firstChildKey);
- for (; r && (yield r, r = r.nextKey == null ? null : n.getItem(r.nextKey), t?.type !== "item" || r?.type === "cell"););
- } };
- }
- clone() {
- let e = super.clone();
- return e.headerRows = this.headerRows, e.columns = this.columns, e.rows = this.rows, e.rowHeaderColumnKeys = this.rowHeaderColumnKeys, e.head = this.head, e;
- }
- getTextValue(e) {
- let t = this.getItem(e);
- if (!t) return "";
- if (t.textValue) return t.textValue;
- let n = this.rowHeaderColumnKeys, r = [];
- for (let t of this.getChildren(e)) {
- let e = this.columns[t.index];
- if (n.has(e.key) && t.textValue && r.push(t.textValue), r.length === n.size) break;
- }
- return r.join(" ");
- }
- constructor(...e) {
- super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new XO(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
- }
-}, Rse = /*#__PURE__*/ (0, B.createContext)(null), zse = /*#__PURE__*/ (0, B.createContext)(null), qO = /*#__PURE__*/ (0, B.createContext)(null), JO = /*#__PURE__*/ (0, B.createContext)(null), Bse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, zse);
- let n = QD(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, B.useMemo)(() => ({
- selectionBehavior: i === "none" ? null : r,
- selectionMode: i,
- disallowEmptySelection: a,
- allowsDragging: o
- }), [
+//#region node_modules/react-aria-components/dist/private/Select.mjs
+function Xse(e) {
+ return e && e.__esModule ? e.default : e;
+}
+var Sk = /*#__PURE__*/ (0, B.createContext)(null), Ck = /*#__PURE__*/ (0, B.createContext)(null), Zse = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, Sk);
+ let { children: n, isDisabled: r = !1, isInvalid: i = !1, isRequired: a = !1 } = e, o = (0, B.useMemo)(() => typeof n == "function" ? n({
+ isOpen: !1,
+ isDisabled: r,
+ isInvalid: i,
+ isRequired: a,
+ isFocused: !1,
+ isFocusVisible: !1,
+ defaultChildren: null
+ }) : n, [
+ n,
r,
i,
- a,
- o
- ]), c = /*#__PURE__*/ B.createElement(Use.Provider, { value: s }, /*#__PURE__*/ B.createElement(ag, e));
- return /*#__PURE__*/ B.createElement(qh, {
- content: c,
- createCollection: () => new Lse()
- }, (r) => /*#__PURE__*/ B.createElement(Hse, {
+ a
+ ]);
+ return /*#__PURE__*/ B.createElement(qh, { content: o }, (n) => /*#__PURE__*/ B.createElement($se, {
props: e,
- forwardedRef: t,
- selectionState: n,
- collection: r
+ collection: n,
+ selectRef: t
}));
-}), Vse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.table, {
+}), Qse = [
+ MD,
+ ND,
+ LD
+];
+function $se({ props: e, selectRef: t, collection: n }) {
+ let { validationBehavior: r } = yD(zD) || {}, i = e.validationBehavior ?? r ?? "native", a = Jse({
...e,
- ref: t
- });
-}), YO = {
- expand: {
- ltr: "ArrowRight",
- rtl: "ArrowLeft"
- },
- collapse: {
- ltr: "ArrowLeft",
- rtl: "ArrowRight"
- }
-};
-function Hse({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
- [e, t] = FE(e, t, BE);
- let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, B.useContext)(Rse);
- t = Nh((0, B.useMemo)(() => mh(t, c?.tableRef), [t, c?.tableRef]));
- let [l, u] = L_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
- r = (0, B.useMemo)(() => r.withExpandedKeys(l), [r, l]);
- let d = Fse({
- ...s,
- collection: r,
+ collection: n,
children: void 0,
- UNSAFE_selectionState: n,
- expandedKeys: l,
- onExpandedChange: u
- }), f = Ise(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, B.useContext)(GE), { dragAndDropHooks: _ } = e, { gridProps: v } = one({
- ...s,
- layoutDelegate: m,
- isVirtualized: p
- }, f, t), y = f.selectionManager, b = !!_?.useDraggableCollectionState, x = !!_?.useDroppableCollectionState;
- (0, B.useRef)(b), (0, B.useRef)(x), (0, B.useEffect)(() => {}, [b, x]);
- let S, C, w, T = !1, E = null, D = (0, B.useRef)(null), { direction: O } = vg(), [k] = (0, B.useState)(() => new Ase());
- if (b && _) {
- S = _.useDraggableCollectionState({
- collection: f.collection,
- selectionManager: y,
- preview: _.renderDragPreview ? D : void 0
- }), _.useDraggableCollection({}, S, t);
- let e = _.DragPreview;
- E = _.renderDragPreview ? /*#__PURE__*/ B.createElement(e, { ref: D }, _.renderDragPreview) : null;
- }
- if (x && _) {
- C = _.useDroppableCollectionState({
- collection: f.collection,
- selectionManager: y
- });
- let e = new Q_({
- collection: f.collection,
- disabledKeys: y.disabledKeys,
- disabledBehavior: y.disabledBehavior,
- ref: t,
- layoutDelegate: m
- }), n = _.dropTargetDelegate || h || new _.ListDropTargetDelegate(r.rows, t);
- k.setup(n, d, O), w = _.useDroppableCollection({
- keyboardDelegate: e,
- dropTargetDelegate: k,
- onDropActivate: (e) => {
- if (e.target.type === "item") {
- let t = e.target.key, n = d.collection.getItem(t), r = l.has(t);
- n && n.hasChildNodes && (!r || _?.isVirtualDragging?.()) && d.toggleKey(t);
- }
- },
- onKeyDown: (e) => {
- let t = C?.target;
- if (t && t.type === "item" && t.dropPosition === "on") {
- let n = d.collection.getItem(t.key);
- (e.key === YO.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === YO.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
- }
- }
- }, C, t), T = C.isDropTarget({ type: "root" });
- }
- let { focusProps: A, isFocused: j, isFocusVisible: M } = ry(), N = NE({
+ validationBehavior: i
+ }), { isFocusVisible: o, focusProps: s } = iy({ within: !0 }), c = (0, B.useRef)(null), [l, u] = xD(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: d, triggerProps: f, valueProps: p, menuProps: m, descriptionProps: h, errorMessageProps: g, hiddenSelectProps: _, ...v } = Xte({
+ ...SD(e),
+ label: u,
+ validationBehavior: i
+ }, a, c), y = (0, B.useMemo)(() => ({
+ isOpen: a.isOpen,
+ isFocused: a.isFocused,
+ isFocusVisible: o,
+ isDisabled: e.isDisabled || !1,
+ isInvalid: v.isInvalid || !1,
+ isRequired: e.isRequired || !1
+ }), [
+ a.isOpen,
+ a.isFocused,
+ o,
+ e.isDisabled,
+ v.isInvalid,
+ e.isRequired
+ ]), b = vD({
...e,
- children: void 0,
- defaultClassName: "react-aria-Table",
- values: {
- isDropTarget: T,
- isFocused: j,
- isFocusVisible: M,
- state: f
- }
- }), P = !!(b && !S?.isDisabled), ee = N.style, F = null;
- c && (F = c.useTableColumnResizeState({ tableWidth: c.tableWidth }, f), p || (ee = {
- ...ee,
- tableLayout: "fixed",
- width: "min-content"
- }));
- let I = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(ME, { values: [
- [qO, f],
- [JO, F],
- [VD, {
- dragAndDropHooks: _,
- dragState: S,
- dropState: C
+ values: y,
+ defaultClassName: "react-aria-Select"
+ }), x = Eg(e, { global: !0 });
+ delete x.id;
+ let S = (0, B.useRef)(null);
+ return /*#__PURE__*/ B.createElement(_D, { values: [
+ [Sk, e],
+ [Ck, a],
+ [wk, p],
+ [MD, {
+ ...d,
+ ref: l,
+ elementType: "span"
}],
- [HD, { render: $se }],
- [BE, null],
- [VE, null]
- ] }, /*#__PURE__*/ B.createElement(Yg, null, /*#__PURE__*/ B.createElement(Vse, {
- ...U(I, N, v, A, w?.collectionProps),
- style: ee,
+ [ND, {
+ ...f,
+ ref: c,
+ isPressed: a.isOpen,
+ autoFocus: e.autoFocus
+ }],
+ [dk, a],
+ [$O, {
+ trigger: "Select",
+ triggerRef: c,
+ scrollRef: S,
+ placement: "bottom start",
+ "aria-labelledby": m["aria-labelledby"],
+ clearContexts: Qse
+ }],
+ [KO, {
+ ...m,
+ ref: S
+ }],
+ [qO, a],
+ [LD, { slots: {
+ description: h,
+ errorMessage: g
+ } }],
+ [RD, v]
+ ] }, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(x, b, s),
ref: t,
slot: e.slot || void 0,
- onScroll: e.onScroll,
- "data-allows-dragging": P || void 0,
- "data-drop-target": T || void 0,
- "data-focused": j || void 0,
- "data-focus-visible": M || void 0
- }, /*#__PURE__*/ B.createElement(KD, null, /*#__PURE__*/ B.createElement(g, {
- collection: f.collection,
- scrollRef: c?.scrollRef ?? t,
- persistedKeys: WD(y, _, C)
- })))), E);
+ "data-focused": a.isFocused || void 0,
+ "data-focus-visible": o || void 0,
+ "data-open": a.isOpen || void 0,
+ "data-disabled": e.isDisabled || void 0,
+ "data-invalid": v.isInvalid || void 0,
+ "data-required": e.isRequired || void 0
+ }, b.children, /*#__PURE__*/ B.createElement(Qte, {
+ ..._,
+ autoComplete: e.autoComplete
+ })));
}
-var Use = /*#__PURE__*/ (0, B.createContext)(null), XO = class extends tp {
- static {
- this.type = "tableheader";
- }
-}, Wse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.thead, {
- ...e,
- ref: t
- });
-}), ZO = /*#__PURE__*/ ng(XO, (e, t) => {
- let n = (0, B.useContext)(qO).collection, r = dp({
- items: n.headerRows,
- children: (0, B.useCallback)((e) => {
- switch (e.type) {
- case "headerrow": return /*#__PURE__*/ B.createElement(Kse, { item: e });
- default: throw Error("Unsupported node type in TableHeader: " + e.type);
- }
- }, [])
- }), { rowGroupProps: i } = Zx(), { hoverProps: a, isHovered: o } = sy({
- onHoverStart: e.onHoverStart,
- onHoverChange: e.onHoverChange,
- onHoverEnd: e.onHoverEnd
- }), s = NE({
+for (var wk = /*#__PURE__*/ (0, B.createContext)(null), ece = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, wk);
+ let n = (0, B.useContext)(Ck), { placeholder: r } = yD(Sk), i = n.selectedItems.map((e) => {
+ let t = e.props?.children;
+ return typeof t == "function" && (t = t({
+ isHovered: !1,
+ isPressed: !1,
+ isSelected: !1,
+ isFocused: !1,
+ isFocusVisible: !1,
+ isDisabled: !1,
+ selectionMode: "single",
+ selectionBehavior: "toggle"
+ })), t;
+ }), a = hte(), o = (0, B.useMemo)(() => n.selectedItems.map((e) => e?.textValue), [n.selectedItems]), s = n.selectionManager.selectionMode, c = (0, B.useMemo)(() => s === "single" ? o[0] ?? "" : a.format(o), [
+ s,
+ a,
+ o
+ ]), l = (0, B.useMemo)(() => {
+ if (s === "single") return i[0];
+ let e = a.formatToParts(o);
+ if (e.length === 0) return null;
+ let t = 0;
+ return e.map((e) => e.type === "element" ? /*#__PURE__*/ B.createElement(B.Fragment, { key: t }, i[t++]) : e.value);
+ }, [
+ s,
+ a,
+ o,
+ i
+ ]), u = wg(Xse(TO), "react-aria-components"), d = vD({
...e,
- children: void 0,
- defaultClassName: "react-aria-TableHeader",
- values: { isHovered: o }
- });
- return /*#__PURE__*/ B.createElement(Wse, {
- ...U(Eg(e, { global: !0 }), i, a),
- ...s,
+ defaultChildren: l ?? r ?? u.format("selectPlaceholder"),
+ defaultClassName: "react-aria-SelectValue",
+ values: {
+ selectedItem: n.selectedItems[0]?.value ?? null,
+ selectedItems: (0, B.useMemo)(() => n.selectedItems.map((e) => e.value ?? null), [n.selectedItems]),
+ selectedText: c,
+ isPlaceholder: n.selectedItems.length === 0,
+ state: n
+ }
+ }), f = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(wD.span, {
ref: t,
- "data-hovered": o || void 0
- }, r);
-}, (e) => /*#__PURE__*/ B.createElement(ag, {
- dependencies: e.dependencies,
- items: e.columns
-}, e.children)), Gse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement("div", {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement("tr", {
- ...e,
- ref: t
- });
-});
-function Kse({ item: e }) {
- let t = (0, B.useRef)(null), n = (0, B.useContext)(qO), { isVirtualized: r, CollectionBranch: i } = (0, B.useContext)(GE), { rowProps: a } = une({
- node: e,
- isVirtualized: r
- }, n, t), { checkboxProps: o } = _ne(n);
- return /*#__PURE__*/ B.createElement(Gse, {
- ...a,
- ref: t
- }, /*#__PURE__*/ B.createElement(ME, { values: [[tD, { slots: { selection: o } }], [nD, { slots: { selection: o } }]] }, /*#__PURE__*/ B.createElement(i, {
- collection: n.collection,
- parent: e
- })));
-}
-var qse = class extends tp {
- static {
- this.type = "column";
- }
-}, Jse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
+ ...f,
+ ...d,
+ "data-placeholder": n.selectedItems.length === 0 || void 0
+ }, /*#__PURE__*/ B.createElement(LD.Provider, { value: void 0 }, d.children));
+}), tce = /*#__PURE__*/ (0, B.createContext)(null), Tk = /*#__PURE__*/ (0, B.createContext)(null), nce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { inputRef: n = null, ...r } = e;
+ [e, t] = bD(r, t, tce);
+ let i = Nh((0, B.useMemo)(() => mh(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), a = R_(e), o = ene({
+ ...SD(e),
+ children: typeof e.children == "function" || e.children
+ }, a, i);
+ return /*#__PURE__*/ B.createElement(_D, { values: [[Tk, a], [Ek, {
+ ...o,
+ inputRef: i,
+ defaultClassName: "react-aria-Switch"
+ }]] }, /*#__PURE__*/ B.createElement(rce, {
...e,
ref: t
- }) : /*#__PURE__*/ B.createElement(zE.th, {
+ }));
+}), Ek = /*#__PURE__*/ (0, B.createContext)(null), rce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isReadOnly: o, isPressed: s, isInvalid: c, inputRef: l, defaultClassName: u, isRequired: d } = (0, B.useContext)(Ek), { isFocused: f, isFocusVisible: p, focusProps: m } = iy(), h = a || o, g = (0, B.useContext)(Tk), { hoverProps: _, isHovered: v } = cy({
...e,
- ref: t
- });
-}), QO = /*#__PURE__*/ tg(qse, (e, t, n) => {
- let r = Nh(t), i = (0, B.useContext)(qO), { isVirtualized: a } = (0, B.useContext)(GE), { columnHeaderProps: o, isPressed: s } = lne({
- node: n,
- isVirtualized: a,
- focusMode: e.focusMode,
- allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = ry(), d = (0, B.useContext)(JO), f = !1;
- d && (f = d.resizingColumn === n.key);
- let { hoverProps: p, isHovered: m } = sy({ isDisabled: !e.allowsSorting }), h = NE({
+ isDisabled: h
+ }), y = vD({
...e,
- id: void 0,
- children: n.rendered,
- defaultClassName: "react-aria-Column",
+ defaultClassName: u,
values: {
- isHovered: m,
+ isSelected: i,
isPressed: s,
- isFocused: c,
- isFocusVisible: l,
- allowsSorting: n.props.allowsSorting,
- sortDirection: i.sortDescriptor?.column === n.key ? i.sortDescriptor.direction : void 0,
- isResizing: f,
- startResize: () => {
- if (d) d.startResize(n.key), i.setKeyboardNavigationDisabled(!0);
- else throw Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing");
- },
- sort: (e) => {
- i.sort(n.key, e);
- }
+ isHovered: v,
+ isFocused: f,
+ isFocusVisible: p,
+ isDisabled: a,
+ isReadOnly: o,
+ isInvalid: c,
+ isRequired: d || !1,
+ state: g
}
- }), g = h.style;
- d && (g = {
- ...g,
- width: d.getColumnWidth(n.key)
- });
- let _ = Eg(e, { global: !0 });
- return delete _.id, /*#__PURE__*/ B.createElement(Jse, {
- ...U(_, o, u, p),
- ...h,
- style: g,
- ref: r,
- "data-hovered": m || void 0,
- "data-pressed": s || void 0,
- "data-focused": c || void 0,
- "data-focus-visible": l || void 0,
- "data-resizing": f || void 0,
- "data-allows-sorting": n.props.allowsSorting || void 0,
- "data-sort-direction": i.sortDescriptor?.column === n.key ? i.sortDescriptor.direction : void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [[Yse, {
- column: n,
- triggerRef: r
- }], [GE, UE]] }, h.children));
-}), Yse = /*#__PURE__*/ (0, B.createContext)(null), $O = class extends np {
- static {
- this.type = "tablebody";
- }
-}, Xse = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.tbody, {
- ...e,
- ref: t
- });
-}), ek = /*#__PURE__*/ ng($O, (e, t, n) => {
- let r = (0, B.useContext)(qO), { isVirtualized: i } = (0, B.useContext)(GE), a = r.collection, { CollectionBranch: o } = (0, B.useContext)(GE), { dragAndDropHooks: s, dropState: c } = (0, B.useContext)(VD), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
- isDropTarget: u,
- isEmpty: d
- }, p = NE({
- ...e,
- id: void 0,
- children: void 0,
- defaultClassName: "react-aria-TableBody",
- values: f
- }), m, h = a.columnCount;
- if (d && e.renderEmptyState && r) {
- let t = {}, n = {}, r = {};
- i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ B.createElement(nk, {
- role: "row",
- ...t,
- style: r
- }, /*#__PURE__*/ B.createElement(ik, {
- role: "rowheader",
- ...n,
- style: r
- }, e.renderEmptyState(f)));
- }
- let { rowGroupProps: g } = Zx(), _ = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(Xse, {
- ...U(_, p, g),
+ }), b = Eg(e, { global: !0 });
+ return delete b.id, delete b.onClick, /*#__PURE__*/ B.createElement(wD.label, {
+ ...U(b, n, _, y),
ref: t,
- "data-empty": d || void 0
- }, l && /*#__PURE__*/ B.createElement(ice, null), /*#__PURE__*/ B.createElement(o, {
- collection: a,
- parent: n,
- renderDropIndicator: UD(s, c)
- }), m);
-});
-(class extends np {
- static {
- this.type = "tablefooter";
+ slot: e.slot || void 0,
+ "data-selected": i || void 0,
+ "data-pressed": s || void 0,
+ "data-hovered": v || void 0,
+ "data-focused": f || void 0,
+ "data-focus-visible": p || void 0,
+ "data-disabled": a || void 0,
+ "data-readonly": o || void 0,
+ "data-invalid": c || void 0,
+ "data-required": d || void 0
+ }, /*#__PURE__*/ B.createElement(H_, { elementType: "span" }, /*#__PURE__*/ B.createElement("input", {
+ ...U(r, m),
+ ref: l
+ })), y.children);
+}), Dk = 10, Ok = 5, ice = class {
+ setup(e, t, n) {
+ this.delegate = e, this.state = t, this.direction = n;
}
-});
-var tk = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), Zse = class extends tp {
- static {
- this.type = "item";
+ getDropTargetFromPoint(e, t, n) {
+ let r = this.delegate.getDropTargetFromPoint(e, t, n);
+ return !r || r.type === "root" ? r : this.resolveDropTarget(r, e, t, n);
}
- filter(e, t, n) {
- let r = e.getChildren(this.key);
- for (let i of r) if (n(i.textValue, i)) {
- let n = this.clone();
- return t.addDescendants(n, e), n;
+ resolveDropTarget(e, t, n, r) {
+ let i = this.pointerTracking, a = n - i.lastY, o = t - i.lastX, s = i.yDirection, c = i.xDirection;
+ if (Math.abs(a) > Ok && (s = a > 0 ? "down" : "up", i.yDirection = s, i.lastY = n), Math.abs(o) > Dk && (c = o > 0 ? "right" : "left", i.xDirection = c, i.lastX = t), e.dropPosition === "before") {
+ let t = this.state.collection.getKeyBefore(e.key);
+ for (; t != null;) {
+ let e = this.state.collection.getItem(t);
+ if (e?.type === "item") break;
+ t = e?.parentKey ?? null;
+ }
+ if (t != null) {
+ let n = {
+ type: "item",
+ key: t,
+ dropPosition: "after"
+ };
+ r(n) && (e = n);
+ }
}
- return null;
+ let l = this.getPotentialTargets(e, r);
+ if (l.length === 0) return { type: "root" };
+ let u;
+ return l.length > 1 ? u = this.selectTarget(l, e, t, n, s, c) : (u = l[0], i.boundaryContext = null), u;
}
-}, nk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.tr, {
- ...e,
- ref: t
- });
-}), rk = /*#__PURE__*/ ng(Zse, (e, t, n) => {
- let r = Nh(t), i = (0, B.useContext)(qO), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, B.useContext)(VD), { isVirtualized: c, CollectionBranch: l } = (0, B.useContext)(GE), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = pne({
- node: n,
- shouldSelectOnPressUp: !!o,
- isVirtualized: c
- }, i, r), { isFocused: m, isFocusVisible: h, focusProps: g } = ry(), { isFocusVisible: _, focusProps: v } = ry({ within: !0 }), { hoverProps: y, isHovered: b } = sy({
- isDisabled: !p.allowsSelection && !p.hasAction && !u,
- onHoverStart: e.onHoverStart,
- onHoverChange: e.onHoverChange,
- onHoverEnd: e.onHoverEnd
- }), { checkboxProps: x } = gne({ key: n.key }, i), S;
- o && a && (S = a.useDraggableItem({
- key: n.key,
- hasDragButton: !0
- }, o));
- let C, w = (0, B.useRef)(null), { visuallyHiddenProps: T } = V_();
- s && a && (C = a.useDropIndicator({ target: {
- type: "item",
- key: n.key,
- dropPosition: "on"
- } }, s, w));
- let E = (0, B.useRef)(null);
- (0, B.useEffect)(() => {
- o && E.current;
- }, []);
- let D = o && o.isDragging(n.key), { children: O, ...k } = e, A = e.hasChildItems || i.collection.getItem(n.lastChildKey)?.type !== "cell", j = A && i.expandedKeys.has(n.key), M = NE({
- ...k,
- id: void 0,
- defaultClassName: "react-aria-Row",
- defaultStyle: { "--table-row-level": n.level + 1 },
- values: {
- ...p,
- state: i,
- isHovered: b,
- isFocused: m,
- isFocusVisible: h,
- selectionMode: i.selectionManager.selectionMode,
- selectionBehavior: i.selectionManager.selectionBehavior,
- isDragging: D,
- isDropTarget: C?.isDropTarget,
- isFocusVisibleWithin: _,
- id: n.key,
- hasChildItems: A,
- isExpanded: j,
- level: n.level + 1
+ getPotentialTargets(e, t) {
+ if (e.dropPosition === "on") return [e];
+ let n = e, r = this.state.collection, i = r.getItem(n.key);
+ for (; i && i?.type !== "item" && i.nextKey != null;) n.key = i.nextKey, i = r.getItem(i.nextKey);
+ let a = [n];
+ if (i && i.hasChildNodes && this.state.expandedKeys.has(i.key) && r.getChildren && n.dropPosition === "after") {
+ let e = i.firstChildKey == null ? null : r.getItem(i.firstChildKey);
+ for (; e && e.type !== "item";) e = e.nextKey == null ? null : r.getItem(e.nextKey);
+ if (e?.type === "item") {
+ let n = {
+ type: "item",
+ key: e.key,
+ dropPosition: "before"
+ };
+ return t(n) ? [n] : [];
+ }
}
- }), N = Eg(e, { global: !0 });
- return delete N.id, delete N.onClick, /*#__PURE__*/ B.createElement(B.Fragment, null, C && !C.isHidden && /*#__PURE__*/ B.createElement(nk, {
- role: "row",
- style: { height: 0 }
- }, /*#__PURE__*/ B.createElement(ik, {
- role: "gridcell",
- colSpan: i.collection.columnCount,
- style: { padding: 0 }
- }, /*#__PURE__*/ B.createElement("div", {
- role: "button",
- ...T,
- ...C.dropIndicatorProps,
- ref: w
- }))), /*#__PURE__*/ B.createElement(nk, {
- ...U(N, M, d, g, y, S?.dragProps, v),
- ref: r,
- "data-disabled": p.isDisabled || void 0,
- "data-selected": p.isSelected || void 0,
- "data-hovered": b || void 0,
- "data-focused": p.isFocused || void 0,
- "data-focus-visible": h || void 0,
- "data-pressed": p.isPressed || void 0,
- "data-dragging": D || void 0,
- "data-drop-target": C?.isDropTarget || void 0,
- "data-selection-mode": i.selectionManager.selectionMode === "none" ? void 0 : i.selectionManager.selectionMode,
- "data-focus-visible-within": _ || void 0,
- "data-expanded": j || void 0,
- "data-has-child-items": A || void 0,
- "data-level": n.level + 1
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [tD, { slots: {
- [jE]: {},
- selection: x
- } }],
- [nD, { slots: {
- [jE]: {},
- selection: x
- } }],
- [JE, { slots: {
- [jE]: {},
- chevron: f,
- drag: {
- ...S?.dragButtonProps,
- ref: E,
- style: { pointerEvents: "none" }
+ if (i?.nextKey != null) return [e];
+ let o = i?.parentKey, s = [];
+ for (; o != null;) {
+ let e = r.getItem(o), n = e?.nextKey == null ? null : r.getItem(e.nextKey);
+ if (!n || n.parentKey !== o) {
+ if (e?.type === "item") {
+ let e = {
+ type: "item",
+ key: o,
+ dropPosition: "after"
+ };
+ t(e) && s.push(e);
+ }
+ if (n) break;
}
- } }],
- [qD, { isSelected: p.isSelected }],
- [tk, { isFocusVisibleWithinRow: _ }]
- ] }, /*#__PURE__*/ B.createElement(l, {
- collection: i.collection,
- parent: n
- }))));
-}, (e) => {
- if (e.id == null && typeof e.children == "function") throw Error("No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.");
- let t = [e.value].concat(e.dependencies);
- return /*#__PURE__*/ B.createElement(ag, {
- dependencies: t,
- items: e.columns,
- idScope: e.id
- }, e.children);
-}), Qse = class extends tp {
- static {
- this.type = "cell";
- }
-}, ik = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.td, {
- ...e,
- ref: t
- });
-}), ak = /*#__PURE__*/ tg(Qse, (e, t, n) => {
- let r = Nh(t), i = (0, B.useContext)(qO), { dragState: a } = (0, B.useContext)(VD), { isVirtualized: o } = (0, B.useContext)(GE);
- n.column = i.collection.columns[n.index];
- let { gridCellProps: s, isPressed: c } = sne({
- node: n,
- shouldSelectOnPressUp: !!a,
- isVirtualized: o,
- focusMode: e.focusMode,
- allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = ry(), { hoverProps: f, isHovered: p } = sy({}), { isFocusVisibleWithinRow: m } = (0, B.useContext)(tk), h = n.parentKey != null && i.selectionManager.isSelected(n.parentKey), g = n.colIndex || n.index, _ = i.collection.getItem(n.parentKey), v = _.props.hasChildItems || i.collection.getItem(_.lastChildKey)?.type !== "cell", y = v && i.expandedKeys.has(n.parentKey), b = i.selectionManager.isDisabled(n.parentKey), x = NE({
- ...e,
- id: void 0,
- defaultClassName: "react-aria-Cell",
- values: {
- isFocused: l,
- isFocusVisible: u,
- isFocusVisibleWithinRow: m,
- isPressed: c,
- isHovered: p,
- isSelected: h,
- id: n.key,
- columnIndex: g,
- hasChildItems: v,
- isExpanded: y,
- isDisabled: b,
- level: _.level + 1,
- isTreeColumn: n.column.key === i.treeColumn
+ o = e?.parentKey;
}
- }), S = Eg(e, { global: !0 });
- return delete S.id, /*#__PURE__*/ B.createElement(ik, {
- ...U(S, x, s, d, f),
- ref: r,
- "data-focused": l || void 0,
- "data-focus-visible": u || void 0,
- "data-focus-visible-within-row": m || void 0,
- "data-pressed": c || void 0,
- "data-selected": h || void 0,
- "data-column-index": g,
- "data-expanded": y || void 0,
- "data-has-child-items": v || void 0,
- "data-level": _.level + 1,
- "data-tree-column": n.column.key === i.treeColumn || void 0,
- "data-disabled": b || void 0
- }, /*#__PURE__*/ B.createElement(GE.Provider, { value: UE }, x.children));
-});
-function $se(e, t) {
- t = Nh(t);
- let { dragAndDropHooks: n, dropState: r } = (0, B.useContext)(VD), i = (0, B.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
- if (o) return null;
- let c = r && e.target.type === "item" ? (r.collection.getItem(e.target.key)?.level || 0) + 1 : 1;
- return /*#__PURE__*/ B.createElement(rce, {
- ...e,
- dropIndicatorProps: a,
- isDropTarget: s,
- buttonRef: i,
- level: c,
- ref: t
- });
-}
-var ece = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.tr, {
- ...e,
- ref: t
- });
-}), tce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, B.useContext)(GE);
- return n ? /*#__PURE__*/ B.createElement(zE.div, {
- ...e,
- ref: t
- }) : /*#__PURE__*/ B.createElement(zE.td, {
- ...e,
- ref: t
- });
-});
-function nce(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, B.useContext)(qO), { visuallyHiddenProps: c } = V_(), l = NE({
- ...o,
- defaultClassName: "react-aria-DropIndicator",
- defaultStyle: { "--table-row-level": a + 1 },
- values: { isDropTarget: r }
- });
- return /*#__PURE__*/ B.createElement(ece, {
- ...Eg(e, { global: !0 }),
- ...l,
- role: "row",
- ref: t,
- "data-drop-target": r || void 0,
- "aria-level": a
- }, /*#__PURE__*/ B.createElement(tce, {
- role: "gridcell",
- colSpan: s.collection.columnCount,
- style: { padding: 0 }
- }, /*#__PURE__*/ B.createElement("div", {
- ...c,
- role: "button",
- ...n,
- ref: i
- }), l.children));
-}
-var rce = /*#__PURE__*/ (0, B.forwardRef)(nce);
-function ice() {
- let e = (0, B.useContext)(qO), { dragAndDropHooks: t, dropState: n } = (0, B.useContext)(VD), r = (0, B.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = V_();
- return !a && i["aria-hidden"] ? null : /*#__PURE__*/ B.createElement(nk, {
- role: "row",
- "aria-hidden": i["aria-hidden"],
- style: { height: 0 }
- }, /*#__PURE__*/ B.createElement(ik, {
- role: "gridcell",
- colSpan: e.collection.columnCount,
- style: { padding: 0 }
- }, /*#__PURE__*/ B.createElement("div", {
- role: "button",
- ...o,
- ...i,
- ref: r
- })));
-}
-tg(rp, function(e, t, n) {
- let r = (0, B.useContext)(qO), { isVirtualized: i } = (0, B.useContext)(GE), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, B.useRef)(null);
- oO((0, B.useMemo)(() => ({
- onLoadMore: o,
- collection: r?.collection,
- sentinelRef: u,
- scrollOffset: s
- }), [
- o,
- s,
- r?.collection
- ]), u);
- let d = NE({
- ...c,
- id: void 0,
- children: n.rendered,
- defaultClassName: "react-aria-TableLoadingIndicator",
- defaultStyle: { "--table-row-level": n.level + 1 },
- values: void 0
- }), f = {}, p = {}, m = {};
- return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(nk, {
- style: { height: 0 },
- inert: YD(!0)
- }, /*#__PURE__*/ B.createElement(ik, { style: {
- padding: 0,
- border: 0
- } }, /*#__PURE__*/ B.createElement("div", {
- "data-testid": "loadMoreSentinel",
- ref: u,
- style: {
- position: "relative",
- height: 1,
- width: 1
+ if (s.length > 0 && a.push(...s), a.length === 1) {
+ let e = r.getKeyAfter(n.key), a = e == null ? null : r.getItem(e);
+ if (e != null && a && i && a.level != null && i.level != null && a.level > i.level) {
+ let n = {
+ type: "item",
+ key: e,
+ dropPosition: "before"
+ };
+ if (t(n)) return [n];
+ }
}
- }))), a && d.children && /*#__PURE__*/ B.createElement(nk, {
- ...U(Eg(e, { global: !0 }), f),
- ...d,
- role: "row",
- ref: t,
- "aria-level": n.level + 1,
- "data-level": n.level + 1
- }, /*#__PURE__*/ B.createElement(ik, {
- role: "rowheader",
- ...p,
- style: m
- }, d.children)));
-});
-//#endregion
-//#region node_modules/react-stately/dist/private/list/useSingleSelectListState.mjs
-function ace(e) {
- let [t, n] = L_(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, B.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = iO({
- ...e,
- selectionMode: "single",
- disallowEmptySelection: !0,
- allowDuplicateSelectionEvents: !0,
- selectedKeys: r,
- onSelectionChange: (r) => {
- if (r === "all") return;
- let i = r.values().next().value ?? null;
- i === t && e.onSelectionChange && e.onSelectionChange(i), n(i);
+ return a.filter(t);
+ }
+ selectTarget(e, t, n, r, i, a) {
+ if (e.length < 2) return e[0];
+ let o = this.pointerTracking, s = this.state.collection.getItem(t.key)?.parentKey;
+ if (s == null) return e[0];
+ (!o.boundaryContext || o.boundaryContext.parentKey !== s) && (o.boundaryContext = {
+ parentKey: s,
+ preferredTargetIndex: o.yDirection === "up" ? e.length - 1 : 0,
+ lastSwitchY: r,
+ lastSwitchX: n
+ });
+ let c = o.boundaryContext, l = Math.abs(n - c.lastSwitchX);
+ if (Math.abs(r - c.lastSwitchY) > Ok && i) {
+ let t = c.preferredTargetIndex || 0;
+ i === "down" && t === 0 ? c.preferredTargetIndex = e.length - 1 : i === "up" && t === e.length - 1 && (c.preferredTargetIndex = 0), o.xDirection = null;
}
- });
- return {
- collection: i,
- disabledKeys: a,
- selectionManager: o,
- selectedKey: t,
- setSelectedKey: n,
- selectedItem: t == null ? null : i.getItem(t)
- };
-}
-//#endregion
-//#region node_modules/react-stately/dist/private/tabs/useTabListState.mjs
-function oce(e) {
- let t = ace({
- ...e,
- onSelectionChange: e.onSelectionChange ? (t) => {
- t != null && e.onSelectionChange?.(t);
- } : void 0,
- suppressTextValueWarning: !0,
- defaultSelectedKey: e.defaultSelectedKey ?? ok(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
- }), { selectionManager: n, collection: r, selectedKey: i } = t, a = (0, B.useRef)(i);
- return (0, B.useEffect)(() => {
- let o = i;
- e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = ok(r, t.disabledKeys), o != null && n.setSelectedKeys([o])), (o != null && n.focusedKey == null || !n.isFocused && o !== a.current) && n.setFocusedKey(o), a.current = o;
- }), {
- ...t,
- isDisabled: e.isDisabled || !1
- };
-}
-function ok(e, t) {
- let n = null;
- if (e) {
- for (n = e.getFirstKey(); n != null && (t.has(n) || e.getItem(n)?.props?.isDisabled) && n !== e.getLastKey();) n = e.getKeyAfter(n);
- n != null && (t.has(n) || e.getItem(n)?.props?.isDisabled) && n === e.getLastKey() && (n = e.getFirstKey());
+ if (l > Dk && a) {
+ let t = c.preferredTargetIndex || 0;
+ a === "left" ? this.direction === "ltr" ? t < e.length - 1 && (c.preferredTargetIndex = t + 1, c.lastSwitchX = n) : t > 0 && (c.preferredTargetIndex = t - 1, c.lastSwitchX = n) : a === "right" && (this.direction === "ltr" ? t > 0 && (c.preferredTargetIndex = t - 1, c.lastSwitchX = n) : t < e.length - 1 && (c.preferredTargetIndex = t + 1, c.lastSwitchX = n)), o.yDirection = null;
+ }
+ return e[Math.max(0, Math.min(c.preferredTargetIndex || 0, e.length - 1))];
}
- return n;
-}
-//#endregion
-//#region node_modules/react-aria-components/dist/private/Tabs.mjs
-var sk = /*#__PURE__*/ (0, B.createContext)(null), ck = /*#__PURE__*/ (0, B.createContext)(null), lk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = FE(e, t, sk);
- let { children: n, orientation: r = "horizontal" } = e;
- return n = (0, B.useMemo)(() => typeof n == "function" ? n({
- orientation: r,
- defaultChildren: null
- }) : n, [n, r]), /*#__PURE__*/ B.createElement(qh, { content: n }, (n) => /*#__PURE__*/ B.createElement(sce, {
- props: e,
- collection: n,
- tabsRef: t
- }));
-});
-function sce({ props: e, tabsRef: t, collection: n }) {
- let { orientation: r = "horizontal" } = e, i = oce({
- ...e,
- collection: n,
- children: void 0
- }), { focusProps: a, isFocused: o, isFocusVisible: s } = ry({ within: !0 }), c = (0, B.useMemo)(() => ({
- orientation: r,
- isFocusWithin: o,
- isFocusVisible: s
- }), [
- r,
- o,
- s
- ]), l = NE({
- ...e,
- defaultClassName: "react-aria-Tabs",
- values: c
- }), u = Eg(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(zE.div, {
- ...U(u, l, a),
- ref: t,
- slot: e.slot || void 0,
- "data-focused": o || void 0,
- "data-orientation": r,
- "data-focus-visible": s || void 0,
- "data-disabled": i.isDisabled || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [[sk, e], [ck, i]] }, l.children));
-}
-var uk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- return (0, B.useContext)(ck) ? /*#__PURE__*/ B.createElement(cce, {
- props: e,
- forwardedRef: t
- }) : /*#__PURE__*/ B.createElement(ag, e);
-});
-function cce({ props: e, forwardedRef: t }) {
- let n = (0, B.useContext)(ck), { CollectionRoot: r } = (0, B.useContext)(GE), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = PE(sk), o = Nh(t), { tabListProps: s } = bne({
- ...e,
- orientation: i,
- keyboardActivation: a
- }, n, o), c = NE({
- ...e,
- children: null,
- defaultClassName: "react-aria-TabList",
- values: {
- orientation: i,
- state: n
+ constructor() {
+ this.delegate = null, this.state = null, this.direction = "ltr", this.pointerTracking = {
+ lastY: 0,
+ lastX: 0,
+ yDirection: null,
+ xDirection: null,
+ boundaryContext: null
+ };
+ }
+}, ace = class {
+ constructor(e) {
+ this.keyMap = /* @__PURE__ */ new Map(), this.keyMap = /* @__PURE__ */ new Map(), this.columnCount = e?.columnCount, this.rows = [];
+ let t = (r) => {
+ let i = this.keyMap.get(r.key);
+ e.visitNode && (r = e.visitNode(r)), this.keyMap.set(r.key, r);
+ let a = /* @__PURE__ */ new Set(), o = null, s = !1;
+ if (r.type === "item") {
+ for (let e of r.childNodes) if (e.props?.colSpan !== void 0) {
+ s = !0;
+ break;
+ }
+ }
+ for (let e of r.childNodes) e.type === "cell" && s && (e.colspan = e.props?.colSpan, e.colSpan = e.props?.colSpan, e.colIndex = o ? (o.colIndex ?? o.index) + (o.colSpan ?? 1) : e.index), e.type === "cell" && e.parentKey == null && (e.parentKey = r.key), a.add(e.key), o ? (o.nextKey = e.key, e.prevKey = o.key) : e.prevKey = null, t(e), o = e;
+ if (o && (o.nextKey = null), i) for (let e of i.childNodes) a.has(e.key) || n(e);
+ }, n = (e) => {
+ this.keyMap.delete(e.key);
+ for (let t of e.childNodes) this.keyMap.get(t.key) === t && n(t);
+ }, r = null;
+ for (let [n, i] of e.items.entries()) {
+ let e = {
+ ...i,
+ level: i.level ?? 0,
+ key: i.key ?? "row-" + n,
+ type: i.type ?? "row",
+ value: i.value ?? null,
+ hasChildNodes: !0,
+ childNodes: [...i.childNodes],
+ rendered: i.rendered,
+ textValue: i.textValue ?? "",
+ index: i.index ?? n
+ };
+ r ? (r.nextKey = e.key, e.prevKey = r.key) : e.prevKey = null, this.rows.push(e), t(e), r = e;
}
- }), l = Eg(e, { global: !0 });
- return delete l.id, /*#__PURE__*/ B.createElement(zE.div, {
- ...U(l, c, s),
- ref: o,
- "data-orientation": i || void 0
- }, /*#__PURE__*/ B.createElement(KD, null, /*#__PURE__*/ B.createElement(r, {
- collection: n.collection,
- persistedKeys: KE(n.selectionManager.focusedKey)
- })));
-}
-var dk = /*#__PURE__*/ tg(class extends tp {
- static {
- this.type = "item";
+ r && (r.nextKey = null);
}
-}, (e, t, n) => {
- let r = (0, B.useContext)(ck), i = Nh(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = vne({
- key: n.key,
- ...e
- }, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = ry(), { hoverProps: f, isHovered: p } = sy({
- isDisabled: s,
- onHoverStart: e.onHoverStart,
- onHoverEnd: e.onHoverEnd,
- onHoverChange: e.onHoverChange
- }), m = NE({
- ...e,
- id: void 0,
- children: n.rendered,
- defaultClassName: "react-aria-Tab",
- values: {
- isSelected: o,
- isDisabled: s,
- isFocused: u,
- isFocusVisible: d,
- isPressed: c,
- isHovered: p
+ *[Symbol.iterator]() {
+ yield* [...this.rows];
+ }
+ get size() {
+ return [...this.rows].length;
+ }
+ getKeys() {
+ return this.keyMap.keys();
+ }
+ getKeyBefore(e) {
+ let t = this.keyMap.get(e);
+ return t ? t.prevKey ?? null : null;
+ }
+ getKeyAfter(e) {
+ let t = this.keyMap.get(e);
+ return t ? t.nextKey ?? null : null;
+ }
+ getFirstKey() {
+ return [...this.rows][0]?.key;
+ }
+ getLastKey() {
+ let e = [...this.rows];
+ return e[e.length - 1]?.key;
+ }
+ getItem(e) {
+ return this.keyMap.get(e) ?? null;
+ }
+ at(e) {
+ let t = [...this.getKeys()];
+ return this.getItem(t[e]);
+ }
+ getChildren(e) {
+ return this.keyMap.get(e)?.childNodes || [];
+ }
+}, kk = "row-header-column-" + Math.random().toString(36).slice(2), Ak = "row-header-column-" + Math.random().toString(36).slice(2); kk === Ak;) Ak = "row-header-column-" + Math.random().toString(36).slice(2);
+function jk(e, t) {
+ if (t.length === 0) return [];
+ let n = [], r = /* @__PURE__ */ new Map();
+ for (let i of t) {
+ let t = i.parentKey, a = [i];
+ for (; t != null;) {
+ let n = e.get(t);
+ if (!n) break;
+ if (r.has(n)) {
+ n.colSpan ??= 0, n.colSpan++, n.colspan = n.colSpan;
+ let { column: e, index: t } = r.get(n);
+ if (t > a.length) break;
+ for (let n = t; n < a.length; n++) e.splice(n, 0, null);
+ for (let t = a.length; t < e.length; t++) e[t] && r.has(e[t]) && (r.get(e[t]).index = t);
+ } else n.colSpan = 1, n.colspan = 1, a.push(n), r.set(n, {
+ column: a,
+ index: a.length - 1
+ });
+ t = n.parentKey;
}
- }), h = n.props.href ? zE.a : zE.div, g = Eg(e, { global: !0 });
- return delete g.id, delete g.onClick, /*#__PURE__*/ B.createElement(h, {
- ...U(g, m, a, l, f),
- ref: i,
- "data-selected": o || void 0,
- "data-disabled": s || void 0,
- "data-focused": u || void 0,
- "data-focus-visible": d || void 0,
- "data-pressed": c || void 0,
- "data-hovered": p || void 0
- }, /*#__PURE__*/ B.createElement(qD.Provider, { value: { isSelected: o } }, m.children));
-}), fk = /*#__PURE__*/ Bh(function(e, t) {
- let n = (0, B.useContext)(ck), r = Nh(t), i = n.selectedKey === e.id, [a, o] = (0, B.useState)(n.selectedKey == null ? null : i);
- a == null && n.selectedKey != null ? o(i) : !i && a && o(!1);
- let s = fO(r, i);
- return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ B.createElement(lce, {
- ...e,
- tabPanelRef: r,
- isInitiallySelected: a || !1,
- isExiting: s
- });
-});
-function lce(e) {
- let t = (0, B.useContext)(ck), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = xne(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = ry(), d = t.selectedKey === e.id, f = dO(r) && !i, p = NE({
- ...e,
- defaultClassName: "react-aria-TabPanel",
- values: {
- isFocused: l,
- isFocusVisible: u,
- isInert: YD(!d),
- isEntering: f,
- isExiting: a,
- state: t
+ n.push(a), i.index = n.length - 1;
+ }
+ let i = Math.max(...n.map((e) => e.length)), a = Array(i).fill(0).map(() => []), o = 0;
+ for (let e of n) {
+ let t = i - 1;
+ for (let n of e) {
+ if (n) {
+ let e = a[t], r = e.reduce((e, t) => e + (t.colSpan ?? 1), 0);
+ if (r < o) {
+ let i = {
+ type: "placeholder",
+ key: "placeholder-" + n.key,
+ colspan: o - r,
+ colSpan: o - r,
+ index: r,
+ value: null,
+ rendered: null,
+ level: t,
+ hasChildNodes: !1,
+ childNodes: [],
+ textValue: ""
+ };
+ e.length > 0 && (e[e.length - 1].nextKey = i.key, i.prevKey = e[e.length - 1].key), e.push(i);
+ }
+ e.length > 0 && (e[e.length - 1].nextKey = n.key, n.prevKey = e[e.length - 1].key), n.level = t, n.colIndex = o, e.push(n);
+ }
+ t--;
}
- }), m = Eg(o, { global: !0 });
- delete m.id;
- let h = d ? U(m, s, c, p) : U(m, p);
- return /*#__PURE__*/ B.createElement(zE.div, {
- ...h,
- ref: r,
- "data-focused": l || void 0,
- "data-focus-visible": u || void 0,
- inert: YD(!d || e.inert),
- "data-inert": d ? void 0 : "true",
- "data-entering": f || void 0,
- "data-exiting": a || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [[sk, null], [ck, null]] }, /*#__PURE__*/ B.createElement(GE.Provider, { value: UE }, p.children)));
-}
-//#endregion
-//#region node_modules/react-aria-components/dist/private/TextArea.mjs
-var uce = /*#__PURE__*/ (0, B.createContext)({}), dce = /*#__PURE__*/ (0, B.createContext)(null), fce = /*#__PURE__*/ Bh(function(e, t) {
- [e, t] = FE(e, t, dce);
- let { validationBehavior: n } = PE(eD) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, B.useRef)(null);
- [e, i] = FE(e, i, VE);
- let [a, o] = IE(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, B.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = ete({
- ...LE(e),
- inputElementType: s,
- label: o,
- validationBehavior: r
- }, i), m = (0, B.useCallback)((e) => {
- i.current = e, e && c(e instanceof HTMLTextAreaElement ? "textarea" : "input");
- }, [i]), h = NE({
- ...e,
- values: {
- isDisabled: e.isDisabled || !1,
- isInvalid: p.isInvalid,
- isReadOnly: e.isReadOnly || !1,
- isRequired: e.isRequired || !1
- },
- defaultClassName: "react-aria-TextField"
- }), g = Eg(e, { global: !0 });
- return delete g.id, /*#__PURE__*/ B.createElement(zE.div, {
- ...g,
- ...h,
- ref: t,
- slot: e.slot || void 0,
- "data-disabled": e.isDisabled || void 0,
- "data-invalid": p.isInvalid || void 0,
- "data-readonly": e.isReadOnly || void 0,
- "data-required": e.isRequired || void 0
- }, /*#__PURE__*/ B.createElement(ME, { values: [
- [qE, {
- ...l,
- ref: a
- }],
- [aD, {
- ...u,
- ref: m
- }],
- [uce, {
- ...u,
- ref: m
- }],
- [iD, {
- role: "presentation",
- isInvalid: p.isInvalid,
- isDisabled: e.isDisabled || !1
- }],
- [QE, { slots: {
- description: d,
- errorMessage: f
- } }],
- [$E, p]
- ] }, h.children));
-});
-//#endregion
-//#region src/react/boardui/components/base/input/label.tsx
-function pce({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, V.jsxs)(Toe, {
- "data-label": "true",
- ...a,
- className: vE("flex cursor-default items-center gap-0.5", "text-body-medium text-text-primary", r),
- children: [
- i,
- e && /* @__PURE__ */ (0, V.jsx)("span", {
- "aria-hidden": "true",
- className: "text-body-medium text-text-error-primary",
- children: "*"
- }),
- n && /* @__PURE__ */ (0, V.jsx)(uae, {
- className: "size-4 shrink-0 text-foreground-icon-quaternary",
- "aria-hidden": !0
- })
- ]
- });
-}
-//#endregion
-//#region src/react/boardui/components/base/input/hint-text.tsx
-function pk({ isInvalid: e = !1, className: t, ...n }) {
- return /* @__PURE__ */ (0, V.jsx)(koe, {
- slot: e ? "errorMessage" : "description",
- ...n,
- className: vE("pt-px text-caption-1-medium text-text-secondary", e && "text-text-error-primary", t)
- });
+ o++;
+ }
+ let s = 0;
+ for (let e of a) {
+ let n = e.reduce((e, t) => e + (t.colSpan ?? 1), 0);
+ if (n < t.length) {
+ let r = {
+ type: "placeholder",
+ key: "placeholder-" + e[e.length - 1].key,
+ colSpan: t.length - n,
+ colspan: t.length - n,
+ index: n,
+ value: null,
+ rendered: null,
+ level: s,
+ hasChildNodes: !1,
+ childNodes: [],
+ textValue: "",
+ prevKey: e[e.length - 1].key
+ };
+ e.push(r);
+ }
+ s++;
+ }
+ return a.map((e, t) => ({
+ type: "headerrow",
+ key: "headerrow-" + t,
+ index: t,
+ value: null,
+ rendered: null,
+ level: 0,
+ hasChildNodes: !0,
+ childNodes: e,
+ textValue: ""
+ }));
}
+var oce = class extends ace {
+ constructor(e, t, n) {
+ let r = /* @__PURE__ */ new Set(), i = null, a = [];
+ if (n?.showSelectionCheckboxes) {
+ let e = {
+ type: "column",
+ key: kk,
+ value: null,
+ textValue: "",
+ level: 0,
+ index: +!!n?.showDragButtons,
+ hasChildNodes: !1,
+ rendered: null,
+ childNodes: [],
+ props: { isSelectionCell: !0 }
+ };
+ a.unshift(e);
+ }
+ if (n?.showDragButtons) {
+ let e = {
+ type: "column",
+ key: Ak,
+ value: null,
+ textValue: "",
+ level: 0,
+ index: 0,
+ hasChildNodes: !1,
+ rendered: null,
+ childNodes: [],
+ props: { isDragButtonCell: !0 }
+ };
+ a.unshift(e);
+ }
+ let o = [], s = /* @__PURE__ */ new Map(), c = (e) => {
+ switch (e.type) {
+ case "body":
+ i = e;
+ break;
+ case "column":
+ s.set(e.key, e), e.hasChildNodes || (a.push(e), e.props.isRowHeader && r.add(e.key));
+ break;
+ case "item":
+ o.push(e);
+ return;
+ }
+ for (let t of e.childNodes) c(t);
+ };
+ for (let t of e) c(t);
+ let l = jk(s, a);
+ if (l.forEach((e, t) => o.splice(t, 0, e)), super({
+ columnCount: a.length,
+ items: o,
+ visitNode: (e) => (e.column = a[e.index], e)
+ }), this._size = 0, this.columns = a, this.rowHeaderColumnKeys = r, this.body = i, this.headerRows = l, this._size = [...i.childNodes].length, this.rowHeaderColumnKeys.size === 0) {
+ let e = this.columns.find((e) => !e.props?.isDragButtonCell && !e.props?.isSelectionCell);
+ e && this.rowHeaderColumnKeys.add(e.key);
+ }
+ }
+ *[Symbol.iterator]() {
+ yield* this.body.childNodes;
+ }
+ get size() {
+ return this._size;
+ }
+ getKeys() {
+ return this.keyMap.keys();
+ }
+ getKeyBefore(e) {
+ return this.keyMap.get(e)?.prevKey ?? null;
+ }
+ getKeyAfter(e) {
+ return this.keyMap.get(e)?.nextKey ?? null;
+ }
+ getFirstKey() {
+ return Uv(this.body.childNodes)?.key ?? null;
+ }
+ getLastKey() {
+ return Gv(this.body.childNodes)?.key ?? null;
+ }
+ getItem(e) {
+ return e === this.body.key ? this.body : this.keyMap.get(e) ?? null;
+ }
+ at(e) {
+ let t = [...this.getKeys()];
+ return this.getItem(t[e]);
+ }
+ getChildren(e) {
+ if (e === this.body.key) return this.body.childNodes;
+ let t = this.getItem(e);
+ return t?.type === "item" ? [...t.childNodes].filter((e) => e.type === "cell") : super.getChildren(e);
+ }
+ getTextValue(e) {
+ let t = this.getItem(e);
+ if (!t) return "";
+ if (t.textValue) return t.textValue;
+ let n = this.rowHeaderColumnKeys;
+ if (n) {
+ let e = [];
+ for (let r of t.childNodes) {
+ let t = this.columns[r.index];
+ if (n.has(t.key) && r.textValue && e.push(r.textValue), e.length === n.size) break;
+ }
+ return e.join(" ");
+ }
+ return "";
+ }
+};
//#endregion
-//#region src/react/boardui/components/base/input/input.tsx
-var mk = (0, B.createContext)({});
-function hk({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, V.jsx)(mk.Provider, {
- value: {
- size: e,
- fieldClassName: t,
- inputClassName: n
- },
- children: /* @__PURE__ */ (0, V.jsx)(fce, {
- ...a,
- "data-input-size": e,
- className: vE("group flex h-max w-full flex-col items-start gap-1", r),
- children: i
- })
- });
-}
-hk.displayName = "TextField";
-var gk = yE({
- field: [
- "relative flex w-full items-center",
- "rounded-2lg",
- "bg-background-tertiary-default text-foreground-icon-tertiary",
- "ring-2 ring-inset ring-transparent",
- "transition-[background-color,box-shadow,color] duration-[var(--input-transition-ms)] ease"
- ].join(" "),
- fieldSize: {
- medium: "p-2",
- small: "h-8 px-1.5 py-2"
- },
- fieldWithAddonSize: {
- medium: "h-9 pl-1 pr-2 py-2",
- small: "h-8 pl-1 pr-1.5 py-2"
- },
- content: "flex w-full items-center gap-2 min-w-0",
- leftSection: "flex flex-1 items-center gap-0.5 min-w-0",
- input: [
- "min-w-0 flex-1 bg-transparent border-0 outline-none p-0 m-0",
- "font-sans text-body-regular text-text-primary pl-1",
- "placeholder:text-text-tertiary",
- "focus:placeholder:text-text-primary",
- "disabled:text-input-disabled-text disabled:placeholder:text-input-disabled-text",
- "disabled:cursor-not-allowed",
- "aria-invalid:placeholder:text-text-error-placeholder"
- ].join(" "),
- icon: "size-5 shrink-0"
-});
-function _k({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
- let l = (0, B.useContext)(mk), u = e ?? l.size ?? "medium", d = r != null;
- return /* @__PURE__ */ (0, V.jsx)(Poe, {
- ref: s,
- className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => vE(gk.field, d ? gk.fieldWithAddonSize[u] : gk.fieldSize[u], t && !e && !n && !r && "ring-border-button-hover", e && !n && !r && "ring-border-button-active", n && "bg-input-disabled-background text-input-disabled-foreground", r && "bg-background-tertiary-error text-foreground-icon-error", l.fieldClassName, i),
- children: /* @__PURE__ */ (0, V.jsxs)("div", {
- className: gk.content,
- children: [/* @__PURE__ */ (0, V.jsxs)("div", {
- className: gk.leftSection,
- children: [d ? r : t ? /* @__PURE__ */ (0, V.jsx)(t, {
- className: gk.icon,
- "aria-hidden": !0
- }) : null, /* @__PURE__ */ (0, V.jsx)(Ioe, {
- ref: o,
- ...c,
- className: vE(gk.input, l.inputClassName, a)
- })]
- }), n ? /* @__PURE__ */ (0, V.jsx)(n, {
- className: gk.icon,
- "aria-hidden": !0
- }) : null]
- })
- });
-}
-_k.displayName = "InputBase";
-function vk({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, trailingIcon: a, leadingAddon: o, fieldClassName: s, ref: c, groupRef: l, className: u, ...d }) {
- return /* @__PURE__ */ (0, V.jsx)(hk, {
- ...d,
- className: u,
- "aria-label": d["aria-label"] ?? (!e && typeof r == "string" ? r : void 0),
- children: ({ isRequired: u, isInvalid: d }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- e && /* @__PURE__ */ (0, V.jsx)(pce, {
- isRequired: u,
- isInvalid: d,
- tooltip: n,
- children: e
- }),
- /* @__PURE__ */ (0, V.jsx)(_k, {
- ref: c,
- groupRef: l,
- placeholder: r,
- leadingIcon: i,
- trailingIcon: a,
- leadingAddon: o,
- fieldClassName: s
- }),
- t && /* @__PURE__ */ (0, V.jsx)(pk, {
- isInvalid: d,
- children: t
- })
- ] })
- });
+//#region node_modules/react-stately/dist/private/grid/useGridState.mjs
+function sce(e) {
+ let { collection: t, focusMode: n } = e, r = e.UNSAFE_selectionState || LO(e), i = (0, B.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = r.setFocusedKey;
+ r.setFocusedKey = (e, r) => {
+ if (n === "cell" && e != null) {
+ let n = t.getItem(e);
+ if (n?.type === "item") {
+ let i = Hv(n, t);
+ e = r === "last" ? Gv(i)?.key ?? null : Uv(i)?.key ?? null;
+ }
+ }
+ a(e, r);
+ };
+ let o = (0, B.useMemo)(() => new zO(t, r), [t, r]), s = (0, B.useRef)(null);
+ return (0, B.useEffect)(() => {
+ if (r.focusedKey != null && s.current && !t.getItem(r.focusedKey)) {
+ let e = s.current.getItem(r.focusedKey), n = e?.parentKey != null && (e.type === "cell" || e.type === "rowheader" || e.type === "column") ? s.current.getItem(e.parentKey) : e;
+ if (!n) {
+ r.setFocusedKey(null);
+ return;
+ }
+ let i = s.current.rows, a = t.rows, c = i.length - a.length, l = Math.min(c > 1 ? Math.max(n.index - c + 1, 0) : n.index, a.length - 1), u = null;
+ for (let e = Math.max(0, l); e < a.length; e++) if (!o.isDisabled(a[e].key) && a[e].type !== "headerrow") {
+ u = a[e];
+ break;
+ }
+ if (u === null) {
+ for (let e = l - 1; e >= 0; e--) if (!o.isDisabled(a[e].key) && a[e].type !== "headerrow") {
+ u = a[e];
+ break;
+ }
+ }
+ if (u) {
+ let i = u.hasChildNodes ? [...Hv(u, t)] : [], a = u.hasChildNodes && n !== e && e && e.index < i.length ? i[e.index].key : u.key;
+ r.setFocusedKey(a);
+ } else r.setFocusedKey(null);
+ }
+ s.current = t;
+ }, [
+ t,
+ o,
+ r,
+ r.focusedKey
+ ]), {
+ collection: t,
+ disabledKeys: i,
+ isKeyboardNavigationDisabled: !1,
+ selectionManager: o
+ };
}
-vk.displayName = "Input";
-//#endregion
-//#region src/react/boardui/components/base/dropdown/menu-styles.ts
-var yk = [
- "max-w-[calc(100vw-32px)] overflow-y-auto",
- "rounded-2xl border border-border-button-default bg-background-primary-default p-2.5 shadow-dropdown",
- "transition duration-150 ease-out",
- "data-[entering]:opacity-0 data-[entering]:scale-95 data-[entering]:blur-[2px]",
- "data-[exiting]:opacity-0 data-[exiting]:scale-95 data-[exiting]:blur-[2px]",
- "data-[placement=bottom]:origin-top-left data-[placement=top]:origin-bottom-left",
- "data-[placement=left]:origin-right data-[placement=right]:origin-left"
-].join(" "), mce = "w-[266px]", hce = "flex w-full flex-col gap-1 outline-none", bk = ["flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left", "text-text-primary outline-none transition-colors"].join(" "), xk = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
//#endregion
-//#region src/react/boardui/components/foundations/icons/chevrons.tsx
-function gce(e) {
- return /* @__PURE__ */ (0, V.jsx)("svg", {
- viewBox: "0 0 16 16",
- fill: "none",
- "aria-hidden": !0,
+//#region node_modules/react-stately/dist/private/table/useTableState.mjs
+var cce = {
+ ascending: "descending",
+ descending: "ascending"
+};
+function lce(e) {
+ let [t, n] = (0, B.useState)(!1), { selectionMode: r = "none", showSelectionCheckboxes: i, showDragButtons: a, treeColumn: o = null } = e, s = (0, B.useMemo)(() => ({
+ showSelectionCheckboxes: i && r !== "none",
+ showDragButtons: a,
+ selectionMode: r,
+ columns: []
+ }), [
+ e.children,
+ i,
+ r,
+ a
+ ]), c = HO(e, (0, B.useCallback)((e) => new oce(e, null, s), [s]), s), { disabledKeys: l, selectionManager: u } = sce({
...e,
- children: /* @__PURE__ */ (0, V.jsx)("path", {
- d: "M4 7L7.29289 10.2929C7.68342 10.6834 8.31658 10.6834 8.70711 10.2929L12 7",
- stroke: "currentColor",
- strokeWidth: "2",
- strokeLinecap: "round"
- })
- });
+ collection: c,
+ disabledBehavior: e.disabledBehavior || "selection"
+ }), [d, f] = L_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
+ return {
+ collection: c,
+ disabledKeys: l,
+ selectionManager: u,
+ showSelectionCheckboxes: e.showSelectionCheckboxes || !1,
+ sortDescriptor: e.sortDescriptor ?? null,
+ isKeyboardNavigationDisabled: c.size === 0 || t,
+ setKeyboardNavigationDisabled: n,
+ sort(t, n) {
+ e.onSortChange?.({
+ column: t,
+ direction: n ?? (e.sortDescriptor?.column === t ? cce[e.sortDescriptor.direction] : "ascending")
+ });
+ },
+ expandedKeys: d,
+ toggleKey(e) {
+ f((t) => {
+ let n = new Set(t);
+ return n.has(e) ? n.delete(e) : n.add(e), n;
+ });
+ },
+ treeColumn: o
+ };
}
-function _ce(e) {
- return /* @__PURE__ */ (0, V.jsx)("svg", {
- viewBox: "0 0 24 24",
- fill: "none",
- "aria-hidden": !0,
+function uce(e, t) {
+ let n = (0, B.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
+ return {
...e,
- children: /* @__PURE__ */ (0, V.jsx)("path", {
- d: "M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z",
- fill: "currentColor"
- })
- });
+ collection: n,
+ selectionManager: r
+ };
}
//#endregion
-//#region src/react/boardui/utils/use-dismiss-on-outside-press.ts
-function vce(e, t, n) {
- (0, B.useEffect)(() => {
- if (!e) return;
- let r = (e) => {
- let r = e.target;
- n.some((e) => e.current?.contains(r)) || t();
- };
- return document.addEventListener("pointerdown", r, !0), () => document.removeEventListener("pointerdown", r, !0);
- }, [
- e,
- t,
- n
- ]);
-}
-function yce(e, t) {
- let n = (0, B.useRef)(!1);
- return (0, B.useEffect)(() => {
- if (!e) return;
- let r = (e) => {
- t.current?.contains(e.target) && (n.current = !0, setTimeout(() => {
- n.current = !1;
- }, 400));
+//#region node_modules/react-aria-components/dist/private/Table.mjs
+var dce = class extends op {
+ withExpandedKeys(e) {
+ let t = this.clone();
+ return t.expandedKeys = e, t.frozen = this.frozen, t.rows = Array.from(t.getRows()), t;
+ }
+ addNode(e) {
+ super.addNode(e), this.columnsDirty ||= e.type === "column", e.type === "tableheader" && (this.head = e);
+ }
+ getRows() {
+ let e = [];
+ for (let t of this) (t.type === "tablebody" || t.type === "tablefooter") && e.push(...this.getChildren(t.key));
+ return e;
+ }
+ get body() {
+ for (let e of this) if (e.type === "tablebody") return e;
+ return new Rk(-2);
+ }
+ commit(e, t, n = !1) {
+ this.updateColumns(n), this.firstKey = e, this.lastKey = t, this.rows = [];
+ for (let e of this.getRows()) {
+ let t = e.lastChildKey;
+ if (t != null) {
+ let e = this.getItem(t);
+ for (; e && e.type !== "cell";) e = e.prevKey == null ? null : this.getItem(e.prevKey);
+ if (e) {
+ let t = (e.colIndex ?? e.index) + (e.colSpan ?? 1);
+ if (t !== this.columns.length && !n) throw Error(`Cell count must match column count. Found ${t} cells and ${this.columns.length} columns.`);
+ }
+ }
+ this.rows.push(e);
+ }
+ super.commit(e, t, n);
+ }
+ updateColumns(e) {
+ if (!this.columnsDirty) return;
+ this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.columns = [];
+ let t = /* @__PURE__ */ new Map(), n = (e) => {
+ e.type === "column" && (t.set(e.key, e), e.hasChildNodes || (e.index = this.columns.length, this.columns.push(e), e.props.isRowHeader && this.rowHeaderColumnKeys.add(e.key)));
+ for (let t of this.getChildren(e.key)) n(t);
};
- return document.addEventListener("pointerdown", r, !0), () => document.removeEventListener("pointerdown", r, !0);
- }, [e, t]), (e) => e && n.current ? (n.current = !1, !1) : !0;
-}
-//#endregion
-//#region src/react/boardui/components/base/select/select.tsx
-var Sk = (0, B.createContext)("md");
-function Ck({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
- let l = (0, B.useRef)(null), u = (0, B.useRef)(null), [d, f] = (0, B.useState)(!1);
- vce(d, () => f(!1), [l, u]);
- let p = yce(d, l);
- return /* @__PURE__ */ (0, V.jsx)(Cse, {
- ref: s,
- ...c,
- isOpen: d,
- onOpenChange: (e) => p(e) && f(e),
- className: vE("group flex flex-col", e),
- children: ({ isOpen: e }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)(YE, {
- ref: l,
- className: vE("flex w-full cursor-pointer items-center justify-between rounded-2lg", "border border-border-button-default bg-background-primary-default shadow-xs", "text-text-primary", "transition-[background-color,border-color,box-shadow,padding,font-size] duration-200 ease", "hover:bg-background-primary-hover hover:border-border-button-hover", "outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring", "disabled:cursor-not-allowed disabled:bg-background-primary-disabled disabled:text-text-tertiary disabled:shadow-none", r === "sm" ? "gap-1 px-[7px] py-1 text-body-2-medium" : "gap-1.5 px-2.5 py-2 text-body-medium", t),
- children: [/* @__PURE__ */ (0, V.jsx)(Ese, {
- className: vE("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
- children: o
- }), /* @__PURE__ */ (0, V.jsx)(gce, { className: vE("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
- ref: u,
- isNonModal: !0,
- offset: 4,
- className: vE(mce, yk, "p-2", n),
- children: /* @__PURE__ */ (0, V.jsx)(Woe, {
- items: a,
- className: vE(hce, "max-h-[240px] overflow-auto"),
- children: /* @__PURE__ */ (0, V.jsx)(Sk.Provider, {
- value: r,
- children: i
- })
- })
- })] })
- });
-}
-function wk({ className: e, children: t, ...n }) {
- let r = (0, B.useContext)(Sk);
- return /* @__PURE__ */ (0, V.jsx)(qoe, {
- ...n,
- className: (t) => vE(bk, r === "sm" ? "px-2 py-1.5 text-body-2-medium" : "text-body-medium", (t.isFocused || t.isSelected) && "bg-dropdown-item-hover-background", t.isDisabled && "cursor-not-allowed text-text-disabled", typeof e == "function" ? e(t) : e),
- children: t
- });
-}
-//#endregion
-//#region src/react/boardui/components/application/settings/settings-rows.tsx
-function Tk({ className: e, children: t }) {
- return /* @__PURE__ */ (0, V.jsx)("div", {
- className: vE("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
- children: t
- });
-}
-function Ek({ className: e, children: t }) {
- return /* @__PURE__ */ (0, V.jsx)("p", {
- className: vE("w-full px-3 text-body-2-medium text-text-secondary", e),
- children: t
- });
-}
-function Dk({ label: e, description: t, children: n }) {
- return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: vE("flex min-h-[52px] w-full items-center justify-between gap-4 py-2.5 pr-2.5", "border-b border-separator-border last:border-b-0"),
- children: [/* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex min-w-0 flex-col",
- children: [/* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-body-regular text-text-primary",
- children: e
- }), t && /* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-body-2-regular text-text-secondary",
- children: t
- })]
- }), n]
+ for (let e of this.getChildren(this.head.key)) n(e);
+ if (this.headerRows = jk(t, this.columns), this.columnsDirty = !1, this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !e) throw Error("A table must have at least one Column with the isRowHeader prop set to true");
+ }
+ get columnCount() {
+ return this.columns.length;
+ }
+ *[Symbol.iterator]() {
+ let e = this.firstKey;
+ for (; e != null;) {
+ let t = this.getItem(e);
+ t && (yield t), e = t?.nextKey ?? null;
+ }
+ }
+ getFirstKey() {
+ for (let e of this) if (e.type === "tablebody") return e.firstChildKey ?? null;
+ return null;
+ }
+ getLastKey() {
+ let e = this.lastKey;
+ if (e == null) return null;
+ let t = this.getItem(e);
+ for (; t?.lastChildKey != null && (t.type !== "item" || this.expandedKeys.has(t.key));) t = this.getItem(t.lastChildKey);
+ return t?.key;
+ }
+ getKeyAfter(e) {
+ let t = this.getItem(e);
+ if (t?.type === "column") return t.nextKey ?? null;
+ if (!t) return null;
+ if (t.type === "item" && t.firstChildKey != null && this.expandedKeys.has(t.key)) {
+ let e = this.getItem(t.firstChildKey);
+ for (; e;) {
+ if (e.type === "item") return e.key;
+ e = e.nextKey == null ? null : this.getItem(e.nextKey);
+ }
+ }
+ return super.getKeyAfter(e);
+ }
+ getKeyBefore(e) {
+ let t = this.getItem(e);
+ if (t?.type === "column") return t.prevKey ?? null;
+ if (!t) return null;
+ let n = null;
+ if (t.prevKey != null) {
+ for (t = this.getItem(t.prevKey); t && (t.type !== "item" || this.expandedKeys.has(t.key)) && t.lastChildKey != null;) t = this.getItem(t.lastChildKey);
+ n = t?.key ?? null;
+ }
+ return n ??= t.parentKey, n != null && this.getItem(n)?.type === "tableheader" ? null : n;
+ }
+ getChildren(e) {
+ let t = this.getItem(e);
+ if (!t) {
+ for (let t of this.headerRows) if (t.key === e) return t.childNodes;
+ }
+ let n = this;
+ return t?.type === "tablebody" || t?.type === "tablefooter" ? { *[Symbol.iterator]() {
+ let e = t.firstChildKey, r = e == null ? null : n.getItem(e);
+ for (; r;) {
+ yield r;
+ let e = n.getKeyAfter(r.key);
+ if (r = e == null ? null : n.getItem(e), r && r.parentKey === t.parentKey) break;
+ }
+ } } : { *[Symbol.iterator]() {
+ let t = n.getItem(e), r = t?.firstChildKey == null ? null : n.getItem(t.firstChildKey);
+ for (; r && (yield r, r = r.nextKey == null ? null : n.getItem(r.nextKey), t?.type !== "item" || r?.type === "cell"););
+ } };
+ }
+ clone() {
+ let e = super.clone();
+ return e.headerRows = this.headerRows, e.columns = this.columns, e.rows = this.rows, e.rowHeaderColumnKeys = this.rowHeaderColumnKeys, e.head = this.head, e;
+ }
+ getTextValue(e) {
+ let t = this.getItem(e);
+ if (!t) return "";
+ if (t.textValue) return t.textValue;
+ let n = this.rowHeaderColumnKeys, r = [];
+ for (let t of this.getChildren(e)) {
+ let e = this.columns[t.index];
+ if (n.has(e.key) && t.textValue && r.push(t.textValue), r.length === n.size) break;
+ }
+ return r.join(" ");
+ }
+ constructor(...e) {
+ super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new Fk(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
+ }
+}, fce = /*#__PURE__*/ (0, B.createContext)(null), pce = /*#__PURE__*/ (0, B.createContext)(null), Mk = /*#__PURE__*/ (0, B.createContext)(null), Nk = /*#__PURE__*/ (0, B.createContext)(null), mce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, pce);
+ let n = LO(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, B.useMemo)(() => ({
+ selectionBehavior: i === "none" ? null : r,
+ selectionMode: i,
+ disallowEmptySelection: a,
+ allowsDragging: o
+ }), [
+ r,
+ i,
+ a,
+ o
+ ]), c = /*#__PURE__*/ B.createElement(_ce.Provider, { value: s }, /*#__PURE__*/ B.createElement(ag, e));
+ return /*#__PURE__*/ B.createElement(qh, {
+ content: c,
+ createCollection: () => new dce()
+ }, (r) => /*#__PURE__*/ B.createElement(gce, {
+ props: e,
+ forwardedRef: t,
+ selectionState: n,
+ collection: r
+ }));
+}), hce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.table, {
+ ...e,
+ ref: t
});
-}
-//#endregion
-//#region src/react/boardui/components/base/buttons/link-button.tsx
-var Ok = yE({
- base: [
- "inline-flex items-center justify-center gap-1 whitespace-nowrap",
- "font-sans select-none cursor-pointer rounded-sm",
- "underline-offset-3 hover:underline",
- "transition-colors duration-150 ease",
- "outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring",
- "disabled:cursor-not-allowed disabled:no-underline aria-disabled:cursor-not-allowed aria-disabled:no-underline"
- ].join(" "),
- size: {
- medium: "text-body-medium",
- small: "text-body-medium",
- xs: "text-caption-1-semibold"
- },
- icon: {
- medium: "size-5 shrink-0",
- small: "size-[18px] shrink-0",
- xs: "size-3.5 shrink-0"
+}), Pk = {
+ expand: {
+ ltr: "ArrowRight",
+ rtl: "ArrowLeft"
},
- variant: {
- primary: ["text-accent-600 active:text-accent-800", "disabled:text-text-tertiary aria-disabled:text-text-tertiary"].join(" "),
- secondary: ["text-text-secondary active:text-text-primary", "disabled:text-text-tertiary aria-disabled:text-text-tertiary"].join(" ")
+ collapse: {
+ ltr: "ArrowLeft",
+ rtl: "ArrowRight"
}
-});
-function kk({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
- let c = vE(Ok.base, Ok.size[t], Ok.variant[e], a), l = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- n ? /* @__PURE__ */ (0, V.jsx)(n, {
- className: Ok.icon[t],
- "aria-hidden": !0
- }) : null,
- i != null && /* @__PURE__ */ (0, V.jsx)("span", { children: i }),
- r ? /* @__PURE__ */ (0, V.jsx)(r, {
- className: Ok.icon[t],
- "aria-hidden": !0
- }) : null
- ] });
- if (s.href !== void 0) {
- let { ref: e, href: t, ...n } = s;
- return /* @__PURE__ */ (0, V.jsx)("a", {
- ref: e,
- href: o ? void 0 : t,
- "aria-disabled": o || void 0,
- className: c,
- ...n,
- children: l
+};
+function gce({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
+ [e, t] = bD(e, t, TD);
+ let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, B.useContext)(fce);
+ t = Nh((0, B.useMemo)(() => mh(t, c?.tableRef), [t, c?.tableRef]));
+ let [l, u] = L_(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
+ r = (0, B.useMemo)(() => r.withExpandedKeys(l), [r, l]);
+ let d = lce({
+ ...s,
+ collection: r,
+ children: void 0,
+ UNSAFE_selectionState: n,
+ expandedKeys: l,
+ onExpandedChange: u
+ }), f = uce(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, B.useContext)(AD), { dragAndDropHooks: _ } = e, { gridProps: v } = one({
+ ...s,
+ layoutDelegate: m,
+ isVirtualized: p
+ }, f, t), y = f.selectionManager, b = !!_?.useDraggableCollectionState, x = !!_?.useDroppableCollectionState;
+ (0, B.useRef)(b), (0, B.useRef)(x), (0, B.useEffect)(() => {}, [b, x]);
+ let S, C, w, T = !1, E = null, D = (0, B.useRef)(null), { direction: O } = vg(), [k] = (0, B.useState)(() => new ice());
+ if (b && _) {
+ S = _.useDraggableCollectionState({
+ collection: f.collection,
+ selectionManager: y,
+ preview: _.renderDragPreview ? D : void 0
+ }), _.useDraggableCollection({}, S, t);
+ let e = _.DragPreview;
+ E = _.renderDragPreview ? /*#__PURE__*/ B.createElement(e, { ref: D }, _.renderDragPreview) : null;
+ }
+ if (x && _) {
+ C = _.useDroppableCollectionState({
+ collection: f.collection,
+ selectionManager: y
});
+ let e = new Q_({
+ collection: f.collection,
+ disabledKeys: y.disabledKeys,
+ disabledBehavior: y.disabledBehavior,
+ ref: t,
+ layoutDelegate: m
+ }), n = _.dropTargetDelegate || h || new _.ListDropTargetDelegate(r.rows, t);
+ k.setup(n, d, O), w = _.useDroppableCollection({
+ keyboardDelegate: e,
+ dropTargetDelegate: k,
+ onDropActivate: (e) => {
+ if (e.target.type === "item") {
+ let t = e.target.key, n = d.collection.getItem(t), r = l.has(t);
+ n && n.hasChildNodes && (!r || _?.isVirtualDragging?.()) && d.toggleKey(t);
+ }
+ },
+ onKeyDown: (e) => {
+ let t = C?.target;
+ if (t && t.type === "item" && t.dropPosition === "on") {
+ let n = d.collection.getItem(t.key);
+ (e.key === Pk.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === Pk.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
+ }
+ }
+ }, C, t), T = C.isDropTarget({ type: "root" });
}
- let { ref: u, type: d = "button", ...f } = s;
- return /* @__PURE__ */ (0, V.jsx)("button", {
- ref: u,
- type: d,
- disabled: o,
- className: c,
- ...f,
- children: l
- });
-}
-//#endregion
-//#region src/react/settings/section.tsx
-function Ak({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
- let a = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [n ? /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex w-full flex-wrap items-center justify-between gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)("div", {
- className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, V.jsx)(Ek, { children: e })
- }), n]
- }) : /* @__PURE__ */ (0, V.jsx)(Ek, { children: e }), /* @__PURE__ */ (0, V.jsx)(Tk, { children: i })] });
- return r ? /* @__PURE__ */ (0, V.jsx)("form", {
- id: t,
- "aria-label": e,
- noValidate: !0,
- onSubmit: r,
- className: "flex w-full flex-col gap-2",
- children: a
- }) : /* @__PURE__ */ (0, V.jsx)("section", {
- id: t,
- "aria-label": e,
- className: "flex w-full flex-col gap-2",
- children: a
- });
-}
-function jk({ children: e }) {
- return /* @__PURE__ */ (0, V.jsx)("div", {
- className: "flex flex-col",
- children: e
- });
-}
-function Mk({ divided: e = !1, children: t }) {
- return e ? /* @__PURE__ */ (0, V.jsx)("div", {
- className: "flex flex-col gap-4 border-t border-separator-border py-4 pr-3",
- children: t
- }) : /* @__PURE__ */ (0, V.jsx)("div", {
- className: "flex flex-col gap-4 py-4 pr-3",
- children: t
- });
-}
-function Nk({ status: e, children: t }) {
- return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "-ml-3 flex flex-wrap items-center justify-end gap-3 rounded-b-2xl border-t border-separator-border bg-card-footer px-3 py-3",
- children: [e ? /* @__PURE__ */ (0, V.jsx)("div", {
- className: "mr-auto min-w-0 text-body-2-regular text-text-secondary",
- children: e
- }) : null, t]
- });
-}
-function Pk({ role: e, children: t }) {
- return /* @__PURE__ */ (0, V.jsx)("p", {
- role: e,
- className: "text-body-2-regular text-text-secondary",
- children: t
- });
-}
-function Fk({ children: e }) {
- return /* @__PURE__ */ (0, V.jsx)("p", {
- role: "alert",
- className: "text-body-2-regular text-text-error-primary",
- children: e
- });
+ let { focusProps: A, isFocused: j, isFocusVisible: M } = iy(), N = vD({
+ ...e,
+ children: void 0,
+ defaultClassName: "react-aria-Table",
+ values: {
+ isDropTarget: T,
+ isFocused: j,
+ isFocusVisible: M,
+ state: f
+ }
+ }), P = !!(b && !S?.isDisabled), ee = N.style, F = null;
+ c && (F = c.useTableColumnResizeState({ tableWidth: c.tableWidth }, f), p || (ee = {
+ ...ee,
+ tableLayout: "fixed",
+ width: "min-content"
+ }));
+ let I = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(_D, { values: [
+ [Mk, f],
+ [Nk, F],
+ [EO, {
+ dragAndDropHooks: _,
+ dragState: S,
+ dropState: C
+ }],
+ [DO, { render: Dce }],
+ [TD, null],
+ [ED, null]
+ ] }, /*#__PURE__*/ B.createElement(Yg, null, /*#__PURE__*/ B.createElement(hce, {
+ ...U(I, N, v, A, w?.collectionProps),
+ style: ee,
+ ref: t,
+ slot: e.slot || void 0,
+ onScroll: e.onScroll,
+ "data-allows-dragging": P || void 0,
+ "data-drop-target": T || void 0,
+ "data-focused": j || void 0,
+ "data-focus-visible": M || void 0
+ }, /*#__PURE__*/ B.createElement(jO, null, /*#__PURE__*/ B.createElement(g, {
+ collection: f.collection,
+ scrollRef: c?.scrollRef ?? t,
+ persistedKeys: kO(y, _, C)
+ })))), E);
}
-function Ik({ children: e }) {
- return /* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-body-medium text-text-primary",
- children: e
+var _ce = /*#__PURE__*/ (0, B.createContext)(null), Fk = class extends tp {
+ static {
+ this.type = "tableheader";
+ }
+}, vce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.thead, {
+ ...e,
+ ref: t
});
-}
-function Lk({ href: e, children: t, leadingIcon: n }) {
- return /* @__PURE__ */ (0, V.jsx)(kk, {
- href: e,
- target: "_blank",
- rel: "noopener noreferrer",
- size: "small",
- leadingIcon: n,
- trailingIcon: vT,
- className: "min-w-0 max-w-full",
- children: /* @__PURE__ */ (0, V.jsx)("span", {
- className: "min-w-0 whitespace-normal break-all",
- children: t
- })
+}), Ik = /*#__PURE__*/ ng(Fk, (e, t) => {
+ let n = (0, B.useContext)(Mk).collection, r = dp({
+ items: n.headerRows,
+ children: (0, B.useCallback)((e) => {
+ switch (e.type) {
+ case "headerrow": return /*#__PURE__*/ B.createElement(bce, { item: e });
+ default: throw Error("Unsupported node type in TableHeader: " + e.type);
+ }
+ }, [])
+ }), { rowGroupProps: i } = Zx(), { hoverProps: a, isHovered: o } = cy({
+ onHoverStart: e.onHoverStart,
+ onHoverChange: e.onHoverChange,
+ onHoverEnd: e.onHoverEnd
+ }), s = vD({
+ ...e,
+ children: void 0,
+ defaultClassName: "react-aria-TableHeader",
+ values: { isHovered: o }
});
-}
-function Rk({ children: e }) {
- return /* @__PURE__ */ (0, V.jsx)("dl", {
- className: "flex flex-col",
- children: e
+ return /*#__PURE__*/ B.createElement(vce, {
+ ...U(Eg(e, { global: !0 }), i, a),
+ ...s,
+ ref: t,
+ "data-hovered": o || void 0
+ }, r);
+}, (e) => /*#__PURE__*/ B.createElement(ag, {
+ dependencies: e.dependencies,
+ items: e.columns
+}, e.children)), yce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement("div", {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement("tr", {
+ ...e,
+ ref: t
});
+});
+function bce({ item: e }) {
+ let t = (0, B.useRef)(null), n = (0, B.useContext)(Mk), { isVirtualized: r, CollectionBranch: i } = (0, B.useContext)(AD), { rowProps: a } = une({
+ node: e,
+ isVirtualized: r
+ }, n, t), { checkboxProps: o } = _ne(n);
+ return /*#__PURE__*/ B.createElement(yce, {
+ ...a,
+ ref: t
+ }, /*#__PURE__*/ B.createElement(_D, { values: [[BD, { slots: { selection: o } }], [VD, { slots: { selection: o } }]] }, /*#__PURE__*/ B.createElement(i, {
+ collection: n.collection,
+ parent: e
+ })));
}
-function zk({ term: e, children: t }) {
- return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex min-h-11 items-center justify-between gap-4 border-b border-separator-border py-2.5 pr-3 last:border-b-0",
- children: [/* @__PURE__ */ (0, V.jsx)("dt", {
- className: "flex shrink-0 items-center gap-2 text-body-regular text-text-secondary",
- children: e
- }), /* @__PURE__ */ (0, V.jsx)("dd", {
- className: "flex min-w-0 flex-wrap items-center justify-end gap-2 text-right text-body-regular break-all text-text-primary",
- children: t
- })]
+var xce = class extends tp {
+ static {
+ this.type = "column";
+ }
+}, Sce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.th, {
+ ...e,
+ ref: t
});
-}
-function Bk({ summary: e, defaultOpen: t = !1, children: n }) {
- let r = (0, B.useId)(), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(!1), [s, c] = (0, B.useState)(t);
- return /* @__PURE__ */ (0, V.jsxs)("details", {
- ref: (e) => {
- i.current = e, e && t && !o.current && (o.current = !0, e.open = !0);
- },
- children: [/* @__PURE__ */ (0, V.jsxs)("summary", {
- "aria-expanded": s,
- "aria-controls": r,
- onClick: (e) => {
- e.preventDefault(), !(!i.current || !a.current) && (We(i.current, a.current, !s), c(!s));
+}), Lk = /*#__PURE__*/ tg(xce, (e, t, n) => {
+ let r = Nh(t), i = (0, B.useContext)(Mk), { isVirtualized: a } = (0, B.useContext)(AD), { columnHeaderProps: o, isPressed: s } = lne({
+ node: n,
+ isVirtualized: a,
+ focusMode: e.focusMode,
+ allowsArrowNavigation: e.allowsArrowNavigation
+ }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = iy(), d = (0, B.useContext)(Nk), f = !1;
+ d && (f = d.resizingColumn === n.key);
+ let { hoverProps: p, isHovered: m } = cy({ isDisabled: !e.allowsSorting }), h = vD({
+ ...e,
+ id: void 0,
+ children: n.rendered,
+ defaultClassName: "react-aria-Column",
+ values: {
+ isHovered: m,
+ isPressed: s,
+ isFocused: c,
+ isFocusVisible: l,
+ allowsSorting: n.props.allowsSorting,
+ sortDirection: i.sortDescriptor?.column === n.key ? i.sortDescriptor.direction : void 0,
+ isResizing: f,
+ startResize: () => {
+ if (d) d.startResize(n.key), i.setKeyboardNavigationDisabled(!0);
+ else throw Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing");
},
- className: "flex w-fit cursor-pointer list-none items-center gap-1 rounded-sm text-body-2-medium text-text-secondary outline-none select-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [/* @__PURE__ */ (0, V.jsx)(uT, {
- "aria-hidden": !0,
- className: s ? "size-4 shrink-0 rotate-90 transition-transform" : "size-4 shrink-0 transition-transform"
- }), e]
- }), /* @__PURE__ */ (0, V.jsx)("div", {
- ref: a,
- id: r,
- inert: !s,
- children: /* @__PURE__ */ (0, V.jsx)("div", {
- className: "flex flex-col gap-2 pt-3",
- children: n
- })
- })]
+ sort: (e) => {
+ i.sort(n.key, e);
+ }
+ }
+ }), g = h.style;
+ d && (g = {
+ ...g,
+ width: d.getColumnWidth(n.key)
});
-}
-function bce({ name: e }) {
- return /* @__PURE__ */ (0, V.jsx)("svg", {
- "aria-hidden": !0,
- viewBox: "0 0 24 24",
- fill: "none",
- className: "size-4 shrink-0 stroke-current stroke-2",
- children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
+ let _ = Eg(e, { global: !0 });
+ return delete _.id, /*#__PURE__*/ B.createElement(Sce, {
+ ...U(_, o, u, p),
+ ...h,
+ style: g,
+ ref: r,
+ "data-hovered": m || void 0,
+ "data-pressed": s || void 0,
+ "data-focused": c || void 0,
+ "data-focus-visible": l || void 0,
+ "data-resizing": f || void 0,
+ "data-allows-sorting": n.props.allowsSorting || void 0,
+ "data-sort-direction": i.sortDescriptor?.column === n.key ? i.sortDescriptor.direction : void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [[Cce, {
+ column: n,
+ triggerRef: r
+ }], [AD, OD]] }, h.children));
+}), Cce = /*#__PURE__*/ (0, B.createContext)(null), Rk = class extends np {
+ static {
+ this.type = "tablebody";
+ }
+}, wce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.tbody, {
+ ...e,
+ ref: t
});
-}
-function Vk({ mark: e }) {
- return e.startsWith("data:image/png;base64,") ? /* @__PURE__ */ (0, V.jsx)("img", {
- src: e,
- alt: "",
- width: 16,
- height: 16,
- className: "size-4 shrink-0"
- }) : /* @__PURE__ */ (0, V.jsx)(bce, { name: e });
-}
-//#endregion
-//#region src/react/activity/tasks.ts
-var Hk = "/api/tasks", Uk = ["tasks"], xce = (e, t) => G(`${Hk}?${new URLSearchParams({
- before_finished_at: e.finished_at || "",
- before_id: String(e.id)
-})}`, t);
-function Wk(...e) {
- let t = /* @__PURE__ */ new Map();
- for (let n of e) for (let e of n) t.has(e.id) || t.set(e.id, e);
- return [...t.values()].sort((e, t) => {
- let n = e.finished_at || "", r = t.finished_at || "";
- return n === r ? t.id - e.id : n < r ? 1 : -1;
- });
-}
-var Sce = 2e3, Cce = 1e4, wce = (e) => e?.running.length ? Sce : Cce, Gk = (e) => G(Hk, e);
-async function Tce(e) {
- await z.fetchQuery({
- queryKey: Uk,
- queryFn: () => Gk(e)
- });
-}
-var Kk = {
- manual: "手动",
- scheduled: "定时",
- startup: "启动",
- cli: "命令行"
-}, Ece = {
- pending: "排队中",
- running: "进行中",
- succeeded: "已完成",
- failed: "失败",
- cancelled: "已取消",
- interrupted: "被打断"
-}, Dce = (e) => Ece[e] || e, Oce = {
- checked: "已检查",
- total: "总数",
- scanned: "已扫描",
- identified: "已识别",
- candidates: "资料候选",
- covers: "封面",
- changed: "已改动",
- operation: "操作",
- ok: "取得",
- miss: "未取得",
- kept: "保留",
- planned: "计划",
- done: "已处理",
- added: "新增",
- written: "已写入",
- removed: "已移除",
- exit_code: "退出码",
- issue_count: "问题",
- followups: "派出后继",
- followups_duplicate: "已在排队",
- followups_truncated: "超上限未派",
- followups_depth_exceeded: "超深度未派",
- outcome: "结果",
- name: "实体",
- matched: "图库命中",
- size: "尺寸",
- source: "来源",
- cover_network: "封面连不上图片主机"
-};
-function kce(e) {
- let t = /* @__PURE__ */ new Map();
- for (let n of e) {
- if (!n.followup_key || n.parent_run_id == null) continue;
- let e = t.get(n.parent_run_id);
- e ? e.push(n) : t.set(n.parent_run_id, [n]);
+}), zk = /*#__PURE__*/ ng(Rk, (e, t, n) => {
+ let r = (0, B.useContext)(Mk), { isVirtualized: i } = (0, B.useContext)(AD), a = r.collection, { CollectionBranch: o } = (0, B.useContext)(AD), { dragAndDropHooks: s, dropState: c } = (0, B.useContext)(EO), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
+ isDropTarget: u,
+ isEmpty: d
+ }, p = vD({
+ ...e,
+ id: void 0,
+ children: void 0,
+ defaultClassName: "react-aria-TableBody",
+ values: f
+ }), m, h = a.columnCount;
+ if (d && e.renderEmptyState && r) {
+ let t = {}, n = {}, r = {};
+ i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ B.createElement(Vk, {
+ role: "row",
+ ...t,
+ style: r
+ }, /*#__PURE__*/ B.createElement(Uk, {
+ role: "rowheader",
+ ...n,
+ style: r
+ }, e.renderEmptyState(f)));
}
- return t;
-}
-function Ace(e, t) {
- let n = [], r = /* @__PURE__ */ new Map();
- for (let i of e) {
- if (!t(i)) {
- r = /* @__PURE__ */ new Map(), n.push({
- run: i,
- runs: [i]
- });
- continue;
- }
- let e = r.get(i.task_key);
- if (e) e.runs.push(i);
- else {
- let e = {
- run: i,
- runs: [i]
- };
- r.set(i.task_key, e), n.push(e);
+ let { rowGroupProps: g } = Zx(), _ = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(wce, {
+ ...U(_, p, g),
+ ref: t,
+ "data-empty": d || void 0
+ }, l && /*#__PURE__*/ B.createElement(Mce, null), /*#__PURE__*/ B.createElement(o, {
+ collection: a,
+ parent: n,
+ renderDropIndicator: OO(s, c)
+ }), m);
+});
+(class extends np {
+ static {
+ this.type = "tablefooter";
+ }
+});
+var Bk = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), Tce = class extends tp {
+ static {
+ this.type = "item";
+ }
+ filter(e, t, n) {
+ let r = e.getChildren(this.key);
+ for (let i of r) if (n(i.textValue, i)) {
+ let n = this.clone();
+ return t.addDescendants(n, e), n;
}
+ return null;
}
- return n;
-}
-var jce = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), qk = (e) => e.status === "pending" || e.status === "running";
-function Mce(e) {
- let t = `${e.task_label}:`, n = e.progress_label || "", r = n.startsWith(t) ? n.slice(t.length) : n === e.task_label ? "" : n, i = e.progress_total || 0;
- return [r, e.error || Xk(e.result_summary) || (qk(e) && i > 0 ? `${e.progress_current || 0} / ${i} 项` : "")].filter(Boolean).join(" · ");
-}
-function Jk(e) {
- if (typeof e != "number" || !Number.isFinite(e) || e < 0) return "";
- let t = Math.floor(e);
- if (t < 60) return `${t} 秒`;
- let n = Math.floor(t / 60);
- return n < 60 ? `${n} 分 ${t % 60} 秒` : `${Math.floor(n / 60)} 小时 ${n % 60} 分`;
-}
-function Yk(e) {
- if (!e) return "";
- let t = new Date(e);
- return Number.isNaN(t.getTime()) ? "" : t.toLocaleString(void 0, {
- month: "2-digit",
- day: "2-digit",
- hour: "2-digit",
- minute: "2-digit"
- });
-}
-var Nce = /* @__PURE__ */ new Set([
- "blocked_by",
- "status",
- "run_id",
- "request_id",
- "started_at",
- "completed_at",
- "finished_at"
-]);
-function Xk(e) {
- return Object.entries(e || {}).filter(([e, t]) => !Nce.has(e) && (typeof t == "number" || typeof t == "string") && String(t) !== "").map(([e, t]) => `${Oce[e] || e} ${t}`).join(" · ");
-}
-//#endregion
-//#region src/react/activity/resource-search.tsx
-function Pce({ className: e }) {
- return /* @__PURE__ */ (0, V.jsx)("span", {
- className: e,
- "aria-hidden": !0,
- dangerouslySetInnerHTML: { __html: Ke("") }
- });
-}
-function Fce(e) {
- return ["中字", "中文字幕"].includes(e?.trim() ?? "") ? "chinese" : ["无码", "无码破解"].includes(e?.trim() ?? "") ? "uncensored" : "quality";
-}
-function Ice({ initialCode: e, reason: t, choose: n }) {
- let [r, i] = (0, B.useState)(e), [a, o] = (0, B.useState)(() => Fce(t)), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(null), [p, m] = (0, B.useState)(""), [h, g] = (0, B.useState)(""), _ = AE(), v = () => {
- if (!r.trim() || _.busy) return;
- let e = new URLSearchParams({
- code: r.trim(),
- goal: a
- });
- s && e.set("min_size", String(Math.round(Number(s) * 1024 ** 3))), l && e.set("max_size", String(Math.round(Number(l) * 1024 ** 3))), f(null), g("");
- let t = r.trim();
- _.run("search", (t) => G(`/api/resources/search?${e}`, t), (e) => {
- f(e), m(t);
- });
- };
- return /* @__PURE__ */ (0, V.jsxs)("section", {
- "aria-label": "资源搜索",
- "aria-busy": !!_.busy,
- className: "flex min-w-0 flex-col gap-4",
- children: [
- t ? /* @__PURE__ */ (0, V.jsxs)(Pk, { children: [
- "版本目标:",
- t,
- "。可在下方调整搜索优先项;完整度与水印需要逐条复核。"
- ] }) : null,
- /* @__PURE__ */ (0, V.jsx)(vk, {
- label: "搜索资源",
- value: r,
- maxLength: 80,
- placeholder: "输入番号,按回车搜索",
- leadingIcon: _.busy ? Pce : ET,
- isReadOnly: !!_.busy,
- "aria-busy": !!_.busy,
- onChange: i,
- onKeyDown: (e) => {
- e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), v());
- }
- }),
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: "优先寻找" }), /* @__PURE__ */ (0, V.jsxs)(Ck, {
- "aria-label": "优先寻找",
- selectedKey: a,
- isDisabled: !!_.busy,
- onSelectionChange: (e) => {
- e !== null && o(String(e));
- },
- children: [
- /* @__PURE__ */ (0, V.jsx)(wk, {
- id: "quality",
- children: "高清"
- }),
- /* @__PURE__ */ (0, V.jsx)(wk, {
- id: "chinese",
- children: "中字"
- }),
- /* @__PURE__ */ (0, V.jsx)(wk, {
- id: "uncensored",
- children: "无码"
- })
- ]
- })]
- }),
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex gap-3 max-sm:flex-col",
- children: [/* @__PURE__ */ (0, V.jsx)(vk, {
- label: "最小体积(GiB)",
- inputMode: "decimal",
- value: s,
- onChange: c
- }), /* @__PURE__ */ (0, V.jsx)(vk, {
- label: "最大体积(GiB)",
- inputMode: "decimal",
- value: l,
- onChange: u
- })]
- }),
- _.busy ? /* @__PURE__ */ (0, V.jsx)(Pk, {
- role: "status",
- children: "正在搜索资源"
- }) : null,
- _.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: _.error }) : null,
- d?.error ? /* @__PURE__ */ (0, V.jsx)(Pk, {
- role: "status",
- children: d.error
- }) : null,
- d?.state === "ready" && !d.items.length ? /* @__PURE__ */ (0, V.jsx)(Pk, {
- role: "status",
- children: "没有符合条件的资源。"
- }) : null,
- d?.warnings.map((e) => /* @__PURE__ */ (0, V.jsx)(Pk, { children: e }, e)),
- d?.items.length ? /* @__PURE__ */ (0, V.jsx)("ul", {
- className: "flex min-w-0 flex-col gap-4",
- children: d.items.map((e) => /* @__PURE__ */ (0, V.jsxs)("li", {
- className: "flex min-w-0 flex-col gap-2 border-t border-separator-border pt-4",
- children: [
- /* @__PURE__ */ (0, V.jsx)("p", {
- className: "break-words text-body-2-medium text-text-primary",
- children: e.name
- }),
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: [
- `${(e.size / 1024 ** 3).toFixed(2)} GiB`,
- `${e.seeders} 个做种`,
- e.resolution ? `${e.resolution}p` : "",
- e.codec,
- e.chinese ? "中字" : "",
- e.uncensored ? "无码" : "",
- e.origins.join("、")
- ].filter(Boolean).join(" · ") }),
- /* @__PURE__ */ (0, V.jsx)("div", { children: /* @__PURE__ */ (0, V.jsx)(J, {
- type: "button",
- variant: "secondary",
- onClick: () => {
- n(e.uri, p), g(e.id);
- },
- children: h === e.id ? "已填入磁力" : "选用此资源"
- }) })
- ]
- }, e.id))
- }) : null
- ]
+}, Vk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.tr, {
+ ...e,
+ ref: t
});
-}
-//#endregion
-//#region src/react/activity/downloads-panel.tsx
-var Zk = "/api/downloads", Qk = ["downloads"], Lce = "/api/downloads/cancel", Rce = (e) => e?.tasks.some((e) => e.cancellable) ? 5e3 : 3e4, zce = {
- ingested: "lime",
- failed: "rose",
- cancelled: "yellow",
- stalled: "yellow"
-}, Bce = {
- submitted: "已提交,远端开始下载后这里会显示进度。",
- adopted: "这个磁力已经有任务了,接着跟进那一条,没有重复提交。",
- adopted_remote: "远端已经有同一个任务,已接管,没有再扣配额。",
- refused: "这个资源被判为违规,不再提交。",
- failed: "提交没有成功。"
-}, Vce = (e) => e.title || e.display_name || e.remote_name || e.code || `磁力 ${e.info_hash?.slice(0, 8) ?? e.id}`, $k = (e) => e.failure_label ? [e.failure_label, e.failure_detail].filter(Boolean).join(":") : "";
-function Hce({ prefill: e }) {
- let t = TS({
- queryKey: Qk,
- queryFn: ({ signal: e }) => G(`${Zk}?limit=50`, e),
- refetchInterval: (e) => Rce(e.state.data)
- }), n = t.data;
- if (!n) return t.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "error",
- children: W(t.error)
- }) : null;
- let r = n.providers.filter((e) => e.configured);
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- t.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "error",
- children: W(t.error)
- }) : null,
- n.available ? r.length ? /* @__PURE__ */ (0, V.jsx)(Uce, {
- snapshot: n,
- prefill: e
- }) : /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "neutral",
- children: "还没有配置云下载。在配置页「下载」分组填好 CloudDrive2 的地址与令牌,或登录 PikPak, 这里就能粘贴磁力提交离线下载。"
- }) : /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "neutral",
- children: "云下载只在账本写入端可用。"
- }),
- n.tasks.length ? /* @__PURE__ */ (0, V.jsx)("ul", {
- "aria-live": "polite",
- className: "flex min-w-0 flex-col gap-3",
- children: n.tasks.map((e) => /* @__PURE__ */ (0, V.jsx)(Gce, {
- task: e,
- writable: n.available
- }, e.id))
- }) : null
- ] });
-}
-function Uce({ snapshot: e, prefill: t }) {
- let n = lS(), r = e.providers.filter((e) => e.configured), [i, a] = (0, B.useState)(r[0].key), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(t?.code ?? ""), [u, d] = (0, B.useState)(r[0].target), [f, p] = (0, B.useState)(null), m = AE(), h = (0, B.useRef)(null);
+}), Hk = /*#__PURE__*/ ng(Tce, (e, t, n) => {
+ let r = Nh(t), i = (0, B.useContext)(Mk), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, B.useContext)(EO), { isVirtualized: c, CollectionBranch: l } = (0, B.useContext)(AD), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = pne({
+ node: n,
+ shouldSelectOnPressUp: !!o,
+ isVirtualized: c
+ }, i, r), { isFocused: m, isFocusVisible: h, focusProps: g } = iy(), { isFocusVisible: _, focusProps: v } = iy({ within: !0 }), { hoverProps: y, isHovered: b } = cy({
+ isDisabled: !p.allowsSelection && !p.hasAction && !u,
+ onHoverStart: e.onHoverStart,
+ onHoverChange: e.onHoverChange,
+ onHoverEnd: e.onHoverEnd
+ }), { checkboxProps: x } = gne({ key: n.key }, i), S;
+ o && a && (S = a.useDraggableItem({
+ key: n.key,
+ hasDragButton: !0
+ }, o));
+ let C, w = (0, B.useRef)(null), { visuallyHiddenProps: T } = V_();
+ s && a && (C = a.useDropIndicator({ target: {
+ type: "item",
+ key: n.key,
+ dropPosition: "on"
+ } }, s, w));
+ let E = (0, B.useRef)(null);
(0, B.useEffect)(() => {
- t && h.current?.focus();
- }, [t]);
- let g = r.find((e) => e.key === i) ?? r[0], _ = (e) => {
- a(e), d(r.find((t) => t.key === e)?.target ?? "");
- };
- return /* @__PURE__ */ (0, V.jsx)("form", {
- "aria-label": "提交磁力",
- noValidate: !0,
- onSubmit: (e) => {
- e.preventDefault();
- let r = {
- magnet: o,
- provider: i,
- target: u,
- code: c,
- title: t?.title,
- origin: t?.origin
- };
- p(null), m.run("submit", (e) => K(Zk, r, "POST", e), (e) => {
- p(e), e.ok && s(""), n.invalidateQueries({ queryKey: Qk });
- });
- },
- children: /* @__PURE__ */ (0, V.jsxs)(Tk, { children: [
- /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Ice, {
- initialCode: t?.code ?? "",
- reason: t?.searchReason,
- choose: (e, t) => {
- s(e), l(t), h.current?.focus();
- }
- }),
- t?.title ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: `给「${t.title}」找来的资源,下载完由推送发现登记入库。` }) : null,
- /* @__PURE__ */ (0, V.jsx)(vk, {
- ref: h,
- label: "磁力链接",
- placeholder: "magnet:?xt=urn:btih:…",
- autoComplete: "off",
- maxLength: 4e3,
- value: o,
- onChange: s
- }),
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: "下载到" }), /* @__PURE__ */ (0, V.jsx)(Ck, {
- "aria-label": "下载到",
- selectedKey: i,
- onSelectionChange: (e) => {
- e !== null && _(String(e));
- },
- children: r.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
- id: e.key,
- children: e.label
- }, e.key))
- })]
- }),
- /* @__PURE__ */ (0, V.jsx)(vk, {
- label: "目标目录",
- placeholder: g.target || "/云下载",
- autoComplete: "off",
- maxLength: 300,
- hint: "留空就用配置页填的目标目录。",
- value: u,
- onChange: d
- }),
- /* @__PURE__ */ (0, V.jsx)(vk, {
- label: "番号",
- placeholder: "可不填",
- autoComplete: "off",
- maxLength: 60,
- value: c,
- onChange: l
- })
- ] }),
- f ? /* @__PURE__ */ (0, V.jsx)(Mk, {
- divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Wce, { result: f })
- }) : null,
- m.error ? /* @__PURE__ */ (0, V.jsx)(Mk, {
- divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Fk, { children: m.error })
- }) : null,
- /* @__PURE__ */ (0, V.jsx)(Nk, {
- status: i === "115" ? "115 每提交一次扣一条离线配额,重新提交也算。" : void 0,
- children: /* @__PURE__ */ (0, V.jsx)(J, {
- type: "submit",
- disabled: !o.trim(),
- ...X(m.busy === "submit"),
- children: "提交离线下载"
- })
- })
- ] })
- });
-}
-function Wce({ result: e }) {
- let t = $k(e.task), n = Bce[e.outcome];
- return e.outcome === "failed" ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: t ? `${n}${t}` : n }) : e.outcome === "refused" ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: n }) : /* @__PURE__ */ (0, V.jsx)(Pk, {
- role: "status",
- children: n
- });
-}
-function Gce({ task: e, writable: t }) {
- let n = lS(), r = AE(), [i, a] = (0, B.useState)(!1), o = $k(e), s = e.state === "failed", c = [
- e.provider_label,
- e.code,
- e.target,
- Yk(e.submitted_at)
- ].filter(Boolean).join(" · "), l = () => {
- n.invalidateQueries({ queryKey: Qk });
- }, u = () => {
- r.run("cancel", (t) => K(Lce, { id: e.id }, "POST", t), l);
- }, d = () => {
- let t = {
- magnet: e.source_uri,
- provider: e.provider,
- target: e.target,
- code: e.code,
- title: e.title,
- origin: e.origin
- };
- r.run("resubmit", (e) => K(Zk, t, "POST", e), l);
- }, f = () => {
- navigator.clipboard.writeText(e.source_uri).then(() => a(!0), () => a(!1));
- };
- return /* @__PURE__ */ (0, V.jsxs)("li", {
- "data-download-state": e.state,
- "data-download-id": e.id,
- className: wE({
- padding: "none",
- bordered: "line",
- className: s ? "flex flex-col border-border-error-default" : "flex flex-col"
- }),
- children: [/* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-col gap-1.5 px-5 pt-5 pb-4",
- children: [
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)("strong", {
- className: "min-w-0 break-words text-title-1-medium text-text-primary",
- children: Vce(e)
- }), /* @__PURE__ */ (0, V.jsx)(xE, {
- color: zce[e.state] ?? "neutral",
- children: e.state_label
- })]
- }),
- /* @__PURE__ */ (0, V.jsx)("p", {
- className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
- children: c
- }),
- e.state === "remote_running" && e.progress != null ? /* @__PURE__ */ (0, V.jsx)(kE, {
- label: "远端下载进度",
- value: Math.round(e.progress * 100),
- max: 100
- }) : null,
- e.ledger_path ? /* @__PURE__ */ (0, V.jsx)("p", {
- className: "min-w-0 break-all text-caption-1-regular text-text-secondary",
- children: e.ledger_path
- }) : null,
- r.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: r.error }) : null,
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-wrap items-center gap-2 pt-1",
- children: [
- t && e.cancellable ? /* @__PURE__ */ (0, V.jsx)(J, {
- variant: "secondary",
- size: "small",
- ...X(r.busy === "cancel"),
- onClick: u,
- children: "取消"
- }) : null,
- t && e.resubmittable ? /* @__PURE__ */ (0, V.jsx)(J, {
- variant: "secondary",
- size: "small",
- ...X(r.busy === "resubmit"),
- onClick: d,
- children: "重新提交"
- }) : null,
- /* @__PURE__ */ (0, V.jsx)(J, {
- variant: "ghost",
- size: "small",
- onClick: f,
- children: i ? "已复制磁力" : "复制磁力"
- })
- ]
- })
- ]
- }), o ? /* @__PURE__ */ (0, V.jsx)("div", {
- className: "flex min-h-14 flex-col justify-center rounded-b-2xl border-t border-separator-border bg-card-footer px-5 py-3",
- children: /* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-caption-1-regular text-text-secondary",
- children: o
- })
- }) : null]
- });
-}
-//#endregion
-//#region src/react/activity/activity-page.tsx
-var Kce = {
- succeeded: "lime",
- failed: "rose",
- cancelled: "yellow",
- interrupted: "yellow"
-};
-function eA({ status: e }) {
- return /* @__PURE__ */ (0, V.jsx)(xE, {
- color: Kce[e] ?? "neutral",
- children: Dce(e)
- });
-}
-function qce({ rows: e }) {
- return /* @__PURE__ */ (0, V.jsx)("ul", {
- className: "flex min-w-0 flex-col",
- children: e.map((e) => {
- let t = Mce(e);
- return /* @__PURE__ */ (0, V.jsxs)("li", {
- "data-status": e.status,
- "data-followup-key": e.followup_key,
- className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-t border-separator-border px-5 py-2.5",
- children: [
- /* @__PURE__ */ (0, V.jsx)("span", {
- className: "min-w-0 break-words text-caption-1-regular text-text-primary",
- children: e.task_label
- }),
- /* @__PURE__ */ (0, V.jsx)(eA, { status: e.status }),
- t ? /* @__PURE__ */ (0, V.jsx)("span", {
- className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
- children: t
- }) : null
- ]
- }, e.id);
- })
- });
-}
-function tA({ run: e, meta: t, children: n, footer: r, followups: i }) {
- return /* @__PURE__ */ (0, V.jsxs)("li", {
- "data-status": e.status,
- "data-task-key": e.task_key,
- "data-run-id": e.id,
- className: wE({
- padding: "none",
- bordered: "line",
- className: e.status === "failed" ? "flex flex-col border-border-error-default" : "flex flex-col"
- }),
- children: [
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-col gap-1.5 px-5 pt-5 pb-4",
- children: [
- /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)("strong", {
- className: "min-w-0 break-words text-title-1-medium text-text-primary",
- children: e.task_label
- }), /* @__PURE__ */ (0, V.jsx)(eA, { status: e.status })]
- }),
- /* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-caption-1-regular text-text-secondary",
- children: t
- }),
- n
- ]
- }),
- i?.length ? /* @__PURE__ */ (0, V.jsx)(qce, { rows: i }) : null,
- r ? /* @__PURE__ */ (0, V.jsx)("div", {
- className: "flex min-h-14 flex-col justify-center rounded-b-2xl border-t border-separator-border bg-card-footer px-5 py-3",
- children: /* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-caption-1-regular text-text-secondary",
- children: r
- })
- }) : null
- ]
- });
-}
-function Jce({ run: e, followups: t }) {
- let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = Jk(e.elapsed_seconds), o = [Kk[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
- return /* @__PURE__ */ (0, V.jsx)(tA, {
- run: e,
- meta: o,
- followups: t,
- children: n > 0 ? /* @__PURE__ */ (0, V.jsxs)("div", {
- className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, V.jsx)(kE, {
- label: i,
- value: r,
- max: n
- }), /* @__PURE__ */ (0, V.jsxs)("p", {
- className: "text-caption-1-regular text-text-secondary",
- children: [
- i,
- " · ",
- r,
- " / ",
- n,
- " 项"
- ]
- })]
- }) : /* @__PURE__ */ (0, V.jsx)(EE, { label: i })
+ o && E.current;
+ }, []);
+ let D = o && o.isDragging(n.key), { children: O, ...k } = e, A = e.hasChildItems || i.collection.getItem(n.lastChildKey)?.type !== "cell", j = A && i.expandedKeys.has(n.key), M = vD({
+ ...k,
+ id: void 0,
+ defaultClassName: "react-aria-Row",
+ defaultStyle: { "--table-row-level": n.level + 1 },
+ values: {
+ ...p,
+ state: i,
+ isHovered: b,
+ isFocused: m,
+ isFocusVisible: h,
+ selectionMode: i.selectionManager.selectionMode,
+ selectionBehavior: i.selectionManager.selectionBehavior,
+ isDragging: D,
+ isDropTarget: C?.isDropTarget,
+ isFocusVisibleWithin: _,
+ id: n.key,
+ hasChildItems: A,
+ isExpanded: j,
+ level: n.level + 1
+ }
+ }), N = Eg(e, { global: !0 });
+ return delete N.id, delete N.onClick, /*#__PURE__*/ B.createElement(B.Fragment, null, C && !C.isHidden && /*#__PURE__*/ B.createElement(Vk, {
+ role: "row",
+ style: { height: 0 }
+ }, /*#__PURE__*/ B.createElement(Uk, {
+ role: "gridcell",
+ colSpan: i.collection.columnCount,
+ style: { padding: 0 }
+ }, /*#__PURE__*/ B.createElement("div", {
+ role: "button",
+ ...T,
+ ...C.dropIndicatorProps,
+ ref: w
+ }))), /*#__PURE__*/ B.createElement(Vk, {
+ ...U(N, M, d, g, y, S?.dragProps, v),
+ ref: r,
+ "data-disabled": p.isDisabled || void 0,
+ "data-selected": p.isSelected || void 0,
+ "data-hovered": b || void 0,
+ "data-focused": p.isFocused || void 0,
+ "data-focus-visible": h || void 0,
+ "data-pressed": p.isPressed || void 0,
+ "data-dragging": D || void 0,
+ "data-drop-target": C?.isDropTarget || void 0,
+ "data-selection-mode": i.selectionManager.selectionMode === "none" ? void 0 : i.selectionManager.selectionMode,
+ "data-focus-visible-within": _ || void 0,
+ "data-expanded": j || void 0,
+ "data-has-child-items": A || void 0,
+ "data-level": n.level + 1
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [BD, { slots: {
+ [gD]: {},
+ selection: x
+ } }],
+ [VD, { slots: {
+ [gD]: {},
+ selection: x
+ } }],
+ [ND, { slots: {
+ [gD]: {},
+ chevron: f,
+ drag: {
+ ...S?.dragButtonProps,
+ ref: E,
+ style: { pointerEvents: "none" }
+ }
+ } }],
+ [MO, { isSelected: p.isSelected }],
+ [Bk, { isFocusVisibleWithinRow: _ }]
+ ] }, /*#__PURE__*/ B.createElement(l, {
+ collection: i.collection,
+ parent: n
+ }))));
+}, (e) => {
+ if (e.id == null && typeof e.children == "function") throw Error("No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.");
+ let t = [e.value].concat(e.dependencies);
+ return /*#__PURE__*/ B.createElement(ag, {
+ dependencies: t,
+ items: e.columns,
+ idScope: e.id
+ }, e.children);
+}), Ece = class extends tp {
+ static {
+ this.type = "cell";
+ }
+}, Uk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.td, {
+ ...e,
+ ref: t
});
-}
-function nA({ run: e, followups: t, runs: n }) {
- let r = Xk(e.result_summary), i = Jk(e.elapsed_seconds), a = n && n.length > 1 ? n[n.length - 1] : void 0, o = (a ? [
- Kk[e.trigger] || e.trigger,
- `近 ${n.length} 轮`,
- `${Yk(a.finished_at)} – ${Yk(e.finished_at)}`
- ] : [
- Kk[e.trigger] || e.trigger,
- Yk(e.finished_at),
- i && `用时 ${i}`
- ]).filter(Boolean).join(" · ");
- return /* @__PURE__ */ (0, V.jsx)(tA, {
- run: e,
- meta: o,
- footer: e.error,
- followups: t,
- children: r ? /* @__PURE__ */ (0, V.jsx)("p", {
- className: "text-caption-1-regular text-text-secondary",
- children: r
- }) : null
+}), Wk = /*#__PURE__*/ tg(Ece, (e, t, n) => {
+ let r = Nh(t), i = (0, B.useContext)(Mk), { dragState: a } = (0, B.useContext)(EO), { isVirtualized: o } = (0, B.useContext)(AD);
+ n.column = i.collection.columns[n.index];
+ let { gridCellProps: s, isPressed: c } = sne({
+ node: n,
+ shouldSelectOnPressUp: !!a,
+ isVirtualized: o,
+ focusMode: e.focusMode,
+ allowsArrowNavigation: e.allowsArrowNavigation
+ }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = iy(), { hoverProps: f, isHovered: p } = cy({}), { isFocusVisibleWithinRow: m } = (0, B.useContext)(Bk), h = n.parentKey != null && i.selectionManager.isSelected(n.parentKey), g = n.colIndex || n.index, _ = i.collection.getItem(n.parentKey), v = _.props.hasChildItems || i.collection.getItem(_.lastChildKey)?.type !== "cell", y = v && i.expandedKeys.has(n.parentKey), b = i.selectionManager.isDisabled(n.parentKey), x = vD({
+ ...e,
+ id: void 0,
+ defaultClassName: "react-aria-Cell",
+ values: {
+ isFocused: l,
+ isFocusVisible: u,
+ isFocusVisibleWithinRow: m,
+ isPressed: c,
+ isHovered: p,
+ isSelected: h,
+ id: n.key,
+ columnIndex: g,
+ hasChildItems: v,
+ isExpanded: y,
+ isDisabled: b,
+ level: _.level + 1,
+ isTreeColumn: n.column.key === i.treeColumn
+ }
+ }), S = Eg(e, { global: !0 });
+ return delete S.id, /*#__PURE__*/ B.createElement(Uk, {
+ ...U(S, x, s, d, f),
+ ref: r,
+ "data-focused": l || void 0,
+ "data-focus-visible": u || void 0,
+ "data-focus-visible-within-row": m || void 0,
+ "data-pressed": c || void 0,
+ "data-selected": h || void 0,
+ "data-column-index": g,
+ "data-expanded": y || void 0,
+ "data-has-child-items": v || void 0,
+ "data-level": _.level + 1,
+ "data-tree-column": n.column.key === i.treeColumn || void 0,
+ "data-disabled": b || void 0
+ }, /*#__PURE__*/ B.createElement(AD.Provider, { value: OD }, x.children));
+});
+function Dce(e, t) {
+ t = Nh(t);
+ let { dragAndDropHooks: n, dropState: r } = (0, B.useContext)(EO), i = (0, B.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
+ if (o) return null;
+ let c = r && e.target.type === "item" ? (r.collection.getItem(e.target.key)?.level || 0) + 1 : 1;
+ return /*#__PURE__*/ B.createElement(jce, {
+ ...e,
+ dropIndicatorProps: a,
+ isDropTarget: s,
+ buttonRef: i,
+ level: c,
+ ref: t
});
}
-function rA({ title: e, children: t }) {
- let n = (0, B.useId)();
- return /* @__PURE__ */ (0, V.jsxs)("section", {
- "aria-labelledby": n,
- className: "flex min-w-0 flex-col gap-3",
- children: [/* @__PURE__ */ (0, V.jsx)("h3", {
- id: n,
- className: "text-title-2-semibold text-text-primary",
- children: e
- }), t]
+var Oce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.tr, {
+ ...e,
+ ref: t
});
-}
-function iA({ live: e = !1, children: t }) {
- return /* @__PURE__ */ (0, V.jsx)("ul", {
- "aria-live": e ? "polite" : void 0,
- className: "flex min-w-0 flex-col gap-3",
- children: t
+}), kce = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, B.useContext)(AD);
+ return n ? /*#__PURE__*/ B.createElement(wD.div, {
+ ...e,
+ ref: t
+ }) : /*#__PURE__*/ B.createElement(wD.td, {
+ ...e,
+ ref: t
});
-}
-function Yce({ prefill: e }) {
- let t = TS({
- queryKey: Uk,
- queryFn: ({ signal: e }) => Gk(e),
- refetchInterval: (e) => wce(e.state.data)
- }), n = t.data, r = n?.finished, [i, a] = (0, B.useState)([]), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)(r);
- r !== c && (l(r), i.length && c && a(Wk(i, c)));
- let u = OS({
- mutationFn: ({ oldest: e }) => xce(e),
- onSuccess: (e, { shown: t }) => {
- a((n) => Wk(n, t, e.finished || [])), s(!!e.finished_has_more);
- }
- }), d = t.error ? W(t.error) : "";
- if (!n) return /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "error",
- children: d || "读取任务中心失败"
- }) });
- let f = Wk(n.finished || [], i), p = [
- ...n.running || [],
- ...n.skipped || [],
- ...f
- ], m = kce(p), h = new Set(p.map((e) => e.id)), g = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && h.has(e.parent_run_id))), _ = g(f), v = _[_.length - 1], y = !!v && (i.length ? o : !!n.finished_has_more), b = () => {
- !u.isPending && v && u.mutate({
- oldest: v,
- shown: f
- });
- }, x = _.filter((e) => m.get(e.id)?.some(qk)), S = g(n.running || []), C = g(n.skipped || []), w = _.filter((e) => !x.includes(e) && !C.some((t) => t.id === e.id)), T = Ace(w, (e) => jce(e) && !m.get(e.id)?.length), E = !S.length && !x.length && !C.length && !w.length;
- return /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
- d ? /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "error",
- children: d
- }) : null,
- n.available === !1 ? /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "warning",
- children: n.message || "账本上还没有任务中心的表"
- }) : null,
- E ? /* @__PURE__ */ (0, V.jsx)(TE, {
- shell: "plain",
- icon: xT,
- title: "还没有任务记录",
- children: "扫描、追更检查、批量操作和命令行批处理跑起来之后,这里会显示它们的进度与结果。"
- }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- /* @__PURE__ */ (0, V.jsx)(rA, {
- title: "正在进行",
- children: S.length || x.length ? /* @__PURE__ */ (0, V.jsxs)(iA, {
- live: !0,
- children: [S.map((e) => /* @__PURE__ */ (0, V.jsx)(Jce, {
- run: e,
- followups: m.get(e.id)
- }, e.id)), x.map((e) => /* @__PURE__ */ (0, V.jsx)(nA, {
- run: e,
- followups: m.get(e.id)
- }, e.id))]
- }) : /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "neutral",
- children: "没有任务在跑。"
- })
- }),
- C.length ? /* @__PURE__ */ (0, V.jsx)(rA, {
- title: "被挡下的",
- children: /* @__PURE__ */ (0, V.jsx)(iA, { children: C.map((e) => /* @__PURE__ */ (0, V.jsx)(nA, {
- run: e,
- followups: m.get(e.id)
- }, e.id)) })
- }) : null,
- w.length || y ? /* @__PURE__ */ (0, V.jsxs)(rA, {
- title: "最近完成",
- children: [
- w.length ? /* @__PURE__ */ (0, V.jsx)(iA, { children: T.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, V.jsx)(nA, {
- run: e,
- runs: t,
- followups: m.get(e.id)
- }, e.id)) }) : null,
- u.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
- tone: "error",
- children: W(u.error)
- }) : null,
- y ? /* @__PURE__ */ (0, V.jsx)(J, {
- variant: "secondary",
- size: "small",
- leadingIcon: cT,
- className: "self-start",
- ...X(u.isPending),
- onClick: b,
- children: "加载更早"
- }) : null
- ]
- }) : null
- ] }),
- /* @__PURE__ */ (0, V.jsx)(rA, {
- title: "云下载",
- children: /* @__PURE__ */ (0, V.jsx)(Hce, { prefill: e })
- })
- ] });
-}
-//#endregion
-//#region src/react/components/use-stuck.ts
-function aA(e) {
- (0, B.useEffect)(() => {
- let t = e.current;
- if (!t) return;
- let n = 0, r = () => {
- n = 0;
- let e = parseFloat(getComputedStyle(t).top), r = window.scrollY > 0 && Number.isFinite(e) && t.getBoundingClientRect().top <= e + 1;
- t.toggleAttribute("data-stuck", r);
- }, i = () => {
- n ||= requestAnimationFrame(r);
- };
- return r(), addEventListener("scroll", i, { passive: !0 }), addEventListener("resize", i), () => {
- cancelAnimationFrame(n), removeEventListener("scroll", i), removeEventListener("resize", i);
- };
- }, [e]);
-}
-//#endregion
-//#region src/react/components/filter-glass.tsx
-function Xce({ title: e, children: t }) {
- let n = (0, B.useRef)(null);
- return aA(n), /* @__PURE__ */ (0, V.jsxs)("div", {
- ref: n,
- role: "group",
- "aria-label": e,
- "data-filter-glass": !0,
- "data-glass-pane": "",
- className: "sticky top-topbar z-10 mb-5.5 flex flex-wrap items-center gap-x-2.5 gap-y-2 px-4 py-2.5",
- children: [/* @__PURE__ */ (0, V.jsx)("h3", {
- className: "mr-1 text-body-medium",
- children: e
- }), t]
+});
+function Ace(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, B.useContext)(Mk), { visuallyHiddenProps: c } = V_(), l = vD({
+ ...o,
+ defaultClassName: "react-aria-DropIndicator",
+ defaultStyle: { "--table-row-level": a + 1 },
+ values: { isDropTarget: r }
});
-}
-function oA({ label: e, topLabel: t, top: n, bottom: r, className: i, topClassName: a, bottomClassName: o, panes: s, attrs: c, busy: l, bottomRef: u }) {
- let d = (0, B.useRef)(null);
- return aA(d), /* @__PURE__ */ (0, V.jsxs)("div", {
- ref: d,
- role: "group",
- "aria-label": e,
- "data-filter-glass": !0,
- "data-glass-pane": "",
+ return /*#__PURE__*/ B.createElement(Oce, {
+ ...Eg(e, { global: !0 }),
+ ...l,
+ role: "row",
+ ref: t,
+ "data-drop-target": r || void 0,
+ "aria-level": a
+ }, /*#__PURE__*/ B.createElement(kce, {
+ role: "gridcell",
+ colSpan: s.collection.columnCount,
+ style: { padding: 0 }
+ }, /*#__PURE__*/ B.createElement("div", {
...c,
- className: vE("sticky top-topbar z-10 mb-5.5 flex flex-col", i),
- children: [
- s,
- /* @__PURE__ */ (0, V.jsx)("div", {
- role: "group",
- "aria-label": t,
- "data-filter-row": "top",
- className: vE("flex h-12 min-w-0 items-center gap-1.75 overflow-x-auto overscroll-x-contain px-3 py-2", a),
- children: n
- }),
- /* @__PURE__ */ (0, V.jsx)("div", {
- ref: u,
- "data-filter-row": "bottom",
- "aria-busy": l || void 0,
- className: vE("flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2", o),
- children: r
- })
- ]
- });
+ role: "button",
+ ...n,
+ ref: i
+ }), l.children));
}
-var Zce = "flex h-7.5 flex-none cursor-pointer items-center gap-1.75 rounded-lg border border-dashed border-(--glass-low) bg-transparent px-2.5 text-body-2-regular leading-5 whitespace-nowrap text-inherit outline-none hover:border-solid focus-visible:ring-2 focus-visible:ring-border-focus-ring";
-function sA({ children: e, pressed: t, onPress: n, className: r, ...i }) {
- return /* @__PURE__ */ (0, V.jsx)("button", {
- type: "button",
+var jce = /*#__PURE__*/ (0, B.forwardRef)(Ace);
+function Mce() {
+ let e = (0, B.useContext)(Mk), { dragAndDropHooks: t, dropState: n } = (0, B.useContext)(EO), r = (0, B.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = V_();
+ return !a && i["aria-hidden"] ? null : /*#__PURE__*/ B.createElement(Vk, {
+ role: "row",
+ "aria-hidden": i["aria-hidden"],
+ style: { height: 0 }
+ }, /*#__PURE__*/ B.createElement(Uk, {
+ role: "gridcell",
+ colSpan: e.collection.columnCount,
+ style: { padding: 0 }
+ }, /*#__PURE__*/ B.createElement("div", {
+ role: "button",
+ ...o,
...i,
- "aria-pressed": t,
- className: vE(Zce, r),
- onClick: n,
- children: e
- });
-}
-var Qce = "h-7.5 cursor-pointer rounded-full border border-(--glass-low) bg-transparent px-3 text-body-2-regular leading-none whitespace-nowrap text-inherit outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-busy:cursor-wait aria-busy:opacity-55";
-function cA({ children: e, onPress: t, busy: n = !1 }) {
- return /* @__PURE__ */ (0, V.jsx)("button", {
- type: "button",
- "data-glass-pill": "",
- className: Qce,
- "aria-busy": n || void 0,
- "aria-disabled": n || void 0,
- onClick: () => {
- n || t();
- },
- children: e
- });
+ ref: r
+ })));
}
-//#endregion
-//#region src/react/components/use-view-glide.ts
-function $ce(e, t, n) {
- if (!t.contains(e)) return null;
- let r = 0, i = 0;
- for (let n = e; n && n !== t; n = n.offsetParent) r += n.offsetLeft, i += n.offsetTop;
- let a = e.getBoundingClientRect();
- for (let o = e.parentElement; o && o !== t; o = o.parentElement) {
- r -= o.scrollLeft, i -= o.scrollTop;
- let e = () => o.getBoundingClientRect();
- if (n === "x" && o.scrollWidth > o.clientWidth && getComputedStyle(o).overflowX !== "visible") {
- let t = e();
- if (a.right <= t.left || a.left >= t.right) return null;
+tg(rp, function(e, t, n) {
+ let r = (0, B.useContext)(Mk), { isVirtualized: i } = (0, B.useContext)(AD), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, B.useRef)(null);
+ GO((0, B.useMemo)(() => ({
+ onLoadMore: o,
+ collection: r?.collection,
+ sentinelRef: u,
+ scrollOffset: s
+ }), [
+ o,
+ s,
+ r?.collection
+ ]), u);
+ let d = vD({
+ ...c,
+ id: void 0,
+ children: n.rendered,
+ defaultClassName: "react-aria-TableLoadingIndicator",
+ defaultStyle: { "--table-row-level": n.level + 1 },
+ values: void 0
+ }), f = {}, p = {}, m = {};
+ return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(Vk, {
+ style: { height: 0 },
+ inert: PO(!0)
+ }, /*#__PURE__*/ B.createElement(Uk, { style: {
+ padding: 0,
+ border: 0
+ } }, /*#__PURE__*/ B.createElement("div", {
+ "data-testid": "loadMoreSentinel",
+ ref: u,
+ style: {
+ position: "relative",
+ height: 1,
+ width: 1
}
- if (n === "y" && o.scrollHeight > o.clientHeight && getComputedStyle(o).overflowY !== "visible") {
- let t = e();
- if (a.bottom <= t.top || a.top >= t.bottom) return null;
+ }))), a && d.children && /*#__PURE__*/ B.createElement(Vk, {
+ ...U(Eg(e, { global: !0 }), f),
+ ...d,
+ role: "row",
+ ref: t,
+ "aria-level": n.level + 1,
+ "data-level": n.level + 1
+ }, /*#__PURE__*/ B.createElement(Uk, {
+ role: "rowheader",
+ ...p,
+ style: m
+ }, d.children)));
+});
+//#endregion
+//#region node_modules/react-stately/dist/private/list/useSingleSelectListState.mjs
+function Nce(e) {
+ let [t, n] = L_(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, B.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = UO({
+ ...e,
+ selectionMode: "single",
+ disallowEmptySelection: !0,
+ allowDuplicateSelectionEvents: !0,
+ selectedKeys: r,
+ onSelectionChange: (r) => {
+ if (r === "all") return;
+ let i = r.values().next().value ?? null;
+ i === t && e.onSelectionChange && e.onSelectionChange(i), n(i);
}
- }
+ });
return {
- x: r,
- y: i,
- w: e.offsetWidth,
- h: e.offsetHeight
+ collection: i,
+ disabledKeys: a,
+ selectionManager: o,
+ selectedKey: t,
+ setSelectedKey: n,
+ selectedItem: t == null ? null : i.getItem(t)
};
}
-function lA(e, t, n, r, { axis: i = "x" } = {}) {
- let a = (0, B.useRef)(null), o = (0, B.useCallback)((r, o) => {
- let s = e.current, c = t.current, l = s?.parentElement;
- if (!s) return;
- let u = c && c.offsetWidth ? r ?? c.querySelector(n) : null, d = u && l ? $ce(u, l, i) : null;
- if (!d || !d.w) {
- s.hidden = !0;
- return;
- }
- let f = s.hidden ? null : a.current;
- s.hidden = !1, a.current = d, Fe(s, o ? f : null, d, i);
- }, [
- e,
- t,
- n,
- i
- ]), s = (0, B.useRef)(!1);
- return (0, B.useLayoutEffect)(() => {
- let t = e.current;
- t && !s.current && (t.hidden = !0), o(null, s.current), s.current = !0;
- }, [o, r]), (0, B.useEffect)(() => {
- let t = e.current?.parentElement, n = 0, r = () => {
- n ||= requestAnimationFrame(() => {
- n = 0, o(null, !1);
- });
- };
- return t?.addEventListener("scroll", r, {
- capture: !0,
- passive: !0
- }), addEventListener("resize", r, { passive: !0 }), () => {
- cancelAnimationFrame(n), t?.removeEventListener("scroll", r, { capture: !0 }), removeEventListener("resize", r);
- };
- }, [e, o]), {
- hover: (0, B.useCallback)((e) => {
- e.pointerType !== "touch" && o(e.currentTarget, !0);
- }, [o]),
- leave: (0, B.useCallback)((e) => {
- e.pointerType !== "touch" && o(null, !0);
- }, [o]),
- sync: (0, B.useCallback)(() => {
- e.current?.getAnimations().forEach((e) => e.cancel()), o(null, !1);
- }, [e, o])
+//#endregion
+//#region node_modules/react-stately/dist/private/tabs/useTabListState.mjs
+function Pce(e) {
+ let t = Nce({
+ ...e,
+ onSelectionChange: e.onSelectionChange ? (t) => {
+ t != null && e.onSelectionChange?.(t);
+ } : void 0,
+ suppressTextValueWarning: !0,
+ defaultSelectedKey: e.defaultSelectedKey ?? Gk(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
+ }), { selectionManager: n, collection: r, selectedKey: i } = t, a = (0, B.useRef)(i);
+ return (0, B.useEffect)(() => {
+ let o = i;
+ e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = Gk(r, t.disabledKeys), o != null && n.setSelectedKeys([o])), (o != null && n.focusedKey == null || !n.isFocused && o !== a.current) && n.setFocusedKey(o), a.current = o;
+ }), {
+ ...t,
+ isDisabled: e.isDisabled || !1
};
}
+function Gk(e, t) {
+ let n = null;
+ if (e) {
+ for (n = e.getFirstKey(); n != null && (t.has(n) || e.getItem(n)?.props?.isDisabled) && n !== e.getLastKey();) n = e.getKeyAfter(n);
+ n != null && (t.has(n) || e.getItem(n)?.props?.isDisabled) && n === e.getLastKey() && (n = e.getFirstKey());
+ }
+ return n;
+}
+//#endregion
+//#region node_modules/react-aria-components/dist/private/Tabs.mjs
+var Kk = /*#__PURE__*/ (0, B.createContext)(null), qk = /*#__PURE__*/ (0, B.createContext)(null), Jk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = bD(e, t, Kk);
+ let { children: n, orientation: r = "horizontal" } = e;
+ return n = (0, B.useMemo)(() => typeof n == "function" ? n({
+ orientation: r,
+ defaultChildren: null
+ }) : n, [n, r]), /*#__PURE__*/ B.createElement(qh, { content: n }, (n) => /*#__PURE__*/ B.createElement(Fce, {
+ props: e,
+ collection: n,
+ tabsRef: t
+ }));
+});
+function Fce({ props: e, tabsRef: t, collection: n }) {
+ let { orientation: r = "horizontal" } = e, i = Pce({
+ ...e,
+ collection: n,
+ children: void 0
+ }), { focusProps: a, isFocused: o, isFocusVisible: s } = iy({ within: !0 }), c = (0, B.useMemo)(() => ({
+ orientation: r,
+ isFocusWithin: o,
+ isFocusVisible: s
+ }), [
+ r,
+ o,
+ s
+ ]), l = vD({
+ ...e,
+ defaultClassName: "react-aria-Tabs",
+ values: c
+ }), u = Eg(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(u, l, a),
+ ref: t,
+ slot: e.slot || void 0,
+ "data-focused": o || void 0,
+ "data-orientation": r,
+ "data-focus-visible": s || void 0,
+ "data-disabled": i.isDisabled || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [[Kk, e], [qk, i]] }, l.children));
+}
+var Yk = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ return (0, B.useContext)(qk) ? /*#__PURE__*/ B.createElement(Ice, {
+ props: e,
+ forwardedRef: t
+ }) : /*#__PURE__*/ B.createElement(ag, e);
+});
+function Ice({ props: e, forwardedRef: t }) {
+ let n = (0, B.useContext)(qk), { CollectionRoot: r } = (0, B.useContext)(AD), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = yD(Kk), o = Nh(t), { tabListProps: s } = bne({
+ ...e,
+ orientation: i,
+ keyboardActivation: a
+ }, n, o), c = vD({
+ ...e,
+ children: null,
+ defaultClassName: "react-aria-TabList",
+ values: {
+ orientation: i,
+ state: n
+ }
+ }), l = Eg(e, { global: !0 });
+ return delete l.id, /*#__PURE__*/ B.createElement(wD.div, {
+ ...U(l, c, s),
+ ref: o,
+ "data-orientation": i || void 0
+ }, /*#__PURE__*/ B.createElement(jO, null, /*#__PURE__*/ B.createElement(r, {
+ collection: n.collection,
+ persistedKeys: jD(n.selectionManager.focusedKey)
+ })));
+}
+var Xk = /*#__PURE__*/ tg(class extends tp {
+ static {
+ this.type = "item";
+ }
+}, (e, t, n) => {
+ let r = (0, B.useContext)(qk), i = Nh(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = vne({
+ key: n.key,
+ ...e
+ }, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = iy(), { hoverProps: f, isHovered: p } = cy({
+ isDisabled: s,
+ onHoverStart: e.onHoverStart,
+ onHoverEnd: e.onHoverEnd,
+ onHoverChange: e.onHoverChange
+ }), m = vD({
+ ...e,
+ id: void 0,
+ children: n.rendered,
+ defaultClassName: "react-aria-Tab",
+ values: {
+ isSelected: o,
+ isDisabled: s,
+ isFocused: u,
+ isFocusVisible: d,
+ isPressed: c,
+ isHovered: p
+ }
+ }), h = n.props.href ? wD.a : wD.div, g = Eg(e, { global: !0 });
+ return delete g.id, delete g.onClick, /*#__PURE__*/ B.createElement(h, {
+ ...U(g, m, a, l, f),
+ ref: i,
+ "data-selected": o || void 0,
+ "data-disabled": s || void 0,
+ "data-focused": u || void 0,
+ "data-focus-visible": d || void 0,
+ "data-pressed": c || void 0,
+ "data-hovered": p || void 0
+ }, /*#__PURE__*/ B.createElement(MO.Provider, { value: { isSelected: o } }, m.children));
+}), Zk = /*#__PURE__*/ Bh(function(e, t) {
+ let n = (0, B.useContext)(qk), r = Nh(t), i = n.selectedKey === e.id, [a, o] = (0, B.useState)(n.selectedKey == null ? null : i);
+ a == null && n.selectedKey != null ? o(i) : !i && a && o(!1);
+ let s = ZO(r, i);
+ return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ B.createElement(Lce, {
+ ...e,
+ tabPanelRef: r,
+ isInitiallySelected: a || !1,
+ isExiting: s
+ });
+});
+function Lce(e) {
+ let t = (0, B.useContext)(qk), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = xne(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = iy(), d = t.selectedKey === e.id, f = XO(r) && !i, p = vD({
+ ...e,
+ defaultClassName: "react-aria-TabPanel",
+ values: {
+ isFocused: l,
+ isFocusVisible: u,
+ isInert: PO(!d),
+ isEntering: f,
+ isExiting: a,
+ state: t
+ }
+ }), m = Eg(o, { global: !0 });
+ delete m.id;
+ let h = d ? U(m, s, c, p) : U(m, p);
+ return /*#__PURE__*/ B.createElement(wD.div, {
+ ...h,
+ ref: r,
+ "data-focused": l || void 0,
+ "data-focus-visible": u || void 0,
+ inert: PO(!d || e.inert),
+ "data-inert": d ? void 0 : "true",
+ "data-entering": f || void 0,
+ "data-exiting": a || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [[Kk, null], [qk, null]] }, /*#__PURE__*/ B.createElement(AD.Provider, { value: OD }, p.children)));
+}
//#endregion
-//#region src/react/components/use-moving-surface.ts
-var ele = {
+//#region node_modules/react-aria-components/dist/private/TextArea.mjs
+var Rce = /*#__PURE__*/ (0, B.createContext)({}), zce = /*#__PURE__*/ (0, B.createContext)(null), Bce = /*#__PURE__*/ Bh(function(e, t) {
+ [e, t] = bD(e, t, zce);
+ let { validationBehavior: n } = yD(zD) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, B.useRef)(null);
+ [e, i] = bD(e, i, ED);
+ let [a, o] = xD(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, B.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = ete({
+ ...SD(e),
+ inputElementType: s,
+ label: o,
+ validationBehavior: r
+ }, i), m = (0, B.useCallback)((e) => {
+ i.current = e, e && c(e instanceof HTMLTextAreaElement ? "textarea" : "input");
+ }, [i]), h = vD({
+ ...e,
+ values: {
+ isDisabled: e.isDisabled || !1,
+ isInvalid: p.isInvalid,
+ isReadOnly: e.isReadOnly || !1,
+ isRequired: e.isRequired || !1
+ },
+ defaultClassName: "react-aria-TextField"
+ }), g = Eg(e, { global: !0 });
+ return delete g.id, /*#__PURE__*/ B.createElement(wD.div, {
+ ...g,
+ ...h,
+ ref: t,
+ slot: e.slot || void 0,
+ "data-disabled": e.isDisabled || void 0,
+ "data-invalid": p.isInvalid || void 0,
+ "data-readonly": e.isReadOnly || void 0,
+ "data-required": e.isRequired || void 0
+ }, /*#__PURE__*/ B.createElement(_D, { values: [
+ [MD, {
+ ...l,
+ ref: a
+ }],
+ [WD, {
+ ...u,
+ ref: m
+ }],
+ [Rce, {
+ ...u,
+ ref: m
+ }],
+ [UD, {
+ role: "presentation",
+ isInvalid: p.isInvalid,
+ isDisabled: e.isDisabled || !1
+ }],
+ [LD, { slots: {
+ description: d,
+ errorMessage: f
+ } }],
+ [RD, p]
+ ] }, h.children));
+}), Vce = {
selection: {
type: ni,
duration: .16,
@@ -24804,7 +24307,7 @@ var ele = {
bounce: 0
}
};
-function uA(e) {
+function Qk(e) {
let [t, n] = (0, B.useState)(null);
return (0, B.useLayoutEffect)(() => {
if (!t) return;
@@ -24825,7 +24328,7 @@ function uA(e) {
let E = `translate(${b}px, ${x}px) scale(1, 1)`;
if (u && a && !r.matches && T && s !== h) {
let r = `translate(${(T.left - _.left) / v + t.scrollLeft - t.clientLeft}px, ${(T.top - _.top) / y + t.scrollTop - t.clientTop}px) scale(${T.width / v / S}, ${T.height / y / C})`;
- l = Qf(n, { transform: [r, E] }, ele[e]);
+ l = Qf(n, { transform: [r, E] }, Vce[e]);
} else n.style.transform = E;
s = h, c = w, t.dataset.surfaceReady = "";
}, m = (t) => {
@@ -24862,25 +24365,25 @@ function uA(e) {
}
//#endregion
//#region src/react/components/segmented.tsx
-function dA(e) {
- let t = uA("selection");
- return /* @__PURE__ */ (0, V.jsx)(uk, {
+function $k(e) {
+ let t = Qk("selection");
+ return /* @__PURE__ */ (0, V.jsx)(Yk, {
...e,
ref: t
});
}
-function fA(e) {
- let t = uA("selection");
- return /* @__PURE__ */ (0, V.jsx)(PO, {
+function eA(e) {
+ let t = Qk("selection");
+ return /* @__PURE__ */ (0, V.jsx)(yk, {
...e,
ref: t
});
}
-var pA = "inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto overscroll-x-contain rounded-2lg bg-background-tertiary-default p-1", mA = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", tle = "flex size-7 flex-none cursor-pointer items-center justify-center rounded-md text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", hA = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", gA = "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-lg text-(--glass-text)/62 outline-none transition-colors hover:text-(--glass-text) focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:text-(--glass-text)", nle = { "text-aa": 1.435 }, _A = /* @__PURE__ */ new Map();
-function vA(e) {
- let t = _A.get(e);
+var tA = "inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto overscroll-x-contain rounded-2lg bg-background-tertiary-default p-1", nA = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", Hce = "flex size-7 flex-none cursor-pointer items-center justify-center rounded-md text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", rA = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", iA = "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-lg text-(--glass-text)/62 outline-none transition-colors hover:text-(--glass-text) focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:text-(--glass-text)", Uce = { "text-aa": 1.435 }, aA = /* @__PURE__ */ new Map();
+function oA(e) {
+ let t = aA.get(e);
if (t) return t;
- let n = nle[e], r = n ? ({ className: t }) => /* @__PURE__ */ (0, V.jsx)("svg", {
+ let n = Uce[e], r = n ? ({ className: t }) => /* @__PURE__ */ (0, V.jsx)("svg", {
"aria-hidden": !0,
viewBox: `0 0 ${(24 * n).toFixed(2)} 24`,
className: `shrink-0 fill-current ${t ?? "h-4 w-auto"}`,
@@ -24894,23 +24397,23 @@ function vA(e) {
className: `shrink-0 stroke-current stroke-2 ${t ?? "size-4"}`,
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
- return r.displayName = `SpriteGlyph(${e})`, _A.set(e, r), r;
+ return r.displayName = `SpriteGlyph(${e})`, aA.set(e, r), r;
}
//#endregion
//#region src/react/entity-filter/entity-filter.ts
-var rle = (e) => e === "videos", yA = () => /* @__PURE__ */ (0, V.jsx)("span", {
+var Wce = (e) => e === "videos", sA = () => /* @__PURE__ */ (0, V.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
});
-function ile(e) {
- let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = rle(t), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), _ = lA(u, f, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${r}`), v = lA(d, p, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`);
+function Gce(e) {
+ let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = Wce(t), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), _ = hD(u, f, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${r}`), v = hD(d, p, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`);
return (0, B.useEffect)(() => {
c.wireDrag(h.current), c.wireScroller(m.current), c.wireDrag(g.current);
- }, [c]), /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(bA, {
+ }, [c]), /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(cA, {
items: o,
hidden: !l,
actions: s
- }), /* @__PURE__ */ (0, V.jsx)(oA, {
+ }), /* @__PURE__ */ (0, V.jsx)(fD, {
label: "筛选与排序",
topLabel: "媒体与标签",
attrs: {
@@ -24930,13 +24433,13 @@ function ile(e) {
"data-view-glide": "round",
"aria-hidden": "true"
})] }),
- top: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [n ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(ale, {
+ top: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [n ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(Kce, {
keys: n,
view: t,
row: p,
glide: v,
onView: s.setView
- }), l ? /* @__PURE__ */ (0, V.jsx)(yA, {}) : null] }) : null, /* @__PURE__ */ (0, V.jsxs)("div", {
+ }), l ? /* @__PURE__ */ (0, V.jsx)(sA, {}) : null] }) : null, /* @__PURE__ */ (0, V.jsxs)("div", {
ref: m,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -24956,11 +24459,11 @@ function ile(e) {
r !== e.k && s.setState(e.k);
},
children: e.label
- }, e.k)), /* @__PURE__ */ (0, V.jsx)(yA, {})]
+ }, e.k)), /* @__PURE__ */ (0, V.jsx)(sA, {})]
}), /* @__PURE__ */ (0, V.jsx)("div", {
ref: h,
"data-entity-tags": "",
- children: l ? a.map((e) => /* @__PURE__ */ (0, V.jsxs)(sA, {
+ children: l ? a.map((e) => /* @__PURE__ */ (0, V.jsxs)(pD, {
"data-entity-tag": e.k,
"data-entity-press": "",
pressed: e.selected,
@@ -24972,10 +24475,10 @@ function ile(e) {
}, e.k)) : null
})]
})] }),
- bottom: /* @__PURE__ */ (0, V.jsx)(ole, { ...e })
+ bottom: /* @__PURE__ */ (0, V.jsx)(qce, { ...e })
})] });
}
-function ale({ keys: e, view: t, row: n, glide: r, onView: i }) {
+function Kce({ keys: e, view: t, row: n, glide: r, onView: i }) {
let a = [];
return e.people && a.push({
value: "people",
@@ -25017,7 +24520,7 @@ function ale({ keys: e, view: t, row: n, glide: r, onView: i }) {
})
});
}
-function bA({ items: e, hidden: t, actions: n }) {
+function cA({ items: e, hidden: t, actions: n }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-entity-combo": "",
hidden: t,
@@ -25037,7 +24540,7 @@ function bA({ items: e, hidden: t, actions: n }) {
})] }) : null
});
}
-function ole(e) {
+function qce(e) {
let { view: t, readout: n, busy: r, video: i, photo: a, actions: o, helpers: s } = e;
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
t === "photos" && a?.back ? /* @__PURE__ */ (0, V.jsxs)("button", {
@@ -25049,22 +24552,22 @@ function ole(e) {
dangerouslySetInnerHTML: { __html: R("chevron-left") }
}), /* @__PURE__ */ (0, V.jsx)("span", { children: "全部照片" })]
}) : null,
- /* @__PURE__ */ (0, V.jsx)(sle, {
+ /* @__PURE__ */ (0, V.jsx)(Jce, {
text: n,
busy: r
}),
- t === "videos" && i ? /* @__PURE__ */ (0, V.jsx)(cle, {
+ t === "videos" && i ? /* @__PURE__ */ (0, V.jsx)(Yce, {
head: i,
actions: o
}) : null,
- t === "photos" && a ? /* @__PURE__ */ (0, V.jsx)(lle, {
+ t === "photos" && a ? /* @__PURE__ */ (0, V.jsx)(Xce, {
head: a,
actions: o,
helpers: s
}) : null
] });
}
-function sle({ text: e, busy: t }) {
+function Jce({ text: e, busy: t }) {
return /* @__PURE__ */ (0, V.jsx)("h3", {
"data-entity-readout": "",
children: t ? /* @__PURE__ */ (0, V.jsx)("span", {
@@ -25074,22 +24577,22 @@ function sle({ text: e, busy: t }) {
}) : e
});
}
-function xA({ name: e, label: t, value: n, options: r, onChange: i }) {
- return /* @__PURE__ */ (0, V.jsx)(PO, {
+function lA({ name: e, label: t, value: n, options: r, onChange: i }) {
+ return /* @__PURE__ */ (0, V.jsx)(yk, {
name: e,
"aria-label": t,
orientation: "horizontal",
value: n,
onChange: i,
"data-entity-layout": "",
- className: hA,
+ className: rA,
children: r.map(([e, t, n]) => {
- let r = vA(n);
- return /* @__PURE__ */ (0, V.jsx)(FO, {
+ let r = oA(n);
+ return /* @__PURE__ */ (0, V.jsx)(bk, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: gA,
+ className: iA,
children: /* @__PURE__ */ (0, V.jsx)("span", {
title: t,
className: "contents",
@@ -25099,7 +24602,7 @@ function xA({ name: e, label: t, value: n, options: r, onChange: i }) {
})
});
}
-function SA({ onPress: e, busy: t = !1 }) {
+function uA({ onPress: e, busy: t = !1 }) {
return /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-entity-batch": "",
@@ -25113,27 +24616,27 @@ function SA({ onPress: e, busy: t = !1 }) {
dangerouslySetInnerHTML: { __html: t ? Ke("正在换一批") : R("shuffle") }
});
}
-function cle({ head: e, actions: t }) {
+function Yce({ head: e, actions: t }) {
return /* @__PURE__ */ (0, V.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(SA, { onPress: () => void t.reshuffle() }),
- e.jav ? /* @__PURE__ */ (0, V.jsx)(xA, {
+ /* @__PURE__ */ (0, V.jsx)(uA, { onPress: () => void t.reshuffle() }),
+ e.jav ? /* @__PURE__ */ (0, V.jsx)(lA, {
label: "JAV 卡片版式",
value: e.jav.layout,
options: e.jav.options,
onChange: t.setJavLayout
}) : null,
- /* @__PURE__ */ (0, V.jsx)(CA, {
+ /* @__PURE__ */ (0, V.jsx)(dA, {
sorts: e.sorts,
onSort: t.setSort
})
]
});
}
-function CA({ sorts: e, onSort: t }) {
+function dA({ sorts: e, onSort: t }) {
return /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: e.map((e) => {
- let n = vA(e.dir === "asc" ? "arrow-up" : "arrow-down");
+ let n = oA(e.dir === "asc" ? "arrow-up" : "arrow-down");
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-entity-sort": e.key,
@@ -25145,20 +24648,20 @@ function CA({ sorts: e, onSort: t }) {
}, e.key);
}) });
}
-function lle({ head: e, actions: t, helpers: n }) {
+function Xce({ head: e, actions: t, helpers: n }) {
let [r, i] = (0, B.useState)(!1), a = (0, B.useRef)(null), o = e.back ? n.sourceToolsHtml(e.setId) : "";
return (0, B.useEffect)(() => {
a.current && o && n.wireSourceTools(a.current);
}, [n, o]), /* @__PURE__ */ (0, V.jsxs)("span", {
"data-entity-sorts": "",
children: [
- e.shuffle ? /* @__PURE__ */ (0, V.jsx)(SA, {
+ e.shuffle ? /* @__PURE__ */ (0, V.jsx)(uA, {
onPress: () => {
i(!0), t.reshuffle().finally(() => i(!1));
},
busy: r
}) : null,
- /* @__PURE__ */ (0, V.jsx)(xA, {
+ /* @__PURE__ */ (0, V.jsx)(lA, {
label: "图片布局",
value: e.layout,
options: e.layouts,
@@ -25174,34 +24677,34 @@ function lle({ head: e, actions: t, helpers: n }) {
}
//#endregion
//#region src/react/catalog-filter/catalog-filter-page.tsx
-var wA = "";
-function ule(e) {
- let t = !e.tiers, n = gle(e.comboHost);
+var fA = "";
+function Zce(e) {
+ let t = !e.tiers, n = ile(e.comboHost);
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-catalog-root": "",
"data-loading": t || void 0,
"data-refreshing": e.refreshing || void 0,
className: "contents",
children: [
- n ? (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(bA, {
+ n ? (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(cA, {
items: e.combo,
hidden: e.comboHidden,
actions: e.actions
}), n) : null,
- /* @__PURE__ */ (0, V.jsx)(ple, { ...e }),
- e.offscreen ? null : /* @__PURE__ */ (0, V.jsx)(dle, { ...e })
+ /* @__PURE__ */ (0, V.jsx)(ele, { ...e }),
+ e.offscreen ? null : /* @__PURE__ */ (0, V.jsx)(Qce, { ...e })
]
});
}
-function dle(e) {
- let { actions: t, helpers: n } = e, r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = lA(r, i, "[data-catalog-view][aria-pressed=\"true\"]", e.state);
+function Qce(e) {
+ let { actions: t, helpers: n } = e, r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = hD(r, i, "[data-catalog-view][aria-pressed=\"true\"]", e.state);
(0, B.useEffect)(() => {
n.wireDrag(o.current), n.wireScroller(a.current), n.wireDrag(s.current);
}, [n]);
- let l = !e.tiers, u = DA(o, e.tags, e.tiers?.key ?? "", e.tagFirst);
+ let l = !e.tiers, u = mA(o, e.tags, e.tiers?.key ?? "", e.tagFirst);
return (0, B.useLayoutEffect)(() => {
Le(o.current, "tagbar");
- }, [u]), /* @__PURE__ */ (0, V.jsx)(oA, {
+ }, [u]), /* @__PURE__ */ (0, V.jsx)(fD, {
label: "筛选与排序",
topLabel: "视图与标签",
attrs: {
@@ -25244,17 +24747,17 @@ function dle(e) {
}), /* @__PURE__ */ (0, V.jsxs)("div", {
ref: o,
"data-catalog-tags": "",
- children: [e.empty || l ? /* @__PURE__ */ (0, V.jsx)(TA, { kind: "tag" }) : null, u.map((e) => /* @__PURE__ */ (0, V.jsx)(fle, {
+ children: [e.empty || l ? /* @__PURE__ */ (0, V.jsx)(pA, { kind: "tag" }) : null, u.map((e) => /* @__PURE__ */ (0, V.jsx)($ce, {
tag: e,
onPress: t.toggleTag
}, e.k))]
})]
}),
- bottom: e.trash ? null : /* @__PURE__ */ (0, V.jsx)(hle, { ...e })
+ bottom: e.trash ? null : /* @__PURE__ */ (0, V.jsx)(nle, { ...e })
});
}
-function fle({ tag: e, onPress: t }) {
- return /* @__PURE__ */ (0, V.jsxs)(sA, {
+function $ce({ tag: e, onPress: t }) {
+ return /* @__PURE__ */ (0, V.jsxs)(pD, {
"data-catalog-tag": e.k,
"data-entity-press": "",
pressed: e.selected,
@@ -25265,12 +24768,12 @@ function fle({ tag: e, onPress: t }) {
})]
});
}
-function ple(e) {
+function ele(e) {
let { actions: t, helpers: n } = e, r = e.tiers ?? {
key: "",
performers: [],
studios: []
- }, i = e.empty || !e.tiers, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useCallback)((e) => () => t.moreTops(e), [t]), c = DA(a, r.performers, r.key, 24, i ? void 0 : s("performers")), l = DA(o, r.studios, r.key, 24, i ? void 0 : s("studios")), u = i || r.performers.length > 0, d = i || r.studios.length > 0;
+ }, i = e.empty || !e.tiers, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useCallback)((e) => () => t.moreTops(e), [t]), c = mA(a, r.performers, r.key, 24, i ? void 0 : s("performers")), l = mA(o, r.studios, r.key, 24, i ? void 0 : s("studios")), u = i || r.performers.length > 0, d = i || r.studios.length > 0;
return (0, B.useEffect)(() => {
n.wireDrag(a.current), n.wireDrag(o.current);
}, [
@@ -25283,7 +24786,7 @@ function ple(e) {
children: [u ? /* @__PURE__ */ (0, V.jsx)("div", {
ref: a,
"data-catalog-tier": "performers",
- children: i ? /* @__PURE__ */ (0, V.jsx)(TA, { kind: "performer" }) : c.map((e) => /* @__PURE__ */ (0, V.jsxs)("button", {
+ children: i ? /* @__PURE__ */ (0, V.jsx)(pA, { kind: "performer" }) : c.map((e) => /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-tier-performer": "",
"data-entity-kind": "performer",
@@ -25300,18 +24803,18 @@ function ple(e) {
}) : null, d ? /* @__PURE__ */ (0, V.jsx)("div", {
ref: o,
"data-catalog-tier": "studios",
- children: i ? /* @__PURE__ */ (0, V.jsx)(TA, { kind: "studio" }) : l.map((e) => /* @__PURE__ */ (0, V.jsxs)("button", {
+ children: i ? /* @__PURE__ */ (0, V.jsx)(pA, { kind: "studio" }) : l.map((e) => /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-tier-studio": "",
"data-entity-kind": "studio",
"data-entity-name": e.name,
onClick: () => t.openEntity("studio", e.name),
- children: [/* @__PURE__ */ (0, V.jsx)(mle, { studio: e }), e.name]
+ children: [/* @__PURE__ */ (0, V.jsx)(tle, { studio: e }), e.name]
}, e.name))
}) : null]
});
}
-function mle({ studio: e }) {
+function tle({ studio: e }) {
let [t, n] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, V.jsx)("span", {
"data-tier-mark": "",
@@ -25325,7 +24828,7 @@ function mle({ studio: e }) {
}) : e.fallback
});
}
-function TA({ kind: e }) {
+function pA({ kind: e }) {
let t = Array.from({ length: 64 }, (e, t) => t);
return e === "tag" ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-catalog-placeholder": "tag",
@@ -25341,32 +24844,32 @@ function TA({ kind: e }) {
children: [/* @__PURE__ */ (0, V.jsx)("span", {}), /* @__PURE__ */ (0, V.jsx)("span", { children: "\xA0" })]
}, t)) });
}
-function hle({ count: e, refreshing: t, layout: n, sorts: r, actions: i }) {
+function nle({ count: e, refreshing: t, layout: n, sorts: r, actions: i }) {
let [a, o] = (0, B.useState)(!1);
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(EA, { count: e }), /* @__PURE__ */ (0, V.jsxs)("span", {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(rle, { count: e }), /* @__PURE__ */ (0, V.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(SA, {
+ /* @__PURE__ */ (0, V.jsx)(uA, {
onPress: () => {
o(!0), i.reshuffle().finally(() => o(!1));
},
busy: a || t
}),
- n ? /* @__PURE__ */ (0, V.jsx)(xA, {
+ n ? /* @__PURE__ */ (0, V.jsx)(lA, {
name: n.name,
label: n.label,
value: n.value,
options: n.options,
onChange: i.setLayout
}, n.name) : null,
- /* @__PURE__ */ (0, V.jsx)(CA, {
+ /* @__PURE__ */ (0, V.jsx)(dA, {
sorts: r,
onSort: i.setSort
})
]
})] });
}
-function EA({ count: e }) {
+function rle({ count: e }) {
let t = (0, B.useRef)(null), n = (0, B.useRef)(null), r = e ? `${e.total.toLocaleString()} 个符合 · 显示 ${e.shown}` : "";
return (0, B.useLayoutEffect)(() => {
if (!e) {
@@ -25374,7 +24877,7 @@ function EA({ count: e }) {
return;
}
let i = t.current;
- i && (wA && i.dataset.popCount === void 0 && (i.dataset.popCount = wA), wA = r, Re(i, r));
+ i && (fA && i.dataset.popCount === void 0 && (i.dataset.popCount = fA), fA = r, Re(i, r));
}, [e, r]), e ? /* @__PURE__ */ (0, V.jsx)("span", {
ref: t,
"data-catalog-readout": "",
@@ -25390,7 +24893,7 @@ function EA({ count: e }) {
})
}, "skeleton");
}
-function gle(e) {
+function ile(e) {
let [t, n] = (0, B.useState)(null);
return (0, B.useLayoutEffect)(() => {
if (!e) return;
@@ -25400,7 +24903,7 @@ function gle(e) {
};
}, [e]), t;
}
-function DA(e, t, n, r, i) {
+function mA(e, t, n, r, i) {
let a = () => ({
key: n,
limit: r,
@@ -25446,7 +24949,7 @@ function DA(e, t, n, r, i) {
}
//#endregion
//#region src/react/components/grid-reveal.tsx
-function OA(e, t) {
+function hA(e, t) {
let [n, r] = (0, B.useState)(e ? "skeleton" : "none"), [i] = (0, B.useState)(() => e ? t() : ""), a = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
a.current && ke(a.current);
@@ -25472,7 +24975,7 @@ function OA(e, t) {
fading: n === "fade"
};
}
-function kA({ message: e, onRetry: t }) {
+function gA({ message: e, onRetry: t }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-media-error": "",
onClick: (e) => {
@@ -25486,7 +24989,7 @@ function kA({ message: e, onRetry: t }) {
}
//#endregion
//#region src/react/components/art-slot.tsx
-function AA({ artwork: e, identity: t = e.html, relayout: n }) {
+function _A({ artwork: e, identity: t = e.html, relayout: n }) {
let [r, i] = (0, B.useState)({
identity: t,
artwork: e
@@ -25506,24 +25009,24 @@ function AA({ artwork: e, identity: t = e.html, relayout: n }) {
}
//#endregion
//#region src/react/components/media-card.tsx
-var _le = 9 / 16;
-function jA({ name: e }) {
+var ale = 9 / 16;
+function vA({ name: e }) {
return /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
}
-var vle = {
+var ole = {
image: "图片",
audio: "音频",
archive: "压缩包",
other: "其它文件"
};
-function MA(e, t, n) {
- return t === "short" ? _le : o(n);
+function yA(e, t, n) {
+ return t === "short" ? ale : o(n);
}
-function yle(e) {
+function sle(e) {
let { kind: t, name: n, coStarred: r, performers: i, refs: a, total: o } = E(e), s = i[0] || "", c = ee(e);
return {
avatar: r ? /* @__PURE__ */ (0, V.jsx)("div", {
@@ -25570,7 +25073,7 @@ function yle(e) {
})
};
}
-function ble() {
+function cle() {
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-media-preview": "",
@@ -25589,7 +25092,7 @@ function ble() {
})]
});
}
-function xle({ item: e, actions: t }) {
+function lle({ item: e, actions: t }) {
let [n, r] = (0, B.useState)(null), [i, a] = (0, B.useState)(!1), o = n?.id === e.id ? n.on : !!e.watch_later;
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-media-later": "",
@@ -25607,21 +25110,21 @@ function xle({ item: e, actions: t }) {
},
"aria-busy": i || void 0,
"aria-disabled": i || void 0,
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: o ? "check" : "bookmark-plus" })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: o ? "check" : "bookmark-plus" })
})
});
}
-function NA(e, t) {
+function bA(e, t) {
let n = e?.querySelector("video.hv");
!n || !Number.isFinite(n.duration) || (n._hop &&= (clearInterval(n._hop), null), n.currentTime = Math.max(0, Math.min(n.duration, n.currentTime + t)));
}
-function Sle({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSeconds: a, helpers: o, actions: s, onOpen: c }) {
+function ule({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSeconds: a, helpers: o, actions: s, onOpen: c }) {
let l = (0, B.useRef)(null), u = (0, B.useRef)(e);
u.current = e;
let d = (0, B.useCallback)((e) => {
let t = u.current;
l.current && l.current !== e && re(l.current), l.current = e, e && (!t.medium || t.medium === "video") && oe(e, t);
- }, []), f = e.part_group || null, p = e.edition_group || null, m = !!(f || p), h = n.active && e.is_jav ? n.size : "small", g = T(e, h, !1, n.javImage), _ = h === "small" ? g.html : T(e, "small", !1, n.javImage).html, v = f?.title || e.name || "", y = o.displayName(e, v), b = f?.total_size ?? e.size, x = f?.total_duration ?? e.duration, S = !f && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: C, who: w } = yle(e), E = (e.follow_tags || e.tags || []).slice(0, 3), D = [
+ }, []), f = e.part_group || null, p = e.edition_group || null, m = !!(f || p), h = n.active && e.is_jav ? n.size : "small", g = T(e, h, !1, n.javImage), _ = h === "small" ? g.html : T(e, "small", !1, n.javImage).html, v = f?.title || e.name || "", y = o.displayName(e, v), b = f?.total_size ?? e.size, x = f?.total_duration ?? e.duration, S = !f && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: C, who: w } = sle(e), E = (e.follow_tags || e.tags || []).slice(0, 3), D = [
e.feedback === "dislike" && "dislike",
e.feedback === "seen" && "seen",
e.disposal === "trash" && "dispose",
@@ -25655,9 +25158,9 @@ function Sle({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
c(e, r);
}, k = /* @__PURE__ */ (0, V.jsxs)("div", {
"data-media-pic": "",
- style: { "--card-ratio": String(MA(e, t, n)) },
+ style: { "--card-ratio": String(yA(e, t, n)) },
children: [
- g.html ? /* @__PURE__ */ (0, V.jsx)(AA, {
+ g.html ? /* @__PURE__ */ (0, V.jsx)(_A, {
artwork: g,
identity: _,
relayout: (e) => ne(e, h)
@@ -25671,11 +25174,11 @@ function Sle({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
}),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: "check" })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: "check" })
}),
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, V.jsx)(jA, { name: "trash" }), /* @__PURE__ */ (0, V.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, V.jsx)(vA, { name: "trash" }), /* @__PURE__ */ (0, V.jsx)("b", { children: "回收站" })]
}),
f ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-media-group": "",
@@ -25702,8 +25205,8 @@ function Sle({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
"data-media-scrub": "",
children: /* @__PURE__ */ (0, V.jsx)("i", { style: { "--media-fill": `${Math.round(e.leave_ratio * 100)}%` } })
}),
- /* @__PURE__ */ (0, V.jsx)(ble, {}),
- /* @__PURE__ */ (0, V.jsx)(xle, {
+ /* @__PURE__ */ (0, V.jsx)(cle, {}),
+ /* @__PURE__ */ (0, V.jsx)(lle, {
item: e,
actions: s
}),
@@ -25713,27 +25216,27 @@ function Sle({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
/* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), NA(l.current, -a);
+ e.stopPropagation(), bA(l.current, -a);
},
title: `后退 ${a} 秒`,
"aria-label": `后退 ${a} 秒`,
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: "rotate-ccw" })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: "rotate-ccw" })
}),
/* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), NA(l.current, a);
+ e.stopPropagation(), bA(l.current, a);
},
title: `前进 ${a} 秒`,
"aria-label": `前进 ${a} 秒`,
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: "rotate-cw" })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: "rotate-cw" })
}),
/* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-open": "",
title: "打开详情",
"aria-label": "打开详情",
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: "expand" })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: "expand" })
})
]
})
@@ -25809,8 +25312,8 @@ function Sle({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
]
});
}
-function Cle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpen: a }) {
- let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(!1), l = e.medium === "image" && e.location !== "online", u = String(e.name || ""), d = u.toLowerCase().endsWith(".url") ? "网址快捷方式" : vle[e.medium || ""] || "其它文件", f = l ? "pics" : d === "网址快捷方式" ? "globe" : "hard-drive", p = e.disposal === "trash" ? "restore" : "dispose", m = p === "restore" ? "还原" : "移入回收站", h = (t) => {
+function dle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpen: a }) {
+ let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(!1), l = e.medium === "image" && e.location !== "online", u = String(e.name || ""), d = u.toLowerCase().endsWith(".url") ? "网址快捷方式" : ole[e.medium || ""] || "其它文件", f = l ? "pics" : d === "网址快捷方式" ? "globe" : "hard-drive", p = e.disposal === "trash" ? "restore" : "dispose", m = p === "restore" ? "还原" : "移入回收站", h = (t) => {
t.preventDefault(), t.stopPropagation(), !s && (c(!0), i.resourceOperation(e, p).catch(() => {}).finally(() => c(!1)));
}, g = (t) => {
if (o.current) {
@@ -25836,7 +25339,7 @@ function Cle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
children: [
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, V.jsx)(jA, { name: f }), /* @__PURE__ */ (0, V.jsx)("b", { children: d })]
+ children: [/* @__PURE__ */ (0, V.jsx)(vA, { name: f }), /* @__PURE__ */ (0, V.jsx)("b", { children: d })]
}),
l ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-media-art": "thumb",
@@ -25848,11 +25351,11 @@ function Cle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
}),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: "check" })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: "check" })
}),
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, V.jsx)(jA, { name: "trash" }), /* @__PURE__ */ (0, V.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, V.jsx)(vA, { name: "trash" }), /* @__PURE__ */ (0, V.jsx)("b", { children: "回收站" })]
}),
/* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
@@ -25862,7 +25365,7 @@ function Cle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
onClick: h,
"aria-busy": s || void 0,
"aria-disabled": s || void 0,
- children: s ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("span", { dangerouslySetInnerHTML: { __html: Ke(p === "restore" ? "正在还原" : "正在移入回收站") } }), /* @__PURE__ */ (0, V.jsx)("span", { children: _ })] }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(jA, { name: p === "restore" ? "rotate-ccw" : "trash" }), /* @__PURE__ */ (0, V.jsx)("span", { children: m })] })
+ children: s ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("span", { dangerouslySetInnerHTML: { __html: Ke(p === "restore" ? "正在还原" : "正在移入回收站") } }), /* @__PURE__ */ (0, V.jsx)("span", { children: _ })] }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(vA, { name: p === "restore" ? "rotate-ccw" : "trash" }), /* @__PURE__ */ (0, V.jsx)("span", { children: m })] })
})
]
}), /* @__PURE__ */ (0, V.jsxs)("div", {
@@ -25871,7 +25374,7 @@ function Cle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
"data-media-avatar": "",
"data-media-kind-glyph": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, V.jsx)(jA, { name: f })
+ children: /* @__PURE__ */ (0, V.jsx)(vA, { name: f })
}), /* @__PURE__ */ (0, V.jsxs)("div", {
"data-media-text": "",
children: [/* @__PURE__ */ (0, V.jsx)("span", {
@@ -25900,17 +25403,17 @@ function Cle({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
})]
});
}
-function wle(e) {
- return e.variant === "resource" ? /* @__PURE__ */ (0, V.jsx)(Cle, { ...e }) : /* @__PURE__ */ (0, V.jsx)(Sle, { ...e });
+function fle(e) {
+ return e.variant === "resource" ? /* @__PURE__ */ (0, V.jsx)(dle, { ...e }) : /* @__PURE__ */ (0, V.jsx)(ule, { ...e });
}
-var PA = (0, B.memo)(wle), Tle = 1100, Ele = 340, Dle = 5e3;
-function Ole(e, t, n) {
+var xA = (0, B.memo)(fle), ple = 1100, mle = 340, hle = 5e3;
+function gle(e, t, n) {
return new Promise((r) => {
let i = new Image();
n && (i.referrerPolicy = n);
let a = !1, o = (e) => {
a || (a = !0, clearTimeout(c), i.onload = null, i.onerror = null, t.cancels.delete(s), r(e));
- }, s = () => o(!1), c = setTimeout(s, Dle);
+ }, s = () => o(!1), c = setTimeout(s, hle);
t.cancels.add(s), i.onerror = s, i.onload = () => {
if (!i.naturalWidth) {
o(!1);
@@ -25920,7 +25423,7 @@ function Ole(e, t, n) {
}, i.src = e;
});
}
-function FA({ load: e, canFlip: t, referrerPolicy: n }) {
+function SA({ load: e, canFlip: t, referrerPolicy: n }) {
let [r, i] = (0, B.useState)([]), [a, o] = (0, B.useState)(0), [s, c] = (0, B.useState)(null), l = (0, B.useRef)({
live: !1,
generation: 0,
@@ -25962,11 +25465,11 @@ function FA({ load: e, canFlip: t, referrerPolicy: n }) {
return;
}
if (!r() || !u.current.canFlip() || a.length < 2) return;
- let s = await Promise.all(a.map((t) => Ole(t, e, n)));
+ let s = await Promise.all(a.map((t) => gle(t, e, n)));
if (!r() || !u.current.canFlip()) return;
let d = a.filter((e, t) => s[t]);
d.length < 2 || (e.count = d.length, e.at = 0, i(d), o(0), c(null), f(420, () => {
- p(), e.cycle = setInterval(p, Tle);
+ p(), e.cycle = setInterval(p, ple);
}));
};
return (0, B.useEffect)(() => d, [d]), {
@@ -25975,7 +25478,7 @@ function FA({ load: e, canFlip: t, referrerPolicy: n }) {
leaving: s,
onPointerEnter: () => {
let e = l.current;
- e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(Ele, () => {
+ e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(mle, () => {
e.armed = null, m();
});
},
@@ -25986,8 +25489,8 @@ function FA({ load: e, canFlip: t, referrerPolicy: n }) {
}
//#endregion
//#region src/react/components/mix-card.tsx
-var IA = vA("play");
-function kle({ src: e }) {
+var CA = oA("play");
+function _le({ src: e }) {
let [t, n] = (0, B.useState)(!1);
return t ? null : /* @__PURE__ */ (0, V.jsx)("img", {
"data-mix-poster": "",
@@ -26000,8 +25503,8 @@ function kle({ src: e }) {
className: "absolute inset-0 block size-full object-contain"
});
}
-var LA = "relative inline-grid size-9.5 flex-none place-items-center overflow-hidden rounded-full bg-background-secondary-default text-body-2-regular text-text-secondary [&_img]:absolute [&_img]:inset-0 [&_img]:block [&_img]:size-full [&_img]:object-cover";
-function Ale({ faces: e, fallback: t, onOpenEntity: n }) {
+var wA = "relative inline-grid size-9.5 flex-none place-items-center overflow-hidden rounded-full bg-background-secondary-default text-body-2-regular text-text-secondary [&_img]:absolute [&_img]:inset-0 [&_img]:block [&_img]:size-full [&_img]:object-cover";
+function vle({ faces: e, fallback: t, onOpenEntity: n }) {
return e.length ? /* @__PURE__ */ (0, V.jsx)("div", {
"data-mix-avatars": "",
children: e.slice(0, 5).map((e) => /* @__PURE__ */ (0, V.jsx)("button", {
@@ -26009,18 +25512,18 @@ function Ale({ faces: e, fallback: t, onOpenEntity: n }) {
title: `打开资料页:${e.name}`,
"aria-label": `打开资料页:${e.name}`,
onClick: () => n(e.kind, e.name),
- className: `${LA} cursor-pointer outline-none`,
+ className: `${wA} cursor-pointer outline-none`,
dangerouslySetInnerHTML: { __html: w(e.name, e, ae(e.name), e.kind) }
}, `${e.kind}:${e.id}`))
}) : /* @__PURE__ */ (0, V.jsx)("span", {
"data-mix-initial": "",
"aria-hidden": !0,
- className: `${LA} mt-0.5`,
+ className: `${wA} mt-0.5`,
children: t
});
}
-function RA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, onOpenEntity: s, onOpen: c, openLabel: l, menu: u, ratio: d, artwork: f, artworkIdentity: p, relayoutArt: m, faceHtml: h, badge: g, glyph: _, wholeCard: v, ...y }) {
- let b = FA({
+function TA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, onOpenEntity: s, onOpen: c, openLabel: l, menu: u, ratio: d, artwork: f, artworkIdentity: p, relayoutArt: m, faceHtml: h, badge: g, glyph: _, wholeCard: v, ...y }) {
+ let b = SA({
load: i,
canFlip: a
}), x = (0, B.useRef)(b.onPointerLeave);
@@ -26047,11 +25550,11 @@ function RA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
style: d === void 0 ? void 0 : { "--card-ratio": String(d) },
className: "relative z-1 flex aspect-video items-center justify-center overflow-hidden",
children: [
- f?.html ? /* @__PURE__ */ (0, V.jsx)(AA, {
+ f?.html ? /* @__PURE__ */ (0, V.jsx)(_A, {
artwork: f,
identity: p,
relayout: m
- }) : r ? /* @__PURE__ */ (0, V.jsx)(kle, { src: r }, r) : /* @__PURE__ */ (0, V.jsx)("span", {
+ }) : r ? /* @__PURE__ */ (0, V.jsx)(_le, { src: r }, r) : /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-caption-1-regular tracking-caps text-text-secondary uppercase",
children: "无预览"
}),
@@ -26081,7 +25584,7 @@ function RA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-mix-badge": "",
className: "absolute right-2.25 bottom-2.25 z-6 flex min-h-7 items-center gap-1.5 rounded-2lg px-2.25 py-1 text-caption-1-semibold text-text-white",
- children: [/* @__PURE__ */ (0, V.jsx)(IA, {
+ children: [/* @__PURE__ */ (0, V.jsx)(CA, {
"aria-hidden": !0,
className: "size-3.75"
}), g ?? `${n} 个视频`]
@@ -26094,8 +25597,8 @@ function RA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
_ ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-mix-glyph": "",
"aria-hidden": !0,
- children: /* @__PURE__ */ (0, V.jsx)(IA, {})
- }) : /* @__PURE__ */ (0, V.jsx)(Ale, {
+ children: /* @__PURE__ */ (0, V.jsx)(CA, {})
+ }) : /* @__PURE__ */ (0, V.jsx)(vle, {
faces: o,
fallback: e.slice(0, 1),
onOpenEntity: s
@@ -26119,20 +25622,20 @@ function RA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
}
//#endregion
//#region src/react/catalog-grid/catalog-grid-page.tsx
-function zA(e) {
- if (e.mode === "items") return /* @__PURE__ */ (0, V.jsx)(Mle, { ...e });
- let t = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${MC(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
- return /* @__PURE__ */ (0, V.jsx)(Nle, { ...e }, t);
+function EA(e) {
+ if (e.mode === "items") return /* @__PURE__ */ (0, V.jsx)(ble, { ...e });
+ let t = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${AC(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
+ return /* @__PURE__ */ (0, V.jsx)(xle, { ...e }, t);
}
-function jle({ name: e }) {
+function yle({ name: e }) {
return /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
}
-function Mle(e) {
- let { actions: t } = e, n = (0, B.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, V.jsx)(PA, {
+function ble(e) {
+ let { actions: t } = e, n = (0, B.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, V.jsx)(xA, {
item: i,
variant: r,
layout: e.layout,
@@ -26152,8 +25655,8 @@ function Mle(e) {
children: i
});
}
-function Nle(e) {
- let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? Ore(e) : NC(e), s = i && e.initial ? {
+function xle(e) {
+ let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? Are(e) : jC(e), s = i && e.initial ? {
pages: [{
...e.initial,
items: e.initial.items || [],
@@ -26173,7 +25676,7 @@ function Nle(e) {
(0, B.useEffect)(() => {
c.isPending || l.current || (l.current = !0, e.settled?.(e.revision));
}, [c.isPending]);
- let { tiles: u, pageStarts: d } = (0, B.useMemo)(() => Mre(c.data?.pages || [], {
+ let { tiles: u, pageStarts: d } = (0, B.useMemo)(() => Pre(c.data?.pages || [], {
collapse: e.groupCollapse !== !1,
mix: !!e.mix && !a,
javImage: r.javImage
@@ -26183,7 +25686,7 @@ function Nle(e) {
e.mix,
a,
r.javImage
- ]), f = u.reduce((e, t) => e + +(t.kind === "card"), 0), p = Number(c.data?.pages[0]?.total || 0), m = OA(c.isPending, e.skeletonHtml), h = (0, B.useRef)(null), g = Ple(e, c.data, u, d, h);
+ ]), f = u.reduce((e, t) => e + +(t.kind === "card"), 0), p = Number(c.data?.pages[0]?.total || 0), m = hA(c.isPending, e.skeletonHtml), h = (0, B.useRef)(null), g = Sle(e, c.data, u, d, h);
(0, B.useLayoutEffect)(() => {
if (!c.data) return;
let t = !0;
@@ -26200,12 +25703,12 @@ function Nle(e) {
let _ = (0, B.useCallback)((e, t) => n.open(e, t), [n]), v = (0, B.useCallback)((e, t) => n.openResource(e, t), [n]), y = (0, B.useCallback)((e) => n.openShort(e), [n]), b = (0, B.useCallback)(async () => {
let e = await c.fetchNextPage({ cancelRefetch: !1 });
if (e.isFetchNextPageError) throw e.error;
- }, [c.fetchNextPage]), x = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, V.jsx)(Ile, {
+ }, [c.fetchNextPage]), x = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, V.jsx)(wle, {
seed: i.seed,
layout: r,
helpers: t,
actions: n
- }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, V.jsx)(PA, {
+ }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, V.jsx)(xA, {
item: i.item,
variant: a && i.item.medium && i.item.medium !== "video" ? "resource" : "grid",
layout: r,
@@ -26222,7 +25725,7 @@ function Nle(e) {
"data-grid-reveal": m.fading ? "" : void 0,
children: [m.layer, (() => {
if (c.isPending) return null;
- if (!c.data) return /* @__PURE__ */ (0, V.jsx)(kA, {
+ if (!c.data) return /* @__PURE__ */ (0, V.jsx)(gA, {
message: ye(c.error),
onRetry: () => void c.refetch()
});
@@ -26239,15 +25742,15 @@ function Nle(e) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("div", {
"data-media-sections": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: Fre(u, g).map((t) => /* @__PURE__ */ (0, V.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("div", {
+ children: Lre(u, g).map((t) => /* @__PURE__ */ (0, V.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("div", {
"data-media-grid": "",
children: t.tiles.map(x)
- }), t.strip ? /* @__PURE__ */ (0, V.jsx)(Fle, {
+ }), t.strip ? /* @__PURE__ */ (0, V.jsx)(Cle, {
cut: t.strip,
props: e,
onOpen: y
}) : null] }, t.start))
- }), c.hasNextPage ? /* @__PURE__ */ (0, V.jsx)(BA, {
+ }), c.hasNextPage ? /* @__PURE__ */ (0, V.jsx)(DA, {
entity: i,
load: b,
enabled: () => e.canLoadMore?.() !== !1
@@ -26255,7 +25758,7 @@ function Nle(e) {
})()]
});
}
-function BA({ entity: e, load: t, enabled: n, children: r }) {
+function DA({ entity: e, load: t, enabled: n, children: r }) {
let i = (0, B.useRef)(null), a = (0, B.useRef)(!1), o = (0, B.useRef)(!1), [s, c] = (0, B.useState)({
busy: !1,
error: ""
@@ -26316,12 +25819,12 @@ function BA({ entity: e, load: t, enabled: n, children: r }) {
...f,
onClick: () => void u(!0),
dangerouslySetInnerHTML: { __html: Pe("继续载入中…") }
- }), s.error ? /* @__PURE__ */ (0, V.jsx)(kA, {
+ }), s.error ? /* @__PURE__ */ (0, V.jsx)(gA, {
message: s.error,
onRetry: () => void u(!0)
}) : null] });
}
-function Ple(e, t, n, r, i) {
+function Sle(e, t, n, r, i) {
let [a, o] = (0, B.useState)([]), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(0), u = (0, B.useRef)(0), d = (0, B.useRef)([]);
return (0, B.useEffect)(() => () => d.current.forEach((e) => e.abort()), []), (0, B.useEffect)(() => {
let n = t?.pages.length || 0;
@@ -26330,7 +25833,7 @@ function Ple(e, t, n, r, i) {
let r = new AbortController();
d.current.push(r);
let i = n - 1;
- G(`/api/items?${Pre(e.filters || {}, l.current)}`, r.signal).then((e) => {
+ G(`/api/items?${Ire(e.filters || {}, l.current)}`, r.signal).then((e) => {
let t = e.items || [];
if (!t.length) {
l.current = 0;
@@ -26346,7 +25849,7 @@ function Ple(e, t, n, r, i) {
}, [t]), (0, B.useLayoutEffect)(() => {
if (!s) return;
c(null);
- let e = a.reduce((e, t) => Math.max(e, t.at), 0), t = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), u = t?.[t.length - 1], d = u ? Math.max(1, getComputedStyle(u).gridTemplateColumns.split(" ").length) : 1, f = Math.max(0, (r[s.page] ?? 0) - e), p = Nre(n.length - e, f, d);
+ let e = a.reduce((e, t) => Math.max(e, t.at), 0), t = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), u = t?.[t.length - 1], d = u ? Math.max(1, getComputedStyle(u).gridTemplateColumns.split(" ").length) : 1, f = Math.max(0, (r[s.page] ?? 0) - e), p = Fre(n.length - e, f, d);
if (!p.length) return;
let m = e + (p[Math.floor(Math.random() * p.length)] ?? 0);
l.current = s.more ? l.current + 18 : 0, o((e) => [...e, {
@@ -26356,7 +25859,7 @@ function Ple(e, t, n, r, i) {
}]);
}, [s]), a;
}
-function Fle({ cut: e, props: t, onOpen: n }) {
+function Cle({ cut: e, props: t, onOpen: n }) {
let r = (0, B.useRef)(null), { wireDrag: i } = t;
return (0, B.useEffect)(() => {
r.current && i(r.current);
@@ -26372,12 +25875,12 @@ function Fle({ cut: e, props: t, onOpen: n }) {
type: "button",
"data-shorts-enter": "",
onClick: () => t.actions.openShorts(),
- children: [/* @__PURE__ */ (0, V.jsx)(jle, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, V.jsx)("span", { children: "进入沉浸模式" })]
+ children: [/* @__PURE__ */ (0, V.jsx)(yle, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, V.jsx)("span", { children: "进入沉浸模式" })]
})
] }), /* @__PURE__ */ (0, V.jsx)("div", {
ref: r,
"data-shorts-row": "",
- children: e.items.map((e) => /* @__PURE__ */ (0, V.jsx)(PA, {
+ children: e.items.map((e) => /* @__PURE__ */ (0, V.jsx)(xA, {
item: e,
variant: "short",
layout: t.layout,
@@ -26391,17 +25894,17 @@ function Fle({ cut: e, props: t, onOpen: n }) {
})]
});
}
-function VA(e, t, n) {
+function OA(e, t, n) {
return N(e, t.active && e.is_jav ? t.size : "small", n, t.javImage);
}
-function Ile({ seed: e, layout: t, helpers: n, actions: r }) {
+function wle({ seed: e, layout: t, helpers: n, actions: r }) {
let i = (0, B.useRef)(/* @__PURE__ */ new Map()), a = (0, B.useRef)(t);
a.current = t;
let o = P(e, n.tagLabel), s = (0, B.useCallback)(async () => {
- let t = a.current, n = [e, ...await r.mixRelated(e.id)].filter((e) => PC(e, t.javImage)).slice(0, 9);
- return i.current = new Map(n.map((e) => [String(e.id), VA(e, t, !0).html])), n.map((e) => String(e.id));
- }, [e, r]), c = t.active && e.is_jav ? t.size : "small", l = VA(e, t, !1);
- return /* @__PURE__ */ (0, V.jsx)(RA, {
+ let t = a.current, n = [e, ...await r.mixRelated(e.id)].filter((e) => MC(e, t.javImage)).slice(0, 9);
+ return i.current = new Map(n.map((e) => [String(e.id), OA(e, t, !0).html])), n.map((e) => String(e.id));
+ }, [e, r]), c = t.active && e.is_jav ? t.size : "small", l = OA(e, t, !1);
+ return /* @__PURE__ */ (0, V.jsx)(TA, {
"data-mix-seed": String(e.id),
name: `Mix · ${o}`,
caption: `${n.displayName(e, e.name || "")}及相似作品`,
@@ -26411,12 +25914,12 @@ function Ile({ seed: e, layout: t, helpers: n, actions: r }) {
wholeCard: !0,
poster: null,
artwork: l,
- artworkIdentity: c === "small" ? l.html : VA(e, {
+ artworkIdentity: c === "small" ? l.html : OA(e, {
...t,
size: "small"
}, !1).html,
relayoutArt: (e) => ne(e, c),
- ratio: MA(e, "grid", t),
+ ratio: yA(e, "grid", t),
flipImages: s,
faceHtml: (e) => i.current.get(e) || "",
canFlip: r.canFlip,
@@ -26428,31 +25931,31 @@ function Ile({ seed: e, layout: t, helpers: n, actions: r }) {
}
//#endregion
//#region src/react/media-sources.ts
-async function HA(e) {
+async function kA(e) {
await z.fetchQuery({
queryKey: et,
queryFn: () => nt(e)
});
}
-var Lle = [
+var Tle = [
"local",
"115",
"pikpak"
-], Rle = (e) => (e?.sources ?? []).filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), zle = "/api/duplicates?limit=120", UA = ["duplicates"], WA = "/api/batch", GA = (e) => G(zle, e);
-async function Ble(e) {
+], Ele = (e) => (e?.sources ?? []).filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), Dle = "/api/duplicates?limit=120", AA = ["duplicates"], jA = "/api/batch", MA = (e) => G(Dle, e);
+async function Ole(e) {
await Promise.all([z.fetchQuery({
- queryKey: UA,
- queryFn: () => GA(e)
- }), HA(e)]);
+ queryKey: AA,
+ queryFn: () => MA(e)
+ }), kA(e)]);
}
-var KA = {
+var NA = {
largest: "最大的一个",
longest: "最长的一个",
115: "115(没有则留最大)",
pikpak: "PikPak(没有则留最大)",
all: "零个文件"
-}, Vle = (e, t) => t.filter((t) => e.some((e) => e.location === t)), qA = (e, t) => Vle(e, t).filter((t) => e.some((e) => e.location !== t)), Hle = (e, t) => t.filter((t) => e.some((e) => qA(e.files, [t]).length));
-function Ule(e, t) {
+}, kle = (e, t) => t.filter((t) => e.some((e) => e.location === t)), PA = (e, t) => kle(e, t).filter((t) => e.some((e) => e.location !== t)), Ale = (e, t) => t.filter((t) => e.some((e) => PA(e.files, [t]).length));
+function jle(e, t) {
let n = [];
for (let r of e) {
if (t === "all") {
@@ -26471,47 +25974,47 @@ function Ule(e, t) {
}
return n;
}
-function Wle(e, t) {
+function Mle(e, t) {
let n = new Set(t);
return e.reduce((e, t) => e + t.files.reduce((e, t) => e + (n.has(t.id) && t.size || 0), 0), 0);
}
-async function JA(e, t) {
- for (let n = 0; n < e.length; n += 200) await K(WA, {
+async function FA(e, t) {
+ for (let n = 0; n < e.length; n += 200) await K(jA, {
ids: e.slice(n, n + 200),
operation: t
});
}
//#endregion
//#region src/react/library-processing/library-processing.ts
-var YA = "/api/library-processing", XA = ["library-processing"], ZA = (e) => G(YA, e);
-async function QA(e) {
+var IA = "/api/library-processing", LA = ["library-processing"], RA = (e) => G(IA, e);
+async function zA(e) {
await z.fetchQuery({
- queryKey: XA,
- queryFn: () => ZA(e)
+ queryKey: LA,
+ queryFn: () => RA(e)
});
}
-var Gle = 2e3, Kle = 1e4, $A = "连接中断,正在重新读取处理进度";
-function qle(e, t) {
- return e?.status === "running" ? Gle : t ? Kle : !1;
+var Nle = 2e3, Ple = 1e4, BA = "连接中断,正在重新读取处理进度";
+function Fle(e, t) {
+ return e?.status === "running" ? Nle : t ? Ple : !1;
}
-var Jle = {
+var Ile = {
reading_local: "读取本地资料",
querying_metadata: "查询外部资料",
fetching_cover: "采集缺失封面",
writing_candidates: "保存资料候选"
-}, ej = {
+}, VA = {
querying_metadata: "没有资料",
fetching_cover: "没有封面"
};
-function Yle(e) {
- let t = Object.entries(e).filter(([e, t]) => ej[e] && t > 0).map(([e, t]) => `${ej[e]} ${t} 部`);
+function Lle(e) {
+ let t = Object.entries(e).filter(([e, t]) => VA[e] && t > 0).map(([e, t]) => `${VA[e]} ${t} 部`);
return t.length ? `外部来源${t.join("、")},7 天内不再问。` : "";
}
-function tj(e) {
- let t = Jle[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${e.waited_seconds} 秒` : "";
+function HA(e) {
+ let t = Ile[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${e.waited_seconds} 秒` : "";
return e.current_asset_name ? `当前:${e.current_asset_name} · ${t}${n}` : t + n;
}
-function Xle(e) {
+function Rle(e) {
let t = e.issue_preview || [];
return t.length ? {
label: e.issues_truncated ? `问题清单:共 ${e.issue_count || 0} 项,展开查看前 ${t.length} 项` : `问题清单:共 ${e.issue_count || 0} 项`,
@@ -26525,21 +26028,21 @@ function Xle(e) {
log: e.issues_log || ""
} : null;
}
-var nj = "peach.library-processing.announced", Zle = 120;
-function Qle(e, t, n) {
+var UA = "peach.library-processing.announced", zle = 120;
+function Ble(e, t, n) {
if (e.status !== "complete") return;
- let r = !!e.job_id && !!e.completed_at && Date.now() / 1e3 - e.completed_at < Zle;
+ let r = !!e.job_id && !!e.completed_at && Date.now() / 1e3 - e.completed_at < zle;
if (!(!n && !r)) {
try {
- if (e.job_id && localStorage.getItem(nj) === e.job_id) return;
- e.job_id && localStorage.setItem(nj, e.job_id);
+ if (e.job_id && localStorage.getItem(UA) === e.job_id) return;
+ e.job_id && localStorage.setItem(UA, e.job_id);
} catch {}
t(`扫描与资料采集已完成:识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条`);
}
}
//#endregion
//#region src/react/media-repair/media-repair.ts
-var rj = "/api/media-repair", ij = ["media-repair"], aj = ["media-repair", "libraries"], $le = {
+var WA = "/api/media-repair", GA = ["media-repair"], KA = ["media-repair", "libraries"], Vle = {
status: "idle",
library: "",
stage: "",
@@ -26551,33 +26054,33 @@ var rj = "/api/media-repair", ij = ["media-repair"], aj = ["media-repair", "libr
missing_tool: 0,
skipped: 0,
message: ""
-}, oj = (e) => G(rj, e), sj = async (e) => (await G("/api/libraries", e)).libraries || [];
-async function eue(e) {
+}, qA = (e) => G(WA, e), JA = async (e) => (await G("/api/libraries", e)).libraries || [];
+async function Hle(e) {
await Promise.all([z.fetchQuery({
- queryKey: ij,
- queryFn: () => oj(e)
+ queryKey: GA,
+ queryFn: () => qA(e)
}), z.fetchQuery({
- queryKey: aj,
- queryFn: () => sj(e)
+ queryKey: KA,
+ queryFn: () => JA(e)
})]);
}
-var cj = (e) => Number(e).toLocaleString();
-function tue(e) {
+var YA = (e) => Number(e).toLocaleString();
+function Ule(e) {
if (e.status === "running") {
- let t = e.total ? `${cj(e.checked)} / ${cj(e.total)}` : "准备中";
+ let t = e.total ? `${YA(e.checked)} / ${YA(e.total)}` : "准备中";
return e.stage === "修复" && e.message ? `修复 ${t} · ${e.message}` : `${e.stage || "扫描"} ${t}`;
}
- return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${cj(e.repaired)} 部,${cj(e.failed)} 部修不了` : `修好 ${cj(e.repaired)} 部` : "";
+ return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${YA(e.repaired)} 部,${YA(e.failed)} 部修不了` : `修好 ${YA(e.repaired)} 部` : "";
}
-var nue = (e) => `${cj(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, rue = "/api/quality-goals?limit=200", lj = ["quality-goals"], uj = (e) => G(rue, e);
-async function iue(e) {
+var Wle = (e) => `${YA(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, Gle = "/api/quality-goals?limit=200", XA = ["quality-goals"], ZA = (e) => G(Gle, e);
+async function Kle(e) {
await z.fetchQuery({
- queryKey: lj,
- queryFn: () => uj(e)
+ queryKey: XA,
+ queryFn: () => ZA(e)
});
}
-var aue = (e) => e.has_cover ? D(e) : `/poster?id=${e.id}&c=4`;
-function dj(e, t, n = 1) {
+var qle = (e) => e.has_cover ? D(e) : `/poster?id=${e.id}&c=4`;
+function QA(e, t, n = 1) {
let r = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
if (n * 2 + 5 >= t) return r(1, t);
let i = Math.max(e - n, 1), a = Math.min(e + n, t), o = i > 2, s = a < t - 2;
@@ -26597,21 +26100,21 @@ function dj(e, t, n = 1) {
t
];
}
-function fj(e, t) {
+function $A(e, t) {
return Math.max(1, Math.ceil(e / t));
}
-function pj(e, t) {
+function ej(e, t) {
return Math.min(Math.max(1, Math.floor(e) || 1), t);
}
//#endregion
//#region src/selection.ts
-function oue(e, t, n, r, i, a = i || !e.has(r)) {
+function Jle(e, t, n, r, i, a = i || !e.has(r)) {
let o = n === null ? -1 : t.indexOf(n), s = t.indexOf(r);
return i && o >= 0 && s >= 0 ? t.slice(Math.min(o, s), Math.max(o, s) + 1).forEach((t) => e.add(t)) : a ? e.add(r) : e.delete(r), r;
}
//#endregion
//#region src/react/time.ts
-function mj(e) {
+function tj(e) {
if (!e) return "";
let t = /[Zz]|[+-]\d\d:?\d\d$/.test(e) ? e : `${e}Z`, n = new Date(t);
if (Number.isNaN(n.getTime())) return String(e).replace("T", " ").slice(0, 16);
@@ -26620,7 +26123,7 @@ function mj(e) {
}
//#endregion
//#region src/react/review/review.ts
-var sue = "/api/review", cue = "/api/review/decision", lue = "/api/review/genre", hj = ["review"], gj = {
+var Yle = "/api/review", Xle = "/api/review/decision", Zle = "/api/review/genre", nj = ["review"], rj = {
metadata_fields: "元数据字段",
creator_tags: "创作者标签",
studio_logos: "厂牌 Logo",
@@ -26630,15 +26133,15 @@ var sue = "/api/review", cue = "/api/review/decision", lue = "/api/review/genre"
fc2_markings: "FC2 评论标记",
fc2_similarity: "FC2 跨号相似",
video_endcards: "片尾/出处证据"
-}, uue = Object.keys(gj), due = "metadata_fields", _j = (e) => typeof e == "string" && Object.hasOwn(gj, e), fue = {
+}, Qle = Object.keys(rj), $le = "metadata_fields", ij = (e) => typeof e == "string" && Object.hasOwn(rj, e), eue = {
creator_tags: "creator",
western_identity: "creator"
};
-function pue(e, t) {
+function tue(e, t) {
let n = [["candidates", t ? "按候选数量" : "全部待复核"]];
return e.some((e) => e.source || e.candidates?.some((e) => e.source)) && n.push(["source", "按来源"]), e.some((e) => e.field) && n.push(["field", "按字段"]), n;
}
-function vj(e, t) {
+function aj(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e) {
let e, i;
@@ -26655,43 +26158,43 @@ function vj(e, t) {
}
return [...n.values()];
}
-function mue(e, t, n) {
- return n && vj(e, t).find((e) => e.key === n)?.rows || e;
+function nue(e, t, n) {
+ return n && aj(e, t).find((e) => e.key === n)?.rows || e;
}
-function hue(e, t) {
- let n = fj(e.length, 20), r = pj(t, n);
+function rue(e, t) {
+ let n = $A(e.length, 20), r = ej(t, n);
return {
page: r,
pages: n,
rows: e.slice((r - 1) * 20, r * 20)
};
}
-function gue(e) {
+function iue(e) {
return e.length ? [...new Set(e.flatMap((e) => e.candidates?.map((e) => e.source || "") || []))].filter((t) => t && e.every((e) => e.candidates?.filter((e) => e.source === t).length === 1)) : [];
}
-function _ue(e, t, n, r, i, a) {
- return oue(e, t, n, r, i, a);
+function aue(e, t, n, r, i, a) {
+ return Jle(e, t, n, r, i, a);
}
-function yj(e, t) {
+function oj(e, t) {
return e === "metadata_fields" ? (t.candidates?.length || 0) > 0 : e !== "creator_tags" || String(t.status || "").trim() === "candidate";
}
-function bj(e, t) {
+function sj(e, t) {
return String(e === "metadata_fields" ? t.query || t.code || "" : t.creator || t.studio || t.current_name || t.name || t.item_key);
}
-var xj = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
-function vue(e, t) {
- let n = bj(e, t), r = xj(e, t);
+var cj = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
+function oue(e, t) {
+ let n = sj(e, t), r = cj(e, t);
return r ? `${n} · ${r}` : n;
}
-var yue = (e) => e.reason || e.evidence || e.note || e.decision_note || "", bue = (e) => String(e.tags || "").split("|").filter(Boolean), xue = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
-function Sue(e) {
+var sue = (e) => e.reason || e.evidence || e.note || e.decision_note || "", cue = (e) => String(e.tags || "").split("|").filter(Boolean), lue = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
+function uue(e) {
let t = e.candidates || [];
return {
candidateKey: t.length === 1 ? t[0].candidate_key : "",
assets: (e.preview_assets || []).map((e) => e.id)
};
}
-function Sj(e, t, n, r) {
+function lj(e, t, n, r) {
let i = !!t.asset_path && t.asset_mutation_revision != null;
return {
category: e,
@@ -26707,19 +26210,19 @@ function Sj(e, t, n, r) {
...i ? { expected_revision: t.asset_mutation_revision } : {}
};
}
-var Cue = (e) => e === "approved" ? "已通过候选" : e === "rejected" ? "已拒绝候选" : "已跳过候选", Cj = (e) => G(sue, e), wj = (e) => K(cue, e), wue = (e, t) => K(lue, {
+var due = (e) => e === "approved" ? "已通过候选" : e === "rejected" ? "已拒绝候选" : "已跳过候选", uj = (e) => G(Yle, e), dj = (e) => K(Xle, e), fue = (e, t) => K(Zle, {
genre: e,
tag: t
});
-async function Tue(e) {
+async function pue(e) {
await z.fetchQuery({
- queryKey: hj,
- queryFn: () => Cj(e)
+ queryKey: nj,
+ queryFn: () => uj(e)
});
}
-function Tj(e, t) {
+function fj(e, t) {
let n = new Set(t);
- n.size && z.setQueryData(hj, (t) => {
+ n.size && z.setQueryData(nj, (t) => {
if (!t) return t;
let r = t.sections[e] || [], i = r.filter((e) => !n.has(String(e.item_key)));
return i.length === r.length ? t : {
@@ -26735,207 +26238,207 @@ function Tj(e, t) {
};
});
}
-var Eue = () => z.invalidateQueries({
- queryKey: hj,
+var mue = () => z.invalidateQueries({
+ queryKey: nj,
exact: !0
});
-function Due(e, t) {
- return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${mj(e.fetched_at)} 的缓存` : e?.error || t;
+function hue(e, t) {
+ return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${tj(e.fetched_at)} 的缓存` : e?.error || t;
}
//#endregion
//#region src/react/data-cleanup/links.ts
-var Oue = "/api/links", Ej = "/api/links/check", Dj = "/api/links/prune", Oj = ["links"], kj = ["links", "check"], Aj = ["links", "prune"], jj = {
+var gue = "/api/links", pj = "/api/links/check", mj = "/api/links/prune", hj = ["links"], gj = ["links", "check"], _j = ["links", "prune"], vj = {
official: "官网/事务所",
social: "社交账号",
catalog: "作品资料站",
source_reference: "资料出处"
};
-async function Mj(e) {
+async function yj(e) {
let t = await e;
if (t.ok === !1) throw Error(t.error || "操作未完成,请重试");
return t;
}
-var Nj = (e) => G(Oue, e), Pj = (e) => K(Ej, { status_only: !0 }, "POST", e), kue = ({ retry: e, checkId: t }) => Mj(K(Ej, e ? {
+var bj = (e) => G(gue, e), xj = (e) => K(pj, { status_only: !0 }, "POST", e), _ue = ({ retry: e, checkId: t }) => yj(K(pj, e ? {
retry: e,
check_id: t
-} : { restart: !0 })), Fj = (e) => G(Dj, e), Aue = (e) => Mj(K(Dj, {
+} : { restart: !0 })), Sj = (e) => G(mj, e), vue = (e) => yj(K(mj, {
confirm: !0,
check_id: e,
background: !0
-})), Ij = (e) => Number(e || 0).toLocaleString(), jue = (e) => `已删除 ${Ij(e.removed)} 条;${e.marked ? `已隐退女优的 ${Ij(e.marked)} 条留作不可点的记录;` : ""}保留 ${Ij(e.recovered)} 条未确认失效的链接。`;
-function Mue(e) {
+})), Cj = (e) => Number(e || 0).toLocaleString(), yue = (e) => `已删除 ${Cj(e.removed)} 条;${e.marked ? `已隐退女优的 ${Cj(e.marked)} 条留作不可点的记录;` : ""}保留 ${Cj(e.recovered)} 条未确认失效的链接。`;
+function bue(e) {
let t = e.scope === "retry";
- return e.total ? `${t ? "已重验" : "已检查"} ${Ij(e.checked)} / ${Ij(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
+ return e.total ? `${t ? "已重验" : "已检查"} ${Cj(e.checked)} / ${Cj(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
}
//#endregion
//#region src/react/settings-panel/settings-data.ts
-var Lj = "/api/settings", Rj = "/api/follow/schedule", zj = "/api/thumbnail-jobs", Bj = ["settings"], Vj = ["follow-schedule"], Hj = ["thumbnail-jobs"], Nue = (e) => G(Lj, e), Uj = (e) => G(Rj, e), Wj = (e) => G(zj, e);
-function Pue(e = z) {
+var wj = "/api/settings", Tj = "/api/follow/schedule", Ej = "/api/thumbnail-jobs", Dj = ["settings"], Oj = ["follow-schedule"], kj = ["thumbnail-jobs"], xue = (e) => G(wj, e), Aj = (e) => G(Tj, e), jj = (e) => G(Ej, e);
+function Sue(e = z) {
return e.fetchQuery({
- queryKey: Vj,
- queryFn: ({ signal: e }) => Uj(e),
+ queryKey: Oj,
+ queryFn: ({ signal: e }) => Aj(e),
staleTime: 0
}).catch(() => null), e.fetchQuery({
- queryKey: Hj,
- queryFn: ({ signal: e }) => Wj(e),
+ queryKey: kj,
+ queryFn: ({ signal: e }) => jj(e),
staleTime: 0
}).catch(() => null), e.fetchQuery({
- queryKey: Bj,
- queryFn: ({ signal: e }) => Nue(e),
+ queryKey: Dj,
+ queryFn: ({ signal: e }) => xue(e),
staleTime: 0
}).catch(() => null);
}
-function Gj() {
+function Mj() {
return OS({
- mutationFn: (e) => K(Lj, e),
- onSuccess: (e) => z.setQueryData(Bj, e)
+ mutationFn: (e) => K(wj, e),
+ onSuccess: (e) => z.setQueryData(Dj, e)
});
}
-function Fue() {
+function Cue() {
return OS({
- mutationFn: (e) => K(Rj, {
+ mutationFn: (e) => K(Tj, {
enabled: e > 0,
interval_minutes: e || 60
}),
- onSuccess: (e) => z.setQueryData(Vj, e)
+ onSuccess: (e) => z.setQueryData(Oj, e)
});
}
-function Iue() {
+function wue() {
return OS({
- mutationFn: (e) => K(zj, { mode: e }),
- onSuccess: (e) => z.setQueryData(Hj, e)
+ mutationFn: (e) => K(Ej, { mode: e }),
+ onSuccess: (e) => z.setQueryData(kj, e)
});
}
-function Lue(e) {
- return e.available ? e.running ? "正在检查全部来源…" : e.last_error ? `上次失败:${e.last_error}` : e.last_finished_at ? `上次完成 ${mj(e.last_finished_at)} · 新增 ${e.last_added || 0}` : e.next_run_at ? `下次 ${mj(e.next_run_at)}` : e.enabled ? "等待首次运行" : "已关闭" : "只在账本写入端运行";
+function Tue(e) {
+ return e.available ? e.running ? "正在检查全部来源…" : e.last_error ? `上次失败:${e.last_error}` : e.last_finished_at ? `上次完成 ${tj(e.last_finished_at)} · 新增 ${e.last_added || 0}` : e.next_run_at ? `下次 ${tj(e.next_run_at)}` : e.enabled ? "等待首次运行" : "已关闭" : "只在账本写入端运行";
}
-function Rue(e) {
+function Eue(e) {
return e.status === "running" ? "正在采集,进度在活动页查看。" : e.status === "failed" ? `上一轮采集停下了:${e.stopped || "原因未取得"}` : e.status === "complete" ? e.stopped ? "上一轮采集已按停。" : "上一轮采集已完成。" : e.mode === "off" ? "关闭时不采集;已经生成的图留在盘上,清理走数据管理页。" : "选定档位后从最近看过的片子开始采集。";
}
//#endregion
//#region src/react/data-cleanup/organize.ts
-var zue = "/api/organize", Bue = "/api/organize/preview", Vue = "/api/organize/apply", Hue = "/api/organize/rollback", Kj = ["organize"], qj = (e) => G(zue, e);
-async function Uue(e) {
+var Due = "/api/organize", Oue = "/api/organize/preview", kue = "/api/organize/apply", Aue = "/api/organize/rollback", Nj = ["organize"], Pj = (e) => G(Due, e);
+async function jue(e) {
await z.fetchQuery({
- queryKey: Kj,
- queryFn: () => qj(e)
+ queryKey: Nj,
+ queryFn: () => Pj(e)
});
}
-var Wue = (e) => K(Bue, e), Gue = (e) => e.kind === "apply" ? K(Vue, {
+var Mue = (e) => K(Oue, e), Nue = (e) => e.kind === "apply" ? K(kue, {
...e.request,
confirm: !0
-}) : K(Hue, { confirm: !0 });
-async function Kue(e) {
- z.setQueryData(Kj, (t) => t && {
+}) : K(Aue, { confirm: !0 });
+async function Pue(e) {
+ z.setQueryData(Nj, (t) => t && {
...t,
templates: e
});
try {
- await K(Lj, { organizeTemplates: e });
+ await K(wj, { organizeTemplates: e });
} catch {}
}
-var que = (e, t) => e && {
+var Fue = (e, t) => e && {
...e,
...t
-}, Jue = /目录模板|分隔符|盘符|`\.`/;
-function Jj(e) {
+}, Iue = /目录模板|分隔符|盘符|`\.`/;
+function Fj(e) {
let t = String(e || "");
return t.slice(Math.max(t.lastIndexOf("\\"), t.lastIndexOf("/")) + 1);
}
-var Yj = (e) => Number(e || 0).toLocaleString();
-function Yue(e) {
- let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${Yj(t)}`).join(" · ");
- return Number(e.counts?.change || 0) ? `${Yj(e.counts.change)} 个文件会改名或移动,${Yj(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
+var Ij = (e) => Number(e || 0).toLocaleString();
+function Lue(e) {
+ let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${Ij(t)}`).join(" · ");
+ return Number(e.counts?.change || 0) ? `${Ij(e.counts.change)} 个文件会改名或移动,${Ij(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
}
-function Xj(e) {
+function Lj(e) {
let t = e.restored !== void 0, n = Number(e.failed || 0), r = Number(t ? e.restored : e.moved || 0);
return {
- text: t ? `已退回 ${Yj(r)} 个文件${n ? `,${Yj(n)} 行未能退回` : ""}。` : `已整理 ${Yj(r)} 个文件${n ? `,${Yj(n)} 行未能处理` : ""}。`,
+ text: t ? `已退回 ${Ij(r)} 个文件${n ? `,${Ij(n)} 行未能退回` : ""}。` : `已整理 ${Ij(r)} 个文件${n ? `,${Ij(n)} 行未能处理` : ""}。`,
failed: n,
rollback: t
};
}
//#endregion
//#region src/react/data-cleanup/resource-sync.ts
-var Zj = "/api/resource-sync/scan", Qj = "/api/resource-sync/apply", $j = ["resource-sync", "scan"], eM = ["resource-sync", "apply"], tM = (e) => K(Zj, {
+var Rj = "/api/resource-sync/scan", zj = "/api/resource-sync/apply", Bj = ["resource-sync", "scan"], Vj = ["resource-sync", "apply"], Hj = (e) => K(Rj, {
background: !0,
status_only: !0
-}, "POST", e), Xue = () => K(Zj, {
+}, "POST", e), Rue = () => K(Rj, {
background: !0,
restart: !0
-}), nM = (e) => G(Qj, e), Zue = (e) => K(Qj, {
+}), Uj = (e) => G(zj, e), zue = (e) => K(zj, {
confirm: !0,
clean_cache: !0,
scan_id: e,
background: !0
-}), rM = (e) => (e?.sources ?? []).some((e) => Lle.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
-async function Que(e) {
- rM(z.getQueryData(tt)) && await Promise.all([z.fetchQuery({
- queryKey: $j,
- queryFn: () => tM(e)
+}), Wj = (e) => (e?.sources ?? []).some((e) => Tle.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
+async function Bue(e) {
+ Wj(z.getQueryData(tt)) && await Promise.all([z.fetchQuery({
+ queryKey: Bj,
+ queryFn: () => Hj(e)
}), z.fetchQuery({
- queryKey: eM,
- queryFn: () => nM(e)
+ queryKey: Vj,
+ queryFn: () => Uj(e)
})]);
}
-var $ue = (e) => !!(e?.missing || e?.empty || e?.cache?.files), ede = {
+var Vue = (e) => !!(e?.missing || e?.empty || e?.cache?.files), Hue = {
local: "本地磁盘",
115: "115",
pikpak: "PikPak"
-}, iM = (e) => Number(e || 0).toLocaleString(), tde = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", aM = (e) => e.purge ?? Number(e.missing || 0) - Number(e.vanish || 0), oM = (e) => e.vanish ? `${iM(e.vanish)} 条带个人记录的标为已消失,记录留着,可在孤儿记录里接到新文件或彻底删除。` : "", sM = (e) => e.vanish ? "这几样不可撤销。" : "这一步不可撤销。", nde = (e) => `将永久删除文件已不在盘上的 ${iM(aM(e))} 条记录和 ${iM(e.empty)} 个空文件夹,并清理 ${iM(e.cache?.files)} 个闲置缓存。${sM(e)}${oM(e)}`, rde = (e) => `将永久删除文件已不在盘上的 ${iM(aM(e))} 条记录(含回收站里的)、${iM(e.empty)} 个空文件夹,并清理 ${iM(e.cache?.files)} 个闲置缓存。来源根目录保留。${sM(e)}${oM(e)}`, ide = (e) => e.online ? [
- `找不到文件 · 共 ${iM(e.total)} 项`,
- e.vanish ? `${iM(e.vanish)} 项带个人记录` : "",
- e.empty ? `空文件夹 ${iM(e.empty)} 个` : "",
- e.unreadable ? `${iM(e.unreadable)} 个目录读取失败,已跳过` : ""
-].filter(Boolean).join(" · ") : `馆藏中有 ${iM(e.total)} 项`;
-function cM(e) {
+}, Gj = (e) => Number(e || 0).toLocaleString(), Uue = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", Kj = (e) => e.purge ?? Number(e.missing || 0) - Number(e.vanish || 0), qj = (e) => e.vanish ? `${Gj(e.vanish)} 条带个人记录的标为已消失,记录留着,可在孤儿记录里接到新文件或彻底删除。` : "", Jj = (e) => e.vanish ? "这几样不可撤销。" : "这一步不可撤销。", Wue = (e) => `将永久删除文件已不在盘上的 ${Gj(Kj(e))} 条记录和 ${Gj(e.empty)} 个空文件夹,并清理 ${Gj(e.cache?.files)} 个闲置缓存。${Jj(e)}${qj(e)}`, Gue = (e) => `将永久删除文件已不在盘上的 ${Gj(Kj(e))} 条记录(含回收站里的)、${Gj(e.empty)} 个空文件夹,并清理 ${Gj(e.cache?.files)} 个闲置缓存。来源根目录保留。${Jj(e)}${qj(e)}`, Kue = (e) => e.online ? [
+ `找不到文件 · 共 ${Gj(e.total)} 项`,
+ e.vanish ? `${Gj(e.vanish)} 项带个人记录` : "",
+ e.empty ? `空文件夹 ${Gj(e.empty)} 个` : "",
+ e.unreadable ? `${Gj(e.unreadable)} 个目录读取失败,已跳过` : ""
+].filter(Boolean).join(" · ") : `馆藏中有 ${Gj(e.total)} 项`;
+function Yj(e) {
let t = e.blocked ?? [], n = Number(e.dir_errors || 0), r = e.cache_blocked ?? [], i = Number(e.purged || 0) + Number(e.vanished || 0) + Number(e.reattached || 0) + Number(e.dirs_removed || 0) + Number(e.cache_removed || 0), a = t.length + n + r.length, o = t.slice(0, 3).map((e) => `「${e.name}」`).join("、") + (t.length > 3 ? " 等" : "");
return {
done: i,
left: a,
rest: [
- t.length ? `${iM(t.length)} 条记录没有删除(${o})` : "",
- n ? `${iM(n)} 个文件夹没有删除` : "",
- r.length ? `${iM(r.length)} 个缓存没有清理` : ""
+ t.length ? `${Gj(t.length)} 条记录没有删除(${o})` : "",
+ n ? `${Gj(n)} 个文件夹没有删除` : "",
+ r.length ? `${Gj(r.length)} 个缓存没有清理` : ""
].filter(Boolean).join(",")
};
}
-var ade = (e, t) => {
- let { rest: n } = cM(e), r = `已永久删除 ${iM(e.purged)} 条失效记录和 ${iM(e.dirs_removed)} 个空文件夹,清理 ${iM(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。` + (e.vanished ? `${iM(e.vanished)} 条带个人记录的已标为已消失,可在孤儿记录里处理。` : "") + (e.reattached ? `${iM(e.reattached)} 条的记录已接到库里的另一个版本。` : "");
+var que = (e, t) => {
+ let { rest: n } = Yj(e), r = `已永久删除 ${Gj(e.purged)} 条失效记录和 ${Gj(e.dirs_removed)} 个空文件夹,清理 ${Gj(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。` + (e.vanished ? `${Gj(e.vanished)} 条带个人记录的已标为已消失,可在孤儿记录里处理。` : "") + (e.reattached ? `${Gj(e.reattached)} 条的记录已接到库里的另一个版本。` : "");
return n ? `${r}${n},重新检查后可再试。` : r;
-}, ode = "/api/review?counts=1", lM = ["review", "counts"], sde = "/api/ads?limit=1", uM = ["junk-summary"], dM = "/api/items?state=trash&limit=1", fM = ["trash-summary"], cde = [
+}, Jue = "/api/review?counts=1", Xj = ["review", "counts"], Yue = "/api/ads?limit=1", Zj = ["junk-summary"], Qj = "/api/items?state=trash&limit=1", $j = ["trash-summary"], Xue = [
["video", "视频"],
["image", "图片"],
["archive", "压缩包"],
["audio", "音频"],
["url", "网址"],
["other", "其它"]
-], pM = (e) => G(ode, e), mM = (e) => G(sde, e), hM = (e) => {
+], eM = (e) => G(Jue, e), tM = (e) => G(Yue, e), nM = (e) => {
let t = sessionStorage.getItem("peach.library");
- return G(t ? `${dM}&library=${encodeURIComponent(t)}` : dM, e);
-}, gM = (e) => Number(e || 0).toLocaleString();
-function lde(e) {
- let t = gj, n = Object.entries(e?.counts ?? {}).map(([e, n]) => [t[e] || e, Number(n) || 0]).filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]), r = n.reduce((e, [, t]) => e + t, 0), i = n.slice(0, 3).map(([e, t]) => `${e} ${t.toLocaleString()}`), a = n.slice(3).reduce((e, [, t]) => e + t, 0);
+ return G(t ? `${Qj}&library=${encodeURIComponent(t)}` : Qj, e);
+}, rM = (e) => Number(e || 0).toLocaleString();
+function Zue(e) {
+ let t = rj, n = Object.entries(e?.counts ?? {}).map(([e, n]) => [t[e] || e, Number(n) || 0]).filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]), r = n.reduce((e, [, t]) => e + t, 0), i = n.slice(0, 3).map(([e, t]) => `${e} ${t.toLocaleString()}`), a = n.slice(3).reduce((e, [, t]) => e + t, 0);
return a && i.push(`其余 ${a.toLocaleString()}`), {
figure: `${r.toLocaleString()} 条待复核`,
meta: i.join(" · ")
};
}
-function ude(e) {
+function Que(e) {
if (!e) return "";
- let t = cde.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${gM(e.counts[t])}`);
- return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${gM(e.dismissed_total)}`), t.join(" · ");
-}
-var dde = [
- [lM, ({ signal: e }) => pM(e)],
- [lj, ({ signal: e }) => uj(e)],
- [fM, ({ signal: e }) => hM(e)],
- [Oj, ({ signal: e }) => Nj(e)],
- [kj, ({ signal: e }) => Pj(e)],
- [Aj, ({ signal: e }) => Fj(e)]
+ let t = Xue.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${rM(e.counts[t])}`);
+ return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${rM(e.dismissed_total)}`), t.join(" · ");
+}
+var $ue = [
+ [Xj, ({ signal: e }) => eM(e)],
+ [XA, ({ signal: e }) => ZA(e)],
+ [$j, ({ signal: e }) => nM(e)],
+ [hj, ({ signal: e }) => bj(e)],
+ [gj, ({ signal: e }) => xj(e)],
+ [_j, ({ signal: e }) => Sj(e)]
];
-async function fde(e) {
- let t = location.hash === "#resource-sync", n = dde.map(([n, r]) => {
+async function ede(e) {
+ let t = location.hash === "#resource-sync", n = $ue.map(([n, r]) => {
if (t) return z.fetchQuery({
queryKey: n,
queryFn: () => r({ signal: e })
@@ -26948,40 +26451,40 @@ async function fde(e) {
await Promise.all([
...n,
z.fetchQuery({
- queryKey: uM,
- queryFn: () => mM(e)
+ queryKey: Zj,
+ queryFn: () => tM(e)
}),
z.fetchQuery({
- queryKey: UA,
- queryFn: () => GA(e)
+ queryKey: AA,
+ queryFn: () => MA(e)
}),
- HA(e).then(() => Que(e)),
- QA(e),
- eue(e),
- Uue(e)
+ kA(e).then(() => Bue(e)),
+ zA(e),
+ Hle(e),
+ jue(e)
]);
}
//#endregion
//#region src/react/components/stat-card.tsx
-var pde = [
+var tde = [
"text-chart-6",
"text-chart-5",
"text-chart-7",
"text-chart-8"
-], mde = [
+], nde = [
"bg-chart-6/10",
"bg-chart-5/10",
"bg-chart-7/10",
"bg-chart-8/10"
];
-function _M(e = {}) {
+function iM(e = {}) {
return `${wE({
...e,
padding: "none"
})} flex flex-col overflow-hidden pt-4 text-left`;
}
-var vM = "inline-grid w-full grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4", hde = "inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6";
-function yM({ interactive: e = !1 } = {}) {
+var aM = "inline-grid w-full grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4", rde = "inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6";
+function oM({ interactive: e = !1 } = {}) {
return wE({
padding: "none",
radius: "plain",
@@ -26989,8 +26492,8 @@ function yM({ interactive: e = !1 } = {}) {
className: "flex min-h-33 flex-col gap-2 p-4 text-left"
});
}
-var gde = "inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1";
-function bM({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta: o = !1 }) {
+var ide = "inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1";
+function sM({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta: o = !1 }) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-2 text-body-medium text-text-secondary",
@@ -27023,13 +26526,13 @@ function bM({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta
})
] });
}
-function xM({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
+function cM({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-2 px-4 text-body-regular text-text-secondary max-sm:gap-1.5 max-sm:px-3",
children: [t ? /* @__PURE__ */ (0, V.jsx)("i", {
"aria-hidden": !0,
- className: `flex size-7 shrink-0 items-center justify-center rounded-lg max-sm:size-6 ${pde[n % 4]} ${mde[n % 4]}`,
+ className: `flex size-7 shrink-0 items-center justify-center rounded-lg max-sm:size-6 ${tde[n % 4]} ${nde[n % 4]}`,
children: /* @__PURE__ */ (0, V.jsx)(t, {
"aria-hidden": !0,
className: "size-4"
@@ -27051,80 +26554,91 @@ function xM({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
}
//#endregion
//#region src/react/components/menu-dialog.tsx
-function SM(e) {
- let t = uA("hover");
- return /* @__PURE__ */ (0, V.jsx)(DO, {
+function lM(e) {
+ let t = Qk("hover");
+ return /* @__PURE__ */ (0, V.jsx)(fk, {
...e,
ref: t
});
}
+//#endregion
+//#region src/react/boardui/components/base/dropdown/menu-styles.ts
+var uM = [
+ "max-w-[calc(100vw-32px)] overflow-y-auto",
+ "rounded-2xl border border-border-button-default bg-background-primary-default p-2.5 shadow-dropdown",
+ "transition duration-150 ease-out",
+ "data-[entering]:opacity-0 data-[entering]:scale-95 data-[entering]:blur-[2px]",
+ "data-[exiting]:opacity-0 data-[exiting]:scale-95 data-[exiting]:blur-[2px]",
+ "data-[placement=bottom]:origin-top-left data-[placement=top]:origin-bottom-left",
+ "data-[placement=left]:origin-right data-[placement=right]:origin-left"
+].join(" "), ade = "w-[266px]", ode = "flex w-full flex-col gap-1 outline-none", dM = ["flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left", "text-text-primary outline-none transition-colors"].join(" "), fM = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
({
medium: "h-9 rounded-2lg p-2 text-body-medium",
small: "h-8 rounded-lg px-2 py-1.5 text-body-medium"
}).medium;
//#endregion
//#region src/management.ts
-var _de = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", vde = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", yde = wE({
+var sde = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", cde = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", lde = wE({
padding: "none",
bordered: "line",
className: "overflow-hidden"
-}), bde = {
+}), ude = {
split: "min-w-0 p-6",
stack: "flex min-h-30 min-w-0 flex-1 flex-col px-5 pt-5 pb-4 max-cleanup-tight:min-h-0 max-cleanup-tight:p-4.5"
-}, xde = {
+}, dde = {
split: "flex flex-wrap items-center justify-end gap-2 self-stretch p-6 max-[1001px]:justify-start max-[1001px]:pt-0",
stack: "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t border-border-button-default bg-card-footer px-5 py-3 max-cleanup-tight:px-4.5"
-}, Sde = "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t px-5 py-3", Cde = {
+}, fde = "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t px-5 py-3", pde = {
neutral: "border-border-button-default bg-card-footer",
error: "border-border-error-default bg-background-tertiary-error"
-}, wde = wE({
+}, mde = wE({
padding: "none",
radius: "surface",
bordered: "line",
className: "overflow-hidden"
-}), CM = "border-t border-border-button-default p-4 first:border-t-0";
-function wM({ tone: e = "neutral", status: t, children: n }) {
+}), pM = "border-t border-border-button-default p-4 first:border-t-0";
+function mM({ tone: e = "neutral", status: t, children: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: `${Sde} ${Cde[e]}`,
+ className: `${fde} ${pde[e]}`,
children: [t ? /* @__PURE__ */ (0, V.jsx)("p", {
className: `mr-auto min-w-0 text-caption-1-regular ${e === "error" ? "text-text-error-primary" : "text-text-secondary"}`,
children: t
}) : null, n]
});
}
-function TM({ id: e, children: t }) {
+function hM({ id: e, children: t }) {
return /* @__PURE__ */ (0, V.jsx)("h2", {
id: e,
className: "text-title-2-medium! m-0! text-text-primary",
children: t
});
}
-function EM({ id: e, gap: t = "none", children: n }) {
+function gM({ id: e, gap: t = "none", children: n }) {
return /* @__PURE__ */ (0, V.jsx)("h3", {
id: e,
className: `text-title-2-medium text-text-primary ${t === "medium" ? "mb-3" : t === "small" ? "mb-2" : ""}`,
children: n
});
}
-function DM({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
+function _M({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
return /* @__PURE__ */ (0, V.jsxs)("section", {
id: r,
"aria-label": t,
"aria-labelledby": n,
...o,
- className: `${yde} ${e === "split" ? "fieldset-split" : "flex flex-col"}`,
+ className: `${lde} ${e === "split" ? "fieldset-split" : "flex flex-col"}`,
children: [/* @__PURE__ */ (0, V.jsx)("div", {
- className: bde[e],
+ className: ude[e],
children: a
}), i ? /* @__PURE__ */ (0, V.jsx)("footer", {
- className: xde[e],
+ className: dde[e],
children: i
}) : null]
});
}
//#endregion
//#region src/react/components/overlay-scrollbar.ts
-function OM() {
+function vM() {
let e = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
Ce(e.current);
@@ -27132,7 +26646,7 @@ function OM() {
}
//#endregion
//#region src/react/boardui/components/base/buttons/icon-button.tsx
-var kM = yE({
+var yM = yE({
base: [
"relative inline-flex shrink-0 items-center justify-center overflow-visible rounded-2lg",
"bg-background-primary-default text-foreground-icon-primary",
@@ -27153,21 +26667,21 @@ var kM = yE({
small: "size-4 shrink-0"
}
});
-function AM({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
+function bM({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
return /* @__PURE__ */ (0, V.jsx)("button", {
ref: i,
type: r,
- className: vE(kM.base, kM.size[t], n),
+ className: vE(yM.base, yM.size[t], n),
...a,
children: /* @__PURE__ */ (0, V.jsx)(e, {
- className: kM.icon[t],
+ className: yM.icon[t],
"aria-hidden": !0
})
});
}
//#endregion
//#region src/react/components/path-line.tsx
-function Tde({ className: e }) {
+function hde({ className: e }) {
return /* @__PURE__ */ (0, V.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -27180,8 +26694,8 @@ function Tde({ className: e }) {
children: /* @__PURE__ */ (0, V.jsx)("use", { href: "#i-folder-open" })
});
}
-var Ede = "打开文件管理器失败,请重试";
-function jM({ path: e, prefix: t, className: n, onRevealed: r }) {
+var gde = "打开文件管理器失败,请重试";
+function xM({ path: e, prefix: t, className: n, onRevealed: r }) {
let [i, a] = (0, B.useState)(!1), [o, s] = (0, B.useState)(""), c = (0, B.useRef)(!0);
(0, B.useEffect)(() => () => {
c.current = !1;
@@ -27192,7 +26706,7 @@ function jM({ path: e, prefix: t, className: n, onRevealed: r }) {
try {
await K("/api/reveal", { path: e }), r?.("已在资源管理器中显示");
} catch (e) {
- c.current && s(e instanceof jS ? e.message : Ede);
+ c.current && s(e instanceof jS ? e.message : gde);
} finally {
c.current && a(!1);
}
@@ -27205,8 +26719,8 @@ function jM({ path: e, prefix: t, className: n, onRevealed: r }) {
children: [/* @__PURE__ */ (0, V.jsxs)("p", {
className: vE("min-w-0 break-all", n),
children: [t, e]
- }), /* @__PURE__ */ (0, V.jsx)(AM, {
- icon: Tde,
+ }), /* @__PURE__ */ (0, V.jsx)(bM, {
+ icon: hde,
size: "small",
className: "shrink-0",
"aria-label": "在资源管理器中显示",
@@ -27221,7 +26735,7 @@ function jM({ path: e, prefix: t, className: n, onRevealed: r }) {
}
//#endregion
//#region src/react/components/task-progress.tsx
-function MM({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
+function SM({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-task-progress": !0,
className: r ? "flex flex-col gap-1.5" : wE({
@@ -27241,18 +26755,18 @@ function MM({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
}
//#endregion
//#region src/react/library-processing/use-library-processing.ts
-function NM({ toast: e, mode: t, monitor: n }) {
+function CM({ toast: e, mode: t, monitor: n }) {
let r = t === "notice" || !!n, i = TS({
- queryKey: XA,
- queryFn: ({ signal: e }) => ZA(e),
- refetchInterval: (e) => qle(e.state.data, r)
+ queryKey: LA,
+ queryFn: ({ signal: e }) => RA(e),
+ refetchInterval: (e) => Fle(e.state.data, r)
}), [a, o] = (0, B.useState)(null), s = (0, B.useRef)(void 0), c = i.data;
return (0, B.useEffect)(() => {
if (!c) return;
let n = s.current;
s.current = c.status;
let r = n === "running" && c.status !== "running";
- r && o(c), (r || t === "notice") && Qle(c, e, r);
+ r && o(c), (r || t === "notice") && Ble(c, e, r);
}, [
c,
t,
@@ -27265,29 +26779,29 @@ function NM({ toast: e, mode: t, monitor: n }) {
}
//#endregion
//#region src/react/library-processing/library-processing-card.tsx
-var Dde = [
+var _de = [
{
label: "扫描并补全资料",
- icon: gT,
+ icon: hT,
command: {}
},
{
label: "只扫描",
- icon: bT,
+ icon: yT,
command: { stage: "scan" }
},
{
label: "只采集",
- icon: cae,
+ icon: lae,
command: { stage: "collect" }
}
-], Ode = vE(bk, xk, "text-body-2-medium"), kde = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", Ade = (e) => {
+], vde = vE(dM, fM, "text-body-2-medium"), yde = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", bde = (e) => {
let t = e.performer_aliases || 0, n = e.performer_avatars || 0, r = e.performer_profile_conflicts || 0, i = e.performer_profile_failed || 0;
if (!t && !n && !r && !i) return "";
let a = [`补齐女优资料:别名 ${t} 个,头像 ${n} 张`];
return r && a.push(`${r} 个同名冲突交回人工`), i && a.push(`${i} 张头像未取得`), `${a.join(",")}。`;
-}, jde = (e) => `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条。` + Ade(e);
-function Mde({ busy: e, onRun: t }) {
+}, xde = (e) => `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条。` + bde(e);
+function Sde({ busy: e, onRun: t }) {
let n = (0, B.useRef)(null), [r, i] = (0, B.useState)(!1), a = (n) => {
e || (i(!1), t(n));
};
@@ -27296,7 +26810,7 @@ function Mde({ busy: e, onRun: t }) {
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, V.jsx)(J, {
- leadingIcon: gT,
+ leadingIcon: hT,
onClick: () => a({}),
...X(e),
children: "扫描并补全资料"
@@ -27312,19 +26826,19 @@ function Mde({ busy: e, onRun: t }) {
e || i(!0);
}
})]
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
triggerRef: n,
isOpen: r,
onOpenChange: i,
placement: "bottom end",
offset: 4,
- className: yk,
- children: /* @__PURE__ */ (0, V.jsx)(SM, {
+ className: uM,
+ children: /* @__PURE__ */ (0, V.jsx)(lM, {
"aria-label": "更多扫描与采集方式",
className: "flex w-52 flex-col gap-1 outline-none",
- children: Dde.map(({ label: e, icon: t, command: n }) => /* @__PURE__ */ (0, V.jsxs)("button", {
+ children: _de.map(({ label: e, icon: t, command: n }) => /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
- className: Ode,
+ className: vde,
onClick: () => a(n),
children: [/* @__PURE__ */ (0, V.jsx)(t, {
"aria-hidden": !0,
@@ -27334,8 +26848,8 @@ function Mde({ busy: e, onRun: t }) {
})
})] });
}
-function Nde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
- let a = Xle(e), o = e.status === "failed" && !!e.retryable_asset_ids?.length, s = Yle(e.notes || {}), c = OM();
+function Cde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
+ let a = Rle(e), o = e.status === "failed" && !!e.retryable_asset_ids?.length, s = Lle(e.notes || {}), c = vM();
return /* @__PURE__ */ (0, V.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-4 empty:hidden",
@@ -27343,7 +26857,7 @@ function Nde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
e.status === "running" && e.stalled ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "warning",
title: "处理较慢",
- children: kde
+ children: yde
}) : null,
t || e.status === "failed" ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
@@ -27355,7 +26869,7 @@ function Nde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
}) : null,
extra: a ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "mt-1.5 border-t border-current/20 pt-1.5",
- children: /* @__PURE__ */ (0, V.jsxs)(Bk, {
+ children: /* @__PURE__ */ (0, V.jsxs)(GE, {
summary: a.label,
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "relative",
@@ -27386,7 +26900,7 @@ function Nde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
})
}), a.log ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "mt-2 border-t border-current/20 pt-2 text-text-secondary",
- children: /* @__PURE__ */ (0, V.jsx)(jM, {
+ children: /* @__PURE__ */ (0, V.jsx)(xM, {
path: a.log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -27400,13 +26914,13 @@ function Nde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
n?.status === "complete" ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "success",
title: "处理完成",
- children: jde(n)
+ children: xde(n)
}) : null,
e.status !== "running" && s ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
extra: e.issues_log ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "mt-1.5 border-t border-current/20 pt-1.5 text-text-secondary",
- children: /* @__PURE__ */ (0, V.jsx)(jM, {
+ children: /* @__PURE__ */ (0, V.jsx)(xM, {
path: e.issues_log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -27418,38 +26932,38 @@ function Nde({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
]
});
}
-function PM(e) {
- let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = NM(e), o = OS({
- mutationFn: (e) => K(YA, e),
+function wM(e) {
+ let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = CM(e), o = OS({
+ mutationFn: (e) => K(IA, e),
onSuccess: (e) => {
- a(), z.setQueryData(XA, e), z.invalidateQueries({ queryKey: XA });
+ a(), z.setQueryData(LA, e), z.invalidateQueries({ queryKey: LA });
}
});
(0, B.useEffect)(() => {
i && n?.();
}, [i, n]);
- let s = r.data ?? { status: "idle" }, c = o.error ? W(o.error) : r.isError ? r.data ? $A : W(r.error) : "", l = o.isPending || s.status === "running", u = tj(s), d = (e) => {
+ let s = r.data ?? { status: "idle" }, c = o.error ? W(o.error) : r.isError ? r.data ? BA : W(r.error) : "", l = o.isPending || s.status === "running", u = HA(s), d = (e) => {
l || (o.reset(), o.mutate(e));
};
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, V.jsx)(DM, {
+ children: [/* @__PURE__ */ (0, V.jsx)(_M, {
layout: "stack",
label: "扫描与采集",
footer: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- /* @__PURE__ */ (0, V.jsx)(kk, {
+ /* @__PURE__ */ (0, V.jsx)(PE, {
href: "/scraping",
size: "small",
trailingIcon: lT,
children: "来源和凭证"
}),
- s.candidates ? /* @__PURE__ */ (0, V.jsx)(kk, {
+ s.candidates ? /* @__PURE__ */ (0, V.jsx)(PE, {
href: "/review",
size: "small",
trailingIcon: lT,
children: "复核资料"
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Mde, {
+ /* @__PURE__ */ (0, V.jsx)(Sde, {
busy: l,
onRun: d
})
@@ -27457,12 +26971,12 @@ function PM(e) {
children: /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(EM, { children: "扫描与采集" }),
+ /* @__PURE__ */ (0, V.jsx)(gM, { children: "扫描与采集" }),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: _de
+ children: sde
}),
- s.status === "running" ? /* @__PURE__ */ (0, V.jsx)(MM, {
+ s.status === "running" ? /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: u,
value: s.checked,
@@ -27470,7 +26984,7 @@ function PM(e) {
}) : null
]
})
- }), /* @__PURE__ */ (0, V.jsx)(Nde, {
+ }), /* @__PURE__ */ (0, V.jsx)(Cde, {
state: s,
problem: c,
settled: i,
@@ -27485,10 +26999,110 @@ function PM(e) {
});
}
//#endregion
+//#region src/react/boardui/components/foundations/icons/chevrons.tsx
+function wde(e) {
+ return /* @__PURE__ */ (0, V.jsx)("svg", {
+ viewBox: "0 0 16 16",
+ fill: "none",
+ "aria-hidden": !0,
+ ...e,
+ children: /* @__PURE__ */ (0, V.jsx)("path", {
+ d: "M4 7L7.29289 10.2929C7.68342 10.6834 8.31658 10.6834 8.70711 10.2929L12 7",
+ stroke: "currentColor",
+ strokeWidth: "2",
+ strokeLinecap: "round"
+ })
+ });
+}
+function Tde(e) {
+ return /* @__PURE__ */ (0, V.jsx)("svg", {
+ viewBox: "0 0 24 24",
+ fill: "none",
+ "aria-hidden": !0,
+ ...e,
+ children: /* @__PURE__ */ (0, V.jsx)("path", {
+ d: "M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z",
+ fill: "currentColor"
+ })
+ });
+}
+//#endregion
+//#region src/react/boardui/utils/use-dismiss-on-outside-press.ts
+function Ede(e, t, n) {
+ (0, B.useEffect)(() => {
+ if (!e) return;
+ let r = (e) => {
+ let r = e.target;
+ n.some((e) => e.current?.contains(r)) || t();
+ };
+ return document.addEventListener("pointerdown", r, !0), () => document.removeEventListener("pointerdown", r, !0);
+ }, [
+ e,
+ t,
+ n
+ ]);
+}
+function Dde(e, t) {
+ let n = (0, B.useRef)(!1);
+ return (0, B.useEffect)(() => {
+ if (!e) return;
+ let r = (e) => {
+ t.current?.contains(e.target) && (n.current = !0, setTimeout(() => {
+ n.current = !1;
+ }, 400));
+ };
+ return document.addEventListener("pointerdown", r, !0), () => document.removeEventListener("pointerdown", r, !0);
+ }, [e, t]), (e) => e && n.current ? (n.current = !1, !1) : !0;
+}
+//#endregion
+//#region src/react/boardui/components/base/select/select.tsx
+var TM = (0, B.createContext)("md");
+function EM({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
+ let l = (0, B.useRef)(null), u = (0, B.useRef)(null), [d, f] = (0, B.useState)(!1);
+ Ede(d, () => f(!1), [l, u]);
+ let p = Dde(d, l);
+ return /* @__PURE__ */ (0, V.jsx)(Zse, {
+ ref: s,
+ ...c,
+ isOpen: d,
+ onOpenChange: (e) => p(e) && f(e),
+ className: vE("group flex flex-col", e),
+ children: ({ isOpen: e }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)(PD, {
+ ref: l,
+ className: vE("flex w-full cursor-pointer items-center justify-between rounded-2lg", "border border-border-button-default bg-background-primary-default shadow-xs", "text-text-primary", "transition-[background-color,border-color,box-shadow,padding,font-size] duration-200 ease", "hover:bg-background-primary-hover hover:border-border-button-hover", "outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring", "disabled:cursor-not-allowed disabled:bg-background-primary-disabled disabled:text-text-tertiary disabled:shadow-none", r === "sm" ? "gap-1 px-[7px] py-1 text-body-2-medium" : "gap-1.5 px-2.5 py-2 text-body-medium", t),
+ children: [/* @__PURE__ */ (0, V.jsx)(ece, {
+ className: vE("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
+ children: o
+ }), /* @__PURE__ */ (0, V.jsx)(wde, { className: vE("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
+ ref: u,
+ isNonModal: !0,
+ offset: 4,
+ className: vE(ade, uM, "p-2", n),
+ children: /* @__PURE__ */ (0, V.jsx)(vse, {
+ items: a,
+ className: vE(ode, "max-h-[240px] overflow-auto"),
+ children: /* @__PURE__ */ (0, V.jsx)(TM.Provider, {
+ value: r,
+ children: i
+ })
+ })
+ })] })
+ });
+}
+function DM({ className: e, children: t, ...n }) {
+ let r = (0, B.useContext)(TM);
+ return /* @__PURE__ */ (0, V.jsx)(xse, {
+ ...n,
+ className: (t) => vE(dM, r === "sm" ? "px-2 py-1.5 text-body-2-medium" : "text-body-medium", (t.isFocused || t.isSelected) && "bg-dropdown-item-hover-background", t.isDisabled && "cursor-not-allowed text-text-disabled", typeof e == "function" ? e(t) : e),
+ children: t
+ });
+}
+//#endregion
//#region src/react/background-job.ts
-var FM = 2e3, Pde = (e) => e, Fde = (e, t) => t;
-function IM(e) {
- let { queryKey: t, jobOf: n = Pde, withJob: r = Fde, idlePollMs: i } = e, [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(e);
+var OM = 2e3, Ode = (e) => e, kde = (e, t) => t;
+function kM(e) {
+ let { queryKey: t, jobOf: n = Ode, withJob: r = kde, idlePollMs: i } = e, [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(e);
(0, B.useEffect)(() => {
l.current = e;
});
@@ -27497,7 +27111,7 @@ function IM(e) {
queryFn: ({ signal: e }) => l.current.queryFn({ signal: e }),
refetchInterval: (e) => {
let t = e.state.data;
- return t !== void 0 && n(t)?.status === "running" ? FM : i ?? !1;
+ return t !== void 0 && n(t)?.status === "running" ? OM : i ?? !1;
}
}), d = OS({
mutationFn: (e) => l.current.start(e),
@@ -27528,32 +27142,32 @@ function IM(e) {
}
//#endregion
//#region src/react/media-repair/media-repair-card.tsx
-var Ide = (e) => Se[e] || e, LM = (e) => z.setQueryData(ij, e);
-function Lde() {
+var Ade = (e) => Se[e] || e, AM = (e) => z.setQueryData(GA, e);
+function jde() {
let e = TS({
- queryKey: ij,
- queryFn: ({ signal: e }) => oj(e),
- refetchInterval: (e) => e.state.data?.status === "running" && FM
+ queryKey: GA,
+ queryFn: ({ signal: e }) => qA(e),
+ refetchInterval: (e) => e.state.data?.status === "running" && OM
}), t = TS({
- queryKey: aj,
- queryFn: ({ signal: e }) => sj(e)
- }), [n, r] = (0, B.useState)(""), i = AE(), a = e.data ?? $le, o = t.data ?? [], s = a.status === "running", c = o.find((e) => e.id === (s ? a.library : n)) ?? o.find((e) => e.id === a.library) ?? o[0], l = () => {
+ queryKey: KA,
+ queryFn: ({ signal: e }) => JA(e)
+ }), [n, r] = (0, B.useState)(""), i = AE(), a = e.data ?? Vle, o = t.data ?? [], s = a.status === "running", c = o.find((e) => e.id === (s ? a.library : n)) ?? o.find((e) => e.id === a.library) ?? o[0], l = () => {
c && Te({
title: `修复媒体库「${c.name}」`,
body: "缺时间戳表的片子另存一份修好的头,原文件不动;缺索引的片子重建后替换原文件,坏原件改名成同目录的隐藏文件(.文件名.peach-original)留着。" + (c.metered ? "这个库在计费来源上,每修一部都要把片子完整拉一遍。" : ""),
confirmLabel: "修复媒体库",
- onConfirm: async () => LM(await K(rj, {
+ onConfirm: async () => AM(await K(WA, {
library: c.id,
restart: !0
}))
});
- }, u = () => void i.run("stop", (e) => K(rj, { stop: !0 }, "POST", e), LM), d = tue(a), f = a.status === "complete", p = i.error || a.error || (e.error ? "读不到媒体修复的状态" : "");
+ }, u = () => void i.run("stop", (e) => K(WA, { stop: !0 }, "POST", e), AM), d = Ule(a), f = a.status === "complete", p = i.error || a.error || (e.error ? "读不到媒体修复的状态" : "");
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, V.jsx)(DM, {
+ children: [/* @__PURE__ */ (0, V.jsx)(_M, {
layout: "split",
label: "媒体修复",
- footer: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(Ck, {
+ footer: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "媒体库",
className: "w-48",
selectedKey: c?.id ?? null,
@@ -27561,10 +27175,10 @@ function Lde() {
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: o.map((e) => /* @__PURE__ */ (0, V.jsxs)(wk, {
+ children: o.map((e) => /* @__PURE__ */ (0, V.jsxs)(DM, {
id: e.id,
textValue: e.name,
- children: [/* @__PURE__ */ (0, V.jsx)(Vk, { mark: Ide(e.icon) }), e.name]
+ children: [/* @__PURE__ */ (0, V.jsx)(KE, { mark: Ade(e.icon) }), e.name]
}, e.id))
}), s ? /* @__PURE__ */ (0, V.jsx)(J, {
onClick: u,
@@ -27578,10 +27192,10 @@ function Lde() {
children: /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(EM, { children: "媒体修复" }),
+ /* @__PURE__ */ (0, V.jsx)(gM, { children: "媒体修复" }),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: vde
+ children: cde
}),
s && a.total ? /* @__PURE__ */ (0, V.jsx)(kE, {
label: "修复进度",
@@ -27607,7 +27221,7 @@ function Lde() {
f && a.missing_tool ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "warning",
title: "缺少 untrunc",
- children: nue(a)
+ children: Wle(a)
}) : null,
p ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
@@ -27619,7 +27233,7 @@ function Lde() {
}
//#endregion
//#region src/react/boardui/components/base/checkbox/checkbox-glyph.tsx
-var RM = {
+var jM = {
md: {
box: "size-4",
glyph: "size-4",
@@ -27633,8 +27247,8 @@ var RM = {
gap: "gap-1.5"
}
};
-function zM({ state: e, size: t = "md" }) {
- let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = RM[t], c = n || r, l = o && !a;
+function MM({ state: e, size: t = "md" }) {
+ let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = jM[t], c = n || r, l = o && !a;
return /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
className: vE("flex shrink-0 items-center justify-center rounded-sm", "transition-[background-color,border-color,box-shadow] duration-150 ease", s.box, c ? vE("bg-linear-to-b shadow-checkbox-selected", l ? "from-accent-400 to-accent-500" : "from-accent-500 to-accent-600") : vE("border bg-background-primary-default shadow-xs", l ? "border-border-checkbox-hover" : "border-border-checkbox-default"), a && "opacity-50", i && "ring-2 ring-border-focus-ring ring-offset-2"),
@@ -27661,13 +27275,13 @@ function zM({ state: e, size: t = "md" }) {
}
//#endregion
//#region src/react/boardui/components/base/checkbox/checkbox.tsx
-function BM({ className: e, children: t, size: n = "md", ref: r, ...i }) {
- let a = RM[n];
- return /* @__PURE__ */ (0, V.jsx)(Moe, {
+function NM({ className: e, children: t, size: n = "md", ref: r, ...i }) {
+ let a = jM[n];
+ return /* @__PURE__ */ (0, V.jsx)(ose, {
ref: r,
...i,
className: (t) => vE("group inline-flex items-center select-none", a.gap, t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
- children: (e) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(zM, {
+ children: (e) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(MM, {
state: e,
size: n
}), t != null && /* @__PURE__ */ (0, V.jsx)("span", {
@@ -27678,10 +27292,10 @@ function BM({ className: e, children: t, size: n = "md", ref: r, ...i }) {
}
//#endregion
//#region src/react/boardui/components/base/table/table.tsx
-function VM({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
+function PM({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
className: vE("w-full overflow-x-auto", n),
- children: /* @__PURE__ */ (0, V.jsx)(Bse, {
+ children: /* @__PURE__ */ (0, V.jsx)(mce, {
ref: r,
...i,
className: vE("bui-table", e === "sm" && "bui-table-sm", t)
@@ -27690,7 +27304,7 @@ function VM({ size: e = "md", className: t, containerClassName: n, ref: r, ...i
}
//#endregion
//#region src/react/components/row-click.ts
-var Rde = [
+var Mde = [
"a",
"button",
"input",
@@ -27703,15 +27317,15 @@ var Rde = [
"[role=\"link\"]",
"[role=\"menu\"]"
].join(",");
-function HM(e, t) {
+function FM(e, t) {
let n = e.target;
if (!(n instanceof Element) || !t.contains(n)) return !1;
- let r = n.closest(Rde);
+ let r = n.closest(Mde);
return !r || !t.contains(r) || r === t;
}
//#endregion
//#region src/react/components/data-table-frame.tsx
-function UM({ children: e, follow: t = !1, onRowClick: n }) {
+function IM({ children: e, follow: t = !1, onRowClick: n }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-board-data-table": !0,
"data-follow-table": t || void 0,
@@ -27719,15 +27333,15 @@ function UM({ children: e, follow: t = !1, onRowClick: n }) {
let t = e.target;
if (!(t instanceof Element)) return;
let r = t.closest("[role=\"row\"][data-key]");
- r && HM(e, r) && n(r.dataset.key);
+ r && FM(e, r) && n(r.dataset.key);
} : void 0,
children: e
});
}
//#endregion
//#region src/react/data-cleanup/link-manager.tsx
-var zde = vA("unlink"), WM = vA("rotate-cw"), Bde = "站点返回 404 或 410,确认这个地址不存在。", Vde = "站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。", Hde = "删除前会逐条重验一次;此操作不可撤销。", Ude = "暂时无法读取进度,正在重新连接…", GM = (e) => Number(e || 0).toLocaleString();
-function KM({ label: e, value: t, note: n }) {
+var Nde = oA("unlink"), LM = oA("rotate-cw"), Pde = "站点返回 404 或 410,确认这个地址不存在。", Fde = "站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。", Ide = "删除前会逐条重验一次;此操作不可撤销。", Lde = "暂时无法读取进度,正在重新连接…", RM = (e) => Number(e || 0).toLocaleString();
+function zM({ label: e, value: t, note: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 flex-col gap-0.5",
children: [
@@ -27746,11 +27360,11 @@ function KM({ label: e, value: t, note: n }) {
]
});
}
-function qM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a }) {
+function BM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a }) {
if (!t.length) return null;
let o = r ?? [], s = o.length > 0 && o.length === t.length;
return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: CM,
+ className: pM,
children: [
/* @__PURE__ */ (0, V.jsxs)("h4", {
className: "mb-1 text-body-semibold text-text-primary",
@@ -27763,13 +27377,13 @@ function qM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
className: "mb-3 text-caption-1-regular text-text-secondary",
children: n
}),
- /* @__PURE__ */ (0, V.jsx)(UM, { children: /* @__PURE__ */ (0, V.jsxs)(VM, {
+ /* @__PURE__ */ (0, V.jsx)(IM, { children: /* @__PURE__ */ (0, V.jsxs)(PM, {
"aria-label": e,
size: "sm",
- children: [/* @__PURE__ */ (0, V.jsxs)(ZO, { children: [
- i ? /* @__PURE__ */ (0, V.jsx)(QO, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(Ik, { children: [
+ i ? /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "pick",
- children: /* @__PURE__ */ (0, V.jsx)(BM, {
+ children: /* @__PURE__ */ (0, V.jsx)(NM, {
slot: null,
"aria-label": "全选本次未访问成功的链接",
isSelected: s,
@@ -27777,44 +27391,44 @@ function qM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
onChange: (e) => i(e ? t.map((e) => e.id) : [])
})
}) : null,
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "entity",
isRowHeader: !0,
children: "所属"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "kind",
children: "类型"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "label",
children: "标签"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "note",
children: "结果"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "url",
children: "地址"
})
- ] }), /* @__PURE__ */ (0, V.jsx)(ek, { children: t.map((e) => /* @__PURE__ */ (0, V.jsxs)(rk, {
+ ] }), /* @__PURE__ */ (0, V.jsx)(zk, { children: t.map((e) => /* @__PURE__ */ (0, V.jsxs)(Hk, {
id: e.id,
children: [
- i ? /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)(BM, {
+ i ? /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)(NM, {
slot: null,
"aria-label": `选择 ${e.entity} 的${e.label || e.url}`,
isSelected: o.includes(e.id),
onChange: (t) => i(t ? [...o, e.id] : o.filter((t) => t !== e.id))
}) }) : null,
- /* @__PURE__ */ (0, V.jsx)(ak, { children: e.entity }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: jj[e.link_kind] || e.link_kind }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: e.label || "" }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)("span", {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: e.entity }),
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: vj[e.link_kind] || e.link_kind }),
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: e.label || "" }),
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)("span", {
className: "tabular-nums text-text-error-primary",
children: e.note
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsxs)("a", {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsxs)("a", {
href: e.url,
target: "_blank",
rel: "noreferrer",
@@ -27824,7 +27438,7 @@ function qM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
"data-middle-truncate": !0,
className: "min-w-0 truncate",
children: e.url
- }), /* @__PURE__ */ (0, V.jsx)(vT, {
+ }), /* @__PURE__ */ (0, V.jsx)(_T, {
"aria-hidden": !0,
className: "size-3.5 shrink-0"
})]
@@ -27836,27 +27450,27 @@ function qM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
]
});
}
-function Wde() {
+function Rde() {
let e = TS({
- queryKey: Oj,
- queryFn: ({ signal: e }) => Nj(e)
- }), [t, n] = (0, B.useState)([]), r = IM({
- queryKey: Aj,
- queryFn: ({ signal: e }) => Fj(e),
- start: Aue,
+ queryKey: hj,
+ queryFn: ({ signal: e }) => bj(e)
+ }), [t, n] = (0, B.useState)([]), r = kM({
+ queryKey: _j,
+ queryFn: ({ signal: e }) => Sj(e),
+ start: vue,
onFinish: () => {
z.invalidateQueries({
- queryKey: Oj,
+ queryKey: hj,
exact: !0
}), z.invalidateQueries({
- queryKey: kj,
+ queryKey: gj,
exact: !0
});
}
- }), i = IM({
- queryKey: kj,
- queryFn: ({ signal: e }) => Pj(e),
- start: kue,
+ }), i = kM({
+ queryKey: gj,
+ queryFn: ({ signal: e }) => xj(e),
+ start: _ue,
onStarted: () => {
r.dismiss(), n([]);
}
@@ -27886,7 +27500,7 @@ function Wde() {
else if (_) b = /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "success",
title: "完成",
- children: jue(_)
+ children: yue(_)
});
else if (v) b = /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
@@ -27896,7 +27510,7 @@ function Wde() {
else if (i.query.isError && a) b = /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
title: "任务状态",
- children: Ude
+ children: Lde
});
else if (a?.status === "failed") b = /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
@@ -27904,12 +27518,12 @@ function Wde() {
children: a.error || "检查失败"
});
else if (a && a.status !== "idle") {
- y = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [a.status === "running" ? /* @__PURE__ */ (0, V.jsx)(MM, {
+ y = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [a.status === "running" ? /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
- label: Mue(a),
+ label: bue(a),
value: a.checked,
total: a.total
- }) : null, c ? /* @__PURE__ */ (0, V.jsx)(MM, {
+ }) : null, c ? /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: r.job?.message || "正在重验并删除失效链接…",
value: r.job?.checked,
@@ -27917,38 +27531,38 @@ function Wde() {
}) : null] });
let e = t.length ? `重试选中的 ${t.length} 条` : "重试选中的链接";
b = l || u.length || d.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
- className: wde,
+ className: mde,
children: [
- /* @__PURE__ */ (0, V.jsx)(qM, {
+ /* @__PURE__ */ (0, V.jsx)(BM, {
title: "地址已失效",
items: u,
- hint: Bde
+ hint: Pde
}),
- /* @__PURE__ */ (0, V.jsx)(qM, {
+ /* @__PURE__ */ (0, V.jsx)(BM, {
title: "本次未访问成功",
items: d,
- hint: Vde,
+ hint: Fde,
picked: f.length ? t : void 0,
onPick: f.length ? n : void 0,
children: f.length ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "-mx-4 mt-3 -mb-4",
- children: /* @__PURE__ */ (0, V.jsxs)(wM, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
- leadingIcon: WM,
+ children: /* @__PURE__ */ (0, V.jsxs)(mM, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
+ leadingIcon: LM,
disabled: !t.length,
...X(s),
onClick: () => h(t),
children: e
}), /* @__PURE__ */ (0, V.jsx)(J, {
- leadingIcon: WM,
+ leadingIcon: LM,
...X(s),
onClick: () => h(f.map((e) => e.id)),
children: `全部重试(${f.length})`
})] })
}) : null
}),
- l && u.length ? /* @__PURE__ */ (0, V.jsx)(wM, {
+ l && u.length ? /* @__PURE__ */ (0, V.jsx)(mM, {
tone: "error",
- status: Hde,
+ status: Ide,
children: /* @__PURE__ */ (0, V.jsx)(J, {
variant: "danger",
...X(c),
@@ -27957,7 +27571,7 @@ function Wde() {
})
}) : null,
l && !u.length && !d.length ? /* @__PURE__ */ (0, V.jsx)("p", {
- className: `${CM} text-body-regular text-notification-success-foreground`,
+ className: `${pM} text-body-regular text-notification-success-foreground`,
children: "全部链接均可访问。"
}) : null
]
@@ -27968,21 +27582,21 @@ function Wde() {
"aria-labelledby": "link-manager-title",
className: "flex scroll-mt-20 flex-col gap-4",
children: [
- /* @__PURE__ */ (0, V.jsx)(TM, {
+ /* @__PURE__ */ (0, V.jsx)(hM, {
id: "link-manager-title",
children: "链接管理"
}),
- /* @__PURE__ */ (0, V.jsxs)(DM, {
+ /* @__PURE__ */ (0, V.jsxs)(_M, {
layout: "stack",
labelledBy: "link-manager-box",
footer: /* @__PURE__ */ (0, V.jsx)(J, {
- leadingIcon: zde,
+ leadingIcon: Nde,
...X(s),
onClick: () => h(),
children: s ? "检查中" : l ? "重新检查" : "检查死链"
}),
children: [
- /* @__PURE__ */ (0, V.jsx)(EM, {
+ /* @__PURE__ */ (0, V.jsx)(gM, {
id: "link-manager-box",
gap: "small",
children: "站外链接"
@@ -27993,13 +27607,13 @@ function Wde() {
children: W(e.error)
}) : p ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "link-stat-grid mt-4 gap-x-8 gap-y-3",
- children: [/* @__PURE__ */ (0, V.jsx)(KM, {
+ children: [/* @__PURE__ */ (0, V.jsx)(zM, {
label: "链接总数",
- value: GM(p.total),
- note: `分布在 ${GM(p.entities)} 个女优、厂牌与系列`
- }), Object.entries(p.by_kind ?? {}).map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(KM, {
- label: jj[e] || e,
- value: GM(t)
+ value: RM(p.total),
+ note: `分布在 ${RM(p.entities)} 个女优、厂牌与系列`
+ }), Object.entries(p.by_kind ?? {}).map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(zM, {
+ label: vj[e] || e,
+ value: RM(t)
}, e))]
}), m ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "mt-4 flex min-w-0 flex-col gap-0.5",
@@ -28027,19 +27641,151 @@ function Wde() {
});
}
//#endregion
+//#region src/react/boardui/components/base/input/label.tsx
+function zde({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, V.jsxs)($oe, {
+ "data-label": "true",
+ ...a,
+ className: vE("flex cursor-default items-center gap-0.5", "text-body-medium text-text-primary", r),
+ children: [
+ i,
+ e && /* @__PURE__ */ (0, V.jsx)("span", {
+ "aria-hidden": "true",
+ className: "text-body-medium text-text-error-primary",
+ children: "*"
+ }),
+ n && /* @__PURE__ */ (0, V.jsx)(dae, {
+ className: "size-4 shrink-0 text-foreground-icon-quaternary",
+ "aria-hidden": !0
+ })
+ ]
+ });
+}
+//#endregion
+//#region src/react/boardui/components/base/input/hint-text.tsx
+function Bde({ isInvalid: e = !1, className: t, ...n }) {
+ return /* @__PURE__ */ (0, V.jsx)(rse, {
+ slot: e ? "errorMessage" : "description",
+ ...n,
+ className: vE("pt-px text-caption-1-medium text-text-secondary", e && "text-text-error-primary", t)
+ });
+}
+//#endregion
+//#region src/react/boardui/components/base/input/input.tsx
+var VM = (0, B.createContext)({});
+function HM({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, V.jsx)(VM.Provider, {
+ value: {
+ size: e,
+ fieldClassName: t,
+ inputClassName: n
+ },
+ children: /* @__PURE__ */ (0, V.jsx)(Bce, {
+ ...a,
+ "data-input-size": e,
+ className: vE("group flex h-max w-full flex-col items-start gap-1", r),
+ children: i
+ })
+ });
+}
+HM.displayName = "TextField";
+var UM = yE({
+ field: [
+ "relative flex w-full items-center",
+ "rounded-2lg",
+ "bg-background-tertiary-default text-foreground-icon-tertiary",
+ "ring-2 ring-inset ring-transparent",
+ "transition-[background-color,box-shadow,color] duration-[var(--input-transition-ms)] ease"
+ ].join(" "),
+ fieldSize: {
+ medium: "p-2",
+ small: "h-8 px-1.5 py-2"
+ },
+ fieldWithAddonSize: {
+ medium: "h-9 pl-1 pr-2 py-2",
+ small: "h-8 pl-1 pr-1.5 py-2"
+ },
+ content: "flex w-full items-center gap-2 min-w-0",
+ leftSection: "flex flex-1 items-center gap-0.5 min-w-0",
+ input: [
+ "min-w-0 flex-1 bg-transparent border-0 outline-none p-0 m-0",
+ "font-sans text-body-regular text-text-primary pl-1",
+ "placeholder:text-text-tertiary",
+ "focus:placeholder:text-text-primary",
+ "disabled:text-input-disabled-text disabled:placeholder:text-input-disabled-text",
+ "disabled:cursor-not-allowed",
+ "aria-invalid:placeholder:text-text-error-placeholder"
+ ].join(" "),
+ icon: "size-5 shrink-0"
+});
+function WM({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
+ let l = (0, B.useContext)(VM), u = e ?? l.size ?? "medium", d = r != null;
+ return /* @__PURE__ */ (0, V.jsx)(cse, {
+ ref: s,
+ className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => vE(UM.field, d ? UM.fieldWithAddonSize[u] : UM.fieldSize[u], t && !e && !n && !r && "ring-border-button-hover", e && !n && !r && "ring-border-button-active", n && "bg-input-disabled-background text-input-disabled-foreground", r && "bg-background-tertiary-error text-foreground-icon-error", l.fieldClassName, i),
+ children: /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: UM.content,
+ children: [/* @__PURE__ */ (0, V.jsxs)("div", {
+ className: UM.leftSection,
+ children: [d ? r : t ? /* @__PURE__ */ (0, V.jsx)(t, {
+ className: UM.icon,
+ "aria-hidden": !0
+ }) : null, /* @__PURE__ */ (0, V.jsx)(use, {
+ ref: o,
+ ...c,
+ className: vE(UM.input, l.inputClassName, a)
+ })]
+ }), n ? /* @__PURE__ */ (0, V.jsx)(n, {
+ className: UM.icon,
+ "aria-hidden": !0
+ }) : null]
+ })
+ });
+}
+WM.displayName = "InputBase";
+function GM({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, trailingIcon: a, leadingAddon: o, fieldClassName: s, ref: c, groupRef: l, className: u, ...d }) {
+ return /* @__PURE__ */ (0, V.jsx)(HM, {
+ ...d,
+ className: u,
+ "aria-label": d["aria-label"] ?? (!e && typeof r == "string" ? r : void 0),
+ children: ({ isRequired: u, isInvalid: d }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+ e && /* @__PURE__ */ (0, V.jsx)(zde, {
+ isRequired: u,
+ isInvalid: d,
+ tooltip: n,
+ children: e
+ }),
+ /* @__PURE__ */ (0, V.jsx)(WM, {
+ ref: c,
+ groupRef: l,
+ placeholder: r,
+ leadingIcon: i,
+ trailingIcon: a,
+ leadingAddon: o,
+ fieldClassName: s
+ }),
+ t && /* @__PURE__ */ (0, V.jsx)(Bde, {
+ isInvalid: d,
+ children: t
+ })
+ ] })
+ });
+}
+GM.displayName = "Input";
+//#endregion
//#region src/react/data-cleanup/organize-card.tsx
-var Gde = (e) => `将按这两份模板改动「${e}」上的文件名与目录,目标已存在的行会整行跳过。这一批可以从「回滚上一批」整批退回。`, Kde = "将把上一批整理动过的文件退回整理前的名字与位置,账本路径跟着退回。退回后这一批不再出现在这里。", qde = 8;
-function Jde({ plan: e }) {
+var Vde = (e) => `将按这两份模板改动「${e}」上的文件名与目录,目标已存在的行会整行跳过。这一批可以从「回滚上一批」整批退回。`, Hde = "将把上一批整理动过的文件退回整理前的名字与位置,账本路径跟着退回。退回后这一批不再出现在这里。", Ude = 8;
+function Wde({ plan: e }) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("ol", {
className: "mt-2 flex min-w-0 flex-col gap-1",
- children: e.rows.slice(0, qde).map((e) => /* @__PURE__ */ (0, V.jsxs)("li", {
+ children: e.rows.slice(0, Ude).map((e) => /* @__PURE__ */ (0, V.jsxs)("li", {
className: "flex min-w-0 items-center gap-2 text-caption-1-regular text-text-secondary",
children: [
/* @__PURE__ */ (0, V.jsx)("span", {
"data-middle-truncate": !0,
title: e.current_path,
className: "min-w-0 truncate",
- children: Jj(e.current_path)
+ children: Fj(e.current_path)
}),
/* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
@@ -28049,7 +27795,7 @@ function Jde({ plan: e }) {
"data-middle-truncate": !0,
title: e.target_path,
className: "min-w-0 truncate text-text-primary",
- children: Jj(e.target_path)
+ children: Fj(e.target_path)
})
]
}, e.current_path))
@@ -28058,10 +27804,10 @@ function Jde({ plan: e }) {
children: "只列出前 8 行,完整计划在计划 CSV 里。"
}) : null] });
}
-function Yde({ toast: e, failure: t }) {
+function Gde({ toast: e, failure: t }) {
let n = TS({
- queryKey: Kj,
- queryFn: ({ signal: e }) => qj(e)
+ queryKey: Nj,
+ queryFn: ({ signal: e }) => Pj(e)
}), r = n.data, i = r?.locations ?? [], [a, o] = (0, B.useState)(""), s = i.some((e) => e.location === a) ? a : i[0]?.location ?? "", c = r?.templates?.[s], [l, u] = (0, B.useState)(null), d = l?.location === s ? l : {
location: s,
file: c?.file ?? "",
@@ -28074,8 +27820,8 @@ function Yde({ toast: e, failure: t }) {
file_template: d.file.trim(),
dir_template: d.dir.trim()
}), v = OS({
- mutationFn: Wue,
- onSuccess: (e, t) => void Kue({
+ mutationFn: Mue,
+ onSuccess: (e, t) => void Pue({
...r?.templates ?? {},
[t.location]: {
file: t.file_template,
@@ -28083,29 +27829,29 @@ function Yde({ toast: e, failure: t }) {
}
}),
onError: (e) => {
- let t = Jue.test(W(e)) ? "dir" : "file";
+ let t = Iue.test(W(e)) ? "dir" : "file";
m(t), (t === "dir" ? g : h).current?.focus();
}
- }), y = IM({
- queryKey: Kj,
- queryFn: ({ signal: e }) => qj(e),
- start: Gue,
+ }), y = kM({
+ queryKey: Nj,
+ queryFn: ({ signal: e }) => Pj(e),
+ start: Nue,
jobOf: (e) => e,
- withJob: que,
+ withJob: Fue,
onStarted: () => v.reset(),
onFinish: (n) => {
if (z.invalidateQueries({
- queryKey: Kj,
+ queryKey: Nj,
exact: !0
}), n.status !== "complete") return;
- let { text: r, failed: i } = Xj(n);
+ let { text: r, failed: i } = Lj(n);
i ? t("按模板整理", /* @__PURE__ */ Error(`${i} 行未能处理`)) : e(r.replace(/。$/, ""));
}
}), b = y.running || y.start.isPending, x = v.data, S = Number(x?.counts?.change || 0), C = se[s] || s, w = (r?.placeholders ?? []).map((e) => `{${e.key}} ${e.label}`).join(" · "), T = () => {
v.isPending || !s || (m(null), v.mutate(_()));
}, E = () => void Te({
title: "按模板整理文件",
- body: Gde(C),
+ body: Vde(C),
confirmLabel: "整理文件",
onConfirm: () => y.start.mutateAsync({
kind: "apply",
@@ -28113,13 +27859,13 @@ function Yde({ toast: e, failure: t }) {
})
}), D = () => void Te({
title: "回滚上一批整理",
- body: Kde,
+ body: Hde,
confirmLabel: "回滚整理",
onConfirm: () => y.start.mutateAsync({ kind: "rollback" })
}), O = null, k = y.job, A = y.outcome;
if (k?.status === "running") {
let e = k.message || k.stage || "正在整理文件…";
- O = /* @__PURE__ */ (0, V.jsx)(MM, {
+ O = /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: e,
value: k.checked,
@@ -28131,7 +27877,7 @@ function Yde({ toast: e, failure: t }) {
children: A.error || "请查看任务记录,核对已处理的文件。"
});
else if (A) {
- let { text: e, failed: t } = Xj(A);
+ let { text: e, failed: t } = Lj(A);
O = /* @__PURE__ */ (0, V.jsx)(Y, {
tone: t ? "warning" : "success",
title: t ? "部分完成" : "整理结果",
@@ -28141,7 +27887,7 @@ function Yde({ toast: e, failure: t }) {
tone: "error",
title: "整理失败",
children: W(y.start.error)
- }) : v.isPending ? O = /* @__PURE__ */ (0, V.jsx)(MM, {
+ }) : v.isPending ? O = /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: "正在按模板算计划…"
}) : v.isError ? O = /* @__PURE__ */ (0, V.jsx)(Y, {
@@ -28151,9 +27897,9 @@ function Yde({ toast: e, failure: t }) {
}) : x && (O = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
title: "预览结果",
- children: Yue(x)
- }), S ? /* @__PURE__ */ (0, V.jsx)(Jde, { plan: x }) : null] }));
- return /* @__PURE__ */ (0, V.jsxs)(DM, {
+ children: Lue(x)
+ }), S ? /* @__PURE__ */ (0, V.jsx)(Wde, { plan: x }) : null] }));
+ return /* @__PURE__ */ (0, V.jsxs)(_M, {
layout: "stack",
id: "organize",
labelledBy: "cleanup-organize-title",
@@ -28177,7 +27923,7 @@ function Yde({ toast: e, failure: t }) {
}) : null
] }),
children: [
- /* @__PURE__ */ (0, V.jsx)(EM, {
+ /* @__PURE__ */ (0, V.jsx)(gM, {
id: "cleanup-organize-title",
gap: "medium",
children: "整理"
@@ -28197,20 +27943,20 @@ function Yde({ toast: e, failure: t }) {
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "mt-3 flex flex-col gap-3",
children: [
- i.length ? /* @__PURE__ */ (0, V.jsx)(Ck, {
+ i.length ? /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "整理哪个来源",
className: "w-fit min-w-25",
selectedKey: s || null,
onSelectionChange: (e) => {
e !== null && (o(String(e)), m(null), v.reset());
},
- children: i.map((e) => /* @__PURE__ */ (0, V.jsxs)(wk, {
+ children: i.map((e) => /* @__PURE__ */ (0, V.jsxs)(DM, {
id: e.location,
textValue: se[e.location] || e.location,
- children: [/* @__PURE__ */ (0, V.jsx)(Vk, { mark: Se[e.location] || "database" }), se[e.location] || e.location]
+ children: [/* @__PURE__ */ (0, V.jsx)(KE, { mark: Se[e.location] || "database" }), se[e.location] || e.location]
}, e.location))
}) : null,
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "文件名模板",
placeholder: "{number}[ {title}]",
value: d.file,
@@ -28221,7 +27967,7 @@ function Yde({ toast: e, failure: t }) {
f({ file: e }), m(null);
}
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "目录模板",
placeholder: "留空表示原地改名",
value: d.dir,
@@ -28261,56 +28007,56 @@ function Yde({ toast: e, failure: t }) {
}
//#endregion
//#region src/react/data-cleanup/orphan-records.ts
-var Xde = "/api/orphan-records", Zde = "/api/orphan-records/attach", JM = ["orphan-records"], Qde = [
+var Kde = "/api/orphan-records", qde = "/api/orphan-records/attach", KM = ["orphan-records"], Jde = [
["asset_preference", "喜欢与理由"],
["watch_queue", "稍后看"],
["playlist_item", "播放列表"],
["asset_quality_goal", "寻找更好版本"],
["activity_event", "观看历史"],
["asset_tag_preference", "隐藏标签"]
-], $de = (e) => G(Xde, e), efe = (e, t) => K(Zde, {
+], Yde = (e) => G(Kde, e), Xde = (e, t) => K(qde, {
id: e,
target: t
-}), tfe = (e) => K(WA, {
+}), Zde = (e) => K(jA, {
ids: [e],
operation: "delete"
-}), nfe = (e) => [
+}), Qde = (e) => [
e.rating ? `评分 ${e.rating}` : "",
e.play_count ? `播放 ${Number(e.play_count).toLocaleString()} 次` : e.last_played ? "播放过" : "",
e.o_count ? `高潮 ${Number(e.o_count).toLocaleString()} 次` : ""
-], YM = (e) => [...Qde.filter(([t]) => e[t]).map(([t, n]) => `${n} ${Number(e[t]).toLocaleString()}`), ...nfe(e)].filter(Boolean).join(" · "), rfe = (e) => e ? `${Math.round(e / 60)} 分钟` : "", XM = (e) => [e.name, rfe(e.duration)].filter(Boolean).join(" · "), ife = vA("play"), ZM = () => z.invalidateQueries({
- queryKey: JM,
+], qM = (e) => [...Jde.filter(([t]) => e[t]).map(([t, n]) => `${n} ${Number(e[t]).toLocaleString()}`), ...Qde(e)].filter(Boolean).join(" · "), $de = (e) => e ? `${Math.round(e / 60)} 分钟` : "", JM = (e) => [e.name, $de(e.duration)].filter(Boolean).join(" · "), efe = oA("play"), YM = () => z.invalidateQueries({
+ queryKey: KM,
exact: !0
});
-function afe({ item: e, toast: t }) {
+function tfe({ item: e, toast: t }) {
let [n, r] = (0, B.useState)(e.candidates[0]?.id ?? null), i = OS({
- mutationFn: () => efe(e.id, Number(n)),
+ mutationFn: () => Xde(e.id, Number(n)),
onSuccess: (e) => {
- t(`记录已接到新文件,批次 ${e.batch}`), ZM();
+ t(`记录已接到新文件,批次 ${e.batch}`), YM();
},
onError: (e) => t(W(e))
}), a = OS({
- mutationFn: () => tfe(e.id),
+ mutationFn: () => Zde(e.id),
onSuccess: (n) => {
- t(n.blocked.length ? `${e.name} 的文件又回到盘上,没有删除;下一次扫描会把它接回在库` : `已彻底删除 ${e.name}`), ZM();
+ t(n.blocked.length ? `${e.name} 的文件又回到盘上,没有删除;下一次扫描会把它接回在库` : `已彻底删除 ${e.name}`), YM();
}
}), o = () => {
Te({
title: "彻底删除",
- body: `将删除「${e.name}」这一条和它带的记录(${YM(e.records)})。此操作不可撤销。`,
+ body: `将删除「${e.name}」这一条和它带的记录(${qM(e.records)})。此操作不可撤销。`,
confirmLabel: "彻底删除",
danger: !0,
onConfirm: () => a.mutateAsync()
});
}, s = i.isPending || a.isPending;
- return /* @__PURE__ */ (0, V.jsxs)(rk, {
+ return /* @__PURE__ */ (0, V.jsxs)(Hk, {
id: e.id,
children: [
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsxs)("span", {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-3",
children: [/* @__PURE__ */ (0, V.jsxs)("span", {
className: "relative inline-grid aspect-16/10 w-24 flex-none place-items-center max-cleanup-tight:hidden overflow-hidden rounded-lg border border-separator-border bg-background-tertiary-default text-text-tertiary",
- children: [/* @__PURE__ */ (0, V.jsx)(ife, {
+ children: [/* @__PURE__ */ (0, V.jsx)(efe, {
"aria-hidden": !0,
className: "size-5"
}), e.has_thumb ? /* @__PURE__ */ (0, V.jsx)("img", {
@@ -28332,27 +28078,27 @@ function afe({ item: e, toast: t }) {
})]
})]
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)("span", {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)("span", {
className: "block min-w-44",
- children: YM(e.records)
+ children: qM(e.records)
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: e.candidates.length ? /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: e.candidates.length ? /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": `把 ${e.name} 的记录接到哪个文件`,
className: "w-64",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(Number(e));
},
- children: e.candidates.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: e.candidates.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e.id,
- textValue: XM(e),
- children: XM(e)
+ textValue: JM(e),
+ children: JM(e)
}, e.id))
}) : /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-text-secondary",
children: "没有番号或文件名对得上的文件"
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsxs)("span", {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex flex-wrap gap-2",
children: [e.candidates.length ? /* @__PURE__ */ (0, V.jsx)(J, {
size: "small",
@@ -28372,23 +28118,23 @@ function afe({ item: e, toast: t }) {
]
});
}
-function ofe({ toast: e }) {
+function nfe({ toast: e }) {
let t = TS({
- queryKey: JM,
- queryFn: ({ signal: e }) => $de(e)
+ queryKey: KM,
+ queryFn: ({ signal: e }) => Yde(e)
}), n = t.data?.items ?? [];
return !t.isError && !n.length ? null : /* @__PURE__ */ (0, V.jsxs)("section", {
id: "orphan-records",
"aria-labelledby": "orphan-records-title",
className: "flex scroll-mt-20 flex-col gap-4",
- children: [/* @__PURE__ */ (0, V.jsx)(TM, {
+ children: [/* @__PURE__ */ (0, V.jsx)(hM, {
id: "orphan-records-title",
children: "孤儿记录"
- }), /* @__PURE__ */ (0, V.jsxs)(DM, {
+ }), /* @__PURE__ */ (0, V.jsxs)(_M, {
layout: "stack",
labelledBy: "orphan-records-box",
children: [
- /* @__PURE__ */ (0, V.jsx)(EM, {
+ /* @__PURE__ */ (0, V.jsx)(gM, {
id: "orphan-records-box",
gap: "small",
children: "文件已消失的作品"
@@ -28401,28 +28147,28 @@ function ofe({ toast: e }) {
tone: "error",
title: "孤儿记录读取失败",
children: W(t.error)
- }) : /* @__PURE__ */ (0, V.jsx)(UM, { children: /* @__PURE__ */ (0, V.jsxs)(VM, {
+ }) : /* @__PURE__ */ (0, V.jsx)(IM, { children: /* @__PURE__ */ (0, V.jsxs)(PM, {
"aria-label": "文件已消失的作品",
size: "sm",
- children: [/* @__PURE__ */ (0, V.jsxs)(ZO, { children: [
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(Ik, { children: [
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "item",
isRowHeader: !0,
children: "作品"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "records",
children: "带的记录"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "target",
children: "接到"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "actions",
children: "操作"
})
- ] }), /* @__PURE__ */ (0, V.jsx)(ek, { children: n.map((t) => /* @__PURE__ */ (0, V.jsx)(afe, {
+ ] }), /* @__PURE__ */ (0, V.jsx)(zk, { children: n.map((t) => /* @__PURE__ */ (0, V.jsx)(tfe, {
item: t,
toast: e
}, t.id)) })]
@@ -28433,99 +28179,99 @@ function ofe({ toast: e }) {
}
//#endregion
//#region src/react/data-cleanup/resource-sync-card.tsx
-var sfe = vA("git-compare"), cfe = vA("rotate-cw"), lfe = "暂时无法读取进度,正在重新连接…", QM = "清理失效条目", $M = "inline-grid w-full grid-flow-col auto-cols-fr gap-4 max-plain-stat-pair:grid-flow-row max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1", eN = (e) => Number(e || 0).toLocaleString();
-function ufe({ scan: e }) {
+var rfe = oA("git-compare"), ife = oA("rotate-cw"), afe = "暂时无法读取进度,正在重新连接…", XM = "清理失效条目", ZM = "inline-grid w-full grid-flow-col auto-cols-fr gap-4 max-plain-stat-pair:grid-flow-row max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1", QM = (e) => Number(e || 0).toLocaleString();
+function ofe({ scan: e }) {
let t = e.cache ?? {
files: 0,
bytes: 0
};
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("div", {
- className: $M,
+ className: ZM,
children: (e.sources ?? []).map((e) => /* @__PURE__ */ (0, V.jsx)("article", {
- className: yM(),
- children: /* @__PURE__ */ (0, V.jsx)(bM, {
- label: ede[e.location] || "媒体来源",
- mark: /* @__PURE__ */ (0, V.jsx)(Vk, { mark: Se[e.location] ?? "database" }),
+ className: oM(),
+ children: /* @__PURE__ */ (0, V.jsx)(sM, {
+ label: Hue[e.location] || "媒体来源",
+ mark: /* @__PURE__ */ (0, V.jsx)(KE, { mark: Se[e.location] ?? "database" }),
aside: /* @__PURE__ */ (0, V.jsx)("span", {
className: e.online ? "text-notification-success-foreground" : "text-text-error-primary",
children: e.online ? "可访问" : "离线,已跳过"
}),
- figure: e.online ? `${eN(e.missing)} 项` : "—",
- meta: ide(e),
+ figure: e.online ? `${QM(e.missing)} 项` : "—",
+ meta: Kue(e),
wrapMeta: !0
})
}, e.location))
}), /* @__PURE__ */ (0, V.jsxs)("div", {
- className: $M,
+ className: ZM,
children: [
/* @__PURE__ */ (0, V.jsx)("article", {
- className: yM(),
- children: /* @__PURE__ */ (0, V.jsx)(bM, {
+ className: oM(),
+ children: /* @__PURE__ */ (0, V.jsx)(sM, {
label: "待永久删除",
- figure: `${eN(aM(e))} 项`,
+ figure: `${QM(Kj(e))} 项`,
meta: "文件已不在盘上,含回收站"
})
}),
/* @__PURE__ */ (0, V.jsx)("article", {
- className: yM(),
- children: /* @__PURE__ */ (0, V.jsx)(bM, {
+ className: oM(),
+ children: /* @__PURE__ */ (0, V.jsx)(sM, {
label: "将标为已消失",
- figure: `${eN(e.vanish)} 项`,
+ figure: `${QM(e.vanish)} 项`,
meta: "带个人记录,记录留着"
})
}),
/* @__PURE__ */ (0, V.jsx)("article", {
- className: yM(),
- children: /* @__PURE__ */ (0, V.jsx)(bM, {
+ className: oM(),
+ children: /* @__PURE__ */ (0, V.jsx)(sM, {
label: "空文件夹",
- figure: `${eN(e.empty)} 个`,
+ figure: `${QM(e.empty)} 个`,
meta: "保留来源根目录"
})
}),
/* @__PURE__ */ (0, V.jsx)("article", {
- className: yM(),
- children: /* @__PURE__ */ (0, V.jsx)(bM, {
+ className: oM(),
+ children: /* @__PURE__ */ (0, V.jsx)(sM, {
label: "可清理的缓存",
- figure: `${eN(t.files)} 个`,
+ figure: `${QM(t.files)} 个`,
meta: t.files ? pe(t.bytes) : ""
})
})
]
})] });
}
-function dfe({ toast: e }) {
- let t = IM({
- queryKey: eM,
- queryFn: ({ signal: e }) => nM(e),
- start: Zue,
+function sfe({ toast: e }) {
+ let t = kM({
+ queryKey: Vj,
+ queryFn: ({ signal: e }) => Uj(e),
+ start: zue,
onFinish: (t) => {
if (z.invalidateQueries({
- queryKey: fM,
+ queryKey: $j,
exact: !0
}), z.invalidateQueries({
- queryKey: $j,
+ queryKey: Bj,
exact: !0
}), t.status !== "complete") return;
- let { done: n, left: r } = cM(t);
- r ? e(`已完成 ${eN(n)} 项,${eN(r)} 项没有处理`, { warning: !0 }) : e("已清理失效条目");
+ let { done: n, left: r } = Yj(t);
+ r ? e(`已完成 ${QM(n)} 项,${QM(r)} 项没有处理`, { warning: !0 }) : e("已清理失效条目");
}
- }), n = IM({
- queryKey: $j,
- queryFn: ({ signal: e }) => tM(e),
- start: Xue,
+ }), n = kM({
+ queryKey: Bj,
+ queryFn: ({ signal: e }) => Hj(e),
+ start: Rue,
onStarted: () => t.dismiss()
}), r = n.job, i = n.running || n.start.isPending, a = t.running || t.start.isPending, o = r?.status === "complete" || r?.status === "failed", s = i ? "扫描中" : o ? "重新扫描" : "检查文件", c = (e) => void Te({
- title: QM,
- body: rde(e),
- confirmLabel: QM,
+ title: XM,
+ body: Gue(e),
+ confirmLabel: XM,
danger: !0,
onConfirm: () => t.start.mutateAsync(e.scan_id || "")
}), l = t.outcome, u = (e) => {
- let t = cM(e).left > 0;
+ let t = Yj(e).left > 0;
return /* @__PURE__ */ (0, V.jsx)(Y, {
tone: t ? "warning" : "success",
title: t ? "部分完成" : "清理结果",
- children: ade(e, pe)
+ children: que(e, pe)
});
}, d = null, f = null;
if (l?.status === "failed") f = /* @__PURE__ */ (0, V.jsx)(Y, {
@@ -28534,7 +28280,7 @@ function dfe({ toast: e }) {
children: l.error || "请查看任务记录,核对已处理的文件。"
});
else if (l) f = u(l);
- else if (t.running) d = /* @__PURE__ */ (0, V.jsx)(MM, {
+ else if (t.running) d = /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: t.job?.message || "正在复核并清理失效条目…"
});
@@ -28546,11 +28292,11 @@ function dfe({ toast: e }) {
else if (n.query.isError && r) f = /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
title: "任务状态",
- children: lfe
+ children: afe
});
else if (r?.status === "running") {
- let e = tde(r);
- d = /* @__PURE__ */ (0, V.jsx)(MM, {
+ let e = Uue(r);
+ d = /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: e,
value: r.completed_sources,
@@ -28567,13 +28313,13 @@ function dfe({ toast: e }) {
children: "这次检查的结果已经清理,重新扫描可再核对。"
});
else if (r?.status === "complete") {
- let e = $ue(r);
+ let e = Vue(r);
f = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- /* @__PURE__ */ (0, V.jsx)(ufe, { scan: r }),
+ /* @__PURE__ */ (0, V.jsx)(ofe, { scan: r }),
e ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
title: "清理内容",
- children: nde(r)
+ children: Wue(r)
}) : null,
/* @__PURE__ */ (0, V.jsx)("div", {
className: "flex flex-wrap items-center justify-end gap-2",
@@ -28581,7 +28327,7 @@ function dfe({ toast: e }) {
variant: "danger",
...X(a),
onClick: () => c(r),
- children: a ? "正在复核并清理…" : QM
+ children: a ? "正在复核并清理…" : XM
}) : /* @__PURE__ */ (0, V.jsx)("p", {
className: "mr-auto text-body-regular text-notification-success-foreground",
children: "已检查可访问的来源,没有待清理的记录、空文件夹或缓存。"
@@ -28598,16 +28344,16 @@ function dfe({ toast: e }) {
"aria-labelledby": "resource-sync-title",
className: "flex scroll-mt-20 flex-col gap-4",
children: [
- /* @__PURE__ */ (0, V.jsx)(TM, {
+ /* @__PURE__ */ (0, V.jsx)(hM, {
id: "resource-sync-title",
children: "资源同步"
}),
- /* @__PURE__ */ (0, V.jsxs)(DM, {
+ /* @__PURE__ */ (0, V.jsxs)(_M, {
layout: "split",
labelledBy: "resource-sync-box",
footer: /* @__PURE__ */ (0, V.jsx)(J, {
"data-resource-scan": !0,
- leadingIcon: o && !i ? cfe : sfe,
+ leadingIcon: o && !i ? ife : rfe,
...X(i),
onClick: () => {
i || n.start.mutate();
@@ -28615,7 +28361,7 @@ function dfe({ toast: e }) {
children: s
}),
children: [
- /* @__PURE__ */ (0, V.jsx)(EM, {
+ /* @__PURE__ */ (0, V.jsx)(gM, {
id: "resource-sync-box",
gap: "small",
children: "文件与记录核对"
@@ -28641,16 +28387,16 @@ function dfe({ toast: e }) {
}
//#endregion
//#region src/react/data-cleanup/data-cleanup-page.tsx
-function tN(e, t) {
+function $M(e, t) {
return e.data === void 0 ? { figure: e.isError ? "读取失败" : "—" } : t(e.data);
}
-function nN({ section: e, label: t, icon: n, value: r, open: i }) {
+function eN({ section: e, label: t, icon: n, value: r, open: i }) {
return /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
- className: yM({ interactive: !0 }),
+ className: oM({ interactive: !0 }),
"data-cleanup-go": e,
onClick: () => i(e),
- children: /* @__PURE__ */ (0, V.jsx)(bM, {
+ children: /* @__PURE__ */ (0, V.jsx)(sM, {
label: t,
icon: n,
figure: r.figure,
@@ -28658,80 +28404,80 @@ function nN({ section: e, label: t, icon: n, value: r, open: i }) {
})
});
}
-var ffe = vA("square-check-big"), pfe = vA("sparkles"), mfe = vA("file-stack"), hfe = vA("file-archive"), gfe = vA("trash"), _fe = [
- lM,
- lj,
- UA
-], vfe = () => {
- for (let e of _fe) z.invalidateQueries({
+var cfe = oA("square-check-big"), lfe = oA("sparkles"), ufe = oA("file-stack"), dfe = oA("file-archive"), ffe = oA("trash"), pfe = [
+ Xj,
+ XA,
+ AA
+], mfe = () => {
+ for (let e of pfe) z.invalidateQueries({
queryKey: e,
exact: !0
});
};
-function yfe({ toast: e, failure: t, open: n }) {
+function hfe({ toast: e, failure: t, open: n }) {
let r = TS({
- queryKey: lM,
- queryFn: ({ signal: e }) => pM(e)
+ queryKey: Xj,
+ queryFn: ({ signal: e }) => eM(e)
}), i = TS({
- queryKey: lj,
- queryFn: ({ signal: e }) => uj(e)
+ queryKey: XA,
+ queryFn: ({ signal: e }) => ZA(e)
}), a = TS({
- queryKey: UA,
- queryFn: ({ signal: e }) => GA(e)
+ queryKey: AA,
+ queryFn: ({ signal: e }) => MA(e)
}), o = TS({
- queryKey: uM,
- queryFn: ({ signal: e }) => mM(e)
+ queryKey: Zj,
+ queryFn: ({ signal: e }) => tM(e)
}), s = TS({
- queryKey: fM,
- queryFn: ({ signal: e }) => hM(e)
+ queryKey: $j,
+ queryFn: ({ signal: e }) => nM(e)
}), c = TS({
queryKey: tt,
queryFn: ({ signal: e }) => rt(e)
}), l = (t) => e(t);
return /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
- className: gde,
+ className: ide,
children: [
- /* @__PURE__ */ (0, V.jsx)(nN, {
+ /* @__PURE__ */ (0, V.jsx)(eN, {
section: "review",
label: "人工复核",
- icon: ffe,
+ icon: cfe,
open: n,
- value: tN(r, lde)
+ value: $M(r, Zue)
}),
- /* @__PURE__ */ (0, V.jsx)(nN, {
+ /* @__PURE__ */ (0, V.jsx)(eN, {
section: "quality",
label: "高清版",
- icon: pfe,
+ icon: lfe,
open: n,
- value: tN(i, (e) => ({ figure: `${Number(e.total || 0).toLocaleString()} 个待升级` }))
+ value: $M(i, (e) => ({ figure: `${Number(e.total || 0).toLocaleString()} 个待升级` }))
}),
- /* @__PURE__ */ (0, V.jsx)(nN, {
+ /* @__PURE__ */ (0, V.jsx)(eN, {
section: "duplicates",
label: "重复文件",
- icon: mfe,
+ icon: ufe,
open: n,
- value: tN(a, (e) => Number(e.total || 0) ? {
+ value: $M(a, (e) => Number(e.total || 0) ? {
figure: `${Number(e.total).toLocaleString()} 组 · ${Number(e.files || 0).toLocaleString()} 个文件`,
meta: `可回收 ${pe(e.reclaimable || 0)}`
} : { figure: "没有重复内容" })
}),
- /* @__PURE__ */ (0, V.jsx)(nN, {
+ /* @__PURE__ */ (0, V.jsx)(eN, {
section: "ads",
label: "垃圾文件",
- icon: hfe,
+ icon: dfe,
open: n,
- value: tN(o, (e) => ({
+ value: $M(o, (e) => ({
figure: `${Number(e.pending_total || 0).toLocaleString()} 个待判断`,
- meta: ude(e)
+ meta: Que(e)
}))
}),
- /* @__PURE__ */ (0, V.jsx)(nN, {
+ /* @__PURE__ */ (0, V.jsx)(eN, {
section: "trash",
label: "回收站",
- icon: gfe,
+ icon: ffe,
open: n,
- value: tN(s, (e) => ({
+ value: $M(s, (e) => ({
figure: `${Number(e.total || 0).toLocaleString()} 项在回收站`,
meta: e.total ? `占用 ${pe(e.bytes || 0)}` : ""
}))
@@ -28744,31 +28490,31 @@ function yfe({ toast: e, failure: t, open: n }) {
/* @__PURE__ */ (0, V.jsx)("div", {
id: "libraryProcessing",
className: "scroll-mt-20",
- children: /* @__PURE__ */ (0, V.jsx)(PM, {
+ children: /* @__PURE__ */ (0, V.jsx)(wM, {
toast: l,
monitor: !0,
- onComplete: vfe
+ onComplete: mfe
})
}),
/* @__PURE__ */ (0, V.jsx)("div", {
id: "mediaRepair",
- children: /* @__PURE__ */ (0, V.jsx)(Lde, {})
+ children: /* @__PURE__ */ (0, V.jsx)(jde, {})
}),
- /* @__PURE__ */ (0, V.jsx)(Yde, {
+ /* @__PURE__ */ (0, V.jsx)(Gde, {
toast: l,
failure: t
})
]
}),
- /* @__PURE__ */ (0, V.jsx)(Wde, {}),
- /* @__PURE__ */ (0, V.jsx)(ofe, { toast: l }),
- rM(c.data) ? /* @__PURE__ */ (0, V.jsx)(dfe, { toast: e }) : null
+ /* @__PURE__ */ (0, V.jsx)(Rde, {}),
+ /* @__PURE__ */ (0, V.jsx)(nfe, { toast: l }),
+ Wj(c.data) ? /* @__PURE__ */ (0, V.jsx)(sfe, { toast: e }) : null
] });
}
//#endregion
//#region src/react/feed-new/feed-new.ts
-var rN = (e) => ["feed-new", e ?? "home"], bfe = 8, xfe = 1500;
-function Sfe(e, t, n) {
+var tN = (e) => ["feed-new", e ?? "home"], gfe = 8, _fe = 1500;
+function vfe(e, t, n) {
let r = document.createElement("template");
r.innerHTML = e;
let i = [...r.content.querySelectorAll("img[src]")].slice(0, t).map((e) => {
@@ -28779,32 +28525,32 @@ function Sfe(e, t, n) {
setTimeout(e, n);
})]);
}
-async function Cfe(e, t, n) {
+async function yfe(e, t, n) {
let r = new URLSearchParams({ limit: "12" });
e && r.set("entity", String(e));
let i = await ce(`/api/feeds/discoveries?${r}`).catch(() => null), a = i && !i.error ? i : null, o = a?.items || [], s = t(a);
- return n && o.length && await Sfe(s, bfe, xfe), {
+ return n && o.length && await vfe(s, gfe, _fe), {
items: o,
html: s
};
}
-var iN = (e, t, n = !1) => ({
- queryKey: rN(e),
- queryFn: () => Cfe(e, t, n),
+var nN = (e, t, n = !1) => ({
+ queryKey: tN(e),
+ queryFn: () => yfe(e, t, n),
staleTime: Infinity
-}), aN = (e, t) => ce("/api/feeds/discovery", {
+}), rN = (e, t) => ce("/api/feeds/discovery", {
method: "POST",
body: JSON.stringify({
action: t,
ids: [e]
})
}).then(() => void 0, () => void 0);
-async function wfe(e) {
- z.removeQueries({ queryKey: rN(null) }), await z.fetchQuery(iN(null, e.helpers.feedRowHtml, e.host.getAttribute("aria-busy") === "true"));
+async function bfe(e) {
+ z.removeQueries({ queryKey: tN(null) }), await z.fetchQuery(nN(null, e.helpers.feedRowHtml, e.host.getAttribute("aria-busy") === "true"));
}
//#endregion
//#region src/react/entity-page/entity-page.ts
-var Tfe = [
+var xfe = [
"loc",
"creator",
"tag",
@@ -28814,51 +28560,51 @@ var Tfe = [
"orient",
"sort",
"dir"
-], oN = {
+], iN = {
media: "videos",
set: 0
-}, sN = (e, t) => [
+}, aN = (e, t) => [
"entity",
e,
t
-], Efe = (e, t, n, r) => [
+], Sfe = (e, t, n, r) => [
"entity-items",
e,
t,
n,
r
-], cN = (e, t, n, r) => [
+], oN = (e, t, n, r) => [
"entity-photos",
e,
t,
n,
r
-], lN = (e) => String(e || "").split(",").filter(Boolean), Dfe = (e, t) => lN(e).includes(t);
-function uN(e, t, n, r, i = 0) {
+], sN = (e) => String(e || "").split(",").filter(Boolean), Cfe = (e, t) => sN(e).includes(t);
+function cN(e, t, n, r, i = 0) {
let a = new URLSearchParams();
a.set(e, t), a.set("limit", "48"), a.set("offset", String(i)), a.set("sort", n.sort || "new"), n.dir && a.set("dir", n.dir), n.sort === "seed" && a.set("seed", r.seed), i && a.set("count", "0");
- for (let t of Tfe) n[t] && t !== e && t !== "sort" && a.set(t, n[t]);
+ for (let t of xfe) n[t] && t !== e && t !== "sort" && a.set(t, n[t]);
return r.jav && a.set("jav", "1"), a;
}
-async function dN(e, t, n, r, i, a) {
- return await ce(`/api/items?${uN(e, t, n, r, i)}`, a ? { signal: a } : {});
+async function lN(e, t, n, r, i, a) {
+ return await ce(`/api/items?${cN(e, t, n, r, i)}`, a ? { signal: a } : {});
}
-var fN = (e) => {
+var uN = (e) => {
let t = {
jav: e.jav,
seed: e.seed
- }, n = uN(e.kind, e.name, e.filters, t).toString();
+ }, n = cN(e.kind, e.name, e.filters, t).toString();
return {
- queryKey: Efe(e.kind, e.name, n, e.revision),
- queryFn: ({ signal: n }) => dN(e.kind, e.name, e.filters, t, 0, n),
+ queryKey: Sfe(e.kind, e.name, n, e.revision),
+ queryFn: ({ signal: n }) => lN(e.kind, e.name, e.filters, t, 0, n),
staleTime: Infinity
};
-}, pN = (e, t) => ({
- queryKey: sN(e, t),
+}, dN = (e, t) => ({
+ queryKey: aN(e, t),
queryFn: ({ signal: n }) => ce(`/api/entity?kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`, { signal: n }),
staleTime: Infinity
});
-function Ofe(e, t, n, r, i, a) {
+function wfe(e, t, n, r, i, a) {
let o = `kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`;
if (i) {
let e = `&limit=120&offset=${i}${a ? `&seed=${encodeURIComponent(a)}` : ""}`;
@@ -28867,10 +28613,10 @@ function Ofe(e, t, n, r, i, a) {
let s = r ? `&seed=${encodeURIComponent(r)}` : "";
return n ? `/api/photo-set?id=${n}&limit=120${s}` : r ? `/api/photos?${o}&limit=120${s}` : `/api/photos?${o}`;
}
-var mN = (e, t, n, r) => ({
- queryKey: cN(e, t, n, r),
+var fN = (e, t, n, r) => ({
+ queryKey: oN(e, t, n, r),
queryFn: async ({ pageParam: i }) => {
- let a = await ce(Ofe(e, t, n, r, i?.offset || 0, i?.seed || "")).catch((e) => {
+ let a = await ce(wfe(e, t, n, r, i?.offset || 0, i?.seed || "")).catch((e) => {
if (i) throw e;
return { error: String(e) };
});
@@ -28883,8 +28629,8 @@ var mN = (e, t, n, r) => ({
seed: t[0]?.seed || ""
} : void 0,
staleTime: Infinity
-}), hN = (e) => e && !e.error ? (e.sets || []).filter((e) => e.kind === "code") : [];
-async function kfe(e) {
+}), pN = (e) => e && !e.error ? (e.sets || []).filter((e) => e.kind === "code") : [];
+async function Tfe(e) {
let { kind: t, name: n } = e;
for (let e of [
"entity",
@@ -28896,51 +28642,51 @@ async function kfe(e) {
n
] });
await Promise.all([
- z.fetchQuery(pN(t, n)).then((t) => !t || t.error || !t.id ? null : (z.removeQueries({ queryKey: rN(Number(t.id)) }), z.fetchQuery(iN(Number(t.id), e.helpers.feedRowHtml, !0)))),
- z.fetchQuery(fN(e)),
- z.fetchInfiniteQuery(mN(t, n, 0, "")),
- e.media.media === "photos" && e.media.set ? z.fetchInfiniteQuery(mN(t, n, e.media.set, "")) : null
+ z.fetchQuery(dN(t, n)).then((t) => !t || t.error || !t.id ? null : (z.removeQueries({ queryKey: tN(Number(t.id)) }), z.fetchQuery(nN(Number(t.id), e.helpers.feedRowHtml, !0)))),
+ z.fetchQuery(uN(e)),
+ z.fetchInfiniteQuery(fN(t, n, 0, "")),
+ e.media.media === "photos" && e.media.set ? z.fetchInfiniteQuery(fN(t, n, e.media.set, "")) : null
]);
}
//#endregion
//#region src/react/follow/online-vocab.ts
-var Afe = "/api/follow/authors", jfe = "/api/follow/tags", Mfe = (e) => [
+var Efe = "/api/follow/authors", Dfe = "/api/follow/tags", Ofe = (e) => [
"follow",
"authors",
e
-], Nfe = (e, t) => [
+], kfe = (e, t) => [
"follow",
"tags",
e,
t
];
-function Pfe(e, t, n) {
+function Afe(e, t, n) {
let r = new URLSearchParams({
limit: String(t),
offset: String(n)
});
- return e && r.set("q", e), `${Afe}?${r}`;
+ return e && r.set("q", e), `${Efe}?${r}`;
}
-function Ffe(e, t, n, r) {
+function jfe(e, t, n, r) {
let i = new URLSearchParams({
types: "all",
limit: String(n),
offset: String(r)
});
- return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${jfe}?${i}`;
+ return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${Dfe}?${i}`;
}
-var Ife = (e, t, n, r) => G(Pfe(e, t, n), r), Lfe = (e, t, n, r, i) => G(Ffe(e, t, n, r), i), Rfe = "/api/index", gN = {
+var Mfe = (e, t, n, r) => G(Afe(e, t, n), r), Nfe = (e, t, n, r, i) => G(jfe(e, t, n, r), i), Pfe = "/api/index", mN = {
performers: "艺人",
creators: "卖家",
studios: "厂牌",
agencies: "事务所",
tags: "标签"
-}, zfe = {
+}, Ffe = {
performers: "performer",
creators: "creator",
studios: "studio",
agencies: "agency"
-}, _N = [
+}, hN = [
["all", "全部"],
["meta", "影片属性"],
["relationship", "人物关系"],
@@ -28950,38 +28696,38 @@ var Ife = (e, t, n, r) => G(Pfe(e, t, n), r), Lfe = (e, t, n, r, i) => G(Ffe(e,
["story", "故事剧情"],
["position", "性交体位"],
["general", "其他内容"]
-], vN = [
+], gN = [
["all", "全部"],
["general", "通用"],
["artist", "创作者"],
["character", "角色"],
["copyright", "作品"],
["metadata", "元数据"]
-], yN = [
+], _N = [
["all", "全部"],
["japanese_av", "女优"],
["amateur", "素人"],
["western", "西方"],
["blogger", "网黄博主"],
["animation", "动画作者"]
-], bN = {
+], vN = {
people: 120,
tags: 180
-}, xN = (e) => e !== "tags", SN = (e) => e === "studios" || e === "agencies";
-function CN(e) {
- if (e.kind === "creators" && e.category === "animation") return CN({
+}, yN = (e) => e !== "tags", bN = (e) => e === "studios" || e === "agencies";
+function xN(e) {
+ if (e.kind === "creators" && e.category === "animation") return xN({
...e,
kind: "performers",
scope: "local"
});
- let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (e.kind === "tags" ? t === "online" ? vN : _N : e.kind === "performers" && t === "local" ? yN : []).some(([t]) => t === e.category);
+ let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (e.kind === "tags" ? t === "online" ? gN : hN : e.kind === "performers" && t === "local" ? _N : []).some(([t]) => t === e.category);
return {
...e,
scope: t,
category: n ? e.category : "all"
};
}
-function wN(e) {
+function SN(e) {
let { kind: t, q: n, scope: r, category: i } = e;
return t === "tags" ? r === "online" ? {
what: "online-tags",
@@ -29001,50 +28747,50 @@ function wN(e) {
...i && i !== "all" ? { category: i } : {}
};
}
-var TN = (e, t, n = "all") => [
+var CN = (e, t, n = "all") => [
"index",
e,
t,
...e === "tags" || n !== "all" ? [n] : []
];
-function EN(e, t, n, r, i) {
+function wN(e, t, n, r, i) {
let a = new URLSearchParams({
kind: e,
limit: String(r),
offset: String(i)
});
- return t && a.set("q", t), n !== "all" && a.set("category", n), `${Rfe}?${a}`;
+ return t && a.set("q", t), n !== "all" && a.set("category", n), `${Pfe}?${a}`;
}
-function DN(e) {
- let t = e.what === "people" || e.what === "online-authors" ? bN.people : bN.tags, n = {
+function TN(e) {
+ let t = e.what === "people" || e.what === "online-authors" ? vN.people : vN.tags, n = {
initialPageParam: 0,
getNextPageParam: (e, t) => e.has_more ? t.reduce((e, t) => e + t.items.length, 0) : void 0
};
switch (e.what) {
case "people": return {
...n,
- queryKey: TN(e.kind, e.q, e.category || "all"),
- queryFn: ({ pageParam: n, signal: r }) => G(EN(e.kind, e.q, e.category || "all", t, n), r)
+ queryKey: CN(e.kind, e.q, e.category || "all"),
+ queryFn: ({ pageParam: n, signal: r }) => G(wN(e.kind, e.q, e.category || "all", t, n), r)
};
case "tags": return {
...n,
- queryKey: TN("tags", e.q, e.category),
- queryFn: ({ pageParam: n, signal: r }) => G(EN("tags", e.q, e.category, t, n), r)
+ queryKey: CN("tags", e.q, e.category),
+ queryFn: ({ pageParam: n, signal: r }) => G(wN("tags", e.q, e.category, t, n), r)
};
case "online-authors": return {
...n,
- queryKey: Mfe(e.q),
- queryFn: ({ pageParam: n, signal: r }) => Ife(e.q, t, n, r)
+ queryKey: Ofe(e.q),
+ queryFn: ({ pageParam: n, signal: r }) => Mfe(e.q, t, n, r)
};
case "online-tags": return {
...n,
- queryKey: Nfe(e.q, e.category),
- queryFn: ({ pageParam: n, signal: r }) => Lfe(e.q, e.category, t, n, r)
+ queryKey: kfe(e.q, e.category),
+ queryFn: ({ pageParam: n, signal: r }) => Nfe(e.q, e.category, t, n, r)
};
}
}
-async function Bfe(e, t) {
- let n = DN(wN(CN(e)));
+async function Ife(e, t) {
+ let n = TN(SN(xN(e)));
z.removeQueries({
queryKey: n.queryKey,
exact: !0
@@ -29058,13 +28804,13 @@ async function Bfe(e, t) {
getNextPageParam: n.getNextPageParam
});
}
-var Vfe = (e) => e ? e.pages.flatMap((e) => e.items) : [], Hfe = (e, t) => `${e}${t ? "+" : ""} 项`, ON = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", Ufe = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : t.n.toLocaleString(), Wfe = {
+var Lfe = (e) => e ? e.pages.flatMap((e) => e.items) : [], Rfe = (e, t) => `${e}${t ? "+" : ""} 项`, EN = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", zfe = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : t.n.toLocaleString(), Bfe = {
numeric: !0,
sensitivity: "base"
};
-function Gfe(e, t) {
+function Vfe(e, t) {
let n = /* @__PURE__ */ new Map();
- for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", Wfe))) {
+ for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", Bfe))) {
let e = t(r.k).normalize("NFKC").trim().charAt(0).toUpperCase(), i = /[A-Z]/.test(e) ? e : /[0-9]/.test(e) ? "#" : /[㐀-鿿]/.test(e) ? "中文" : "其他", a = n.get(i);
a ? a.push(r) : n.set(i, [r]);
}
@@ -29072,7 +28818,7 @@ function Gfe(e, t) {
}
//#endregion
//#region src/react/index/index-people.tsx
-function kN({ html: e, face: t, company: n, big: r }) {
+function DN({ html: e, face: t, company: n, big: r }) {
let i = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
t ? i.current?.style.setProperty("--face", t) : i.current?.style.removeProperty("--face");
@@ -29084,8 +28830,8 @@ function kN({ html: e, face: t, company: n, big: r }) {
dangerouslySetInnerHTML: { __html: e }
});
}
-var Kfe = "flex cursor-pointer flex-col gap-2 p-3 text-inherit";
-function AN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
+var Hfe = "flex cursor-pointer flex-col gap-2 p-3 text-inherit";
+function ON({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
...a,
@@ -29095,7 +28841,7 @@ function AN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
radius: "plain",
padding: "none",
interactive: !0,
- className: `${Kfe} ${n ? "items-stretch text-left" : "items-center text-center"}`
+ className: `${Hfe} ${n ? "items-stretch text-left" : "items-center text-center"}`
}),
children: [
r,
@@ -29112,23 +28858,23 @@ function AN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
]
});
}
-function jN({ kind: e, items: t, layout: n, props: r }) {
- let i = SN(e), a = n === "big";
+function kN({ kind: e, items: t, layout: n, props: r }) {
+ let i = bN(e), a = n === "big";
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-index-grid": "",
"data-layout": n,
"data-cells": i ? "company" : "people",
className: `${i ? "index-grid-company" : "index-grid-person"} gap-3`,
children: t.map((t) => {
- let n = t.entity_kind || zfe[e], o = r.personAvatar(t, n, a);
- return /* @__PURE__ */ (0, V.jsx)(AN, {
+ let n = t.entity_kind || Ffe[e], o = r.personAvatar(t, n, a);
+ return /* @__PURE__ */ (0, V.jsx)(ON, {
"data-k": t.k,
"data-kind": n,
name: t.k,
- readout: `${Ufe(e, t)}${t.identity_labels?.length ? " · " + t.identity_labels.join(" / ") : ""}`,
+ readout: `${zfe(e, t)}${t.identity_labels?.length ? " · " + t.identity_labels.join(" / ") : ""}`,
big: a,
onPress: () => r.openEntity(n, t.k),
- children: /* @__PURE__ */ (0, V.jsx)(kN, {
+ children: /* @__PURE__ */ (0, V.jsx)(DN, {
html: o.html,
face: o.face,
company: i,
@@ -29138,21 +28884,21 @@ function jN({ kind: e, items: t, layout: n, props: r }) {
})
});
}
-function qfe({ items: e, layout: t, props: n }) {
+function Ufe({ items: e, layout: t, props: n }) {
let r = t === "big";
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-index-grid": "",
"data-layout": t,
"data-cells": "people",
className: "index-grid-person gap-3",
- children: e.map((e) => /* @__PURE__ */ (0, V.jsx)(AN, {
+ children: e.map((e) => /* @__PURE__ */ (0, V.jsx)(ON, {
"data-follow-author": e.key,
"data-kind": "performer",
name: e.k,
readout: `${e.n.toLocaleString()} 项更新`,
big: r,
onPress: () => n.openFollowAuthor(e.key),
- children: /* @__PURE__ */ (0, V.jsx)(kN, {
+ children: /* @__PURE__ */ (0, V.jsx)(DN, {
html: n.authorAvatar(e),
company: !1,
big: r
@@ -29162,7 +28908,7 @@ function qfe({ items: e, layout: t, props: n }) {
}
//#endregion
//#region node_modules/scheduler/cjs/scheduler.production.js
-var Jfe = /* @__PURE__ */ xt(((e) => {
+var Wfe = /* @__PURE__ */ xt(((e) => {
function t(e, t) {
var n = e.length;
e.push(t);
@@ -29361,10 +29107,10 @@ var Jfe = /* @__PURE__ */ xt(((e) => {
}
};
};
-})), Yfe = /* @__PURE__ */ xt(((e, t) => {
- t.exports = Jfe();
-})), Xfe = /* @__PURE__ */ xt(((e) => {
- var t = Yfe(), n = Ot(), r = At();
+})), Gfe = /* @__PURE__ */ xt(((e, t) => {
+ t.exports = Wfe();
+})), Kfe = /* @__PURE__ */ xt(((e) => {
+ var t = Gfe(), n = Ot(), r = At();
function i(e) {
var t = "https://react.dev/errors/" + e;
if (1 < arguments.length) {
@@ -37774,7 +37520,7 @@ var Jfe = /* @__PURE__ */ xt(((e) => {
var n = !1, r = "", o = Tc, s = Ec, c = Dc;
return t != null && (!0 === t.unstable_strictMode && (n = !0), t.identifierPrefix !== void 0 && (r = t.identifierPrefix), t.onUncaughtError !== void 0 && (o = t.onUncaughtError), t.onCaughtError !== void 0 && (s = t.onCaughtError), t.onRecoverableError !== void 0 && (c = t.onRecoverableError)), t = vh(e, 1, !1, null, null, n, r, null, o, s, c, Qh), e[bt] = t.current, ep(e), new $h(t);
};
-})), MN = (/* @__PURE__ */ xt(((e, t) => {
+})), AN = (/* @__PURE__ */ xt(((e, t) => {
function n() {
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) try {
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n);
@@ -37782,16 +37528,16 @@ var Jfe = /* @__PURE__ */ xt(((e) => {
console.error(e);
}
}
- n(), t.exports = Xfe();
+ n(), t.exports = Kfe();
})))();
-function Zfe(e) {
+function qfe(e) {
let t = Number(e.min) || 0, n = Number(e.max) || 100, r = Number(e.value), i = n > t ? Math.max(0, Math.min(100, (r - t) / (n - t) * 100)) : 0;
e.style.setProperty("--board-range-value", `${i}%`);
}
//#endregion
//#region src/react/photo-lightbox/photo-lightbox.ts
-var NN = "/vendor/swiper/14.2.0/", PN = null, Qfe = () => PN ??= Promise.all([new Promise((e, t) => {
- let n = `${NN}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
+var jN = "/vendor/swiper/14.2.0/", MN = null, Jfe = () => MN ??= Promise.all([new Promise((e, t) => {
+ let n = `${jN}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
if (r?.sheet) {
e();
return;
@@ -37805,11 +37551,11 @@ var NN = "/vendor/swiper/14.2.0/", PN = null, Qfe = () => PN ??= Promise.all([ne
return;
}
let r = document.createElement("script");
- r.src = `${NN}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
+ r.src = `${jN}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
})]).then(([, e]) => e).catch((e) => {
- throw PN = null, e;
+ throw MN = null, e;
});
-function $fe(e, t, n) {
+function Yfe(e, t, n) {
let r = "fit", i = () => t.slides?.[t.activeIndex]?.querySelector("img"), a = () => {
let e = i();
return !e?.naturalWidth || !e.naturalHeight ? 100 : Math.min(100, e.offsetWidth / e.naturalWidth * 100, e.offsetHeight / e.naturalHeight * 100);
@@ -37830,48 +37576,48 @@ function $fe(e, t, n) {
}
};
}
-var FN = (e) => {
+var NN = (e) => {
let t = Number(e) || 0;
return t ? (t < 1048576 ? `${Math.max(1, Math.round(t / 1024))} KB` : pe(t)).replace(" ", "\xA0") : "大小未知";
-}, epe = (e) => e.asset?.name || e.name || "未命名图片";
-function tpe(e, t) {
+}, Xfe = (e) => e.asset?.name || e.name || "未命名图片";
+function Zfe(e, t) {
let n = e.asset;
- if (n) return [se[n.location ?? ""] || n.location || "来源未知", FN(n.size)].join(" · ");
+ if (n) return [se[n.location ?? ""] || n.location || "来源未知", NN(n.size)].join(" · ");
let r = (e.total ?? 0) > 1 ? `第 ${e.position} / ${e.total} 张` : "", i = t?.[0] && t[1] ? `${t[0]} × ${t[1]}` : "";
return [
e.source || "在线图片",
r,
i,
- e.size ? FN(e.size) : ""
+ e.size ? NN(e.size) : ""
].filter(Boolean).join(" · ");
}
//#endregion
//#region src/react/photo-lightbox/photo-lightbox-dialog.tsx
-var IN = null, LN = null, npe = 0;
-function rpe() {
- return (!LN || !IN?.isConnected) && (LN?.unmount(), IN = document.createElement("div"), IN.className = "peach-react", IN.dataset.photoLightboxHost = "", document.body.append(IN), LN = (0, MN.createRoot)(IN)), LN;
+var PN = null, FN = null, Qfe = 0;
+function $fe() {
+ return (!FN || !PN?.isConnected) && (FN?.unmount(), PN = document.createElement("div"), PN.className = "peach-react", PN.dataset.photoLightboxHost = "", document.body.append(PN), FN = (0, AN.createRoot)(PN)), FN;
}
-async function RN(e, t, n) {
+async function IN(e, t, n) {
if (!t.length || e < 0 || e >= t.length) return;
let r;
try {
- r = await Qfe();
+ r = await Jfe();
} catch {
window.open(t[e].src, "_blank", "noopener");
return;
}
- let i = rpe();
- (0, $f.flushSync)(() => i.render(/* @__PURE__ */ (0, V.jsx)(ipe, {
+ let i = $fe();
+ (0, $f.flushSync)(() => i.render(/* @__PURE__ */ (0, V.jsx)(epe, {
slides: t,
index: e,
Swiper: r,
host: n ?? null
- }, ++npe)));
+ }, ++Qfe)));
}
-function zN() {
- LN && (0, $f.flushSync)(() => LN.render(null));
+function LN() {
+ FN && (0, $f.flushSync)(() => FN.render(null));
}
-function ipe({ slides: e, index: t, Swiper: n, host: r }) {
+function epe({ slides: e, index: t, Swiper: n, host: r }) {
let i = e.length > 1, a = (0, B.useId)(), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), [_, v] = (0, B.useState)(t), [y, b] = (0, B.useState)(100), [x, S] = (0, B.useState)({}), [C, w] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [T, E] = (0, B.useState)(!1), [D, O] = (0, B.useState)({
at: t,
text: ""
@@ -37914,7 +37660,7 @@ function ipe({ slides: e, index: t, Swiper: n, host: r }) {
v(this.activeIndex), i(this.activeIndex);
} }
});
- i(t, 0), h.current = $fe(e, a, b);
+ i(t, 0), h.current = Yfe(e, a, b);
let m = Ye(e, f.current, p.current), _ = (e = !1) => {
m.hide(), f.current?.setAttribute("aria-expanded", "false"), e && f.current && document.contains(f.current) && f.current.focus();
};
@@ -37931,13 +37677,13 @@ function ipe({ slides: e, index: t, Swiper: n, host: r }) {
});
y.observe(e);
let x = (e) => {
- e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), g.current?.isOpen() ? g.current.dismiss(!0) : zN());
+ e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), g.current?.isOpen() ? g.current.dismiss(!0) : LN());
};
return document.addEventListener("keydown", x, !0), () => {
document.removeEventListener("keydown", x, !0), _(), y.disconnect(), a.destroy(!0, !0), r.destroy(!0, !0), h.current = null, g.current = null, e.close(), document.body.classList.remove("photolight-open");
};
}, []), (0, B.useLayoutEffect)(() => {
- m.current && Zfe(m.current);
+ m.current && qfe(m.current);
}, [y]);
let k = e[_], A = k.asset ?? null, j = async (e) => {
if (!A || !r || e.getAttribute("aria-busy") === "true") return;
@@ -37968,18 +37714,18 @@ function ipe({ slides: e, index: t, Swiper: n, host: r }) {
"data-photo-lightbox": "",
"data-has-strip": i ? "" : void 0,
onCancel: (e) => {
- e.preventDefault(), zN();
+ e.preventDefault(), LN();
},
onClick: (e) => {
let t = e.target;
- g.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && zN();
+ g.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && LN();
},
children: [
/* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-photo-close": "",
"aria-label": "关闭",
- onClick: zN,
+ onClick: LN,
dangerouslySetInnerHTML: { __html: R("x") }
}),
/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -38112,10 +37858,10 @@ function ipe({ slides: e, index: t, Swiper: n, host: r }) {
id: `${a}-title`,
"data-middle-truncate": "",
tabIndex: -1,
- children: epe(k)
+ children: Xfe(k)
}, _), /* @__PURE__ */ (0, V.jsx)("span", {
"data-photo-detail-meta": "",
- children: tpe(k, x[_])
+ children: Zfe(k, x[_])
})]
}),
/* @__PURE__ */ (0, V.jsx)("button", {
@@ -38154,33 +37900,33 @@ function ipe({ slides: e, index: t, Swiper: n, host: r }) {
}
//#endregion
//#region src/react/entity-body/entity-body-page.tsx
-function ape(e) {
- return e.view === "people" && e.roster ? /* @__PURE__ */ (0, V.jsx)(ope, {
+function tpe(e) {
+ return e.view === "people" && e.roster ? /* @__PURE__ */ (0, V.jsx)(npe, {
roster: e.roster,
props: e
- }) : e.view === "videos" ? /* @__PURE__ */ (0, V.jsx)(spe, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, V.jsx)(upe, {
+ }) : e.view === "videos" ? /* @__PURE__ */ (0, V.jsx)(rpe, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, V.jsx)(ope, {
photos: e.photos,
props: e
}, e.photos.revision) : null;
}
-function ope({ roster: e, props: t }) {
+function npe({ roster: e, props: t }) {
let { helpers: n, actions: r } = t, i = (0, B.useMemo)(() => ({
personAvatar: n.personAvatar,
openEntity: r.openEntity
}), [n, r]);
- return /* @__PURE__ */ (0, V.jsx)(jN, {
+ return /* @__PURE__ */ (0, V.jsx)(kN, {
kind: e.kind,
items: e.people,
layout: e.layout,
props: i
});
}
-function spe(e) {
- let t = OA(!e.items, e.skeletonHtml);
+function rpe(e) {
+ let t = hA(!e.items, e.skeletonHtml);
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-entity-grid": "",
"data-grid-reveal": t.fading ? "" : void 0,
- children: [t.layer, e.items ? /* @__PURE__ */ (0, V.jsx)(zA, {
+ children: [t.layer, e.items ? /* @__PURE__ */ (0, V.jsx)(EA, {
mode: "entity",
entityKey: `${e.kind}:${e.name}`,
revision: e.revision,
@@ -38199,16 +37945,16 @@ function spe(e) {
}) : null]
});
}
-var cpe = (e) => Array.from({ length: e.n }, (t, n) => ({
+var ipe = (e) => Array.from({ length: e.n }, (t, n) => ({
sample: !0,
code: e.code,
position: n + 1,
total: e.n,
name: `${e.code} 样张 ${n + 1}`,
source: e.site_label || "官方样张"
-})), BN = (e) => e.sample === !0, VN = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, HN = (e) => BN(e) ? `/sample-thumb?${VN(e)}` : `/photo-thumb?id=${e.id}`, lpe = (e) => BN(e) ? {
- src: `/sample-image?${VN(e)}`,
- thumb: HN(e),
+})), RN = (e) => e.sample === !0, zN = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, BN = (e) => RN(e) ? `/sample-thumb?${zN(e)}` : `/photo-thumb?id=${e.id}`, ape = (e) => RN(e) ? {
+ src: `/sample-image?${zN(e)}`,
+ thumb: BN(e),
name: e.name,
asset: null,
source: e.source,
@@ -38216,18 +37962,18 @@ var cpe = (e) => Array.from({ length: e.n }, (t, n) => ({
total: e.total
} : {
src: `/photo?id=${e.id}`,
- thumb: HN(e),
+ thumb: BN(e),
name: e.name || "",
asset: e
};
-function upe({ photos: e, props: t }) {
- let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, B.useMemo)(() => [...e.codeSets.flatMap(cpe), ...e.items], [e]), [s, c] = (0, B.useState)(() => /* @__PURE__ */ new Set()), l = (0, B.useCallback)((e) => c((t) => {
+function ope({ photos: e, props: t }) {
+ let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, B.useMemo)(() => [...e.codeSets.flatMap(ipe), ...e.items], [e]), [s, c] = (0, B.useState)(() => /* @__PURE__ */ new Set()), l = (0, B.useCallback)((e) => c((t) => {
if (t.has(e)) return t;
let n = new Set(t);
return n.add(e), n;
}), []), u = (0, B.useCallback)((e) => {
- RN(e, o.map(lpe), { revealSource: i.revealSource });
- }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, V.jsx)(dpe, {
+ IN(e, o.map(ape), { revealSource: i.revealSource });
+ }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, V.jsx)(spe, {
item: e,
index: t,
lost: s.has(t),
@@ -38245,7 +37991,7 @@ function upe({ photos: e, props: t }) {
};
}), h = p;
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, V.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(UN, {
+ m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, V.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(VN, {
label: e.code,
title: e.name,
meta: [
@@ -38257,7 +38003,7 @@ function upe({ photos: e, props: t }) {
...f,
children: o.slice(t, t + e.n).map((e, n) => d(e, t + n))
})] }, e.code)),
- m.length && e.total ? /* @__PURE__ */ (0, V.jsx)(UN, {
+ m.length && e.total ? /* @__PURE__ */ (0, V.jsx)(VN, {
label: "本地图片",
meta: `${e.total.toLocaleString()} 张`
}) : null,
@@ -38266,14 +38012,14 @@ function upe({ photos: e, props: t }) {
"data-local-wall": "",
children: e.items.map((e, t) => s.has(h + t) ? null : d(e, h + t))
}),
- e.hasMore ? /* @__PURE__ */ (0, V.jsx)(BA, {
+ e.hasMore ? /* @__PURE__ */ (0, V.jsx)(DA, {
entity: !0,
load: i.loadMorePhotos,
enabled: () => a?.() !== !1
}, e.items.length) : null
] });
}
-function UN({ label: e, title: t, meta: n }) {
+function VN({ label: e, title: t, meta: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-photo-group": "",
children: [
@@ -38290,7 +38036,7 @@ function UN({ label: e, title: t, meta: n }) {
]
});
}
-function dpe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
+function spe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
let a = e.name ?? "";
return /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
@@ -38299,7 +38045,7 @@ function dpe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
title: a,
onClick: () => i(t),
children: n ? null : /* @__PURE__ */ (0, V.jsx)("img", {
- src: HN(e),
+ src: BN(e),
alt: a,
loading: "lazy",
decoding: "async",
@@ -38308,7 +38054,7 @@ function dpe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
})
});
}
-function WN(e) {
+function HN(e) {
return {
x0: 0,
y0: 0,
@@ -38316,7 +38062,7 @@ function WN(e) {
y1: e.height
};
}
-function GN(e) {
+function UN(e) {
return {
x0: Math.round(e.x0),
y0: Math.round(e.y0),
@@ -38324,40 +38070,40 @@ function GN(e) {
y1: Math.round(e.y1)
};
}
-function KN(e) {
+function WN(e) {
return !!e && Number.isFinite(e.width) && Number.isFinite(e.height) && e.width > 0 && e.height > 0;
}
-function qN(e, t) {
- if (!KN(e)) return {
+function GN(e, t) {
+ if (!WN(e)) return {
x0: 0,
y0: 0,
x1: 0,
y1: 0
};
- if (t == null || !(t > 0)) return WN(e);
+ if (t == null || !(t > 0)) return HN(e);
let n = e.width, r = n / t;
r > e.height && (r = e.height, n = r * t);
let i = (e.width - n) / 2, a = (e.height - r) / 2;
- return GN({
+ return UN({
x0: i,
y0: a,
x1: i + n,
y1: a + r
});
}
-function fpe(e, t) {
- if (!KN(e) || !(t > 0)) return WN(e);
+function cpe(e, t) {
+ if (!WN(e) || !(t > 0)) return HN(e);
let n = Math.min(e.width, e.height * t);
- return GN({
+ return UN({
x0: e.width - n,
y0: 0,
x1: e.width,
y1: e.height
});
}
-function ppe(e, t, n) {
- if (!KN(t) || !(n > 0)) return WN(t);
- let r = JN(e, t), i = qN({
+function lpe(e, t, n) {
+ if (!WN(t) || !(n > 0)) return HN(t);
+ let r = KN(e, t), i = GN({
width: r.x1 - r.x0,
height: r.y1 - r.y0
}, n);
@@ -38368,8 +38114,8 @@ function ppe(e, t, n) {
y1: r.y0 + i.y1
};
}
-function JN(e, t, n = null, r = "width") {
- if (!KN(t)) return {
+function KN(e, t, n = null, r = "width") {
+ if (!WN(t)) return {
x0: 0,
y0: 0,
x1: 0,
@@ -38378,43 +38124,43 @@ function JN(e, t, n = null, r = "width") {
let i = Math.min(16, t.width, t.height), a = Math.max(i, Math.min(e.x1 - e.x0, t.width)), o = Math.max(i, Math.min(e.y1 - e.y0, t.height));
n != null && n > 0 && (r === "width" ? (o = a / n, o > t.height && (o = t.height, a = o * n)) : (a = o * n, a > t.width && (a = t.width, o = a / n)), a > t.width && (a = t.width, o = a / n));
let s = Math.max(0, Math.min(e.x0, t.width - a)), c = Math.max(0, Math.min(e.y0, t.height - o));
- return GN({
+ return UN({
x0: s,
y0: c,
x1: s + a,
y1: c + o
});
}
-function YN(e, t, n, r) {
+function qN(e, t, n, r) {
let i = e.x1 - e.x0, a = e.y1 - e.y0, o = Math.max(0, Math.min(e.x0 + t, r.width - i)), s = Math.max(0, Math.min(e.y0 + n, r.height - a));
- return GN({
+ return UN({
x0: o,
y0: s,
x1: o + i,
y1: s + a
});
}
-function XN(e, t, n, r = null) {
- if (!KN(n) || !(t > 0)) return e;
+function JN(e, t, n, r = null) {
+ if (!WN(n) || !(t > 0)) return e;
let i = (e.x0 + e.x1) / 2, a = (e.y0 + e.y1) / 2, o = (e.x1 - e.x0) * t, s = (e.y1 - e.y0) * t;
- return JN({
+ return KN({
x0: i - o / 2,
y0: a - s / 2,
x1: i + o / 2,
y1: a + s / 2
}, n, r);
}
-function mpe(e, t, n, r, i = null) {
+function upe(e, t, n, r, i = null) {
let a = {
x0: e.x0,
y0: e.y0,
x1: Math.max(e.x0 + 1, t),
y1: Math.max(e.y0 + 1, n)
};
- return JN(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
+ return KN(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
}
-function hpe(e, t) {
- return KN(t) ? {
+function dpe(e, t) {
+ return WN(t) ? {
left: e.x0 / t.width * 100,
top: e.y0 / t.height * 100,
width: (e.x1 - e.x0) / t.width * 100,
@@ -38426,8 +38172,8 @@ function hpe(e, t) {
height: 0
};
}
-function gpe(e, t) {
- if (!KN(t)) return {
+function fpe(e, t) {
+ if (!WN(t)) return {
size: "cover",
position: "50% 50%"
};
@@ -38437,7 +38183,7 @@ function gpe(e, t) {
position: `${i(e.x0, t.width, n)}% ${i(e.y0, t.height, r)}%`
};
}
-function _pe(e, t) {
+function ppe(e, t) {
let n = Math.max(1, e.x1 - e.x0), r = Math.max(1, e.y1 - e.y0);
return {
left: `${-e.x0 / n * 100}%`,
@@ -38446,29 +38192,29 @@ function _pe(e, t) {
height: `${t.height / r * 100}%`
};
}
-function ZN(e, t, n) {
+function YN(e, t, n) {
return t > 0 ? e * n / t : 0;
}
//#endregion
//#region src/react/components/modal-frame.tsx
-var QN = {
+var mpe = {
"avatar-picker": "max-w-avatar-picker",
"cover-crop": "max-w-cover-crop",
form: "max-w-form-modal"
};
-function $N({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
+function XN({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
let { isFocusVisible: a } = Zm();
- return /* @__PURE__ */ (0, V.jsx)(jO, {
+ return /* @__PURE__ */ (0, V.jsx)(gk, {
isOpen: e,
onOpenChange: t,
isDismissable: !0,
"data-modal-motion": "",
"data-motion-instant": a || void 0,
className: "fixed inset-0 z-dialog flex items-center justify-center bg-scrim p-4",
- children: /* @__PURE__ */ (0, V.jsx)(dse, {
+ children: /* @__PURE__ */ (0, V.jsx)(zse, {
"data-modal-surface": "",
- className: `flex max-h-full w-full ${QN[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
- children: /* @__PURE__ */ (0, V.jsx)(DO, {
+ className: `flex max-h-full w-full ${mpe[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
+ children: /* @__PURE__ */ (0, V.jsx)(fk, {
"aria-label": r,
className: "flex min-h-0 flex-col outline-none",
children: i
@@ -38476,7 +38222,7 @@ function $N({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
})
});
}
-function eP({ children: e }) {
+function ZN({ children: e }) {
return /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
className: "flex size-14 shrink-0 items-center justify-center rounded-2xl border border-separator-border bg-background-secondary-default text-foreground-icon-secondary",
@@ -38485,8 +38231,8 @@ function eP({ children: e }) {
}
//#endregion
//#region src/react/crop/crop-frame.tsx
-var vpe = .02, tP = 1.08;
-function nP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
+var hpe = .02, QN = 1.08;
+function $N({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
let s = (0, B.useRef)(null), c = (0, B.useRef)(null), [l, u] = (0, B.useState)(!1);
(0, B.useEffect)(() => {
u(!1);
@@ -38497,8 +38243,8 @@ function nP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
dx: 0,
dy: 0
} : {
- dx: ZN(e, n.clientWidth, r.width),
- dy: ZN(t, n.clientHeight, r.height)
+ dx: YN(e, n.clientWidth, r.width),
+ dy: YN(t, n.clientHeight, r.height)
};
}, [r]);
function f(e) {
@@ -38516,29 +38262,29 @@ function nP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
if (!n || !a || !r) return;
let o = d(e.clientX - n.x, e.clientY - n.y);
if (n.mode === "move") {
- i(YN(n.box, o.dx, o.dy, r));
+ i(qN(n.box, o.dx, o.dy, r));
return;
}
- i(mpe(n.box, n.box.x0 + (n.box.x1 - n.box.x0) + o.dx, n.box.y0 + (n.box.y1 - n.box.y0) + o.dy, r, t));
+ i(upe(n.box, n.box.x0 + (n.box.x1 - n.box.x0) + o.dx, n.box.y0 + (n.box.y1 - n.box.y0) + o.dy, r, t));
}
function m(e) {
c.current && (c.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
}
function h(e) {
if (!n || !r) return;
- let a = Math.max(1, (n.x1 - n.x0) * vpe), o = {
+ let a = Math.max(1, (n.x1 - n.x0) * hpe), o = {
ArrowLeft: [-a, 0],
ArrowRight: [a, 0],
ArrowUp: [0, -a],
ArrowDown: [0, a]
};
if (o[e.key]) {
- e.preventDefault(), i(YN(n, o[e.key][0], o[e.key][1], r));
+ e.preventDefault(), i(qN(n, o[e.key][0], o[e.key][1], r));
return;
}
- (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(XN(n, e.key === "-" ? 1 / tP : tP, r, t)));
+ (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(JN(n, e.key === "-" ? 1 / QN : QN, r, t)));
}
- let g = n && r ? hpe(JN(n, r, t), r) : null, _ = g ? {
+ let g = n && r ? dpe(KN(n, r, t), r) : null, _ = g ? {
"--crop-l": `${g.left}%`,
"--crop-t": `${g.top}%`,
"--crop-w": `${g.width}%`,
@@ -38557,7 +38303,7 @@ function nP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
draggable: !1,
onLoad: (e) => {
let t = e.currentTarget;
- KN({
+ WN({
width: t.naturalWidth,
height: t.naturalHeight
}) && a({
@@ -38596,7 +38342,7 @@ function nP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
onPointerCancel: m,
onKeyDown: h,
onWheel: (e) => {
- !n || !r || i(XN(n, e.deltaY > 0 ? tP : 1 / tP, r, t));
+ !n || !r || i(JN(n, e.deltaY > 0 ? QN : 1 / QN, r, t));
},
className: "absolute left-(--crop-l) top-(--crop-t) h-(--crop-h) w-(--crop-w) cursor-move touch-none outline-none ring-2 ring-border-focus-ring ring-inset focus-visible:ring-4",
children: /* @__PURE__ */ (0, V.jsx)("span", {
@@ -38618,29 +38364,29 @@ function nP({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
}
//#endregion
//#region src/react/avatar-picker/avatar-picker.ts
-var ype = "/api/avatar-choices", rP = "/api/avatar-pick", bpe = "/api/avatar-code-cover", xpe = "/avatar-choice", iP = (e, t) => [
+var gpe = "/api/avatar-choices", eP = "/api/avatar-pick", _pe = "/api/avatar-code-cover", vpe = "/avatar-choice", tP = (e, t) => [
"avatar-choices",
e,
t
-], aP = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, oP = (e, t, n, r = "") => `${xpe}${aP(e, t)}&ref=${encodeURIComponent(n)}` + (r ? `&v=${encodeURIComponent(r)}` : ""), sP = (e, t) => t.startsWith("cover:") || t.endsWith(":cover") ? e.version : "", Spe = (e, t, n) => G(ype + aP(e, t), n), Cpe = (e) => K(bpe, { code: e });
-function cP(e, t, n) {
+], nP = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, rP = (e, t, n, r = "") => `${vpe}${nP(e, t)}&ref=${encodeURIComponent(n)}` + (r ? `&v=${encodeURIComponent(r)}` : ""), iP = (e, t) => t.startsWith("cover:") || t.endsWith(":cover") ? e.version : "", ype = (e, t, n) => G(gpe + nP(e, t), n), bpe = (e) => K(_pe, { code: e });
+function aP(e, t, n) {
let r = t.width === e.width && t.height === e.height;
- return e.focus && r ? ppe(e.focus, t, n) : qN(t, n);
+ return e.focus && r ? lpe(e.focus, t, n) : GN(t, n);
}
-var wpe = (e) => e.crop && KN({
+var xpe = (e) => e.crop && WN({
width: e.width,
height: e.height
});
-async function Tpe(e, t, n) {
+async function Spe(e, t, n) {
if (!("file" in n)) {
- await K(rP, {
+ await K(eP, {
kind: e,
id: t,
...n
});
return;
}
- let r = n.file, i = await fetch(`${rP}${aP(e, t)}&name=${encodeURIComponent(r.name)}`, {
+ let r = n.file, i = await fetch(`${eP}${nP(e, t)}&name=${encodeURIComponent(r.name)}`, {
method: "POST",
credentials: "same-origin",
body: r
@@ -38649,30 +38395,30 @@ async function Tpe(e, t, n) {
let a = await i.json().catch(() => null);
throw new jS(a?.error || `请求失败(${i.status})`, i.status, a);
}
-function Epe(e, t) {
+function Cpe(e, t) {
if (!t) return e;
let n = t.matched_names.filter((t) => t !== e);
return n.length ? `${e}:图库里按「${n.join("」「")}」找到的。` : t.choices.length ? `${e}:换上的那张留在本机,随时能换回来。` : `${e}:图库里没有这个名字,用下面两种方式换。`;
}
-var Dpe = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
-function Ope(e) {
- return !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${Dpe(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
+var wpe = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
+function Tpe(e) {
+ return !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${wpe(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
}
-var lP = (e) => e.cast > 1, kpe = (e) => lP(e) ? `${e.label}:${e.cast} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, Ape = {
+var oP = (e) => e.cast > 1, Epe = (e) => oP(e) ? `${e.label}:${e.cast} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, Dpe = {
gfriends: "图库",
history: "用过的",
asset: "作品画面",
code: "番号封面"
};
-function jpe(e) {
+function Ope(e) {
if (e.startsWith("cover:")) return "封面";
let t = e.split(":")[2] || "";
if (t === "cover") return "封面";
let n = Number(t.replace("cell", ""));
return Number.isFinite(n) ? `第 ${n + 1} 格` : t;
}
-var Mpe = (e) => `${Ape[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (lP(e) ? ` · ${e.cast} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : ""), Npe = 8, Ppe = 3 / 4;
-function Fpe({ kind: e, entityId: t, name: n, onPicked: r }) {
+var kpe = (e) => `${Dpe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (oP(e) ? ` · ${e.cast} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : ""), Ape = 8, jpe = 3 / 4;
+function Mpe({ kind: e, entityId: t, name: n, onPicked: r }) {
let [i, a] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("span", {
className: "absolute right-1 bottom-1 z-10",
@@ -38687,12 +38433,12 @@ function Fpe({ kind: e, entityId: t, name: n, onPicked: r }) {
className: "size-4"
})
})
- }), /* @__PURE__ */ (0, V.jsx)($N, {
+ }), /* @__PURE__ */ (0, V.jsx)(XN, {
isOpen: i,
onOpenChange: a,
width: "avatar-picker",
label: "更换头像",
- children: /* @__PURE__ */ (0, V.jsx)(Ipe, {
+ children: /* @__PURE__ */ (0, V.jsx)(Npe, {
kind: e,
entityId: t,
name: n,
@@ -38701,39 +38447,39 @@ function Fpe({ kind: e, entityId: t, name: n, onPicked: r }) {
})
})] });
}
-function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
- let a = (0, B.useRef)(null), o = OM(), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(null), h = iP(e, t), g = (0, B.useRef)(!1), _ = TS({
+function Npe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
+ let a = (0, B.useRef)(null), o = vM(), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(null), h = tP(e, t), g = (0, B.useRef)(!1), _ = TS({
queryKey: h,
- queryFn: ({ signal: n }) => Spe(e, t, n),
+ queryFn: ({ signal: n }) => ype(e, t, n),
retryOnMount: !0
});
(0, B.useEffect)(() => () => {
- g.current && z.removeQueries({ queryKey: iP(e, t) });
+ g.current && z.removeQueries({ queryKey: tP(e, t) });
}, [e, t]);
let v = OS({
- mutationFn: (n) => Tpe(e, t, n),
+ mutationFn: (n) => Spe(e, t, n),
onSuccess: () => {
g.current = !0, i(), r();
}
}), y = OS({
- mutationFn: (e) => Cpe(e),
+ mutationFn: (e) => bpe(e),
onSuccess: (e) => m(e)
});
function b(e) {
let t = e.currentTarget, n = t.files?.[0];
t.value = "", f(""), n && v.mutate({ file: n });
}
- let x = _.data, S = x?.choices ?? [], C = d || (v.error ? W(v.error) : "") || (!p && y.error ? W(y.error) : "") || (_.error ? W(_.error) : ""), w = v.isPending || y.isPending, T = p ? "" : Ope(x);
+ let x = _.data, S = x?.choices ?? [], C = d || (v.error ? W(v.error) : "") || (!p && y.error ? W(y.error) : "") || (_.error ? W(_.error) : ""), w = v.isPending || y.isPending, T = p ? "" : Tpe(x);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, V.jsx)(eP, { children: /* @__PURE__ */ (0, V.jsx)(OT, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, V.jsx)(ZN, { children: /* @__PURE__ */ (0, V.jsx)(DT, { className: "size-6" }) }),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(ZE, {
+ children: [/* @__PURE__ */ (0, V.jsx)(ID, {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: p ? "框出头像那一块" : "更换头像"
@@ -38744,7 +38490,7 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: p ? kpe(p) : Epe(n, x)
+ children: p ? Epe(p) : Cpe(n, x)
}),
T ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
@@ -38756,14 +38502,14 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, V.jsx)(AM, {
+ /* @__PURE__ */ (0, V.jsx)(bM, {
icon: pT,
size: "small",
"aria-label": "关闭",
onClick: i
})
]
- }), p ? /* @__PURE__ */ (0, V.jsx)(Rpe, {
+ }), p ? /* @__PURE__ */ (0, V.jsx)(Fpe, {
kind: e,
entityId: t,
choice: p,
@@ -38787,7 +38533,7 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
"aria-busy": _.isPending || void 0,
"data-skeleton": _.isPending ? "avatar-choices" : void 0,
className: "inline-grid grid-cols-3 content-start gap-2 sm:grid-cols-4",
- children: _.isPending ? Array.from({ length: Npe }, (e, t) => /* @__PURE__ */ (0, V.jsxs)("span", {
+ children: _.isPending ? Array.from({ length: Ape }, (e, t) => /* @__PURE__ */ (0, V.jsxs)("span", {
"aria-hidden": !0,
"data-avatar-skeleton": !0,
className: "flex flex-col gap-1 overflow-hidden rounded-2lg border border-separator-border bg-background-secondary-default pb-1 text-caption-1-regular",
@@ -38800,15 +38546,15 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
role: "option",
"data-avatar-choice": !0,
"aria-selected": n.current,
- title: Mpe(n),
+ title: kpe(n),
...X(w),
onClick: () => {
w || (n.crop ? m(n) : v.mutate({ ref: n.ref }));
},
className: "relative flex cursor-pointer flex-col gap-1 overflow-hidden rounded-2lg border border-separator-border bg-background-secondary-default pb-1 text-center text-caption-1-regular text-text-secondary outline-none hover:border-border-button-hover hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-selected:border-border-focus-ring aria-selected:bg-background-tertiary-default aria-selected:text-text-primary aria-disabled:cursor-progress aria-disabled:opacity-60",
children: [
- /* @__PURE__ */ (0, V.jsx)(Lpe, {
- src: oP(e, t, n.ref, sP(n, n.ref)),
+ /* @__PURE__ */ (0, V.jsx)(Ppe, {
+ src: rP(e, t, n.ref, iP(n, n.ref)),
choice: n
}),
/* @__PURE__ */ (0, V.jsx)("span", {
@@ -38823,7 +38569,7 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
children: "在用"
})
}) : null,
- lP(n) ? /* @__PURE__ */ (0, V.jsx)("span", {
+ oP(n) ? /* @__PURE__ */ (0, V.jsx)("span", {
className: "absolute top-1 right-1",
children: /* @__PURE__ */ (0, V.jsxs)(xE, {
variant: "caption",
@@ -38844,7 +38590,7 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
},
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: /* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "番号",
placeholder: "番号,如 ABW-232",
value: l,
@@ -38879,7 +38625,7 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
className: "flex min-w-0 flex-1 items-center gap-2",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: /* @__PURE__ */ (0, V.jsx)(GM, {
type: "url",
"aria-label": "图片地址",
placeholder: "https://…",
@@ -38899,7 +38645,7 @@ function Ipe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
})]
})] })] });
}
-function Lpe({ src: e, choice: t }) {
+function Ppe({ src: e, choice: t }) {
let n = (0, B.useRef)(null), [r, i] = (0, B.useState)(!1);
(0, B.useEffect)(() => {
n.current?.complete && n.current.naturalWidth && i(!0);
@@ -38907,7 +38653,7 @@ function Lpe({ src: e, choice: t }) {
let a = {
width: t.width,
height: t.height
- }, o = wpe(t) ? _pe(cP(t, a, Ppe), a) : null, s = r ? !0 : void 0;
+ }, o = xpe(t) ? ppe(aP(t, a, jpe), a) : null, s = r ? !0 : void 0;
return /* @__PURE__ */ (0, V.jsxs)("span", {
className: "relative block w-full aspect-avatar-choice overflow-hidden",
children: [/* @__PURE__ */ (0, V.jsx)("img", {
@@ -38932,23 +38678,23 @@ function Lpe({ src: e, choice: t }) {
})]
});
}
-function Rpe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
- let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, B.useState)(o[0]), [l, u] = (0, B.useState)(null), [d, f] = (0, B.useState)(null), p = sP(n, s), m = oP(e, t, s, p), h = OM();
+function Fpe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
+ let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, B.useState)(o[0]), [l, u] = (0, B.useState)(null), [d, f] = (0, B.useState)(null), p = iP(n, s), m = rP(e, t, s, p), h = vM();
function g(e) {
c(e), u(null), f(null);
}
- let _ = d && l ? gpe(d, l) : null;
+ let _ = d && l ? fpe(d, l) : null;
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("div", {
ref: h,
className: "flex min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto border-t border-separator-border px-5 py-4",
- children: [/* @__PURE__ */ (0, V.jsx)(nP, {
+ children: [/* @__PURE__ */ (0, V.jsx)($N, {
src: m,
aspect: 1,
box: d,
size: l,
label: `${n.label} 的头像取景框`,
onSize: (e) => {
- u(e), KN(e) && f(s === n.ref ? cP(n, e, 1) : qN(e, 1));
+ u(e), WN(e) && f(s === n.ref ? aP(n, e, 1) : GN(e, 1));
},
onBox: f
}), o.length > 1 ? /* @__PURE__ */ (0, V.jsx)("div", {
@@ -38962,7 +38708,7 @@ function Rpe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
"data-crop-base": !0,
onClick: () => g(e),
className: "cursor-pointer rounded-lg px-2 py-1 text-caption-1-regular text-text-secondary outline-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-checked:bg-background-tertiary-default aria-checked:text-text-primary",
- children: jpe(e)
+ children: Ope(e)
}, e))
}) : null]
}), /* @__PURE__ */ (0, V.jsxs)("div", {
@@ -38996,7 +38742,7 @@ function Rpe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
}
//#endregion
//#region src/react/feed-new/feed-new-row.tsx
-function uP({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
+function sP({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
let a = (0, B.useRef)(null), o = e?.items.length ? e.html : "";
(0, B.useLayoutEffect)(() => {
t.removeAttribute("aria-busy"), t.hidden = !o, e && i?.(!!o);
@@ -39030,12 +38776,12 @@ function uP({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
}
//#endregion
//#region src/react/entity-hero/glyph.tsx
-var zpe = {
+var Ipe = {
"text-aa": 1.435,
"mark-javdb": 326 / 111
};
-function dP({ name: e }) {
- let t = zpe[e];
+function cP({ name: e }) {
+ let t = Ipe[e];
return /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: t ? `0 0 ${(24 * t).toFixed(2)} 24` : "0 0 24 24",
"aria-hidden": "true",
@@ -39045,19 +38791,19 @@ function dP({ name: e }) {
}
//#endregion
//#region src/react/entity-hero/hero-pop.tsx
-function fP(e, t) {
+function lP(e, t) {
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
t.style.left = `${Math.max(8, Math.min(innerWidth - r.width - 8, n.left))}px`;
let i = n.bottom + 8;
t.style.top = `${i + r.height <= innerHeight - 8 ? i : Math.max(8, n.top - r.height - 8)}px`;
}
-var pP = (e) => !!e?.isConnected && e.matches(":popover-open");
-function mP(e, t, n, r) {
+var uP = (e) => !!e?.isConnected && e.matches(":popover-open");
+function dP(e, t, n, r) {
let i = (0, B.useRef)(r);
i.current = r, (0, B.useEffect)(() => {
if (!e) return;
let r = () => {
- t.current && pP(n.current) ? fP(t.current, n.current) : i.current();
+ t.current && uP(n.current) ? lP(t.current, n.current) : i.current();
};
return addEventListener("scroll", r, {
capture: !0,
@@ -39071,17 +38817,17 @@ function mP(e, t, n, r) {
n
]);
}
-function hP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
+function fP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
let o = (0, B.useRef)(null), s = (0, B.useRef)(null), [c, l] = (0, B.useState)(!1), u = (0, B.useRef)(!1), d = (0, B.useRef)(0), f = () => {
- clearTimeout(d.current), u.current = !1, pP(s.current) && s.current.hidePopover(), l(!1);
+ clearTimeout(d.current), u.current = !1, uP(s.current) && s.current.hidePopover(), l(!1);
}, p = () => {
- clearTimeout(d.current), !(!s.current || !o.current || pP(s.current)) && (s.current.showPopover(), fP(o.current, s.current), l(!0));
+ clearTimeout(d.current), !(!s.current || !o.current || uP(s.current)) && (s.current.showPopover(), lP(o.current, s.current), l(!0));
}, m = () => {
clearTimeout(d.current), d.current = window.setTimeout(() => {
!u.current && !o.current?.matches(":hover,:focus-visible") && !s.current?.matches(":hover") && f();
}, 150);
};
- return mP(c, o, s, f), (0, B.useEffect)(() => {
+ return dP(c, o, s, f), (0, B.useEffect)(() => {
if (!c) return;
let e = (e) => {
let t = e.target;
@@ -39107,7 +38853,7 @@ function hP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
u.current ? f() : (p(), u.current = !0);
},
onKeyDown: (e) => {
- e.key === "Escape" && pP(s.current) && (e.preventDefault(), f());
+ e.key === "Escape" && uP(s.current) && (e.preventDefault(), f());
},
children: ["+", t]
}), /* @__PURE__ */ (0, V.jsxs)("div", {
@@ -39125,16 +38871,16 @@ function hP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
}), a]
})] });
}
-function Bpe({ following: e, busy: t, onToggle: n, tip: r }) {
+function Lpe({ following: e, busy: t, onToggle: n, tip: r }) {
let i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), [s, c] = (0, B.useState)(!1), l = (0, B.useRef)(!1), u = () => {
- pP(o.current) && o.current.hidePopover(), c(!1);
+ uP(o.current) && o.current.hidePopover(), c(!1);
}, d = () => {
- l.current || !o.current || !i.current || pP(o.current) || (o.current.showPopover(), fP(i.current, o.current), c(!0));
+ l.current || !o.current || !i.current || uP(o.current) || (o.current.showPopover(), lP(i.current, o.current), c(!0));
}, f = () => {
l.current = !1, u();
};
- return mP(s, i, o, () => c(!1)), (0, B.useEffect)(() => {
- i.current && pP(o.current) && fP(i.current, o.current);
+ return dP(s, i, o, () => c(!1)), (0, B.useEffect)(() => {
+ i.current && uP(o.current) && lP(i.current, o.current);
}, [r]), /* @__PURE__ */ (0, V.jsxs)("label", {
ref: i,
"data-entry-feed": "",
@@ -39143,7 +38889,7 @@ function Bpe({ following: e, busy: t, onToggle: n, tip: r }) {
a.current?.matches(":focus-visible") || f();
},
children: [
- /* @__PURE__ */ (0, V.jsx)(dP, { name: "rss" }),
+ /* @__PURE__ */ (0, V.jsx)(cP, { name: "rss" }),
/* @__PURE__ */ (0, V.jsx)("input", {
ref: a,
type: "checkbox",
@@ -39178,29 +38924,29 @@ function Bpe({ following: e, busy: t, onToggle: n, tip: r }) {
}
//#endregion
//#region src/react/entity-hero/name-picker.tsx
-function Vpe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
+function Rpe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let [i, a] = (0, B.useState)(!1), o = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
o.current?.setAttribute("title", "名字与别名");
- }, []), /* @__PURE__ */ (0, V.jsxs)(rse, {
+ }, []), /* @__PURE__ */ (0, V.jsxs)(jse, {
isOpen: i,
onOpenChange: a,
- children: [/* @__PURE__ */ (0, V.jsx)(YE, {
+ children: [/* @__PURE__ */ (0, V.jsx)(PD, {
ref: o,
"data-namepick-toggle": "",
"aria-label": "名字与别名",
- children: /* @__PURE__ */ (0, V.jsx)(dP, { name: "chevron-down" })
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
+ children: /* @__PURE__ */ (0, V.jsx)(cP, { name: "chevron-down" })
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
placement: "bottom start",
offset: 8,
containerPadding: 8,
- className: yk,
+ className: uM,
"data-namepick-menu": "",
- children: /* @__PURE__ */ (0, V.jsxs)(ase, {
+ children: /* @__PURE__ */ (0, V.jsxs)(Nse, {
"aria-label": "名字与别名",
"data-namepick-list": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(CO, {
+ /* @__PURE__ */ (0, V.jsx)(ck, {
selectionMode: "single",
disallowEmptySelection: !0,
selectedKeys: [e],
@@ -39208,31 +38954,31 @@ function Vpe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let r = [...t][0];
r && r !== e && n(r);
},
- children: t.map((e) => /* @__PURE__ */ (0, V.jsxs)(TO, {
+ children: t.map((e) => /* @__PURE__ */ (0, V.jsxs)(uk, {
id: e,
textValue: e,
"data-namepick-name": e,
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "check" }), /* @__PURE__ */ (0, V.jsx)("span", { children: e })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "check" }), /* @__PURE__ */ (0, V.jsx)("span", { children: e })]
}, e))
}),
- /* @__PURE__ */ (0, V.jsx)(zoe, { "data-namepick-rule": "" }),
- /* @__PURE__ */ (0, V.jsx)(CO, { children: /* @__PURE__ */ (0, V.jsxs)(TO, {
+ /* @__PURE__ */ (0, V.jsx)(pse, { "data-namepick-rule": "" }),
+ /* @__PURE__ */ (0, V.jsx)(ck, { children: /* @__PURE__ */ (0, V.jsxs)(uk, {
id: "alias",
textValue: "添加别名",
"data-namepick-alias": "",
onAction: r,
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "plus" }), /* @__PURE__ */ (0, V.jsx)("span", { children: "添加别名…" })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "plus" }), /* @__PURE__ */ (0, V.jsx)("span", { children: "添加别名…" })]
}) })
]
})
})]
});
}
-var Hpe = (e) => e === "studio" || e === "agency", gP = (e) => e === "performer" || e === "creator", Upe = (e) => e ? "已订阅新作,点击取消订阅" : "订阅新作";
-function Wpe(e) {
+var zpe = (e) => e === "studio" || e === "agency", pP = (e) => e === "performer" || e === "creator", Bpe = (e) => e ? "已订阅新作,点击取消订阅" : "订阅新作";
+function Vpe(e) {
return [e.canonical_name, ...e.aliases || []].filter((e, t, n) => e && n.indexOf(e) === t);
}
-function _P(e) {
+function mP(e) {
if (e.agency) return {
name: e.agency.canonical_name,
linked: !0
@@ -39243,13 +38989,13 @@ function _P(e) {
linked: !1
} : null;
}
-function vP(e, t) {
+function hP(e, t) {
let n = _e(e, "performer"), r = me(t);
return r && [e.label, n].map(me).some((e) => e && (r.includes(e) || e.includes(r))) ? `${t} 官方资料` : n || e.label || "";
}
-var yP = (e) => ({ site: he(e) });
-function Gpe(e, t) {
- let n = _P(e)?.name || "", r = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
+var gP = (e) => ({ site: he(e) });
+function Hpe(e, t) {
+ let n = mP(e)?.name || "", r = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
type: "icon",
url: e.url,
title: e.label,
@@ -39259,7 +39005,7 @@ function Gpe(e, t) {
let t = e.retired_year ? `已于 ${e.retired_year} 年隐退` : "链接已失效";
return {
type: "gone",
- title: `${vP(e, n)} · ${t}`
+ title: `${hP(e, n)} · ${t}`
};
}
let r = e.url || "";
@@ -39267,11 +39013,11 @@ function Gpe(e, t) {
type: "private",
label: e.label || e.hostname || "已记录"
};
- if (gP(t) && e.link_kind !== "social") return {
+ if (pP(t) && e.link_kind !== "social") return {
type: "icon",
url: r,
- title: vP(e, n),
- mark: yP(e)
+ title: hP(e, n),
+ mark: gP(e)
};
if (e.link_kind === "social") {
let t = le(r);
@@ -39279,7 +39025,7 @@ function Gpe(e, t) {
type: "icon",
url: r,
title: e.label || "",
- mark: t ? { brand: t } : yP(e)
+ mark: t ? { brand: t } : gP(e)
};
}
return {
@@ -39287,13 +39033,13 @@ function Gpe(e, t) {
url: r,
title: e.label || "",
text: _e(e, t, i),
- mark: yP(e)
+ mark: gP(e)
};
});
return [...r, ...a];
}
-var bP = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
-function Kpe(e) {
+var _P = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
+function Upe(e) {
return [
[
"legal_name",
@@ -39349,7 +39095,7 @@ function Kpe(e) {
}]
}] : []);
}
-function qpe(e) {
+function Wpe(e) {
if (!e) return [];
let t = [];
e.birth_date && t.push({
@@ -39406,14 +39152,14 @@ function qpe(e) {
tags: e.tags
}), t;
}
-function Jpe(e) {
+function Gpe(e) {
let t = e.length > 5 ? 4 : e.length;
return {
shown: e.slice(0, t),
rest: e.length - t
};
}
-function Ype(e) {
+function Kpe(e) {
if (!e) return null;
let t = e.shown || [], n = [e.reading || "", ...t].filter(Boolean), r = (e.total || 0) - t.length;
return n.length || r > 0 ? {
@@ -39424,7 +39170,7 @@ function Ype(e) {
}
//#endregion
//#region src/react/entity-hero/entity-hero-page.tsx
-function Xpe(e) {
+function qpe(e) {
return A({
id: e.id,
hasImage: e.has_image,
@@ -39434,8 +39180,8 @@ function Xpe(e) {
focus: e.avatar_focus
});
}
-function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a, helpers: o }) {
- let s = gP(e), c = Hpe(e), l = s ? qpe(n.profile) : c ? Kpe(n.company_profile) : [], u = Gpe(n, e), d = bP(n), f = e === "agency" ? [] : n.related_performers || [], p = (0, B.useRef)(null), m = (0, B.useRef)(null);
+function Jpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a, helpers: o }) {
+ let s = pP(e), c = zpe(e), l = s ? Wpe(n.profile) : c ? Upe(n.company_profile) : [], u = Hpe(n, e), d = _P(n), f = e === "agency" ? [] : n.related_performers || [], p = (0, B.useRef)(null), m = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
o.wireScroller(p.current);
}, [o, u.length]), (0, B.useEffect)(() => {
@@ -39448,7 +39194,7 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
"data-entity-portrait-wrap": "",
- children: [/* @__PURE__ */ (0, V.jsx)(Qpe, {
+ children: [/* @__PURE__ */ (0, V.jsx)(Ype, {
kind: e,
name: t,
helpers: o,
@@ -39456,7 +39202,7 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
company: c
}), s && n.id ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-avatar-picker": "",
- children: /* @__PURE__ */ (0, V.jsx)(Fpe, {
+ children: /* @__PURE__ */ (0, V.jsx)(Mpe, {
kind: e,
entityId: Number(n.id),
name: n.canonical_name || t,
@@ -39469,14 +39215,14 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
"data-entity-title": "",
- children: [/* @__PURE__ */ (0, V.jsx)("h2", { children: n.canonical_name }), /* @__PURE__ */ (0, V.jsx)(Vpe, {
+ children: [/* @__PURE__ */ (0, V.jsx)("h2", { children: n.canonical_name }), /* @__PURE__ */ (0, V.jsx)(Rpe, {
current: n.canonical_name,
- choices: Wpe(n),
+ choices: Vpe(n),
onChoose: a.chooseName,
onAddAlias: a.addAlias
})]
}),
- /* @__PURE__ */ (0, V.jsx)($pe, {
+ /* @__PURE__ */ (0, V.jsx)(Xpe, {
kind: e,
entity: n,
actions: a
@@ -39497,9 +39243,9 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
u.length ? /* @__PURE__ */ (0, V.jsx)("div", {
ref: p,
"data-entity-links": "",
- children: u.map((e, t) => /* @__PURE__ */ (0, V.jsx)(rme, { link: e }, t))
+ children: u.map((e, t) => /* @__PURE__ */ (0, V.jsx)(eme, { link: e }, t))
}) : null,
- d.length || n.feed ? /* @__PURE__ */ (0, V.jsx)(ime, {
+ d.length || n.feed ? /* @__PURE__ */ (0, V.jsx)(tme, {
entity: n,
actions: a,
helpers: o
@@ -39508,11 +39254,11 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
}),
l.length ? /* @__PURE__ */ (0, V.jsx)("dl", {
"data-entity-facts": "",
- children: l.map((e) => /* @__PURE__ */ (0, V.jsx)(tme, {
+ children: l.map((e) => /* @__PURE__ */ (0, V.jsx)(Qpe, {
glyph: e.glyph,
label: e.label,
clip: e.clip,
- children: e.tags ? /* @__PURE__ */ (0, V.jsx)(nme, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, V.jsxs)("span", {
+ children: e.tags ? /* @__PURE__ */ (0, V.jsx)($pe, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, V.jsxs)("span", {
"data-fact-tone": e.tone === "plain" ? void 0 : e.tone,
children: [t ? " " : "", e.text]
}, t))
@@ -39531,7 +39277,7 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
onClick: () => a.openEntity("performer", e.k),
children: [/* @__PURE__ */ (0, V.jsx)("span", {
"data-hero-ring": "",
- dangerouslySetInnerHTML: { __html: `<span>${L(e.k.slice(0, 1))}</span>${Xpe(e)}` }
+ dangerouslySetInnerHTML: { __html: `<span>${L(e.k.slice(0, 1))}</span>${qpe(e)}` }
}), /* @__PURE__ */ (0, V.jsx)("span", {
"data-hero-costar-name": "",
children: e.k
@@ -39539,14 +39285,14 @@ function Zpe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
}, e.k))
})
}) : null]
- }), i ? (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(uP, {
+ }), i ? (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(sP, {
feedNew: r,
host: i,
wire: o.wireFeedRow,
act: (e, t) => a.feedAction(e, t)
}), i) : null] });
}
-function Qpe({ kind: e, name: t, helpers: n, people: r, company: i }) {
+function Ype({ kind: e, name: t, helpers: n, people: r, company: i }) {
let [a] = (0, B.useState)(() => `${n.portraitImg()}<span>${L(t.slice(0, 1))}</span>`);
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-entity-portrait": r ? "round" : "square",
@@ -39555,8 +39301,8 @@ function Qpe({ kind: e, name: t, helpers: n, people: r, company: i }) {
dangerouslySetInnerHTML: { __html: a }
});
}
-function $pe({ kind: e, entity: t, actions: n }) {
- let r = _P(t), i = (e, t) => (r) => {
+function Xpe({ kind: e, entity: t, actions: n }) {
+ let r = mP(t), i = (e, t) => (r) => {
r.preventDefault(), n.openEntity(e, t);
}, a = r ? r.linked ? /* @__PURE__ */ (0, V.jsx)("a", {
href: ue("agency", r.name),
@@ -39565,37 +39311,37 @@ function $pe({ kind: e, entity: t, actions: n }) {
children: r.name
}) : r.name : null, o = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("b", { children: t.asset_count.toLocaleString() }), " 个视频"] });
if (e === "performer" || e === "creator") {
- let e = Ype(t.name_groups);
+ let e = Kpe(t.name_groups);
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-entity-alias": "meta",
children: [
- /* @__PURE__ */ (0, V.jsx)(xP, { entity: t }),
+ /* @__PURE__ */ (0, V.jsx)(vP, { entity: t }),
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-meta-item": "",
title: "视频",
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "film" }), /* @__PURE__ */ (0, V.jsx)("span", { children: o })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "film" }), /* @__PURE__ */ (0, V.jsx)("span", { children: o })]
}),
a ? /* @__PURE__ */ (0, V.jsxs)("span", {
"data-meta-item": "",
title: "事务所",
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "briefcase" }), /* @__PURE__ */ (0, V.jsx)("span", { children: a })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "briefcase" }), /* @__PURE__ */ (0, V.jsx)("span", { children: a })]
}) : null,
e ? /* @__PURE__ */ (0, V.jsxs)("div", {
"data-meta-item": "names",
children: [
- /* @__PURE__ */ (0, V.jsx)(dP, { name: "id-card" }),
+ /* @__PURE__ */ (0, V.jsx)(cP, { name: "id-card" }),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-alias-names": "",
title: "别名",
children: e.names.map((e, t) => /* @__PURE__ */ (0, V.jsx)("span", { children: e }, t))
}),
- e.rest > 0 ? /* @__PURE__ */ (0, V.jsx)(hP, {
+ e.rest > 0 ? /* @__PURE__ */ (0, V.jsx)(fP, {
id: "entityAliasPop",
hook: "alias",
rest: e.rest,
label: `另外 ${e.rest} 个别名`,
heading: `${e.total} 个别名`,
- children: /* @__PURE__ */ (0, V.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, V.jsx)(eme, {
+ children: /* @__PURE__ */ (0, V.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, V.jsx)(Zpe, {
label: e.label,
names: e.names
}, t)) })
@@ -39617,21 +39363,21 @@ function $pe({ kind: e, entity: t, actions: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-entity-alias": "meta",
children: [
- e === "creator" ? /* @__PURE__ */ (0, V.jsx)(xP, { entity: t }) : null,
+ e === "creator" ? /* @__PURE__ */ (0, V.jsx)(vP, { entity: t }) : null,
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-meta-item": "",
title: "视频",
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "film" }), /* @__PURE__ */ (0, V.jsxs)("span", { children: [o, c] })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "film" }), /* @__PURE__ */ (0, V.jsxs)("span", { children: [o, c] })]
}),
a ? /* @__PURE__ */ (0, V.jsxs)("span", {
"data-meta-item": "",
title: "事务所",
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "briefcase" }), /* @__PURE__ */ (0, V.jsx)("span", { children: a })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "briefcase" }), /* @__PURE__ */ (0, V.jsx)("span", { children: a })]
}) : null,
l ? /* @__PURE__ */ (0, V.jsxs)("span", {
"data-meta-item": "",
title: "片商",
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "clapperboard" }), /* @__PURE__ */ (0, V.jsx)("a", {
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "clapperboard" }), /* @__PURE__ */ (0, V.jsx)("a", {
href: ue("studio", l.name),
"data-studio-link": l.name,
onClick: i("studio", l.name),
@@ -39641,7 +39387,7 @@ function $pe({ kind: e, entity: t, actions: n }) {
s.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
"data-meta-item": "names",
"data-company-names": e === "studio" || e === "agency" ? "" : void 0,
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "id-card" }), /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "id-card" }), /* @__PURE__ */ (0, V.jsx)("span", {
"data-alias-names": "",
title: "别名",
children: s.map((e, t) => /* @__PURE__ */ (0, V.jsx)("span", { children: e }, t))
@@ -39650,32 +39396,32 @@ function $pe({ kind: e, entity: t, actions: n }) {
]
});
}
-function xP({ entity: e }) {
+function vP({ entity: e }) {
return e.identity_labels?.length ? /* @__PURE__ */ (0, V.jsxs)("span", {
"data-meta-item": "classification",
"data-identity-classification": "",
- children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: "user-round" }), /* @__PURE__ */ (0, V.jsx)("span", { children: e.identity_labels.join(" · ") })]
+ children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: "user-round" }), /* @__PURE__ */ (0, V.jsx)("span", { children: e.identity_labels.join(" · ") })]
}) : null;
}
-function eme({ label: e, names: t }) {
+function Zpe({ label: e, names: t }) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [e ? /* @__PURE__ */ (0, V.jsx)("dt", { children: e }) : null, /* @__PURE__ */ (0, V.jsx)("dd", {
"data-wide": e ? void 0 : "",
children: t.map((e, t) => /* @__PURE__ */ (0, V.jsxs)("span", { children: [e.name, e.reading ? /* @__PURE__ */ (0, V.jsx)("small", { children: e.reading }) : null] }, t))
})] });
}
-function tme({ glyph: e, label: t, clip: n, children: r }) {
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("dt", { children: [/* @__PURE__ */ (0, V.jsx)(dP, { name: e }), t] }), /* @__PURE__ */ (0, V.jsx)("dd", {
+function Qpe({ glyph: e, label: t, clip: n, children: r }) {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("dt", { children: [/* @__PURE__ */ (0, V.jsx)(cP, { name: e }), t] }), /* @__PURE__ */ (0, V.jsx)("dd", {
"data-fact": e === "tags" ? "tags" : n ? "clip" : e === "calendar-range" ? "num" : void 0,
title: n,
children: r
})] });
}
-function nme({ tags: e }) {
- let { shown: t, rest: n } = Jpe(e);
+function $pe({ tags: e }) {
+ let { shown: t, rest: n } = Gpe(e);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [t.map((e) => /* @__PURE__ */ (0, V.jsx)("span", {
"data-fact-tag": "",
children: e
- }, e)), n ? /* @__PURE__ */ (0, V.jsx)(hP, {
+ }, e)), n ? /* @__PURE__ */ (0, V.jsx)(fP, {
id: "entityTagPop",
hook: "fact",
rest: n,
@@ -39690,10 +39436,10 @@ function nme({ tags: e }) {
})
}) : null] });
}
-function SP({ mark: e }) {
+function yP({ mark: e }) {
if ("brand" in e) return /* @__PURE__ */ (0, V.jsx)("span", {
"data-link-icon": "brand",
- children: /* @__PURE__ */ (0, V.jsx)(dP, { name: e.brand })
+ children: /* @__PURE__ */ (0, V.jsx)(cP, { name: e.brand })
});
let t = R("globe") + ("site" in e ? `<img src="${L(e.site)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="self">` : "");
return /* @__PURE__ */ (0, V.jsx)("span", {
@@ -39701,7 +39447,7 @@ function SP({ mark: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-function rme({ link: e }) {
+function eme({ link: e }) {
switch (e.type) {
case "icon": return /* @__PURE__ */ (0, V.jsx)("a", {
"data-link": "icon",
@@ -39710,19 +39456,19 @@ function rme({ link: e }) {
rel: "noreferrer",
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, V.jsx)(SP, { mark: e.mark })
+ children: /* @__PURE__ */ (0, V.jsx)(yP, { mark: e.mark })
});
case "gone": return /* @__PURE__ */ (0, V.jsx)("span", {
"data-link": "gone",
tabIndex: 0,
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, V.jsx)(SP, { mark: { globe: !0 } })
+ children: /* @__PURE__ */ (0, V.jsx)(yP, { mark: { globe: !0 } })
});
case "private": return /* @__PURE__ */ (0, V.jsxs)("span", {
"data-link": "private",
title: e.label,
- children: [/* @__PURE__ */ (0, V.jsx)(SP, { mark: { globe: !0 } }), /* @__PURE__ */ (0, V.jsxs)("span", {
+ children: [/* @__PURE__ */ (0, V.jsx)(yP, { mark: { globe: !0 } }), /* @__PURE__ */ (0, V.jsxs)("span", {
"data-link-label": "",
children: ["来源 · ", e.label]
})]
@@ -39733,14 +39479,14 @@ function rme({ link: e }) {
target: "_blank",
rel: "noreferrer",
title: e.title,
- children: [/* @__PURE__ */ (0, V.jsx)(SP, { mark: e.mark }), /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [/* @__PURE__ */ (0, V.jsx)(yP, { mark: e.mark }), /* @__PURE__ */ (0, V.jsx)("span", {
"data-link-label": "",
children: e.text
})]
});
}
}
-function ime({ entity: e, actions: t, helpers: n }) {
+function tme({ entity: e, actions: t, helpers: n }) {
let [r, i] = (0, B.useState)(!!e.feed?.following), [a, o] = (0, B.useState)(!1), s = (0, B.useRef)(!1), c = async (e) => {
if (s.current) return !1;
s.current = !0, o(!0);
@@ -39758,34 +39504,34 @@ function ime({ entity: e, actions: t, helpers: n }) {
};
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-entry-marks": "",
- children: [bP(e).map((e, t) => /* @__PURE__ */ (0, V.jsxs)("a", {
+ children: [_P(e).map((e, t) => /* @__PURE__ */ (0, V.jsxs)("a", {
"data-entry-mark": "",
href: e.url,
target: "_blank",
rel: "noreferrer",
title: e.label,
"aria-label": e.label,
- children: [e.mark ? /* @__PURE__ */ (0, V.jsx)(dP, { name: e.mark }) : /* @__PURE__ */ (0, V.jsxs)("span", {
+ children: [e.mark ? /* @__PURE__ */ (0, V.jsx)(cP, { name: e.mark }) : /* @__PURE__ */ (0, V.jsxs)("span", {
"data-missav-mark": "",
children: [/* @__PURE__ */ (0, V.jsx)("span", { children: "MISS" }), /* @__PURE__ */ (0, V.jsx)("span", { children: "AV" })]
}), e.ordinal ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-entry-ordinal": "",
children: e.ordinal
}) : null]
- }, t)), e.feed ? /* @__PURE__ */ (0, V.jsx)(Bpe, {
+ }, t)), e.feed ? /* @__PURE__ */ (0, V.jsx)(Lpe, {
following: r,
busy: a,
onToggle: (e) => {
l(e);
},
- tip: Upe(r)
+ tip: Bpe(r)
}) : null]
});
}
//#endregion
//#region src/react/entity-page/entity-page-view.tsx
-function ame(e) {
- let { kind: t, name: n } = e, r = TS(pN(t, n)), i = !!r.data?.error, a = r.data?.redirect, { actions: o } = e;
+function nme(e) {
+ let { kind: t, name: n } = e, r = TS(dN(t, n)), i = !!r.data?.error, a = r.data?.redirect, { actions: o } = e;
return (0, B.useLayoutEffect)(() => {
i && o.missing();
}, [o, i]), (0, B.useLayoutEffect)(() => {
@@ -39800,17 +39546,17 @@ function ame(e) {
o,
a?.kind,
a?.name
- ]), r.isError ? /* @__PURE__ */ (0, V.jsx)(kA, {
+ ]), r.isError ? /* @__PURE__ */ (0, V.jsx)(gA, {
message: W(r.error),
onRetry: () => {
r.refetch();
}
- }) : !r.data || i || a ? null : /* @__PURE__ */ (0, V.jsx)(cme, {
+ }) : !r.data || i || a ? null : /* @__PURE__ */ (0, V.jsx)(ame, {
...e,
entity: r.data
});
}
-function CP(e) {
+function bP(e) {
let [t, n] = (0, B.useState)({
key: e,
n: 1
@@ -39822,14 +39568,14 @@ function CP(e) {
};
return n(r), r.n;
}
-var ome = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991);
-function sme(e, t) {
+var rme = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991);
+function ime(e, t) {
return `照片 · ${[e.total || !t ? `${(e.total || 0).toLocaleString()} 张` : "", t ? `样张 ${(e.sample_total || 0).toLocaleString()} 张 · ${t} 部作品` : ""].filter(Boolean).join(" · ")}`;
}
-function cme(e) {
- let { kind: t, name: n, entity: r, filters: i, media: a, helpers: o, actions: s, hosts: c } = e, l = t === "agency" || t === "studio", u = t === "agency" ? r.related_performers || [] : t === "studio" && r.labels || [], d = Number(r.id) || 0, f = kS(mN(t, n, 0, "")).data?.pages[0], p = f && !f.error ? f : null, m = p ? (p.total || 0) + (p.sample_total || 0) : 0, h = (p?.total || 0) > 0 || hN(p).length > 0, g = a.media === "photos" && h ? a : oN, [_, v] = (0, B.useState)("people"), y = new URLSearchParams(Object.entries(i).filter(([, e]) => e)).toString(), [b, x] = (0, B.useState)(y);
+function ame(e) {
+ let { kind: t, name: n, entity: r, filters: i, media: a, helpers: o, actions: s, hosts: c } = e, l = t === "agency" || t === "studio", u = t === "agency" ? r.related_performers || [] : t === "studio" && r.labels || [], d = Number(r.id) || 0, f = kS(fN(t, n, 0, "")).data?.pages[0], p = f && !f.error ? f : null, m = p ? (p.total || 0) + (p.sample_total || 0) : 0, h = (p?.total || 0) > 0 || pN(p).length > 0, g = a.media === "photos" && h ? a : iN, [_, v] = (0, B.useState)("people"), y = new URLSearchParams(Object.entries(i).filter(([, e]) => e)).toString(), [b, x] = (0, B.useState)(y);
b !== y && (x(y), v("videos"));
- let S = l && _ === "people" && u.length ? "people" : g.media, [C, w] = (0, B.useState)(0), T = fN(e), E = TS(T), D = CP(JSON.stringify([T.queryKey, C])), [O] = (0, B.useState)(() => (t === "performer" || t === "studio") && (e.jav || (E.data?.items || []).some((e) => e.is_jav)));
+ let S = l && _ === "people" && u.length ? "people" : g.media, [C, w] = (0, B.useState)(0), T = uN(e), E = TS(T), D = bP(JSON.stringify([T.queryKey, C])), [O] = (0, B.useState)(() => (t === "performer" || t === "studio") && (e.jav || (E.data?.items || []).some((e) => e.is_jav)));
(0, B.useLayoutEffect)(() => {
s.javContext(O);
}, [s, O]);
@@ -39839,26 +39585,26 @@ function cme(e) {
}, [e.layout, O]), A = {
jav: e.jav,
seed: e.seed
- }, j = (0, B.useCallback)((e, r) => dN(t, n, i, A, e, r), [D]), [M, N] = (0, B.useState)({}), P = g.set, ee = M[P] || "", F = kS({
- ...mN(t, n, P, ee),
+ }, j = (0, B.useCallback)((e, r) => lN(t, n, i, A, e, r), [D]), [M, N] = (0, B.useState)({}), P = g.set, ee = M[P] || "", F = kS({
+ ...fN(t, n, P, ee),
enabled: S === "photos"
- }), I = F.data?.pages[0], te = CP(JSON.stringify(cN(t, n, P, ee))), ne = (0, B.useMemo)(() => {
+ }), I = F.data?.pages[0], te = bP(JSON.stringify(oN(t, n, P, ee))), ne = (0, B.useMemo)(() => {
let e = F.data?.pages;
if (!e?.[0] || e[0].error) return null;
let t = e[0];
return {
revision: te,
- codeSets: t.id ? [] : hN(t),
+ codeSets: t.id ? [] : pN(t),
items: e.flatMap((e) => e.items || []),
total: t.total || 0,
hasMore: !!e[e.length - 1]?.has_more
};
}, [F.data, te]), re = F.refetch, ie = F.fetchNextPage, ae = TS({
- ...iN(d, o.feedRowHtml),
+ ...nN(d, o.feedRowHtml),
enabled: !!d
}), oe = (0, B.useRef)(e.feedRevision);
(0, B.useEffect)(() => {
- oe.current !== e.feedRevision && (oe.current = e.feedRevision, z.invalidateQueries({ queryKey: rN(d) }));
+ oe.current !== e.feedRevision && (oe.current = e.feedRevision, z.invalidateQueries({ queryKey: tN(d) }));
}, [d, e.feedRevision]);
let se = !!E.data;
(0, B.useEffect)(() => {
@@ -39875,7 +39621,7 @@ function cme(e) {
le.current = !1;
}, []);
let ue = (0, B.useCallback)(async () => {
- await z.invalidateQueries({ queryKey: sN(t, n) }), await z.invalidateQueries({ queryKey: [
+ await z.invalidateQueries({ queryKey: aN(t, n) }), await z.invalidateQueries({ queryKey: [
"entity-items",
t,
n
@@ -39906,7 +39652,7 @@ function cme(e) {
enabled: e
})
}),
- onSuccess: (e, r) => z.setQueryData(sN(t, n), (e) => e && {
+ onSuccess: (e, r) => z.setQueryData(aN(t, n), (e) => e && {
...e,
feed: {
...e.feed,
@@ -39954,10 +39700,10 @@ function cme(e) {
let e = await ce("/api/feeds/check").catch(() => null);
if (!e || e.status !== "running") break;
}
- le.current && await z.invalidateQueries({ queryKey: rN(d) });
+ le.current && await z.invalidateQueries({ queryKey: tN(d) });
})();
},
- feedAction: aN,
+ feedAction: rN,
avatarPicked: () => {
s.avatarChanged(), ue().then(() => {
le.current && w((e) => e + 1);
@@ -39988,19 +39734,19 @@ function cme(e) {
e === S && !g.set || (v(e === "people" ? "people" : "videos"), s.route(i, e === "photos" ? {
media: "photos",
set: 0
- } : oN));
+ } : iN));
},
setState: (e) => s.route({
...i,
state: e
- }, oN),
+ }, iN),
toggleTag: s.toggleTag,
clearFilter: s.clearFilter,
clearAll: s.clearAll,
setSort: s.setSort,
reshuffle: async () => {
if (S !== "photos") {
- let r = s.reshuffleVideos(), a = fN({
+ let r = s.reshuffleVideos(), a = uN({
kind: t,
name: n,
filters: {
@@ -40014,7 +39760,7 @@ function cme(e) {
await z.fetchQuery(a).catch(() => null);
return;
}
- let r = ome(), a = await z.fetchInfiniteQuery(mN(t, n, P, r)).catch(() => null);
+ let r = rme(), a = await z.fetchInfiniteQuery(fN(t, n, P, r)).catch(() => null);
!le.current || !a?.pages[0] || a.pages[0].error || N((e) => ({
...e,
[P]: r
@@ -40047,7 +39793,7 @@ function cme(e) {
k: e.k,
label: ot(e.k),
n: e.n,
- selected: Dfe(i.tag, e.k)
+ selected: Cfe(i.tag, e.k)
})), _e = m || u.length ? {
label: u.length ? "页面视图" : "媒体类型",
people: u.length ? {
@@ -40073,9 +39819,9 @@ function cme(e) {
if (S === "people") xe = `${t === "studio" ? "厂牌" : "艺人"} · ${u.length.toLocaleString()}`;
else if (S === "videos") {
Se = !E.data;
- let e = lN(i.tag).map((e) => ot(e));
+ let e = sN(i.tag).map((e) => ot(e));
xe = `视频 · ${(E.data?.work_total ?? E.data?.total ?? 0).toLocaleString()}${e.length ? ` · ${e.join(" · ")}` : ""}`;
- } else I && !I.error ? xe = ye ? `${I.title} · ${(I.total || 0).toLocaleString()} 张` : sme(I, hN(I).length) : Se = F.isPending;
+ } else I && !I.error ? xe = ye ? `${I.title} · ${(I.total || 0).toLocaleString()} 张` : ime(I, pN(I).length) : Se = F.isPending;
let Ce = (0, B.useMemo)(() => ({
...e.card.actions,
loadMorePhotos: async () => {
@@ -40092,7 +39838,7 @@ function cme(e) {
u
]);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- /* @__PURE__ */ (0, V.jsx)(Zpe, {
+ /* @__PURE__ */ (0, V.jsx)(Jpe, {
kind: t,
name: n,
entity: r,
@@ -40102,7 +39848,7 @@ function cme(e) {
actions: pe,
helpers: me
}, C),
- (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(ile, {
+ (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(Gce, {
kind: t,
name: n,
view: S,
@@ -40118,12 +39864,12 @@ function cme(e) {
actions: R,
helpers: he
}), c.filter),
- (0, $f.createPortal)(S === "videos" && E.isError ? /* @__PURE__ */ (0, V.jsx)(kA, {
+ (0, $f.createPortal)(S === "videos" && E.isError ? /* @__PURE__ */ (0, V.jsx)(gA, {
message: W(E.error),
onRetry: () => {
E.refetch();
}
- }) : /* @__PURE__ */ (0, V.jsx)(ape, {
+ }) : /* @__PURE__ */ (0, V.jsx)(tpe, {
kind: t,
name: n,
view: S,
@@ -40149,7 +39895,7 @@ function cme(e) {
}
//#endregion
//#region src/react/components/collection-summary.tsx
-function wP({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
+function xP({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-collection-summary": "",
className: `${i ? "" : "mb-5 "}flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5
@@ -40176,29 +39922,29 @@ function wP({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !
}
//#endregion
//#region src/react/duplicates/duplicates-page.tsx
-var lme = vA("play"), ume = vA("file-stack"), dme = wE({
+var ome = oA("play"), sme = oA("file-stack"), cme = wE({
padding: "none",
radius: "surface",
className: "mb-6 overflow-hidden dark:bg-background-primary-default"
-}), TP = "rounded-sm px-1.5 py-px text-caption-1-regular leading-5", EP = "rounded-sm px-2 py-0.5 text-caption-1-regular leading-5", DP = "font-mono text-caption-1-regular leading-5 text-text-secondary", OP = () => {
+}), SP = "rounded-sm px-1.5 py-px text-caption-1-regular leading-5", CP = "rounded-sm px-2 py-0.5 text-caption-1-regular leading-5", wP = "font-mono text-caption-1-regular leading-5 text-text-secondary", TP = () => {
z.invalidateQueries({
- queryKey: UA,
+ queryKey: AA,
exact: !0
}), z.invalidateQueries({
- queryKey: fM,
+ queryKey: $j,
exact: !0
});
};
-function fme(e) {
+function lme(e) {
return e.identical ? /* @__PURE__ */ (0, V.jsx)("span", {
- className: `${EP} text-(--keep)`,
+ className: `${CP} text-(--keep)`,
children: "sha1 一致"
}) : /* @__PURE__ */ (0, V.jsx)("span", {
- className: `${EP} text-text-secondary`,
+ className: `${CP} text-text-secondary`,
children: e.evidence === "same_code_short_copy" ? "同番号短版本" : "时长推断"
});
}
-function pme({ file: e, openItem: t }) {
+function ume({ file: e, openItem: t }) {
let n = () => t(e.id);
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "duplicate-row items-center gap-3 border-t border-separator-border px-5 py-4 max-compact:p-4",
@@ -40208,7 +39954,7 @@ function pme({ file: e, openItem: t }) {
onClick: n,
"aria-label": `预览 ${e.name}`,
className: "relative row-span-2 inline-grid aspect-16/10 w-full cursor-pointer place-items-center overflow-hidden rounded-2lg bg-background-tertiary-default text-text-secondary",
- children: [/* @__PURE__ */ (0, V.jsx)(lme, {
+ children: [/* @__PURE__ */ (0, V.jsx)(ome, {
"aria-hidden": !0,
className: "size-6"
}), /* @__PURE__ */ (0, V.jsx)("img", {
@@ -40232,55 +39978,55 @@ function pme({ file: e, openItem: t }) {
}), e.is_largest || e.is_longest ? /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex flex-none gap-1",
children: [e.is_largest ? /* @__PURE__ */ (0, V.jsx)("i", {
- className: `${TP} not-italic bg-background-primary-hover text-text-secondary`,
+ className: `${SP} not-italic bg-background-primary-hover text-text-secondary`,
children: "最大"
}) : null, e.is_longest ? /* @__PURE__ */ (0, V.jsx)("i", {
- className: `${TP} not-italic bg-(--keep)/22 text-(--keep)`,
+ className: `${SP} not-italic bg-(--keep)/22 text-(--keep)`,
children: "最长"
}) : null]
}) : null]
}),
/* @__PURE__ */ (0, V.jsxs)("span", {
- className: `${DP} flex min-w-0 items-center gap-1.5`,
- children: [/* @__PURE__ */ (0, V.jsx)(Vk, { mark: Se[e.location] || "database" }), /* @__PURE__ */ (0, V.jsx)("span", {
+ className: `${wP} flex min-w-0 items-center gap-1.5`,
+ children: [/* @__PURE__ */ (0, V.jsx)(KE, { mark: Se[e.location] || "database" }), /* @__PURE__ */ (0, V.jsx)("span", {
className: "whitespace-nowrap",
children: se[e.location] || e.location || e.drive
})]
}),
/* @__PURE__ */ (0, V.jsx)("span", {
- className: DP,
+ className: wP,
children: pe(e.size || 0)
}),
/* @__PURE__ */ (0, V.jsx)("span", {
- className: DP,
+ className: wP,
children: fe(e.duration)
}),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-middle-truncate": !0,
title: e.path ?? "",
- className: `${DP} col-start-2 -col-end-1 min-w-0 truncate pt-0.5 max-duplicate-narrow:col-span-full`,
+ className: `${wP} col-start-2 -col-end-1 min-w-0 truncate pt-0.5 max-duplicate-narrow:col-span-full`,
children: e.path ?? ""
})
]
});
}
-function mme({ openItem: e, toast: t, failure: n }) {
+function dme({ openItem: e, toast: t, failure: n }) {
let r = TS({
- queryKey: UA,
- queryFn: ({ signal: e }) => GA(e)
+ queryKey: AA,
+ queryFn: ({ signal: e }) => MA(e)
}), i = TS({
queryKey: tt,
queryFn: ({ signal: e }) => rt(e)
}), [a, o] = (0, B.useState)(""), s = OS({
- mutationFn: (e) => JA(e, "dispose"),
+ mutationFn: (e) => FA(e, "dispose"),
onSuccess: (e, r) => {
- OP(), t(`已把 ${r.length} 项移入回收站`, { undo: async () => {
+ TP(), t(`已把 ${r.length} 项移入回收站`, { undo: async () => {
try {
- await JA(r, "restore");
+ await FA(r, "restore");
} catch (e) {
n("撤销移入回收站", e);
} finally {
- OP();
+ TP();
}
} });
},
@@ -40294,12 +40040,12 @@ function mme({ openItem: e, toast: t, failure: n }) {
children: r.error ? W(r.error) : "未取得重复文件列表,请刷新页面重试。"
})
});
- let l = c.groups ?? [], u = Rle(i.data), d = ({ groups: e, keep: t, key: n }) => {
+ let l = c.groups ?? [], u = Ele(i.data), d = ({ groups: e, keep: t, key: n }) => {
if (s.isPending) return;
- let r = Ule(e, t);
+ let r = jle(e, t);
r.length && Te({
title: "移入回收站",
- body: `将把 ${r.length} 个重复文件的馆藏记录移入回收站,每组保留${KA[t] ?? KA.largest}。文件共 ${pe(Wle(e, r))},记录可从回收站还原。`,
+ body: `将把 ${r.length} 个重复文件的馆藏记录移入回收站,每组保留${NA[t] ?? NA.largest}。文件共 ${pe(Mle(e, r))},记录可从回收站还原。`,
confirmLabel: "移入回收站",
onConfirm: () => (o(n), s.mutateAsync(r))
});
@@ -40307,15 +40053,15 @@ function mme({ openItem: e, toast: t, failure: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "mx-auto w-full max-w-board pb-10.5",
children: [
- /* @__PURE__ */ (0, V.jsx)(wP, {
+ /* @__PURE__ */ (0, V.jsx)(xP, {
label: "重复内容",
figure: `${Number(c.total || 0).toLocaleString()} 组`,
detail: `${c.files} 个文件 · 可回收 ${pe(c.reclaimable)}`
}),
- l.length ? /* @__PURE__ */ (0, V.jsxs)(Xce, {
+ l.length ? /* @__PURE__ */ (0, V.jsxs)(qoe, {
title: "批量保留",
children: [
- /* @__PURE__ */ (0, V.jsx)(cA, {
+ /* @__PURE__ */ (0, V.jsx)(mD, {
busy: a === "all:largest",
onPress: () => d({
groups: l,
@@ -40324,7 +40070,7 @@ function mme({ openItem: e, toast: t, failure: n }) {
}),
children: "全部保留最大"
}),
- /* @__PURE__ */ (0, V.jsx)(cA, {
+ /* @__PURE__ */ (0, V.jsx)(mD, {
busy: a === "all:longest",
onPress: () => d({
groups: l,
@@ -40333,7 +40079,7 @@ function mme({ openItem: e, toast: t, failure: n }) {
}),
children: "全部保留最长"
}),
- Hle(l, u).map((e) => /* @__PURE__ */ (0, V.jsx)(cA, {
+ Ale(l, u).map((e) => /* @__PURE__ */ (0, V.jsx)(mD, {
busy: a === `all:${e}`,
onPress: () => d({
groups: l,
@@ -40356,7 +40102,7 @@ function mme({ openItem: e, toast: t, failure: n }) {
let r = [t], i = (e) => `${n}:${e}`;
return /* @__PURE__ */ (0, V.jsxs)("section", {
"aria-label": t.code,
- className: dme,
+ className: cme,
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-3 bg-background-tertiary-default p-5 max-compact:p-4 dark:bg-background-secondary-default",
children: [
@@ -40368,9 +40114,9 @@ function mme({ openItem: e, toast: t, failure: n }) {
className: "font-mono text-caption-1-regular leading-5 text-text-primary",
children: `${t.count} 个 · 可回收 ${pe(t.reclaimable)}`
}),
- fme(t),
+ lme(t),
t.cross_drive ? /* @__PURE__ */ (0, V.jsx)("span", {
- className: `${EP} text-text-secondary`,
+ className: `${CP} text-text-secondary`,
children: `跨盘 ${t.drives.join(" ")}`
}) : null,
/* @__PURE__ */ (0, V.jsxs)("span", {
@@ -40398,7 +40144,7 @@ function mme({ openItem: e, toast: t, failure: n }) {
}),
children: "留最长"
}),
- qA(t.files, u).map((e) => /* @__PURE__ */ (0, V.jsx)(J, {
+ PA(t.files, u).map((e) => /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
...f(i(e)),
@@ -40423,13 +40169,13 @@ function mme({ openItem: e, toast: t, failure: n }) {
]
})
]
- }), /* @__PURE__ */ (0, V.jsx)("div", { children: t.files.map((t) => /* @__PURE__ */ (0, V.jsx)(pme, {
+ }), /* @__PURE__ */ (0, V.jsx)("div", { children: t.files.map((t) => /* @__PURE__ */ (0, V.jsx)(ume, {
file: t,
openItem: e
}, t.id)) })]
}, `${t.code}-${n}`);
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: ume,
+ icon: sme,
title: "没有找到重复文件",
children: "所有来源之间没有检测到内容相同的文件。扫描新来源后,这里会自动更新。"
})
@@ -40438,23 +40184,23 @@ function mme({ openItem: e, toast: t, failure: n }) {
}
//#endregion
//#region src/react/diagnostics/diagnostics.ts
-var kP = ["diagnostics"], AP = (e) => G("/api/diagnostics", e);
-async function hme(e) {
+var EP = ["diagnostics"], DP = (e) => G("/api/diagnostics", e);
+async function fme(e) {
await z.fetchQuery({
- queryKey: kP,
- queryFn: () => AP(e),
+ queryKey: EP,
+ queryFn: () => DP(e),
staleTime: 1e4
});
}
//#endregion
//#region src/react/diagnostics/diagnostics-page.tsx
-var jP = {
+var OP = {
ok: "正常",
warning: "需检查",
failed: "需处理",
unknown: "未取得",
disabled: "未配置"
-}, gme = [
+}, pme = [
["媒体库与挂载", ["media_mounts", "data_root"]],
["数据库与迁移", ["database", "schema"]],
["工具", ["ffmpeg"]],
@@ -40465,8 +40211,8 @@ var jP = {
"version"
]],
["后台任务", ["tasks"]]
-], MP = (e) => new Date(e).toLocaleString();
-function _me({ name: e, check: t, navigate: n, configure: r }) {
+], kP = (e) => new Date(e).toLocaleString();
+function mme({ name: e, check: t, navigate: n, configure: r }) {
let i = e === "security" ? "网络与访问" : e === "configured" ? "通用" : "媒体";
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2 border-b border-separator-border py-4 pr-3 last:border-b-0",
@@ -40478,7 +40224,7 @@ function _me({ name: e, check: t, navigate: n, configure: r }) {
children: t.label
}), /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
- children: jP[t.status] ?? "未取得"
+ children: OP[t.status] ?? "未取得"
})]
}),
/* @__PURE__ */ (0, V.jsx)("p", {
@@ -40498,14 +40244,14 @@ function _me({ name: e, check: t, navigate: n, configure: r }) {
]
});
}
-function vme({ group: e, openItem: t, receipt: n }) {
- let r = AE(), i = OM(), a = e.items.map((e) => e.code || `作品 #${e.id}`).join("\n");
- return /* @__PURE__ */ (0, V.jsx)(Bk, {
+function hme({ group: e, openItem: t, receipt: n }) {
+ let r = AE(), i = vM(), a = e.items.map((e) => e.code || `作品 #${e.id}`).join("\n");
+ return /* @__PURE__ */ (0, V.jsx)(GE, {
summary: `${e.label} · ${e.count === null ? "未取得" : `${e.count} 项`}`,
children: e.count === null ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
children: "清单未取得,请重新检查。"
- }) : e.items.length ? /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
+ }) : e.items.length ? /* @__PURE__ */ (0, V.jsxs)(LE, { children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center justify-between gap-2",
children: [e.truncated ? /* @__PURE__ */ (0, V.jsxs)("span", {
@@ -40541,17 +40287,17 @@ function vme({ group: e, openItem: t, receipt: n }) {
})
})
] }) : /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: oae,
+ icon: sae,
title: "清单为空",
shell: "plain",
children: "没有需要处理的作品。"
})
});
}
-function yme(e) {
+function gme(e) {
let t = TS({
- queryKey: kP,
- queryFn: ({ signal: e }) => AP(e),
+ queryKey: EP,
+ queryFn: ({ signal: e }) => DP(e),
staleTime: 1e4
}), n = AE(), [r, i] = (0, B.useState)(""), a = () => void n.run("refresh", async () => {
let e = await t.refetch();
@@ -40574,27 +40320,27 @@ function yme(e) {
tone: "error",
children: r
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Ak, {
+ /* @__PURE__ */ (0, V.jsx)(FE, {
title: "库健康",
- children: /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [o.library.issue_at ? /* @__PURE__ */ (0, V.jsxs)("p", {
+ children: /* @__PURE__ */ (0, V.jsxs)(LE, { children: [o.library.issue_at ? /* @__PURE__ */ (0, V.jsxs)("p", {
className: "text-body-2-regular text-text-secondary",
- children: ["处理记录 · ", MP(o.library.issue_at)]
- }) : null, Object.entries(o.library.groups).map(([t, n]) => /* @__PURE__ */ (0, V.jsx)(vme, {
+ children: ["处理记录 · ", kP(o.library.issue_at)]
+ }) : null, Object.entries(o.library.groups).map(([t, n]) => /* @__PURE__ */ (0, V.jsx)(hme, {
group: n,
...e
}, t))] })
}),
- gme.map(([t, n]) => /* @__PURE__ */ (0, V.jsx)(Ak, {
+ pme.map(([t, n]) => /* @__PURE__ */ (0, V.jsx)(FE, {
title: t,
- children: n.map((t) => o.checks[t] ? /* @__PURE__ */ (0, V.jsx)(_me, {
+ children: n.map((t) => o.checks[t] ? /* @__PURE__ */ (0, V.jsx)(mme, {
name: t,
check: o.checks[t],
...e
}, t) : null)
}, t)),
- /* @__PURE__ */ (0, V.jsx)(Ak, {
+ /* @__PURE__ */ (0, V.jsx)(FE, {
title: "来源会话",
- children: /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [o.sources.map((e) => /* @__PURE__ */ (0, V.jsxs)("div", {
+ children: /* @__PURE__ */ (0, V.jsxs)(LE, { children: [o.sources.map((e) => /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
/* @__PURE__ */ (0, V.jsxs)("h3", {
@@ -40602,19 +40348,19 @@ function yme(e) {
children: [
e.label,
" · ",
- jP[e.status]
+ OP[e.status]
]
}),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-regular text-text-primary",
children: e.reason
}),
- /* @__PURE__ */ (0, V.jsxs)(Rk, { children: [/* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsxs)(UE, { children: [/* @__PURE__ */ (0, V.jsx)(WE, {
term: "上次解析成功",
- children: e.last_success_at ? MP(e.last_success_at) : "未取得"
- }), /* @__PURE__ */ (0, V.jsx)(zk, {
+ children: e.last_success_at ? kP(e.last_success_at) : "未取得"
+ }), /* @__PURE__ */ (0, V.jsx)(WE, {
term: "冷却截止",
- children: e.cooldown_until ? MP(e.cooldown_until) : "未在冷却"
+ children: e.cooldown_until ? kP(e.cooldown_until) : "未在冷却"
})] })
]
}, e.source)), /* @__PURE__ */ (0, V.jsx)("div", { children: /* @__PURE__ */ (0, V.jsx)(J, {
@@ -40642,21 +40388,21 @@ function yme(e) {
}
//#endregion
//#region src/react/feed-new/feed-new-page.tsx
-function bme({ host: e, revision: t, helpers: n, actions: r }) {
- let i = TS(iN(null, n.feedRowHtml)), a = (0, B.useRef)(t);
+function _me({ host: e, revision: t, helpers: n, actions: r }) {
+ let i = TS(nN(null, n.feedRowHtml)), a = (0, B.useRef)(t);
return (0, B.useEffect)(() => {
- a.current !== t && (a.current = t, z.invalidateQueries({ queryKey: rN(null) }));
- }, [t]), (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(uP, {
+ a.current !== t && (a.current = t, z.invalidateQueries({ queryKey: tN(null) }));
+ }, [t]), (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(sP, {
feedNew: i.data ?? null,
host: e,
wire: n.wireFeedRow,
- act: aN,
+ act: rN,
settled: r.settled
}), e);
}
//#endregion
//#region src/follow-sort.ts
-var NP = [
+var AP = [
["checked", "检查时间"],
["added", "添加时间"],
["name", "创作者名称"],
@@ -40664,7 +40410,7 @@ var NP = [
["source", "来源名称"],
["provider", "站点"],
["status", "状态"]
-], xme = "checked", PP = {
+], vme = "checked", jP = {
checked: "desc",
added: "desc",
name: "asc",
@@ -40672,32 +40418,32 @@ var NP = [
source: "asc",
provider: "asc",
status: "asc"
-}, Sme = (e) => NP.some(([t]) => t === e);
-function FP(e, t) {
- let n = Sme(e) ? e : xme;
+}, yme = (e) => AP.some(([t]) => t === e);
+function MP(e, t) {
+ let n = yme(e) ? e : vme;
return {
sort: n,
- dir: t === "asc" || t === "desc" ? t : PP[n]
+ dir: t === "asc" || t === "desc" ? t : jP[n]
};
}
//#endregion
//#region src/react/follow-manage/follow-manage.ts
-var IP = "/api/follow", LP = "/api/follow/credentials", RP = "/api/follow/check", zP = "/api/follow/source", BP = "/api/follow/resolve", Cme = "/api/follow/suggest", VP = "/api/follow/author-alias", wme = "/api/follow/credential", HP = "/api/follow/status", Tme = "/api/feeds", UP = "/api/feeds/source", Eme = "/api/feeds/check", Dme = "/api/feeds/lookup", WP = ["follow-manage"], GP = ["follow-manage", "credentials"], Ome = ["follow-manage", "check"], kme = ["follow-manage", "resolve"], KP = ["follow-manage", "feeds"], Ame = (e) => [
+var NP = "/api/follow", PP = "/api/follow/credentials", FP = "/api/follow/check", IP = "/api/follow/source", LP = "/api/follow/resolve", bme = "/api/follow/suggest", RP = "/api/follow/author-alias", xme = "/api/follow/credential", zP = "/api/follow/status", Sme = "/api/feeds", BP = "/api/feeds/source", Cme = "/api/feeds/check", wme = "/api/feeds/lookup", VP = ["follow-manage"], HP = ["follow-manage", "credentials"], Tme = ["follow-manage", "check"], Eme = ["follow-manage", "resolve"], UP = ["follow-manage", "feeds"], Dme = (e) => [
"follow-manage",
"suggest",
e
-], qP = [["default", "默认视图"], ["table", "表格视图"]], JP = [
+], WP = [["default", "默认视图"], ["table", "表格视图"]], GP = [
10,
20,
50,
100
-], jme = Object.fromEntries(NP), YP = {
+], Ome = Object.fromEntries(AP), KP = {
author: "name",
source: "source",
provider: "provider",
status: "status",
checked: "checked"
-}, Mme = (e) => qP.some(([t]) => t === e), Nme = (e) => JP.includes(Number(e)) ? Number(e) : 20, Pme = {
+}, kme = (e) => WP.some(([t]) => t === e), Ame = (e) => GP.includes(Number(e)) ? Number(e) : 20, jme = {
checked: ["从近到远", "从远到近"],
added: ["从近到远", "从远到近"],
name: ["倒序", "正序"],
@@ -40705,25 +40451,25 @@ var IP = "/api/follow", LP = "/api/follow/credentials", RP = "/api/follow/check"
source: ["倒序", "正序"],
provider: ["倒序", "正序"],
status: ["倒序", "正序"]
-}, Fme = (e, t) => `按${jme[e]}${Pme[e][t === "asc" ? 0 : 1]}排序`;
-function XP(e) {
+}, Mme = (e, t) => `按${Ome[e]}${jme[e][t === "asc" ? 0 : 1]}排序`;
+function qP(e) {
let t = e.last_status;
return t === "error" || t === "unauthorized" ? 0 : e.enabled ? t === "ok" ? 3 : 2 : 1;
}
-function Ime(e) {
+function Nme(e) {
return e.history_exhausted ? "没有更多" : e.enabled ? e.last_status === "ok" ? "正常" : e.last_status === "error" || e.last_status === "unauthorized" ? "检查失败" : "未检查" : "已暂停";
}
-var ZP = (e) => e.last_status === "error" || e.last_status === "unauthorized", QP = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), $P = {
- source: QP,
- provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || QP(e, t),
- status: (e, t) => XP(e) - XP(t) || QP(e, t)
-}, eF = (e) => Date.parse(e || "") || 0, tF = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
-function nF(e, t = []) {
+var JP = (e) => e.last_status === "error" || e.last_status === "unauthorized", YP = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), XP = {
+ source: YP,
+ provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || YP(e, t),
+ status: (e, t) => qP(e) - qP(t) || YP(e, t)
+}, ZP = (e) => Date.parse(e || "") || 0, QP = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
+function $P(e, t = []) {
if (!e.length) return "";
- let n = (e) => String(e.author_name || "").trim() || tF(e.label), r = e.find((e) => e.entity_name);
+ let n = (e) => String(e.author_name || "").trim() || QP(e.label), r = e.find((e) => e.entity_name);
if (r) return r.entity_name;
let i = t.find((t) => `name:${t.canonical_key}` === e[0]?.author_key);
- if (i) return tF(i.canonical_name);
+ if (i) return QP(i.canonical_name);
let a = e.find((e) => e.official_avatar_url);
if (a && n(a)) return n(a);
let o = e.map(n).filter(Boolean);
@@ -40731,18 +40477,18 @@ function nF(e, t = []) {
let s = (e) => (e.match(/[A-Z]/g) || []).length;
return o.reduce((e, t) => s(t) > s(e) ? t : e, o[0]);
}
-function rF(e) {
+function eF(e) {
let t = e.trim().match(/[A-Za-z0-9]/);
return (t ? t[0] : Array.from(e.trim())[0] || "?").toUpperCase();
}
-function iF(e) {
+function tF(e) {
let t = e.find((e) => e.official_avatar_url), n = e.find((e) => e.avatar_url), r = t?.official_avatar_url || n?.avatar_url || "";
return {
src: r,
fallback: t && n && n.avatar_url !== r && n.avatar_url || ""
};
}
-function aF(e) {
+function nF(e) {
let t = [], n = /* @__PURE__ */ new Map();
for (let r of e) {
let e = r.author_key || `source:${r.id}`;
@@ -40750,32 +40496,32 @@ function aF(e) {
}
return t.map((e) => n.get(e));
}
-function Lme(e, t, n, r = []) {
- let i = aF(e), a = n === PP[t] ? 1 : -1, o = (e) => nF(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = $P[t];
+function Pme(e, t, n, r = []) {
+ let i = nF(e), a = n === jP[t] ? 1 : -1, o = (e) => $P(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = XP[t];
if (c) {
for (let e of i) e.sort((e, t) => a * c(e, t));
return i.sort((e, t) => a * c(e[0], t[0]) || s(e, t));
}
- let l = (e) => Math.max(...e.map((e) => eF(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => eF(e.created_at)));
+ let l = (e) => Math.max(...e.map((e) => ZP(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => ZP(e.created_at)));
return i.sort((e, n) => t === "name" ? a * s(e, n) : t === "sources" ? a * (n.length - e.length) || s(e, n) : t === "added" ? a * (u(n) - u(e)) || s(e, n) : a * (l(n) - l(e)) || s(e, n));
}
-function Rme(e, t, n, r = []) {
+function Fme(e, t, n, r = []) {
let i = e.flatMap((e) => {
- let t = nF(e, r);
+ let t = $P(e, r);
return e.map((n) => ({
source: n,
group: e,
author: t
}));
- }), a = $P[t];
+ }), a = XP[t];
if (a) {
- let e = n === PP[t] ? 1 : -1;
+ let e = n === jP[t] ? 1 : -1;
i.sort((t, n) => e * a(t.source, n.source));
}
return i;
}
-function oF(e, t, n) {
- let r = fj(e, t), i = pj(n, r), a = (i - 1) * t;
+function rF(e, t, n) {
+ let r = $A(e, t), i = ej(n, r), a = (i - 1) * t;
return {
page: i,
pages: r,
@@ -40784,91 +40530,91 @@ function oF(e, t, n) {
end: Math.min(a + t, e)
};
}
-function zme(e, t) {
+function Ime(e, t) {
let n = new Set(t.map((e) => e.id));
return new Set([...e].filter((e) => n.has(e)));
}
-function sF(e, t) {
+function iF(e, t) {
let n = t.filter((t) => e.has(t)).length;
return {
all: t.length > 0 && n === t.length,
some: n > 0 && n < t.length
};
}
-function cF(e, t, n) {
+function aF(e, t, n) {
let r = new Set(e);
for (let e of t) n ? r.add(e) : r.delete(e);
return r;
}
-var lF = (e) => G(`${IP}?summary=1`, e), uF = (e) => G(LP, e), Bme = (e) => G(RP, e), Vme = (e) => G(BP, e), Hme = (e, t) => G(`${Cme}?q=${encodeURIComponent(e)}`, t), dF = (e) => K(RP, {
+var oF = (e) => G(`${NP}?summary=1`, e), sF = (e) => G(PP, e), Lme = (e) => G(FP, e), Rme = (e) => G(LP, e), zme = (e, t) => G(`${bme}?q=${encodeURIComponent(e)}`, t), cF = (e) => K(FP, {
...e?.length ? { sources: e } : {},
background: !0
-}), Ume = (e) => K(BP, {
+}), Bme = (e) => K(LP, {
lines: e,
background: !0
-}), fF = (e, t) => K(zP, {
+}), lF = (e, t) => K(IP, {
action: "enabled",
id: e,
enabled: t
-}), pF = (e) => K(zP, {
+}), uF = (e) => K(IP, {
action: "remove",
id: e
-}), Wme = (e) => K(zP, {
+}), Vme = (e) => K(IP, {
action: "add",
url: e.url,
label: e.label,
author: e.author || "",
aliases: e.aliases || [],
defer_check: !0
-}), mF = (e, t) => K(VP, {
+}), dF = (e, t) => K(RP, {
action: "add",
canonical: e,
alias: t
-}), Gme = (e) => K(VP, {
+}), Hme = (e) => K(RP, {
action: "remove",
alias: e
-}), Kme = (e, t) => K(wme, {
+}), Ume = (e, t) => K(xme, {
provider: e,
values: t
-}), qme = (e, t) => K(HP, {
+}), Wme = (e, t) => K(zP, {
item: e,
to: t
-}), Jme = () => G(`${IP}?status=new&limit=1000`);
-async function hF(e) {
- let t = await G(Tme, e);
+}), Gme = () => G(`${NP}?status=new&limit=1000`);
+async function fF(e) {
+ let t = await G(Sme, e);
if (!Array.isArray(t?.sources)) throw Error("没有读到订阅源");
return t;
}
-var gF = (e, t, n) => K(UP, {
+var pF = (e, t, n) => K(BP, {
action: "enabled",
id: e,
enabled: t
-}, "POST", n), _F = (e, t) => K(UP, {
+}, "POST", n), mF = (e, t) => K(BP, {
action: "remove",
id: e
-}, "POST", t), vF = (e, t) => K(Eme, t?.length ? { sources: t } : { all: !0 }, "POST", e), Yme = (e, t) => G(`${Dme}?q=${encodeURIComponent(e)}`, t), Xme = (e, t, n) => K(UP, {
+}, "POST", t), hF = (e, t) => K(Cme, t?.length ? { sources: t } : { all: !0 }, "POST", e), Kme = (e, t) => G(`${wme}?q=${encodeURIComponent(e)}`, t), qme = (e, t, n) => K(BP, {
action: "follow-name",
name: e,
ids: t
}, "POST", n);
-async function Zme(e, t = "") {
+async function Jme(e, t = "") {
await Promise.all([
z.fetchQuery({
- queryKey: WP,
- queryFn: () => lF(e)
+ queryKey: VP,
+ queryFn: () => oF(e)
}),
z.fetchQuery({
- queryKey: GP,
- queryFn: () => uF(e)
+ queryKey: HP,
+ queryFn: () => sF(e)
}),
t === "feeds" ? z.fetchQuery({
- queryKey: KP,
- queryFn: () => hF(e)
+ queryKey: UP,
+ queryFn: () => fF(e)
}) : null
]);
}
-function yF(e, t) {
- z.setQueryData(WP, (n) => n && {
+function gF(e, t) {
+ z.setQueryData(VP, (n) => n && {
...n,
sources: n.sources.map((n) => n.id === e ? {
...n,
@@ -40876,24 +40622,24 @@ function yF(e, t) {
} : n)
});
}
-function bF(e) {
+function _F(e) {
let t = new Set(e);
- z.setQueryData(WP, (e) => e && {
+ z.setQueryData(VP, (e) => e && {
...e,
sources: e.sources.filter((e) => !t.has(e.id))
});
}
-var xF = () => z.invalidateQueries({
- queryKey: WP,
+var vF = () => z.invalidateQueries({
+ queryKey: VP,
exact: !0
});
-function Qme(e) {
+function Yme(e) {
let t = e.results || [], n = (e) => t.reduce((t, n) => t + (e(n) || 0), 0), r = n((e) => e.added), i = n((e) => e.updated), a = n((e) => e.skipped_compilations), o = n((e) => e.skipped) - a, s = n((e) => e.history_skipped), c = n((e) => e.probed), l = t.filter((e) => e.ok && !e.added && !e.updated).length, u = t.filter((e) => !e.ok).length, d = [];
r && d.push(`新增 ${r} 条`), i && d.push(`更新 ${i} 条`), o && d.push(`跳过 ${o} 条无资源`), a && d.push(`排除 ${a} 个超大合集`), s && d.push(`跳过 ${s} 条超出首次采集范围的历史内容`), c && d.push(`回查 ${c} 条`), l && d.push(`${l} 个来源没有更新`), d.length || d.push("没有任何更新");
let f = t.filter((e) => e.exhausted).length;
return f && d.push(`${f} 个没有更多内容`), u && d.push(`${u} 个失败`), `检查了 ${t.length} 个来源:${d.join(" · ")}`;
}
-var $me = (e) => (e?.results || []).filter((e) => !e.ok), ehe = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", SF = (e) => e.last_checked_at ? mj(e.last_checked_at) : "未检查", the = /* @__PURE__ */ new Set([
+var Xme = (e) => (e?.results || []).filter((e) => !e.ok), Zme = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", yF = (e) => e.last_checked_at ? tj(e.last_checked_at) : "未检查", Qme = /* @__PURE__ */ new Set([
"fanbox",
"patreon",
"subscribestar",
@@ -40906,50 +40652,50 @@ var $me = (e) => (e?.results || []).filter((e) => !e.ok), ehe = (e) => (e?.resul
"gofile",
"f95zone",
"simpcity"
-]), CF = (e) => the.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", nhe = {
+]), bF = (e) => Qme.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", $me = {
required: "需要",
optional: "可选",
none: "不需要",
blocked: "接不进来"
-}, wF = (e) => !!e.present && !e.missing.length, rhe = [
+}, xF = (e) => !!e.present && !e.missing.length, ehe = [
["", "全部"],
["new", "未看"],
["saved", "已保存"],
["ignored", "已忽略"]
-], ihe = [
+], the = [
["new", "更新时间"],
["hot", "热度"],
["dur", "时长"]
-], TF = {
+], SF = {
new: ["从新到旧", "从旧到新"],
hot: ["从高到低", "从低到高"],
dur: ["从长到短", "从短到长"]
};
-function EF(e, t) {
+function CF(e, t) {
let n = (e) => encodeURIComponent(e.join(","));
return `/api/follow?limit=300&offset=${t}` + (e.status ? `&status=${e.status}` : "") + (e.author ? `&author=${n([e.author])}` : "") + (e.provider ? `&provider=${n([e.provider])}` : "") + (e.tags.length ? `&tag=${n(e.tags)}` : "") + (e.work ? `&work=${n([e.work])}` : "") + (e.sort === "new" ? "" : `&sort=${e.sort}`) + (e.sort === "rand" ? `&seed=${e.seed}` : "") + (e.dir === "desc" ? "" : `&dir=${e.dir}`);
}
-function DF(e, t) {
+function wF(e, t) {
return {
queryKey: [
"follow-feed",
- EF(e, 0),
+ CF(e, 0),
t
],
- queryFn: ({ pageParam: t, signal: n }) => G(EF(e, t), n),
+ queryFn: ({ pageParam: t, signal: n }) => G(CF(e, t), n),
initialPageParam: 0,
getNextPageParam: (e) => e.has_more ? (e.offset || 0) + 300 : void 0,
placeholderData: AS.keepPreviousData
};
}
-var OF = ["follow-feed", "credentials"], kF = (e) => G(LP, e).catch(() => ({ providers: [] }));
-async function ahe(e, t) {
- let n = DF(e.view, e.revision);
+var TF = ["follow-feed", "credentials"], EF = (e) => G(PP, e).catch(() => ({ providers: [] }));
+async function nhe(e, t) {
+ let n = wF(e.view, e.revision);
z.removeQueries({
queryKey: n.queryKey,
exact: !0
}), z.removeQueries({
- queryKey: OF,
+ queryKey: TF,
exact: !0
}), await Promise.all([z.fetchInfiniteQuery({
queryKey: n.queryKey,
@@ -40960,11 +40706,11 @@ async function ahe(e, t) {
initialPageParam: 0,
getNextPageParam: n.getNextPageParam
}), z.fetchQuery({
- queryKey: OF,
- queryFn: () => kF(t)
+ queryKey: TF,
+ queryFn: () => EF(t)
})]);
}
-function AF(e) {
+function DF(e) {
if (!e?.pages.length) return null;
let t = e.pages, n = t[t.length - 1];
return {
@@ -40973,10 +40719,10 @@ function AF(e) {
groups: t.flatMap((e) => e.groups || [])
};
}
-function jF(e, t, n) {
+function OF(e, t, n) {
return [...e].sort((e, r) => be(n, t(e)) - be(n, t(r)) || String(t(e)).localeCompare(String(t(r))));
}
-function MF(e) {
+function kF(e) {
let t = /* @__PURE__ */ new Set();
return [
e.primary,
@@ -40984,14 +40730,14 @@ function MF(e) {
...e.duplicates
].filter((e) => !e || t.has(e.id) ? !1 : (t.add(e.id), !0));
}
-function ohe(e) {
+function rhe(e) {
let t = z.getQueryCache().findAll({ queryKey: ["follow-feed"] }).sort((e, t) => t.state.dataUpdatedAt - e.state.dataUpdatedAt);
for (let n of t) {
let t = n.state.data;
if (!Array.isArray(t?.pages) || !t.pages.length) continue;
let r = t.pages[t.pages.length - 1];
for (let n of t.pages) for (let t of n.groups || []) {
- let n = MF(t).find((t) => t.id === e);
+ let n = kF(t).find((t) => t.id === e);
if (n) return {
item: n,
group: t,
@@ -41002,7 +40748,7 @@ function ohe(e) {
}
return null;
}
-function she(e) {
+function ihe(e) {
z.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -41012,7 +40758,7 @@ function she(e) {
...t,
groups: (t.groups || []).map((t) => {
let n = (t) => t.id === e.id ? e : t;
- return MF(t).some((t) => t.id === e.id) ? {
+ return kF(t).some((t) => t.id === e.id) ? {
...t,
primary: n(t.primary),
variants: t.variants.map(n),
@@ -41022,39 +40768,39 @@ function she(e) {
}))
});
}
-function che(e, t) {
+function ahe(e, t) {
z.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
- }, (n) => n && BF(n, null, e, t));
+ }, (n) => n && LF(n, null, e, t));
}
-function NF(e) {
- return MF(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
+function AF(e) {
+ return kF(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
}
-function PF(e) {
+function jF(e) {
let t = /* @__PURE__ */ new Set(), n = e.media_items || [];
return n.length ? n.forEach((e) => {
(e.media_kind === "image" || e.media_kind === "video") && t.add(e.media_kind);
}) : (e.media_kind === "image" || e.media_kind === "video") && t.add(e.media_kind), t;
}
-function FF(e) {
+function MF(e) {
let t = /* @__PURE__ */ new Set();
- return MF(e).forEach((e) => PF(e).forEach((e) => t.add(e))), t;
+ return kF(e).forEach((e) => jF(e).forEach((e) => t.add(e))), t;
}
-function IF(e, t) {
+function NF(e, t) {
let n = t === "images" ? "image" : "video";
- return NF(e).find((e) => PF(e).has(n)) || e.primary;
+ return AF(e).find((e) => jF(e).has(n)) || e.primary;
}
-function LF(e) {
- return NF(e).filter((e) => e.playable && e.media_kind === "video");
+function PF(e) {
+ return AF(e).filter((e) => e.playable && e.media_kind === "video");
}
-var RF = {
+var FF = {
video: "个视频",
image: "张图片",
mixed: "个媒体"
};
-function lhe({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r = !1, limit: i = 9 } = {}) {
- let a = n?.media || 0, o = n?.copies || 0, s = n?.kind || "", c = a > 1 ? `${a} ${RF[s] || RF.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
+function ohe({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r = !1, limit: i = 9 } = {}) {
+ let a = n?.media || 0, o = n?.copies || 0, s = n?.kind || "", c = a > 1 ? `${a} ${FF[s] || FF.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
for (let t of n?.faces || []) r && t.media_kind !== "image" || !t.thumb_url || t.thumb_url === e || u.has(t.face) || (u.add(t.face), d.push(t.thumb_url));
return {
isMix: !!c,
@@ -41063,14 +40809,14 @@ function lhe({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r
faces: d.length > 1 ? d.slice(0, i) : []
};
}
-function uhe(e) {
+function she(e) {
let t = e.filter((e) => e.can_backfill).map((e) => (e.backfill_page || 0) + 1);
if (!t.length) return "";
let n = Math.max(...t), r = Math.min(...t);
return n <= 1 ? "每个来源都只抓了第 1 页" : r === n ? `每个来源都抓到第 ${n} 页` : `已抓到第 ${r}–${n} 页`;
}
-function zF(e, t, n) {
- return e === t ? TF[e] ? {
+function IF(e, t, n) {
+ return e === t ? SF[e] ? {
sort: e,
dir: n === "asc" ? "desc" : "asc"
} : null : {
@@ -41078,13 +40824,13 @@ function zF(e, t, n) {
dir: "desc"
};
}
-function dhe(e, t, n, r) {
- let i = zF(e, n, r);
+function che(e, t, n, r) {
+ let i = IF(e, n, r);
if (!i) return "";
- let a = TF[i.sort];
+ let a = SF[i.sort];
return `按${t}${a ? a[+(i.dir === "asc")] : ""}排序`;
}
-function BF(e, t, n, r) {
+function LF(e, t, n, r) {
let i = "", a = e.pages.map((e) => ({
...e,
groups: (e.groups || []).flatMap((e) => {
@@ -41114,7 +40860,7 @@ function BF(e, t, n, r) {
})
};
}
-function fhe(e, t) {
+function lhe(e, t) {
let n = [];
return e.author && n.push({
kind: "创作者",
@@ -41134,7 +40880,7 @@ function fhe(e, t) {
label: e
})), n;
}
-function phe(e, t) {
+function uhe(e, t) {
return t.kind === "创作者" ? {
...e,
author: ""
@@ -41149,7 +40895,7 @@ function phe(e, t) {
tags: e.tags.filter((e) => e !== t.key)
};
}
-function mhe(e, t) {
+function dhe(e, t) {
for (let n of e) {
let e = n.primary?.tag_types?.[t];
if (e) return e;
@@ -41158,7 +40904,7 @@ function mhe(e, t) {
}
//#endregion
//#region src/sidebar.ts
-var hhe = [
+var fhe = [
"",
"follow",
"jav",
@@ -41167,7 +40913,7 @@ var hhe = [
"studios",
"flagged",
"manage"
-], ghe = [
+], phe = [
"playlists",
"immerse",
"stats",
@@ -41177,77 +40923,77 @@ var hhe = [
"follow-manage",
"quality"
];
-[...hhe, ...ghe];
-function _he(e) {
+[...fhe, ...phe];
+function mhe(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) for (let e of new Set(n.tags || [])) t.set(e, (t.get(e) || 0) + 1);
return [...t].sort((e, t) => t[1] - e[1]).slice(0, 30);
}
//#endregion
//#region src/react/follow-feed/follow-marks.ts
-var VF = (e) => typeof e == "string" ? e : "", HF = (e) => e.aliases;
-function UF(e, t = "") {
- let n = CF(e);
+var RF = (e) => typeof e == "string" ? e : "", zF = (e) => e.aliases;
+function BF(e, t = "") {
+ let n = bF(e);
return n ? `<img data-follow-site-icon="" src="${n}" alt="${L(t)}"${t ? ` title="${L(t)}"` : ""} loading="lazy" data-drop="self">` : "";
}
-var WF = (e, t) => nF(e, HF(t));
-function GF(e, t) {
- let { src: n, fallback: r } = iF(e), i = rF(t);
+var VF = (e, t) => $P(e, zF(t));
+function HF(e, t) {
+ let { src: n, fallback: r } = tF(e), i = eF(t);
if (!n) return `<span class="favatar none" title="没有可用头像">${L(i)}</span>`;
let a = r ? ` data-fallbacks="${L(r)}"` : "";
return `<img class="favatar" src="${L(n)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="initial"${a} data-initial="${L(i)}" data-drop-class="favatar none">`;
}
-function KF(e, t, n) {
- let r = HF(n), i = e.credit, a = i?.poster;
+function UF(e, t, n) {
+ let r = zF(n), i = e.credit, a = i?.poster;
if (!a) {
- let n = nF(t, r);
+ let n = $P(t, r);
return {
- author: n || VF(e.author) || VF(e.source_label) || "创作者未取得",
- avatar: GF(t, n),
+ author: n || RF(e.author) || RF(e.source_label) || "创作者未取得",
+ avatar: HF(t, n),
credited: ""
};
}
- let o = (e) => String(e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), s = n.sources.find((e) => o(e.ref) === o(a)), c = s?.author_key ? n.sources.filter((e) => e.author_key === s.author_key) : s ? [s] : [], l = c.length && nF(c, r) || a;
+ let o = (e) => String(e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), s = n.sources.find((e) => o(e.ref) === o(a)), c = s?.author_key ? n.sources.filter((e) => e.author_key === s.author_key) : s ? [s] : [], l = c.length && $P(c, r) || a;
return {
author: l,
- avatar: GF(c, l),
+ avatar: HF(c, l),
credited: i.credited || ""
};
}
-function qF(e, t = e.primary) {
+function WF(e, t = e.primary) {
let n = [], r = (e, t) => `<small class="javedition" data-follow-edition="${e}">${t}</small>`;
e.primary.variant_kind === "wip" ? n.push(r("wip", "WIP")) : e.has_wip && n.push(r("has-wip", "含 WIP"));
- let i = VF(e.primary.version);
+ let i = RF(e.primary.version);
i && n.push(r("version", L(i)));
- let a = VF(t.audio), o = a === "voiced" ? "配音版" : a === "silent" ? "无声版" : "";
+ let a = RF(t.audio), o = a === "voiced" ? "配音版" : a === "silent" ? "无声版" : "";
return o && n.push(r(a, o)), n.join("");
}
-function JF(e, t = e.primary) {
+function GF(e, t = e.primary) {
let n = new Map([
e.primary,
...e.variants,
...e.duplicates
].filter((e) => e.provider !== t.provider).map((e) => [e.provider, e.provider_label || e.provider]));
if (!n.size) return "";
- let r = [...n].map(([e, t]) => UF(e, t) || `<span>${L(t)}</span>`).join("");
+ let r = [...n].map(([e, t]) => BF(e, t) || `<span>${L(t)}</span>`).join("");
return `<span data-follow-seealso="" title="另见 ${L([...n.values()].join("、"))}">另见 ${r}</span>`;
}
-function YF(e, t) {
- let n = VF(e.media_error);
+function KF(e, t) {
+ let n = RF(e.media_error);
return n ? `媒体未取得:${n}` : e.media_needs_credential && !t.credentials.has(e.provider) ? e.playable ? "部分媒体未取得:需要 F95 登录会话解析" : "媒体未取得:需要 F95 登录会话解析" : "";
}
-var XF = (e) => e.published_at ? mj(e.published_at) : "时间未取得", ZF = /* @__PURE__ */ new Set(), QF = [], $F = null;
-function eI() {
- if ($F = null, !QF.length) return;
- let e = QF.splice(0, 200);
+var qF = (e) => e.published_at ? tj(e.published_at) : "时间未取得", JF = /* @__PURE__ */ new Set(), YF = [], XF = null;
+function ZF() {
+ if (XF = null, !YF.length) return;
+ let e = YF.splice(0, 200);
ce("/api/follow/image-dims", {
method: "POST",
body: JSON.stringify({ entries: e })
- }).catch(() => {}), QF.length && ($F = setTimeout(eI, 800));
+ }).catch(() => {}), YF.length && (XF = setTimeout(ZF, 800));
}
-function vhe(e, t, n, r) {
+function hhe(e, t, n, r) {
let i = `${e}:${t ?? ""}`;
- ZF.has(i) || (ZF.add(i), QF.push(t === null ? {
+ JF.has(i) || (JF.add(i), YF.push(t === null ? {
item: e,
width: n,
height: r
@@ -41256,15 +41002,15 @@ function vhe(e, t, n, r) {
width: n,
height: r,
media: t
- }), $F ||= setTimeout(eI, 800));
+ }), XF ||= setTimeout(ZF, 800));
}
//#endregion
//#region src/react/follow-feed/follow-card.tsx
-var yhe = (e) => Number(e) > 0;
-function bhe(e) {
+var ghe = (e) => Number(e) > 0;
+function _he(e) {
return /^\d{4}-/.test(e) ? e.startsWith(String((/* @__PURE__ */ new Date()).getFullYear())) ? e.slice(5, 10) : e.slice(0, 10) : e;
}
-function xhe({ src: e, fallback: t, width: n, height: r, onLearn: i }) {
+function vhe({ src: e, fallback: t, width: n, height: r, onLearn: i }) {
let [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(!1);
return a ? null : /* @__PURE__ */ (0, V.jsx)("img", {
src: s ? t : e,
@@ -41282,8 +41028,8 @@ function xhe({ src: e, fallback: t, width: n, height: r, onLearn: i }) {
} : void 0
});
}
-function She(e) {
- let { group: t, authorSources: n, media: r, context: i, selected: a, selectMode: o, busy: s, failure: c, actions: l } = e, u = IF(t, r), d = r === "images", f = d ? (u.media_items || []).find((e) => e.media_kind === "image") : void 0, p = f?.thumb_url || u.thumb_url || "", m = d && u.playable ? `/follow-stream?id=${u.id}${f ? `&media=${f.index}` : ""}` : void 0, h = f && f.thumb_url === p ? f : null, g = !h || p === u.thumb_url, _ = d ? [h, g ? u : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, v = d && !_ && p ? (e, t) => vhe(u.id, h ? h.index : null, e, t) : void 0, y = r === "videos" ? LF(t) : [], b = (u.media_items || []).length > 1 ? u.id : y[0]?.id || u.id, x = lhe({
+function yhe(e) {
+ let { group: t, authorSources: n, media: r, context: i, selected: a, selectMode: o, busy: s, failure: c, actions: l } = e, u = NF(t, r), d = r === "images", f = d ? (u.media_items || []).find((e) => e.media_kind === "image") : void 0, p = f?.thumb_url || u.thumb_url || "", m = d && u.playable ? `/follow-stream?id=${u.id}${f ? `&media=${f.index}` : ""}` : void 0, h = f && f.thumb_url === p ? f : null, g = !h || p === u.thumb_url, _ = d ? [h, g ? u : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, v = d && !_ && p ? (e, t) => hhe(u.id, h ? h.index : null, e, t) : void 0, y = r === "videos" ? PF(t) : [], b = (u.media_items || []).length > 1 ? u.id : y[0]?.id || u.id, x = ohe({
cover: p,
coverFace: (f?.thumb_url ? f : u).face,
stack: t.stack,
@@ -41291,7 +41037,7 @@ function She(e) {
limit: 9
}), S = (0, B.useRef)(x.faces);
S.current = x.faces;
- let C = FA({
+ let C = SA({
load: async () => S.current,
canFlip: () => S.current.length > 1 && l.canFlip(),
referrerPolicy: "no-referrer"
@@ -41299,7 +41045,7 @@ function She(e) {
w.current = C.onPointerLeave;
let T = (0, B.useCallback)((e) => {
e && (e._stopHover = () => w.current());
- }, []), E = KF(u, n, i), D = XF(u), O = (u.tags || []).slice(0, 3), k = YF(u, i), A = JF(t, u), j = u.status === "saved", M = (e) => {
+ }, []), E = UF(u, n, i), D = qF(u), O = (u.tags || []).slice(0, 3), k = KF(u, i), A = GF(t, u), j = u.status === "saved", M = (e) => {
if (!e.target.closest("[data-media-tag]")) {
if (o || e.shiftKey || e.ctrlKey || e.metaKey) {
e.preventDefault(), l.toggleSelection(u.id, e.shiftKey);
@@ -41332,7 +41078,7 @@ function She(e) {
}), /* @__PURE__ */ (0, V.jsxs)("div", {
"data-media-pic": "",
children: [
- p ? /* @__PURE__ */ (0, V.jsx)(xhe, {
+ p ? /* @__PURE__ */ (0, V.jsx)(vhe, {
src: p,
fallback: m,
width: _?.width,
@@ -41340,7 +41086,7 @@ function She(e) {
onLearn: v
}, p) : /* @__PURE__ */ (0, V.jsx)("span", {
"data-follow-nothumb": "",
- dangerouslySetInnerHTML: { __html: UF(u.resource_provider || u.provider) }
+ dangerouslySetInnerHTML: { __html: BF(u.resource_provider || u.provider) }
}),
x.faces.length > 1 ? /* @__PURE__ */ (0, V.jsx)("div", {
"data-mix-faces": "",
@@ -41359,7 +41105,7 @@ function She(e) {
"data-media-badge": "",
title: u.provider_label,
"aria-label": `来源:${u.provider_label || ""}`,
- dangerouslySetInnerHTML: { __html: UF(u.provider) }
+ dangerouslySetInnerHTML: { __html: BF(u.provider) }
}),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-media-check": "",
@@ -41368,7 +41114,7 @@ function She(e) {
},
dangerouslySetInnerHTML: { __html: R("check") }
}),
- yhe(u.duration) ? /* @__PURE__ */ (0, V.jsx)("span", {
+ ghe(u.duration) ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-media-duration": "",
children: fe(u.duration)
}) : null,
@@ -41450,7 +41196,7 @@ function She(e) {
/* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-media-title": "",
- dangerouslySetInnerHTML: { __html: qF(t, u) + L(u.title) }
+ dangerouslySetInnerHTML: { __html: WF(t, u) + L(u.title) }
}),
/* @__PURE__ */ (0, V.jsxs)("div", {
"data-follow-byline": "",
@@ -41461,7 +41207,7 @@ function She(e) {
}), /* @__PURE__ */ (0, V.jsx)("time", {
dateTime: u.published_at || "",
title: D,
- children: bhe(D)
+ children: _he(D)
})]
}),
E.credited ? /* @__PURE__ */ (0, V.jsx)("div", {
@@ -41497,10 +41243,10 @@ function She(e) {
]
});
}
-var Che = (0, B.memo)(She), tI = () => /* @__PURE__ */ (0, V.jsx)("span", {
+var bhe = (0, B.memo)(yhe), QF = () => /* @__PURE__ */ (0, V.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
-}), whe = vA("settings"), The = vA("chevron-down"), Ehe = vA("history"), Dhe = [[
+}), xhe = oA("settings"), She = oA("chevron-down"), Che = oA("history"), whe = [[
"fixed",
"固定比例",
"layout-grid"
@@ -41509,19 +41255,19 @@ var Che = (0, B.memo)(She), tI = () => /* @__PURE__ */ (0, V.jsx)("span", {
"瀑布流",
"columns-2"
]];
-function Ohe(e, t, n) {
+function The(e, t, n) {
return (0, B.useMemo)(() => {
let r = e?.groups || [], i = e?.counts || {}, a = e?.sources || [], o = e?.facets || {}, s = new Set(o.authors || []), c = new Map(a.map((e) => [e.provider, e.provider_label || e.provider])), l = new Map((o.providers || []).map((e) => [e, c.get(e) || e])), u = new Map(o.tags || []), d = /* @__PURE__ */ new Map();
a.forEach((e) => {
e.author_key && (d.has(e.author_key) || d.set(e.author_key, []), d.get(e.author_key).push(e));
});
- let f = jF([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = jF(o.works || [], (e) => e[0], n).slice(0, 24);
+ let f = OF([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = OF(o.works || [], (e) => e[0], n).slice(0, 24);
t.work && !p.some((e) => e[0] === t.work) && p.push([
t.work,
t.work,
0
]);
- let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = jF([...u], (e) => e[0], n).slice(0, 20);
+ let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = OF([...u], (e) => e[0], n).slice(0, 20);
t.tags.forEach((e) => {
h.some(([t]) => t === e) || h.push([e, u.get(e) || m]);
});
@@ -41529,7 +41275,7 @@ function Ohe(e, t, n) {
videos: 0,
images: 0
};
- r.forEach((e) => FF(e).forEach((e) => {
+ r.forEach((e) => MF(e).forEach((e) => {
g[e === "image" ? "images" : "videos"] += 1;
}));
let _ = t.media === "images" ? "image" : "video";
@@ -41544,7 +41290,7 @@ function Ohe(e, t, n) {
workRows: p,
allCount: m,
mediaCounts: g,
- visible: r.filter((e) => FF(e).has(_)),
+ visible: r.filter((e) => MF(e).has(_)),
author: d.has(t.author) && s.has(t.author) ? t.author : "",
provider: l.has(t.provider) ? t.provider : "",
workNames: new Map((o.works || []).map((e) => [e[0], e[1]])),
@@ -41557,15 +41303,15 @@ function Ohe(e, t, n) {
n
]);
}
-function khe(e) {
- let { view: t, seed: n, revision: r, actions: i } = e, a = DF(t, r), o = kS(a), s = TS({
- queryKey: OF,
- queryFn: ({ signal: e }) => kF(e)
- }), c = (0, B.useMemo)(() => AF(o.data), [o.data]), l = (0, B.useMemo)(() => new Set((s.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [s.data]), u = (0, B.useMemo)(() => ({
+function Ehe(e) {
+ let { view: t, seed: n, revision: r, actions: i } = e, a = wF(t, r), o = kS(a), s = TS({
+ queryKey: TF,
+ queryFn: ({ signal: e }) => EF(e)
+ }), c = (0, B.useMemo)(() => DF(o.data), [o.data]), l = (0, B.useMemo)(() => new Set((s.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [s.data]), u = (0, B.useMemo)(() => ({
sources: c?.sources || [],
aliases: c?.author_aliases || [],
credentials: l
- }), [c, l]), d = Ohe(c, t, n), f = o.isPending || o.isPlaceholderData, p = !f && !!c, m = (0, B.useMemo)(() => _he(d.visible.flatMap(MF).map((e) => ({ tags: e.tags || [] }))), [d.visible]);
+ }), [c, l]), d = The(c, t, n), f = o.isPending || o.isPlaceholderData, p = !f && !!c, m = (0, B.useMemo)(() => mhe(d.visible.flatMap(kF).map((e) => ({ tags: e.tags || [] }))), [d.visible]);
(0, B.useEffect)(() => {
p && i.loaded(m);
}, [
@@ -41573,20 +41319,20 @@ function khe(e) {
m,
i
]);
- let h = Ahe(e, !!c);
- if (!c) return o.isError ? /* @__PURE__ */ (0, V.jsx)(kA, {
+ let h = Dhe(e, !!c);
+ if (!c) return o.isError ? /* @__PURE__ */ (0, V.jsx)(gA, {
message: ye(o.error),
onRetry: () => void o.refetch()
}) : null;
let g = (e) => i.route({
...t,
...e
- }), _ = fhe({
+ }), _ = lhe({
...t,
author: d.author,
provider: d.provider
}, {
- authors: new Map([...d.authorSources].map(([e, t]) => [e, WF(t, u)])),
+ authors: new Map([...d.authorSources].map(([e, t]) => [e, VF(t, u)])),
providers: d.providers,
works: d.workNames
}), v = t.status ? d.counts[t.status] || 0 : d.allCount, y = d.sources.some((e) => e.can_backfill);
@@ -41606,7 +41352,7 @@ function khe(e) {
"data-follow-head-actions": "",
children: [/* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
- leadingIcon: whe,
+ leadingIcon: xhe,
"data-follow-manage": "",
onClick: i.openManage,
children: "管理关注"
@@ -41623,20 +41369,20 @@ function khe(e) {
}) : null]
})]
}),
- /* @__PURE__ */ (0, V.jsx)(jhe, {
+ /* @__PURE__ */ (0, V.jsx)(Ohe, {
facets: d,
pressed: d.author,
context: u,
props: e,
onPick: (e) => g({ author: d.author === e ? "" : e })
}),
- /* @__PURE__ */ (0, V.jsx)(Mhe, {
+ /* @__PURE__ */ (0, V.jsx)(khe, {
rows: d.workRows,
pressed: t.work,
props: e,
onPick: (e) => g({ work: t.work === e ? "" : e })
}),
- /* @__PURE__ */ (0, V.jsx)(Nhe, {
+ /* @__PURE__ */ (0, V.jsx)(Ahe, {
facets: d,
view: t,
total: v,
@@ -41644,9 +41390,9 @@ function khe(e) {
props: e,
route: g
}),
- /* @__PURE__ */ (0, V.jsx)(Phe, {
+ /* @__PURE__ */ (0, V.jsx)(jhe, {
conditions: _,
- onDrop: (e) => i.route(phe(t, e)),
+ onDrop: (e) => i.route(uhe(t, e)),
onClear: () => g({
author: "",
provider: "",
@@ -41654,11 +41400,11 @@ function khe(e) {
tags: []
})
}),
- d.broken.length ? /* @__PURE__ */ (0, V.jsx)(Fhe, {
+ d.broken.length ? /* @__PURE__ */ (0, V.jsx)(Mhe, {
count: d.broken.length,
onManage: i.openManage
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Ihe, {
+ /* @__PURE__ */ (0, V.jsx)(Nhe, {
pending: f,
facets: d,
data: c,
@@ -41669,19 +41415,19 @@ function khe(e) {
"data-follow-pagination": "",
children: [c.has_more ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-follow-page-action": "",
- children: /* @__PURE__ */ (0, V.jsxs)(BA, {
+ children: /* @__PURE__ */ (0, V.jsxs)(DA, {
entity: !0,
enabled: () => !h.busyRef.current,
load: async () => {
await o.fetchNextPage({ throwOnError: !0 });
},
- children: [/* @__PURE__ */ (0, V.jsx)(The, { className: "size-3.5" }), "加载更多"]
+ children: [/* @__PURE__ */ (0, V.jsx)(She, { className: "size-3.5" }), "加载更多"]
}, o.data?.pages.length)
}) : null, y ? /* @__PURE__ */ (0, V.jsxs)("span", {
"data-follow-page-action": "",
children: [/* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
- leadingIcon: h.olderBusy ? void 0 : Ehe,
+ leadingIcon: h.olderBusy ? void 0 : Che,
"data-follow-older": "",
"aria-busy": h.busy || void 0,
onClick: () => void h.start(!0),
@@ -41691,14 +41437,14 @@ function khe(e) {
}), /* @__PURE__ */ (0, V.jsx)("span", { children: "抓取中…" })] }) : "抓更早的一页"
}), /* @__PURE__ */ (0, V.jsx)("span", {
"data-follow-backfill": "",
- children: uhe(d.sources)
+ children: she(d.sources)
})]
}) : null]
}) : null
]
})] });
}
-function Ahe(e, t) {
+function Dhe(e, t) {
let { helpers: n, actions: r } = e, [i, a] = (0, B.useState)(0), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(!1), f = (0, B.useRef)(!1), p = (0, B.useRef)(null), m = (0, B.useRef)({
helpers: n,
actions: r
@@ -41713,7 +41459,7 @@ function Ahe(e, t) {
return m.current.helpers.jobProgress({
host: e,
active: () => t,
- read: (e) => G(RP, e),
+ read: (e) => G(FP, e),
busy: (e) => {
t && (f.current = e, s(e));
},
@@ -41738,7 +41484,7 @@ function Ahe(e, t) {
f.current = !0, l(e ? "older" : "check");
let t = !1;
try {
- let n = await K(RP, e ? {
+ let n = await K(FP, e ? {
older: !0,
background: !0
} : { background: !0 });
@@ -41756,7 +41502,7 @@ function Ahe(e, t) {
olderBusy: c === "older" || u && o
};
}
-function jhe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
+function Ohe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
let a = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
r.helpers.wireDrag(a.current);
@@ -41773,16 +41519,16 @@ function jhe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
onClick: () => i(r),
children: [/* @__PURE__ */ (0, V.jsx)("span", {
"data-follow-ring": "",
- dangerouslySetInnerHTML: { __html: GF(a, WF(a, n)) }
+ dangerouslySetInnerHTML: { __html: HF(a, VF(a, n)) }
}), /* @__PURE__ */ (0, V.jsx)("span", {
"data-follow-name": "",
- children: WF(a, n)
+ children: VF(a, n)
})]
}, r);
})
}) : null;
}
-function Mhe({ rows: e, pressed: t, props: n, onPick: r }) {
+function khe({ rows: e, pressed: t, props: n, onPick: r }) {
let i = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
n.helpers.wireDrag(i.current);
@@ -41803,13 +41549,13 @@ function Mhe({ rows: e, pressed: t, props: n, onPick: r }) {
}, e[0]))
}) : null;
}
-function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
- let { helpers: o, actions: s } = i, c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = !!e.mediaCounts.images || t.media === "images", h = lA(c, u, "[data-follow-filter][aria-pressed=\"true\"]", t.status), g = lA(l, d, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${m}`);
+function Ahe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
+ let { helpers: o, actions: s } = i, c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = !!e.mediaCounts.images || t.media === "images", h = hD(c, u, "[data-follow-filter][aria-pressed=\"true\"]", t.status), g = hD(l, d, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${m}`);
(0, B.useEffect)(() => {
o.wireDrag(f.current), o.wireDrag(p.current), o.wireScroller(p.current);
}, [o]);
let _ = [...e.providers], v = _.length + e.tagRows.length > 0, y = t.media === "images";
- return /* @__PURE__ */ (0, V.jsx)(oA, {
+ return /* @__PURE__ */ (0, V.jsx)(fD, {
label: "筛选与排序",
topLabel: m ? "媒体与关注筛选" : "关注筛选",
attrs: {
@@ -41861,7 +41607,7 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: R(i) }
}, e);
})
- }), /* @__PURE__ */ (0, V.jsx)(tI, {})] }) : null, /* @__PURE__ */ (0, V.jsxs)("div", {
+ }), /* @__PURE__ */ (0, V.jsx)(QF, {})] }) : null, /* @__PURE__ */ (0, V.jsxs)("div", {
ref: f,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -41870,7 +41616,7 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
"aria-label": "状态",
"data-entity-states": "",
onPointerLeave: h.leave,
- children: [rhe.map(([e, n]) => /* @__PURE__ */ (0, V.jsx)("button", {
+ children: [ehe.map(([e, n]) => /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-entity-state": e,
"data-follow-filter": e,
@@ -41881,7 +41627,7 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
t.status !== e && a({ status: e });
},
children: n
- }, e)), v ? /* @__PURE__ */ (0, V.jsx)(tI, {}) : null]
+ }, e)), v ? /* @__PURE__ */ (0, V.jsx)(QF, {}) : null]
}), /* @__PURE__ */ (0, V.jsxs)("div", {
ref: p,
"data-entity-tags": "",
@@ -41894,13 +41640,13 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
title: n,
"aria-label": `来源:${n}`,
onClick: () => a({ provider: e.provider === t ? "" : t }),
- dangerouslySetInnerHTML: { __html: UF(t) }
+ dangerouslySetInnerHTML: { __html: BF(t) }
}, t)),
- _.length && e.tagRows.length ? /* @__PURE__ */ (0, V.jsx)(tI, {}) : null,
- e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, V.jsxs)(sA, {
+ _.length && e.tagRows.length ? /* @__PURE__ */ (0, V.jsx)(QF, {}) : null,
+ e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, V.jsxs)(pD, {
"data-follow-tag": n,
"data-entity-press": "",
- "data-tag-cat": `r34-${mhe(e.groups, n)}`,
+ "data-tag-cat": `r34-${dhe(e.groups, n)}`,
pressed: t.tags.includes(n),
onPress: () => a({ tags: t.tags.includes(n) ? t.tags.filter((e) => e !== n) : [...t.tags, n] }),
children: [ot(n), r ? /* @__PURE__ */ (0, V.jsx)("span", {
@@ -41918,11 +41664,11 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
}), /* @__PURE__ */ (0, V.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(SA, { onPress: s.shuffle }),
- y ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(xA, {
+ /* @__PURE__ */ (0, V.jsx)(uA, { onPress: s.shuffle }),
+ y ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(lA, {
label: "图片布局",
value: i.photoLayout,
- options: Dhe,
+ options: whe,
onChange: (e) => s.setPhotoLayout(e === "fixed" ? "fixed" : "masonry")
}), /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
@@ -41939,17 +41685,17 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: R("captions-off") }
})]
})] }) : null,
- ihe.map(([e, n]) => {
- let r = t.sort === e, i = vA(t.dir === "asc" ? "arrow-up" : "arrow-down");
+ the.map(([e, n]) => {
+ let r = t.sort === e, i = oA(t.dir === "asc" ? "arrow-up" : "arrow-down");
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-entity-sort": e,
"data-follow-sort": e,
"data-entity-press": "",
"aria-pressed": r,
- "aria-label": dhe(e, n, t.sort, t.dir) || void 0,
+ "aria-label": che(e, n, t.sort, t.dir) || void 0,
onClick: () => {
- let n = zF(e, t.sort, t.dir);
+ let n = IF(e, t.sort, t.dir);
n && a(n);
},
children: [n, r ? /* @__PURE__ */ (0, V.jsx)(i, { className: "size-3.5" }) : null]
@@ -41959,7 +41705,7 @@ function Nhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
})] })
});
}
-function Phe({ conditions: e, onDrop: t, onClear: n }) {
+function jhe({ conditions: e, onDrop: t, onClear: n }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-entity-combo": "",
"data-follow-combo": "",
@@ -41984,7 +41730,7 @@ function Phe({ conditions: e, onDrop: t, onClear: n }) {
})] }) : null
});
}
-function Fhe({ count: e, onManage: t }) {
+function Mhe({ count: e, onManage: t }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-follow-broken": "",
onClick: (e) => {
@@ -41993,12 +41739,12 @@ function Fhe({ count: e, onManage: t }) {
dangerouslySetInnerHTML: { __html: `<div class="geist-note geist-note-error fwarn" role="alert">${R("alert")}<span>${e} 个来源上次检查失败,去<button type="button" class="flink" data-follow-manage>管理关注</button>看原因。</span></div>` }
});
}
-function Ihe({ pending: e, facets: t, data: n, context: r, props: i }) {
- let { view: a, helpers: o } = i, s = a.media === "images", c = OA(e, () => o.listSkeletonHtml(a.media));
+function Nhe({ pending: e, facets: t, data: n, context: r, props: i }) {
+ let { view: a, helpers: o } = i, s = a.media === "images", c = hA(e, () => o.listSkeletonHtml(a.media));
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-follow-list-body": "",
"data-grid-reveal": c.fading ? "" : void 0,
- children: [c.layer, e ? null : /* @__PURE__ */ (0, V.jsx)(Lhe, {
+ children: [c.layer, e ? null : /* @__PURE__ */ (0, V.jsx)(Phe, {
facets: t,
data: n,
context: r,
@@ -42007,38 +41753,38 @@ function Ihe({ pending: e, facets: t, data: n, context: r, props: i }) {
})]
});
}
-function Lhe({ facets: e, data: t, context: n, props: r, images: i }) {
- let { view: a, actions: o } = r, s = Bhe(r), c = i ? {
+function Phe({ facets: e, data: t, context: n, props: r, images: i }) {
+ let { view: a, actions: o } = r, s = Lhe(r), c = i ? {
"data-size": r.photoSize,
"data-layout": r.photoLayout,
"data-images-only": String(r.imagesOnly)
} : {}, l;
return l = e.visible.length ? e.visible.map((t) => {
let i = e.byId.get(t.primary?.source_id), c = i?.author_key && e.authorSources.get(i.author_key) || [], l = t.primary.id;
- return /* @__PURE__ */ (0, V.jsx)(Che, {
+ return /* @__PURE__ */ (0, V.jsx)(bhe, {
group: t,
authorSources: c,
media: a.media,
context: n,
- selected: r.selected.has(nI(t, a)),
+ selected: r.selected.has($F(t, a)),
selectMode: r.selectMode,
- busy: s.busy.get(nI(t, a)) || "",
- failure: s.failures.get(nI(t, a)) || "",
+ busy: s.busy.get($F(t, a)) || "",
+ failure: s.failures.get($F(t, a)) || "",
actions: o,
onStatus: s.status,
onSave: s.save
}, `${l}:${a.media}`);
- }) : /* @__PURE__ */ (0, V.jsx)(Rhe, { data: t }), /* @__PURE__ */ (0, V.jsx)("div", {
+ }) : /* @__PURE__ */ (0, V.jsx)(Fhe, { data: t }), /* @__PURE__ */ (0, V.jsx)("div", {
"data-follow-list": "",
"data-follow-wall": i ? "" : void 0,
...c,
children: l
});
}
-function nI(e, t) {
- return IF(e, t.media).id;
+function $F(e, t) {
+ return NF(e, t.media).id;
}
-function Rhe({ data: e }) {
+function Fhe({ data: e }) {
let t = (e.groups || []).length ? Oe("search-x", "当前筛选下没有更新", "切换媒体类型、创作者、来源或标签后再试。") : (e.sources || []).length ? Oe("rss", "没有符合条件的更新", "切换状态或来源筛选后再试。") : Oe("rss", "还没有关注任何来源", "添加创作者或订阅来源后,更新会集中显示在这里。", { actions: "<a class=\"geist-button primary\" href=\"/follow-manage?tab=add\">添加关注</a>" });
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-follow-empty": "",
@@ -42046,22 +41792,22 @@ function Rhe({ data: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-var zhe = {
+var Ihe = {
new: "已恢复未看",
seen: "已标记已看",
ignored: "已忽略"
};
-function Bhe(e) {
- let { view: t, revision: n, actions: r } = e, [i, a] = (0, B.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, B.useState)(() => /* @__PURE__ */ new Map()), c = DF(t, n).queryKey, l = (e, t, n) => n((n) => {
+function Lhe(e) {
+ let { view: t, revision: n, actions: r } = e, [i, a] = (0, B.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, B.useState)(() => /* @__PURE__ */ new Map()), c = wF(t, n).queryKey, l = (e, t, n) => n((n) => {
let r = new Map(n);
return t ? r.set(e, t) : r.delete(e), r;
}), u = (e, n) => {
- z.setQueryData(c, (r) => r && BF(r, t, e, n));
+ z.setQueryData(c, (r) => r && LF(r, t, e, n));
}, d = () => void z.invalidateQueries({
queryKey: c,
exact: !0
}), f = (e) => {
- let t = AF(z.getQueryData(c));
+ let t = DF(z.getQueryData(c));
for (let n of t?.groups || []) for (let t of [
n.primary,
...n.variants,
@@ -42069,13 +41815,13 @@ function Bhe(e) {
]) if (t.id === e) return t.status;
return "new";
}, p = OS({
- mutationFn: ({ id: e, to: t }) => K(HP, {
+ mutationFn: ({ id: e, to: t }) => K(zP, {
item: e,
to: t
}),
onSuccess: (e, { id: t, to: n, was: i }) => {
- u(t, n), d(), r.toast(zhe[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
- await K(HP, {
+ u(t, n), d(), r.toast(Ihe[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
+ await K(zP, {
item: t,
to: i
}), u(t, i), d();
@@ -42120,8 +41866,8 @@ function Bhe(e) {
}
//#endregion
//#region src/react/follow-manage/source-view.tsx
-function rI({ provider: e, label: t }) {
- let n = CF(e), [r, i] = (0, B.useState)(!1);
+function eI({ provider: e, label: t }) {
+ let n = bF(e), [r, i] = (0, B.useState)(!1);
return !n || r ? t ? /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: t }) : null : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("img", {
src: n,
alt: "",
@@ -42132,8 +41878,8 @@ function rI({ provider: e, label: t }) {
className: "size-3.5 shrink-0 rounded-sm object-contain"
}), t ? /* @__PURE__ */ (0, V.jsx)(H_, { children: t }) : null] });
}
-function iI({ group: e, name: t }) {
- let { src: n, fallback: r } = iF(e), [i, a] = (0, B.useState)(0), o = [n, r].filter(Boolean)[i];
+function tI({ group: e, name: t }) {
+ let { src: n, fallback: r } = tF(e), [i, a] = (0, B.useState)(0), o = [n, r].filter(Boolean)[i];
return o ? /* @__PURE__ */ (0, V.jsx)("img", {
src: o,
alt: "",
@@ -42146,18 +41892,18 @@ function iI({ group: e, name: t }) {
}) : /* @__PURE__ */ (0, V.jsx)("span", {
title: "没有可用头像",
className: "inline-grid size-8 shrink-0 place-items-center rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary",
- children: rF(t)
+ children: eF(t)
});
}
-function aI({ source: e }) {
- let t = ZP(e) ? "rose" : e.enabled && e.last_status === "ok" ? "lime" : e.enabled ? "yellow" : "neutral";
+function nI({ source: e }) {
+ let t = JP(e) ? "rose" : e.enabled && e.last_status === "ok" ? "lime" : e.enabled ? "yellow" : "neutral";
return /* @__PURE__ */ (0, V.jsx)(xE, {
variant: "caption",
color: t,
- children: Ime(e)
+ children: Nme(e)
});
}
-function oI({ source: e }) {
+function rI({ source: e }) {
return /* @__PURE__ */ (0, V.jsx)("a", {
href: e.url,
target: "_blank",
@@ -42169,11 +41915,11 @@ function oI({ source: e }) {
}
//#endregion
//#region src/react/follow-manage/add-source.tsx
-var sI = vE(bk, xk, "text-body-2-medium"), Vhe = "粘贴来源链接,或输入创作者名、id…", Hhe = "查找中…(首次按名字查要下载创作者索引,可能几十秒)", Uhe = "识别中…", Whe = "站内没有查到来源", cI = (e, t) => `${e}:${t.url}`;
-function Ghe({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onClose: o }) {
+var iI = vE(dM, fM, "text-body-2-medium"), Rhe = "粘贴来源链接,或输入创作者名、id…", zhe = "查找中…(首次按名字查要下载创作者索引,可能几十秒)", Bhe = "识别中…", Vhe = "站内没有查到来源", aI = (e, t) => `${e}:${t.url}`;
+function Hhe({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onClose: o }) {
return (0, B.useEffect)(() => {
t.current?.querySelector("[aria-current=\"true\"]")?.scrollIntoView({ block: "nearest" });
- }, [t, r]), /* @__PURE__ */ (0, V.jsxs)(gO, {
+ }, [t, r]), /* @__PURE__ */ (0, V.jsxs)(tk, {
ref: t,
triggerRef: e,
isOpen: !0,
@@ -42185,7 +41931,7 @@ function Ghe({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
placement: "bottom start",
offset: 4,
"aria-label": "来源建议",
- className: vE(yk, "flex w-(--trigger-width) flex-col gap-1 overscroll-contain"),
+ className: vE(uM, "flex w-(--trigger-width) flex-col gap-1 overscroll-contain"),
children: [i && !n.length ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "px-2 py-1.5",
children: /* @__PURE__ */ (0, V.jsx)(EE, { label: "正在查找建议" })
@@ -42195,7 +41941,7 @@ function Ghe({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
}), /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"aria-current": t === r ? "true" : void 0,
- className: t === r ? vE(sI, "bg-background-secondary-default") : sI,
+ className: t === r ? vE(iI, "bg-background-secondary-default") : iI,
onMouseDown: (e) => e.preventDefault(),
onClick: () => a(e.value),
children: [
@@ -42215,7 +41961,7 @@ function Ghe({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
})] }, `${e.group}-${e.value}`))]
});
}
-function Khe({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
+function Uhe({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
let i = (0, B.useRef)(null), [a, o] = (0, B.useState)(!1), s = (e.providers || []).filter((e) => e.followable), c = s.filter((e) => !t.has(e.provider_label)).length, l = c === s.length ? "全部来源" : `${c}/${s.length} 个来源`, u = (e, r) => {
let i = new Set(t);
r ? i.delete(e) : i.add(e), n(i);
@@ -42223,20 +41969,20 @@ function Khe({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
ref: i,
variant: "secondary",
- leadingIcon: sae,
+ leadingIcon: cae,
"aria-haspopup": "dialog",
"aria-expanded": a,
"aria-label": l,
onClick: () => o(!0),
children: l
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
triggerRef: i,
isOpen: a,
onOpenChange: o,
placement: "bottom end",
offset: 4,
- className: yk,
- children: /* @__PURE__ */ (0, V.jsxs)(DO, {
+ className: uM,
+ children: /* @__PURE__ */ (0, V.jsxs)(fk, {
"aria-label": "来源筛选",
className: "flex w-64 flex-col gap-1 outline-none",
children: [s.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
@@ -42252,16 +41998,16 @@ function Khe({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
onClick: () => n(new Set(s.map((e) => e.provider_label))),
children: "全不选"
})]
- }) : /* @__PURE__ */ (0, V.jsx)(Pk, { children: "暂无可用来源" }), s.map((e) => {
+ }) : /* @__PURE__ */ (0, V.jsx)(zE, { children: "暂无可用来源" }), s.map((e) => {
let n = e.requirement === "required" && (!e.present || (e.missing || []).length > 0);
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(BM, {
+ children: [/* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: !t.has(e.provider_label),
onChange: (t) => u(e.provider_label, t),
children: /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-1.5",
- children: [/* @__PURE__ */ (0, V.jsx)(rI, { provider: e.provider }), e.provider_label]
+ children: [/* @__PURE__ */ (0, V.jsx)(eI, { provider: e.provider }), e.provider_label]
})
}), n ? /* @__PURE__ */ (0, V.jsx)(J, {
variant: "ghost",
@@ -42277,7 +42023,7 @@ function Khe({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
})
})] });
}
-function qhe({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
+function Whe({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
if (e.kind === "error") return /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: e.line,
@@ -42296,15 +42042,15 @@ function qhe({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
children: e.line
}),
a.length ? a.map((e) => {
- let n = cI(t, e);
- return /* @__PURE__ */ (0, V.jsx)(BM, {
+ let n = aI(t, e);
+ return /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: !e.known && !r.has(n),
isDisabled: e.known,
onChange: (e) => i(n, e),
children: /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 flex-wrap items-center gap-1.5",
children: [
- /* @__PURE__ */ (0, V.jsx)(rI, { provider: e.provider }),
+ /* @__PURE__ */ (0, V.jsx)(eI, { provider: e.provider }),
/* @__PURE__ */ (0, V.jsx)("b", {
className: "text-body-medium",
children: e.provider_label
@@ -42320,22 +42066,22 @@ function qhe({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
]
})
}, n);
- }) : /* @__PURE__ */ (0, V.jsx)(Pk, { children: Whe }),
+ }) : /* @__PURE__ */ (0, V.jsx)(zE, { children: Vhe }),
(e.external_searches || []).map((e) => /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [/* @__PURE__ */ (0, V.jsx)("small", {
className: "text-caption-1-regular text-text-secondary",
children: e.evidence
- }), /* @__PURE__ */ (0, V.jsx)(Lk, {
+ }), /* @__PURE__ */ (0, V.jsx)(HE, {
href: e.url,
children: `${e.label}:${e.query}`
})]
}, e.url)),
- o.length ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: o.map(([e, t]) => `${e}:${t}`).join(";") }) : null
+ o.length ? /* @__PURE__ */ (0, V.jsx)(zE, { children: o.map(([e, t]) => `${e}:${t}`).join(";") }) : null
]
});
}
-function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials: i }) {
+function Ghe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials: i }) {
let [a, o] = (0, B.useState)(""), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(!1), [p, m] = (0, B.useState)(null), [h, g] = (0, B.useState)(-1), _ = (0, B.useRef)(null), v = (0, B.useRef)(null), [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, B.useState)(/* @__PURE__ */ new Set()), [C, w] = (0, B.useState)(""), [T, E] = (0, B.useState)(0);
(0, B.useEffect)(() => {
let e = a.trim();
@@ -42347,18 +42093,18 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
return () => clearTimeout(t);
}, [a]);
let D = TS({
- queryKey: Ame(l),
- queryFn: ({ signal: e }) => Hme(l, e),
+ queryKey: Dme(l),
+ queryFn: ({ signal: e }) => zme(l, e),
enabled: l.length > 0 && d
}), O = (0, B.useMemo)(() => (D.data?.groups || []).flatMap((e) => e.items.map((t) => ({
value: t.value,
matched: t.matched || "",
n: t.n || 0,
group: e.label
- }))), [D.data]), { job: k, running: A, outcome: j, start: M, dismiss: N } = IM({
- queryKey: kme,
- queryFn: ({ signal: e }) => Vme(e),
- start: (e) => Ume([e]),
+ }))), [D.data]), { job: k, running: A, outcome: j, start: M, dismiss: N } = kM({
+ queryKey: Eme,
+ queryFn: ({ signal: e }) => Rme(e),
+ start: (e) => Bme([e]),
onStarted: () => S(/* @__PURE__ */ new Set()),
onError: (e) => w(W(e)),
onFinish: (e) => {
@@ -42392,14 +42138,14 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
}
}, ne = j?.results || [], re = ne.flatMap((e, t) => (e.candidates || []).filter((e) => !e.known && !y.has(e.provider_label || "")).map((e) => ({
candidate: e,
- key: cI(t, e)
+ key: aI(t, e)
})).filter((e) => !x.has(e.key))), ie = OS({
mutationFn: async (e) => {
let t = [], n = [];
E(0);
for (let r of e) {
try {
- let e = await Wme(r.candidate);
+ let e = await Vme(r.candidate);
n.push(e.source);
} catch (e) {
t.push(`${r.candidate.label}:${W(e)}`);
@@ -42407,7 +42153,7 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
E((e) => e + 1);
}
if (n.length) try {
- await dF(n);
+ await cF(n);
} catch (e) {
t.push(W(e));
}
@@ -42417,7 +42163,7 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
};
},
onSuccess: (e) => {
- if (xF(), e.failures.length) {
+ if (vF(), e.failures.length) {
w(e.failures.join(";"));
return;
}
@@ -42446,15 +42192,15 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
let t = e.relatedTarget;
!e.currentTarget.contains(t) && !v.current?.contains(t) && f(!1);
},
- children: [/* @__PURE__ */ (0, V.jsx)(vk, {
+ children: [/* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "来源链接、名字或 id",
- placeholder: Vhe,
+ placeholder: Rhe,
value: a,
- leadingIcon: ET,
+ leadingIcon: TT,
isDisabled: n,
onChange: o,
onKeyDown: te
- }), F ? /* @__PURE__ */ (0, V.jsx)(Ghe, {
+ }), F ? /* @__PURE__ */ (0, V.jsx)(Hhe, {
field: _,
menu: v,
options: O,
@@ -42464,7 +42210,7 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
onClose: I
}) : null]
}),
- /* @__PURE__ */ (0, V.jsx)(Khe, {
+ /* @__PURE__ */ (0, V.jsx)(Uhe, {
credentials: t,
hidden: y,
onHidden: b,
@@ -42482,9 +42228,9 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
/* @__PURE__ */ (0, V.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
- children: [A || M.isPending ? /* @__PURE__ */ (0, V.jsx)(MM, {
+ children: [A || M.isPending ? /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
- label: k?.message || (k?.total ? `查找中:${k.checked || 0}/${k.total}` : oe ? Hhe : Uhe),
+ label: k?.message || (k?.total ? `查找中:${k.checked || 0}/${k.total}` : oe ? zhe : Bhe),
value: k?.checked,
total: k?.total
}) : null, C ? /* @__PURE__ */ (0, V.jsx)(Y, {
@@ -42496,8 +42242,8 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
ne.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ik, { children: "查找结果" }),
- ne.map((e, t) => /* @__PURE__ */ (0, V.jsx)(qhe, {
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "查找结果" }),
+ ne.map((e, t) => /* @__PURE__ */ (0, V.jsx)(Whe, {
row: e,
at: t,
hidden: y,
@@ -42552,16 +42298,16 @@ function Jhe({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
}
//#endregion
//#region src/react/follow-manage/alias-manager.tsx
-var Yhe = (e) => `将移除别名「${e}」,对应来源恢复为独立创作者组。`, lI = (e) => e.alias;
-function Xhe(e, t, n) {
+var Khe = (e) => `将移除别名「${e}」,对应来源恢复为独立创作者组。`, oI = (e) => e.alias;
+function qhe(e, t, n) {
let r = n ? `name:${n}` : "", i = r ? e.find((e) => e.author_key === r) : e.find((e) => e.author_name === t || e.entity_name === t);
return i ? e.filter((e) => e.author_key === i.author_key) : [];
}
-function uI({ sources: e, name: t, canonicalKey: n }) {
+function sI({ sources: e, name: t, canonicalKey: n }) {
return /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(iI, {
- group: Xhe(e, t, n),
+ children: [/* @__PURE__ */ (0, V.jsx)(tI, {
+ group: qhe(e, t, n),
name: t
}), /* @__PURE__ */ (0, V.jsx)("b", {
className: "text-body-medium",
@@ -42569,15 +42315,15 @@ function uI({ sources: e, name: t, canonicalKey: n }) {
})]
});
}
-function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i }) {
+function Jhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i }) {
let [a, o] = (0, B.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), p = OS({
mutationFn: async (e) => {
let t = 0;
for (let n of e) {
try {
- await mF(n.canonical, n.alias);
+ await dF(n.canonical, n.alias);
} catch (n) {
- throw t && xF(), Error(`${W(n)}(还有 ${e.length - t} 组没有合并)`);
+ throw t && vF(), Error(`${W(n)}(还有 ${e.length - t} 组没有合并)`);
}
t += 1;
}
@@ -42587,19 +42333,19 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
};
},
onSuccess: (e) => {
- c(""), o(/* @__PURE__ */ new Set()), xF(), i(`已合并 ${e.done} 组创作者别名`);
+ c(""), o(/* @__PURE__ */ new Set()), vF(), i(`已合并 ${e.done} 组创作者别名`);
},
onError: (e) => c(W(e))
}), m = OS({
- mutationFn: (e) => mF(e.canonical, e.alias),
+ mutationFn: (e) => dF(e.canonical, e.alias),
onSuccess: () => {
- c(""), u(""), f(""), xF(), i("已保存创作者别名");
+ c(""), u(""), f(""), vF(), i("已保存创作者别名");
},
onError: (e) => c(W(e))
}), h = OS({
- mutationFn: (e) => Gme(e),
+ mutationFn: (e) => Hme(e),
onSuccess: () => {
- c(""), xF(), i("已移除创作者别名");
+ c(""), vF(), i("已移除创作者别名");
},
onError: (e) => c(W(e))
}), g = (e, t) => {
@@ -42609,7 +42355,7 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
confirmLabel: t ? "合并全部别名" : "合并所选别名",
onConfirm: () => p.mutateAsync(e)
});
- }, _ = t.filter((e) => a.has(lI(e))), v = t.length > 0 && _.length === t.length, y = X(p.isPending);
+ }, _ = t.filter((e) => a.has(oI(e))), v = t.length > 0 && _.length === t.length, y = X(p.isPending);
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: wE({
padding: "none",
@@ -42622,10 +42368,10 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
}),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: "手动添加别名" }), /* @__PURE__ */ (0, V.jsxs)("div", {
+ children: [/* @__PURE__ */ (0, V.jsx)(VE, { children: "手动添加别名" }), /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-end gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "规范创作者名",
placeholder: "规范创作者名",
value: l,
@@ -42633,7 +42379,7 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
isDisabled: r,
className: "w-56"
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "平台别名",
placeholder: "平台别名",
value: d,
@@ -42654,13 +42400,13 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
]
})]
}),
- s ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: s }) : null,
+ s ? /* @__PURE__ */ (0, V.jsx)(BE, { children: s }) : null,
t.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ik, { children: "待合并" }),
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "待合并" }),
/* @__PURE__ */ (0, V.jsx)("span", {
className: "mr-auto text-body-2-regular text-text-secondary",
children: `${t.length} 组`
@@ -42682,44 +42428,44 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
children: `全部合并(${t.length})`
})
]
- }), /* @__PURE__ */ (0, V.jsx)(UM, { children: /* @__PURE__ */ (0, V.jsxs)(VM, {
+ }), /* @__PURE__ */ (0, V.jsx)(IM, { children: /* @__PURE__ */ (0, V.jsxs)(PM, {
"aria-label": "待合并创作者别名",
size: "sm",
- children: [/* @__PURE__ */ (0, V.jsxs)(ZO, { children: [
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(Ik, { children: [
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "select",
- children: /* @__PURE__ */ (0, V.jsx)(BM, {
+ children: /* @__PURE__ */ (0, V.jsx)(NM, {
slot: null,
isSelected: v,
isIndeterminate: _.length > 0 && !v,
"aria-label": "全选待合并别名",
- onChange: (e) => o(e ? new Set(t.map(lI)) : /* @__PURE__ */ new Set())
+ onChange: (e) => o(e ? new Set(t.map(oI)) : /* @__PURE__ */ new Set())
})
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "canonical",
children: "规范创作者"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "alias",
isRowHeader: !0,
children: "平台别名"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "evidence",
children: "依据"
}),
- /* @__PURE__ */ (0, V.jsx)(QO, {
+ /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "actions",
children: "操作"
})
- ] }), /* @__PURE__ */ (0, V.jsx)(ek, { children: t.map((e) => {
- let t = lI(e);
- return /* @__PURE__ */ (0, V.jsxs)(rk, {
+ ] }), /* @__PURE__ */ (0, V.jsx)(zk, { children: t.map((e) => {
+ let t = oI(e);
+ return /* @__PURE__ */ (0, V.jsxs)(Hk, {
id: t,
"data-board-selected": a.has(t) || void 0,
children: [
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)(BM, {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)(NM, {
slot: null,
isSelected: a.has(t),
"aria-label": `选择别名 ${e.alias},归入 ${e.canonical}`,
@@ -42728,16 +42474,16 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
e ? n.add(t) : n.delete(t), o(n);
}
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)(uI, {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)(sI, {
sources: n,
name: e.canonical
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: e.alias }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)("span", {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: e.alias }),
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: e.evidence
}) }),
- /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
disabled: r,
@@ -42754,27 +42500,27 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
className: "flex flex-col gap-2",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: "已保存别名" }), /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [/* @__PURE__ */ (0, V.jsx)(VE, { children: "已保存别名" }), /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: `${e.length} 组`
})]
- }), e.length ? /* @__PURE__ */ (0, V.jsx)(UM, { children: /* @__PURE__ */ (0, V.jsxs)(VM, {
+ }), e.length ? /* @__PURE__ */ (0, V.jsx)(IM, { children: /* @__PURE__ */ (0, V.jsxs)(PM, {
"aria-label": "已保存创作者别名",
size: "sm",
- children: [/* @__PURE__ */ (0, V.jsxs)(ZO, { children: [/* @__PURE__ */ (0, V.jsx)(QO, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(Ik, { children: [/* @__PURE__ */ (0, V.jsx)(Lk, {
id: "canonical",
isRowHeader: !0,
children: "规范创作者"
- }), /* @__PURE__ */ (0, V.jsx)(QO, {
+ }), /* @__PURE__ */ (0, V.jsx)(Lk, {
id: "aliases",
children: "平台别名"
- })] }), /* @__PURE__ */ (0, V.jsx)(ek, { children: e.map((e) => /* @__PURE__ */ (0, V.jsxs)(rk, {
+ })] }), /* @__PURE__ */ (0, V.jsx)(zk, { children: e.map((e) => /* @__PURE__ */ (0, V.jsxs)(Hk, {
id: e.canonical_key,
- children: [/* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)(uI, {
+ children: [/* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)(sI, {
sources: n,
name: e.canonical_name,
canonicalKey: e.canonical_key
- }) }), /* @__PURE__ */ (0, V.jsx)(ak, { children: /* @__PURE__ */ (0, V.jsx)("span", {
+ }) }), /* @__PURE__ */ (0, V.jsx)(Wk, { children: /* @__PURE__ */ (0, V.jsx)("span", {
className: "flex flex-wrap items-center gap-1.5",
children: e.aliases.map((e) => /* @__PURE__ */ (0, V.jsxs)("span", {
className: "inline-flex items-center gap-1 rounded-md bg-background-secondary-default px-1.5 py-1 text-caption-1-medium text-text-secondary",
@@ -42788,7 +42534,7 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
...X(h.isPending),
onClick: () => void Te({
title: "移除创作者别名",
- body: Yhe(e.name),
+ body: Khe(e.name),
confirmLabel: "移除创作者别名",
onConfirm: () => h.mutateAsync(e.name)
})
@@ -42798,7 +42544,7 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
}, e.canonical_key)) })]
}) }) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: OT,
+ icon: DT,
title: "还没有保存创作者别名",
children: "填写规范创作者名和平台别名以添加。"
})]
@@ -42808,12 +42554,12 @@ function Zhe({ groups: e, suggestions: t, sources: n = [], readOnly: r, toast: i
}
//#endregion
//#region src/react/follow-manage/credentials.tsx
-var Qhe = "这些账号信息存在哪里", $he = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", ege = "将清除这个来源在本机和共享副本中的登录凭据。", tge = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
-function nge(e, t) {
+var Yhe = "这些账号信息存在哪里", Xhe = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", Zhe = "将清除这个来源在本机和共享副本中的登录凭据。", Qhe = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
+function $he(e, t) {
return (e.shared_fields || []).includes(t) ? "来自共享,留空表示不改" : e.fields.includes(t) ? "已保存,留空表示不改" : "未填写";
}
-function rge({ row: e }) {
- if (wF(e)) return /* @__PURE__ */ (0, V.jsx)(xE, {
+function ege({ row: e }) {
+ if (xF(e)) return /* @__PURE__ */ (0, V.jsx)(xE, {
variant: "caption",
color: "lime",
children: "已配置"
@@ -42822,19 +42568,19 @@ function rge({ row: e }) {
return /* @__PURE__ */ (0, V.jsx)(xE, {
variant: "caption",
color: t,
- children: nhe[e.requirement] || ""
+ children: $me[e.requirement] || ""
});
}
-function ige({ row: e, readOnly: t, toast: n }) {
- let [r, i] = (0, B.useState)({}), [a, o] = (0, B.useState)(""), s = wF(e), c = OS({
- mutationFn: (t) => Kme(e.provider, t),
+function tge({ row: e, readOnly: t, toast: n }) {
+ let [r, i] = (0, B.useState)({}), [a, o] = (0, B.useState)(""), s = xF(e), c = OS({
+ mutationFn: (t) => Ume(e.provider, t),
onSuccess: (e, t) => {
if (e.note) {
o(e.note);
return;
}
o(""), i({}), z.invalidateQueries({
- queryKey: GP,
+ queryKey: HP,
exact: !0
}), n(Object.keys(t).length ? "已保存来源凭据" : "已清除来源凭据");
},
@@ -42850,17 +42596,17 @@ function ige({ row: e, readOnly: t, toast: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, V.jsxs)(Pk, { children: [e.why, e.where ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [" ", /* @__PURE__ */ (0, V.jsx)(Lk, {
+ /* @__PURE__ */ (0, V.jsxs)(zE, { children: [e.why, e.where ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [" ", /* @__PURE__ */ (0, V.jsx)(HE, {
href: e.where,
children: "去取"
})] }) : null] }),
- e.howto ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: e.howto }) : null,
+ e.howto ? /* @__PURE__ */ (0, V.jsx)(zE, { children: e.howto }) : null,
/* @__PURE__ */ (0, V.jsx)("div", {
className: "flex w-full flex-col gap-3",
- children: (e.needs || []).map((n) => /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: (e.needs || []).map((n) => /* @__PURE__ */ (0, V.jsx)(GM, {
type: "password",
label: n,
- placeholder: nge(e, n),
+ placeholder: $he(e, n),
autoComplete: "off",
spellCheck: "false",
isDisabled: t,
@@ -42888,7 +42634,7 @@ function ige({ row: e, readOnly: t, toast: n }) {
...X(c.isPending),
onClick: () => void Te({
title: "清除来源凭据",
- body: ege,
+ body: Zhe,
confirmLabel: "清除来源凭据",
danger: !0,
onConfirm: () => c.mutateAsync({})
@@ -42896,9 +42642,9 @@ function ige({ row: e, readOnly: t, toast: n }) {
children: "清除"
}) : null]
}),
- a ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: a }) : null,
- (e.shared_fields || []).length ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: `${e.shared_fields.join("、")} 是从共享副本回填的,本机没有单独存。清除会把两边一起删。` }) : null,
- e.path ? /* @__PURE__ */ (0, V.jsx)(jM, {
+ a ? /* @__PURE__ */ (0, V.jsx)(BE, { children: a }) : null,
+ (e.shared_fields || []).length ? /* @__PURE__ */ (0, V.jsx)(zE, { children: `${e.shared_fields.join("、")} 是从共享副本回填的,本机没有单独存。清除会把两边一起删。` }) : null,
+ e.path ? /* @__PURE__ */ (0, V.jsx)(xM, {
path: e.path,
className: "font-mono text-caption-1-regular text-text-tertiary",
onRevealed: n
@@ -42906,24 +42652,24 @@ function ige({ row: e, readOnly: t, toast: n }) {
e.world_readable ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "凭据文件权限过宽",
- children: tge
+ children: Qhe
}) : null
]
});
}
-function age({ row: e, readOnly: t, toast: n }) {
+function nge({ row: e, readOnly: t, toast: n }) {
let r = /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-2",
children: [
/* @__PURE__ */ (0, V.jsx)("span", {
className: "inline-flex size-3.5 shrink-0 items-center justify-center",
- children: /* @__PURE__ */ (0, V.jsx)(rI, { provider: e.provider })
+ children: /* @__PURE__ */ (0, V.jsx)(eI, { provider: e.provider })
}),
/* @__PURE__ */ (0, V.jsx)("b", {
className: "text-body-medium text-text-primary",
children: e.provider_label
}),
- /* @__PURE__ */ (0, V.jsx)(rge, { row: e }),
+ /* @__PURE__ */ (0, V.jsx)(ege, { row: e }),
e.missing.length ? /* @__PURE__ */ (0, V.jsx)(xE, {
variant: "caption",
color: "rose",
@@ -42933,13 +42679,13 @@ function age({ row: e, readOnly: t, toast: n }) {
});
return e.requirement === "none" || e.requirement === "blocked" ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-3 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4",
- children: [r, e.requirement === "blocked" ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: e.why }) : null]
+ children: [r, e.requirement === "blocked" ? /* @__PURE__ */ (0, V.jsx)(zE, { children: e.why }) : null]
}) : /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4",
- children: [r, /* @__PURE__ */ (0, V.jsx)(Bk, {
- summary: wF(e) ? "修改凭据" : "填写凭据",
- defaultOpen: e.requirement === "required" && !wF(e),
- children: /* @__PURE__ */ (0, V.jsx)(ige, {
+ children: [r, /* @__PURE__ */ (0, V.jsx)(GE, {
+ summary: xF(e) ? "修改凭据" : "填写凭据",
+ defaultOpen: e.requirement === "required" && !xF(e),
+ children: /* @__PURE__ */ (0, V.jsx)(tge, {
row: e,
readOnly: t,
toast: n
@@ -42947,8 +42693,8 @@ function age({ row: e, readOnly: t, toast: n }) {
})]
});
}
-function oge({ data: e, readOnly: t, toast: n }) {
- let r = e.providers || [], i = r.filter((e) => e.requirement === "required" && !wF(e));
+function rge({ data: e, readOnly: t, toast: n }) {
+ let r = e.providers || [], i = r.filter((e) => e.requirement === "required" && !xF(e));
return r.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: wE({
padding: "none",
@@ -42990,7 +42736,7 @@ function oge({ data: e, readOnly: t, toast: n }) {
padding: "none",
className: "flex flex-col overflow-hidden"
}),
- children: e.rows.map((e) => /* @__PURE__ */ (0, V.jsx)(age, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, V.jsx)(nge, {
row: e,
readOnly: t,
toast: n
@@ -43002,13 +42748,13 @@ function oge({ data: e, readOnly: t, toast: n }) {
children: [
/* @__PURE__ */ (0, V.jsx)("b", {
className: "text-body-medium text-text-primary",
- children: Qhe
+ children: Yhe
}),
/* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
- children: $he
+ children: Xhe
}),
- /* @__PURE__ */ (0, V.jsx)(jM, {
+ /* @__PURE__ */ (0, V.jsx)(xM, {
path: e.root,
prefix: "凭据文件在 ",
className: "text-body-2-regular text-text-secondary",
@@ -43019,14 +42765,14 @@ function oge({ data: e, readOnly: t, toast: n }) {
]
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: fae,
+ icon: pae,
title: "没有可配置的来源",
children: "已接入的站点及其凭据状态会显示在这里。"
});
}
//#endregion
//#region node_modules/@tanstack/table-core/build/lib/index.mjs
-function dI() {
+function cI() {
return {
accessor: (e, t) => typeof e == "function" ? {
...t,
@@ -43039,24 +42785,24 @@ function dI() {
group: (e) => e
};
}
-function fI(e, t) {
+function lI(e, t) {
return typeof e == "function" ? e(t) : e;
}
-function pI(e, t) {
+function uI(e, t) {
return (n) => {
t.setState((t) => ({
...t,
- [e]: fI(n, t[e])
+ [e]: lI(n, t[e])
}));
};
}
-function mI(e) {
+function dI(e) {
return e instanceof Function;
}
-function sge(e) {
+function ige(e) {
return Array.isArray(e) && e.every((e) => typeof e == "number");
}
-function cge(e, t) {
+function age(e, t) {
let n = [], r = (e) => {
e.forEach((e) => {
n.push(e);
@@ -43066,7 +42812,7 @@ function cge(e, t) {
};
return r(e), n;
}
-function hI(e, t, n) {
+function fI(e, t, n) {
let r = [], i;
return (a) => {
let o;
@@ -43088,21 +42834,21 @@ function hI(e, t, n) {
return i;
};
}
-function gI(e, t, n, r) {
+function pI(e, t, n, r) {
return {
debug: () => e?.debugAll ?? e[t],
key: !1,
onChange: r
};
}
-function lge(e, t, n, r) {
+function oge(e, t, n, r) {
let i = {
id: `${t.id}_${n.id}`,
row: t,
column: n,
getValue: () => t.getValue(r),
renderValue: () => i.getValue() ?? e.options.renderFallbackValue,
- getContext: hI(() => [
+ getContext: fI(() => [
e,
n,
t,
@@ -43114,13 +42860,13 @@ function lge(e, t, n, r) {
cell: r,
getValue: r.getValue,
renderValue: r.renderValue
- }), gI(e.options, "debugCells", "cell.getContext"))
+ }), pI(e.options, "debugCells", "cell.getContext"))
};
return e._features.forEach((r) => {
r.createCell == null || r.createCell(i, n, t, e);
}, {}), i;
}
-function uge(e, t, n, r) {
+function sge(e, t, n, r) {
let i = {
...e._getDefaultColumnDef(),
...t
@@ -43137,17 +42883,17 @@ function uge(e, t, n, r) {
depth: n,
columnDef: i,
columns: [],
- getFlatColumns: hI(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], gI(e.options, "debugColumns", "column.getFlatColumns")),
- getLeafColumns: hI(() => [e._getOrderColumnsFn()], (e) => {
+ getFlatColumns: fI(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], pI(e.options, "debugColumns", "column.getFlatColumns")),
+ getLeafColumns: fI(() => [e._getOrderColumnsFn()], (e) => {
var t;
return (t = c.columns) != null && t.length ? e(c.columns.flatMap((e) => e.getLeafColumns())) : [c];
- }, gI(e.options, "debugColumns", "column.getLeafColumns"))
+ }, pI(e.options, "debugColumns", "column.getLeafColumns"))
};
for (let t of e._features) t.createColumn == null || t.createColumn(c, e);
return c;
}
-var _I = "debugHeaders";
-function vI(e, t, n) {
+var mI = "debugHeaders";
+function hI(e, t, n) {
let r = {
id: n.id ?? t.id,
column: t,
@@ -43175,42 +42921,42 @@ function vI(e, t, n) {
t.createHeader == null || t.createHeader(r, e);
}), r;
}
-var dge = { createTable: (e) => {
- e.getHeaderGroups = hI(() => [
+var cge = { createTable: (e) => {
+ e.getHeaderGroups = fI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
], (t, n, r, i) => {
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
- return yI(t, [
+ return gI(t, [
...a,
...s,
...o
], e);
- }, gI(e.options, _I, "getHeaderGroups")), e.getCenterHeaderGroups = hI(() => [
+ }, pI(e.options, mI, "getHeaderGroups")), e.getCenterHeaderGroups = fI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
- ], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), yI(t, n, e, "center")), gI(e.options, _I, "getCenterHeaderGroups")), e.getLeftHeaderGroups = hI(() => [
+ ], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), gI(t, n, e, "center")), pI(e.options, mI, "getCenterHeaderGroups")), e.getLeftHeaderGroups = fI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left
- ], (t, n, r) => yI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), gI(e.options, _I, "getLeftHeaderGroups")), e.getRightHeaderGroups = hI(() => [
+ ], (t, n, r) => gI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), pI(e.options, mI, "getLeftHeaderGroups")), e.getRightHeaderGroups = fI(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.right
- ], (t, n, r) => yI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), gI(e.options, _I, "getRightHeaderGroups")), e.getFooterGroups = hI(() => [e.getHeaderGroups()], (e) => [...e].reverse(), gI(e.options, _I, "getFooterGroups")), e.getLeftFooterGroups = hI(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), gI(e.options, _I, "getLeftFooterGroups")), e.getCenterFooterGroups = hI(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), gI(e.options, _I, "getCenterFooterGroups")), e.getRightFooterGroups = hI(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), gI(e.options, _I, "getRightFooterGroups")), e.getFlatHeaders = hI(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), gI(e.options, _I, "getFlatHeaders")), e.getLeftFlatHeaders = hI(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), gI(e.options, _I, "getLeftFlatHeaders")), e.getCenterFlatHeaders = hI(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), gI(e.options, _I, "getCenterFlatHeaders")), e.getRightFlatHeaders = hI(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), gI(e.options, _I, "getRightFlatHeaders")), e.getCenterLeafHeaders = hI(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
+ ], (t, n, r) => gI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), pI(e.options, mI, "getRightHeaderGroups")), e.getFooterGroups = fI(() => [e.getHeaderGroups()], (e) => [...e].reverse(), pI(e.options, mI, "getFooterGroups")), e.getLeftFooterGroups = fI(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), pI(e.options, mI, "getLeftFooterGroups")), e.getCenterFooterGroups = fI(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), pI(e.options, mI, "getCenterFooterGroups")), e.getRightFooterGroups = fI(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), pI(e.options, mI, "getRightFooterGroups")), e.getFlatHeaders = fI(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), pI(e.options, mI, "getFlatHeaders")), e.getLeftFlatHeaders = fI(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), pI(e.options, mI, "getLeftFlatHeaders")), e.getCenterFlatHeaders = fI(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), pI(e.options, mI, "getCenterFlatHeaders")), e.getRightFlatHeaders = fI(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), pI(e.options, mI, "getRightFlatHeaders")), e.getCenterLeafHeaders = fI(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), gI(e.options, _I, "getCenterLeafHeaders")), e.getLeftLeafHeaders = hI(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
+ }), pI(e.options, mI, "getCenterLeafHeaders")), e.getLeftLeafHeaders = fI(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), gI(e.options, _I, "getLeftLeafHeaders")), e.getRightLeafHeaders = hI(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
+ }), pI(e.options, mI, "getLeftLeafHeaders")), e.getRightLeafHeaders = fI(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), gI(e.options, _I, "getRightLeafHeaders")), e.getLeafHeaders = hI(() => [
+ }), pI(e.options, mI, "getRightLeafHeaders")), e.getLeafHeaders = fI(() => [
e.getLeftHeaderGroups(),
e.getCenterHeaderGroups(),
e.getRightHeaderGroups()
@@ -43218,9 +42964,9 @@ var dge = { createTable: (e) => {
...e[0]?.headers ?? [],
...t[0]?.headers ?? [],
...n[0]?.headers ?? []
- ].map((e) => e.getLeafHeaders()).flat(), gI(e.options, _I, "getLeafHeaders"));
+ ].map((e) => e.getLeafHeaders()).flat(), pI(e.options, mI, "getLeafHeaders"));
} };
-function yI(e, t, n, r) {
+function gI(e, t, n, r) {
let i = 0, a = function(e, t) {
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
var n;
@@ -43238,7 +42984,7 @@ function yI(e, t, n, r) {
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
else {
- let i = vI(n, c, {
+ let i = hI(n, c, {
id: [
r,
t,
@@ -43255,7 +43001,7 @@ function yI(e, t, n, r) {
i.headers.push(e), e.headerGroup = i;
}), o.push(i), t > 0 && s(a, t - 1);
};
- s(t.map((e, t) => vI(n, e, {
+ s(t.map((e, t) => hI(n, e, {
depth: i,
index: t
})), i - 1), o.reverse();
@@ -43273,7 +43019,7 @@ function yI(e, t, n, r) {
});
return c(o[0]?.headers ?? []), o;
}
-var fge = (e, t, n, r, i, a, o) => {
+var lge = (e, t, n, r, i, a, o) => {
let s = {
id: t,
index: r,
@@ -43294,7 +43040,7 @@ var fge = (e, t, n, r, i, a, o) => {
},
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
subRows: a ?? [],
- getLeafRows: () => cge(s.subRows, (e) => e.subRows),
+ getLeafRows: () => age(s.subRows, (e) => e.subRows),
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
getParentRows: () => {
let e = [], t = s;
@@ -43305,95 +43051,95 @@ var fge = (e, t, n, r, i, a, o) => {
}
return e.reverse();
},
- getAllCells: hI(() => [e.getAllLeafColumns()], (t) => t.map((t) => lge(e, s, t, t.id)), gI(e.options, "debugRows", "getAllCells")),
- _getAllCellsByColumnId: hI(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), gI(e.options, "debugRows", "getAllCellsByColumnId"))
+ getAllCells: fI(() => [e.getAllLeafColumns()], (t) => t.map((t) => oge(e, s, t, t.id)), pI(e.options, "debugRows", "getAllCells")),
+ _getAllCellsByColumnId: fI(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), pI(e.options, "debugRows", "getAllCellsByColumnId"))
};
for (let t = 0; t < e._features.length; t++) {
let n = e._features[t];
n == null || n.createRow == null || n.createRow(s, e);
}
return s;
-}, pge = { createColumn: (e, t) => {
+}, uge = { createColumn: (e, t) => {
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
};
-} }, bI = (e, t, n) => {
+} }, _I = (e, t, n) => {
var r, i;
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
return !!((i = e.getValue(t)) != null && (i = i.toString()) != null && (i = i.toLowerCase()) != null && i.includes(a));
};
-bI.autoRemove = (e) => AI(e);
-var xI = (e, t, n) => {
+_I.autoRemove = (e) => DI(e);
+var vI = (e, t, n) => {
var r;
return !!((r = e.getValue(t)) != null && (r = r.toString()) != null && r.includes(n));
};
-xI.autoRemove = (e) => AI(e);
-var SI = (e, t, n) => {
+vI.autoRemove = (e) => DI(e);
+var yI = (e, t, n) => {
var r;
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
};
-SI.autoRemove = (e) => AI(e);
-var CI = (e, t, n) => e.getValue(t)?.includes(n);
-CI.autoRemove = (e) => AI(e);
-var wI = (e, t, n) => !n.some((n) => {
+yI.autoRemove = (e) => DI(e);
+var bI = (e, t, n) => e.getValue(t)?.includes(n);
+bI.autoRemove = (e) => DI(e);
+var xI = (e, t, n) => !n.some((n) => {
var r;
return !((r = e.getValue(t)) != null && r.includes(n));
});
-wI.autoRemove = (e) => AI(e) || !(e != null && e.length);
-var TI = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
-TI.autoRemove = (e) => AI(e) || !(e != null && e.length);
-var EI = (e, t, n) => e.getValue(t) === n;
-EI.autoRemove = (e) => AI(e);
-var DI = (e, t, n) => e.getValue(t) == n;
-DI.autoRemove = (e) => AI(e);
-var OI = (e, t, n) => {
+xI.autoRemove = (e) => DI(e) || !(e != null && e.length);
+var SI = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
+SI.autoRemove = (e) => DI(e) || !(e != null && e.length);
+var CI = (e, t, n) => e.getValue(t) === n;
+CI.autoRemove = (e) => DI(e);
+var wI = (e, t, n) => e.getValue(t) == n;
+wI.autoRemove = (e) => DI(e);
+var TI = (e, t, n) => {
let [r, i] = n, a = e.getValue(t);
return a >= r && a <= i;
};
-OI.resolveFilterValue = (e) => {
+TI.resolveFilterValue = (e) => {
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
if (a > o) {
let e = a;
a = o, o = e;
}
return [a, o];
-}, OI.autoRemove = (e) => AI(e) || AI(e[0]) && AI(e[1]);
-var kI = {
- includesString: bI,
- includesStringSensitive: xI,
- equalsString: SI,
- arrIncludes: CI,
- arrIncludesAll: wI,
- arrIncludesSome: TI,
- equals: EI,
- weakEquals: DI,
- inNumberRange: OI
+}, TI.autoRemove = (e) => DI(e) || DI(e[0]) && DI(e[1]);
+var EI = {
+ includesString: _I,
+ includesStringSensitive: vI,
+ equalsString: yI,
+ arrIncludes: bI,
+ arrIncludesAll: xI,
+ arrIncludesSome: SI,
+ equals: CI,
+ weakEquals: wI,
+ inNumberRange: TI
};
-function AI(e) {
+function DI(e) {
return e == null || e === "";
}
-var mge = {
+var dge = {
getDefaultColumnDef: () => ({ filterFn: "auto" }),
getInitialState: (e) => ({
columnFilters: [],
...e
}),
getDefaultOptions: (e) => ({
- onColumnFiltersChange: pI("columnFilters", e),
+ onColumnFiltersChange: uI("columnFilters", e),
filterFromLeafRows: !1,
maxLeafRowFilterDepth: 100
}),
createColumn: (e, t) => {
e.getAutoFilterFn = () => {
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
- return typeof n == "string" ? kI.includesString : typeof n == "number" ? kI.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? kI.equals : Array.isArray(n) ? kI.arrIncludes : kI.weakEquals;
- }, e.getFilterFn = () => mI(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? kI[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
+ return typeof n == "string" ? EI.includesString : typeof n == "number" ? EI.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? EI.equals : Array.isArray(n) ? EI.arrIncludes : EI.weakEquals;
+ }, e.getFilterFn = () => dI(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? EI[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
var n;
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
t.setColumnFilters((t) => {
- let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = fI(n, i ? i.value : void 0);
- if (jI(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
+ let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = lI(n, i ? i.value : void 0);
+ if (OI(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
let o = {
id: e.id,
value: a
@@ -43408,19 +43154,19 @@ var mge = {
createTable: (e) => {
e.setColumnFilters = (t) => {
let n = e.getAllLeafColumns();
- e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => fI(t, e)?.filter((e) => {
+ e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => lI(t, e)?.filter((e) => {
let t = n.find((t) => t.id === e.id);
- return !(t && jI(t.getFilterFn(), e.value, t));
+ return !(t && OI(t.getFilterFn(), e.value, t));
}));
}, e.resetColumnFilters = (t) => {
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
}
};
-function jI(e, t, n) {
+function OI(e, t, n) {
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
}
-var MI = {
+var kI = {
sum: (e, t, n) => n.reduce((t, n) => {
let r = n.getValue(e);
return t + (typeof r == "number" ? r : 0);
@@ -43456,7 +43202,7 @@ var MI = {
median: (e, t) => {
if (!t.length) return;
let n = t.map((t) => t.getValue(e));
- if (!sge(n)) return;
+ if (!ige(n)) return;
if (n.length === 1) return n[0];
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
@@ -43464,7 +43210,7 @@ var MI = {
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
count: (e, t) => t.length
-}, hge = {
+}, fge = {
getDefaultColumnDef: () => ({
aggregatedCell: (e) => {
var t;
@@ -43477,7 +43223,7 @@ var MI = {
...e
}),
getDefaultOptions: (e) => ({
- onGroupingChange: pI("grouping", e),
+ onGroupingChange: uI("grouping", e),
groupedColumnMode: "reorder"
}),
createColumn: (e, t) => {
@@ -43490,11 +43236,11 @@ var MI = {
};
}, e.getAutoAggregationFn = () => {
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
- if (typeof n == "number") return MI.sum;
- if (Object.prototype.toString.call(n) === "[object Date]") return MI.extent;
+ if (typeof n == "number") return kI.sum;
+ if (Object.prototype.toString.call(n) === "[object Date]") return kI.extent;
}, e.getAggregationFn = () => {
if (!e) throw Error();
- return mI(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? MI[e.columnDef.aggregationFn];
+ return dI(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? kI[e.columnDef.aggregationFn];
};
},
createTable: (e) => {
@@ -43516,27 +43262,27 @@ var MI = {
};
}
};
-function gge(e, t, n) {
+function pge(e, t, n) {
if (!(t != null && t.length) || !n) return e;
let r = e.filter((e) => !t.includes(e.id));
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
}
-var _ge = {
+var mge = {
getInitialState: (e) => ({
columnOrder: [],
...e
}),
- getDefaultOptions: (e) => ({ onColumnOrderChange: pI("columnOrder", e) }),
+ getDefaultOptions: (e) => ({ onColumnOrderChange: uI("columnOrder", e) }),
createColumn: (e, t) => {
- e.getIndex = hI((e) => [RI(t, e)], (t) => t.findIndex((t) => t.id === e.id), gI(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => RI(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
- let r = RI(t, n);
+ e.getIndex = fI((e) => [FI(t, e)], (t) => t.findIndex((t) => t.id === e.id), pI(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => FI(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
+ let r = FI(t, n);
return r[r.length - 1]?.id === e.id;
};
},
createTable: (e) => {
e.setColumnOrder = (t) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(t), e.resetColumnOrder = (t) => {
e.setColumnOrder(t ? [] : e.initialState.columnOrder ?? []);
- }, e._getOrderColumnsFn = hI(() => [
+ }, e._getOrderColumnsFn = fI(() => [
e.getState().columnOrder,
e.getState().grouping,
e.options.groupedColumnMode
@@ -43551,18 +43297,18 @@ var _ge = {
}
i = [...i, ...n];
}
- return gge(i, t, n);
- }, gI(e.options, "debugTable", "_getOrderColumnsFn"));
+ return pge(i, t, n);
+ }, pI(e.options, "debugTable", "_getOrderColumnsFn"));
}
-}, NI = () => ({
+}, AI = () => ({
left: [],
right: []
-}), vge = {
+}), hge = {
getInitialState: (e) => ({
- columnPinning: NI(),
+ columnPinning: AI(),
...e
}),
- getDefaultOptions: (e) => ({ onColumnPinningChange: pI("columnPinning", e) }),
+ getDefaultOptions: (e) => ({ onColumnPinningChange: uI("columnPinning", e) }),
createColumn: (e, t) => {
e.pin = (n) => {
let r = e.getLeafColumns().map((e) => e.id).filter(Boolean);
@@ -43586,75 +43332,75 @@ var _ge = {
};
},
createRow: (e, t) => {
- e.getCenterVisibleCells = hI(() => [
+ e.getCenterVisibleCells = fI(() => [
e._getAllVisibleCells(),
t.getState().columnPinning.left,
t.getState().columnPinning.right
], (e, t, n) => {
let r = [...t ?? [], ...n ?? []];
return e.filter((e) => !r.includes(e.column.id));
- }, gI(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = hI(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
+ }, pI(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = fI(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
...e,
position: "left"
- })), gI(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = hI(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
+ })), pI(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = fI(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
...e,
position: "right"
- })), gI(t.options, "debugRows", "getRightVisibleCells"));
+ })), pI(t.options, "debugRows", "getRightVisibleCells"));
},
createTable: (e) => {
- e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? NI() : e.initialState?.columnPinning ?? NI()), e.getIsSomeColumnsPinned = (t) => {
+ e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? AI() : e.initialState?.columnPinning ?? AI()), e.getIsSomeColumnsPinned = (t) => {
let n = e.getState().columnPinning;
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
- }, e.getLeftLeafColumns = hI(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), gI(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = hI(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), gI(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = hI(() => [
+ }, e.getLeftLeafColumns = fI(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), pI(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = fI(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), pI(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = fI(() => [
e.getAllLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
], (e, t, n) => {
let r = [...t ?? [], ...n ?? []];
return e.filter((e) => !r.includes(e.id));
- }, gI(e.options, "debugColumns", "getCenterLeafColumns"));
+ }, pI(e.options, "debugColumns", "getCenterLeafColumns"));
}
};
-function yge(e) {
+function gge(e) {
return e || (typeof document < "u" ? document : null);
}
-var PI = {
+var jI = {
size: 150,
minSize: 20,
maxSize: 2 ** 53 - 1
-}, FI = () => ({
+}, MI = () => ({
startOffset: null,
startSize: null,
deltaOffset: null,
deltaPercentage: null,
isResizingColumn: !1,
columnSizingStart: []
-}), bge = {
- getDefaultColumnDef: () => PI,
+}), _ge = {
+ getDefaultColumnDef: () => jI,
getInitialState: (e) => ({
columnSizing: {},
- columnSizingInfo: FI(),
+ columnSizingInfo: MI(),
...e
}),
getDefaultOptions: (e) => ({
columnResizeMode: "onEnd",
columnResizeDirection: "ltr",
- onColumnSizingChange: pI("columnSizing", e),
- onColumnSizingInfoChange: pI("columnSizingInfo", e)
+ onColumnSizingChange: uI("columnSizing", e),
+ onColumnSizingInfoChange: uI("columnSizingInfo", e)
}),
createColumn: (e, t) => {
e.getSize = () => {
let n = t.getState().columnSizing[e.id];
- return Math.min(Math.max(e.columnDef.minSize ?? PI.minSize, n ?? e.columnDef.size ?? PI.size), e.columnDef.maxSize ?? PI.maxSize);
- }, e.getStart = hI((e) => [
+ return Math.min(Math.max(e.columnDef.minSize ?? jI.minSize, n ?? e.columnDef.size ?? jI.size), e.columnDef.maxSize ?? jI.maxSize);
+ }, e.getStart = fI((e) => [
e,
- RI(t, e),
+ FI(t, e),
t.getState().columnSizing
- ], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), gI(t.options, "debugColumns", "getStart")), e.getAfter = hI((e) => [
+ ], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), pI(t.options, "debugColumns", "getStart")), e.getAfter = fI((e) => [
e,
- RI(t, e),
+ FI(t, e),
t.getState().columnSizing
- ], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), gI(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
+ ], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), pI(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
t.setColumnSizing((t) => {
let { [e.id]: n, ...r } = t;
return r;
@@ -43676,8 +43422,8 @@ var PI = {
}, e.getResizeHandler = (n) => {
let r = t.getColumn(e.column.id), i = r?.getCanResize();
return (a) => {
- if (!r || !i || (a.persist == null || a.persist(), LI(a) && a.touches && a.touches.length > 1)) return;
- let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = LI(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
+ if (!r || !i || (a.persist == null || a.persist(), PI(a) && a.touches && a.touches.length > 1)) return;
+ let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = PI(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
typeof n == "number" && (t.setColumnSizingInfo((e) => {
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
return e.columnSizingStart.forEach((e) => {
@@ -43702,7 +43448,7 @@ var PI = {
deltaPercentage: null,
columnSizingStart: []
}));
- }, p = yge(n), m = {
+ }, p = gge(n), m = {
moveHandler: (e) => d(e.clientX),
upHandler: (e) => {
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
@@ -43712,8 +43458,8 @@ var PI = {
upHandler: (e) => {
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
}
- }, g = xge() ? { passive: !1 } : !1;
- LI(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
+ }, g = vge() ? { passive: !1 } : !1;
+ PI(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
...e,
startOffset: c,
startSize: o,
@@ -43729,12 +43475,12 @@ var PI = {
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
}, e.resetHeaderSizeInfo = (t) => {
- e.setColumnSizingInfo(t ? FI() : e.initialState.columnSizingInfo ?? FI());
+ e.setColumnSizingInfo(t ? MI() : e.initialState.columnSizingInfo ?? MI());
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
}
-}, II = null;
-function xge() {
- if (typeof II == "boolean") return II;
+}, NI = null;
+function vge() {
+ if (typeof NI == "boolean") return NI;
let e = !1;
try {
let t = { get passive() {
@@ -43744,17 +43490,17 @@ function xge() {
} catch {
e = !1;
}
- return II = e, II;
+ return NI = e, NI;
}
-function LI(e) {
+function PI(e) {
return e.type === "touchstart";
}
-var Sge = {
+var yge = {
getInitialState: (e) => ({
columnVisibility: {},
...e
}),
- getDefaultOptions: (e) => ({ onColumnVisibilityChange: pI("columnVisibility", e) }),
+ getDefaultOptions: (e) => ({ onColumnVisibilityChange: uI("columnVisibility", e) }),
createColumn: (e, t) => {
e.toggleVisibility = (n) => {
e.getCanHide() && t.setColumnVisibility((t) => ({
@@ -43769,7 +43515,7 @@ var Sge = {
};
},
createRow: (e, t) => {
- e._getAllVisibleCells = hI(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), gI(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = hI(() => [
+ e._getAllVisibleCells = fI(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), pI(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = fI(() => [
e.getLeftVisibleCells(),
e.getCenterVisibleCells(),
e.getRightVisibleCells()
@@ -43777,10 +43523,10 @@ var Sge = {
...e,
...t,
...n
- ], gI(t.options, "debugRows", "getVisibleCells"));
+ ], pI(t.options, "debugRows", "getVisibleCells"));
},
createTable: (e) => {
- let t = (t, n) => hI(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), gI(e.options, "debugColumns", t));
+ let t = (t, n) => fI(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), pI(e.options, "debugColumns", t));
e.getVisibleFlatColumns = t("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = t("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = t("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = t("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = t("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
e.setColumnVisibility(t ? {} : e.initialState.columnVisibility ?? {});
}, e.toggleAllColumnsVisible = (t) => {
@@ -43793,20 +43539,20 @@ var Sge = {
};
}
};
-function RI(e, t) {
+function FI(e, t) {
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
}
-var Cge = { createTable: (e) => {
+var bge = { createTable: (e) => {
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
};
-} }, wge = {
+} }, xge = {
getInitialState: (e) => ({
globalFilter: void 0,
...e
}),
getDefaultOptions: (e) => ({
- onGlobalFilterChange: pI("globalFilter", e),
+ onGlobalFilterChange: uI("globalFilter", e),
globalFilterFn: "auto",
getColumnCanGlobalFilter: (t) => {
var n;
@@ -43818,22 +43564,22 @@ var Cge = { createTable: (e) => {
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
},
createTable: (e) => {
- e.getGlobalAutoFilterFn = () => kI.includesString, e.getGlobalFilterFn = () => {
+ e.getGlobalAutoFilterFn = () => EI.includesString, e.getGlobalFilterFn = () => {
let { globalFilterFn: t } = e.options;
- return mI(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? kI[t];
+ return dI(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? EI[t];
}, e.setGlobalFilter = (t) => {
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
}, e.resetGlobalFilter = (t) => {
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
};
}
-}, Tge = {
+}, Sge = {
getInitialState: (e) => ({
expanded: {},
...e
}),
getDefaultOptions: (e) => ({
- onExpandedChange: pI("expanded", e),
+ onExpandedChange: uI("expanded", e),
paginateExpandedRows: !0
}),
createTable: (e) => {
@@ -43904,18 +43650,18 @@ var Cge = { createTable: (e) => {
};
};
}
-}, zI = 0, BI = 10, VI = () => ({
- pageIndex: zI,
- pageSize: BI
-}), Ege = {
+}, II = 0, LI = 10, RI = () => ({
+ pageIndex: II,
+ pageSize: LI
+}), Cge = {
getInitialState: (e) => ({
...e,
pagination: {
- ...VI(),
+ ...RI(),
...e?.pagination
}
}),
- getDefaultOptions: (e) => ({ onPaginationChange: pI("pagination", e) }),
+ getDefaultOptions: (e) => ({ onPaginationChange: uI("pagination", e) }),
createTable: (e) => {
let t = !1, n = !1;
e._autoResetPageIndex = () => {
@@ -43931,11 +43677,11 @@ var Cge = { createTable: (e) => {
e.resetPageIndex(), n = !1;
});
}
- }, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => fI(t, e)), e.resetPagination = (t) => {
- e.setPagination(t ? VI() : e.initialState.pagination ?? VI());
+ }, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => lI(t, e)), e.resetPagination = (t) => {
+ e.setPagination(t ? RI() : e.initialState.pagination ?? RI());
}, e.setPageIndex = (t) => {
e.setPagination((n) => {
- let r = fI(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
+ let r = lI(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
return r = Math.max(0, Math.min(r, i)), {
...n,
pageIndex: r
@@ -43943,13 +43689,13 @@ var Cge = { createTable: (e) => {
});
}, e.resetPageIndex = (t) => {
var n;
- e.setPageIndex(t ? zI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? zI);
+ e.setPageIndex(t ? II : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? II);
}, e.resetPageSize = (t) => {
var n;
- e.setPageSize(t ? BI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? BI);
+ e.setPageSize(t ? LI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? LI);
}, e.setPageSize = (t) => {
e.setPagination((e) => {
- let n = Math.max(1, fI(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
+ let n = Math.max(1, lI(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
return {
...e,
pageIndex: i,
@@ -43957,28 +43703,28 @@ var Cge = { createTable: (e) => {
};
});
}, e.setPageCount = (t) => e.setPagination((n) => {
- let r = fI(t, e.options.pageCount ?? -1);
+ let r = lI(t, e.options.pageCount ?? -1);
return typeof r == "number" && (r = Math.max(-1, r)), {
...n,
pageCount: r
};
- }), e.getPageOptions = hI(() => [e.getPageCount()], (e) => {
+ }), e.getPageOptions = fI(() => [e.getPageCount()], (e) => {
let t = [];
return e && e > 0 && (t = [...Array(e)].fill(null).map((e, t) => t)), t;
- }, gI(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
+ }, pI(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
let { pageIndex: t } = e.getState().pagination, n = e.getPageCount();
return n === -1 || n !== 0 && t < n - 1;
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
}
-}, HI = () => ({
+}, zI = () => ({
top: [],
bottom: []
-}), Dge = {
+}), wge = {
getInitialState: (e) => ({
- rowPinning: HI(),
+ rowPinning: zI(),
...e
}),
- getDefaultOptions: (e) => ({ onRowPinningChange: pI("rowPinning", e) }),
+ getDefaultOptions: (e) => ({ onRowPinningChange: uI("rowPinning", e) }),
createRow: (e, t) => {
e.pin = (n, r, i) => {
let a = r ? e.getLeafRows().map((e) => {
@@ -44017,7 +43763,7 @@ var Cge = { createTable: (e) => {
};
},
createTable: (e) => {
- e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? HI() : e.initialState?.rowPinning ?? HI()), e.getIsSomeRowsPinned = (t) => {
+ e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? zI() : e.initialState?.rowPinning ?? zI()), e.getIsSomeRowsPinned = (t) => {
let n = e.getState().rowPinning;
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
@@ -44026,22 +43772,22 @@ var Cge = { createTable: (e) => {
}) : (n ?? []).map((e) => t.find((t) => t.id === e))).filter(Boolean).map((e) => ({
...e,
position: r
- })), e.getTopRows = hI(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), gI(e.options, "debugRows", "getTopRows")), e.getBottomRows = hI(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), gI(e.options, "debugRows", "getBottomRows")), e.getCenterRows = hI(() => [
+ })), e.getTopRows = fI(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), pI(e.options, "debugRows", "getTopRows")), e.getBottomRows = fI(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), pI(e.options, "debugRows", "getBottomRows")), e.getCenterRows = fI(() => [
e.getRowModel().rows,
e.getState().rowPinning.top,
e.getState().rowPinning.bottom
], (e, t, n) => {
let r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
return e.filter((e) => !r.has(e.id));
- }, gI(e.options, "debugRows", "getCenterRows"));
+ }, pI(e.options, "debugRows", "getCenterRows"));
}
-}, Oge = {
+}, Tge = {
getInitialState: (e) => ({
rowSelection: {},
...e
}),
getDefaultOptions: (e) => ({
- onRowSelectionChange: pI("rowSelection", e),
+ onRowSelectionChange: uI("rowSelection", e),
enableRowSelection: !0,
enableMultiRowSelection: !0,
enableSubRowSelection: !0
@@ -44060,21 +43806,21 @@ var Cge = { createTable: (e) => {
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
return e.getRowModel().rows.forEach((t) => {
- UI(i, t.id, r, !0, e);
+ BI(i, t.id, r, !0, e);
}), i;
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = hI(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? WI(e, n) : {
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = fI(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? VI(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, gI(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = hI(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? WI(e, n) : {
+ }, pI(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = fI(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? VI(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, gI(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = hI(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? WI(e, n) : {
+ }, pI(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = fI(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? VI(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, gI(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
+ }, pI(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
let t = e.getFilteredRowModel().flatRows, { rowSelection: n } = e.getState(), r = !!(t.length && Object.keys(n).length);
return r && t.some((e) => e.getCanSelect() && !n[e.id]) && (r = !1), r;
}, e.getIsAllPageRowsSelected = () => {
@@ -44098,17 +43844,17 @@ var Cge = { createTable: (e) => {
t.setRowSelection((a) => {
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
let o = { ...a };
- return UI(o, e.id, n, r?.selectChildren ?? !0, t), o;
+ return BI(o, e.id, n, r?.selectChildren ?? !0, t), o;
});
}, e.getIsSelected = () => {
let { rowSelection: n } = t.getState();
- return GI(e, n);
+ return HI(e, n);
}, e.getIsSomeSelected = () => {
let { rowSelection: n } = t.getState();
- return KI(e, n) === "some";
+ return UI(e, n) === "some";
}, e.getIsAllSubRowsSelected = () => {
let { rowSelection: n } = t.getState();
- return KI(e, n) === "all";
+ return UI(e, n) === "all";
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
let t = e.getCanSelect();
return (n) => {
@@ -44116,16 +43862,16 @@ var Cge = { createTable: (e) => {
};
};
}
-}, UI = (e, t, n, r, i) => {
+}, BI = (e, t, n, r, i) => {
var a;
let o = i.getRow(t, !0);
- n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => UI(e, t.id, n, r, i));
+ n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => BI(e, t.id, n, r, i));
};
-function WI(e, t) {
+function VI(e, t) {
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
return e.map((e) => {
var t;
- let o = GI(e, n);
+ let o = HI(e, n);
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
...e,
subRows: a(e.subRows)
@@ -44138,32 +43884,32 @@ function WI(e, t) {
rowsById: i
};
}
-function GI(e, t) {
+function HI(e, t) {
return t[e.id] ?? !1;
}
-function KI(e, t, n) {
+function UI(e, t, n) {
var r;
if (!((r = e.subRows) != null && r.length)) return !1;
let i = !0, a = !1;
return e.subRows.forEach((e) => {
- if (!(a && !i) && (e.getCanSelect() && (GI(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
- let n = KI(e, t);
+ if (!(a && !i) && (e.getCanSelect() && (HI(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
+ let n = UI(e, t);
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
}
}), i ? "all" : a ? "some" : !1;
}
-var qI = /([0-9]+)/gm, kge = (e, t, n) => XI(YI(e.getValue(n)).toLowerCase(), YI(t.getValue(n)).toLowerCase()), Age = (e, t, n) => XI(YI(e.getValue(n)), YI(t.getValue(n))), jge = (e, t, n) => JI(YI(e.getValue(n)).toLowerCase(), YI(t.getValue(n)).toLowerCase()), Mge = (e, t, n) => JI(YI(e.getValue(n)), YI(t.getValue(n))), Nge = (e, t, n) => {
+var WI = /([0-9]+)/gm, Ege = (e, t, n) => qI(KI(e.getValue(n)).toLowerCase(), KI(t.getValue(n)).toLowerCase()), Dge = (e, t, n) => qI(KI(e.getValue(n)), KI(t.getValue(n))), Oge = (e, t, n) => GI(KI(e.getValue(n)).toLowerCase(), KI(t.getValue(n)).toLowerCase()), kge = (e, t, n) => GI(KI(e.getValue(n)), KI(t.getValue(n))), Age = (e, t, n) => {
let r = e.getValue(n), i = t.getValue(n);
return r > i ? 1 : r < i ? -1 : 0;
-}, Pge = (e, t, n) => JI(e.getValue(n), t.getValue(n));
-function JI(e, t) {
+}, jge = (e, t, n) => GI(e.getValue(n), t.getValue(n));
+function GI(e, t) {
return e === t ? 0 : e > t ? 1 : -1;
}
-function YI(e) {
+function KI(e) {
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
}
-function XI(e, t) {
- let n = e.split(qI).filter(Boolean), r = t.split(qI).filter(Boolean);
+function qI(e, t) {
+ let n = e.split(WI).filter(Boolean), r = t.split(WI).filter(Boolean);
for (; n.length && r.length;) {
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
if (isNaN(o[0])) {
@@ -44177,22 +43923,22 @@ function XI(e, t) {
}
return n.length - r.length;
}
-var ZI = {
- alphanumeric: kge,
- alphanumericCaseSensitive: Age,
- text: jge,
- textCaseSensitive: Mge,
- datetime: Nge,
- basic: Pge
-}, Fge = [
- dge,
- Sge,
- _ge,
- vge,
- pge,
+var JI = {
+ alphanumeric: Ege,
+ alphanumericCaseSensitive: Dge,
+ text: Oge,
+ textCaseSensitive: kge,
+ datetime: Age,
+ basic: jge
+}, Mge = [
+ cge,
+ yge,
mge,
- Cge,
- wge,
+ hge,
+ uge,
+ dge,
+ bge,
+ xge,
{
getInitialState: (e) => ({
sorting: [],
@@ -44203,7 +43949,7 @@ var ZI = {
sortUndefined: 1
}),
getDefaultOptions: (e) => ({
- onSortingChange: pI("sorting", e),
+ onSortingChange: uI("sorting", e),
isMultiSortEvent: (e) => e.shiftKey
}),
createColumn: (e, t) => {
@@ -44211,13 +43957,13 @@ var ZI = {
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
for (let t of n) {
let n = t?.getValue(e.id);
- if (Object.prototype.toString.call(n) === "[object Date]") return ZI.datetime;
- if (typeof n == "string" && (r = !0, n.split(qI).length > 1)) return ZI.alphanumeric;
+ if (Object.prototype.toString.call(n) === "[object Date]") return JI.datetime;
+ if (typeof n == "string" && (r = !0, n.split(WI).length > 1)) return JI.alphanumeric;
}
- return r ? ZI.text : ZI.basic;
+ return r ? JI.text : JI.basic;
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
if (!e) throw Error();
- return mI(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? ZI[e.columnDef.sortingFn];
+ return dI(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? JI[e.columnDef.sortingFn];
}, e.toggleSorting = (n, r) => {
let i = e.getNextSortingOrder(), a = n != null;
t.setSorting((o) => {
@@ -44254,15 +44000,15 @@ var ZI = {
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
}
},
- hge,
+ fge,
+ Sge,
+ Cge,
+ wge,
Tge,
- Ege,
- Dge,
- Oge,
- bge
+ _ge
];
-function Ige(e) {
- let t = [...Fge, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
+function Nge(e) {
+ let t = [...Mge, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
...r,
...e
}, a = { ...e.initialState ?? {} };
@@ -44288,7 +44034,7 @@ function Ige(e) {
n.setState(n.initialState);
},
setOptions: (e) => {
- let t = fI(e, n.options);
+ let t = lI(e, n.options);
n.options = i(t);
},
getState: () => n.options.state,
@@ -44303,7 +44049,7 @@ function Ige(e) {
if (!r && (r = n.getCoreRowModel().rowsById[e], !r)) throw Error();
return r;
},
- _getDefaultColumnDef: hI(() => [n.options.defaultColumn], (e) => (e ??= {}, {
+ _getDefaultColumnDef: fI(() => [n.options.defaultColumn], (e) => (e ??= {}, {
header: (e) => {
let t = e.header.column.columnDef;
return t.accessorKey ? t.accessorKey : t.accessorFn ? t.id : null;
@@ -44314,20 +44060,20 @@ function Ige(e) {
},
...n._features.reduce((e, t) => Object.assign(e, t.getDefaultColumnDef == null ? void 0 : t.getDefaultColumnDef()), {}),
...e
- }), gI(e, "debugColumns", "_getDefaultColumnDef")),
+ }), pI(e, "debugColumns", "_getDefaultColumnDef")),
_getColumnDefs: () => n.options.columns,
- getAllColumns: hI(() => [n._getColumnDefs()], (e) => {
+ getAllColumns: fI(() => [n._getColumnDefs()], (e) => {
let t = function(e, r, i) {
return i === void 0 && (i = 0), e.map((e) => {
- let a = uge(n, e, i, r), o = e;
+ let a = sge(n, e, i, r), o = e;
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
});
};
return t(e);
- }, gI(e, "debugColumns", "getAllColumns")),
- getAllFlatColumns: hI(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), gI(e, "debugColumns", "getAllFlatColumns")),
- _getAllFlatColumnsById: hI(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), gI(e, "debugColumns", "getAllFlatColumnsById")),
- getAllLeafColumns: hI(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), gI(e, "debugColumns", "getAllLeafColumns")),
+ }, pI(e, "debugColumns", "getAllColumns")),
+ getAllFlatColumns: fI(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), pI(e, "debugColumns", "getAllFlatColumns")),
+ _getAllFlatColumnsById: fI(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), pI(e, "debugColumns", "getAllFlatColumnsById")),
+ getAllLeafColumns: fI(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), pI(e, "debugColumns", "getAllLeafColumns")),
getColumn: (e) => n._getAllFlatColumnsById()[e]
};
Object.assign(n, c);
@@ -44337,8 +44083,8 @@ function Ige(e) {
}
return n;
}
-function QI() {
- return (e) => hI(() => [e.options.data], (t) => {
+function YI() {
+ return (e) => fI(() => [e.options.data], (t) => {
let n = {
rows: [],
flatRows: [],
@@ -44347,7 +44093,7 @@ function QI() {
i === void 0 && (i = 0);
let o = [];
for (let c = 0; c < t.length; c++) {
- let l = fge(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
+ let l = lge(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
var s;
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
@@ -44356,9 +44102,9 @@ function QI() {
return o;
};
return n.rows = r(t), n;
- }, gI(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
+ }, pI(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
}
-function Lge(e) {
+function Pge(e) {
let t = [], n = (e) => {
var r;
t.push(e), (r = e.subRows) != null && r.length && e.getIsExpanded() && e.subRows.forEach(n);
@@ -44369,8 +44115,8 @@ function Lge(e) {
rowsById: e.rowsById
};
}
-function $I(e) {
- return (e) => hI(() => [
+function XI(e) {
+ return (e) => fI(() => [
e.getState().pagination,
e.getPrePaginationRowModel(),
e.options.paginateExpandedRows ? void 0 : e.getState().expanded
@@ -44383,7 +44129,7 @@ function $I(e) {
rows: a,
flatRows: o,
rowsById: s
- } : Lge({
+ } : Pge({
rows: a,
flatRows: o,
rowsById: s
@@ -44392,32 +44138,32 @@ function $I(e) {
u.flatRows.push(e), e.subRows.length && e.subRows.forEach(d);
};
return u.rows.forEach(d), u;
- }, gI(e.options, "debugTable", "getPaginationRowModel"));
+ }, pI(e.options, "debugTable", "getPaginationRowModel"));
}
//#endregion
//#region node_modules/@tanstack/react-table/build/lib/index.mjs
-function eL(e, t) {
- return e ? Rge(e) ? /*#__PURE__*/ B.createElement(e, t) : e : null;
+function ZI(e, t) {
+ return e ? Fge(e) ? /*#__PURE__*/ B.createElement(e, t) : e : null;
}
-function Rge(e) {
- return zge(e) || typeof e == "function" || Bge(e);
+function Fge(e) {
+ return Ige(e) || typeof e == "function" || Lge(e);
}
-function zge(e) {
+function Ige(e) {
return typeof e == "function" && (() => {
let t = Object.getPrototypeOf(e);
return t.prototype && t.prototype.isReactComponent;
})();
}
-function Bge(e) {
+function Lge(e) {
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
}
-function tL(e) {
+function QI(e) {
let t = {
state: {},
onStateChange: () => {},
renderFallbackValue: null,
...e
- }, [n] = B.useState(() => ({ current: Ige(t) })), [r, i] = B.useState(() => n.current.initialState);
+ }, [n] = B.useState(() => ({ current: Nge(t) })), [r, i] = B.useState(() => n.current.initialState);
return n.current.setOptions((t) => ({
...t,
...e,
@@ -44432,7 +44178,7 @@ function tL(e) {
}
//#endregion
//#region src/react/boardui/components/base/switch/switch.tsx
-var Vge = yE({
+var Rge = yE({
sm: {
track: "h-4 w-7",
trackRadius: {
@@ -44494,8 +44240,8 @@ var Vge = yE({
}
}
});
-function Hge({ state: e, size: t = "md", shape: n = "pill" }) {
- let r = Vge[t];
+function zge({ state: e, size: t = "md", shape: n = "pill" }) {
+ let r = Rge[t];
return /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
className: vE("relative shrink-0 transition-colors duration-200 ease", r.track, r.trackRadius[n], e.isSelected ? vE("bg-linear-to-b from-accent-500 to-accent-600", r.onShadow) : "bg-background-tertiary-default", e.isDisabled && "opacity-50", e.isFocusVisible && "ring-2 ring-border-focus-ring ring-offset-2"),
@@ -44505,12 +44251,12 @@ function Hge({ state: e, size: t = "md", shape: n = "pill" }) {
})
});
}
-function nL({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
- return /* @__PURE__ */ (0, V.jsx)(Ose, {
+function $I({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
+ return /* @__PURE__ */ (0, V.jsx)(nce, {
ref: i,
...a,
className: (t) => vE("group inline-flex items-center gap-2 select-none", t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
- children: (e) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(Hge, {
+ children: (e) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(zge, {
state: e,
size: n,
shape: r
@@ -44522,8 +44268,8 @@ function nL({ className: e, children: t, size: n = "md", shape: r = "pill", ref:
}
//#endregion
//#region src/react/components/legacy-avatar.ts
-var rL = "[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:max-w-none [&_img]:max-h-none [&_img]:object-cover", Uge = "输入女优名,到 JavDB 找她的演员页";
-function Wge(e, t) {
+var eL = "[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:max-w-none [&_img]:max-h-none [&_img]:object-cover", Bge = "输入女优名,到 JavDB 找她的演员页";
+function Vge(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e.candidates) t.has(r.id) && r.held_by && n.set(r.held_by.id, r.held_by.name);
if (n.size > 1) return {
@@ -44542,10 +44288,10 @@ function Wge(e, t) {
blocked: !1
};
}
-function Gge({ card: e, picked: t, onPick: n }) {
+function Hge({ card: e, picked: t, onPick: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(BM, {
+ children: [/* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: t,
onChange: n,
children: /* @__PURE__ */ (0, V.jsxs)("span", {
@@ -44566,16 +44312,16 @@ function Gge({ card: e, picked: t, onPick: n }) {
}) : null
]
})
- }), /* @__PURE__ */ (0, V.jsx)(Lk, {
+ }), /* @__PURE__ */ (0, V.jsx)(HE, {
href: e.url,
children: e.id
})]
});
}
-function Kge({ readOnly: e, toast: t, onAdded: n }) {
+function Uge({ readOnly: e, toast: t, onAdded: n }) {
let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(/* @__PURE__ */ new Set()), l = AE(), u = () => {
let t = r.trim();
- !t || e || l.run("lookup", (e) => Yme(t, e), (e) => {
+ !t || e || l.run("lookup", (e) => Kme(t, e), (e) => {
o(e), c(new Set(e.suggested));
});
}, d = (e) => {
@@ -44583,10 +44329,10 @@ function Kge({ readOnly: e, toast: t, onAdded: n }) {
}, f = () => {
o(null), c(/* @__PURE__ */ new Set()), l.setError("");
}, p = () => {
- a && l.run("follow", (e) => Xme(a.q, [...s], e), (e) => {
+ a && l.run("follow", (e) => qme(a.q, [...s], e), (e) => {
t(e.created ? `已新建「${e.entity_name}」并订阅她的新作` : `已订阅「${e.entity_name}」的新作`), i(""), f(), n();
});
- }, m = a ? Wge(a, s) : null;
+ }, m = a ? Vge(a, s) : null;
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: wE({
padding: "none",
@@ -44601,11 +44347,11 @@ function Kge({ readOnly: e, toast: t, onAdded: n }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-64 grow",
- children: /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: /* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "女优名",
- placeholder: Uge,
+ placeholder: Bge,
value: r,
- leadingIcon: ET,
+ leadingIcon: TT,
isDisabled: e,
onChange: i,
onKeyDown: d
@@ -44626,16 +44372,16 @@ function Kge({ readOnly: e, toast: t, onAdded: n }) {
a ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ik, { children: "JavDB 上的演员卡" }),
- a.candidates.length ? a.candidates.map((e) => /* @__PURE__ */ (0, V.jsx)(Gge, {
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "JavDB 上的演员卡" }),
+ a.candidates.length ? a.candidates.map((e) => /* @__PURE__ */ (0, V.jsx)(Hge, {
card: e,
picked: s.has(e.id),
onPick: (t) => c((n) => {
let r = new Set(n);
return t ? r.add(e.id) : r.delete(e.id), r;
})
- }, e.id)) : /* @__PURE__ */ (0, V.jsx)(Pk, { children: "JavDB 上没有搜到这个名字。" }),
- a.candidates.length ? /* @__PURE__ */ (0, V.jsx)(Pk, {
+ }, e.id)) : /* @__PURE__ */ (0, V.jsx)(zE, { children: "JavDB 上没有搜到这个名字。" }),
+ a.candidates.length ? /* @__PURE__ */ (0, V.jsx)(zE, {
role: "status",
children: s.size ? m.text : "勾选她的演员卡;有碼与無碼两条记录都是她的话,两张都勾。"
}) : null,
@@ -44662,19 +44408,19 @@ function Kge({ readOnly: e, toast: t, onAdded: n }) {
}
//#endregion
//#region src/react/follow-manage/source-list.tsx
-var qge = Object.fromEntries(Object.entries(YP).map(([e, t]) => [t, e])), iL = 740;
-function Jge() {
+var Wge = Object.fromEntries(Object.entries(KP).map(([e, t]) => [t, e])), tL = 740;
+function Gge() {
let [e, t] = (0, B.useState)(!1), n = (0, B.useRef)(null), r = (0, B.useCallback)((e) => {
if (n.current?.disconnect(), !e) {
n.current = null;
return;
}
- let r = new ResizeObserver(() => t(e.clientWidth < iL));
- r.observe(e), n.current = r, t(e.clientWidth < iL);
+ let r = new ResizeObserver(() => t(e.clientWidth < tL));
+ r.observe(e), n.current = r, t(e.clientWidth < tL);
}, []);
return (0, B.useEffect)(() => () => n.current?.disconnect(), []), [r, e];
}
-var Yge = {
+var Kge = {
select: "选择",
author: "创作者",
source: "来源",
@@ -44683,7 +44429,7 @@ var Yge = {
checked: "上次检查",
actions: "操作"
};
-function aL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
+function nL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
return t <= 1 ? null : /* @__PURE__ */ (0, V.jsxs)("nav", {
"aria-label": r,
className: "flex flex-wrap items-center justify-center gap-2",
@@ -44697,7 +44443,7 @@ function aL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
}),
/* @__PURE__ */ (0, V.jsx)("ul", {
className: "flex flex-wrap items-center gap-1",
- children: dj(e, t).map((t, r) => /* @__PURE__ */ (0, V.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, V.jsx)("span", {
+ children: QA(e, t).map((t, r) => /* @__PURE__ */ (0, V.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -44720,22 +44466,22 @@ function aL({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
]
});
}
-function Xge({ source: e, selected: t, onToggle: n, handlers: r }) {
+function qge({ source: e, selected: t, onToggle: n, handlers: r }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-selected": t || void 0,
className: "flex min-h-16 flex-wrap items-center gap-3 px-2 py-3",
onClick: (e) => {
- HM(e, e.currentTarget) && n(!t);
+ FM(e, e.currentTarget) && n(!t);
},
children: [
- /* @__PURE__ */ (0, V.jsx)(BM, {
+ /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: t,
onChange: n,
"aria-label": `选择 ${e.label}`
}),
/* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 grow flex-col gap-0.5",
- children: [/* @__PURE__ */ (0, V.jsx)(oI, { source: e }), e.last_error ? /* @__PURE__ */ (0, V.jsx)("small", {
+ children: [/* @__PURE__ */ (0, V.jsx)(rI, { source: e }), e.last_error ? /* @__PURE__ */ (0, V.jsx)("small", {
className: "text-caption-1-regular text-text-error-primary",
children: e.last_error
}) : null]
@@ -44743,17 +44489,17 @@ function Xge({ source: e, selected: t, onToggle: n, handlers: r }) {
/* @__PURE__ */ (0, V.jsx)("span", {
className: "flex shrink-0 items-center gap-1.5 text-body-2-regular text-text-secondary",
title: e.provider_label,
- children: /* @__PURE__ */ (0, V.jsx)(rI, {
+ children: /* @__PURE__ */ (0, V.jsx)(eI, {
provider: e.provider,
label: e.provider_label
})
}),
- /* @__PURE__ */ (0, V.jsx)(aI, { source: e }),
+ /* @__PURE__ */ (0, V.jsx)(nI, { source: e }),
/* @__PURE__ */ (0, V.jsx)("span", {
className: "shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary",
- children: SF(e)
+ children: yF(e)
}),
- /* @__PURE__ */ (0, V.jsx)(nL, {
+ /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": `启用 ${e.label}`,
isSelected: e.enabled,
isDisabled: r.readOnly,
@@ -44765,7 +44511,7 @@ function Xge({ source: e, selected: t, onToggle: n, handlers: r }) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: wT,
+ leadingIcon: CT,
"aria-label": `检查 ${e.label} 的更新`,
disabled: !e.enabled || r.readOnly,
...X(r.busy),
@@ -44774,7 +44520,7 @@ function Xge({ source: e, selected: t, onToggle: n, handlers: r }) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: _T,
+ leadingIcon: gT,
"aria-label": `移除 ${e.label}`,
disabled: r.readOnly,
onClick: () => r.remove(e)
@@ -44783,8 +44529,8 @@ function Xge({ source: e, selected: t, onToggle: n, handlers: r }) {
]
});
}
-function Zge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a, onToggleGroup: o, onToggle: s }) {
- let c = e.map((e) => e.id), l = e.filter((e) => e.enabled).map((e) => e.id), u = e.filter(ZP).length, d = [...new Set(e.map((e) => e.provider_label || e.provider))].join("、"), f = `follow-author-${e[0].id}`, p = sF(r, c);
+function Jge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a, onToggleGroup: o, onToggle: s }) {
+ let c = e.map((e) => e.id), l = e.filter((e) => e.enabled).map((e) => e.id), u = e.filter(JP).length, d = [...new Set(e.map((e) => e.provider_label || e.provider))].join("、"), f = `follow-author-${e[0].id}`, p = iF(r, c);
return /* @__PURE__ */ (0, V.jsxs)("section", {
"aria-label": `${t} 的关注来源`,
className: wE({
@@ -44797,7 +44543,7 @@ function Zge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
"data-open": n || void 0,
className: "flex flex-wrap items-center gap-3 px-2 py-2.5",
children: [
- /* @__PURE__ */ (0, V.jsx)(iI, {
+ /* @__PURE__ */ (0, V.jsx)(tI, {
group: e,
name: t
}),
@@ -44809,7 +44555,7 @@ function Zge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: wT,
+ leadingIcon: CT,
"aria-label": `检查 ${t} 的全部来源`,
disabled: !l.length || i.readOnly,
...X(i.busy),
@@ -44818,7 +44564,7 @@ function Zge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
/* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex shrink-0 items-center gap-1",
title: d,
- children: [e.map((e) => /* @__PURE__ */ (0, V.jsx)(rI, { provider: e.provider }, e.id)), /* @__PURE__ */ (0, V.jsx)(H_, { children: `来源:${d}` })]
+ children: [e.map((e) => /* @__PURE__ */ (0, V.jsx)(eI, { provider: e.provider }, e.id)), /* @__PURE__ */ (0, V.jsx)(H_, { children: `来源:${d}` })]
}),
u ? /* @__PURE__ */ (0, V.jsx)("span", {
className: "shrink-0 text-body-2-regular text-text-error-primary",
@@ -44848,7 +44594,7 @@ function Zge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
id: f,
hidden: !n,
"data-source-divider": !0,
- children: e.map((e) => /* @__PURE__ */ (0, V.jsx)(Xge, {
+ children: e.map((e) => /* @__PURE__ */ (0, V.jsx)(qge, {
source: e,
handlers: i,
selected: r.has(e.id),
@@ -44857,37 +44603,37 @@ function Zge({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
})]
});
}
-function Qge(e) {
- let { data: t, sort: n, dir: r, page: i, layout: a, pageSize: o, selected: s, readOnly: c, onSort: l, onPage: u, onLayout: d, onPageSize: f, onSelected: p, toast: m, openFollow: h } = e, g = t.sources, _ = (0, B.useMemo)(() => t.author_aliases || [], [t.author_aliases]), v = t.counts || {}, [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = Jge(), [C, w] = (0, B.useState)(""), T = (0, B.useMemo)(() => Lme(g, n, r, _), [
+function Yge(e) {
+ let { data: t, sort: n, dir: r, page: i, layout: a, pageSize: o, selected: s, readOnly: c, onSort: l, onPage: u, onLayout: d, onPageSize: f, onSelected: p, toast: m, openFollow: h } = e, g = t.sources, _ = (0, B.useMemo)(() => t.author_aliases || [], [t.author_aliases]), v = t.counts || {}, [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = Gge(), [C, w] = (0, B.useState)(""), T = (0, B.useMemo)(() => Pme(g, n, r, _), [
g,
n,
r,
_
- ]), E = (0, B.useMemo)(() => Rme(T, n, r, _), [
+ ]), E = (0, B.useMemo)(() => Fme(T, n, r, _), [
T,
n,
r,
_
- ]), { job: D, running: O, outcome: k, start: A } = IM({
- queryKey: Ome,
- queryFn: ({ signal: e }) => Bme(e),
- start: (e) => dF(e),
+ ]), { job: D, running: O, outcome: k, start: A } = kM({
+ queryKey: Tme,
+ queryFn: ({ signal: e }) => Lme(e),
+ start: (e) => cF(e),
onError: (e) => w(W(e)),
onFinish: (e) => {
- xF(), m(e.status === "failed" ? e.error || "检查失败" : Qme(e));
+ vF(), m(e.status === "failed" ? e.error || "检查失败" : Yme(e));
}
}), j = (e) => {
O || A.isPending || (w(""), A.mutate(e));
- }, M = (e, t) => p(cF(s, [e], t)), N = (e, t) => p(cF(s, e, t)), P = OS({
- mutationFn: (e) => pF(e),
+ }, M = (e, t) => p(aF(s, [e], t)), N = (e, t) => p(aF(s, e, t)), P = OS({
+ mutationFn: (e) => uF(e),
onSuccess: (e, t) => {
- bF([t]), p(cF(s, [t], !1)), m("已取消关注来源");
+ _F([t]), p(aF(s, [t], !1)), m("已取消关注来源");
},
onError: (e) => w(W(e))
}), ee = OS({
- mutationFn: (e) => fF(e.id, e.enabled),
+ mutationFn: (e) => lF(e.id, e.enabled),
onSuccess: (e, t) => {
- yF(t.id, { enabled: t.enabled }), w("");
+ gF(t.id, { enabled: t.enabled }), w("");
},
onError: (e) => w(W(e))
}), F = (e) => void Te({
@@ -44899,7 +44645,7 @@ function Qge(e) {
}), I = OS({
mutationFn: async (e) => {
let t = await ge(e.ids, 4, async (t) => {
- e.action === "remove" ? await pF(t) : await fF(t, e.action === "enabled");
+ e.action === "remove" ? await uF(t) : await lF(t, e.action === "enabled");
});
return {
...e,
@@ -44908,9 +44654,9 @@ function Qge(e) {
};
},
onSuccess: (e) => {
- if (e.action === "remove") bF(e.done);
- else for (let t of e.done) yF(t, { enabled: e.action === "enabled" });
- p(cF(s, e.done, !1));
+ if (e.action === "remove") _F(e.done);
+ else for (let t of e.done) gF(t, { enabled: e.action === "enabled" });
+ p(aF(s, e.done, !1));
let t = e.results.filter((e) => !e.ok);
if (t.length) {
w(`${t.length}/${e.ids.length} 个来源未更新:${W(t[0]?.error)}`);
@@ -44923,18 +44669,18 @@ function Qge(e) {
onError: (e) => w(W(e))
}), te = OS({
mutationFn: async (e) => {
- let t = ((await Jme()).groups || []).flatMap((e) => [
+ let t = ((await Gme()).groups || []).flatMap((e) => [
e.primary,
...e.variants,
...e.duplicates
]).filter((e) => e.status === "new").map((e) => e.id);
return {
ids: t,
- failed: (await ge(t, 6, (t) => qme(t, e))).filter((e) => !e.ok)
+ failed: (await ge(t, 6, (t) => Wme(t, e))).filter((e) => !e.ok)
};
},
onSuccess: (e) => {
- if (xF(), e.failed.length) {
+ if (vF(), e.failed.length) {
w(`批量更新 ${e.failed.length}/${e.ids.length} 项未完成`);
return;
}
@@ -44959,12 +44705,12 @@ function Qge(e) {
readOnly: c
};
let ie = re.current, ae = (0, B.useMemo)(() => {
- let e = dI(), t = (e) => () => Yge[e] || e;
+ let e = cI(), t = (e) => () => Kge[e] || e;
return [
e.display({
id: "select",
header: t("select"),
- cell: (e) => /* @__PURE__ */ (0, V.jsx)(BM, {
+ cell: (e) => /* @__PURE__ */ (0, V.jsx)(NM, {
slot: null,
isSelected: e.row.getIsSelected(),
onChange: (t) => e.row.toggleSelected(t),
@@ -44976,7 +44722,7 @@ function Qge(e) {
header: t("author"),
cell: (e) => /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(iI, {
+ children: [/* @__PURE__ */ (0, V.jsx)(tI, {
group: e.row.original.group,
name: e.row.original.author
}), /* @__PURE__ */ (0, V.jsx)("span", {
@@ -44990,7 +44736,7 @@ function Qge(e) {
header: t("source"),
cell: (e) => /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 flex-col gap-0.5",
- children: [/* @__PURE__ */ (0, V.jsx)(oI, { source: e.row.original.source }), e.row.original.source.last_error ? /* @__PURE__ */ (0, V.jsx)("small", {
+ children: [/* @__PURE__ */ (0, V.jsx)(rI, { source: e.row.original.source }), e.row.original.source.last_error ? /* @__PURE__ */ (0, V.jsx)("small", {
className: "text-caption-1-regular text-text-error-primary",
children: e.row.original.source.last_error
}) : null]
@@ -45001,18 +44747,18 @@ function Qge(e) {
header: t("provider"),
cell: (e) => /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex items-center gap-1.5",
- children: [/* @__PURE__ */ (0, V.jsx)(rI, { provider: e.row.original.source.provider }), e.row.original.source.provider_label]
+ children: [/* @__PURE__ */ (0, V.jsx)(eI, { provider: e.row.original.source.provider }), e.row.original.source.provider_label]
})
}),
e.display({
id: "status",
header: t("status"),
- cell: (e) => /* @__PURE__ */ (0, V.jsx)(aI, { source: e.row.original.source })
+ cell: (e) => /* @__PURE__ */ (0, V.jsx)(nI, { source: e.row.original.source })
}),
e.accessor((e) => e.source.last_checked_at || "", {
id: "checked",
header: t("checked"),
- cell: (e) => SF(e.row.original.source)
+ cell: (e) => yF(e.row.original.source)
}),
e.display({
id: "actions",
@@ -45020,7 +44766,7 @@ function Qge(e) {
cell: (e) => /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex items-center gap-1",
children: [
- /* @__PURE__ */ (0, V.jsx)(nL, {
+ /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": `启用 ${e.row.original.source.label}`,
isSelected: e.row.original.source.enabled,
isDisabled: ie.readOnly,
@@ -45030,7 +44776,7 @@ function Qge(e) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: wT,
+ leadingIcon: CT,
"aria-label": `检查 ${e.row.original.source.label} 的更新`,
disabled: !e.row.original.source.enabled || ie.readOnly,
...X(ie.busy),
@@ -45040,7 +44786,7 @@ function Qge(e) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: _T,
+ leadingIcon: gT,
"aria-label": `移除 ${e.row.original.source.label}`,
disabled: ie.readOnly,
onClick: () => re.current.remove(e.row.original.source)
@@ -45050,12 +44796,12 @@ function Qge(e) {
})
];
}, [ie]), oe = (0, B.useMemo)(() => {
- let e = qge[n];
+ let e = Wge[n];
return e ? [{
id: e,
desc: r === "desc"
}] : [];
- }, [n, r]), se = (0, B.useMemo)(() => Object.fromEntries([...s].map((e) => [String(e), !0])), [s]), ce = a === "table", le = oF(ce ? E.length : T.length, o, i), ue = tL({
+ }, [n, r]), se = (0, B.useMemo)(() => Object.fromEntries([...s].map((e) => [String(e), !0])), [s]), ce = a === "table", le = rF(ce ? E.length : T.length, o, i), ue = QI({
data: E,
columns: ae,
getRowId: (e) => String(e.source.id),
@@ -45072,7 +44818,7 @@ function Qge(e) {
onSortingChange: (e) => {
let t = (typeof e == "function" ? e(oe) : e)[0];
if (!t) return;
- let n = YP[t.id];
+ let n = KP[t.id];
n && l(n, t.desc ? "desc" : "asc");
},
onRowSelectionChange: (e) => {
@@ -45086,9 +44832,9 @@ function Qge(e) {
}, n = typeof e == "function" ? e(t) : e;
n.pageSize === o ? n.pageIndex !== t.pageIndex && u(n.pageIndex + 1) : f(n.pageSize);
},
- getCoreRowModel: QI(),
- getPaginationRowModel: $I()
- }), L = ue.getRowModel().rows, de = ce ? L.map((e) => e.original.source.id) : T.slice(le.start, le.end).flatMap((e) => e.map((e) => e.id)), fe = sF(s, de), pe = [...s], me = $me(k), R = ehe(k), he = T.length > 0 && y.size >= T.length;
+ getCoreRowModel: YI(),
+ getPaginationRowModel: XI()
+ }), L = ue.getRowModel().rows, de = ce ? L.map((e) => e.original.source.id) : T.slice(le.start, le.end).flatMap((e) => e.map((e) => e.id)), fe = iF(s, de), pe = [...s], me = Xme(k), R = Zme(k), he = T.length > 0 && y.size >= T.length;
return g.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: wE({
padding: "none",
@@ -45109,7 +44855,7 @@ function Qge(e) {
}),
/* @__PURE__ */ (0, V.jsx)(J, {
variant: "primary",
- leadingIcon: wT,
+ leadingIcon: CT,
disabled: c,
"aria-label": "检查全部",
iconOnly: S,
@@ -45124,28 +44870,28 @@ function Qge(e) {
children: [/* @__PURE__ */ (0, V.jsx)(J, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: pae,
- "aria-label": qP[0][1],
+ leadingIcon: mae,
+ "aria-label": WP[0][1],
"aria-pressed": !ce,
onClick: () => d("default")
}), /* @__PURE__ */ (0, V.jsx)(J, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: gae,
- "aria-label": qP[1][1],
+ leadingIcon: _ae,
+ "aria-label": WP[1][1],
"aria-pressed": ce,
onClick: () => d("table")
})]
}),
- /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "关注列表排序",
selectedKey: n,
onSelectionChange: (e) => {
if (e === null) return;
let t = String(e);
- l(t, PP[t]);
+ l(t, jP[t]);
},
- children: NP.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: AP.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: t
}, e))
@@ -45154,7 +44900,7 @@ function Qge(e) {
variant: "secondary",
iconOnly: !0,
leadingIcon: r === "asc" ? $ie : Qie,
- "aria-label": Fme(n, r),
+ "aria-label": Mme(n, r),
onClick: () => l(n, r === "asc" ? "desc" : "asc")
}),
ce ? null : /* @__PURE__ */ (0, V.jsx)(J, {
@@ -45171,7 +44917,7 @@ function Qge(e) {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
children: [
- O ? /* @__PURE__ */ (0, V.jsx)(MM, {
+ O ? /* @__PURE__ */ (0, V.jsx)(SM, {
embedded: !0,
label: D?.message || (D?.total ? `${D.older ? "抓取历史" : "检查更新"}:已完成 ${D.checked || 0}/${D.total} 个来源` : "正在准备检查任务"),
value: D?.checked,
@@ -45257,10 +45003,10 @@ function Qge(e) {
})
]
}),
- ce ? /* @__PURE__ */ (0, V.jsx)(UM, {
+ ce ? /* @__PURE__ */ (0, V.jsx)(IM, {
follow: !0,
onRowClick: (e) => M(Number(e), !s.has(Number(e))),
- children: /* @__PURE__ */ (0, V.jsxs)(VM, {
+ children: /* @__PURE__ */ (0, V.jsxs)(PM, {
"aria-label": "关注来源",
size: "sm",
sortDescriptor: oe[0] ? {
@@ -45271,9 +45017,9 @@ function Qge(e) {
id: String(e.column),
desc: e.direction === "descending"
}]),
- children: [/* @__PURE__ */ (0, V.jsx)(ZO, { children: ue.getHeaderGroups()[0].headers.map((e) => {
- let t = e.column.id in YP, n = eL(e.column.columnDef.header, e.getContext());
- return /* @__PURE__ */ (0, V.jsx)(QO, {
+ children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: ue.getHeaderGroups()[0].headers.map((e) => {
+ let t = e.column.id in KP, n = ZI(e.column.columnDef.header, e.getContext());
+ return /* @__PURE__ */ (0, V.jsx)(Lk, {
id: e.id,
allowsSorting: t,
isRowHeader: e.column.id === "source",
@@ -45282,20 +45028,20 @@ function Qge(e) {
children: [n, /* @__PURE__ */ (0, V.jsx)("span", {
"data-sort-indicator": !0,
"data-direction": e || void 0,
- children: /* @__PURE__ */ (0, V.jsx)(_ce, {})
+ children: /* @__PURE__ */ (0, V.jsx)(Tde, {})
})]
}) : /* @__PURE__ */ (0, V.jsx)(H_, { children: n })
}, e.id);
- }) }), /* @__PURE__ */ (0, V.jsx)(ek, {
+ }) }), /* @__PURE__ */ (0, V.jsx)(zk, {
renderEmptyState: () => "这一页没有来源",
- children: L.map((e) => /* @__PURE__ */ (0, V.jsx)(rk, {
+ children: L.map((e) => /* @__PURE__ */ (0, V.jsx)(Hk, {
id: e.id,
"data-follow-selected": e.getIsSelected() || void 0,
- children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, V.jsx)(ak, { children: eL(e.column.columnDef.cell, e.getContext()) }, e.id))
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, V.jsx)(Wk, { children: ZI(e.column.columnDef.cell, e.getContext()) }, e.id))
}, e.id))
})]
})
- }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(BM, {
+ }) : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: fe.all,
isIndeterminate: fe.some,
onChange: (e) => N(de, e),
@@ -45305,9 +45051,9 @@ function Qge(e) {
className: "flex flex-col gap-3",
children: T.slice(le.start, le.end).map((e) => {
let t = String(e[0].author_key || e[0].id);
- return /* @__PURE__ */ (0, V.jsx)(Zge, {
+ return /* @__PURE__ */ (0, V.jsx)(Jge, {
group: e,
- name: nF(e, _),
+ name: $P(e, _),
handlers: ie,
selected: s,
open: !y.has(t),
@@ -45327,19 +45073,19 @@ function Qge(e) {
className: "text-body-2-regular text-text-secondary",
children: `${le.start + 1}–${le.end} / ${le.total} ${ce ? "个来源" : "位创作者"}`
}),
- /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "每页显示数量",
size: "sm",
selectedKey: String(o),
onSelectionChange: (e) => {
e !== null && ue.setPageSize(Number(e));
},
- children: JP.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: GP.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: String(e),
children: `每页 ${e} ${ce ? "条" : "位"}`
}, e))
}),
- /* @__PURE__ */ (0, V.jsx)(aL, {
+ /* @__PURE__ */ (0, V.jsx)(nL, {
page: le.page,
pages: le.pages,
onPage: (e) => ue.setPageIndex(e - 1)
@@ -45390,7 +45136,7 @@ function Qge(e) {
]
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: TT,
+ icon: wT,
title: "还没有关注来源",
actions: /* @__PURE__ */ (0, V.jsx)(CE, {
variant: "primary",
@@ -45403,7 +45149,7 @@ function Qge(e) {
}
//#endregion
//#region src/react/follow-manage/feed-sources.tsx
-var $ge = {
+var Xge = {
select: "选择",
name: "名称",
kind: "类型",
@@ -45413,18 +45159,18 @@ var $ge = {
fetched: "上次拉取",
fresh: "上次新增",
actions: "操作"
-}, e_e = /* @__PURE__ */ new Set(["select", "actions"]), oL = () => z.invalidateQueries({
- queryKey: KP,
+}, Zge = /* @__PURE__ */ new Set(["select", "actions"]), rL = () => z.invalidateQueries({
+ queryKey: UP,
exact: !0
-}), sL = (e) => e.name || e.url, t_e = (e) => e >= 60 ? `每 ${Math.round(e / 60)} 小时` : `每 ${e} 分钟`;
-function n_e(e) {
+}), iL = (e) => e.name || e.url, Qge = (e) => e >= 60 ? `每 ${Math.round(e / 60)} 小时` : `每 ${e} 分钟`;
+function $ge(e) {
try {
return new URL(e).hostname.replace(/^www\./, "");
} catch {
return e;
}
}
-function r_e({ source: e }) {
+function e_e({ source: e }) {
return e.last_error ? /* @__PURE__ */ (0, V.jsx)(xE, {
variant: "caption",
color: "rose",
@@ -45439,7 +45185,7 @@ function r_e({ source: e }) {
children: "已暂停"
});
}
-function i_e({ source: e }) {
+function t_e({ source: e }) {
let t = e.entity_id ? {
id: e.entity_id,
has_image: !!e.has_image,
@@ -45448,31 +45194,31 @@ function i_e({ source: e }) {
} : null;
return /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
- className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary ${rL}`,
- dangerouslySetInnerHTML: { __html: w(sL(e), t, null, "performer") }
+ className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary ${eL}`,
+ dangerouslySetInnerHTML: { __html: w(iL(e), t, null, "performer") }
});
}
-var a_e = (e, t) => e.entity_id !== null && t.has(e.entity_id) && e.page_name && e.page_name !== e.name ? e.page_name : "";
-function o_e(e) {
+var n_e = (e, t) => e.entity_id !== null && t.has(e.entity_id) && e.page_name && e.page_name !== e.name ? e.page_name : "";
+function r_e(e) {
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
for (let { entity_id: r } of e) r !== null && (t.has(r) ? n.add(r) : t.add(r));
return n;
}
-function cL(e, t) {
+function aL(e, t) {
let n = e.length === 1 ? e[0] : null;
return Te({
title: n ? "移除订阅源" : `移除 ${e.length} 条订阅源`,
- body: n ? `将移除订阅源「${sL(n)}」,之后不再拉取它的新作;已经拉到的新作保留。` : "将移除所选订阅源,之后不再拉取它们的新作;已经拉到的新作保留。",
+ body: n ? `将移除订阅源「${iL(n)}」,之后不再拉取它的新作;已经拉到的新作保留。` : "将移除所选订阅源,之后不再拉取它们的新作;已经拉到的新作保留。",
confirmLabel: n ? "移除订阅源" : "移除所选订阅源",
danger: !0,
onConfirm: t
});
}
-function s_e({ readOnly: e, toast: t }) {
+function i_e({ readOnly: e, toast: t }) {
let n = TS({
- queryKey: KP,
- queryFn: ({ signal: e }) => hF(e)
- }), r = AE(), i = n.data, a = (0, B.useMemo)(() => i?.sources ?? [], [i]), [o, s] = (0, B.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, B.useState)(1), [u, d] = (0, B.useState)(20), f = oF(a.length, u, c);
+ queryKey: UP,
+ queryFn: ({ signal: e }) => fF(e)
+ }), r = AE(), i = n.data, a = (0, B.useMemo)(() => i?.sources ?? [], [i]), [o, s] = (0, B.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, B.useState)(1), [u, d] = (0, B.useState)(20), f = rF(a.length, u, c);
(0, B.useEffect)(() => {
l((e) => Math.min(e, f.pages));
}, [f.pages]), (0, B.useEffect)(() => {
@@ -45484,7 +45230,7 @@ function s_e({ readOnly: e, toast: t }) {
let p = OS({
mutationFn: async (e) => {
let t = await ge(e.ids, 4, async (t) => {
- e.action === "remove" ? await _F(t) : await gF(t, e.action === "enabled");
+ e.action === "remove" ? await mF(t) : await pF(t, e.action === "enabled");
});
return {
...e,
@@ -45493,13 +45239,13 @@ function s_e({ readOnly: e, toast: t }) {
},
onSuccess: (e) => {
let n = e.results.filter((e) => !e.ok), i = e.ids.length - n.length;
- if (s(/* @__PURE__ */ new Set()), oL(), e.action === "remove" && i && t(`已移除 ${i} 条订阅源`), n.length) {
+ if (s(/* @__PURE__ */ new Set()), rL(), e.action === "remove" && i && t(`已移除 ${i} 条订阅源`), n.length) {
let e = n[0];
r.setError(`${n.length} 条没有写入:${e.ok ? "" : W(e.error)}`);
}
},
onError: (e) => r.setError(W(e))
- }), m = (0, B.useMemo)(() => o_e(a), [a]), h = (0, B.useRef)({
+ }), m = (0, B.useMemo)(() => r_e(a), [a]), h = (0, B.useRef)({
readOnly: e,
shared: m,
busy: null,
@@ -45511,34 +45257,34 @@ function s_e({ readOnly: e, toast: t }) {
readOnly: e,
shared: m,
busy: r.busy,
- toggle: (e, t) => void r.run(`enabled-${e.id}`, (n) => gF(e.id, t, n), () => void oL()),
- fetch: (e) => void r.run(`check-${e.id}`, (t) => vF(t, [e.id]), () => void oL()),
- remove: (e) => void cL([e], async () => {
- await _F(e.id), t(`已移除订阅源「${sL(e)}」`), oL();
+ toggle: (e, t) => void r.run(`enabled-${e.id}`, (n) => pF(e.id, t, n), () => void rL()),
+ fetch: (e) => void r.run(`check-${e.id}`, (t) => hF(t, [e.id]), () => void rL()),
+ remove: (e) => void aL([e], async () => {
+ await mF(e.id), t(`已移除订阅源「${iL(e)}」`), rL();
})
};
let g = (0, B.useMemo)(() => {
- let e = dI(), t = (e) => () => $ge[e] || e;
+ let e = cI(), t = (e) => () => Xge[e] || e;
return [
e.display({
id: "select",
header: t("select"),
- cell: (e) => /* @__PURE__ */ (0, V.jsx)(BM, {
+ cell: (e) => /* @__PURE__ */ (0, V.jsx)(NM, {
slot: null,
isSelected: e.row.getIsSelected(),
onChange: (t) => e.row.toggleSelected(t),
- "aria-label": `选择 ${sL(e.row.original)}`
+ "aria-label": `选择 ${iL(e.row.original)}`
})
}),
- e.accessor(sL, {
+ e.accessor(iL, {
id: "name",
header: t("name"),
cell: (e) => {
- let t = a_e(e.row.original, h.current.shared);
+ let t = n_e(e.row.original, h.current.shared);
return /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex items-center gap-2 whitespace-nowrap text-body-medium text-text-primary",
children: [
- /* @__PURE__ */ (0, V.jsx)(i_e, { source: e.row.original }),
+ /* @__PURE__ */ (0, V.jsx)(t_e, { source: e.row.original }),
e.getValue(),
t ? /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
@@ -45566,15 +45312,15 @@ function s_e({ readOnly: e, toast: t }) {
rel: "noreferrer noopener",
title: "打开来源页面",
className: "text-text-primary underline-offset-2 hover:underline",
- children: n_e(e.getValue())
+ children: $ge(e.getValue())
})
}),
e.display({
id: "status",
header: t("status"),
- cell: (e) => /* @__PURE__ */ (0, V.jsx)(r_e, { source: e.row.original })
+ cell: (e) => /* @__PURE__ */ (0, V.jsx)(e_e, { source: e.row.original })
}),
- e.accessor((e) => t_e(e.interval_minutes), {
+ e.accessor((e) => Qge(e.interval_minutes), {
id: "interval",
header: t("interval"),
cell: (e) => /* @__PURE__ */ (0, V.jsx)("span", {
@@ -45582,7 +45328,7 @@ function s_e({ readOnly: e, toast: t }) {
children: e.getValue()
})
}),
- e.accessor((e) => e.last_fetched_at ? mj(e.last_fetched_at) : "还没拉过", {
+ e.accessor((e) => e.last_fetched_at ? tj(e.last_fetched_at) : "还没拉过", {
id: "fetched",
header: t("fetched"),
cell: (e) => /* @__PURE__ */ (0, V.jsx)("span", {
@@ -45604,8 +45350,8 @@ function s_e({ readOnly: e, toast: t }) {
cell: (e) => /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex items-center gap-1",
children: [
- /* @__PURE__ */ (0, V.jsx)(nL, {
- "aria-label": `启用 ${sL(e.row.original)}`,
+ /* @__PURE__ */ (0, V.jsx)($I, {
+ "aria-label": `启用 ${iL(e.row.original)}`,
isSelected: e.row.original.enabled,
isDisabled: h.current.readOnly,
onChange: (t) => h.current.toggle(e.row.original, t)
@@ -45614,8 +45360,8 @@ function s_e({ readOnly: e, toast: t }) {
variant: "secondary",
size: "xs",
iconOnly: !0,
- leadingIcon: wT,
- "aria-label": `拉取 ${sL(e.row.original)}`,
+ leadingIcon: CT,
+ "aria-label": `拉取 ${iL(e.row.original)}`,
disabled: h.current.readOnly,
...X(h.current.busy === `check-${e.row.original.id}`),
onClick: () => h.current.fetch(e.row.original)
@@ -45624,8 +45370,8 @@ function s_e({ readOnly: e, toast: t }) {
variant: "secondary",
size: "xs",
iconOnly: !0,
- leadingIcon: _T,
- "aria-label": `移除 ${sL(e.row.original)}`,
+ leadingIcon: gT,
+ "aria-label": `移除 ${iL(e.row.original)}`,
disabled: h.current.readOnly,
onClick: () => h.current.remove(e.row.original)
})
@@ -45633,7 +45379,7 @@ function s_e({ readOnly: e, toast: t }) {
})
})
];
- }, []), _ = (0, B.useMemo)(() => Object.fromEntries([...o].map((e) => [String(e), !0])), [o]), v = tL({
+ }, []), _ = (0, B.useMemo)(() => Object.fromEntries([...o].map((e) => [String(e), !0])), [o]), v = QI({
data: a,
columns: g,
getRowId: (e) => String(e.id),
@@ -45649,24 +45395,24 @@ function s_e({ readOnly: e, toast: t }) {
let t = typeof e == "function" ? e(_) : e;
s(new Set(Object.entries(t).filter(([, e]) => e).map(([e]) => Number(e))));
},
- getCoreRowModel: QI(),
- getPaginationRowModel: $I()
+ getCoreRowModel: YI(),
+ getPaginationRowModel: XI()
});
if (!i) return n.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "打不开订阅源",
children: W(n.error)
- }) : /* @__PURE__ */ (0, V.jsx)(Pk, { children: "正在读订阅源。" });
- let y = () => void r.run("check", (e) => vF(e), () => void oL()), b = (e) => s((t) => {
+ }) : /* @__PURE__ */ (0, V.jsx)(zE, { children: "正在读订阅源。" });
+ let y = () => void r.run("check", (e) => hF(e), () => void rL()), b = (e) => s((t) => {
let n = new Set(t);
return n.has(e) ? n.delete(e) : n.add(e), n;
}), x = a.filter((e) => o.has(e.id)), S = a.filter((e) => e.last_error);
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-3",
- children: [/* @__PURE__ */ (0, V.jsx)(Kge, {
+ children: [/* @__PURE__ */ (0, V.jsx)(Uge, {
readOnly: e,
toast: t,
- onAdded: () => void oL()
+ onAdded: () => void rL()
}), /* @__PURE__ */ (0, V.jsxs)("section", {
"aria-label": "JAV 订阅列表",
className: wE({
@@ -45697,9 +45443,9 @@ function s_e({ readOnly: e, toast: t }) {
className: "flex flex-col gap-3",
children: [S.map((e) => /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
- title: `${sL(e)} 拉取失败`,
+ title: `${iL(e)} 拉取失败`,
children: e.last_error
- }, e.id)), r.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: r.error }) : null]
+ }, e.id)), r.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: r.error }) : null]
}) : null,
/* @__PURE__ */ (0, V.jsxs)(tS, {
visible: x.length > 0,
@@ -45733,7 +45479,7 @@ function s_e({ readOnly: e, toast: t }) {
size: "small",
disabled: e,
...X(p.isPending),
- onClick: () => void cL(x, () => p.mutateAsync({
+ onClick: () => void aL(x, () => p.mutateAsync({
ids: x.map((e) => e.id),
action: "remove"
})),
@@ -45747,26 +45493,26 @@ function s_e({ readOnly: e, toast: t }) {
})
]
}),
- a.length ? /* @__PURE__ */ (0, V.jsx)(UM, {
+ a.length ? /* @__PURE__ */ (0, V.jsx)(IM, {
onRowClick: (e) => b(Number(e)),
- children: /* @__PURE__ */ (0, V.jsxs)(VM, {
+ children: /* @__PURE__ */ (0, V.jsxs)(PM, {
"aria-label": "JAV 订阅源",
size: "sm",
- children: [/* @__PURE__ */ (0, V.jsx)(ZO, { children: v.getHeaderGroups()[0].headers.map((e) => {
- let t = eL(e.column.columnDef.header, e.getContext());
- return /* @__PURE__ */ (0, V.jsx)(QO, {
+ children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: v.getHeaderGroups()[0].headers.map((e) => {
+ let t = ZI(e.column.columnDef.header, e.getContext());
+ return /* @__PURE__ */ (0, V.jsx)(Lk, {
id: e.id,
isRowHeader: e.column.id === "name",
- children: e_e.has(e.column.id) ? /* @__PURE__ */ (0, V.jsx)(H_, { children: t }) : t
+ children: Zge.has(e.column.id) ? /* @__PURE__ */ (0, V.jsx)(H_, { children: t }) : t
}, e.id);
- }) }), /* @__PURE__ */ (0, V.jsx)(ek, { children: v.getRowModel().rows.map((e) => /* @__PURE__ */ (0, V.jsx)(rk, {
+ }) }), /* @__PURE__ */ (0, V.jsx)(zk, { children: v.getRowModel().rows.map((e) => /* @__PURE__ */ (0, V.jsx)(Hk, {
id: e.id,
"data-follow-selected": e.getIsSelected() || void 0,
- children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, V.jsx)(ak, { children: eL(e.column.columnDef.cell, e.getContext()) }, e.id))
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, V.jsx)(Wk, { children: ZI(e.column.columnDef.cell, e.getContext()) }, e.id))
}, e.id)) })]
})
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: TT,
+ icon: wT,
title: "还没有订阅源",
shell: "plain",
children: "在上面按女优名添加,或在人物页点「订阅新作」。"
@@ -45778,19 +45524,19 @@ function s_e({ readOnly: e, toast: t }) {
className: "text-body-2-regular text-text-secondary",
children: `${f.start + 1}–${f.end} / ${f.total} 个订阅源`
}),
- /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "每页显示数量",
size: "sm",
selectedKey: String(u),
onSelectionChange: (e) => {
e !== null && (d(Number(e)), l(1));
},
- children: JP.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: GP.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: String(e),
children: `每页 ${e} 条`
}, e))
}),
- /* @__PURE__ */ (0, V.jsx)(aL, {
+ /* @__PURE__ */ (0, V.jsx)(nL, {
label: "JAV 订阅分页",
page: f.page,
pages: f.pages,
@@ -45811,30 +45557,359 @@ function s_e({ readOnly: e, toast: t }) {
});
}
//#endregion
+//#region src/react/components/overlay-host.ts
+function a_e(e) {
+ let t = e.querySelector(":scope > [data-react-overlays]");
+ if (t) return t;
+ let n = e.ownerDocument.createElement("div");
+ return n.className = "peach-react", n.dataset.reactOverlays = "", e.append(n), n;
+}
+function oL(e) {
+ let t = e?.ownerDocument ?? globalThis.document, n = e?.closest("dialog[open]");
+ return a_e(n ?? t.body);
+}
+//#endregion
+//#region src/react/activity/resource-search.tsx
+function o_e({ className: e }) {
+ return /* @__PURE__ */ (0, V.jsx)("span", {
+ className: e,
+ "aria-hidden": !0,
+ dangerouslySetInnerHTML: { __html: Ke("") }
+ });
+}
+function s_e(e) {
+ return ["中字", "中文字幕"].includes(e?.trim() ?? "") ? "chinese" : ["无码", "无码破解"].includes(e?.trim() ?? "") ? "uncensored" : "quality";
+}
+function c_e({ initialCode: e, reason: t, choose: n }) {
+ let [r, i] = (0, B.useState)(e), [a, o] = (0, B.useState)(() => s_e(t)), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(null), [p, m] = (0, B.useState)(""), [h, g] = (0, B.useState)(""), _ = AE(), v = () => {
+ if (!r.trim() || _.busy) return;
+ let e = new URLSearchParams({
+ code: r.trim(),
+ goal: a
+ });
+ s && e.set("min_size", String(Math.round(Number(s) * 1024 ** 3))), l && e.set("max_size", String(Math.round(Number(l) * 1024 ** 3))), f(null), g("");
+ let t = r.trim();
+ _.run("search", (t) => G(`/api/resources/search?${e}`, t), (e) => {
+ f(e), m(t);
+ });
+ };
+ return /* @__PURE__ */ (0, V.jsxs)("section", {
+ "aria-label": "资源搜索",
+ "aria-busy": !!_.busy,
+ className: "flex min-w-0 flex-col gap-4",
+ children: [
+ t ? /* @__PURE__ */ (0, V.jsxs)(zE, { children: [
+ "版本目标:",
+ t,
+ "。可在下方调整搜索优先项;完整度与水印需要逐条复核。"
+ ] }) : null,
+ /* @__PURE__ */ (0, V.jsx)(GM, {
+ label: "搜索资源",
+ value: r,
+ maxLength: 80,
+ placeholder: "输入番号,按回车搜索",
+ leadingIcon: _.busy ? o_e : TT,
+ isReadOnly: !!_.busy,
+ "aria-busy": !!_.busy,
+ onChange: i,
+ onKeyDown: (e) => {
+ e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), v());
+ }
+ }),
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-1",
+ children: [/* @__PURE__ */ (0, V.jsx)(VE, { children: "优先寻找" }), /* @__PURE__ */ (0, V.jsxs)(EM, {
+ "aria-label": "优先寻找",
+ selectedKey: a,
+ isDisabled: !!_.busy,
+ onSelectionChange: (e) => {
+ e !== null && o(String(e));
+ },
+ children: [
+ /* @__PURE__ */ (0, V.jsx)(DM, {
+ id: "quality",
+ children: "高清"
+ }),
+ /* @__PURE__ */ (0, V.jsx)(DM, {
+ id: "chinese",
+ children: "中字"
+ }),
+ /* @__PURE__ */ (0, V.jsx)(DM, {
+ id: "uncensored",
+ children: "无码"
+ })
+ ]
+ })]
+ }),
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex gap-3 max-sm:flex-col",
+ children: [/* @__PURE__ */ (0, V.jsx)(GM, {
+ label: "最小体积(GiB)",
+ inputMode: "decimal",
+ value: s,
+ onChange: c
+ }), /* @__PURE__ */ (0, V.jsx)(GM, {
+ label: "最大体积(GiB)",
+ inputMode: "decimal",
+ value: l,
+ onChange: u
+ })]
+ }),
+ _.busy ? /* @__PURE__ */ (0, V.jsx)(zE, {
+ role: "status",
+ children: "正在搜索资源"
+ }) : null,
+ _.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: _.error }) : null,
+ d?.error ? /* @__PURE__ */ (0, V.jsx)(zE, {
+ role: "status",
+ children: d.error
+ }) : null,
+ d?.state === "ready" && !d.items.length ? /* @__PURE__ */ (0, V.jsx)(zE, {
+ role: "status",
+ children: "没有符合条件的资源。"
+ }) : null,
+ d?.warnings.map((e) => /* @__PURE__ */ (0, V.jsx)(zE, { children: e }, e)),
+ d?.items.length ? /* @__PURE__ */ (0, V.jsx)("ul", {
+ className: "flex min-w-0 flex-col gap-4",
+ children: d.items.map((e) => /* @__PURE__ */ (0, V.jsxs)("li", {
+ className: "flex min-w-0 flex-col gap-2 border-t border-separator-border pt-4",
+ children: [
+ /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "break-words text-body-2-medium text-text-primary",
+ children: e.name
+ }),
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: [
+ `${(e.size / 1024 ** 3).toFixed(2)} GiB`,
+ `${e.seeders} 个做种`,
+ e.resolution ? `${e.resolution}p` : "",
+ e.codec,
+ e.chinese ? "中字" : "",
+ e.uncensored ? "无码" : "",
+ e.origins.join("、")
+ ].filter(Boolean).join(" · ") }),
+ /* @__PURE__ */ (0, V.jsx)("div", { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ type: "button",
+ variant: "secondary",
+ onClick: () => {
+ n(e.uri, p), g(e.id);
+ },
+ children: h === e.id ? "已填入磁力" : "选用此资源"
+ }) })
+ ]
+ }, e.id))
+ }) : null
+ ]
+ });
+}
+//#endregion
+//#region src/react/activity/cloud-download-dialog.tsx
+var l_e = {
+ submitted: "已提交离线下载,进度在活动页",
+ adopted: "这个磁力已有任务,没有重复提交",
+ adopted_remote: "远端已有同一任务,已接管"
+};
+function sL({ prefill: e, close: t, receipt: n, provider: r, anchor: i }) {
+ let a = /* @__PURE__ */ (0, V.jsx)(XN, {
+ isOpen: !!e,
+ onOpenChange: (e) => {
+ e || t();
+ },
+ width: "form",
+ children: e ? /* @__PURE__ */ (0, V.jsx)(u_e, {
+ prefill: e,
+ close: t,
+ receipt: n,
+ provider: r
+ }) : null
+ });
+ return i ? /* @__PURE__ */ (0, V.jsx)($v, {
+ getContainer: () => oL(i.current),
+ children: a
+ }) : a;
+}
+function u_e({ prefill: e, close: t, receipt: n, provider: r }) {
+ let i = TS({
+ queryKey: rD,
+ queryFn: ({ signal: e }) => G(`${nD}?limit=50`, e),
+ refetchInterval: (e) => iD(e.state.data)
+ }), a = i.data, o = a?.providers.filter((e) => e.configured) ?? [], s = [e.code, e.title].filter(Boolean).join(" "), c = /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-1 px-5 pt-5",
+ children: [/* @__PURE__ */ (0, V.jsx)(ID, {
+ slot: "title",
+ className: "text-title-2-semibold text-text-primary",
+ children: "云下载"
+ }), s ? /* @__PURE__ */ (0, V.jsx)("p", {
+ className: "min-w-0 truncate text-body-2-regular text-text-secondary",
+ children: s
+ }) : null]
+ });
+ return a?.available && o.length ? /* @__PURE__ */ (0, V.jsx)(d_e, {
+ header: c,
+ snapshot: a,
+ prefill: e,
+ close: t,
+ receipt: n,
+ provider: r
+ }) : /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex min-h-0 flex-col",
+ children: [
+ c,
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-4 p-5",
+ children: [
+ i.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "error",
+ children: W(i.error)
+ }) : null,
+ a && !a.available ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "neutral",
+ children: "云下载只在账本写入端可用。"
+ }) : null,
+ a?.available && !o.length ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ tone: "neutral",
+ children: "先在配置页「下载」分组登录 PikPak,或填好 CloudDrive2 的地址与令牌。"
+ }) : null
+ ]
+ }),
+ /* @__PURE__ */ (0, V.jsx)("div", {
+ className: "flex justify-end p-3",
+ children: /* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "secondary",
+ onClick: t,
+ children: "关闭"
+ })
+ })
+ ]
+ });
+}
+function d_e({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provider: a }) {
+ let o = lS(), s = t.providers.filter((e) => e.configured), c = s.find((e) => e.key === a) ?? s[0], [l, u] = (0, B.useState)(c.key), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(n.code ?? ""), [h, g] = (0, B.useState)(c.target), [_, v] = (0, B.useState)(""), y = AE(), b = (0, B.useRef)(null), x = (e) => {
+ u(e), g(s.find((t) => t.key === e)?.target ?? "");
+ };
+ return /* @__PURE__ */ (0, V.jsxs)("form", {
+ "aria-label": "提交磁力",
+ noValidate: !0,
+ onSubmit: (e) => {
+ if (e.preventDefault(), !d.trim()) return;
+ let t = {
+ magnet: d,
+ provider: l,
+ target: h,
+ code: p,
+ title: n.title,
+ origin: n.origin
+ };
+ v(""), y.run("submit", (e) => K(nD, t, "POST", e), (e) => {
+ o.invalidateQueries({ queryKey: rD });
+ let t = l_e[e.outcome];
+ if (e.ok && t) {
+ i(t), r();
+ return;
+ }
+ let n = aD(e.task);
+ v(e.outcome === "refused" ? "这个资源被判为违规,不再提交。" : n ? `提交没有成功:${n}` : "提交没有成功。");
+ });
+ },
+ className: "flex min-h-0 flex-col",
+ children: [
+ e,
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex min-h-0 flex-col gap-4 overflow-y-auto p-5",
+ children: [
+ /* @__PURE__ */ (0, V.jsx)(c_e, {
+ initialCode: n.code ?? "",
+ reason: n.searchReason,
+ choose: (e, t) => {
+ f(e), m(t), b.current?.focus();
+ }
+ }),
+ /* @__PURE__ */ (0, V.jsx)(GM, {
+ ref: b,
+ label: "磁力链接",
+ placeholder: "magnet:?xt=urn:btih:…",
+ autoComplete: "off",
+ maxLength: 4e3,
+ value: d,
+ onChange: f
+ }),
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-col gap-1",
+ children: [
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "下载到" }),
+ /* @__PURE__ */ (0, V.jsx)(EM, {
+ "aria-label": "下载到",
+ selectedKey: l,
+ onSelectionChange: (e) => {
+ e !== null && x(String(e));
+ },
+ children: s.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
+ id: e.key,
+ children: e.label
+ }, e.key))
+ }),
+ l === "115" ? /* @__PURE__ */ (0, V.jsx)(zE, { children: "每提交一次扣一条离线配额,重新提交也算。" }) : null
+ ]
+ }),
+ /* @__PURE__ */ (0, V.jsx)(GM, {
+ label: "目标目录",
+ placeholder: "/云下载",
+ autoComplete: "off",
+ maxLength: 300,
+ value: h,
+ onChange: g
+ }),
+ n.code ? null : /* @__PURE__ */ (0, V.jsx)(GM, {
+ label: "番号",
+ placeholder: "可不填",
+ autoComplete: "off",
+ maxLength: 60,
+ value: p,
+ onChange: m
+ }),
+ _ || y.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: _ || y.error }) : null
+ ]
+ }),
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex justify-between gap-4 p-3",
+ children: [/* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "secondary",
+ onClick: r,
+ children: "取消"
+ }), /* @__PURE__ */ (0, V.jsx)(J, {
+ type: "submit",
+ disabled: !d.trim(),
+ ...X(y.busy === "submit"),
+ children: "提交离线下载"
+ })]
+ })
+ ]
+ });
+}
+//#endregion
//#region src/react/wants/resource-cache.ts
-var lL = "peach.want-resources.v1", uL = 864e5;
-function dL(e, t = Date.now()) {
+var cL = "peach.want-resources.v1", lL = 864e5;
+function uL(e, t = Date.now()) {
let n = Date.parse(e || ""), r = new Date(t), i = new Date(Date.UTC(r.getFullYear(), r.getMonth(), r.getDate())), a = i.getUTCDate();
i.setUTCHours(0, 0, 0, 0), i.setUTCDate(1), i.setUTCMonth(i.getUTCMonth() - 3);
let o = new Date(Date.UTC(i.getUTCFullYear(), i.getUTCMonth() + 1, 0)).getUTCDate();
- return i.setUTCDate(Math.min(a, o)), Number.isFinite(n) && n < i.getTime() ? 365 * uL : 7 * uL;
+ return i.setUTCDate(Math.min(a, o)), Number.isFinite(n) && n < i.getTime() ? 365 * lL : 7 * lL;
}
-function fL() {
+function dL() {
try {
- let e = JSON.parse(localStorage.getItem(lL) || "[]");
+ let e = JSON.parse(localStorage.getItem(cL) || "[]");
return Array.isArray(e) ? e.filter((e) => typeof e?.code == "string" && Number.isFinite(e.saved) && e.result?.state === "ready" && Array.isArray(e.result.items)) : [];
} catch {
return [];
}
}
-function c_e(e, t) {
- let n = fL().find((t) => t.code === e);
- return n && Date.now() - n.saved < dL(t) ? n : void 0;
+function f_e(e, t) {
+ let n = dL().find((t) => t.code === e);
+ return n && Date.now() - n.saved < uL(t) ? n : void 0;
}
-function l_e(e, t) {
+function p_e(e, t) {
if (t.state === "ready") try {
- let n = fL().filter((t) => t.code !== e), r = Date.parse(t.checked_at || "");
- localStorage.setItem(lL, JSON.stringify([{
+ let n = dL().filter((t) => t.code !== e), r = Date.parse(t.checked_at || "");
+ localStorage.setItem(cL, JSON.stringify([{
code: e,
saved: Number.isFinite(r) ? r : Date.now(),
result: t
@@ -45843,7 +45918,7 @@ function l_e(e, t) {
}
//#endregion
//#region src/react/wants/want-magnets.tsx
-function pL({ icon: e, children: t }) {
+function fL({ icon: e, children: t }) {
return /* @__PURE__ */ (0, V.jsxs)("span", {
className: "inline-flex items-center gap-1",
children: [/* @__PURE__ */ (0, V.jsx)(e, {
@@ -45852,8 +45927,8 @@ function pL({ icon: e, children: t }) {
}), t]
});
}
-function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSource: a }) {
- let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(typeof IntersectionObserver > "u"), [l, u] = (0, B.useState)([]), d = AE(), f = lS(), p = (0, B.useRef)(!1), m = (0, B.useMemo)(() => c_e(e.code || "", e.release_date), [e.code, e.release_date]);
+function m_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSource: a }) {
+ let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(typeof IntersectionObserver > "u"), [l, u] = (0, B.useState)([]), d = AE(), f = lS(), p = (0, B.useRef)(!1), m = (0, B.useMemo)(() => f_e(e.code || "", e.release_date), [e.code, e.release_date]);
(0, B.useEffect)(() => {
if (!o.current || s) return;
let e = new IntersectionObserver((t) => {
@@ -45869,15 +45944,15 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
],
queryFn: async ({ signal: t }) => {
let n = p.current, r = await G(`/api/wants/magnets?id=${e.id}${n ? "&refresh=1" : ""}`, t);
- return p.current = n && r.state === "busy", l_e(e.code || "", r), r;
+ return p.current = n && r.state === "busy", p_e(e.code || "", r), r;
},
initialData: m?.result,
initialDataUpdatedAt: m?.saved,
enabled: s,
retry: !1,
- staleTime: (t) => Date.now() - t.state.dataUpdatedAt < (t.state.data?.state === "error" ? 6e4 : dL(e.release_date)) ? Infinity : 0,
+ staleTime: (t) => Date.now() - t.state.dataUpdatedAt < (t.state.data?.state === "error" ? 6e4 : uL(e.release_date)) ? Infinity : 0,
gcTime: 864e5,
- refetchOnMount: (t) => Date.now() - t.state.dataUpdatedAt >= (t.state.data?.state === "error" ? 6e4 : dL(e.release_date)) && "always",
+ refetchOnMount: (t) => Date.now() - t.state.dataUpdatedAt >= (t.state.data?.state === "error" ? 6e4 : uL(e.release_date)) && "always",
refetchOnWindowFocus: !1,
refetchInterval: (e) => e.state.data?.state === "busy" && 3e3
});
@@ -45886,7 +45961,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
}, [h.data?.source_url, a]);
let g = n?.providers.find((e) => e.key === r && e.configured), _ = (r) => {
t || !n?.available || !g || r.protocol !== "magnet" || d.run(r.id, async (t) => {
- let n = await K(Zk, {
+ let n = await K(nD, {
magnet: r.uri,
provider: g.key,
target: g.target,
@@ -45897,7 +45972,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
if (!n.ok) throw Error(n.task.failure_detail || n.task.failure_label || "添加下载失败");
return n;
}, (e) => {
- u((e) => [...e, r.id]), i(e.outcome === "submitted" ? `已添加下载:${r.name}` : `已关联现有下载:${r.name}`), f.invalidateQueries({ queryKey: Qk });
+ u((e) => [...e, r.id]), i(e.outcome === "submitted" ? `已添加下载:${r.name}` : `已关联现有下载:${r.name}`), f.invalidateQueries({ queryKey: rD });
});
}, v = (e) => {
d.run(`copy:${e.id}`, () => navigator.clipboard.writeText(e.uri), () => i("已复制链接"));
@@ -45915,7 +45990,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
}), /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: wT,
+ leadingIcon: CT,
...X(y),
onClick: () => {
y || (p.current = !0, h.refetch());
@@ -45957,13 +46032,13 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
color: e.protocol === "magnet" ? "blue" : e.protocol === "ed2k" ? "purple" : "neutral",
children: /* @__PURE__ */ (0, V.jsxs)("span", {
className: "inline-flex items-center gap-1",
- children: [e.protocol === "magnet" ? /* @__PURE__ */ (0, V.jsx)(bae, {
+ children: [e.protocol === "magnet" ? /* @__PURE__ */ (0, V.jsx)(xae, {
"aria-hidden": !0,
className: "size-3.5"
- }) : e.protocol === "ed2k" ? /* @__PURE__ */ (0, V.jsx)(iae, {
+ }) : e.protocol === "ed2k" ? /* @__PURE__ */ (0, V.jsx)(aae, {
"aria-hidden": !0,
className: "size-3.5"
- }) : /* @__PURE__ */ (0, V.jsx)(ST, {
+ }) : /* @__PURE__ */ (0, V.jsx)(xT, {
"aria-hidden": !0,
className: "size-3.5"
}), e.protocol === "magnet" ? "磁链" : e.protocol === "ed2k" ? "ed2k" : "网页链接"]
@@ -45975,24 +46050,24 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
}), /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap gap-x-3 gap-y-1 break-words text-caption-1-regular text-text-secondary",
children: [
- /* @__PURE__ */ (0, V.jsx)(pL, {
- icon: ST,
+ /* @__PURE__ */ (0, V.jsx)(fL, {
+ icon: xT,
children: e.source
}),
- /* @__PURE__ */ (0, V.jsx)(pL, {
- icon: bT,
+ /* @__PURE__ */ (0, V.jsx)(fL, {
+ icon: yT,
children: e.size || "大小未知"
}),
- e.files ? /* @__PURE__ */ (0, V.jsx)(pL, {
- icon: aae,
+ e.files ? /* @__PURE__ */ (0, V.jsx)(fL, {
+ icon: oae,
children: e.files.replaceAll("個", "个")
}) : null,
- /* @__PURE__ */ (0, V.jsx)(pL, {
+ /* @__PURE__ */ (0, V.jsx)(fL, {
icon: eae,
children: e.date ? `${e.source === "JavDB 评论" ? "评论" : "收录"} ${e.date}` : "日期未知"
}),
- e.attributes.map((e) => /* @__PURE__ */ (0, V.jsx)(pL, {
- icon: CT,
+ e.attributes.map((e) => /* @__PURE__ */ (0, V.jsx)(fL, {
+ icon: ST,
children: e
}, e))
]
@@ -46004,7 +46079,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
"data-button-link": "",
variant: "secondary",
size: "small",
- trailingIcon: vT,
+ trailingIcon: _T,
href: e.source_url,
target: "_blank",
rel: "noopener noreferrer",
@@ -46013,7 +46088,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
/* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: rae,
+ leadingIcon: iae,
...X(d.busy === `copy:${e.id}`),
onClick: () => v(e),
children: "复制链接"
@@ -46021,7 +46096,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
e.protocol === "magnet" ? /* @__PURE__ */ (0, V.jsx)(J, {
variant: "primary",
size: "small",
- leadingIcon: mT,
+ leadingIcon: nae,
disabled: t || !n?.available || !g || r,
...X(d.busy === e.id),
onClick: () => _(e),
@@ -46034,7 +46109,7 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("ul", {
className: "flex min-w-0 flex-col gap-4",
children: e.slice(0, 3)
- }), e.length > 3 ? /* @__PURE__ */ (0, V.jsx)(Bk, {
+ }), e.length > 3 ? /* @__PURE__ */ (0, V.jsx)(GE, {
summary: `更多资源(${e.length - 3} 条)`,
children: /* @__PURE__ */ (0, V.jsx)("ul", {
className: "flex min-w-0 flex-col gap-4",
@@ -46047,41 +46122,41 @@ function u_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSour
}
//#endregion
//#region src/react/wants/wants.ts
-var mL = "/api/wants", hL = ["wants"], d_e = (e) => [
+var pL = "/api/wants", mL = ["wants"], h_e = (e) => [
"wants",
"follow",
e
-], f_e = [
+], g_e = [
["searching", "待找"],
["unreleased", "未发售"],
["given_up", "暂时放弃"],
["acquired", "已入库"]
-], p_e = (e) => G(mL, e), m_e = (e, t) => G(`${mL}?follow=${encodeURIComponent(e)}`, t), gL = (e, t) => K(mL, {
+], __e = (e) => G(pL, e), v_e = (e, t) => G(`${pL}?follow=${encodeURIComponent(e)}`, t), hL = (e, t) => K(pL, {
action: "add",
...e
-}, "POST", t), _L = (e, t) => K(mL, {
+}, "POST", t), gL = (e, t) => K(pL, {
action: "remove",
ids: e
-}, "POST", t), h_e = (e, t) => K(mL, {
+}, "POST", t), y_e = (e, t) => K(pL, {
action: "reset",
ids: e
-}, "POST", t), vL = () => z.invalidateQueries({ queryKey: hL }), yL = (e) => e.code || e.title || `关注条目 ${e.follow_item_id ?? e.id}`;
-function g_e(e) {
+}, "POST", t), _L = () => z.invalidateQueries({ queryKey: mL }), vL = (e) => e.code || e.title || `关注条目 ${e.follow_item_id ?? e.id}`;
+function b_e(e) {
return e.phase === "acquired" ? e.acquired_at ? `入库于 ${e.acquired_at.slice(0, 10)}` : "已入库" : e.phase === "unreleased" ? e.release_date ? `${e.release_date} 发售` : "还没发售" : e.phase === "given_up" ? `查过 ${e.search_count} 次都没找到` : e.fresh ? "新片:查不到也一直留在待找" : e.search_count ? `查过 ${e.search_count} 次` : "还没查过";
}
//#endregion
//#region src/react/wants/want-list.tsx
-var __e = {
+var x_e = {
code: "手动添加",
feed: "Feed 新作",
follow: "关注"
-}, bL = (e) => [
+}, yL = (e) => [
e.release_date,
e.studio,
e.performers,
- __e[e.origin]
+ x_e[e.origin]
].filter(Boolean).join(" · ");
-function v_e({ want: e }) {
+function S_e({ want: e }) {
return /* @__PURE__ */ (0, V.jsxs)("span", {
className: "relative inline-grid w-card-cover shrink-0 aspect-card-cover place-items-center overflow-hidden rounded-2lg bg-background-tertiary-default max-sm:w-24",
children: [/* @__PURE__ */ (0, V.jsx)("span", {
@@ -46097,7 +46172,7 @@ function v_e({ want: e }) {
}) : null]
});
}
-function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDownload: a, downloads: o, provider: s, toast: c }) {
+function C_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDownload: a, downloads: o, provider: s, toast: c }) {
let [l, u] = (0, B.useState)(""), d = e.link || l || (e.code ? `https://javdb.com/search?q=${encodeURIComponent(e.code)}&f=all` : "");
return /* @__PURE__ */ (0, V.jsxs)("li", {
"data-want-id": e.id,
@@ -46107,27 +46182,27 @@ function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
}),
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 items-start gap-4 max-sm:gap-3",
- children: [/* @__PURE__ */ (0, V.jsx)(v_e, { want: e }), /* @__PURE__ */ (0, V.jsxs)("div", {
+ children: [/* @__PURE__ */ (0, V.jsx)(S_e, { want: e }), /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-1",
children: [
/* @__PURE__ */ (0, V.jsxs)("p", {
className: "flex min-w-0 flex-wrap items-baseline gap-x-2",
children: [/* @__PURE__ */ (0, V.jsx)("b", {
className: "text-headline-medium text-text-primary",
- children: yL(e)
+ children: vL(e)
}), e.code && e.title ? /* @__PURE__ */ (0, V.jsx)("span", {
className: "min-w-0 truncate text-body-2-regular text-text-secondary",
children: e.title
}) : null]
}),
- bL(e) ? /* @__PURE__ */ (0, V.jsx)("p", {
+ yL(e) ? /* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: bL(e)
+ children: yL(e)
}) : null,
!e.code || e.phase === "unreleased" || e.phase === "acquired" ? /* @__PURE__ */ (0, V.jsx)("p", {
"data-want-note": "",
className: "text-caption-1-regular text-text-secondary",
- children: g_e(e)
+ children: b_e(e)
}) : null,
e.scrape_error ? /* @__PURE__ */ (0, V.jsxs)("p", {
className: "text-caption-1-regular text-text-secondary",
@@ -46140,7 +46215,7 @@ function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
"data-button-link": "",
variant: "secondary",
size: "small",
- trailingIcon: vT,
+ trailingIcon: _T,
href: d,
target: "_blank",
rel: "noopener noreferrer",
@@ -46149,10 +46224,9 @@ function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
e.phase === "searching" || e.phase === "given_up" ? /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: mT,
disabled: t,
onClick: a,
- children: "云下载"
+ children: "搜索资源"
}) : null,
e.phase === "given_up" ? /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
@@ -46165,7 +46239,7 @@ function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
/* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: _T,
+ leadingIcon: gT,
disabled: t,
...X(n === `remove:${e.id}`),
onClick: i,
@@ -46175,7 +46249,7 @@ function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
})
]
})]
- }), e.code && (e.phase === "searching" || e.phase === "given_up") ? /* @__PURE__ */ (0, V.jsx)(u_e, {
+ }), e.code && (e.phase === "searching" || e.phase === "given_up") ? /* @__PURE__ */ (0, V.jsx)(m_e, {
want: e,
readOnly: t,
downloads: o,
@@ -46185,31 +46259,31 @@ function y_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
}) : null]
});
}
-function b_e({ readOnly: e, toast: t, cloudDownload: n }) {
- let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(""), s = AE(), c = TS({
- queryKey: hL,
- queryFn: ({ signal: e }) => p_e(e),
+function w_e({ readOnly: e, toast: t }) {
+ let [n, r] = (0, B.useState)(""), [i, a] = (0, B.useState)(null), [o, s] = (0, B.useState)(""), c = AE(), l = TS({
+ queryKey: mL,
+ queryFn: ({ signal: e }) => __e(e),
refetchInterval: (e) => e.state.data?.scraping ? 3e3 : !1
- }), l = () => {
- let n = r.trim();
- !n || e || s.run("add", (e) => gL({ code: n }, e), (e) => {
- t(e.created ? `已加入想要:${yL(e.want)}` : `${yL(e.want)} 已经在想要里`), i(""), vL();
+ }), u = () => {
+ let i = n.trim();
+ !i || e || c.run("add", (e) => hL({ code: i }, e), (e) => {
+ t(e.created ? `已加入想要:${vL(e.want)}` : `${vL(e.want)} 已经在想要里`), r(""), _L();
});
- }, u = (e) => {
- e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), l());
}, d = (e) => {
- s.run(`remove:${e.id}`, (t) => _L([e.id], t), () => {
- t(`已移除:${yL(e)}`), vL();
- });
+ e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), u());
}, f = (e) => {
- s.run(`reset:${e.id}`, (t) => h_e([e.id], t), () => {
- t(`${yL(e)} 回到待找`), vL();
+ c.run(`remove:${e.id}`, (t) => gL([e.id], t), () => {
+ t(`已移除:${vL(e)}`), _L();
});
- }, p = c.data, m = p?.items || [], h = TS({
- queryKey: Qk,
- queryFn: ({ signal: e }) => G(`${Zk}?limit=100`, e),
- enabled: m.some((e) => e.code && (e.phase === "searching" || e.phase === "given_up"))
- }), g = h.data?.providers.filter((e) => e.configured) || [], _ = g.find((e) => e.key === a)?.key || g[0]?.key || "";
+ }, p = (e) => {
+ c.run(`reset:${e.id}`, (t) => y_e([e.id], t), () => {
+ t(`${vL(e)} 回到待找`), _L();
+ });
+ }, m = l.data, h = m?.items || [], g = TS({
+ queryKey: rD,
+ queryFn: ({ signal: e }) => G(`${nD}?limit=100`, e),
+ enabled: h.some((e) => e.code && (e.phase === "searching" || e.phase === "given_up"))
+ }), _ = g.data?.providers.filter((e) => e.configured) || [], v = _.find((e) => e.key === o)?.key || _[0]?.key || "";
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-8",
children: [
@@ -46227,122 +46301,136 @@ function b_e({ readOnly: e, toast: t, cloudDownload: n }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-64 grow max-sm:min-w-0",
- children: /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: /* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "番号",
placeholder: "输入番号,例如 SSIS-950",
- value: r,
+ value: n,
isDisabled: e,
- onChange: i,
- onKeyDown: u
+ onChange: r,
+ onKeyDown: d
})
}), /* @__PURE__ */ (0, V.jsx)(J, {
variant: "primary",
- disabled: e || !r.trim(),
- ...X(s.busy === "add"),
- onClick: l,
+ disabled: e || !n.trim(),
+ ...X(c.busy === "add"),
+ onClick: u,
children: "添加"
})]
}),
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: "Feed 新作卡和关注详情上点「想要」也会加到这里。文件扫进库后自动挪到「已入库」。" }),
- s.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: "Feed 新作卡和关注详情上点「想要」也会加到这里。文件扫进库后自动挪到「已入库」。" }),
+ c.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "这一次没有完成",
- children: s.error
+ children: c.error
}) : null
]
}),
- c.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ l.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "想要清单读取失败",
- children: W(c.error)
+ children: W(l.error)
}) : null,
- p?.scraping ? /* @__PURE__ */ (0, V.jsx)(Pk, {
+ m?.scraping ? /* @__PURE__ */ (0, V.jsx)(zE, {
role: "status",
children: "正在给刚加入的番号取资料与封面。"
}) : null,
- g.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
+ _.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-medium text-text-primary",
children: "下载到"
}),
- /* @__PURE__ */ (0, V.jsx)(Ck, {
- "aria-label": "下载到",
- selectedKey: _,
- onSelectionChange: (e) => o(String(e)),
- children: g.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
- id: e.key,
- children: e.label
- }, e.key))
+ /* @__PURE__ */ (0, V.jsxs)("div", {
+ className: "flex flex-wrap items-center gap-2",
+ children: [/* @__PURE__ */ (0, V.jsx)(EM, {
+ "aria-label": "下载到",
+ selectedKey: v,
+ onSelectionChange: (e) => s(String(e)),
+ children: _.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
+ id: e.key,
+ children: e.label
+ }, e.key))
+ }), /* @__PURE__ */ (0, V.jsx)(J, {
+ variant: "secondary",
+ disabled: e,
+ onClick: () => a({}),
+ children: "提交磁力"
+ })]
}),
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: g.find((e) => e.key === _)?.target || "使用已配置的目标目录" })
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: _.find((e) => e.key === v)?.target || "使用已配置的目标目录" })
]
}) : null,
- h.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ g.error ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "下载配置未取得",
- children: W(h.error)
+ children: W(g.error)
}) : null,
- h.data && !g.length ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ g.data && !_.length ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
- children: "请先在配置页设置 115 或 PikPak 云下载。"
+ children: "先在配置页「下载」分组登录 PikPak,或填好 CloudDrive2 的地址与令牌。"
}) : null,
- h.data && !h.data.available ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ g.data && !g.data.available ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "neutral",
children: "云下载只在账本写入端可用。"
}) : null,
- p && !m.length ? /* @__PURE__ */ (0, V.jsx)(TE, {
+ m && !h.length ? /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: hae,
+ icon: gae,
title: "还没有想要的作品",
children: "在上面输入番号,或在 Feed 新作卡、关注详情上点「想要」。"
}) : null,
- f_e.map(([r, i]) => {
- let a = m.filter((e) => e.phase === r);
- return a.length ? /* @__PURE__ */ (0, V.jsxs)("section", {
- "aria-label": i,
- "data-want-phase": r,
+ g_e.map(([n, r]) => {
+ let i = h.filter((e) => e.phase === n);
+ return i.length ? /* @__PURE__ */ (0, V.jsxs)("section", {
+ "aria-label": r,
+ "data-want-phase": n,
className: "flex flex-col gap-4",
children: [/* @__PURE__ */ (0, V.jsxs)("h3", {
className: "flex items-baseline gap-2 text-title-2-medium text-text-primary",
- children: [i, /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [r, /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular tabular-nums text-text-secondary",
- children: a.length
+ children: i.length
})]
}), /* @__PURE__ */ (0, V.jsx)("ul", {
className: "flex flex-col gap-4",
- children: a.map((r) => /* @__PURE__ */ (0, V.jsx)(y_e, {
- want: r,
+ children: i.map((n) => /* @__PURE__ */ (0, V.jsx)(C_e, {
+ want: n,
readOnly: e,
- busy: s.busy,
- downloads: h.data,
- provider: _,
+ busy: c.busy,
+ downloads: g.data,
+ provider: v,
toast: t,
- onReset: () => f(r),
- onRemove: () => d(r),
- onCloudDownload: () => n({
- code: r.code || "",
- title: r.title || "",
- origin: `wishlist:${r.id}`
+ onReset: () => p(n),
+ onRemove: () => f(n),
+ onCloudDownload: () => a({
+ code: n.code || "",
+ title: n.title || "",
+ origin: `wishlist:${n.id}`
})
- }, r.id))
+ }, n.id))
})]
- }, r) : null;
+ }, n) : null;
+ }),
+ /* @__PURE__ */ (0, V.jsx)(sL, {
+ prefill: i,
+ close: () => a(null),
+ receipt: t,
+ provider: v
})
]
});
}
//#endregion
//#region src/react/follow-manage/follow-manage-page.tsx
-var xL = [
+var bL = [
["list", "关注列表"],
["add", "添加关注"],
["feeds", "JAV 订阅源"],
["wants", "JAV 入库"],
["source", "来源和凭证"]
-], SL = (e) => xL.some(([t]) => t === e);
-function CL({ term: e, figure: t, unit: n }) {
+], xL = (e) => bL.some(([t]) => t === e);
+function SL({ term: e, figure: t, unit: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: wE({
padding: "none",
@@ -46360,179 +46448,178 @@ function CL({ term: e, figure: t, unit: n }) {
})]
});
}
-function x_e(e) {
- let { route: t, savePreference: n, toast: r, openFollow: i, cloudDownload: a, readOnly: o, readOnlyMessage: s, writerUrl: c } = e, [l, u] = (0, B.useState)(SL(e.tab) ? e.tab : "list"), [d, f] = (0, B.useState)(Math.max(1, Math.floor(e.page) || 1)), [p, m] = (0, B.useState)(() => FP(e.sort, e.dir).sort), [h, g] = (0, B.useState)(() => FP(e.sort, e.dir).dir), [_, v] = (0, B.useState)(Mme(e.layout) ? e.layout : "default"), [y, b] = (0, B.useState)(Nme(e.pageSize)), [x, S] = (0, B.useState)(/* @__PURE__ */ new Set()), C = TS({
- queryKey: WP,
- queryFn: ({ signal: e }) => lF(e)
+function T_e(e) {
+ let { route: t, savePreference: n, toast: r, openFollow: i, readOnly: a, readOnlyMessage: o, writerUrl: s } = e, [c, l] = (0, B.useState)(xL(e.tab) ? e.tab : "list"), [u, d] = (0, B.useState)(Math.max(1, Math.floor(e.page) || 1)), [f, p] = (0, B.useState)(() => MP(e.sort, e.dir).sort), [m, h] = (0, B.useState)(() => MP(e.sort, e.dir).dir), [g, _] = (0, B.useState)(kme(e.layout) ? e.layout : "default"), [v, y] = (0, B.useState)(Ame(e.pageSize)), [b, x] = (0, B.useState)(/* @__PURE__ */ new Set()), S = TS({
+ queryKey: VP,
+ queryFn: ({ signal: e }) => oF(e)
+ }), C = TS({
+ queryKey: HP,
+ queryFn: ({ signal: e }) => sF(e)
}), w = TS({
- queryKey: GP,
- queryFn: ({ signal: e }) => uF(e)
- }), T = TS({
- queryKey: KP,
- queryFn: ({ signal: e }) => hF(e)
- }), E = C.data || { sources: [] }, D = w.data || {
+ queryKey: UP,
+ queryFn: ({ signal: e }) => fF(e)
+ }), T = S.data || { sources: [] }, E = C.data || {
root: "",
providers: []
- }, O = E.sources;
+ }, D = T.sources;
(0, B.useEffect)(() => {
- S((e) => {
- let t = zme(e, O);
+ x((e) => {
+ let t = Ime(e, D);
return t.size === e.size ? e : t;
});
- }, [O]);
- let k = (e) => {
- let n = e.sort ?? p, r = e.dir ?? h;
+ }, [D]);
+ let O = (e) => {
+ let n = e.sort ?? f, r = e.dir ?? m;
t({
- tab: e.tab ?? l,
- page: e.page ?? d,
+ tab: e.tab ?? c,
+ page: e.page ?? u,
sort: n === "checked" ? "" : n,
- dir: r === PP[n] ? "" : r
+ dir: r === jP[n] ? "" : r
});
- }, A = aF(O), j = O.filter(ZP).length, M = O.filter((e) => e.enabled).length, N = (D.providers || []).filter((e) => e.requirement === "required" && !wF(e)).length, P = new Set((T.data?.sources || []).map((e) => e.entity_id ?? `source-${e.id}`)).size;
+ }, k = nF(D), A = D.filter(JP).length, j = D.filter((e) => e.enabled).length, M = (E.providers || []).filter((e) => e.requirement === "required" && !xF(e)).length, N = new Set((w.data?.sources || []).map((e) => e.entity_id ?? `source-${e.id}`)).size;
return /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
- o ? /* @__PURE__ */ (0, V.jsx)(Y, {
+ a ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "warning",
title: "本机只能浏览",
- extra: c ? /* @__PURE__ */ (0, V.jsx)("p", {
+ extra: s ? /* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular",
children: /* @__PURE__ */ (0, V.jsx)("a", {
- href: c,
+ href: s,
className: "text-text-primary underline underline-offset-2",
children: "前往写入端管理关注"
})
}) : void 0,
- children: s
+ children: o
}) : null,
/* @__PURE__ */ (0, V.jsxs)("div", {
- className: hde,
+ className: rde,
"aria-label": "关注概览",
children: [
- /* @__PURE__ */ (0, V.jsx)(CL, {
+ /* @__PURE__ */ (0, V.jsx)(SL, {
term: "关注创作者",
- figure: A.length,
+ figure: k.length,
unit: "位"
}),
- /* @__PURE__ */ (0, V.jsx)(CL, {
+ /* @__PURE__ */ (0, V.jsx)(SL, {
term: "启用来源",
- figure: M,
- unit: `/ ${O.length}`
+ figure: j,
+ unit: `/ ${D.length}`
}),
- /* @__PURE__ */ (0, V.jsx)(CL, {
+ /* @__PURE__ */ (0, V.jsx)(SL, {
term: "检查失败",
- figure: j,
+ figure: A,
unit: "个来源"
}),
- /* @__PURE__ */ (0, V.jsx)(CL, {
+ /* @__PURE__ */ (0, V.jsx)(SL, {
term: "未看更新",
- figure: E.counts?.new || 0,
+ figure: T.counts?.new || 0,
unit: "条"
}),
- /* @__PURE__ */ (0, V.jsx)(CL, {
+ /* @__PURE__ */ (0, V.jsx)(SL, {
term: "JAV 订阅",
- figure: P,
+ figure: N,
unit: "位"
}),
- /* @__PURE__ */ (0, V.jsx)(CL, {
+ /* @__PURE__ */ (0, V.jsx)(SL, {
term: "未看新作",
- figure: T.data?.unread || 0,
+ figure: w.data?.unread || 0,
unit: "条"
})
]
}),
- /* @__PURE__ */ (0, V.jsxs)(lk, {
- selectedKey: l,
+ /* @__PURE__ */ (0, V.jsxs)(Jk, {
+ selectedKey: c,
onSelectionChange: (e) => {
let t = String(e);
- SL(t) && (u(t), k({ tab: t }));
+ xL(t) && (l(t), O({ tab: t }));
},
className: "flex flex-col gap-6",
children: [
- /* @__PURE__ */ (0, V.jsx)(uk, {
+ /* @__PURE__ */ (0, V.jsx)(Yk, {
"aria-label": "关注管理区域",
"data-section-nav": !0,
"data-section-items": !0,
className: "flex max-w-full flex-nowrap overflow-x-auto",
- children: xL.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(dk, {
+ children: bL.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(Xk, {
id: e,
className: "cursor-pointer whitespace-nowrap",
- children: e === "source" && N ? `${t}(${N})` : t
+ children: e === "source" && M ? `${t}(${M})` : t
}, e))
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "list",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, V.jsx)(Qge, {
- data: E,
- sort: p,
- dir: h,
- page: d,
- layout: _,
- pageSize: y,
- selected: x,
- readOnly: o,
+ children: /* @__PURE__ */ (0, V.jsx)(Yge, {
+ data: T,
+ sort: f,
+ dir: m,
+ page: u,
+ layout: g,
+ pageSize: v,
+ selected: b,
+ readOnly: a,
toast: r,
openFollow: i,
onSort: (e, t) => {
- m(e), g(t), f(1), k({
+ p(e), h(t), d(1), O({
sort: e,
dir: t,
page: 1
});
},
onPage: (e) => {
- f(e), k({ page: e });
+ d(e), O({ page: e });
},
- onSelected: S,
+ onSelected: x,
onLayout: (e) => {
- v(e), f(1), n({ layout: e }), k({ page: 1 });
+ _(e), d(1), n({ layout: e }), O({ page: 1 });
},
onPageSize: (e) => {
- b(e), f(1), n({ pageSize: e }), k({ page: 1 });
+ y(e), d(1), n({ pageSize: e }), O({ page: 1 });
}
})
}),
- /* @__PURE__ */ (0, V.jsxs)(fk, {
+ /* @__PURE__ */ (0, V.jsxs)(Zk, {
id: "add",
className: "flex flex-col gap-8",
- children: [/* @__PURE__ */ (0, V.jsx)(Jhe, {
- data: E,
- credentials: D,
- readOnly: o,
+ children: [/* @__PURE__ */ (0, V.jsx)(Ghe, {
+ data: T,
+ credentials: E,
+ readOnly: a,
toast: r,
openCredentials: () => {
- u("source"), k({ tab: "source" });
+ l("source"), O({ tab: "source" });
}
- }), /* @__PURE__ */ (0, V.jsx)(Zhe, {
- groups: E.author_aliases || [],
- readOnly: o,
+ }), /* @__PURE__ */ (0, V.jsx)(Jhe, {
+ groups: T.author_aliases || [],
+ readOnly: a,
toast: r,
- suggestions: E.alias_suggestions || [],
- sources: E.sources
+ suggestions: T.alias_suggestions || [],
+ sources: T.sources
})]
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "feeds",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, V.jsx)(s_e, {
- readOnly: o,
+ children: /* @__PURE__ */ (0, V.jsx)(i_e, {
+ readOnly: a,
toast: r
})
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "wants",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, V.jsx)(b_e, {
- readOnly: o,
- toast: r,
- cloudDownload: a
+ children: /* @__PURE__ */ (0, V.jsx)(w_e, {
+ readOnly: a,
+ toast: r
})
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "source",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, V.jsx)(oge, {
- data: D,
- readOnly: o,
+ children: /* @__PURE__ */ (0, V.jsx)(rge, {
+ data: E,
+ readOnly: a,
toast: r
})
})
@@ -46542,15 +46629,15 @@ function x_e(e) {
}
//#endregion
//#region src/react/components/board-tabs.tsx
-function wL({ value: e }) {
+function CL({ value: e }) {
return /* @__PURE__ */ (0, V.jsx)("span", {
"data-tab-count": "",
className: "ml-1.5 inline-block rounded-sm bg-text-primary/10 px-1 py-px text-caption-1-medium text-text-primary opacity-50",
children: e.toLocaleString()
});
}
-var S_e = "relative z-1 flex flex-none cursor-pointer items-center whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring aria-selected:font-medium aria-selected:text-border-focus-ring max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
-function TL({ tabs: e, value: t, label: n, onChange: r }) {
+var E_e = "relative z-1 flex flex-none cursor-pointer items-center whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring aria-selected:font-medium aria-selected:text-border-focus-ring max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
+function wL({ tabs: e, value: t, label: n, onChange: r }) {
let i = (0, B.useRef)(null), a = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
let e = i.current;
@@ -46578,14 +46665,14 @@ function TL({ tabs: e, value: t, label: n, onChange: r }) {
},
className: "relative mb-5.5 flex flex-none gap-1 overflow-x-auto border-b border-border-button-default max-board-narrow:gap-0",
children: [e.map((e) => {
- let n = e.symbol ? vA(e.symbol) : null, i = e.value === t;
+ let n = e.symbol ? oA(e.symbol) : null, i = e.value === t;
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
role: "tab",
"data-tab": e.value,
"aria-selected": i,
tabIndex: i ? 0 : -1,
- className: S_e,
+ className: E_e,
onClick: () => {
i || r(e.value);
},
@@ -46601,23 +46688,23 @@ function TL({ tabs: e, value: t, label: n, onChange: r }) {
}
//#endregion
//#region src/react/index/index-tags.tsx
-var EL = () => /* @__PURE__ */ (0, V.jsx)("span", {
+var TL = () => /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
"data-tag-dot": "",
className: "size-1.75 flex-none rounded-full"
});
-function C_e({ tag: e, actions: t }) {
+function D_e({ tag: e, actions: t }) {
let n = t.picked.has(e.k);
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-alpha-tag": "",
"data-k": e.k,
- "data-tag-cat": ON(t.online, e.cat),
+ "data-tag-cat": EN(t.online, e.cat),
"aria-pressed": n,
onClick: () => t.press(e.k),
className: "flex h-9 min-w-0 cursor-pointer items-center gap-2.25 rounded-lg px-2.5 text-left text-body-regular text-text-secondary outline-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: [
- /* @__PURE__ */ (0, V.jsx)(EL, {}),
+ /* @__PURE__ */ (0, V.jsx)(TL, {}),
/* @__PURE__ */ (0, V.jsx)("span", {
className: "min-w-0 flex-1 truncate",
children: e.label
@@ -46629,7 +46716,7 @@ function C_e({ tag: e, actions: t }) {
]
});
}
-function w_e({ groups: e, actions: t }) {
+function O_e({ groups: e, actions: t }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-alphabet": "",
className: "flex flex-col gap-4",
@@ -46642,10 +46729,10 @@ function w_e({ groups: e, actions: t }) {
}),
children: [/* @__PURE__ */ (0, V.jsxs)("h3", {
className: "mb-2 flex items-center text-title-2-medium text-text-primary",
- children: [e, /* @__PURE__ */ (0, V.jsx)(wL, { value: n.length })]
+ children: [e, /* @__PURE__ */ (0, V.jsx)(CL, { value: n.length })]
}), /* @__PURE__ */ (0, V.jsx)("div", {
className: "index-tag-list gap-x-4 gap-y-0.5",
- children: n.map((e) => /* @__PURE__ */ (0, V.jsx)(C_e, {
+ children: n.map((e) => /* @__PURE__ */ (0, V.jsx)(D_e, {
tag: e,
actions: t
}, e.k))
@@ -46653,8 +46740,8 @@ function w_e({ groups: e, actions: t }) {
}, e))
});
}
-var T_e = "\xA0";
-function E_e({ tags: e, actions: t }) {
+var k_e = "\xA0";
+function A_e({ tags: e, actions: t }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-tag-cloud": "",
className: "flex flex-wrap gap-1.75",
@@ -46662,11 +46749,11 @@ function E_e({ tags: e, actions: t }) {
type: "button",
"data-tag-chip": "",
"data-k": e.k,
- "data-tag-cat": ON(t.online, e.cat),
+ "data-tag-cat": EN(t.online, e.cat),
"aria-pressed": t.picked.has(e.k),
onClick: () => t.press(e.k),
className: "inline-flex cursor-pointer items-center rounded-lg border px-3 py-1.25 text-body-2-regular text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [e.label + T_e, /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [e.label + k_e, /* @__PURE__ */ (0, V.jsx)("span", {
"data-tag-n": "",
className: "text-caption-1-regular opacity-60",
children: e.n.toLocaleString()
@@ -46674,7 +46761,7 @@ function E_e({ tags: e, actions: t }) {
}, e.k))
});
}
-var D_e = [[
+var j_e = [[
"cloud",
"标签云",
"tags"
@@ -46683,16 +46770,16 @@ var D_e = [[
"字母表",
"text-aa"
]];
-function O_e({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c }) {
- return /* @__PURE__ */ (0, V.jsx)(oA, {
+function M_e({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c }) {
+ return /* @__PURE__ */ (0, V.jsx)(fD, {
label: "标签筛选",
topLabel: "标签类型",
- top: e.map(([e, r]) => /* @__PURE__ */ (0, V.jsxs)(sA, {
+ top: e.map(([e, r]) => /* @__PURE__ */ (0, V.jsxs)(pD, {
"data-tag-pill": "",
- "data-tag-cat": e === "all" ? "all" : ON(n, e),
+ "data-tag-cat": e === "all" ? "all" : EN(n, e),
pressed: t === e,
onPress: () => o(e),
- children: [/* @__PURE__ */ (0, V.jsx)(EL, {}), r]
+ children: [/* @__PURE__ */ (0, V.jsx)(TL, {}), r]
}, e)),
bottom: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsx)("span", {
@@ -46711,19 +46798,19 @@ function O_e({ categories: e, category: t, online: n, readout: r, letters: i, vi
children: e
}, e))
}) : null,
- /* @__PURE__ */ (0, V.jsx)(PO, {
+ /* @__PURE__ */ (0, V.jsx)(yk, {
"aria-label": "标签视图",
orientation: "horizontal",
value: a,
onChange: (e) => c(e),
- className: `ml-auto ${hA}`,
- children: D_e.map(([e, t, n]) => {
- let r = vA(n);
- return /* @__PURE__ */ (0, V.jsx)(FO, {
+ className: `ml-auto ${rA}`,
+ children: j_e.map(([e, t, n]) => {
+ let r = oA(n);
+ return /* @__PURE__ */ (0, V.jsx)(bk, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: gA,
+ className: iA,
children: /* @__PURE__ */ (0, V.jsx)("span", {
title: t,
className: "contents",
@@ -46735,13 +46822,13 @@ function O_e({ categories: e, category: t, online: n, readout: r, letters: i, vi
] })
});
}
-function k_e({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
+function N_e({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
return /* @__PURE__ */ (0, V.jsxs)(tS, {
visible: e > 0,
label: "所选标签操作",
count: `已选 ${e} 个标签`,
children: [
- /* @__PURE__ */ (0, V.jsx)(BM, {
+ /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: t === "any",
onChange: (e) => n(e ? "any" : "all"),
children: /* @__PURE__ */ (0, V.jsxs)("span", {
@@ -46773,7 +46860,7 @@ function k_e({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
}
//#endregion
//#region src/react/index/index-page.tsx
-var A_e = [{
+var P_e = [{
value: "studios",
label: "厂牌",
symbol: "clapperboard"
@@ -46781,7 +46868,7 @@ var A_e = [{
value: "agencies",
label: "事务所",
symbol: "briefcase"
-}], j_e = [{
+}], F_e = [{
value: "local",
label: "本地",
symbol: "hard-drive"
@@ -46789,7 +46876,7 @@ var A_e = [{
value: "online",
label: "在线",
symbol: "rss"
-}], M_e = [
+}], I_e = [
{
value: "performers",
label: "艺人",
@@ -46805,7 +46892,7 @@ var A_e = [{
label: "在线",
symbol: "rss"
}
-], N_e = {
+], L_e = {
people: [[
"big",
"大图 · 竖幅头像",
@@ -46825,20 +46912,20 @@ var A_e = [{
"layout-grid"
]]
};
-function P_e({ kind: e, layout: t, onChange: n }) {
- return /* @__PURE__ */ (0, V.jsx)(fA, {
- "aria-label": `${gN[e]}索引版式`,
+function R_e({ kind: e, layout: t, onChange: n }) {
+ return /* @__PURE__ */ (0, V.jsx)(eA, {
+ "aria-label": `${mN[e]}索引版式`,
orientation: "horizontal",
value: t,
onChange: (e) => n(e),
"data-index-layout": "",
- className: `flex-none max-board-narrow:order-3 ${pA}`,
- children: N_e[SN(e) ? "company" : "people"].map(([e, t, n]) => {
- let r = vA(n);
- return /* @__PURE__ */ (0, V.jsx)(FO, {
+ className: `flex-none max-board-narrow:order-3 ${tA}`,
+ children: L_e[bN(e) ? "company" : "people"].map(([e, t, n]) => {
+ let r = oA(n);
+ return /* @__PURE__ */ (0, V.jsx)(bk, {
value: e,
"aria-label": t,
- className: tle,
+ className: Hce,
children: /* @__PURE__ */ (0, V.jsx)("span", {
title: t,
className: "contents",
@@ -46848,8 +46935,8 @@ function P_e({ kind: e, layout: t, onChange: n }) {
})
});
}
-var F_e = vA("search");
-function I_e({ label: e, value: t, onQuery: n }) {
+var z_e = oA("search");
+function B_e({ label: e, value: t, onQuery: n }) {
let [r, i] = (0, B.useState)(t), a = (0, B.useRef)(!1), o = (0, B.useRef)(void 0);
(0, B.useEffect)(() => () => clearTimeout(o.current), []);
let s = (e) => {
@@ -46864,15 +46951,15 @@ function I_e({ label: e, value: t, onQuery: n }) {
onCompositionEnd: (e) => {
a.current = !1, s(e.target.value);
},
- children: /* @__PURE__ */ (0, V.jsx)(hk, {
+ children: /* @__PURE__ */ (0, V.jsx)(HM, {
"aria-label": e,
value: r,
onChange: (e) => {
i(e), a.current || s(e);
},
- children: /* @__PURE__ */ (0, V.jsx)(_k, {
+ children: /* @__PURE__ */ (0, V.jsx)(WM, {
type: "search",
- leadingIcon: F_e,
+ leadingIcon: z_e,
spellCheck: !1,
autoComplete: "off",
onKeyDown: (e) => {
@@ -46882,14 +46969,14 @@ function I_e({ label: e, value: t, onQuery: n }) {
})
});
}
-function L_e(e) {
- let [t, n] = (0, B.useState)(() => CN({
+function V_e(e) {
+ let [t, n] = (0, B.useState)(() => xN({
kind: e.kind,
q: e.q,
scope: e.scope,
view: e.view,
category: e.category
- })), [r, i] = (0, B.useState)(e.layout), [a, o] = (0, B.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, B.useState)("any"), l = (0, B.useRef)(null), { kind: u, q: d, scope: f, view: p, category: m } = t, h = gN[u], g = u === "tags" && f === "online", _ = u === "performers" && f === "online";
+ })), [r, i] = (0, B.useState)(e.layout), [a, o] = (0, B.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, B.useState)("any"), l = (0, B.useRef)(null), { kind: u, q: d, scope: f, view: p, category: m } = t, h = mN[u], g = u === "tags" && f === "online", _ = u === "performers" && f === "online";
(0, B.useEffect)(() => {
(t.kind !== e.kind || t.scope !== e.scope || t.category !== e.category) && e.route(t, { replace: !0 });
}, []), (0, B.useEffect)(() => {
@@ -46901,7 +46988,7 @@ function L_e(e) {
...r
};
y(Object.keys(r).every((e) => e === "q")), n(a), e.route(a, { replace: i });
- }, x = DN(wN(t)), S = kS({
+ }, x = TN(SN(t)), S = kS({
queryKey: x.queryKey,
queryFn: ({ pageParam: e, signal: t }) => x.queryFn({
pageParam: e,
@@ -46910,7 +46997,7 @@ function L_e(e) {
initialPageParam: 0,
getNextPageParam: x.getNextPageParam,
placeholderData: v ? AS.keepPreviousData : void 0
- }), C = Vfe(S.data), w = !!S.hasNextPage && !S.isPlaceholderData, T = Hfe(C.length, !!S.hasNextPage), E = `${u}:${f}:${d}`, D = (0, B.useRef)(null), O = S.data?.pages[0]?.categories;
+ }), C = Lfe(S.data), w = !!S.hasNextPage && !S.isPlaceholderData, T = Rfe(C.length, !!S.hasNextPage), E = `${u}:${f}:${d}`, D = (0, B.useRef)(null), O = S.data?.pages[0]?.categories;
O && !S.isPlaceholderData && (D.current = {
key: E,
counts: O
@@ -46922,14 +47009,14 @@ function L_e(e) {
let j = (0, B.useMemo)(() => u === "tags" ? C.map((t) => ({
...t,
label: e.tagLabel(t.k)
- })) : [], [C, u]), M = (0, B.useMemo)(() => u === "tags" && p === "alphabet" ? Gfe(j, (t) => e.tagLabel(t)) : [], [
+ })) : [], [C, u]), M = (0, B.useMemo)(() => u === "tags" && p === "alphabet" ? Vfe(j, (t) => e.tagLabel(t)) : [], [
j,
p,
u
]), N = (t) => {
i(t), e.savePreference({ layout: t });
- }, P = u === "tags" ? /* @__PURE__ */ (0, V.jsx)(TL, {
- tabs: j_e,
+ }, P = u === "tags" ? /* @__PURE__ */ (0, V.jsx)(wL, {
+ tabs: F_e,
value: f,
label: "词表",
onChange: (e) => {
@@ -46939,8 +47026,8 @@ function L_e(e) {
view: e === "online" ? "alphabet" : p
});
}
- }) : SN(u) ? /* @__PURE__ */ (0, V.jsx)(TL, {
- tabs: A_e,
+ }) : bN(u) ? /* @__PURE__ */ (0, V.jsx)(wL, {
+ tabs: P_e,
value: u,
label: "公司类型",
onChange: (e) => b({ kind: e })
@@ -46957,7 +47044,7 @@ function L_e(e) {
let n = new Set(e);
return n.delete(t) || n.add(t), n;
});
- }, F = (g ? vN : _N).filter(A);
+ }, F = (g ? gN : hN).filter(A);
return /* @__PURE__ */ (0, V.jsxs)("div", {
ref: l,
"data-index-page": u,
@@ -46972,12 +47059,12 @@ function L_e(e) {
className: "flex items-center text-display-4-medium whitespace-nowrap text-text-primary max-board-narrow:text-title-1-medium",
children: h
}),
- xN(u) ? /* @__PURE__ */ (0, V.jsx)("span", {
+ yN(u) ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-index-count": "",
className: "text-caption-1-regular leading-5 whitespace-nowrap text-text-secondary tabular-nums",
children: S.isPending ? "" : T
}) : null,
- xN(u) ? /* @__PURE__ */ (0, V.jsx)(P_e, {
+ yN(u) ? /* @__PURE__ */ (0, V.jsx)(R_e, {
kind: u,
layout: r,
onChange: N
@@ -46986,7 +47073,7 @@ function L_e(e) {
"aria-hidden": !0,
className: "hidden h-0 basis-full max-board-narrow:order-2 max-board-narrow:block"
}),
- /* @__PURE__ */ (0, V.jsx)(I_e, {
+ /* @__PURE__ */ (0, V.jsx)(B_e, {
label: `过滤${h}`,
value: d,
onQuery: (e) => {
@@ -46995,8 +47082,8 @@ function L_e(e) {
})
]
}),
- u === "performers" || u === "creators" ? /* @__PURE__ */ (0, V.jsx)(TL, {
- tabs: M_e,
+ u === "performers" || u === "creators" ? /* @__PURE__ */ (0, V.jsx)(wL, {
+ tabs: I_e,
value: _ ? "online" : u,
label: "人物名册",
onChange: (t) => {
@@ -47011,7 +47098,7 @@ function L_e(e) {
u === "performers" && f === "local" ? /* @__PURE__ */ (0, V.jsx)("div", {
"aria-label": "身份分类",
className: "mb-4 flex flex-wrap gap-2",
- children: yN.filter((e) => e[0] === m || A(e)).map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(J, {
+ children: _N.filter((e) => e[0] === m || A(e)).map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(J, {
variant: m === e ? "primary" : "secondary",
size: "small",
"aria-pressed": m === e,
@@ -47019,7 +47106,7 @@ function L_e(e) {
children: t
}, e))
}) : null,
- u === "tags" ? /* @__PURE__ */ (0, V.jsx)(O_e, {
+ u === "tags" ? /* @__PURE__ */ (0, V.jsx)(M_e, {
categories: F,
category: m,
online: g,
@@ -47045,7 +47132,7 @@ function L_e(e) {
}) }
});
if (S.isError) return /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: vA("search"),
+ icon: oA("search"),
title: `没能读取${h}`,
actions: /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
@@ -47054,18 +47141,18 @@ function L_e(e) {
}),
children: ye(S.error)
});
- if (!C.length) return /* @__PURE__ */ (0, V.jsx)(z_e, {
+ if (!C.length) return /* @__PURE__ */ (0, V.jsx)(U_e, {
kind: u,
filtered: !!d || m !== "all",
online: g || _,
configurable: e.configurable
});
- if (_) return /* @__PURE__ */ (0, V.jsx)(qfe, {
+ if (_) return /* @__PURE__ */ (0, V.jsx)(Ufe, {
items: C,
layout: r,
props: e
});
- if (xN(u)) return /* @__PURE__ */ (0, V.jsx)(jN, {
+ if (yN(u)) return /* @__PURE__ */ (0, V.jsx)(kN, {
kind: u,
items: C,
layout: r,
@@ -47076,10 +47163,10 @@ function L_e(e) {
picked: a,
press: ee
};
- return p === "alphabet" ? /* @__PURE__ */ (0, V.jsx)(w_e, {
+ return p === "alphabet" ? /* @__PURE__ */ (0, V.jsx)(O_e, {
groups: M,
actions: t
- }) : /* @__PURE__ */ (0, V.jsx)(E_e, {
+ }) : /* @__PURE__ */ (0, V.jsx)(A_e, {
tags: j,
actions: t
});
@@ -47100,7 +47187,7 @@ function L_e(e) {
}) : "载入更多"
})
}) : null,
- u === "tags" && !g && e.selectMode ? /* @__PURE__ */ (0, V.jsx)(k_e, {
+ u === "tags" && !g && e.selectMode ? /* @__PURE__ */ (0, V.jsx)(N_e, {
count: a.size,
match: s,
onMatch: c,
@@ -47113,16 +47200,16 @@ function L_e(e) {
]
});
}
-var R_e = {
+var H_e = {
tags: "标签",
performers: "艺人",
creators: "卖家",
studios: "厂牌",
agencies: "事务所"
};
-function z_e({ kind: e, filtered: t, online: n, configurable: r }) {
+function U_e({ kind: e, filtered: t, online: n, configurable: r }) {
if (t) return /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: vA("search"),
+ icon: oA("search"),
title: "没有符合条件的内容",
actions: /* @__PURE__ */ (0, V.jsx)(CE, {
variant: "primary",
@@ -47131,13 +47218,13 @@ function z_e({ kind: e, filtered: t, online: n, configurable: r }) {
}),
children: "清除筛选或搜索条件后查看全部内容。"
});
- let i = n && e === "performers" ? "创作者" : R_e[e], a = /* @__PURE__ */ (0, V.jsx)(CE, {
+ let i = n && e === "performers" ? "创作者" : H_e[e], a = /* @__PURE__ */ (0, V.jsx)(CE, {
variant: !r || n ? "primary" : "secondary",
href: "/follow-manage?tab=add",
children: "添加关注"
});
return /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: vA(e === "tags" ? "tags" : "user-round"),
+ icon: oA(e === "tags" ? "tags" : "user-round"),
title: `还没有${i}`,
actions: n ? a : /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [r ? /* @__PURE__ */ (0, V.jsx)(J, {
variant: "primary",
@@ -47147,15 +47234,15 @@ function z_e({ kind: e, filtered: t, online: n, configurable: r }) {
children: n ? `添加关注来源并获取内容后,这里会显示来源上的${i}。` : "添加内容并补充资料后,这里会显示对应信息。"
});
}
-var DL = {
+var EL = {
video: ["视频", "play"],
image: ["图片", "pics"],
archive: ["压缩包", "file-archive"],
audio: ["音频", "file-audio"],
url: ["网址快捷方式", "globe"],
other: ["其它文件", "hard-drive"]
-}, B_e = (e) => DL[e.junk_kind || "other"] || DL.other;
-function V_e(e) {
+}, W_e = (e) => EL[e.junk_kind || "other"] || EL.other;
+function G_e(e) {
return e === "dismissed" ? {
operation: "reconsider-junk",
label: "重新判断",
@@ -47166,21 +47253,21 @@ function V_e(e) {
glyph: "check"
};
}
-var OL = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), H_e = (e, t) => [
+var DL = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), K_e = (e, t) => [
"junk-queue",
e.view,
e.kind,
t
];
-function U_e({ kind: e, view: t }) {
+function q_e({ kind: e, view: t }) {
let n = new URLSearchParams({
limit: "200",
status: t
});
return e && n.set("kind", e), n.toString();
}
-async function W_e(e, t) {
- let n = await G(`/api/ads?${U_e(e)}`, t);
+async function J_e(e, t) {
+ let n = await G(`/api/ads?${q_e(e)}`, t);
return {
...n,
items: n.items || []
@@ -47188,19 +47275,19 @@ async function W_e(e, t) {
}
//#endregion
//#region src/react/junk-queue/junk-card.tsx
-function kL({ name: e }) {
+function OL({ name: e }) {
return /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
}
-var AL = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
-function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions: a }) {
- let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = e.junk_kind || "other", [f, p] = B_e(e), m = String(e.name || ""), h = V_e(t), g = d === "video" ? `/thumb?id=${e.id}&c=4` : d === "image" ? `/photo-thumb?id=${e.id}` : "", _ = d === "video" || d === "image", v = (t) => {
- t.target.closest("[data-junk-actions]") || AL(r, t) && (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey));
+var kL = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
+function Y_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions: a }) {
+ let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = e.junk_kind || "other", [f, p] = W_e(e), m = String(e.name || ""), h = G_e(t), g = d === "video" ? `/thumb?id=${e.id}&c=4` : d === "image" ? `/photo-thumb?id=${e.id}` : "", _ = d === "video" || d === "image", v = (t) => {
+ t.target.closest("[data-junk-actions]") || kL(r, t) && (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey));
}, y = (t) => {
- if (t.stopPropagation(), AL(r, t)) {
+ if (t.stopPropagation(), kL(r, t)) {
t.preventDefault(), a.toggleSelection(e.id, t.shiftKey);
return;
}
@@ -47242,7 +47329,7 @@ function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
children: [
/* @__PURE__ */ (0, V.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, V.jsx)(kL, { name: p }), /* @__PURE__ */ (0, V.jsx)("b", { children: f })]
+ children: [/* @__PURE__ */ (0, V.jsx)(OL, { name: p }), /* @__PURE__ */ (0, V.jsx)("b", { children: f })]
}),
g ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-media-art": "thumb",
@@ -47254,7 +47341,7 @@ function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
}),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, V.jsx)(kL, { name: "check" })
+ children: /* @__PURE__ */ (0, V.jsx)(OL, { name: "check" })
})
]
}),
@@ -47291,7 +47378,7 @@ function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
children: [s === "reveal" ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-junk-spinner": "",
dangerouslySetInnerHTML: { __html: Ke("正在定位") }
- }) : /* @__PURE__ */ (0, V.jsx)(kL, { name: "folder-open" }), /* @__PURE__ */ (0, V.jsx)("span", {
+ }) : /* @__PURE__ */ (0, V.jsx)(OL, { name: "folder-open" }), /* @__PURE__ */ (0, V.jsx)("span", {
"data-junk-label": "",
children: "打开位置"
})]
@@ -47303,7 +47390,7 @@ function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"aria-label": h.label,
...S(h.operation),
onClick: x(h.operation),
- children: [/* @__PURE__ */ (0, V.jsx)(kL, { name: h.glyph }), /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [/* @__PURE__ */ (0, V.jsx)(OL, { name: h.glyph }), /* @__PURE__ */ (0, V.jsx)("span", {
"data-junk-label": "",
children: h.label
})]
@@ -47315,7 +47402,7 @@ function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"aria-label": "移入回收站",
...S("dispose"),
onClick: x("dispose"),
- children: [/* @__PURE__ */ (0, V.jsx)(kL, { name: "trash" }), /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [/* @__PURE__ */ (0, V.jsx)(OL, { name: "trash" }), /* @__PURE__ */ (0, V.jsx)("span", {
"data-junk-label": "",
children: "移入回收站"
})]
@@ -47330,7 +47417,7 @@ function G_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
]
});
}
-var K_e = (0, B.memo)(G_e), jL = [
+var X_e = (0, B.memo)(Y_e), AL = [
[
"",
"全部",
@@ -47367,53 +47454,53 @@ var K_e = (0, B.memo)(G_e), jL = [
"hard-drive"
]
];
-function ML(e = "", t = "pending") {
+function jL(e = "", t = "pending") {
let n = new URLSearchParams();
e && n.set("type", e), t === "dismissed" && n.set("view", "dismissed");
let r = n.toString();
return `/junk-files${r ? `?${r}` : ""}`;
}
-function q_e(e) {
+function Z_e(e) {
return e === "dismissed" ? {
view: "pending",
label: "返回待判断",
glyph: "rotate-ccw",
- href: ML("", "pending")
+ href: jL("", "pending")
} : {
view: "dismissed",
label: "已排除",
glyph: "eye-off",
- href: ML("", "dismissed")
+ href: jL("", "dismissed")
};
}
-var J_e = (e) => e === "dismissed" ? "已排除" : "待判断";
+var Q_e = (e) => e === "dismissed" ? "已排除" : "待判断";
//#endregion
//#region src/react/junk-queue/junk-count.tsx
-function NL({ name: e }) {
+function ML({ name: e }) {
return /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
}
-function PL({ scope: e, count: t }) {
+function NL({ scope: e, count: t }) {
return t ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [" ", /* @__PURE__ */ (0, V.jsx)("span", {
"data-count-badge": `junk:${e}`,
children: t.toLocaleString()
})] }) : null;
}
-function Y_e({ route: e, page: t, failed: n, onNavigate: r }) {
- let i = OM(), a = (0, B.useRef)(null), { kind: o, view: s } = e, c = lA(a, i, "[data-junk-kind-link][aria-current=\"page\"]", `${s}:${o}:${t ? jL.map(([e]) => OL(t, e)).join(",") : ""}`), l = q_e(s), u = (e) => {
+function $_e({ route: e, page: t, failed: n, onNavigate: r }) {
+ let i = vM(), a = (0, B.useRef)(null), { kind: o, view: s } = e, c = hD(a, i, "[data-junk-kind-link][aria-current=\"page\"]", `${s}:${o}:${t ? AL.map(([e]) => DL(t, e)).join(",") : ""}`), l = Z_e(s), u = (e) => {
let t = e.target.closest("a");
- !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || ML()));
+ !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || jL()));
}, d = t ? `${Number(t.total || 0).toLocaleString()} 个` : n ? "—" : "";
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-junk-count": "",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
"data-junk-summary": "",
"aria-live": "polite",
- children: /* @__PURE__ */ (0, V.jsx)(wP, {
- label: J_e(s),
+ children: /* @__PURE__ */ (0, V.jsx)(xP, {
+ label: Q_e(s),
figure: d,
pending: !t && !n,
flush: !0
@@ -47433,17 +47520,17 @@ function Y_e({ route: e, page: t, failed: n, onNavigate: r }) {
onClick: u,
onPointerLeave: c.leave,
children: [
- jL.map(([e, n, r]) => /* @__PURE__ */ (0, V.jsxs)("a", {
- href: ML(e, s),
+ AL.map(([e, n, r]) => /* @__PURE__ */ (0, V.jsxs)("a", {
+ href: jL(e, s),
"data-junk-kind-link": e,
"aria-current": e === o ? "page" : void 0,
onPointerEnter: c.hover,
children: [
- /* @__PURE__ */ (0, V.jsx)(NL, { name: r }),
+ /* @__PURE__ */ (0, V.jsx)(ML, { name: r }),
n,
- /* @__PURE__ */ (0, V.jsx)(PL, {
+ /* @__PURE__ */ (0, V.jsx)(NL, {
scope: e,
- count: t ? OL(t, e) : 0
+ count: t ? DL(t, e) : 0
})
]
}, e || "all")),
@@ -47457,9 +47544,9 @@ function Y_e({ route: e, page: t, failed: n, onNavigate: r }) {
"aria-current": s === "dismissed" ? "page" : void 0,
onPointerEnter: s === "dismissed" ? void 0 : c.hover,
children: [
- /* @__PURE__ */ (0, V.jsx)(NL, { name: l.glyph }),
+ /* @__PURE__ */ (0, V.jsx)(ML, { name: l.glyph }),
l.label,
- /* @__PURE__ */ (0, V.jsx)(PL, {
+ /* @__PURE__ */ (0, V.jsx)(NL, {
scope: "dismissed",
count: Number(t?.dismissed_total || 0)
})
@@ -47472,33 +47559,33 @@ function Y_e({ route: e, page: t, failed: n, onNavigate: r }) {
}
//#endregion
//#region src/react/junk-queue/junk-queue-page.tsx
-var X_e = vA("check"), Z_e = (e, t) => e[1] === t.view && e[2] === t.kind;
-function Q_e(e) {
+var eve = oA("check"), tve = (e, t) => e[1] === t.view && e[2] === t.kind;
+function nve(e) {
let t = {
kind: e.kind,
view: e.view
}, n = TS({
- queryKey: H_e(t, e.revision),
- queryFn: ({ signal: e }) => W_e(t, e),
- placeholderData: (e, n) => n && Z_e(n.queryKey, t) ? e : void 0
+ queryKey: K_e(t, e.revision),
+ queryFn: ({ signal: e }) => J_e(t, e),
+ placeholderData: (e, n) => n && tve(n.queryKey, t) ? e : void 0
});
(0, B.useEffect)(() => {
n.isFetching || e.settled?.(e.revision);
}, [n.isFetching, e.revision]);
- let r = $_e(e.countRow), i = n.isPending;
+ let r = rve(e.countRow), i = n.isPending;
(0, B.useLayoutEffect)(() => {
let t = e.countRow;
t && (i ? t.setAttribute("aria-busy", "true") : t.removeAttribute("aria-busy"));
}, [e.countRow, i]), (0, B.useLayoutEffect)(() => {
r && n.data && Le(r, "junk");
}, [r, n.data]);
- let { navigate: a } = e.actions, o = r ? (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)(Y_e, {
+ let { navigate: a } = e.actions, o = r ? (0, $f.createPortal)(/* @__PURE__ */ (0, V.jsx)($_e, {
route: t,
page: n.data,
failed: n.isError && !n.data,
onNavigate: a
}), r) : null;
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [o, /* @__PURE__ */ (0, V.jsx)(eve, {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [o, /* @__PURE__ */ (0, V.jsx)(ive, {
props: e,
data: n.data,
pending: i,
@@ -47506,7 +47593,7 @@ function Q_e(e) {
retry: () => void n.refetch()
}, `${t.view}:${t.kind}`)] });
}
-function $_e(e) {
+function rve(e) {
let [t, n] = (0, B.useState)(null);
return (0, B.useLayoutEffect)(() => {
if (!e) return;
@@ -47516,8 +47603,8 @@ function $_e(e) {
};
}, [e]), t;
}
-function eve({ props: e, data: t, pending: n, error: r, retry: i }) {
- let a = OA(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, B.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: d } = e, f = (0, B.useCallback)(() => {
+function ive({ props: e, data: t, pending: n, error: r, retry: i }) {
+ let a = hA(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, B.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: d } = e, f = (0, B.useCallback)(() => {
d?.() !== !1 && c((e) => e + 1);
}, [d]);
return /* @__PURE__ */ (0, V.jsxs)("div", {
@@ -47525,14 +47612,14 @@ function eve({ props: e, data: t, pending: n, error: r, retry: i }) {
"data-grid-reveal": a.fading ? "" : void 0,
children: [a.layer, (() => {
if (n) return null;
- if (!t) return /* @__PURE__ */ (0, V.jsx)(kA, {
+ if (!t) return /* @__PURE__ */ (0, V.jsx)(gA, {
message: ye(r),
onRetry: i
});
if (!l.length) {
let t = e.view === "dismissed";
return /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: X_e,
+ icon: eve,
title: t ? "没有已排除的文件" : "没有待判断的垃圾文件",
children: t ? "点“不是垃圾”的资源会保留在这里,可随时重新判断。" : "当前分类没有候选文件。"
});
@@ -47541,7 +47628,7 @@ function eve({ props: e, data: t, pending: n, error: r, retry: i }) {
"data-media-grid": "",
"data-junk-grid": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: u.map((t) => /* @__PURE__ */ (0, V.jsx)(K_e, {
+ children: u.map((t) => /* @__PURE__ */ (0, V.jsx)(X_e, {
item: t,
view: e.view,
selected: e.selected.has(t.id),
@@ -47549,11 +47636,11 @@ function eve({ props: e, data: t, pending: n, error: r, retry: i }) {
helpers: e.helpers,
actions: e.actions
}, t.id))
- }), u.length < l.length ? /* @__PURE__ */ (0, V.jsx)(tve, { onMore: f }, s) : null] });
+ }), u.length < l.length ? /* @__PURE__ */ (0, V.jsx)(ave, { onMore: f }, s) : null] });
})()]
});
}
-function tve({ onMore: e }) {
+function ave({ onMore: e }) {
let t = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
let n = t.current;
@@ -47571,12 +47658,12 @@ function tve({ onMore: e }) {
}
//#endregion
//#region src/react/library-processing/library-processing-notice.tsx
-var FL = "flex min-h-10 flex-wrap items-center justify-center gap-x-4 gap-y-2 border-y px-6 py-2 max-sm:justify-start", nve = {
- gray: `${FL} border-separator-border bg-background-secondary-default text-text-secondary`,
- warning: `${FL} border-current/35 bg-status-yellow-background text-status-yellow-text`,
- error: `${FL} border-current/35 bg-background-tertiary-error text-text-error-primary`
+var PL = "flex min-h-10 flex-wrap items-center justify-center gap-x-4 gap-y-2 border-y px-6 py-2 max-sm:justify-start", ove = {
+ gray: `${PL} border-separator-border bg-background-secondary-default text-text-secondary`,
+ warning: `${PL} border-current/35 bg-status-yellow-background text-status-yellow-text`,
+ error: `${PL} border-current/35 bg-background-tertiary-error text-text-error-primary`
};
-function rve({ value: e, max: t }) {
+function sve({ value: e, max: t }) {
let n = Math.max(0, Math.min(100, e / t * 100));
return /* @__PURE__ */ (0, V.jsxs)("svg", {
role: "progressbar",
@@ -47604,16 +47691,16 @@ function rve({ value: e, max: t }) {
})]
});
}
-function ive(e) {
- let { job: t } = NM(e), n = t.data, r = t.isError ? n ? $A : W(t.error) : "", i = n?.status ?? "idle", a = i === "failed", o = i === "running";
+function cve(e) {
+ let { job: t } = CM(e), n = t.data, r = t.isError ? n ? BA : W(t.error) : "", i = n?.status ?? "idle", a = i === "failed", o = i === "running";
if (!r && !o && !a) return null;
- let s = a ? "error" : r || n?.stalled ? "warning" : "gray", c = n?.checked || 0, l = n?.total || 0, u = r || (a ? "扫描与资料采集未完成" : tj(n) + (l ? ` · ${c} / ${l}` : "")), d = s === "gray" ? dae : nae;
+ let s = a ? "error" : r || n?.stalled ? "warning" : "gray", c = n?.checked || 0, l = n?.total || 0, u = r || (a ? "扫描与资料采集未完成" : HA(n) + (l ? ` · ${c} / ${l}` : "")), d = s === "gray" ? fae : rae;
return /* @__PURE__ */ (0, V.jsxs)("aside", {
role: a ? "alert" : "status",
- className: nve[s],
+ className: ove[s],
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
- children: [o && l ? /* @__PURE__ */ (0, V.jsx)(rve, {
+ children: [o && l ? /* @__PURE__ */ (0, V.jsx)(sve, {
value: c,
max: l
}) : /* @__PURE__ */ (0, V.jsx)(d, {
@@ -47623,7 +47710,7 @@ function ive(e) {
className: "min-w-0 text-body-2-regular",
children: u
})]
- }), /* @__PURE__ */ (0, V.jsx)(kk, {
+ }), /* @__PURE__ */ (0, V.jsx)(PE, {
href: "/data-cleanup#libraryProcessing",
size: "small",
trailingIcon: lT,
@@ -47633,32 +47720,32 @@ function ive(e) {
}
//#endregion
//#region src/react/playlists/playlists.ts
-var ave = "/api/playlists", IL = "/api/playlist", LL = ["playlists"], RL = (e) => G(ave, e);
-async function ove(e) {
+var lve = "/api/playlists", FL = "/api/playlist", IL = ["playlists"], LL = (e) => G(lve, e);
+async function uve(e) {
await z.fetchQuery({
- queryKey: LL,
- queryFn: () => RL(e),
+ queryKey: IL,
+ queryFn: () => LL(e),
staleTime: 0
});
}
-var zL = () => z.invalidateQueries({
- queryKey: LL,
+var RL = () => z.invalidateQueries({
+ queryKey: IL,
exact: !0
-}), sve = (e) => e.current_asset_id || e.preview_asset_id || null, BL = (e) => `/poster?id=${e}&c=4`, cve = (e) => K(IL, {
+}), dve = (e) => e.current_asset_id || e.preview_asset_id || null, zL = (e) => `/poster?id=${e}&c=4`, fve = (e) => K(FL, {
action: "create",
name: e,
asset_ids: []
-}), VL = (e, t) => K(IL, {
+}), BL = (e, t) => K(FL, {
action: "rename",
id: e,
name: t
-}), HL = (e) => K(IL, {
+}), VL = (e) => K(FL, {
action: "delete",
id: e
-}), lve = (e) => G(`${IL}?id=${e}`).catch(() => null);
-function uve(e) {
+}), pve = (e) => G(`${FL}?id=${e}`).catch(() => null);
+function mve(e) {
let t = (e.items || []).map((e) => e.id), n = e.source_seed_asset_id;
- return K(IL, {
+ return K(FL, {
action: "create",
name: e.name,
asset_ids: t,
@@ -47668,18 +47755,18 @@ function uve(e) {
}
//#endregion
//#region src/react/playlists/playlists-page.tsx
-var dve = vA("ellipsis"), fve = vA("pencil"), pve = vA("trash"), mve = vA("playlist"), UL = vE(bk, xk, "text-body-2-medium"), WL = "播放列表名称不能为空", GL = (e) => async () => {
+var hve = oA("ellipsis"), gve = oA("pencil"), _ve = oA("trash"), vve = oA("playlist"), HL = vE(dM, fM, "text-body-2-medium"), UL = "播放列表名称不能为空", WL = (e) => async () => {
try {
await e();
} finally {
- zL();
+ RL();
}
};
-function hve({ toast: e }) {
+function yve({ toast: e }) {
let [t, n] = (0, B.useState)(""), [r, i] = (0, B.useState)(""), a = OS({
- mutationFn: (e) => cve(e),
+ mutationFn: (e) => fve(e),
onSuccess: (t) => {
- n(""), i(""), zL(), e("已新建播放列表", { undo: GL(() => HL(t.playlist.id)) });
+ n(""), i(""), RL(), e("已新建播放列表", { undo: WL(() => VL(t.playlist.id)) });
},
onError: (e) => i(W(e) || "新建失败")
});
@@ -47689,7 +47776,7 @@ function hve({ toast: e }) {
onSubmit: (e) => {
if (e.preventDefault(), !a.isPending) {
if (!t.trim()) {
- i(WL);
+ i(UL);
return;
}
a.mutate(t);
@@ -47698,7 +47785,7 @@ function hve({ toast: e }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-50 max-w-80 flex-1 basis-50 max-board-narrow:min-w-0 max-board-narrow:max-w-none",
- children: /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: /* @__PURE__ */ (0, V.jsx)(GM, {
label: "新播放列表",
placeholder: "输入名称",
maxLength: 80,
@@ -47717,7 +47804,7 @@ function hve({ toast: e }) {
})]
});
}
-function gve({ target: e, close: t, toast: n }) {
+function bve({ target: e, close: t, toast: n }) {
let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(""), s = (0, B.useRef)(null);
(0, B.useEffect)(() => {
if (!e) return;
@@ -47728,13 +47815,13 @@ function gve({ target: e, close: t, toast: n }) {
return () => cancelAnimationFrame(t);
}, [e]);
let c = OS({
- mutationFn: ({ row: e, value: t }) => VL(e.id, t),
+ mutationFn: ({ row: e, value: t }) => BL(e.id, t),
onSuccess: (e, { row: r }) => {
- t(), zL(), n("已重命名播放列表", { undo: GL(() => VL(r.id, r.name)) });
+ t(), RL(), n("已重命名播放列表", { undo: WL(() => BL(r.id, r.name)) });
},
onError: (e) => o(W(e))
});
- return /* @__PURE__ */ (0, V.jsx)($N, {
+ return /* @__PURE__ */ (0, V.jsx)(XN, {
isOpen: !!e,
onOpenChange: (e) => {
e || t();
@@ -47746,7 +47833,7 @@ function gve({ target: e, close: t, toast: n }) {
if (t.preventDefault(), !e || c.isPending) return;
let n = r.trim();
if (!n) {
- o(WL);
+ o(UL);
return;
}
c.mutate({
@@ -47757,11 +47844,11 @@ function gve({ target: e, close: t, toast: n }) {
className: "flex min-h-0 flex-col",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-4 p-5",
- children: [/* @__PURE__ */ (0, V.jsx)(ZE, {
+ children: [/* @__PURE__ */ (0, V.jsx)(ID, {
slot: "title",
className: "text-title-2-semibold text-text-primary",
children: "编辑名称"
- }), /* @__PURE__ */ (0, V.jsx)(vk, {
+ }), /* @__PURE__ */ (0, V.jsx)(GM, {
ref: s,
label: "名称",
placeholder: "输入名称",
@@ -47789,7 +47876,7 @@ function gve({ target: e, close: t, toast: n }) {
})
});
}
-function _ve({ name: e, onRename: t, onDelete: n }) {
+function xve({ name: e, onRename: t, onDelete: n }) {
let r = (0, B.useRef)(null), [i, a] = (0, B.useState)(!1), o = (e) => {
a(!1), e();
};
@@ -47803,33 +47890,33 @@ function _ve({ name: e, onRename: t, onDelete: n }) {
"data-playlist-menu": "",
onClick: () => a(!0),
className: "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-2lg text-foreground-icon-secondary outline-none transition-colors hover:bg-background-primary-hover hover:text-foreground-icon-primary aria-expanded:bg-background-primary-hover aria-expanded:text-foreground-icon-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: /* @__PURE__ */ (0, V.jsx)(dve, {
+ children: /* @__PURE__ */ (0, V.jsx)(hve, {
"aria-hidden": !0,
className: "size-4.5"
})
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
triggerRef: r,
isOpen: i,
onOpenChange: a,
placement: "bottom end",
offset: 4,
- className: yk,
- children: /* @__PURE__ */ (0, V.jsxs)(SM, {
+ className: uM,
+ children: /* @__PURE__ */ (0, V.jsxs)(lM, {
"aria-label": `播放列表操作:${e}`,
className: "flex w-37.5 flex-col gap-0.5 outline-none",
children: [/* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
- className: UL,
+ className: HL,
onClick: () => o(t),
- children: [/* @__PURE__ */ (0, V.jsx)(fve, {
+ children: [/* @__PURE__ */ (0, V.jsx)(gve, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "编辑名称"]
}), /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
- className: UL,
+ className: HL,
onClick: () => o(n),
- children: [/* @__PURE__ */ (0, V.jsx)(pve, {
+ children: [/* @__PURE__ */ (0, V.jsx)(_ve, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "删除播放列表"]
@@ -47837,13 +47924,13 @@ function _ve({ name: e, onRename: t, onDelete: n }) {
})
})] });
}
-function vve({ openPlaylist: e, openEntity: t, canFlip: n, toast: r, revision: i }) {
+function Sve({ openPlaylist: e, openEntity: t, canFlip: n, toast: r, revision: i }) {
let a = TS({
- queryKey: LL,
- queryFn: ({ signal: e }) => RL(e)
+ queryKey: IL,
+ queryFn: ({ signal: e }) => LL(e)
}), [o, s] = (0, B.useState)(null), c = (0, B.useRef)(i);
(0, B.useEffect)(() => {
- c.current !== i && (c.current = i, zL());
+ c.current !== i && (c.current = i, RL());
}, [i]);
let l = a.data;
if (!l) return /* @__PURE__ */ (0, V.jsx)("div", {
@@ -47861,8 +47948,8 @@ function vve({ openPlaylist: e, openEntity: t, canFlip: n, toast: r, revision: i
confirmLabel: "删除播放列表",
danger: !0,
onConfirm: async () => {
- let t = await lve(e.id);
- await HL(e.id), zL(), r("已删除播放列表", t ? { undo: GL(() => uve(t)) } : void 0);
+ let t = await pve(e.id);
+ await VL(e.id), RL(), r("已删除播放列表", t ? { undo: WL(() => mve(t)) } : void 0);
}
});
};
@@ -47877,26 +47964,26 @@ function vve({ openPlaylist: e, openEntity: t, canFlip: n, toast: r, revision: i
}), /* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "保存 Mix,按自己的顺序继续播放。"
- })] }), /* @__PURE__ */ (0, V.jsx)(hve, { toast: r })]
+ })] }), /* @__PURE__ */ (0, V.jsx)(yve, { toast: r })]
}),
u.length ? /* @__PURE__ */ (0, V.jsx)("div", {
"data-playlist-grid": "",
className: "card-grid-cover gap-4.5",
children: u.map((r) => {
- let i = sve(r);
- return /* @__PURE__ */ (0, V.jsx)(RA, {
+ let i = dve(r);
+ return /* @__PURE__ */ (0, V.jsx)(TA, {
"data-playlist-card": String(r.id),
name: r.name,
caption: r.source_kind === "mix" ? "由 Mix 保存" : "手动播放列表",
count: r.item_count,
- poster: r.preview_asset_id ? BL(r.preview_asset_id) : null,
- flipImages: async () => (r.preview_ids || []).map(BL),
+ poster: r.preview_asset_id ? zL(r.preview_asset_id) : null,
+ flipImages: async () => (r.preview_ids || []).map(zL),
canFlip: n,
faces: r.faces || [],
onOpenEntity: t,
...i ? { onOpen: () => e(r.id, i) } : {},
openLabel: `打开播放列表 ${r.name}`,
- menu: /* @__PURE__ */ (0, V.jsx)(_ve, {
+ menu: /* @__PURE__ */ (0, V.jsx)(xve, {
name: r.name,
onRename: () => s(r),
onDelete: () => d(r)
@@ -47904,11 +47991,11 @@ function vve({ openPlaylist: e, openEntity: t, canFlip: n, toast: r, revision: i
}, r.id);
})
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
- icon: mve,
+ icon: vve,
title: "还没有播放列表",
children: "保存 Mix 或新建列表后,会在这里按自己的顺序继续播放。"
}),
- /* @__PURE__ */ (0, V.jsx)(gve, {
+ /* @__PURE__ */ (0, V.jsx)(bve, {
target: o,
close: () => s(null),
toast: r
@@ -47918,7 +48005,7 @@ function vve({ openPlaylist: e, openEntity: t, canFlip: n, toast: r, revision: i
}
//#endregion
//#region src/react/quality-goals/quality-goals-page.tsx
-function yve({ item: e, openItem: t, searchResources: n, javTitleHtml: r, javDisplayName: i, srcBadge: a }) {
+function Cve({ item: e, openItem: t, searchResources: n, javTitleHtml: r, javDisplayName: i, srcBadge: a }) {
let o = () => t(e.id);
return /* @__PURE__ */ (0, V.jsxs)("li", {
"data-goal-id": e.id,
@@ -47938,7 +48025,7 @@ function yve({ item: e, openItem: t, searchResources: n, javTitleHtml: r, javDis
className: "text-caption-1-regular text-text-secondary",
children: "暂无预览"
}), /* @__PURE__ */ (0, V.jsx)("img", {
- src: aue(e),
+ src: qle(e),
alt: "",
loading: "lazy",
onError: (e) => e.currentTarget.remove(),
@@ -47996,38 +48083,47 @@ function yve({ item: e, openItem: t, searchResources: n, javTitleHtml: r, javDis
})]
});
}
-function bve(e) {
- let t = TS({
- queryKey: lj,
- queryFn: ({ signal: e }) => uj(e)
- }), n = t.data;
- if (!n) return /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
+function wve({ toast: e, ...t }) {
+ let [n, r] = (0, B.useState)(null), i = TS({
+ queryKey: XA,
+ queryFn: ({ signal: e }) => ZA(e)
+ }), a = i.data;
+ if (!a) return /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "高清版目标读取失败",
- children: t.error ? W(t.error) : "未取得高清版目标,请刷新页面重试。"
+ children: i.error ? W(i.error) : "未取得高清版目标,请刷新页面重试。"
}) });
- let r = n.items || [];
- return r.length ? /* @__PURE__ */ (0, V.jsxs)(DE, { children: [/* @__PURE__ */ (0, V.jsx)(wP, {
- label: "待升级",
- figure: `${n.total} 部作品`,
- flush: !0
- }), /* @__PURE__ */ (0, V.jsx)("ul", {
- className: "card-grid-cover gap-5",
- children: r.map((t) => /* @__PURE__ */ (0, V.jsx)(yve, {
- item: t,
- ...e
- }, t.id))
- })] }) : /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(TE, {
+ let o = a.items || [];
+ return o.length ? /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(xP, {
+ label: "待升级",
+ figure: `${a.total} 部作品`,
+ flush: !0
+ }),
+ /* @__PURE__ */ (0, V.jsx)("ul", {
+ className: "card-grid-cover gap-5",
+ children: o.map((e) => /* @__PURE__ */ (0, V.jsx)(Cve, {
+ item: e,
+ ...t,
+ searchResources: r
+ }, e.id))
+ }),
+ /* @__PURE__ */ (0, V.jsx)(sL, {
+ prefill: n,
+ close: () => r(null),
+ receipt: e
+ })
+ ] }) : /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: xae,
+ icon: Sae,
title: "没有标记中的高清版目标",
children: "现有版本都已满足条件,或还没有加入追踪。"
}) });
}
//#endregion
//#region src/react/review/bulk-toolbar.tsx
-function xve(e) {
- let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: o, pageKeys: s, selected: c, onSelected: l, selectedRows: u, metadata: d, approvable: f, busy: p, feedback: m, onUnifySource: h, onRun: g } = e, _ = s.filter((e) => c.has(e)), v = _.length > 0 && _.length === s.length, y = gue(u), b = d && u.some((e) => (e.candidates?.length || 0) > 1), x = y.length ? "统一选择来源" : "所选项目无共同来源";
+function Tve(e) {
+ let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: o, pageKeys: s, selected: c, onSelected: l, selectedRows: u, metadata: d, approvable: f, busy: p, feedback: m, onUnifySource: h, onRun: g } = e, _ = s.filter((e) => c.has(e)), v = _.length > 0 && _.length === s.length, y = iue(u), b = d && u.some((e) => (e.candidates?.length || 0) > 1), x = y.length ? "统一选择来源" : "所选项目无共同来源";
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("div", {
role: "group",
"aria-label": "复核筛选",
@@ -48035,29 +48131,29 @@ function xve(e) {
"data-glass-pane": "",
className: "sticky top-topbar z-10 flex flex-wrap items-center gap-2 p-3",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "筛选分组方式",
size: "sm",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: t.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: t.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: t
}, e))
}),
- i.length > 1 ? /* @__PURE__ */ (0, V.jsxs)(Ck, {
+ i.length > 1 ? /* @__PURE__ */ (0, V.jsxs)(EM, {
"aria-label": n === "field" ? "筛选字段分类" : "筛选当前分类",
size: "sm",
selectedKey: a || "*",
onSelectionChange: (e) => {
e !== null && o(String(e) === "*" ? "" : String(e));
},
- children: [/* @__PURE__ */ (0, V.jsx)(wk, {
+ children: [/* @__PURE__ */ (0, V.jsx)(DM, {
id: "*",
children: "全部分类"
- }), i.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ }), i.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e.key,
children: `${e.title} · ${e.rows.length}`
}, e.key))]
@@ -48081,7 +48177,7 @@ function xve(e) {
visible: c.size > 0,
count: `已选 ${c.size} 项`,
children: [
- b ? /* @__PURE__ */ (0, V.jsxs)(Ck, {
+ b ? /* @__PURE__ */ (0, V.jsxs)(EM, {
"aria-label": "统一选择来源",
size: "sm",
selectedKey: "",
@@ -48089,10 +48185,10 @@ function xve(e) {
onSelectionChange: (e) => {
e !== null && e !== "" && h(String(e));
},
- children: [/* @__PURE__ */ (0, V.jsx)(wk, {
+ children: [/* @__PURE__ */ (0, V.jsx)(DM, {
id: "",
children: x
- }), y.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ }), y.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: e
}, e))]
@@ -48128,7 +48224,7 @@ function xve(e) {
}
//#endregion
//#region src/react/review/candidate-form.tsx
-var Sve = {
+var Eve = {
title: "标题",
original_title: "原标题",
runtime: "来源时长",
@@ -48138,14 +48234,14 @@ var Sve = {
cover_url: "封面",
screenshot_urls: "截图",
trailer_url: "预告片"
-}, KL = "reviewgenretags";
-function Cve({ tags: e }) {
+}, GL = "reviewgenretags";
+function Dve({ tags: e }) {
return e.length ? /* @__PURE__ */ (0, V.jsx)("datalist", {
- id: KL,
+ id: GL,
children: e.map((e) => /* @__PURE__ */ (0, V.jsx)("option", { value: e }, e))
}) : null;
}
-function qL({ candidate: e, selectable: t = !1 }) {
+function KL({ 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, V.jsxs)("span", {
className: "flex min-w-0 flex-1 flex-col",
@@ -48182,7 +48278,7 @@ function qL({ candidate: e, selectable: t = !1 }) {
children: [
/* @__PURE__ */ (0, V.jsx)("dt", {
className: "text-body-2-regular text-text-secondary",
- children: Sve[e] || e
+ children: Eve[e] || e
}),
/* @__PURE__ */ (0, V.jsx)("dd", {
className: "min-w-0 text-body-2-regular break-words text-text-primary",
@@ -48197,36 +48293,36 @@ function qL({ candidate: e, selectable: t = !1 }) {
}) : null]
});
}
-function wve({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {
+function Ove({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {
let a = e.candidates || [];
return a.length ? a.length === 1 ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default",
- children: /* @__PURE__ */ (0, V.jsx)(qL, { candidate: a[0] })
- }) : /* @__PURE__ */ (0, V.jsx)(PO, {
+ children: /* @__PURE__ */ (0, V.jsx)(KL, { candidate: a[0] })
+ }) : /* @__PURE__ */ (0, V.jsx)(yk, {
"aria-label": `${t || "候选"}的来源`,
value: n,
isDisabled: i,
onChange: r,
className: "flex flex-col gap-2",
- children: a.map((e) => /* @__PURE__ */ (0, V.jsx)(FO, {
+ children: a.map((e) => /* @__PURE__ */ (0, V.jsx)(bk, {
value: e.candidate_key,
className: "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, V.jsx)(qL, {
+ children: /* @__PURE__ */ (0, V.jsx)(KL, {
candidate: e,
selectable: !0
})
}, e.candidate_key))
}) : null;
}
-function Tve({ genre: e, tags: t, locked: n, toast: r }) {
+function kve({ genre: e, tags: t, locked: n, toast: r }) {
let [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), c = OS({
- mutationFn: (t) => wue(e, t),
+ mutationFn: (t) => fue(e, t),
onSuccess: async (t, n) => {
if (!t.ok) {
s(t.error || "服务端拒绝了这次收录");
return;
}
- r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await Eue();
+ r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await mue();
},
onError: (e) => s(W(e))
}), l = () => {
@@ -48245,16 +48341,16 @@ function Tve({ genre: e, tags: t, locked: n, toast: r }) {
className: "text-body-medium text-text-primary",
children: e
}),
- /* @__PURE__ */ (0, V.jsx)(hk, {
+ /* @__PURE__ */ (0, V.jsx)(HM, {
"aria-label": `「${e}」收录成的中文标签`,
value: i,
onChange: a,
maxLength: 40,
isDisabled: n || c.isPending,
className: "min-w-40 flex-1",
- children: /* @__PURE__ */ (0, V.jsx)(_k, {
+ children: /* @__PURE__ */ (0, V.jsx)(WM, {
size: "small",
- list: t.length ? KL : void 0,
+ list: t.length ? GL : void 0,
autoComplete: "off",
placeholder: "中文标签",
onKeyDown: (e) => {
@@ -48286,8 +48382,8 @@ function Tve({ genre: e, tags: t, locked: n, toast: r }) {
]
});
}
-function Eve({ row: e, tags: t, locked: n, toast: r }) {
- let i = xue(e);
+function Ave({ row: e, tags: t, locked: n, toast: r }) {
+ let i = lue(e);
return i.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
role: "group",
"aria-label": "未收录 genre",
@@ -48295,7 +48391,7 @@ function Eve({ row: e, tags: t, locked: n, toast: r }) {
children: [/* @__PURE__ */ (0, V.jsx)("h5", {
className: "text-body-2-medium text-text-secondary",
children: `未收录 genre · ${i.length}`
- }), i.map((e) => /* @__PURE__ */ (0, V.jsx)(Tve, {
+ }), i.map((e) => /* @__PURE__ */ (0, V.jsx)(kve, {
genre: e,
tags: t,
locked: n,
@@ -48305,9 +48401,9 @@ function Eve({ row: e, tags: t, locked: n, toast: r }) {
}
//#endregion
//#region src/react/review/review-evidence.tsx
-var JL = (e = "") => /^https?:\/\//i.test(e) ? e : "", Dve = (e = "") => JL(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
-function YL({ url: e }) {
- let t = Dve(e || ""), [n, r] = (0, B.useState)(!1);
+var qL = (e = "") => /^https?:\/\//i.test(e) ? e : "", jve = (e = "") => qL(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
+function JL({ url: e }) {
+ let t = jve(e || ""), [n, r] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex h-review-image items-center justify-center overflow-hidden rounded-surface bg-background-secondary-default",
children: t && !n ? /* @__PURE__ */ (0, V.jsx)("img", {
@@ -48322,7 +48418,7 @@ function YL({ url: e }) {
})
});
}
-function XL({ asset: e, openItem: t }) {
+function YL({ asset: e, openItem: t }) {
let n = e.name || "";
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 items-center gap-2.5 rounded-surface bg-background-secondary-default p-2",
@@ -48348,21 +48444,21 @@ function XL({ asset: e, openItem: t }) {
}), /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: mae,
+ leadingIcon: hae,
onClick: () => t(e.id),
children: "打开原视频"
})]
})]
});
}
-function Ove({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
+function Mve({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
children: [/* @__PURE__ */ (0, V.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 ${rL}`,
+ 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 ${eL}`,
dangerouslySetInnerHTML: { __html: r }
}), /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 flex-col items-start",
@@ -48378,8 +48474,8 @@ function Ove({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
})]
});
}
-function kve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
- let o = JL(e.profile_url || ""), s = (e.preview_assets || []).slice(0, 6), c = Math.max(0, Number(e.video_count || e.videos || 0));
+function Nve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
+ let o = qL(e.profile_url || ""), s = (e.preview_assets || []).slice(0, 6), c = Math.max(0, Number(e.video_count || e.videos || 0));
return /* @__PURE__ */ (0, V.jsxs)("section", {
className: "flex flex-col gap-3",
children: [
@@ -48392,7 +48488,7 @@ function kve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
children: [o ? /* @__PURE__ */ (0, V.jsx)(CE, {
variant: "secondary",
size: "small",
- trailingIcon: vT,
+ trailingIcon: _T,
href: o,
target: "_blank",
rel: "noopener noreferrer",
@@ -48404,7 +48500,7 @@ function kve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
children: `查看全部 ${c.toLocaleString()} 部作品`
})]
}),
- /* @__PURE__ */ (0, V.jsx)(YL, { url: e.preview_url }),
+ /* @__PURE__ */ (0, V.jsx)(JL, { url: e.preview_url }),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "通过后记录身份判断。"
@@ -48447,7 +48543,7 @@ function kve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
]
});
}
-function Ave({ assets: e, picked: t, onPicked: n, locked: r }) {
+function Pve({ assets: e, picked: t, onPicked: n, locked: r }) {
let [i, a] = (0, B.useState)(null), o = new Set(t), s = (t, s) => {
if (r) return;
let c = new Set(o);
@@ -48503,7 +48599,7 @@ function Ave({ assets: e, picked: t, onPicked: n, locked: r }) {
}),
/* @__PURE__ */ (0, V.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, V.jsx)(zM, {
+ children: /* @__PURE__ */ (0, V.jsx)(MM, {
size: "sm",
state: {
isSelected: n,
@@ -48523,19 +48619,19 @@ function Ave({ assets: e, picked: t, onPicked: n, locked: r }) {
}
//#endregion
//#region src/react/review/review-card.tsx
-var jve = wE({
+var Fve = wE({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-4 px-5 pt-4"
-}), ZL = "flex min-h-6 min-w-0 items-center", Mve = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
-function Nve(e) {
- let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: o, locked: s, busy: c, problem: l, genreTags: u, onDecide: d, handlers: f } = e, p = (0, B.useRef)(!1), m = OM(), h = OM(), g = t === "metadata_fields", _ = fue[t] || "", v = String(n.creator || "").trim(), y = !!_ && !!v, b = vue(t, n), x = xj(t, n), S = bj(t, n), C = yue(n), T = bue(n), E = yj(t, n), D = n.comparison_assets || [], O = n.preview_assets || [], k = String(n.decision || "pending") !== "pending", A = D.length > 1 ? /* @__PURE__ */ (0, V.jsx)("div", {
+}), XL = "flex min-h-6 min-w-0 items-center", Ive = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
+function Lve(e) {
+ let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: o, locked: s, busy: c, problem: l, genreTags: u, onDecide: d, handlers: f } = e, p = (0, B.useRef)(!1), m = vM(), h = vM(), g = t === "metadata_fields", _ = eue[t] || "", v = String(n.creator || "").trim(), y = !!_ && !!v, b = oue(t, n), x = cj(t, n), S = sj(t, n), C = sue(n), T = cue(n), E = oj(t, n), D = n.comparison_assets || [], O = n.preview_assets || [], k = String(n.decision || "pending") !== "pending", A = D.length > 1 ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex flex-col gap-3",
- children: D.map((e) => /* @__PURE__ */ (0, V.jsx)(XL, {
+ children: D.map((e) => /* @__PURE__ */ (0, V.jsx)(YL, {
asset: e,
openItem: f.openItem
}, e.id))
- }) : y ? /* @__PURE__ */ (0, V.jsx)(Ove, {
+ }) : y ? /* @__PURE__ */ (0, V.jsx)(Mve, {
kind: _,
name: v,
works: Number(n.video_count || n.videos || 0),
@@ -48546,14 +48642,14 @@ function Nve(e) {
image_version: n.image_version,
avatar_focus: n.avatar_focus
} : null, null, _)
- }) : n.asset_id ? /* @__PURE__ */ (0, V.jsx)(XL, {
+ }) : n.asset_id ? /* @__PURE__ */ (0, V.jsx)(YL, {
openItem: f.openItem,
asset: {
id: n.asset_id,
name: n.asset_name,
preview_url: n.asset_preview_url
}
- }) : null, j = g ? /* @__PURE__ */ (0, V.jsx)(wve, {
+ }) : null, j = g ? /* @__PURE__ */ (0, V.jsx)(Ove, {
row: n,
fieldName: x,
value: r.candidateKey,
@@ -48562,7 +48658,7 @@ function Nve(e) {
candidateKey: e
}),
locked: s
- }) : t === "creator_tags" ? O.length ? /* @__PURE__ */ (0, V.jsx)(Ave, {
+ }) : t === "creator_tags" ? O.length ? /* @__PURE__ */ (0, V.jsx)(Pve, {
assets: O,
picked: r.assets,
locked: s,
@@ -48572,18 +48668,18 @@ function Nve(e) {
})
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "inset",
- icon: lae,
+ icon: uae,
title: "这批作品尚未抽帧",
children: `${n.video_count || ""} 条作品还没有可用预览;批准后仍会按候选写入标签。`
- }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, V.jsx)(kve, {
+ }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, V.jsx)(Nve, {
row: n,
openItem: f.openItem,
openEntity: f.openEntity,
onReveal: f.onReveal,
revealing: f.revealing,
note: f.revealNote
- }) : /* @__PURE__ */ (0, V.jsx)(YL, { url: n.preview_url }), M = y ? A : x ? /* @__PURE__ */ (0, V.jsxs)("h4", {
- className: `${ZL} flex-wrap gap-2`,
+ }) : /* @__PURE__ */ (0, V.jsx)(JL, { url: n.preview_url }), M = y ? A : x ? /* @__PURE__ */ (0, V.jsxs)("h4", {
+ className: `${XL} flex-wrap gap-2`,
children: [/* @__PURE__ */ (0, V.jsx)(xE, {
variant: "caption",
color: "blue",
@@ -48594,7 +48690,7 @@ function Nve(e) {
children: S
})]
}) : /* @__PURE__ */ (0, V.jsx)("h4", {
- className: ZL,
+ className: XL,
children: /* @__PURE__ */ (0, V.jsx)("span", {
title: b,
className: "min-w-0 truncate text-body-medium text-text-primary",
@@ -48604,20 +48700,20 @@ function Nve(e) {
return /* @__PURE__ */ (0, V.jsxs)("section", {
"aria-label": b,
"data-review-key": n.item_key,
- className: `${jve} ${Mve(t)} overflow-hidden`,
+ className: `${Fve} ${Ive(t)} overflow-hidden`,
children: [
/* @__PURE__ */ (0, V.jsxs)("header", {
className: "flex min-w-0 shrink-0 items-start gap-2",
children: [
s ? null : /* @__PURE__ */ (0, V.jsx)("span", {
- className: `${ZL} shrink-0`,
+ className: `${XL} shrink-0`,
onPointerDownCapture: (e) => {
p.current = e.shiftKey;
},
onKeyDownCapture: (e) => {
p.current = e.shiftKey;
},
- children: /* @__PURE__ */ (0, V.jsx)(BM, {
+ children: /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: a,
"aria-label": `选择 ${b}`,
onChange: (e) => o(p.current, e)
@@ -48661,7 +48757,7 @@ function Nve(e) {
})
}) : null,
j,
- /* @__PURE__ */ (0, V.jsx)(Eve, {
+ /* @__PURE__ */ (0, V.jsx)(Ave, {
row: n,
tags: u,
locked: s,
@@ -48723,8 +48819,8 @@ function Nve(e) {
}
//#endregion
//#region src/react/review/review-page.tsx
-var Pve = "flex cursor-pointer items-center justify-between gap-2";
-function Fve({ page: e, pages: t, onPage: n }) {
+var Rve = "flex cursor-pointer items-center justify-between gap-2";
+function zve({ page: e, pages: t, onPage: n }) {
return t <= 1 ? null : /* @__PURE__ */ (0, V.jsxs)("nav", {
"aria-label": "复核分页",
className: "flex w-full flex-wrap items-center justify-between gap-2",
@@ -48738,7 +48834,7 @@ function Fve({ page: e, pages: t, onPage: n }) {
}),
/* @__PURE__ */ (0, V.jsx)("ul", {
className: "flex flex-wrap items-center gap-1",
- children: dj(e, t).map((t, r) => /* @__PURE__ */ (0, V.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, V.jsx)("span", {
+ children: QA(e, t).map((t, r) => /* @__PURE__ */ (0, V.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, V.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -48761,38 +48857,38 @@ function Fve({ page: e, pages: t, onPage: n }) {
]
});
}
-function Ive(e) {
+function Bve(e) {
let [t, n] = (0, B.useState)(() => matchMedia("(max-width:900px)").matches);
(0, B.useEffect)(() => {
let e = matchMedia("(max-width:900px)"), t = () => n(e.matches);
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
}, []);
- let { route: r, openItem: i, openEntity: a, revealSource: o, toast: s, readOnly: c, readOnlyMessage: l, writerUrl: u } = e, [d, f] = (0, B.useState)(_j(e.category) ? e.category : due), [p, m] = (0, B.useState)("candidates"), [h, g] = (0, B.useState)(""), [_, v] = (0, B.useState)(1), [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, B.useState)(/* @__PURE__ */ new Map()), [C, w] = (0, B.useState)(/* @__PURE__ */ new Map()), [T, E] = (0, B.useState)(""), D = (0, B.useRef)(null), [O, k] = (0, B.useState)(0), [A, j] = (0, B.useState)(""), M = (0, B.useRef)(!0);
+ let { route: r, openItem: i, openEntity: a, revealSource: o, toast: s, readOnly: c, readOnlyMessage: l, writerUrl: u } = e, [d, f] = (0, B.useState)(ij(e.category) ? e.category : $le), [p, m] = (0, B.useState)("candidates"), [h, g] = (0, B.useState)(""), [_, v] = (0, B.useState)(1), [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, B.useState)(/* @__PURE__ */ new Map()), [C, w] = (0, B.useState)(/* @__PURE__ */ new Map()), [T, E] = (0, B.useState)(""), D = (0, B.useRef)(null), [O, k] = (0, B.useState)(0), [A, j] = (0, B.useState)(""), M = (0, B.useRef)(!0);
(0, B.useEffect)(() => () => {
M.current = !1;
}, []);
let N = TS({
- queryKey: hj,
- queryFn: ({ signal: e }) => Cj(e)
+ queryKey: nj,
+ queryFn: ({ signal: e }) => uj(e)
}).data || {
sections: {},
counts: {}
- }, P = N.sections[d] || [], ee = d === "metadata_fields", F = c, I = pue(P, ee), te = I.some(([e]) => e === p) ? p : "candidates", ne = vj(P, te), re = ne.some((e) => e.key === h) ? h : "", ie = hue(mue(P, te, re), _), ae = ie.rows.map((e) => e.item_key), oe = new Set(ae), se = ne.map((e) => ({
+ }, P = N.sections[d] || [], ee = d === "metadata_fields", F = c, I = tue(P, ee), te = I.some(([e]) => e === p) ? p : "candidates", ne = aj(P, te), re = ne.some((e) => e.key === h) ? h : "", ie = rue(nue(P, te, re), _), ae = ie.rows.map((e) => e.item_key), oe = new Set(ae), se = ne.map((e) => ({
...e,
rows: e.rows.filter((e) => oe.has(e.item_key))
- })).filter((e) => e.rows.length), ce = (e) => x.get(e.item_key) || Sue(e), le = P.filter((e) => y.has(e.item_key)), ue = (e) => {
+ })).filter((e) => e.rows.length), ce = (e) => x.get(e.item_key) || uue(e), le = P.filter((e) => y.has(e.item_key)), ue = (e) => {
let t = new Set(e);
b((e) => new Set([...e].filter((e) => !t.has(e)))), S((e) => new Map([...e].filter(([e]) => !t.has(e)))), w((e) => new Map([...e].filter(([e]) => !t.has(e))));
}, L = (e, t) => w((n) => new Map(n).set(e, t)), de = (e) => {
f(e), m("candidates"), g(""), v(1), b(/* @__PURE__ */ new Set()), S(/* @__PURE__ */ new Map()), w(/* @__PURE__ */ new Map()), E(""), D.current = null, r({ category: e === "metadata_fields" ? "" : e });
}, fe = OS({
- mutationFn: ({ row: e, status: t }) => wj(Sj(d, e, t, ce(e))),
+ mutationFn: ({ row: e, status: t }) => dj(lj(d, e, t, ce(e))),
onSuccess: (e, { row: t, status: n }) => {
if (!e.ok) {
L(t.item_key, e.error || "服务端拒绝了这次判定");
return;
}
- Tj(d, [t.item_key]), ue([t.item_key]), s(Cue(n));
+ fj(d, [t.item_key]), ue([t.item_key]), s(due(n));
},
onError: (e, { row: t }) => L(t.item_key, W(e))
}), pe = OS({
@@ -48802,7 +48898,7 @@ function Ive(e) {
if (!M.current) break;
E(`正在处理 ${i} / ${t.length}`);
try {
- let t = await wj(Sj(d, a, e, ce(a)));
+ let t = await dj(lj(d, a, e, ce(a)));
if (!t.ok) throw Error(t.error || "服务端未采用该项");
n.push(a.item_key);
} catch (e) {
@@ -48816,7 +48912,7 @@ function Ive(e) {
};
},
onSuccess: ({ status: e, done: t, failures: n }) => {
- Tj(d, t), ue(t), n.forEach(([e, t]) => L(e, t)), E(""), s(`已${e === "approved" ? "通过" : "拒绝"} ${t.length} 项` + (n.length ? `,${n.length} 项未完成` : ""));
+ fj(d, t), ue(t), n.forEach(([e, t]) => L(e, t)), E(""), s(`已${e === "approved" ? "通过" : "拒绝"} ${t.length} 项` + (n.length ? `,${n.length} 项未完成` : ""));
},
onError: (e) => {
E(W(e));
@@ -48846,7 +48942,7 @@ function Ive(e) {
k(e), j("");
let t = await o(e);
M.current && (k(0), j(t));
- }, ge = Due(N.mirror, l), _e = N.genre_tags || [], ve = {
+ }, ge = hue(N.mirror, l), _e = N.genre_tags || [], ve = {
openItem: i,
openEntity: a,
onReveal: he,
@@ -48870,13 +48966,13 @@ function Ive(e) {
}) : void 0,
children: ge
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Cve, { tags: _e }),
- /* @__PURE__ */ (0, V.jsxs)(lk, {
+ /* @__PURE__ */ (0, V.jsx)(Dve, { tags: _e }),
+ /* @__PURE__ */ (0, V.jsxs)(Jk, {
orientation: t ? "horizontal" : "vertical",
selectedKey: d,
onSelectionChange: (e) => {
let t = String(e);
- _j(t) && de(t);
+ ij(t) && de(t);
},
className: "flex flex-col gap-5 review-split:flex-row-reverse review-split:items-start review-split:gap-6",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -48885,27 +48981,27 @@ function Ive(e) {
children: [/* @__PURE__ */ (0, V.jsx)("h2", {
id: "reviewcategories",
children: "复核分类"
- }), /* @__PURE__ */ (0, V.jsx)(uk, {
+ }), /* @__PURE__ */ (0, V.jsx)(Yk, {
"aria-labelledby": "reviewcategories",
"data-section-items": !0,
className: "flex review-split:flex-col review-split:items-stretch",
- children: uue.map((e) => {
+ children: Qle.map((e) => {
let t = Number(N.counts[e] || 0);
- return /* @__PURE__ */ (0, V.jsxs)(dk, {
+ return /* @__PURE__ */ (0, V.jsxs)(Xk, {
id: e,
- className: Pve,
- children: [gj[e], t ? /* @__PURE__ */ (0, V.jsx)("span", {
+ className: Rve,
+ children: [rj[e], t ? /* @__PURE__ */ (0, V.jsx)("span", {
className: "tabular-nums text-caption-1-medium text-text-secondary",
children: t.toLocaleString()
}) : null]
}, e);
})
})]
- }), /* @__PURE__ */ (0, V.jsxs)(fk, {
+ }), /* @__PURE__ */ (0, V.jsxs)(Zk, {
id: d,
className: "flex min-w-0 flex-1 flex-col gap-5",
children: [
- P.length && !F ? /* @__PURE__ */ (0, V.jsx)(xve, {
+ P.length && !F ? /* @__PURE__ */ (0, V.jsx)(Tve, {
groupOptions: I,
groupBy: te,
onGroupBy: (e) => {
@@ -48921,7 +49017,7 @@ function Ive(e) {
onSelected: b,
selectedRows: le,
metadata: ee,
- approvable: le.every((e) => yj(d, e)),
+ approvable: le.every((e) => oj(d, e)),
busy: pe.isPending,
feedback: T,
onUnifySource: R,
@@ -48946,7 +49042,7 @@ function Ive(e) {
})]
}) : null, /* @__PURE__ */ (0, V.jsx)("div", {
className: "review-grid gap-5",
- children: e.rows.map((e) => /* @__PURE__ */ (0, V.jsx)(Nve, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, V.jsx)(Lve, {
category: d,
row: e,
choice: ce(e),
@@ -48954,7 +49050,7 @@ function Ive(e) {
selected: y.has(e.item_key),
onSelect: (t, n) => b((r) => {
let i = new Set(r);
- return D.current = _ue(i, ae, D.current, e.item_key, t, n), i;
+ return D.current = aue(i, ae, D.current, e.item_key, t, n), i;
}),
locked: F,
busy: fe.isPending && fe.variables?.row.item_key === e.item_key,
@@ -48974,7 +49070,7 @@ function Ive(e) {
title: "此分类没有待复核项目",
children: "可切换分类查看其他候选。"
}),
- /* @__PURE__ */ (0, V.jsx)(Fve, {
+ /* @__PURE__ */ (0, V.jsx)(zve, {
page: ie.page,
pages: ie.pages,
onPage: v
@@ -48987,9 +49083,13 @@ function Ive(e) {
}
//#endregion
//#region src/react/scraping/scraping.ts
-var Lve = "/api/scraping", Rve = "/api/scraping/settings", zve = "/api/scraping/check", QL = "/api/scraping/cover", Bve = "/api/scraping/amane-bridge", Vve = "/api/scraping/amane-bridge/check", Hve = "/api/scraping/amane-bridge/rebuild", $L = ["scraping"], eR = ["scraping", "cover"], tR = ["scraping", "amane-bridge"], nR = (e) => G(Lve, e), rR = (e) => G(QL, e), iR = (e) => G(Bve, e);
-async function Uve(e) {
+var Vve = "/api/scraping", Hve = "/api/scraping/settings", Uve = "/api/scraping/check", ZL = "/api/scraping/cover", Wve = "/api/scraping/amane-bridge", Gve = "/api/scraping/amane-bridge/check", Kve = "/api/scraping/amane-bridge/rebuild", QL = ["scraping"], $L = ["scraping", "cover"], eR = ["scraping", "amane-bridge"], tR = (e) => G(Vve, e), nR = (e) => G(ZL, e), rR = (e) => G(Wve, e);
+async function qve(e) {
await Promise.all([
+ z.fetchQuery({
+ queryKey: QL,
+ queryFn: () => tR(e)
+ }),
z.fetchQuery({
queryKey: $L,
queryFn: () => nR(e)
@@ -48997,20 +49097,16 @@ async function Uve(e) {
z.fetchQuery({
queryKey: eR,
queryFn: () => rR(e)
- }),
- z.fetchQuery({
- queryKey: tR,
- queryFn: () => iR(e)
})
]);
}
-function Wve(e, t) {
+function Jve(e, t) {
return `${t}${e.label === "来源页面" ? "" : " 高清图片"}:${e.ok ? "可连接" : "不能连接"}` + (e.width ? ` · ${e.width} × ${e.height}` : "") + (e.message ? `。${e.message}` : "");
}
//#endregion
//#region src/react/scraping/scraping-page.tsx
-var Gve = [["peach", "Peach 代理"], ["direct", "直接连接"]], aR = [["paste", "粘贴 Cookie"], ["file", "导入文件"]];
-function oR({ source: e }) {
+var Yve = [["peach", "Peach 代理"], ["direct", "直接连接"]], iR = [["paste", "粘贴 Cookie"], ["file", "导入文件"]];
+function aR({ source: e }) {
let t = [
"javten",
"fc2ppvdb",
@@ -49028,16 +49124,16 @@ function oR({ source: e }) {
className: "size-4 shrink-0 rounded-sm object-contain"
});
}
-function Kve() {
- return /* @__PURE__ */ (0, V.jsx)(oR, { source: "github" });
+function Xve() {
+ return /* @__PURE__ */ (0, V.jsx)(aR, { source: "github" });
}
-function qve({ source: e, toast: t }) {
- let [n, r] = (0, B.useState)(e.network), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(aR[0][0]), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), m = (0, B.useRef)(null);
+function Zve({ source: e, toast: t }) {
+ let [n, r] = (0, B.useState)(e.network), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(iR[0][0]), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), m = (0, B.useRef)(null);
function h() {
a(""), s(""), d(""), p(""), m.current && (m.current.value = "");
}
let g = OS({
- mutationFn: (t) => K(Rve, {
+ mutationFn: (t) => K(Hve, {
source: e.source,
network: n,
cookie: i,
@@ -49045,12 +49141,12 @@ function qve({ source: e, toast: t }) {
revoke: t
}),
onSuccess: (e, n) => {
- z.setQueryData($L, (t) => t && {
+ z.setQueryData(QL, (t) => t && {
...t,
sources: t.sources.map((t) => t.source === e.saved.source ? e.saved : t)
}), h(), t(n ? "Cookie 已撤销" : "来源设置已保存");
}
- }), _ = OS({ mutationFn: () => K(zve, { source: e.source }) }), v = g.isPending || _.isPending, y = (e) => {
+ }), _ = OS({ mutationFn: () => K(Uve, { source: e.source }) }), v = g.isPending || _.isPending, y = (e) => {
e.preventDefault(), !v && (_.reset(), g.mutate(!1));
}, b = () => {
v || (_.reset(), g.mutate(!0));
@@ -49075,37 +49171,37 @@ function qve({ source: e, toast: t }) {
}
}
let C = f || (g.error ? W(g.error) : "") || (_.error ? W(_.error) : ""), w = _.data?.results ?? [], T = n === "peach" || e.accepts_cookie || e.browser || !!C || w.length > 0;
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: e.label,
onSubmit: y,
aside: /* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-1",
- children: [/* @__PURE__ */ (0, V.jsx)(oR, { source: e.source }), /* @__PURE__ */ (0, V.jsx)(Lk, {
+ children: [/* @__PURE__ */ (0, V.jsx)(aR, { source: e.source }), /* @__PURE__ */ (0, V.jsx)(HE, {
href: e.login,
children: e.login
})]
}),
children: [
- /* @__PURE__ */ (0, V.jsx)(jk, { children: /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(IE, { children: /* @__PURE__ */ (0, V.jsx)(ME, {
label: "连接方式",
- children: /* @__PURE__ */ (0, V.jsx)(Ck, {
+ children: /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "连接方式",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: Gve.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: Yve.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: t
}, e))
})
}) }),
- T ? /* @__PURE__ */ (0, V.jsxs)(Mk, {
+ T ? /* @__PURE__ */ (0, V.jsxs)(LE, {
divided: !0,
children: [
n === "peach" ? /* @__PURE__ */ (0, V.jsx)("span", {
className: "self-start",
- children: /* @__PURE__ */ (0, V.jsx)(kk, {
+ children: /* @__PURE__ */ (0, V.jsx)(PE, {
href: "/configuration#peachProxy",
size: "small",
trailingIcon: lT,
@@ -49121,20 +49217,20 @@ function qve({ source: e, toast: t }) {
className: "text-body-2-regular text-text-secondary",
children: e.cookie_saved ? "Cookie 已保存;登录是否有效要到抓取时才知道。" : "需要登录时,任选一种方式提供 Cookie。"
}),
- /* @__PURE__ */ (0, V.jsx)(fA, {
+ /* @__PURE__ */ (0, V.jsx)(eA, {
"aria-label": "提供 Cookie 的方式(二选一)",
value: c,
onChange: (e) => {
l(e), h();
},
- className: pA,
- children: aR.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(FO, {
+ className: tA,
+ children: iR.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(bk, {
value: e,
- className: mA,
+ className: nA,
children: t
}, e))
}),
- c === "paste" ? /* @__PURE__ */ (0, V.jsx)(vk, {
+ c === "paste" ? /* @__PURE__ */ (0, V.jsx)(GM, {
type: "password",
label: "Cookie",
autoComplete: "off",
@@ -49143,7 +49239,7 @@ function qve({ source: e, toast: t }) {
}) : /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ik, { children: "Netscape Cookie 文件(.txt)" }),
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "Netscape Cookie 文件(.txt)" }),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-3",
children: [/* @__PURE__ */ (0, V.jsx)(J, {
@@ -49169,14 +49265,14 @@ function qve({ source: e, toast: t }) {
]
})
] }) : null,
- C ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: C }) : null,
+ C ? /* @__PURE__ */ (0, V.jsx)(BE, { children: C }) : null,
w.map((t) => /* @__PURE__ */ (0, V.jsx)(Y, {
tone: t.ok ? "success" : "error",
- children: Wve(t, e.label)
+ children: Jve(t, e.label)
}, t.label))
]
}) : null,
- /* @__PURE__ */ (0, V.jsxs)(Nk, { children: [
+ /* @__PURE__ */ (0, V.jsxs)(RE, { children: [
e.accepts_cookie && e.cookie_saved ? /* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
onClick: b,
@@ -49198,26 +49294,26 @@ function qve({ source: e, toast: t }) {
]
});
}
-function Jve({ toast: e }) {
- let [t, n] = (0, B.useState)(""), { running: r, outcome: i, start: a } = IM({
- queryKey: eR,
- queryFn: ({ signal: e }) => rR(e),
- start: () => K(QL, { code: t }),
+function Qve({ toast: e }) {
+ let [t, n] = (0, B.useState)(""), { running: r, outcome: i, start: a } = kM({
+ queryKey: $L,
+ queryFn: ({ signal: e }) => nR(e),
+ start: () => K(ZL, { code: t }),
onFinish: (t) => {
t.status === "complete" && e(t.result || "封面采集完成");
}
}), o = (e) => {
e.preventDefault(), !(r || a.isPending || !t.trim()) && a.mutate();
}, s = a.error ? W(a.error) : i?.status === "failed" ? i.error || "采集未取得" : "";
- return /* @__PURE__ */ (0, V.jsx)(Ak, {
+ return /* @__PURE__ */ (0, V.jsx)(FE, {
title: "高清封面",
onSubmit: o,
- children: /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
+ children: /* @__PURE__ */ (0, V.jsxs)(LE, { children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: /* @__PURE__ */ (0, V.jsx)(GM, {
"aria-label": "馆藏番号",
isRequired: !0,
isDisabled: r,
@@ -49244,11 +49340,11 @@ function Jve({ toast: e }) {
] })
});
}
-function Yve({ toast: e }) {
- let { query: t, running: n, outcome: r, start: i } = IM({
- queryKey: tR,
- queryFn: ({ signal: e }) => iR(e),
- start: () => K(Hve, {}),
+function $ve({ toast: e }) {
+ let { query: t, running: n, outcome: r, start: i } = kM({
+ queryKey: eR,
+ queryFn: ({ signal: e }) => rR(e),
+ start: () => K(Kve, {}),
jobOf: (e) => e.job,
withJob: (e, t) => e && {
...e,
@@ -49257,45 +49353,45 @@ function Yve({ toast: e }) {
onFinish: (t) => {
t.status === "complete" && e(t.result || "amane 桥已重建");
}
- }), a = OS({ mutationFn: () => K(Vve, {}) }), o = t.data;
- if (!o) return t.error ? /* @__PURE__ */ (0, V.jsx)(Ak, {
+ }), a = OS({ mutationFn: () => K(Gve, {}) }), o = t.data;
+ if (!o) return t.error ? /* @__PURE__ */ (0, V.jsx)(FE, {
title: "amane",
- children: /* @__PURE__ */ (0, V.jsx)(Mk, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
+ children: /* @__PURE__ */ (0, V.jsx)(LE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
children: W(t.error)
}) })
}) : null;
let s = n || i.isPending || a.isPending, c = i.error ? W(i.error) : a.error ? W(a.error) : r?.status === "failed" ? r.error || "重建未完成" : "";
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "amane",
- aside: /* @__PURE__ */ (0, V.jsx)(Lk, {
+ aside: /* @__PURE__ */ (0, V.jsx)(HE, {
href: o.repository,
- leadingIcon: Kve,
+ leadingIcon: Xve,
children: o.repository
}),
children: [
- /* @__PURE__ */ (0, V.jsxs)(Rk, { children: [
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsxs)(UE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "已安装版本",
children: o.installed_version || "未安装"
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "上游最新版本",
children: a.data?.latest ?? "尚未检查"
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "运行环境",
children: o.installed ? "已安装" : "未安装"
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "内置站点",
children: o.sites.map((e) => e.label).join("、")
})
] }),
- /* @__PURE__ */ (0, V.jsxs)(Mk, {
+ /* @__PURE__ */ (0, V.jsxs)(LE, {
divided: !0,
children: [
- /* @__PURE__ */ (0, V.jsxs)(Pk, { children: [
+ /* @__PURE__ */ (0, V.jsxs)(zE, { children: [
"已安装版本:",
o.installed_version || "未安装",
"。amane(",
@@ -49315,7 +49411,7 @@ function Yve({ toast: e }) {
}) : null
]
}),
- /* @__PURE__ */ (0, V.jsxs)(Nk, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
+ /* @__PURE__ */ (0, V.jsxs)(RE, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
variant: "secondary",
onClick: () => {
s || a.mutate();
@@ -49332,22 +49428,22 @@ function Yve({ toast: e }) {
]
});
}
-function Xve({ toast: e }) {
+function eye({ toast: e }) {
let t = TS({
- queryKey: $L,
- queryFn: ({ signal: e }) => nR(e)
+ queryKey: QL,
+ queryFn: ({ signal: e }) => tR(e)
}), n = t.data;
return n ? /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "高清图片可能要经代理才能下载,先检查连接。"
}),
- /* @__PURE__ */ (0, V.jsx)(Jve, { toast: e }),
- (n.sources || []).map((t) => /* @__PURE__ */ (0, V.jsx)(qve, {
+ /* @__PURE__ */ (0, V.jsx)(Qve, { toast: e }),
+ (n.sources || []).map((t) => /* @__PURE__ */ (0, V.jsx)(Zve, {
source: t,
toast: e
}, t.source)),
- /* @__PURE__ */ (0, V.jsx)(Yve, { toast: e })
+ /* @__PURE__ */ (0, V.jsx)($ve, { toast: e })
] }) : /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "采集来源读取失败",
@@ -49356,21 +49452,21 @@ function Xve({ toast: e }) {
}
//#endregion
//#region src/react/search/search.ts
-var sR = /* @__PURE__ */ new Set([
+var oR = /* @__PURE__ */ new Set([
"performer",
"creator",
"studio",
"agency",
"series"
-]), cR = /* @__PURE__ */ new Set(["asset"]), lR = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase();
-function Zve({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a, kind: o }) {
+]), sR = /* @__PURE__ */ new Set(["asset"]), cR = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase();
+function tye({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a, kind: o }) {
let s = 0, c = [], l = (e) => {
let t = {
...e,
index: s++
};
return c.push(t), t;
- }, u = t.filter((t) => !e || lR(t).includes(lR(e)));
+ }, u = t.filter((t) => !e || cR(t).includes(cR(e)));
if (!e) {
let e = u.length ? {
label: "搜索记录",
@@ -49408,7 +49504,7 @@ function Zve({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a
kind: e.kind,
item: t
}))
- }), h = p.filter((e) => !cR.has(e.kind)).map(m), g = p.filter((e) => cR.has(e.kind)).map(m);
+ }), h = p.filter((e) => !sR.has(e.kind)).map(m), g = p.filter((e) => sR.has(e.kind)).map(m);
return {
tabs: d && a.length > 1 ? [...a] : null,
recent: f,
@@ -49417,17 +49513,17 @@ function Zve({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a
options: c
};
}
-function Qve(e, t, n = Math.random) {
+function nye(e, t, n = Math.random) {
let r = [...e];
for (let e = r.length - 1; e > 0; --e) {
let t = Math.floor(n() * (e + 1));
[r[e], r[t]] = [r[t], r[e]];
}
- return r.filter((e) => !t.some((t) => lR(t) === lR(e))).slice(0, 5);
+ return r.filter((e) => !t.some((t) => cR(t) === cR(e))).slice(0, 5);
}
//#endregion
//#region src/react/search/search-page.tsx
-var $ve = () => ({
+var rye = () => ({
history: [],
pool: [],
poolRequest: 0,
@@ -49442,7 +49538,7 @@ var $ve = () => ({
active: -1,
reveal: !1,
rewind: !1
-}), uR = (e) => Zve({
+}), lR = (e) => tye({
query: e.query,
history: e.history,
picks: e.picks,
@@ -49450,18 +49546,18 @@ var $ve = () => ({
groups: e.groups,
tabs: e.tabs,
kind: e.kind
-}), eye = (e) => !!(e.tabs || e.recent || e.left.length || e.right.length), dR = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("svg", {
+}), iye = (e) => !!(e.tabs || e.recent || e.left.length || e.right.length), uR = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
});
-function tye(e) {
+function aye(e) {
let t = (0, B.useRef)(e);
t.current = e;
let n = (0, B.useRef)(null);
- n.current ??= $ve();
+ n.current ??= rye();
let r = n.current, i = (0, B.useRef)(null), [, a] = (0, B.useReducer)((e) => e + 1, 0), o = (0, B.useRef)(null);
- o.current ??= nye(() => t.current, r, () => i.current?.closest("[data-search-menu]") ?? null, a);
+ o.current ??= oye(() => t.current, r, () => i.current?.closest("[data-search-menu]") ?? null, a);
let s = o.current;
(0, B.useLayoutEffect)(() => {
let { input: e } = t.current, n = (e) => s.input(e), i = () => t.current.helpers.composing(), a = (e) => s.key(e), o = () => s.focus();
@@ -49474,7 +49570,7 @@ function tye(e) {
let e = i.current?.closest("[data-search-menu]");
r.rewind && e && (e.scrollTop = 0), r.rewind = !1, r.reveal && i.current?.querySelector("[data-search-option][data-active]")?.scrollIntoView({ block: "nearest" }), r.reveal = !1;
});
- let c = uR(r), l = e.historyLimit, u = (t) => /* @__PURE__ */ (0, V.jsx)(iye, {
+ let c = lR(r), l = e.historyLimit, u = (t) => /* @__PURE__ */ (0, V.jsx)(cye, {
entry: t,
active: t.index === r.active,
helpers: e.helpers,
@@ -49494,7 +49590,7 @@ function tye(e) {
"data-search-root": "",
"data-history-limit": l,
children: [
- c.tabs ? /* @__PURE__ */ (0, V.jsx)(rye, {
+ c.tabs ? /* @__PURE__ */ (0, V.jsx)(sye, {
tabs: c.tabs,
kind: r.kind,
onPick: s.pickKind,
@@ -49515,7 +49611,7 @@ function tye(e) {
]
});
}
-function nye(e, t, n, r) {
+function oye(e, t, n, r) {
let i = () => e().input, a = () => document.activeElement === i(), o = () => t.history.slice(0, e().historyLimit), s = (n) => {
t.history = n.slice(0, e().historyLimit);
}, c = async () => {
@@ -49529,7 +49625,7 @@ function nye(e, t, n, r) {
t.history = Array.isArray(e.items) ? e.items.map(String) : [];
} catch {}
}, l = (t) => {
- !t || !e().historyLimit || (s([t, ...o().filter((e) => lR(e) !== lR(t))]), K("/api/search-history", { query: t }).catch(() => null));
+ !t || !e().historyLimit || (s([t, ...o().filter((e) => cR(e) !== cR(t))]), K("/api/search-history", { query: t }).catch(() => null));
}, u = async () => {
let n = ++t.poolRequest;
t.pool = [];
@@ -49562,9 +49658,9 @@ function nye(e, t, n, r) {
let i = n();
i && e().helpers.dismiss(i), t.active = -1, r();
}, m = () => {
- t.query = i().value.trim(), t.picks = t.query ? [] : Qve(t.pool, o()), t.active = -1;
+ t.query = i().value.trim(), t.picks = t.query ? [] : nye(t.pool, o()), t.active = -1;
let a = n();
- a && (eye(uR(t)) ? e().helpers.present(a) : e().helpers.dismiss(a)), r();
+ a && (iye(lR(t)) ? e().helpers.present(a) : e().helpers.dismiss(a)), r();
}, h = () => {
t.active = -1, t.kind = "", clearTimeout(t.timer);
let e = i().value.trim();
@@ -49576,7 +49672,7 @@ function nye(e, t, n, r) {
!n || e === t.kind || (t.kind = e, clearTimeout(t.timer), m(), t.rewind = !0, d(n, e).then(() => {
a() && t.kind === e && m();
}));
- }, _ = () => f() ? uR(t).options : [], v = (e) => {
+ }, _ = () => f() ? lR(t).options : [], v = (e) => {
let n = _();
return n.length ? (t.active = (t.active + e + n.length) % n.length, t.reveal = !0, r(), !0) : !1;
}, y = (t, n) => {
@@ -49589,7 +49685,7 @@ function nye(e, t, n, r) {
i().blur(), e().actions.openItem(t.item.id);
return;
}
- if (t.type === "suggest" && sR.has(t.kind)) {
+ if (t.type === "suggest" && oR.has(t.kind)) {
b(t.kind, t.value);
return;
}
@@ -49641,12 +49737,12 @@ function nye(e, t, n, r) {
await K("/api/search-history", {
operation: "remove",
query: e
- }).catch(() => null), s(o().filter((t) => lR(t) !== lR(e))), t.active = -1, r();
+ }).catch(() => null), s(o().filter((t) => cR(t) !== cR(e))), t.active = -1, r();
},
pickKind: g
};
}
-function rye({ tabs: e, kind: t, onPick: n, wire: r }) {
+function sye({ tabs: e, kind: t, onPick: n, wire: r }) {
let i = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => {
r(i.current);
@@ -49658,7 +49754,7 @@ function rye({ tabs: e, kind: t, onPick: n, wire: r }) {
"aria-selected": t === e,
onMouseDown: (e) => e.preventDefault(),
onClick: () => n(e),
- children: [r, i ? /* @__PURE__ */ (0, V.jsx)(wL, { value: i }) : null]
+ children: [r, i ? /* @__PURE__ */ (0, V.jsx)(CL, { value: i }) : null]
}, e || "all");
return /* @__PURE__ */ (0, V.jsxs)("div", {
ref: i,
@@ -49668,8 +49764,8 @@ function rye({ tabs: e, kind: t, onPick: n, wire: r }) {
children: [a("", "全部"), e.map((e) => a(e.kind, e.label, e.total))]
});
}
-var fR = (e) => e.preventDefault();
-function iye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove: a }) {
+var dR = (e) => e.preventDefault();
+function cye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove: a }) {
let o = {
"data-search-value": e.value,
"data-active": t ? "" : void 0,
@@ -49681,28 +49777,28 @@ function iye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-search-option": "",
...o,
children: [
- /* @__PURE__ */ (0, V.jsx)(dR, { name: e.type === "history" ? "history" : "sparkles" }),
+ /* @__PURE__ */ (0, V.jsx)(uR, { name: e.type === "history" ? "history" : "sparkles" }),
/* @__PURE__ */ (0, V.jsx)("span", { children: e.value }),
e.type === "history" ? /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-remove-history": e.value,
"aria-label": `删除历史 ${e.value}`,
- onMouseDown: fR,
+ onMouseDown: dR,
onClick: (t) => {
t.stopPropagation(), a(e.value);
},
- children: /* @__PURE__ */ (0, V.jsx)(dR, { name: "x" })
+ children: /* @__PURE__ */ (0, V.jsx)(uR, { name: "x" })
}) : null
]
});
- let { item: s, kind: c } = e, l = sR.has(c) ? c : void 0;
+ let { item: s, kind: c } = e, l = oR.has(c) ? c : void 0;
if (c === "asset") {
let e = [s.who, s.code ? s.title : ""].filter(Boolean).join(" · ");
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-search-option": "work",
"data-open-item": s.id,
...o,
- children: [/* @__PURE__ */ (0, V.jsx)(pR, {
+ children: [/* @__PURE__ */ (0, V.jsx)(fR, {
card: s.card,
helpers: n
}), /* @__PURE__ */ (0, V.jsxs)("span", {
@@ -49728,7 +49824,7 @@ function iye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-open-entity": l,
...o,
children: [
- /* @__PURE__ */ (0, V.jsx)(mR, {
+ /* @__PURE__ */ (0, V.jsx)(pR, {
item: s,
kind: c
}),
@@ -49748,11 +49844,11 @@ function iye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
type: "button",
"data-open-work": e.id,
"aria-label": `打开 ${e.code || s.value}`,
- onMouseDown: fR,
+ onMouseDown: dR,
onClick: (t) => {
t.stopPropagation(), i(e);
},
- children: /* @__PURE__ */ (0, V.jsx)(pR, {
+ children: /* @__PURE__ */ (0, V.jsx)(fR, {
card: e,
helpers: n
})
@@ -49766,7 +49862,7 @@ function iye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-open-entity": l,
...o,
children: [
- c === "studio" || c === "agency" ? /* @__PURE__ */ (0, V.jsx)(mR, {
+ c === "studio" || c === "agency" ? /* @__PURE__ */ (0, V.jsx)(pR, {
item: s,
kind: c
}) : null,
@@ -49779,13 +49875,13 @@ function iye({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
]
});
}
-function pR({ card: e, helpers: t }) {
+function fR({ card: e, helpers: t }) {
return /* @__PURE__ */ (0, V.jsx)("span", {
"data-search-pic": "",
dangerouslySetInnerHTML: { __html: t.coverHtml(e) }
});
}
-function mR({ item: e, kind: t }) {
+function pR({ item: e, kind: t }) {
let n = {
id: e.entity_id,
has_image: e.has_image,
@@ -49800,51 +49896,51 @@ function mR({ item: e, kind: t }) {
}
//#endregion
//#region src/configuration-endpoints.ts
-var hR = "/api/configuration", aye = "/api/pick-folder", gR = ["configuration"], _R = (e) => G(hR, e);
-async function vR(e) {
+var mR = "/api/configuration", lye = "/api/pick-folder", hR = ["configuration"], gR = (e) => G(mR, e);
+async function _R(e) {
await z.fetchQuery({
- queryKey: gR,
- queryFn: () => _R(e)
+ queryKey: hR,
+ queryFn: () => gR(e)
});
}
//#endregion
//#region src/react/settings/indexer-settings.tsx
-var yR = "/api/configuration/indexers";
-function oye({ receipt: e }) {
+var vR = "/api/configuration/indexers";
+function uye({ receipt: e }) {
let t = TS({
queryKey: ["indexers"],
- queryFn: ({ signal: e }) => G(yR, e)
+ queryFn: ({ signal: e }) => G(vR, e)
});
- return t.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: W(t.error) }) : t.data ? /* @__PURE__ */ (0, V.jsx)(sye, {
+ return t.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: W(t.error) }) : t.data ? /* @__PURE__ */ (0, V.jsx)(dye, {
initial: t.data,
receipt: e
}) : null;
}
-function sye({ initial: e, receipt: t }) {
+function dye({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e.indexers), i = AE(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
...n,
...t
} : n));
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "资源索引器",
onSubmit: (e) => {
- e.preventDefault(), i.run("save", (e) => K(yR, { indexers: n }, "POST", e), (e) => {
+ e.preventDefault(), i.run("save", (e) => K(vR, { indexers: n }, "POST", e), (e) => {
r(e.indexers), t("已保存索引器");
});
},
- children: [/* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: "接入 Prowlarr 或 Jackett 后可以按番号搜磁力。Torznab 地址在 Prowlarr 每个索引器的详情里, API key 在 Settings → General。" }),
+ children: [/* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: "接入 Prowlarr 或 Jackett 后可以按番号搜磁力。Torznab 地址在 Prowlarr 每个索引器的详情里, API key 在 Settings → General。" }),
n.map((e, t) => /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 flex-col gap-4 border-t border-separator-border pt-4",
children: [
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: `索引器 ${t + 1} 名称`,
value: e.name,
maxLength: 80,
isDisabled: !!i.busy,
onChange: (t) => a(e.key, { name: t })
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: `索引器 ${t + 1} Torznab 地址`,
value: e.url,
type: "url",
@@ -49853,7 +49949,7 @@ function sye({ initial: e, receipt: t }) {
isDisabled: !!i.busy,
onChange: (t) => a(e.key, { url: t })
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: `索引器 ${t + 1} API key`,
type: "password",
autoComplete: "new-password",
@@ -49862,13 +49958,13 @@ function sye({ initial: e, receipt: t }) {
isDisabled: !!i.busy,
onChange: (t) => a(e.key, { api_key: t })
}),
- /* @__PURE__ */ (0, V.jsx)(BM, {
+ /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: e.enabled,
isDisabled: !!i.busy,
onChange: (t) => a(e.key, { enabled: t }),
children: "启用"
}),
- e.api_key_set ? /* @__PURE__ */ (0, V.jsx)(BM, {
+ e.api_key_set ? /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: !!e.clear_api_key,
isDisabled: !!i.busy,
onChange: (t) => a(e.key, { clear_api_key: t }),
@@ -49882,8 +49978,8 @@ function sye({ initial: e, receipt: t }) {
}) })
]
}, e.key)),
- i.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: i.error }) : null
- ] }), /* @__PURE__ */ (0, V.jsxs)(Nk, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
+ i.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: i.error }) : null
+ ] }), /* @__PURE__ */ (0, V.jsxs)(RE, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
type: "button",
disabled: !!i.busy || n.length >= e.max_indexers,
onClick: () => r([...n, {
@@ -49903,24 +49999,24 @@ function sye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/download-settings.tsx
-var cye = "/api/configuration/downloads", bR = "/api/configuration/downloads/check", lye = "/api/configuration/downloads/folder", uye = "/api/configuration/downloads/pikpak/login", dye = "/api/configuration/downloads/pikpak/logout", xR = "/api/configuration/downloads/pikpak/browser-login", SR = 2e3;
-function fye({ initial: e, receipt: t }) {
+var fye = "/api/configuration/downloads", yR = "/api/configuration/downloads/check", pye = "/api/configuration/downloads/folder", mye = "/api/configuration/downloads/pikpak/login", hye = "/api/configuration/downloads/pikpak/logout", bR = "/api/configuration/downloads/pikpak/browser-login", xR = 2e3;
+function gye({ initial: e, receipt: t }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-6",
- children: [/* @__PURE__ */ (0, V.jsx)(pye, {
+ children: [/* @__PURE__ */ (0, V.jsx)(_ye, {
initial: e,
receipt: t
- }), /* @__PURE__ */ (0, V.jsx)(oye, { receipt: t })]
+ }), /* @__PURE__ */ (0, V.jsx)(uye, { receipt: t })]
});
}
-function pye({ initial: e, receipt: t }) {
+function _ye({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(""), o = n.pikpak.logged_in || !!i.trim();
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(mye, {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(vye, {
state: n,
settle: r,
receipt: t,
pikpakAccount: o
- }), /* @__PURE__ */ (0, V.jsx)(gye, {
+ }), /* @__PURE__ */ (0, V.jsx)(bye, {
state: n,
settle: r,
receipt: t,
@@ -49928,8 +50024,8 @@ function pye({ initial: e, receipt: t }) {
setUsername: a
})] });
}
-function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
- let [i, a] = (0, B.useState)(e.config), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(String(e.config.wait_hours)), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(CR), [g, _] = (0, B.useState)(""), [v, y] = (0, B.useState)(!1), b = AE(), x = (e) => i.targets[e] ?? "", S = (e, t) => a({
+function vye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
+ let [i, a] = (0, B.useState)(e.config), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(String(e.config.wait_hours)), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(SR), [g, _] = (0, B.useState)(""), [v, y] = (0, B.useState)(!1), b = AE(), x = (e) => i.targets[e] ?? "", S = (e, t) => a({
...i,
targets: {
...i.targets,
@@ -49958,8 +50054,8 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
target: !e.config.targets[115],
root: !e.config.pikpak_root
};
- b.run("auto", (e) => G(bR, e), (e) => w(e, t), (e) => _(W(e)));
- }, []), /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ b.run("auto", (e) => G(yR, e), (e) => w(e, t), (e) => _(W(e)));
+ }, []), /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "云下载",
onSubmit: (e) => {
if (e.preventDefault(), C) {
@@ -49972,19 +50068,19 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
token: o,
pikpak_account: r
};
- b.run("save", (e) => K(cye, f, "POST", e), (e) => {
+ b.run("save", (e) => K(fye, f, "POST", e), (e) => {
let { report: r, ...i } = e;
t(i), a(i.config), l(String(i.config.wait_hours)), s(""), r ? w(r, {
address: !i.config.clouddrive_address,
target: u,
root: !i.config.pikpak_root
- }, i.config.targets[115] ?? "") : (d(null), p(""), h(CR), y(!1), _("")), n("已保存配置");
+ }, i.config.targets[115] ?? "") : (d(null), p(""), h(SR), y(!1), _("")), n("已保存配置");
}, (e) => _(W(e)));
},
children: [
- /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: "磁力交给 115 或 PikPak 离线下载,下完自动入库。" }),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: "磁力交给 115 或 PikPak 离线下载,下完自动入库。" }),
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "CloudDrive2 地址",
placeholder: "留空自动探测本机 19798 / 29798",
autoComplete: "off",
@@ -49996,7 +50092,7 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
clouddrive_address: e
})
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "CloudDrive2 API 令牌",
type: "password",
autoComplete: "off",
@@ -50007,7 +50103,7 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
isDisabled: !e.available,
onChange: s
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "115 目标目录",
placeholder: "留空时按推送发现自动填写",
autoComplete: "off",
@@ -50019,7 +50115,7 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
isDisabled: !e.available,
onChange: (e) => S("115", e)
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "PikPak 目标目录",
placeholder: "以 / 开头的网盘路径",
autoComplete: "off",
@@ -50031,7 +50127,7 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
}),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, V.jsx)(Ik, { children: "PikPak 根目录对应的媒体文件夹" }), e.pikpak_roots.length ? /* @__PURE__ */ (0, V.jsx)(Ck, {
+ children: [/* @__PURE__ */ (0, V.jsx)(VE, { children: "PikPak 根目录对应的媒体文件夹" }), e.pikpak_roots.length ? /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "PikPak 根目录对应的媒体文件夹",
selectedKey: i.pikpak_root || null,
isDisabled: !e.available,
@@ -50040,13 +50136,13 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
...i,
pikpak_root: e === null ? "" : String(e)
}),
- children: e.pikpak_roots.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: e.pikpak_roots.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: e
}, e))
- }) : /* @__PURE__ */ (0, V.jsx)(Pk, { children: "先在「媒体」分组添加 PikPak 挂载的文件夹,这里才能选。" })]
+ }) : /* @__PURE__ */ (0, V.jsx)(zE, { children: "先在「媒体」分组添加 PikPak 挂载的文件夹,这里才能选。" })]
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "等待上限(小时)",
type: "number",
inputMode: "numeric",
@@ -50057,11 +50153,11 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
onChange: l
})
] }),
- b.busy === "auto" ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ b.busy === "auto" ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
children: /* @__PURE__ */ (0, V.jsx)(EE, { label: "正在检查 CloudDrive2" })
}) : null,
- u ? /* @__PURE__ */ (0, V.jsx)(hye, {
+ u ? /* @__PURE__ */ (0, V.jsx)(yye, {
report: u,
detected: f,
suggested: m,
@@ -50073,7 +50169,7 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
pikpak_root: i.pikpak_root,
pikpak_account: r
};
- b.run("folder", (e) => K(lye, t, "POST", e), (t) => {
+ b.run("folder", (e) => K(pye, t, "POST", e), (t) => {
d(t), h((t) => ({
...t,
target: {
@@ -50085,11 +50181,11 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
} : void 0,
creating: b.busy === "folder"
}) : null,
- g || b.error ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ g || b.error ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Fk, { children: g || b.error })
+ children: /* @__PURE__ */ (0, V.jsx)(BE, { children: g || b.error })
}) : null,
- /* @__PURE__ */ (0, V.jsxs)(Nk, {
+ /* @__PURE__ */ (0, V.jsxs)(RE, {
status: e.available ? void 0 : "云下载只在账本写入端可用。",
children: [/* @__PURE__ */ (0, V.jsx)(J, {
onClick: () => {
@@ -50104,7 +50200,7 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
pikpak_root: i.pikpak_root,
pikpak_account: r
};
- b.run("check", (e) => K(bR, t, "POST", e), (t) => w(t, e), (e) => _(W(e)));
+ b.run("check", (e) => K(yR, t, "POST", e), (t) => w(t, e), (e) => _(W(e)));
},
disabled: !e.available,
...X(b.busy === "check"),
@@ -50119,25 +50215,25 @@ function mye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
]
});
}
-var CR = {
+var SR = {
target: null,
root: "",
saved: !1
};
-function hye({ report: e, detected: t, suggested: n, create: r, creating: i }) {
+function yye({ report: e, detected: t, suggested: n, create: r, creating: i }) {
let a = n.target;
- return /* @__PURE__ */ (0, V.jsxs)(Mk, {
+ return /* @__PURE__ */ (0, V.jsxs)(LE, {
divided: !0,
- children: [/* @__PURE__ */ (0, V.jsxs)(Rk, { children: [
- t ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(UE, { children: [
+ t ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "CloudDrive2 地址",
children: `探测到 ${t},保存配置后生效`
}) : null,
- a?.exists ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ a?.exists ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "115 目标目录",
children: n.saved ? `已按推送发现填入 ${a.path}` : `按推送发现填入 ${a.path},保存配置后生效`
}) : null,
- a && !a.exists ? /* @__PURE__ */ (0, V.jsxs)(zk, {
+ a && !a.exists ? /* @__PURE__ */ (0, V.jsxs)(WE, {
term: "115 目标目录",
children: [`${a.path} 不存在`, r ? /* @__PURE__ */ (0, V.jsx)(J, {
size: "small",
@@ -50146,49 +50242,49 @@ function hye({ report: e, detected: t, suggested: n, create: r, creating: i }) {
children: "新建这个目录"
}) : null]
}) : null,
- n.root ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ n.root ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "PikPak 根目录",
children: `按推送发现填入 ${n.root},保存配置后生效`
}) : null,
- e.permissions.length ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ e.permissions.length ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "离线权限",
children: e.missing.length ? `缺少:${e.missing.join("、")}` : "齐全"
}) : null,
- e.folder ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ e.folder ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "目标目录",
children: e.folder.can_offline ? `${e.folder.path} 可以离线下载` : `${e.folder.path} 不支持离线下载`
}) : null,
- e.quota ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ e.quota ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "115 离线配额",
children: `本月还剩 ${e.quota.left} 条,共 ${e.quota.total} 条`
}) : null
- ] }), e.problems.map((e) => /* @__PURE__ */ (0, V.jsx)(Fk, { children: e }, e))]
+ ] }), e.problems.map((e) => /* @__PURE__ */ (0, V.jsx)(BE, { children: e }, e))]
});
}
-function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
+function bye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
let [a, o] = (0, B.useState)(""), [s, c] = (0, B.useState)(!1), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = AE(), g = e.pikpak, _ = e.pikpak_browser, v = _.state === "waiting";
(0, B.useEffect)(() => {
if (!v) return;
let e = new AbortController(), r, i = async () => {
try {
- let r = await G(xR, e.signal);
+ let r = await G(bR, e.signal);
if (e.signal.aborted || (t(r), r.pikpak_browser.state === "done" ? n("已登录 PikPak") : r.pikpak_browser.state !== "waiting" && m(r.pikpak_browser.message), r.pikpak_browser.state !== "waiting")) return;
} catch (t) {
if (e.signal.aborted) return;
f(W(t));
}
- r = setTimeout(i, SR);
+ r = setTimeout(i, xR);
};
- return r = setTimeout(i, SR), () => {
+ return r = setTimeout(i, xR), () => {
e.abort(), clearTimeout(r);
};
}, [v]);
let y = () => {
- m(""), h.run("browser", (e) => K(xR, {}, "POST", e), (e) => {
+ m(""), h.run("browser", (e) => K(bR, {}, "POST", e), (e) => {
t(e), f("");
}, (e) => f(W(e)));
}, b = () => {
- h.run("cancel", (e) => K(`${xR}/cancel`, {}, "POST", e), (e) => {
+ h.run("cancel", (e) => K(`${bR}/cancel`, {}, "POST", e), (e) => {
t(e), f(""), m(e.pikpak_browser.message);
}, (e) => f(W(e)));
}, x = (e) => {
@@ -50198,7 +50294,7 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
password: a,
remember: s
};
- h.run("login", (e) => K(uye, i, "POST", e), (e) => {
+ h.run("login", (e) => K(mye, i, "POST", e), (e) => {
if (t(e.settings), f(""), !e.ok) {
u(e.captcha_url ?? "");
return;
@@ -50206,11 +50302,11 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
u(""), o(""), n("已登录 PikPak");
}, (e) => f(W(e)));
}, S = () => {
- h.run("logout", (e) => K(dye, {}, "POST", e), (e) => {
+ h.run("logout", (e) => K(hye, {}, "POST", e), (e) => {
t(e), f(""), n("已登出 PikPak");
}, (e) => f(W(e)));
}, C = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "账号",
placeholder: "邮箱或手机号",
autoComplete: "username",
@@ -50219,7 +50315,7 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
isDisabled: !e.available,
onChange: i
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
label: "密码",
type: "password",
autoComplete: "current-password",
@@ -50228,7 +50324,7 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
isDisabled: !e.available,
onChange: o
}),
- /* @__PURE__ */ (0, V.jsx)(BM, {
+ /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: s,
isDisabled: !e.available,
onChange: c,
@@ -50239,7 +50335,7 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
title: "需要人机验证",
extra: /* @__PURE__ */ (0, V.jsx)("div", {
className: "pt-2",
- children: /* @__PURE__ */ (0, V.jsx)(Lk, {
+ children: /* @__PURE__ */ (0, V.jsx)(HE, {
href: l,
children: "打开 PikPak 验证页"
})
@@ -50252,31 +50348,31 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
...X(h.busy === "login"),
children: "登录"
}), T = _.state === "timeout" || _.state === "failed";
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "PikPak 账号",
onSubmit: x,
children: [
- g.logged_in ? /* @__PURE__ */ (0, V.jsxs)(Rk, { children: [/* @__PURE__ */ (0, V.jsx)(zk, {
+ g.logged_in ? /* @__PURE__ */ (0, V.jsxs)(UE, { children: [/* @__PURE__ */ (0, V.jsx)(WE, {
term: "账号",
children: g.username || "已登录"
- }), g.method === "browser" ? /* @__PURE__ */ (0, V.jsx)(zk, {
+ }), g.method === "browser" ? /* @__PURE__ */ (0, V.jsx)(WE, {
term: "登录方式",
children: "浏览器登录,由 Peach 续期"
- }) : /* @__PURE__ */ (0, V.jsx)(zk, {
+ }) : /* @__PURE__ */ (0, V.jsx)(WE, {
term: "密码",
children: g.remember ? "已保存,登录过期时自动重新登录" : "未保存,登录过期后需要回到这里重新登录"
- })] }) : _.available ? /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: "在弹出的浏览器窗口里登录 PikPak,之后由 Peach 自动续期。" }),
- p ? T ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: p }) : /* @__PURE__ */ (0, V.jsx)(Pk, {
+ })] }) : _.available ? /* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: "在弹出的浏览器窗口里登录 PikPak,之后由 Peach 自动续期。" }),
+ p ? T ? /* @__PURE__ */ (0, V.jsx)(BE, { children: p }) : /* @__PURE__ */ (0, V.jsx)(zE, {
role: "status",
children: p
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Bk, {
+ /* @__PURE__ */ (0, V.jsx)(GE, {
summary: "用账号密码登录",
children: /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-4",
children: [
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: "账号密码只用来换登录令牌,令牌存在这台电脑上。" }),
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: "账号密码只用来换登录令牌,令牌存在这台电脑上。" }),
C,
/* @__PURE__ */ (0, V.jsx)("div", {
className: "flex justify-end",
@@ -50285,12 +50381,12 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
]
})
})
- ] }) : /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [/* @__PURE__ */ (0, V.jsx)(Pk, { children: "账号密码只用来换登录令牌,令牌存在这台电脑上。" }), C] }),
- d || h.error ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ ] }) : /* @__PURE__ */ (0, V.jsxs)(LE, { children: [/* @__PURE__ */ (0, V.jsx)(zE, { children: "账号密码只用来换登录令牌,令牌存在这台电脑上。" }), C] }),
+ d || h.error ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Fk, { children: d || h.error })
+ children: /* @__PURE__ */ (0, V.jsx)(BE, { children: d || h.error })
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Nk, {
+ /* @__PURE__ */ (0, V.jsx)(RE, {
status: !g.logged_in && v ? /* @__PURE__ */ (0, V.jsx)(EE, { label: _.message || "等你在浏览器窗口里登录 PikPak" }) : null,
children: g.logged_in ? /* @__PURE__ */ (0, V.jsx)(J, {
onClick: S,
@@ -50315,90 +50411,90 @@ function gye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
}
//#endregion
//#region src/react/settings/maintenance-settings.tsx
-var _ye = [
+var xye = [
["6", "每 6 小时"],
["24", "每天"],
["168", "每周"]
];
-function vye({ data: e, receipt: t, reopenTutorial: n }) {
+function Sye({ data: e, receipt: t, reopenTutorial: n }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- /* @__PURE__ */ (0, V.jsx)(xye, { facts: e.facts }),
- /* @__PURE__ */ (0, V.jsx)(yye, {
+ /* @__PURE__ */ (0, V.jsx)(Tye, { facts: e.facts }),
+ /* @__PURE__ */ (0, V.jsx)(Cye, {
receipt: t,
reopenTutorial: n
}),
- e.uninstall ? /* @__PURE__ */ (0, V.jsx)(Sye, {
+ e.uninstall ? /* @__PURE__ */ (0, V.jsx)(Eye, {
uninstall: e.uninstall,
receipt: t
}) : null
]
});
}
-function yye({ receipt: e, reopenTutorial: t }) {
+function Cye({ receipt: e, reopenTutorial: t }) {
let n = AE();
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "安装教程",
- children: [/* @__PURE__ */ (0, V.jsxs)(Mk, { children: [/* @__PURE__ */ (0, V.jsx)(Pk, { children: "重新显示已关闭或跳过的安装步骤,保留已完成的记录。" }), n.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: n.error }) : null] }), /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(LE, { children: [/* @__PURE__ */ (0, V.jsx)(zE, { children: "重新显示已关闭或跳过的安装步骤,保留已完成的记录。" }), n.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: n.error }) : null] }), /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
onClick: () => void n.run("reopen", () => t(), () => e("已重新打开安装教程")),
...X(n.busy === "reopen"),
children: "重新打开教程"
}) })]
});
}
-function bye({ initial: e, receipt: t }) {
+function wye({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e.mode), [i, a] = (0, B.useState)(e.interval_hours), o = AE(e.error), s = (r) => {
r.preventDefault(), e.available && o.run("save", (e) => K("/api/configuration/automatic-updates", {
mode: n,
interval_hours: i
}, "POST", e), () => t("已保存配置"));
}, c = e.available ? e.download_available ? "下载完成后在这里确认重启安装。" : void 0 : "自动更新需要由托盘管理的服务。";
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "自动更新",
onSubmit: s,
children: [
- /* @__PURE__ */ (0, V.jsxs)(jk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsxs)(IE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "自动检查新版本",
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "自动检查新版本",
isSelected: n !== "off",
isDisabled: !e.available,
onChange: (e) => r(e ? "check" : "off")
})
}),
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "自动下载更新",
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "自动下载更新",
isSelected: n === "download",
isDisabled: !e.available || !e.download_available || n === "off",
onChange: (e) => r(e ? "download" : "check")
})
}),
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "检查频率",
description: c,
- children: /* @__PURE__ */ (0, V.jsx)(Ck, {
+ children: /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "检查频率",
selectedKey: String(i),
isDisabled: !e.available,
onSelectionChange: (e) => {
e !== null && a(Number(e));
},
- children: _ye.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: xye.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: t
}, e))
})
})
] }),
- o.error ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ o.error ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Fk, { children: o.error })
+ children: /* @__PURE__ */ (0, V.jsx)(BE, { children: o.error })
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
type: "submit",
disabled: !e.available,
...X(o.busy === "save"),
@@ -50407,22 +50503,22 @@ function bye({ initial: e, receipt: t }) {
]
});
}
-function xye({ facts: e }) {
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+function Tye({ facts: e }) {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "运行信息",
- children: [/* @__PURE__ */ (0, V.jsx)(Rk, { children: e.map((e) => /* @__PURE__ */ (0, V.jsxs)(zk, {
+ children: [/* @__PURE__ */ (0, V.jsx)(UE, { children: e.map((e) => /* @__PURE__ */ (0, V.jsxs)(WE, {
term: e.term,
- children: [e.value, e.download_url ? /* @__PURE__ */ (0, V.jsx)(Lk, {
+ children: [e.value, e.download_url ? /* @__PURE__ */ (0, V.jsx)(HE, {
href: e.download_url,
children: e.download_label
}) : null]
- }, e.term)) }), /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(kk, {
+ }, e.term)) }), /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(PE, {
href: "/diagnostics",
children: "打开系统诊断"
}) })]
});
}
-function Sye({ uninstall: e, receipt: t }) {
+function Eye({ uninstall: e, receipt: t }) {
let [n, r] = (0, B.useState)(!1), [i, a] = (0, B.useState)(""), o = () => void Te({
title: "卸载 Peach",
danger: !0,
@@ -50436,26 +50532,26 @@ function Sye({ uninstall: e, receipt: t }) {
a(e.message);
}
}), s = i || e.message, c = [.../* @__PURE__ */ new Set([e.data_root, ...e.directories])];
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
id: "uninstallPeach",
title: "卸载 Peach",
- children: [/* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- e.available ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
- /* @__PURE__ */ (0, V.jsx)(BM, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ e.available ? /* @__PURE__ */ (0, V.jsx)(zE, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
+ /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: n,
isDisabled: !e.full_available || !!i,
onChange: r,
children: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存"
}),
- /* @__PURE__ */ (0, V.jsx)(Bk, {
+ /* @__PURE__ */ (0, V.jsx)(GE, {
summary: "数据目录",
- children: c.map((e) => /* @__PURE__ */ (0, V.jsx)(jM, {
+ children: c.map((e) => /* @__PURE__ */ (0, V.jsx)(xM, {
path: e,
className: "text-body-2-regular text-text-secondary",
onRevealed: t
}, e))
})
- ] }), /* @__PURE__ */ (0, V.jsx)(Nk, {
+ ] }), /* @__PURE__ */ (0, V.jsx)(RE, {
status: s ? /* @__PURE__ */ (0, V.jsx)("p", {
role: i ? "status" : void 0,
children: s
@@ -50471,23 +50567,23 @@ function Sye({ uninstall: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/release-updates.tsx
-var wR = /* @__PURE__ */ new Set([
+var CR = /* @__PURE__ */ new Set([
"downloading",
"verifying",
"extracting",
"preparing",
"restarting",
"installing"
-]), Cye = [
+]), Dye = [
65,
67,
90
-], TR = 120;
-function wye({ initial: e, initialJob: t }) {
+], wR = 120;
+function Oye({ initial: e, initialJob: t }) {
let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(t || {
state: "idle",
progress: 0
- }), [o, s] = (0, B.useState)(""), c = AE(), l = (0, B.useRef)(!1), u = (0, B.useRef)(!0), d = wR.has(i.state);
+ }), [o, s] = (0, B.useState)(""), c = AE(), l = (0, B.useRef)(!1), u = (0, B.useRef)(!0), d = CR.has(i.state);
(0, B.useEffect)(() => (u.current = !0, () => {
u.current = !1;
}), []);
@@ -50504,7 +50600,7 @@ function wye({ initial: e, initialJob: t }) {
(0, B.useEffect)(() => {
i.state !== "ready" || l.current || (l.current = !0, p());
}, [i.state]), (0, B.useEffect)(() => {
- let e = new AbortController(), t = wR.has(i.state) ? 1e3 : 3e4, n, o = 0, c = async () => {
+ let e = new AbortController(), t = CR.has(i.state) ? 1e3 : 3e4, n, o = 0, c = async () => {
try {
let t = await G("/api/configuration/update-status", e.signal);
if (e.signal.aborted) return;
@@ -50517,9 +50613,9 @@ function wye({ initial: e, initialJob: t }) {
let n = await G("/api/configuration/automatic-updates", e.signal);
!e.signal.aborted && n.result && r(n.result);
} catch {
- o += 1, o >= TR && !e.signal.aborted && s("尚未连接到 Peach,请检查托盘后刷新页面。");
+ o += 1, o >= wR && !e.signal.aborted && s("尚未连接到 Peach,请检查托盘后刷新页面。");
}
- !e.signal.aborted && o < TR && (n = setTimeout(c, t));
+ !e.signal.aborted && o < wR && (n = setTimeout(c, t));
};
return n = setTimeout(c, t), () => {
e.abort(), clearTimeout(n);
@@ -50533,40 +50629,40 @@ function wye({ initial: e, initialJob: t }) {
state: "error"
}), c.setError(W(t));
}), g = c.error || o, _ = i.state === "downloading" && i.total ? `${((i.downloaded || 0) / 1048576).toFixed(1)} / ${(i.total / 1048576).toFixed(1)} MB` : `${i.progress}%`;
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "检查更新",
children: [
- /* @__PURE__ */ (0, V.jsxs)(Rk, { children: [
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsxs)(UE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "当前版本",
children: n.current_version
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "安装方式",
children: n.installation
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "更新通道",
children: n.channel
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "最新版本",
children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得")
})
] }),
- n.state === "unchecked" && !n.checked_at && !g && i.state === "idle" ? null : /* @__PURE__ */ (0, V.jsxs)(Mk, {
+ n.state === "unchecked" && !n.checked_at && !g && i.state === "idle" ? null : /* @__PURE__ */ (0, V.jsxs)(LE, {
divided: !0,
children: [
- n.checked_at ? /* @__PURE__ */ (0, V.jsxs)(Pk, { children: ["检查于 ", (/* @__PURE__ */ new Date(n.checked_at * 1e3)).toLocaleString()] }) : null,
+ n.checked_at ? /* @__PURE__ */ (0, V.jsxs)(zE, { children: ["检查于 ", (/* @__PURE__ */ new Date(n.checked_at * 1e3)).toLocaleString()] }) : null,
n.state === "available" && !g ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "info",
title: "有可用更新",
children: n.message
- }) : g || n.state === "error" ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: g || n.message }) : n.state === "unchecked" ? null : /* @__PURE__ */ (0, V.jsx)(Pk, {
+ }) : g || n.state === "error" ? /* @__PURE__ */ (0, V.jsx)(BE, { children: g || n.message }) : n.state === "unchecked" ? null : /* @__PURE__ */ (0, V.jsx)(zE, {
role: "status",
children: n.message
}),
- i.state === "error" ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: i.message }) : null,
+ i.state === "error" ? /* @__PURE__ */ (0, V.jsx)(BE, { children: i.message }) : null,
i.state !== "idle" && i.state !== "error" ? /* @__PURE__ */ (0, V.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-2",
@@ -50574,16 +50670,16 @@ function wye({ initial: e, initialJob: t }) {
/* @__PURE__ */ (0, V.jsx)(kE, {
label: "更新准备进度",
value: i.progress,
- stops: Cye
+ stops: Dye
}),
- /* @__PURE__ */ (0, V.jsxs)(Pk, { children: ["下载 → 校验 → 解压 → 准备安装 · ", i.message] }),
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: _ })
+ /* @__PURE__ */ (0, V.jsxs)(zE, { children: ["下载 → 校验 → 解压 → 准备安装 · ", i.message] }),
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: _ })
]
}) : null
]
}),
- /* @__PURE__ */ (0, V.jsxs)(Nk, {
- status: /* @__PURE__ */ (0, V.jsx)(Lk, {
+ /* @__PURE__ */ (0, V.jsxs)(RE, {
+ status: /* @__PURE__ */ (0, V.jsx)(HE, {
href: n.release_url,
children: "查看发布页"
}),
@@ -50610,28 +50706,28 @@ function wye({ initial: e, initialJob: t }) {
}
//#endregion
//#region src/react/settings/general-settings.tsx
-function Tye({ data: e, receipt: t }) {
+function kye({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- e.startup ? /* @__PURE__ */ (0, V.jsx)(Eye, {
+ e.startup ? /* @__PURE__ */ (0, V.jsx)(Aye, {
startup: e.startup,
receipt: t
}) : null,
- e.automatic_updates ? /* @__PURE__ */ (0, V.jsx)(bye, {
+ e.automatic_updates ? /* @__PURE__ */ (0, V.jsx)(wye, {
initial: e.automatic_updates,
receipt: t
}) : null,
- e.updates ? /* @__PURE__ */ (0, V.jsx)(wye, {
+ e.updates ? /* @__PURE__ */ (0, V.jsx)(Oye, {
initial: e.updates,
initialJob: e.update_job
}) : null
]
});
}
-function Eye({ startup: e, receipt: t }) {
+function Aye({ startup: e, receipt: t }) {
let [n, r] = (0, B.useState)(e.enabled), [i, a] = (0, B.useState)(e.silent), [o, s] = (0, B.useState)(e.desktop), c = AE(), l = e.available && !e.desktop_message;
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "开机自启",
onSubmit: (r) => {
r.preventDefault(), e.available && c.run("save", (e) => K("/api/configuration/startup", {
@@ -50641,30 +50737,30 @@ function Eye({ startup: e, receipt: t }) {
}, "POST", e), () => t("已保存配置"));
},
children: [
- /* @__PURE__ */ (0, V.jsxs)(jk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsxs)(IE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "开机后启动 Peach",
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "开机后启动 Peach",
isSelected: n,
isDisabled: !e.available,
onChange: r
})
}),
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "静默启动",
description: "开机后只显示托盘图标,不打开网页。",
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "静默启动",
isSelected: i,
isDisabled: !e.available || !n,
onChange: a
})
}),
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "在桌面创建快捷方式",
description: e.desktop_message || "双击图标打开 Peach 网页。",
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "在桌面创建快捷方式",
isSelected: o,
isDisabled: !l,
@@ -50672,11 +50768,11 @@ function Eye({ startup: e, receipt: t }) {
})
})
] }),
- e.message || c.error ? /* @__PURE__ */ (0, V.jsxs)(Mk, {
+ e.message || c.error ? /* @__PURE__ */ (0, V.jsxs)(LE, {
divided: !0,
- children: [e.message ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: e.message }) : null, c.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: c.error }) : null]
+ children: [e.message ? /* @__PURE__ */ (0, V.jsx)(zE, { children: e.message }) : null, c.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: c.error }) : null]
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
type: "submit",
disabled: !e.available,
...X(c.busy === "save"),
@@ -50687,7 +50783,7 @@ function Eye({ startup: e, receipt: t }) {
}
//#endregion
//#region src/react/restart-redirect.ts
-var Dye = 8e3, Oye = [
+var jye = 8e3, Mye = [
{
name: "机械硬盘,或内存 8 GB 以内",
cache: "10–20 GiB",
@@ -50706,33 +50802,33 @@ var Dye = 8e3, Oye = [
read: "256 / 128 KB",
task: "2 个起步"
}
-], kye = [
+], Nye = [
["cache", "缓存上限"],
["read", "读取长度(默认 / 最小)"],
["task", "同时处理视频"]
];
-function Aye() {
+function Pye() {
return /* @__PURE__ */ (0, V.jsx)("div", {
className: "@container flex flex-col gap-3",
- children: /* @__PURE__ */ (0, V.jsxs)(Bk, {
+ children: /* @__PURE__ */ (0, V.jsxs)(GE, {
summary: "CloudDrive 设置帮助",
children: [
- /* @__PURE__ */ (0, V.jsxs)(Pk, { children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ (0, V.jsx)(Lk, {
+ /* @__PURE__ */ (0, V.jsxs)(zE, { children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ (0, V.jsx)(HE, {
href: "https://www.clouddrive2.com/help.html",
children: "挂载帮助"
})] }),
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: "缓存按所在硬盘和可用内存选起步值,再根据播放表现调整。" }),
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: "缓存按所在硬盘和可用内存选起步值,再根据播放表现调整。" }),
/* @__PURE__ */ (0, V.jsx)("ul", {
"aria-label": "按缓存所在硬盘分档",
className: "flex flex-col gap-2",
- children: Oye.map((e) => /* @__PURE__ */ (0, V.jsxs)("li", {
+ children: Mye.map((e) => /* @__PURE__ */ (0, V.jsxs)("li", {
className: "flex flex-col gap-2 rounded-2lg border border-separator-border bg-background-primary-default p-3",
children: [/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-medium text-text-primary",
children: e.name
}), /* @__PURE__ */ (0, V.jsx)("dl", {
className: "inline-grid grid-cols-1 gap-2 @md:grid-cols-3",
- children: kye.map(([t, n]) => /* @__PURE__ */ (0, V.jsxs)("div", {
+ children: Nye.map(([t, n]) => /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col",
children: [/* @__PURE__ */ (0, V.jsx)("dt", {
className: "text-caption-1-regular text-text-secondary",
@@ -50753,9 +50849,9 @@ function Aye() {
/* @__PURE__ */ (0, V.jsx)("li", { children: "Buffer Cache 占内存,磁盘缓存和文件夹缓存占硬盘,改一个管不住另外两个。" })
]
}),
- /* @__PURE__ */ (0, V.jsxs)(Pk, { children: [
+ /* @__PURE__ */ (0, V.jsxs)(zE, { children: [
"三处缓存的分工、往上调的方法和这些起步值的来源在",
- /* @__PURE__ */ (0, V.jsx)(Lk, {
+ /* @__PURE__ */ (0, V.jsx)(HE, {
href: "https://github.com/longmeidao/peach/blob/master/docs/CLOUDDRIVE.md",
children: "CloudDrive 配置与调优"
}),
@@ -50767,7 +50863,7 @@ function Aye() {
}
//#endregion
//#region src/react/settings/folder-rows.tsx
-function jye({ className: e }) {
+function Fye({ className: e }) {
return /* @__PURE__ */ (0, V.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -50780,12 +50876,12 @@ function jye({ className: e }) {
children: /* @__PURE__ */ (0, V.jsx)("use", { href: "#i-folder-search" })
});
}
-var ER = [
+var TR = [
["local", "本地磁盘"],
["115", "CloudDrive · 115"],
["pikpak", "CloudDrive · PikPak"]
-], DR = (e) => Se[e] || "database", Mye = (e) => e === "115" || e === "pikpak";
-function Nye({ initial: e, blank: t, pickFolder: n, describe: r, focusAfterPick: i = !1 }) {
+], ER = (e) => Se[e] || "database", Iye = (e) => e === "115" || e === "pikpak";
+function Lye({ initial: e, blank: t, pickFolder: n, describe: r, focusAfterPick: i = !1 }) {
let [a, o] = (0, B.useState)(e), [s, c] = (0, B.useState)([]), [l, u] = (0, B.useState)(null), [d, f] = (0, B.useState)(null), p = (0, B.useRef)(!1), m = (0, B.useRef)([]);
(0, B.useLayoutEffect)(() => {
l !== null && (m.current[l]?.focus(), u(null));
@@ -50828,14 +50924,14 @@ function Nye({ initial: e, blank: t, pickFolder: n, describe: r, focusAfterPick:
}
};
}
-function Pye({ label: e, path: t, onPath: n, error: r, inputRef: i, picking: a, onPick: o, onRemove: s, status: c, children: l }) {
+function Rye({ label: e, path: t, onPath: n, error: r, inputRef: i, picking: a, onPick: o, onRemove: s, status: c, children: l }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-folder-row": !0,
className: "@container flex flex-col gap-2 rounded-2lg border border-separator-border bg-background-primary-default p-3",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex items-start gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
className: "min-w-0 flex-1",
"aria-label": e,
placeholder: "本机文件夹路径",
@@ -50850,13 +50946,13 @@ function Pye({ label: e, path: t, onPath: n, error: r, inputRef: i, picking: a,
className: "flex h-10 shrink-0 items-center",
children: c
}) : null,
- /* @__PURE__ */ (0, V.jsx)(AM, {
- icon: jye,
+ /* @__PURE__ */ (0, V.jsx)(bM, {
+ icon: Fye,
"aria-label": "选择文件夹",
onClick: o,
...X(a)
}),
- s ? /* @__PURE__ */ (0, V.jsx)(AM, {
+ s ? /* @__PURE__ */ (0, V.jsx)(bM, {
icon: pT,
"aria-label": "移除这个文件夹",
onClick: s
@@ -50868,23 +50964,23 @@ function Pye({ label: e, path: t, onPath: n, error: r, inputRef: i, picking: a,
})]
});
}
-function Fye({ index: e, value: t, onChange: n, options: r = ER }) {
- return /* @__PURE__ */ (0, V.jsx)(Ck, {
+function zye({ index: e, value: t, onChange: n, options: r = TR }) {
+ return /* @__PURE__ */ (0, V.jsx)(EM, {
className: "w-full @lg:w-60",
"aria-label": `媒体来源 ${e + 1}`,
selectedKey: t,
onSelectionChange: (e) => {
e !== null && n(String(e));
},
- children: r.map(([e, t]) => /* @__PURE__ */ (0, V.jsxs)(wk, {
+ children: r.map(([e, t]) => /* @__PURE__ */ (0, V.jsxs)(DM, {
id: e,
textValue: t,
- children: [/* @__PURE__ */ (0, V.jsx)(Vk, { mark: DR(e) }), t]
+ children: [/* @__PURE__ */ (0, V.jsx)(KE, { mark: ER(e) }), t]
}, e))
});
}
-function Iye({ value: e, onChange: t, label: n = "Windows 中的对应路径", placeholder: r = "例如 B:\\" }) {
- return /* @__PURE__ */ (0, V.jsx)(vk, {
+function Bye({ value: e, onChange: t, label: n = "Windows 中的对应路径", placeholder: r = "例如 B:\\" }) {
+ return /* @__PURE__ */ (0, V.jsx)(GM, {
label: n,
placeholder: r,
value: e,
@@ -50893,7 +50989,7 @@ function Iye({ value: e, onChange: t, label: n = "Windows 中的对应路径", p
}
//#endregion
//#region src/react/settings/library-icon-picker.tsx
-var OR = [
+var DR = [
["", "自动识别"],
["hard-drive", "磁盘"],
["database", "资料库"],
@@ -50937,13 +51033,13 @@ var OR = [
["star", "收藏"],
["tags", "主题"]
];
-function Lye(e) {
+function Vye(e) {
let t = e === "local" ? "" : Se[e];
return t ? [t, "自动识别"] : ["hard-drive", "默认"];
}
-var kR = "auto";
-function Rye({ value: e, label: t, kind: n = "local", onChange: r }) {
- let i = (0, B.useRef)(null), [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(e), [l, u] = Lye(n);
+var OR = "auto";
+function Hye({ value: e, label: t, kind: n = "local", onChange: r }) {
+ let i = (0, B.useRef)(null), [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(e), [l, u] = Vye(n);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(J, {
ref: i,
variant: "secondary",
@@ -50957,35 +51053,35 @@ function Rye({ value: e, label: t, kind: n = "local", onChange: r }) {
children: /* @__PURE__ */ (0, V.jsxs)("span", {
"data-icon-choice": !0,
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, V.jsx)(Vk, { mark: e || l }), ((e) => e && OR.find(([t]) => t === e)?.[1] || u)(e)]
+ children: [/* @__PURE__ */ (0, V.jsx)(KE, { mark: e || l }), ((e) => e && DR.find(([t]) => t === e)?.[1] || u)(e)]
})
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
triggerRef: i,
isOpen: a,
onOpenChange: o,
placement: "bottom start",
offset: 4,
- className: yk,
- children: /* @__PURE__ */ (0, V.jsxs)(DO, {
+ className: uM,
+ children: /* @__PURE__ */ (0, V.jsxs)(fk, {
"aria-label": `${t}候选`,
className: "flex w-72 flex-col gap-3 outline-none",
children: [
- /* @__PURE__ */ (0, V.jsx)(ZE, {
+ /* @__PURE__ */ (0, V.jsx)(ID, {
slot: "title",
className: "px-1 text-body-medium text-text-primary",
children: "选择媒体库图标"
}),
- /* @__PURE__ */ (0, V.jsx)(PO, {
+ /* @__PURE__ */ (0, V.jsx)(yk, {
"aria-label": "候选图标",
- value: s || kR,
- onChange: (e) => c(e === kR ? "" : e),
+ value: s || OR,
+ onChange: (e) => c(e === OR ? "" : e),
className: "inline-grid grid-cols-7 gap-1",
- children: OR.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(FO, {
- value: e || kR,
+ children: DR.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(bk, {
+ value: e || OR,
"aria-label": e ? t : u,
className: "flex h-10 cursor-pointer items-center justify-center rounded-lg text-foreground-icon-secondary outline-none hover:bg-dropdown-item-hover-background focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:bg-dropdown-item-hover-background data-selected:text-text-primary",
- children: /* @__PURE__ */ (0, V.jsx)(Vk, { mark: e || l })
- }, e || kR))
+ children: /* @__PURE__ */ (0, V.jsx)(KE, { mark: e || l })
+ }, e || OR))
}),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex justify-end gap-2 border-t border-separator-border pt-2.5",
@@ -51007,9 +51103,9 @@ function Rye({ value: e, label: t, kind: n = "local", onChange: r }) {
}
//#endregion
//#region src/react/settings/push-discovery-settings.tsx
-var zye = "/api/configuration/push-discovery", Bye = "/api/configuration/push-discovery/secret";
-function Vye({ initial: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.prefixes), [o, s] = (0, B.useState)(""), c = AE(), l = OM(), u = n.media_roots, [d, f] = (0, B.useState)(e), p = (e, n) => {
+var Uye = "/api/configuration/push-discovery", Wye = "/api/configuration/push-discovery/secret";
+function Gye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.prefixes), [o, s] = (0, B.useState)(""), c = AE(), l = vM(), u = n.media_roots, [d, f] = (0, B.useState)(e), p = (e, n) => {
r(e), f(e), a(e.prefixes), s(""), t(n);
}, m = (e, t) => a((n) => n.map((n, r) => r === e ? {
...n,
@@ -51022,21 +51118,21 @@ function Vye({ initial: e, receipt: t }) {
cloud: n.cloud,
prefixes: i
};
- c.run("save", (e) => K(zye, t, "POST", e), (e) => p(e, "已保存配置"), (e) => s(W(e)));
+ c.run("save", (e) => K(Uye, t, "POST", e), (e) => p(e, "已保存配置"), (e) => s(W(e)));
}, g = () => {
- c.run("secret", (e) => K(Bye, {}, "POST", e), (e) => p(e, "已更换共享密钥"), (e) => s(W(e)));
+ c.run("secret", (e) => K(Wye, {}, "POST", e), (e) => p(e, "已更换共享密钥"), (e) => s(W(e)));
}, _ = () => {
navigator.clipboard.writeText(d.config_toml).then(() => t("已复制 CloudDrive2 配置"), () => s("浏览器没让这一页写剪贴板,展开「查看配置」选中自己复制。"));
}, v = `已入库 ${d.queue.ingested} 个文件` + (d.queue.pending ? `,队列里还有 ${d.queue.pending} 条` : ""), y = d.local_running ? `正在监视 ${d.local_roots.join("、")}` : d.local_message || "没有运行";
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "推送发现",
onSubmit: h,
children: [
- /* @__PURE__ */ (0, V.jsxs)(jk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsxs)(IE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "新文件落地就入库",
description: d.enabled ? v : void 0,
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "新文件落地就入库",
isSelected: n.enabled,
isDisabled: !n.available,
@@ -51046,10 +51142,10 @@ function Vye({ initial: e, receipt: t }) {
})
})
}),
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "监视本机文件夹",
description: d.enabled && d.watch_local ? y : void 0,
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "监视本机文件夹",
isSelected: n.watch_local,
isDisabled: !n.available || !n.enabled,
@@ -51059,9 +51155,9 @@ function Vye({ initial: e, receipt: t }) {
})
})
}),
- /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(ME, {
label: "接收 CloudDrive2 通知",
- children: /* @__PURE__ */ (0, V.jsx)(nL, {
+ children: /* @__PURE__ */ (0, V.jsx)($I, {
"aria-label": "接收 CloudDrive2 通知",
isSelected: n.cloud,
isDisabled: !n.available || !n.enabled,
@@ -51071,7 +51167,7 @@ function Vye({ initial: e, receipt: t }) {
})
})
}),
- d.enabled && d.cloud ? /* @__PURE__ */ (0, V.jsx)(Dk, {
+ d.enabled && d.cloud ? /* @__PURE__ */ (0, V.jsx)(ME, {
label: "Webhook 配置",
description: d.config_toml ? "贴进 CloudDrive2「设置 → Webhooks」,需要会员;更换密钥后要重贴。" : d.origin ? "还没有共享密钥,保存配置后生成。" : "要先有 CloudDrive2 能访问的 HTTPS 地址才能生成。",
children: d.config_toml ? /* @__PURE__ */ (0, V.jsx)(J, {
@@ -51081,11 +51177,11 @@ function Vye({ initial: e, receipt: t }) {
}) : null
}) : null
] }),
- d.enabled && d.cloud && d.config_toml ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ d.enabled && d.cloud && d.config_toml ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
children: /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex flex-col gap-3",
- children: /* @__PURE__ */ (0, V.jsxs)(Bk, {
+ children: /* @__PURE__ */ (0, V.jsxs)(GE, {
summary: "查看配置",
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "relative",
@@ -51095,16 +51191,16 @@ function Vye({ initial: e, receipt: t }) {
className: "overflow-x-auto rounded-2xl bg-background-tertiary-default p-3 text-caption-1-regular whitespace-pre text-text-primary",
children: d.config_toml
})
- }), /* @__PURE__ */ (0, V.jsx)(Pk, { children: "Windows 桌面版粘贴后显示「无效」时,把这段存成 .toml 文件,放进 %LOCALAPPDATA%\\CloudDrive.WinUI\\webhooks\\ 目录。" })]
+ }), /* @__PURE__ */ (0, V.jsx)(zE, { children: "Windows 桌面版粘贴后显示「无效」时,把这段存成 .toml 文件,放进 %LOCALAPPDATA%\\CloudDrive.WinUI\\webhooks\\ 目录。" })]
})
})
}) : null,
- n.enabled && n.cloud ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ n.enabled && n.cloud ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
children: /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ik, { children: "云端路径前缀" }),
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "云端路径前缀" }),
/* @__PURE__ */ (0, V.jsx)("div", {
role: "group",
"aria-label": "云端路径前缀",
@@ -51112,7 +51208,7 @@ function Vye({ initial: e, receipt: t }) {
children: i.map((e, t) => /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex items-start gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
className: "min-w-0 flex-1",
"aria-label": `云端路径前缀 ${t + 1}`,
placeholder: "/115",
@@ -51121,18 +51217,18 @@ function Vye({ initial: e, receipt: t }) {
value: e.prefix,
onChange: (e) => m(t, { prefix: e })
}),
- /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": `前缀 ${t + 1} 对应的媒体根`,
selectedKey: e.root,
onSelectionChange: (e) => {
e !== null && m(t, { root: String(e) });
},
- children: u.map((e) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: u.map((e) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: e
}, e))
}),
- /* @__PURE__ */ (0, V.jsx)(AM, {
+ /* @__PURE__ */ (0, V.jsx)(bM, {
icon: pT,
"aria-label": "移除这一条",
onClick: () => a((e) => e.filter((e, n) => n !== t))
@@ -51151,11 +51247,11 @@ function Vye({ initial: e, receipt: t }) {
]
})
}) : null,
- o || c.error ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ o || c.error ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Fk, { children: o || c.error })
+ children: /* @__PURE__ */ (0, V.jsx)(BE, { children: o || c.error })
}) : null,
- /* @__PURE__ */ (0, V.jsxs)(Nk, { children: [d.enabled && d.cloud && d.config_toml ? /* @__PURE__ */ (0, V.jsx)(J, {
+ /* @__PURE__ */ (0, V.jsxs)(RE, { children: [d.enabled && d.cloud && d.config_toml ? /* @__PURE__ */ (0, V.jsx)(J, {
onClick: g,
disabled: !n.available,
...X(c.busy === "secret"),
@@ -51171,29 +51267,29 @@ function Vye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/media-settings.tsx
-var Hye = (e) => ER.find(([t]) => t === e)?.[1] ?? e, Uye = async (e) => (await K(aye, { initial: e })).path, AR = (e = "") => ({
+var Kye = (e) => TR.find(([t]) => t === e)?.[1] ?? e, qye = async (e) => (await K(lye, { initial: e })).path, kR = (e = "") => ({
path: e,
location: "local",
root: "",
library: "",
library_icon: ""
});
-function Wye(e) {
- let t = e.media_sources?.filter((e) => ER.some(([t]) => t === e.location));
+function Jye(e) {
+ let t = e.media_sources?.filter((e) => TR.some(([t]) => t === e.location));
return t?.length ? t.map((e) => ({
path: e.path,
location: e.location,
root: e.root,
library: e.library || "",
library_icon: e.library_icon || ""
- })) : (e.media_dirs.length ? e.media_dirs : [""]).map((e) => AR(e));
+ })) : (e.media_dirs.length ? e.media_dirs : [""]).map((e) => kR(e));
}
-var Gye = (e) => !(e instanceof jS) || e.status !== 400 ? null : e.body?.errors ?? null;
-function Kye({ data: e, receipt: t }) {
+var Yye = (e) => !(e instanceof jS) || e.status !== 400 ? null : e.body?.errors ?? null;
+function Xye({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- e.editable ? /* @__PURE__ */ (0, V.jsx)(qye, {
+ e.editable ? /* @__PURE__ */ (0, V.jsx)(Zye, {
data: e,
receipt: t
}) : /* @__PURE__ */ (0, V.jsx)(Y, {
@@ -51201,28 +51297,28 @@ function Kye({ data: e, receipt: t }) {
title: "只读",
children: e.notice
}),
- e.editable ? null : /* @__PURE__ */ (0, V.jsx)(Jye, { data: e }),
- e.push_discovery ? /* @__PURE__ */ (0, V.jsx)(Vye, {
+ e.editable ? null : /* @__PURE__ */ (0, V.jsx)(Qye, { data: e }),
+ e.push_discovery ? /* @__PURE__ */ (0, V.jsx)(Gye, {
initial: e.push_discovery,
receipt: t
}) : null
]
});
}
-function qye({ data: e, receipt: t }) {
- let { rows: n, edit: r, add: i, remove: a, errors: o, setErrors: s, picking: c, pick: l, inputRef: u } = Nye({
- initial: () => Wye(e),
- blank: () => AR(),
- pickFolder: Uye,
+function Zye({ data: e, receipt: t }) {
+ let { rows: n, edit: r, add: i, remove: a, errors: o, setErrors: s, picking: c, pick: l, inputRef: u } = Lye({
+ initial: () => Jye(e),
+ blank: () => kR(),
+ pickFolder: qye,
describe: W
}), [d, f] = (0, B.useState)(String(e.port)), [p, m] = (0, B.useState)(!1), [h, g] = (0, B.useState)(""), [_, v] = (0, B.useState)(""), [y, b] = (0, B.useState)(null), x = (0, B.useRef)(e.revision), S = AE();
(0, B.useEffect)(() => {
if (!y) return;
- let e = setTimeout(() => location.assign(y.url), Dye);
+ let e = setTimeout(() => location.assign(y.url), jye);
return () => clearTimeout(e);
}, [y]);
let C = (r) => {
- r.preventDefault(), v(""), S.run("save", (t) => K(hR, {
+ r.preventDefault(), v(""), S.run("save", (t) => K(mR, {
revision: x.current,
media_dirs: n.map((e) => e.path),
...e.media_sources ? { media_sources: n } : {},
@@ -51231,18 +51327,18 @@ function qye({ data: e, receipt: t }) {
}, "POST", t), (e) => {
x.current = e.revision, s([]), g(""), t("已保存配置"), b(e);
}, (e) => {
- let t = Gye(e);
+ let t = Yye(e);
s(t?.media_dirs ?? []), g(t?.port ?? ""), t || v(W(e));
});
};
- if (y) return /* @__PURE__ */ (0, V.jsx)(Ak, {
+ if (y) return /* @__PURE__ */ (0, V.jsx)(FE, {
title: "这台电脑",
- children: /* @__PURE__ */ (0, V.jsx)(Mk, { children: /* @__PURE__ */ (0, V.jsxs)(Y, {
+ children: /* @__PURE__ */ (0, V.jsx)(LE, { children: /* @__PURE__ */ (0, V.jsxs)(Y, {
tone: "success",
title: "配置已保存",
children: [
"Peach 正在重新启动。稍后自动跳转,或点击",
- /* @__PURE__ */ (0, V.jsx)(kk, {
+ /* @__PURE__ */ (0, V.jsx)(PE, {
href: y.url,
size: "small",
children: "进入馆藏"
@@ -51251,20 +51347,20 @@ function qye({ data: e, receipt: t }) {
]
}) })
});
- let w = (t) => t ? e.media_sources?.find((e) => e.path === t) : void 0, T = n.some((e) => Mye(e.location)), E = T ? (e.mount_dependencies ?? []).filter((e) => !e.available) : [];
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ let w = (t) => t ? e.media_sources?.find((e) => e.path === t) : void 0, T = n.some((e) => Iye(e.location)), E = T ? (e.mount_dependencies ?? []).filter((e) => !e.available) : [];
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "这台电脑",
onSubmit: C,
- children: [/* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
+ children: [/* @__PURE__ */ (0, V.jsxs)(LE, { children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ik, { children: "媒体文件夹" }),
+ /* @__PURE__ */ (0, V.jsx)(VE, { children: "媒体文件夹" }),
/* @__PURE__ */ (0, V.jsx)("div", {
role: "group",
"aria-label": "媒体文件夹",
className: "flex flex-col gap-3",
- children: n.map((t, i) => /* @__PURE__ */ (0, V.jsxs)(Pye, {
+ children: n.map((t, i) => /* @__PURE__ */ (0, V.jsxs)(Rye, {
label: `媒体文件夹 ${i + 1}`,
path: t.path,
onPath: (e) => r(i, { path: e }),
@@ -51273,14 +51369,14 @@ function qye({ data: e, receipt: t }) {
picking: c === i,
onPick: () => void l(i),
onRemove: n.length > 1 ? () => a(i) : void 0,
- status: w(t.path) ? /* @__PURE__ */ (0, V.jsx)(jR, { online: w(t.path)?.online }) : null,
+ status: w(t.path) ? /* @__PURE__ */ (0, V.jsx)(AR, { online: w(t.path)?.online }) : null,
children: [
- /* @__PURE__ */ (0, V.jsx)(Fye, {
+ /* @__PURE__ */ (0, V.jsx)(zye, {
index: i,
value: t.location,
onChange: (e) => r(i, { location: e })
}),
- /* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(GM, {
className: "min-w-40 flex-1",
"aria-label": `媒体库名称 ${i + 1}`,
maxLength: 80,
@@ -51288,13 +51384,13 @@ function qye({ data: e, receipt: t }) {
value: t.library,
onChange: (e) => r(i, { library: e })
}),
- /* @__PURE__ */ (0, V.jsx)(Rye, {
+ /* @__PURE__ */ (0, V.jsx)(Hye, {
label: `媒体库图标 ${i + 1}`,
value: t.library_icon,
kind: t.location,
onChange: (e) => r(i, { library_icon: e })
}),
- e.windows === !1 ? /* @__PURE__ */ (0, V.jsx)(Iye, {
+ e.windows === !1 ? /* @__PURE__ */ (0, V.jsx)(Bye, {
value: t.root,
onChange: (e) => r(i, { root: e })
}) : null
@@ -51308,18 +51404,18 @@ function qye({ data: e, receipt: t }) {
})
]
}),
- T ? /* @__PURE__ */ (0, V.jsx)(Aye, {}) : null,
- E.map((e) => /* @__PURE__ */ (0, V.jsxs)(Pk, { children: [
+ T ? /* @__PURE__ */ (0, V.jsx)(Pye, {}) : null,
+ E.map((e) => /* @__PURE__ */ (0, V.jsxs)(zE, { children: [
"未检测到 ",
e.name,
"。",
- /* @__PURE__ */ (0, V.jsxs)(Lk, {
+ /* @__PURE__ */ (0, V.jsxs)(HE, {
href: e.download_url,
children: ["下载 ", e.name]
})
] }, e.name)),
- e.windows === !1 ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。" }) : null,
- e.port_editable === !1 ? null : /* @__PURE__ */ (0, V.jsx)(vk, {
+ e.windows === !1 ? /* @__PURE__ */ (0, V.jsx)(zE, { children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。" }) : null,
+ e.port_editable === !1 ? null : /* @__PURE__ */ (0, V.jsx)(GM, {
id: "configPort",
label: "本机访问端口",
inputMode: "numeric",
@@ -51329,7 +51425,7 @@ function qye({ data: e, receipt: t }) {
isInvalid: !!h,
hint: h || "浏览器地址里冒号后面的数字,一般不用改。"
}),
- /* @__PURE__ */ (0, V.jsx)(BM, {
+ /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: p,
onChange: m,
children: "保存后扫描并补全资料"
@@ -51339,7 +51435,7 @@ function qye({ data: e, receipt: t }) {
title: "没有保存",
children: _
}) : null
- ] }), /* @__PURE__ */ (0, V.jsx)(Nk, {
+ ] }), /* @__PURE__ */ (0, V.jsx)(RE, {
status: e.port_editable === !1 ? void 0 : "保存后 Peach 会重新启动,端口改了就用新地址打开。",
children: /* @__PURE__ */ (0, V.jsx)(J, {
type: "submit",
@@ -51349,7 +51445,7 @@ function qye({ data: e, receipt: t }) {
})]
});
}
-function jR({ online: e }) {
+function AR({ online: e }) {
return e === !0 ? /* @__PURE__ */ (0, V.jsxs)("span", {
"data-mount": "online",
className: "inline-flex items-center gap-1.5 text-body-2-medium text-notification-success-foreground",
@@ -51373,21 +51469,21 @@ function jR({ online: e }) {
}), "未检测"]
});
}
-function Jye({ data: e }) {
+function Qye({ data: e }) {
let t = e.media_sources, n = AE();
- return t ? /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return t ? /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "挂载状态",
children: [
- /* @__PURE__ */ (0, V.jsx)(Rk, { children: t.map((e, t) => /* @__PURE__ */ (0, V.jsxs)(zk, {
- term: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(Vk, { mark: DR(e.location) }), Hye(e.location)] }),
- children: [e.path || "未配置挂载点", /* @__PURE__ */ (0, V.jsx)(jR, { online: e.online })]
+ /* @__PURE__ */ (0, V.jsx)(UE, { children: t.map((e, t) => /* @__PURE__ */ (0, V.jsxs)(WE, {
+ term: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(KE, { mark: ER(e.location) }), Kye(e.location)] }),
+ children: [e.path || "未配置挂载点", /* @__PURE__ */ (0, V.jsx)(AR, { online: e.online })]
}, t)) }),
- n.error ? /* @__PURE__ */ (0, V.jsx)(Mk, {
+ n.error ? /* @__PURE__ */ (0, V.jsx)(LE, {
divided: !0,
- children: /* @__PURE__ */ (0, V.jsx)(Fk, { children: n.error })
+ children: /* @__PURE__ */ (0, V.jsx)(BE, { children: n.error })
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
- onClick: () => void n.run("refresh", (e) => _R(e), (e) => z.setQueryData(gR, e)),
+ /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ onClick: () => void n.run("refresh", (e) => gR(e), (e) => z.setQueryData(hR, e)),
...X(n.busy === "refresh"),
children: "刷新挂载状态"
}) })
@@ -51396,8 +51492,8 @@ function Jye({ data: e }) {
}
//#endregion
//#region src/react/settings/password-pair.tsx
-function Yye({ label: e, password: t, confirmation: n, onPassword: r, onConfirmation: i, disabled: a = !1, passwordError: o, passwordHint: s, confirmationError: c, confirmationInvalid: l = !1 }) {
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(vk, {
+function $ye({ label: e, password: t, confirmation: n, onPassword: r, onConfirmation: i, disabled: a = !1, passwordError: o, passwordHint: s, confirmationError: c, confirmationInvalid: l = !1 }) {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(GM, {
id: "access-password",
type: "password",
label: e,
@@ -51410,7 +51506,7 @@ function Yye({ label: e, password: t, confirmation: n, onPassword: r, onConfirma
validationBehavior: "aria",
isInvalid: !a && !!o,
hint: a ? s : o || s
- }), /* @__PURE__ */ (0, V.jsx)(vk, {
+ }), /* @__PURE__ */ (0, V.jsx)(GM, {
id: "access-confirm",
type: "password",
label: "确认访问密码",
@@ -51427,12 +51523,12 @@ function Yye({ label: e, password: t, confirmation: n, onPassword: r, onConfirma
}
//#endregion
//#region src/react/settings/access-settings.tsx
-var Xye = {
+var ebe = {
legacy: "当前使用系统生成的访问口令。改设自己的密码,或关闭登录要求。",
locked: "访问设置无法读取,请在本机检查配置文件。",
password: "已设置密码。新设备需要登录,登录时勾选「保持登录」可保持 30 天。"
};
-function Zye({ initial: e, receipt: t }) {
+function tbe({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(!1), [f, p] = (0, B.useState)({}), m = (0, B.useRef)(null), h = AE(), g = (e) => {
e.preventDefault();
let f = {};
@@ -51453,25 +51549,25 @@ function Zye({ initial: e, receipt: t }) {
let t = e instanceof jS ? e.body : null, n = t?.errors || t?.detail?.errors;
n ? p(n) : h.setError(W(e));
});
- }, _ = Xye[n.mode], v = n.mode !== "locked";
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ }, _ = ebe[n.mode], v = n.mode !== "locked";
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "访问密码",
onSubmit: g,
children: [/* @__PURE__ */ (0, V.jsx)("div", {
ref: m,
- children: /* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- _ ? /* @__PURE__ */ (0, V.jsx)(Pk, { children: _ }) : null,
+ children: /* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ _ ? /* @__PURE__ */ (0, V.jsx)(zE, { children: _ }) : null,
n.mode === "open" ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "warning",
title: "未设置访问密码",
children: "能连接到 Peach 的设备打开地址就能看馆藏,不需要登录。"
}) : null,
- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, V.jsx)(BM, {
+ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, V.jsx)(NM, {
isSelected: u,
onChange: d,
children: "关闭访问密码"
}) : null,
- n.mode === "password" ? /* @__PURE__ */ (0, V.jsx)(vk, {
+ n.mode === "password" ? /* @__PURE__ */ (0, V.jsx)(GM, {
id: "access-current",
type: "password",
label: "当前访问密码",
@@ -51484,7 +51580,7 @@ function Zye({ initial: e, receipt: t }) {
isInvalid: !!f.current_password,
hint: f.current_password
}) : null,
- v ? /* @__PURE__ */ (0, V.jsx)(Yye, {
+ v ? /* @__PURE__ */ (0, V.jsx)($ye, {
label: n.mode === "password" ? "新访问密码" : "设置访问密码",
password: o,
confirmation: c,
@@ -51500,9 +51596,9 @@ function Zye({ initial: e, receipt: t }) {
title: "访问范围",
children: "保存后,能连接到 Peach 的设备将直接访问馆藏。"
}) : null,
- h.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: h.error }) : null
+ h.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: h.error }) : null
] })
- }), v ? /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ }), v ? /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
type: "submit",
...X(h.busy === "save"),
children: "保存配置"
@@ -51511,15 +51607,15 @@ function Zye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/configuration-copy.ts
-var Qye = "JavDB 或 MISSAV 打不开时,填一个能打开的镜像域名。", $ye = "只填域名,留空用默认地址";
+var nbe = "JavDB 或 MISSAV 打不开时,填一个能打开的镜像域名。", rbe = "只填域名,留空用默认地址";
//#endregion
//#region src/react/settings/entry-links-settings.tsx
-function ebe({ initial: e, receipt: t }) {
+function ibe({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e.sites), i = AE(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
...n,
host: t
} : n));
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "外部入口",
onSubmit: (e) => {
e.preventDefault();
@@ -51528,9 +51624,9 @@ function ebe({ initial: e, receipt: t }) {
r(e.sites), t("已保存配置");
});
},
- children: [/* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: Qye }),
- n.map((e) => /* @__PURE__ */ (0, V.jsx)(vk, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: nbe }),
+ n.map((e) => /* @__PURE__ */ (0, V.jsx)(GM, {
id: `entry-link-${e.key}`,
label: `${e.label} 地址`,
autoComplete: "off",
@@ -51539,10 +51635,10 @@ function ebe({ initial: e, receipt: t }) {
placeholder: e.default_host,
onChange: (t) => a(e.key, t),
validationBehavior: "aria",
- hint: $ye
+ hint: rbe
}, e.key)),
- i.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: i.error }) : null
- ] }), /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ i.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: i.error }) : null
+ ] }), /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
type: "submit",
...X(i.busy === "save"),
children: "保存配置"
@@ -51551,19 +51647,19 @@ function ebe({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/tunnel-settings.tsx
-var tbe = 2e3, nbe = [["quick", "临时链接"], ["named", "命名隧道"]], rbe = {
+var abe = 2e3, obe = [["quick", "临时链接"], ["named", "命名隧道"]], sbe = {
quick: "临时预览用,地址随机,重启后会变。启动前要先设置访问密码。",
named: "使用你在 Cloudflare 绑定的固定域名。启动前要先设置访问密码。"
};
-function ibe({ revision: e, initial: t, receipt: n }) {
+function cbe({ revision: e, initial: t, receipt: n }) {
let [r, i] = (0, B.useState)(t), [a, o] = (0, B.useState)(e), [s, c] = (0, B.useState)(t.mode), [l, u] = (0, B.useState)(t.hostname), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)({}), h = AE(), g = r.state === "starting" || r.state === "running", _ = r.named_available && s === "named";
(0, B.useEffect)(() => {
if (r.state !== "starting") return;
let e = new AbortController(), t = window.setInterval(() => {
- _R(e.signal).then((t) => {
- e.signal.aborted || !t.tunnel || (z.setQueryData(gR, t), i(t.tunnel), o(t.revision));
+ gR(e.signal).then((t) => {
+ e.signal.aborted || !t.tunnel || (z.setQueryData(hR, t), i(t.tunnel), o(t.revision));
}).catch(() => void 0);
- }, tbe);
+ }, abe);
return () => {
e.abort(), window.clearInterval(t);
};
@@ -51582,26 +51678,26 @@ function ibe({ revision: e, initial: t, receipt: n }) {
n ? m(n) : h.setError(W(e));
});
};
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
title: "Cloudflare 公网入口",
onSubmit: (e) => {
e.preventDefault(), v("save", g, () => n("已保存配置"));
},
- children: [/* @__PURE__ */ (0, V.jsxs)(Mk, { children: [
- r.named_available ? /* @__PURE__ */ (0, V.jsx)(fA, {
+ children: [/* @__PURE__ */ (0, V.jsxs)(LE, { children: [
+ r.named_available ? /* @__PURE__ */ (0, V.jsx)(eA, {
"aria-label": "公网入口的形态(二选一)",
value: s,
isDisabled: g,
onChange: (e) => c(e),
- className: pA,
- children: nbe.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(FO, {
+ className: tA,
+ children: obe.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(bk, {
value: e,
- className: mA,
+ className: nA,
children: t
}, e))
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Pk, { children: rbe[_ ? "named" : "quick"] }),
- _ ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(vk, {
+ /* @__PURE__ */ (0, V.jsx)(zE, { children: sbe[_ ? "named" : "quick"] }),
+ _ ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(GM, {
id: "tunnel-hostname",
label: "公开主机名",
autoComplete: "off",
@@ -51612,7 +51708,7 @@ function ibe({ revision: e, initial: t, receipt: n }) {
validationBehavior: "aria",
isInvalid: !!p.hostname,
hint: p.hostname || "Cloudflare Zero Trust 里指向这台电脑的主机名。"
- }), /* @__PURE__ */ (0, V.jsx)(vk, {
+ }), /* @__PURE__ */ (0, V.jsx)(GM, {
id: "tunnel-token",
type: "password",
label: "隧道令牌",
@@ -51632,7 +51728,7 @@ function ibe({ revision: e, initial: t, receipt: n }) {
r.state === "running" && r.url ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "info",
title: "公网地址",
- children: /* @__PURE__ */ (0, V.jsx)(Lk, {
+ children: /* @__PURE__ */ (0, V.jsx)(HE, {
href: r.url,
children: r.url
})
@@ -51642,9 +51738,9 @@ function ibe({ revision: e, initial: t, receipt: n }) {
title: "正在连接",
children: "正在等待 cloudflared 连上 Cloudflare 边缘。"
}) : null,
- r.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: r.error }) : null,
- h.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: h.error }) : null
- ] }), /* @__PURE__ */ (0, V.jsxs)(Nk, {
+ r.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: r.error }) : null,
+ h.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: h.error }) : null
+ ] }), /* @__PURE__ */ (0, V.jsxs)(RE, {
status: r.enabled ? "Peach 重启后自动恢复。" : void 0,
children: [/* @__PURE__ */ (0, V.jsx)(J, {
onClick: () => v("toggle", !g, (e) => n(e.enabled ? "公网入口已启动" : "公网入口已停止")),
@@ -51660,28 +51756,28 @@ function ibe({ revision: e, initial: t, receipt: n }) {
}
//#endregion
//#region src/react/settings/network-settings.tsx
-var abe = [
+var lbe = [
["environment", "系统代理"],
["direct", "直连"],
["proxy", "自定义"]
];
-function obe({ data: e, receipt: t }) {
+function ube({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- e.peach_proxy ? /* @__PURE__ */ (0, V.jsx)(sbe, {
+ e.peach_proxy ? /* @__PURE__ */ (0, V.jsx)(dbe, {
initial: e.peach_proxy,
receipt: t
}) : null,
- e.entry_links ? /* @__PURE__ */ (0, V.jsx)(ebe, {
+ e.entry_links ? /* @__PURE__ */ (0, V.jsx)(ibe, {
initial: e.entry_links,
receipt: t
}) : null,
- e.access ? /* @__PURE__ */ (0, V.jsx)(Zye, {
+ e.access ? /* @__PURE__ */ (0, V.jsx)(tbe, {
initial: e.access,
receipt: t
}) : null,
- e.tunnel ? /* @__PURE__ */ (0, V.jsx)(ibe, {
+ e.tunnel ? /* @__PURE__ */ (0, V.jsx)(cbe, {
revision: e.revision,
initial: e.tunnel,
receipt: t
@@ -51689,9 +51785,9 @@ function obe({ data: e, receipt: t }) {
]
});
}
-function sbe({ initial: e, receipt: t }) {
+function dbe({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.mode), [o, s] = (0, B.useState)(""), c = AE();
- return /* @__PURE__ */ (0, V.jsxs)(Ak, {
+ return /* @__PURE__ */ (0, V.jsxs)(FE, {
id: "peachProxy",
title: "Peach 代理",
onSubmit: (e) => {
@@ -51703,25 +51799,25 @@ function sbe({ initial: e, receipt: t }) {
});
},
children: [
- /* @__PURE__ */ (0, V.jsx)(jk, { children: /* @__PURE__ */ (0, V.jsx)(Dk, {
+ /* @__PURE__ */ (0, V.jsx)(IE, { children: /* @__PURE__ */ (0, V.jsx)(ME, {
label: "连接方式",
description: "采集来源选「Peach 代理」时共用这里的连接方式。",
- children: /* @__PURE__ */ (0, V.jsx)(Ck, {
+ children: /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "连接方式",
selectedKey: i,
onSelectionChange: (e) => {
e !== null && a(String(e));
},
- children: abe.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: lbe.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: t
}, e))
})
}) }),
- i === "proxy" || n.needs_selection || c.error ? /* @__PURE__ */ (0, V.jsxs)(Mk, {
+ i === "proxy" || n.needs_selection || c.error ? /* @__PURE__ */ (0, V.jsxs)(LE, {
divided: !0,
children: [
- i === "proxy" ? /* @__PURE__ */ (0, V.jsx)(vk, {
+ i === "proxy" ? /* @__PURE__ */ (0, V.jsx)(GM, {
id: "peachProxyAddress",
type: "password",
label: "代理地址",
@@ -51735,10 +51831,10 @@ function sbe({ initial: e, receipt: t }) {
title: "需要选择连接方式",
children: "已有来源的代理地址不同,请选择公共连接方式。"
}) : null,
- c.error ? /* @__PURE__ */ (0, V.jsx)(Fk, { children: c.error }) : null
+ c.error ? /* @__PURE__ */ (0, V.jsx)(BE, { children: c.error }) : null
]
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Nk, { children: /* @__PURE__ */ (0, V.jsx)(J, {
+ /* @__PURE__ */ (0, V.jsx)(RE, { children: /* @__PURE__ */ (0, V.jsx)(J, {
type: "submit",
...X(c.busy === "save"),
children: "保存配置"
@@ -51748,10 +51844,10 @@ function sbe({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/configuration-page.tsx
-function cbe({ receipt: e, reopenTutorial: t }) {
+function fbe({ receipt: e, reopenTutorial: t }) {
let n = TS({
- queryKey: gR,
- queryFn: ({ signal: e }) => _R(e)
+ queryKey: hR,
+ queryFn: ({ signal: e }) => gR(e)
}), r = n.data;
if (!r) return /* @__PURE__ */ (0, V.jsx)("div", {
className: "configpage",
@@ -51772,17 +51868,17 @@ function cbe({ receipt: e, reopenTutorial: t }) {
className: "configgroup",
children: "通用"
}) : null,
- a ? /* @__PURE__ */ (0, V.jsx)(Tye, { ...i }) : null,
+ a ? /* @__PURE__ */ (0, V.jsx)(kye, { ...i }) : null,
/* @__PURE__ */ (0, V.jsx)("h2", {
className: "configgroup",
children: "媒体"
}),
- /* @__PURE__ */ (0, V.jsx)(Kye, { ...i }),
+ /* @__PURE__ */ (0, V.jsx)(Xye, { ...i }),
r.downloads ? /* @__PURE__ */ (0, V.jsx)("h2", {
className: "configgroup",
children: "下载"
}) : null,
- r.downloads ? /* @__PURE__ */ (0, V.jsx)(fye, {
+ r.downloads ? /* @__PURE__ */ (0, V.jsx)(gye, {
initial: r.downloads,
receipt: e
}) : null,
@@ -51790,12 +51886,12 @@ function cbe({ receipt: e, reopenTutorial: t }) {
className: "configgroup",
children: "网络与访问"
}) : null,
- o ? /* @__PURE__ */ (0, V.jsx)(obe, { ...i }) : null,
+ o ? /* @__PURE__ */ (0, V.jsx)(ube, { ...i }) : null,
/* @__PURE__ */ (0, V.jsx)("h2", {
className: "configgroup",
children: "维护"
}),
- /* @__PURE__ */ (0, V.jsx)(vye, {
+ /* @__PURE__ */ (0, V.jsx)(Sye, {
...i,
reopenTutorial: t
})
@@ -51804,40 +51900,40 @@ function cbe({ receipt: e, reopenTutorial: t }) {
}
//#endregion
//#region src/number-setting.ts
-function MR(e, t, n, r) {
+function jR(e, t, n, r) {
return Number.isInteger(e) && e >= t && e <= n ? e : r;
}
//#endregion
//#region src/react/settings/configuration-summary.tsx
-var lbe = (e) => {
+var pbe = (e) => {
let t = e.updates;
return t ? t.message ? `${t.current_version} · ${t.message}` : t.current_version : "未取得";
};
-function ube({ openConfiguration: e }) {
+function mbe({ openConfiguration: e }) {
let t = TS({
- queryKey: gR,
- queryFn: ({ signal: e }) => _R(e)
+ queryKey: hR,
+ queryFn: ({ signal: e }) => gR(e)
}), n = t.data;
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col",
- children: [n ? /* @__PURE__ */ (0, V.jsxs)(Rk, { children: [
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ children: [n ? /* @__PURE__ */ (0, V.jsxs)(UE, { children: [
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "媒体库",
children: `${n.library_count} 个`
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "端口",
children: String(n.port)
}),
- /* @__PURE__ */ (0, V.jsx)(zk, {
+ /* @__PURE__ */ (0, V.jsx)(WE, {
term: "更新",
- children: lbe(n)
+ children: pbe(n)
})
- ] }) : /* @__PURE__ */ (0, V.jsx)(Mk, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
+ ] }) : /* @__PURE__ */ (0, V.jsx)(LE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "配置读取失败",
children: t.error ? W(t.error) : "未取得配置,请刷新页面重试。"
- }) }), /* @__PURE__ */ (0, V.jsx)(Nk, {
+ }) }), /* @__PURE__ */ (0, V.jsx)(RE, {
status: "媒体文件夹、端口、代理与更新在配置页上改。",
children: /* @__PURE__ */ (0, V.jsx)(J, {
onClick: e,
@@ -51848,16 +51944,16 @@ function ube({ openConfiguration: e }) {
}
//#endregion
//#region src/react/settings-panel/legacy-controls.tsx
-var NR = (e) => e.map(([e, t, n]) => n ? [
+var MR = (e) => e.map(([e, t, n]) => n ? [
e,
t,
n
] : [e, t]);
-function PR({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant: o, text: s = !1, epoch: c, onChoose: l }) {
+function NR({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant: o, text: s = !1, epoch: c, onChoose: l }) {
let u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(l);
return f.current = l, (0, B.useLayoutEffect)(() => {
let e = u.current;
- e && (d.current && d.current.value === i && d.current.epoch === c || (e.innerHTML = Me(t, n, NR(r), i, {
+ e && (d.current && d.current.value === i && d.current.epoch === c || (e.innerHTML = Me(t, n, MR(r), i, {
attr: a,
className: o,
text: s
@@ -51875,13 +51971,13 @@ function PR({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant:
ref: u
});
}
-function FR({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a = !1, hidden: o, describedBy: s, epoch: c, onPick: l, decorate: u }) {
+function PR({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a = !1, hidden: o, describedBy: s, epoch: c, onPick: l, decorate: u }) {
let d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(-1), m = (0, B.useRef)(l);
return m.current = l, (0, B.useLayoutEffect)(() => {
let e = d.current;
if (!e) return;
if (p.current !== c || !f.current) {
- e.innerHTML = He(NR(n), r, { label: t });
+ e.innerHTML = He(MR(n), r, { label: t });
let i = $e(e.firstElementChild);
i.addEventListener("change", () => m.current(i.value)), f.current = i, p.current = c;
}
@@ -51894,7 +51990,7 @@ function FR({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a =
"aria-describedby": s
});
}
-function dbe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSettle: o }) {
+function hbe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSettle: o }) {
let s = (0, B.useRef)(null), c = (0, B.useRef)(null), l = (0, B.useRef)({
onStep: a,
onSettle: o
@@ -51929,7 +52025,7 @@ function dbe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSet
}
//#endregion
//#region src/react/settings-panel/glow-settings.tsx
-var fbe = [
+var gbe = [
[
"strength",
"强度",
@@ -51956,7 +52052,7 @@ var fbe = [
100
]
];
-function pbe({ host: e, spot: i, index: a, glow: o }) {
+function _be({ host: e, spot: i, index: a, glow: o }) {
let s = t[a], c = (0, B.useRef)(null), l = (0, B.useRef)(null), d = (0, B.useRef)(null), [f, p] = (0, B.useState)("all");
(0, B.useLayoutEffect)(() => {
let [e, t, n] = [
@@ -52034,7 +52130,7 @@ function pbe({ host: e, spot: i, index: a, glow: o }) {
})]
});
}
-function mbe({ host: e }) {
+function vbe({ host: e }) {
let t = e.store.value.homeGlow, n = f(t.preset);
return /* @__PURE__ */ (0, V.jsxs)("section", {
"data-glow-setting": "",
@@ -52064,7 +52160,7 @@ function mbe({ host: e }) {
}),
/* @__PURE__ */ (0, V.jsx)("div", {
"data-glow-fields": "",
- children: fbe.map(([r, i, a]) => /* @__PURE__ */ (0, V.jsx)(dbe, {
+ children: gbe.map(([r, i, a]) => /* @__PURE__ */ (0, V.jsx)(hbe, {
field: r,
label: i,
max: a,
@@ -52086,7 +52182,7 @@ function mbe({ host: e }) {
hidden: n,
children: [/* @__PURE__ */ (0, V.jsx)("h4", { children: "颜色" }), /* @__PURE__ */ (0, V.jsx)("div", {
"data-glow-stops": "",
- children: i.map((n, r) => /* @__PURE__ */ (0, V.jsx)(pbe, {
+ children: i.map((n, r) => /* @__PURE__ */ (0, V.jsx)(_be, {
host: e,
spot: n,
index: r,
@@ -52111,7 +52207,7 @@ function mbe({ host: e }) {
}
//#endregion
//#region src/react/settings-panel/number-setting.tsx
-var hbe = {
+var ybe = {
batchSizeSetting: {
min: 1,
max: 200,
@@ -52152,10 +52248,10 @@ var hbe = {
optional: !0,
fallback: 60
}
-}, IR = (e) => `peach.number.${e}`;
-function LR({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
- let a = hbe[e], { min: o, max: s, unit: c, fallback: l } = a, u = a.optional === !0, d = (0, B.useRef)(0);
- d.current ||= MR(Number(localStorage.getItem(IR(e))), o, s, n && n > 0 ? n : l);
+}, FR = (e) => `peach.number.${e}`;
+function IR({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
+ let a = ybe[e], { min: o, max: s, unit: c, fallback: l } = a, u = a.optional === !0, d = (0, B.useRef)(0);
+ d.current ||= jR(Number(localStorage.getItem(FR(e))), o, s, n && n > 0 ? n : l);
let [f, p] = (0, B.useState)(n ?? 0), [m, h] = (0, B.useState)(String(n && n > 0 ? n : d.current)), [g, _] = (0, B.useState)(""), v = (0, B.useRef)(null), y = (0, B.useRef)(i);
y.current = i, (0, B.useLayoutEffect)(() => {
n !== null && (p(n), n > 0 && h(String(n)));
@@ -52167,7 +52263,7 @@ function LR({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
t.setAttribute("aria-invalid", "true"), _(`请输入 ${o}–${s} 的整数(${c})`);
return;
}
- t.removeAttribute("aria-invalid"), _(""), d.current = Number(t.value), localStorage.setItem(IR(e), String(d.current)), y.current(d.current);
+ t.removeAttribute("aria-invalid"), _(""), d.current = Number(t.value), localStorage.setItem(FR(e), String(d.current)), y.current(d.current);
}
}, x = (0, B.useRef)(b);
x.current = b, (0, B.useEffect)(() => {
@@ -52182,7 +52278,7 @@ function LR({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
p(d.current), h(String(d.current)), y.current(d.current);
return;
}
- t && t.value && t.checkValidity() && (d.current = Number(t.value)), localStorage.setItem(IR(e), String(d.current)), p(0), y.current(0);
+ t && t.value && t.checkValidity() && (d.current = Number(t.value)), localStorage.setItem(FR(e), String(d.current)), p(0), y.current(0);
}, w = r || n === null;
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-number-setting": "",
@@ -52232,13 +52328,13 @@ function LR({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
}
//#endregion
//#region src/react/sidebar/sidebar-order.ts
-function RR(e) {
- let { mutate: t } = Gj();
+function LR(e) {
+ let { mutate: t } = Mj();
return (0, B.useCallback)((n) => {
e.value.sidebarOrder = n, e.save(), t({ sidebarOrder: n }, { onError: () => {} });
}, [e, t]);
}
-function zR(e, t, n, r) {
+function RR(e, t, n, r) {
if (t === n) return null;
let i = [...e], a = i.indexOf(t);
if (a < 0) return null;
@@ -52248,17 +52344,17 @@ function zR(e, t, n, r) {
}
//#endregion
//#region src/react/settings-panel/sidebar-order.tsx
-var gbe = "__home__", BR = (e) => e === "" ? gbe : e;
-function _be({ host: e }) {
- let t = RR(e.store), n = e.store.value.sidebarOrder, r = new Map(e.navCatalog.map((e) => [e[0], e])), i = n.map((e) => r.get(e)).filter((e) => e !== void 0), a = e.navCatalog.filter(([e]) => !n.includes(e)), [o, s] = (0, B.useState)(null), [c, l] = (0, B.useState)(!1), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (e, r, i) => {
- let a = zR(n, e, r, i);
+var bbe = "__home__", zR = (e) => e === "" ? bbe : e;
+function xbe({ host: e }) {
+ let t = LR(e.store), n = e.store.value.sidebarOrder, r = new Map(e.navCatalog.map((e) => [e[0], e])), i = n.map((e) => r.get(e)).filter((e) => e !== void 0), a = e.navCatalog.filter(([e]) => !n.includes(e)), [o, s] = (0, B.useState)(null), [c, l] = (0, B.useState)(!1), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (e, r, i) => {
+ let a = RR(n, e, r, i);
a && t(a);
}, _ = (e, r) => {
let i = n.indexOf(e), a = i + r;
if (i < 0 || a < 0 || a >= n.length) return;
let o = [...n];
[o[i], o[a]] = [o[a], o[i]], t(o);
- }, v = a.find(([e]) => BR(e) === o) ?? a[0], y = () => {
+ }, v = a.find(([e]) => zR(e) === o) ?? a[0], y = () => {
h.current && De(h.current), l(!1);
}, b = () => {
let e = h.current;
@@ -52279,7 +52375,7 @@ function _be({ host: e }) {
}, C = (e) => ({
draggable: !0,
onDragStart: (t) => {
- d(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", BR(e));
+ d(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", zR(e));
},
onDragOver: (t) => {
if (u === null || u === e) return;
@@ -52353,7 +52449,7 @@ function _be({ host: e }) {
})
]
})]
- }, BR(e))), /* @__PURE__ */ (0, V.jsxs)("div", {
+ }, zR(e))), /* @__PURE__ */ (0, V.jsxs)("div", {
"data-sidebar-add-row": "",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
"data-sidebar-add-picker": "",
@@ -52386,15 +52482,15 @@ function _be({ host: e }) {
children: a.map(([e, t, n]) => /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
role: "option",
- "data-sidebar-add-option": BR(e),
+ "data-sidebar-add-option": zR(e),
"aria-selected": v?.[0] === e,
tabIndex: v?.[0] === e ? 0 : -1,
onKeyDown: x,
onClick: () => {
- s(BR(e)), y(), m.current?.focus();
+ s(zR(e)), y(), m.current?.focus();
},
children: [/* @__PURE__ */ (0, V.jsx)(nT, { name: n ?? "" }), /* @__PURE__ */ (0, V.jsx)("span", { children: t })]
- }, BR(e)))
+ }, zR(e)))
}) : null]
}), /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
@@ -52411,7 +52507,7 @@ function _be({ host: e }) {
}
//#endregion
//#region src/react/settings-panel/settings-panel.tsx
-var VR = [
+var BR = [
["界面", "ri-palette-line"],
["浏览", "ri-layout-grid-line"],
["播放", "ri-play-circle-line"],
@@ -52419,7 +52515,7 @@ var VR = [
["关注", "ri-rss-line"],
["安全", "ri-shield-check-line"],
["这台电脑", "ri-macbook-line"]
-], vbe = [
+], Sbe = [
["seed", "随机"],
["rating", "评分"],
["o", "高潮计数"],
@@ -52428,16 +52524,16 @@ var VR = [
["size", "体积"],
["new", "入库时间"],
["played", "观看时间"]
-], ybe = [["desc", "降序"], ["asc", "升序"]], bbe = [
+], Cbe = [["desc", "降序"], ["asc", "升序"]], wbe = [
["off", "关闭"],
["precise", "精准"],
["coarse", "粗略"]
-], xbe = [
+], Tbe = [
["7", "每周"],
["30", "每月"],
["90", "每季"],
["0", "从不"]
-], Sbe = [[
+], Ebe = [[
"cover",
"官方封面",
""
@@ -52445,7 +52541,7 @@ var VR = [
"thumbnail",
"预览图",
""
-]], Cbe = [
+]], Dbe = [
[
"feedHideGroupSetting",
"feedHideGroupCompilations",
@@ -52470,64 +52566,64 @@ var VR = [
"feedHideExcerptDescription",
"把出过的正片剪成十几分钟单卖的,比如ハイライト厂牌。"
]
-], wbe = "button:not([disabled]),input:not([disabled]),textarea:not([disabled]),a[href]", HR = null, UR = {
+], Obe = "button:not([disabled]),input:not([disabled]),textarea:not([disabled]),a[href]", VR = null, HR = {
open: !1,
closing: !1,
epoch: 0,
tab: 0,
machine: "none"
-}, WR = 0, GR = null, KR = /* @__PURE__ */ new Set();
-function Tbe(e) {
- return KR.add(e), () => {
- KR.delete(e);
+}, UR = 0, WR = null, GR = /* @__PURE__ */ new Set();
+function kbe(e) {
+ return GR.add(e), () => {
+ GR.delete(e);
};
}
-function Ebe() {
- for (let e of [...KR]) e();
+function Abe() {
+ for (let e of [...GR]) e();
}
-function qR(e) {
- UR = {
- ...UR,
+function KR(e) {
+ HR = {
+ ...HR,
...e
- }, (0, $f.flushSync)(Ebe);
+ }, (0, $f.flushSync)(Abe);
}
-async function Dbe(e) {
- if (UR.machine === "summary") return;
+async function jbe(e) {
+ if (HR.machine === "summary") return;
let t = await e.configurable();
- if (UR.open) {
+ if (HR.open) {
if (!t) {
- qR({ machine: "note" });
+ KR({ machine: "note" });
return;
}
try {
- await vR(new AbortController().signal);
+ await _R(new AbortController().signal);
} catch {}
- UR.open && qR({ machine: "summary" });
+ HR.open && KR({ machine: "summary" });
}
}
-function Obe(e = "") {
- let t = HR;
+function Mbe(e = "") {
+ let t = VR;
if (!t) return;
- we(), WR += 1, GR ||= document.activeElement, t.sound("whoosh"), document.documentElement.style.overflow = "hidden", document.body.classList.add("settings-open");
- let n = VR.findIndex(([t]) => t === e), r = Pue();
- qR({
+ we(), UR += 1, WR ||= document.activeElement, t.sound("whoosh"), document.documentElement.style.overflow = "hidden", document.body.classList.add("settings-open");
+ let n = BR.findIndex(([t]) => t === e), r = Sue();
+ KR({
open: !0,
closing: !1,
- epoch: UR.epoch + 1,
- tab: n >= 0 ? n : UR.tab
+ epoch: HR.epoch + 1,
+ tab: n >= 0 ? n : HR.tab
}), r.then((e) => {
e && t.syncRemote(e);
- }), Dbe(t), queueMicrotask(() => document.getElementById("settingsClose")?.focus());
+ }), jbe(t), queueMicrotask(() => document.getElementById("settingsClose")?.focus());
}
-function JR() {
- if (!UR.open || UR.closing) return;
- let e = ++WR;
- qR({ closing: !0 });
+function qR() {
+ if (!HR.open || HR.closing) return;
+ let e = ++UR;
+ KR({ closing: !0 });
let t = () => {
- e !== WR || !UR.closing || (qR({
+ e !== UR || !HR.closing || (KR({
open: !1,
closing: !1
- }), document.documentElement.style.overflow = "", document.body.classList.remove("settings-open"), GR instanceof HTMLElement && document.contains(GR) && GR.focus(), GR = null);
+ }), document.documentElement.style.overflow = "", document.body.classList.remove("settings-open"), WR instanceof HTMLElement && document.contains(WR) && WR.focus(), WR = null);
};
if (matchMedia("(prefers-reduced-motion: reduce)").matches) {
queueMicrotask(t);
@@ -52535,31 +52631,31 @@ function JR() {
}
document.querySelector("#settingsPanel > [data-settings-card]")?.addEventListener("animationend", t, { once: !0 }), setTimeout(t, 380);
}
-var kbe = {
- open: Obe,
- close: JR,
- isOpen: () => UR.open,
+var Nbe = {
+ open: Mbe,
+ close: qR,
+ isOpen: () => HR.open,
reveal: (e) => queueMicrotask(() => document.querySelector(e)?.scrollIntoView({ block: "nearest" }))
};
-function Abe(e) {
- return HR = e, kbe;
+function Pbe(e) {
+ return VR = e, Nbe;
}
-function jbe() {
- let e = (0, B.useSyncExternalStore)(Tbe, () => UR);
- return HR ? /* @__PURE__ */ (0, V.jsx)(Pbe, {
- host: HR,
+function Fbe() {
+ let e = (0, B.useSyncExternalStore)(kbe, () => HR);
+ return VR ? /* @__PURE__ */ (0, V.jsx)(Rbe, {
+ host: VR,
view: e
}) : null;
}
-function Mbe(e) {
+function Ibe(e) {
if (e.key !== "Tab") return;
- let t = [...e.currentTarget.querySelectorAll(wbe)].filter((e) => e.getClientRects().length > 0);
+ let t = [...e.currentTarget.querySelectorAll(Obe)].filter((e) => e.getClientRects().length > 0);
if (!t.length) return;
let n = t[0], r = t[t.length - 1];
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
}
-var YR = (e) => `settings-tab-${e}`, XR = (e) => e === VR.length - 1 ? "machineGroup" : `settings-group-${e}`;
-function Nbe({ tab: e, epoch: t, onSelect: n }) {
+var JR = (e) => `settings-tab-${e}`, YR = (e) => e === BR.length - 1 ? "machineGroup" : `settings-group-${e}`;
+function Lbe({ tab: e, epoch: t, onSelect: n }) {
let r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(e), s = (0, B.useRef)([]), c = (e, t) => {
let n = i.current;
if (!n) return;
@@ -52587,7 +52683,7 @@ function Nbe({ tab: e, epoch: t, onSelect: n }) {
o.current = e, l.current(s.current[e], t);
}, [e, t]);
let u = (e, t) => {
- let r = VR.length, i = t;
+ let r = BR.length, i = t;
if (e.key === "ArrowRight" || e.key === "ArrowDown") i = (t + 1) % r;
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") i = (t + r - 1) % r;
else if (e.key === "Home") i = 0;
@@ -52616,11 +52712,11 @@ function Nbe({ tab: e, epoch: t, onSelect: n }) {
role: "presentation",
children: "设置"
}),
- VR.map(([t, r], i) => /* @__PURE__ */ (0, V.jsxs)("button", {
+ BR.map(([t, r], i) => /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
role: "tab",
- id: YR(i),
- "aria-controls": XR(i),
+ id: JR(i),
+ "aria-controls": YR(i),
"aria-selected": i === e,
tabIndex: i === e ? 0 : -1,
ref: (e) => {
@@ -52636,17 +52732,17 @@ function Nbe({ tab: e, epoch: t, onSelect: n }) {
]
});
}
-function ZR({ index: e, tab: t, children: n }) {
+function XR({ index: e, tab: t, children: n }) {
return /* @__PURE__ */ (0, V.jsxs)("section", {
"data-setting-group": "",
- id: XR(e),
+ id: YR(e),
role: "tabpanel",
- "aria-labelledby": YR(e),
+ "aria-labelledby": JR(e),
hidden: e !== t,
- children: [/* @__PURE__ */ (0, V.jsx)("h3", { children: VR[e][0] }), n]
+ children: [/* @__PURE__ */ (0, V.jsx)("h3", { children: BR[e][0] }), n]
});
}
-function QR({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Setting$/, "")}Description`, checked: i, onToggle: a }) {
+function ZR({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Setting$/, "")}Description`, checked: i, onToggle: a }) {
return /* @__PURE__ */ (0, V.jsxs)("label", {
"data-setting-row": "",
children: [/* @__PURE__ */ (0, V.jsxs)("span", { children: [/* @__PURE__ */ (0, V.jsx)("b", { children: t }), /* @__PURE__ */ (0, V.jsx)("small", {
@@ -52663,7 +52759,7 @@ function QR({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Se
})]
});
}
-function $R({ title: e, description: t, kind: n, children: r }) {
+function QR({ title: e, description: t, kind: n, children: r }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-setting-row": "",
"data-setting-sort": n === "sort" ? "" : void 0,
@@ -52671,11 +52767,11 @@ function $R({ title: e, description: t, kind: n, children: r }) {
children: [/* @__PURE__ */ (0, V.jsxs)("span", { children: [/* @__PURE__ */ (0, V.jsx)("b", { children: e }), typeof t == "string" ? /* @__PURE__ */ (0, V.jsx)("small", { children: t }) : t] }), r]
});
}
-var ez = ({ html: e, ...t }) => /* @__PURE__ */ (0, V.jsx)("small", {
+var $R = ({ html: e, ...t }) => /* @__PURE__ */ (0, V.jsx)("small", {
...t,
dangerouslySetInnerHTML: { __html: e }
-}), tz = () => `${Ke("保存中")}<span>正在保存…</span>`, nz = (e, t) => e instanceof Error && e.message || t;
-function Pbe({ host: e, view: t }) {
+}), ez = () => `${Ke("保存中")}<span>正在保存…</span>`, tz = (e, t) => e instanceof Error && e.message || t;
+function Rbe({ host: e, view: t }) {
(0, B.useSyncExternalStore)(e.store.subscribe, e.store.version);
let n = e.store.value, r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(t.tab), l = () => {
let [e, t] = [i.current, o.current];
@@ -52696,7 +52792,7 @@ function Pbe({ host: e, view: t }) {
s.current?.();
});
let d = t.epoch, f = (e) => {
- e !== UR.tab && qR({ tab: e });
+ e !== HR.tab && KR({ tab: e });
}, p = () => e.store.save();
return /* @__PURE__ */ (0, V.jsx)("section", {
"data-settings-panel": "",
@@ -52707,9 +52803,9 @@ function Pbe({ host: e, view: t }) {
"aria-labelledby": "settingsTitle",
"data-closing": t.closing ? "" : void 0,
ref: r,
- onKeyDown: Mbe,
+ onKeyDown: Ibe,
onClick: (e) => {
- e.target === e.currentTarget && JR();
+ e.target === e.currentTarget && qR();
},
children: /* @__PURE__ */ (0, V.jsxs)("div", {
"data-settings-card": "",
@@ -52720,19 +52816,19 @@ function Pbe({ host: e, view: t }) {
ref: a,
children: [/* @__PURE__ */ (0, V.jsx)("h2", {
id: "settingsTitle",
- children: VR[t.tab][0]
+ children: BR[t.tab][0]
}), /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
id: "settingsClose",
"aria-label": "关闭设置",
- onClick: JR,
+ onClick: qR,
children: /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: "#i-x" })
})
})]
}),
- /* @__PURE__ */ (0, V.jsx)(Nbe, {
+ /* @__PURE__ */ (0, V.jsx)(Lbe, {
tab: t.tab,
epoch: d,
onSelect: f
@@ -52741,14 +52837,14 @@ function Pbe({ host: e, view: t }) {
"data-settings-scroll": "",
ref: o,
children: [
- /* @__PURE__ */ (0, V.jsxs)(ZR, {
+ /* @__PURE__ */ (0, V.jsxs)(XR, {
index: 0,
tab: t.tab,
children: [
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "主题",
description: "跟随系统,或固定用浅色、深色。",
- children: /* @__PURE__ */ (0, V.jsx)(PR, {
+ children: /* @__PURE__ */ (0, V.jsx)(NR, {
id: "themeSetting",
name: "theme",
legend: "主题",
@@ -52776,7 +52872,7 @@ function Pbe({ host: e, view: t }) {
onChange: (t) => e.setHighContrast(t.target.checked)
})]
}),
- /* @__PURE__ */ (0, V.jsx)(QR, {
+ /* @__PURE__ */ (0, V.jsx)(ZR, {
id: "uiSoundsSetting",
title: "界面音效",
checked: n.uiSounds,
@@ -52785,7 +52881,7 @@ function Pbe({ host: e, view: t }) {
n.uiSounds = t, p(), e.changed("uiSounds");
}
}),
- /* @__PURE__ */ (0, V.jsx)(QR, {
+ /* @__PURE__ */ (0, V.jsx)(ZR, {
id: "homeGlowSetting",
title: "侧栏光晕",
checked: n.homeGlow.on,
@@ -52794,44 +52890,44 @@ function Pbe({ host: e, view: t }) {
n.homeGlow.on = t, p(), e.changed("glow");
}
}),
- /* @__PURE__ */ (0, V.jsx)(mbe, { host: e }),
+ /* @__PURE__ */ (0, V.jsx)(vbe, { host: e }),
/* @__PURE__ */ (0, V.jsxs)("section", {
"data-sidebar-setting": "",
"aria-labelledby": "sidebarOrderTitle",
children: [/* @__PURE__ */ (0, V.jsxs)("span", { children: [/* @__PURE__ */ (0, V.jsx)("b", {
id: "sidebarOrderTitle",
children: "左侧导航"
- }), /* @__PURE__ */ (0, V.jsx)("small", { children: "直接拖动排序;可隐藏入口,也可从具体页面列表重新添加。窄栏和筛选抽屉会保持一致。" })] }), /* @__PURE__ */ (0, V.jsx)(_be, { host: e })]
+ }), /* @__PURE__ */ (0, V.jsx)("small", { children: "直接拖动排序;可隐藏入口,也可从具体页面列表重新添加。窄栏和筛选抽屉会保持一致。" })] }), /* @__PURE__ */ (0, V.jsx)(xbe, { host: e })]
})
]
}),
- /* @__PURE__ */ (0, V.jsx)(Ibe, {
+ /* @__PURE__ */ (0, V.jsx)(Bbe, {
host: e,
tab: t.tab,
epoch: d
}),
- /* @__PURE__ */ (0, V.jsx)(Rbe, {
+ /* @__PURE__ */ (0, V.jsx)(Hbe, {
host: e,
tab: t.tab,
epoch: d
}),
- /* @__PURE__ */ (0, V.jsx)(ZR, {
+ /* @__PURE__ */ (0, V.jsx)(XR, {
index: 3,
tab: t.tab,
- children: /* @__PURE__ */ (0, V.jsx)(Bbe, {
+ children: /* @__PURE__ */ (0, V.jsx)(Wbe, {
host: e,
epoch: d
})
}),
- /* @__PURE__ */ (0, V.jsx)(Vbe, {
+ /* @__PURE__ */ (0, V.jsx)(Gbe, {
host: e,
tab: t.tab,
epoch: d
}),
- /* @__PURE__ */ (0, V.jsx)(ZR, {
+ /* @__PURE__ */ (0, V.jsx)(XR, {
index: 5,
tab: t.tab,
- children: /* @__PURE__ */ (0, V.jsx)(QR, {
+ children: /* @__PURE__ */ (0, V.jsx)(ZR, {
id: "censorSetting",
title: "SFW 模式",
describedBy: "sfwDescription",
@@ -52840,10 +52936,10 @@ function Pbe({ host: e, view: t }) {
onToggle: (t) => e.setCensored(t)
})
}),
- /* @__PURE__ */ (0, V.jsx)(ZR, {
+ /* @__PURE__ */ (0, V.jsx)(XR, {
index: 6,
tab: t.tab,
- children: /* @__PURE__ */ (0, V.jsx)(Ube, {
+ children: /* @__PURE__ */ (0, V.jsx)(qbe, {
host: e,
machine: t.machine
})
@@ -52854,7 +52950,7 @@ function Pbe({ host: e, view: t }) {
})
});
}
-function Fbe(e, t) {
+function zbe(e, t) {
let n = e.querySelector("[data-select-label]");
if (!n) return;
n.querySelector("[data-icon-swap]") || (n.innerHTML = je("arrow-up", "arrow-down", "a", {
@@ -52864,18 +52960,18 @@ function Fbe(e, t) {
let r = n.querySelector("[data-sort-direction-label]");
r && (r.textContent = t ? "升序" : "降序");
}
-function Ibe({ host: e, tab: t, epoch: n }) {
+function Bbe({ host: e, tab: t, epoch: n }) {
let r = e.store.value, i = () => e.store.save(), a = r.defaultSort === "seed", o = r.defaultSortDirection === "asc";
- return /* @__PURE__ */ (0, V.jsxs)(ZR, {
+ return /* @__PURE__ */ (0, V.jsxs)(XR, {
index: 1,
tab: t,
children: [
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "每批作品",
description: "首页每次加载的作品数量。",
children: /* @__PURE__ */ (0, V.jsx)("div", {
id: "batchSizeSetting",
- children: /* @__PURE__ */ (0, V.jsx)(LR, {
+ children: /* @__PURE__ */ (0, V.jsx)(IR, {
id: "batchSizeSetting",
label: "每批作品",
value: r.batchSize,
@@ -52885,7 +52981,7 @@ function Ibe({ host: e, tab: t, epoch: n }) {
}, n)
})
}),
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "默认排序",
kind: "sort",
description: /* @__PURE__ */ (0, V.jsx)("small", {
@@ -52894,19 +52990,19 @@ function Ibe({ host: e, tab: t, epoch: n }) {
}),
children: /* @__PURE__ */ (0, V.jsxs)("div", {
"data-setting-sort-controls": "",
- children: [/* @__PURE__ */ (0, V.jsx)(FR, {
+ children: [/* @__PURE__ */ (0, V.jsx)(PR, {
id: "defaultSortSetting",
label: "默认排序",
- options: vbe,
+ options: Sbe,
value: r.defaultSort,
epoch: n,
onPick: (t) => {
r.defaultSort = t, i(), e.changed("defaultSort");
}
- }), /* @__PURE__ */ (0, V.jsx)(FR, {
+ }), /* @__PURE__ */ (0, V.jsx)(PR, {
id: "defaultSortDirectionSetting",
label: "默认排序方向",
- options: ybe,
+ options: Cbe,
value: o ? "asc" : "desc",
hidden: a,
disabled: a,
@@ -52915,7 +53011,7 @@ function Ibe({ host: e, tab: t, epoch: n }) {
onPick: (t) => {
r.defaultSortDirection = t, i(), e.changed("sortDirection");
},
- decorate: (e) => Fbe(e, o)
+ decorate: (e) => zbe(e, o)
})]
})
}),
@@ -52932,29 +53028,29 @@ function Ibe({ host: e, tab: t, epoch: n }) {
}
})]
}),
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "JAV 默认封面",
description: "首页、接着看和 Mix 等位置共用;缺图时使用另一种封面。",
- children: /* @__PURE__ */ (0, V.jsx)(PR, {
+ children: /* @__PURE__ */ (0, V.jsx)(NR, {
id: "javImageSetting",
name: "jav-image",
legend: "JAV 默认封面",
- options: Sbe,
+ options: Ebe,
value: r.javImage,
attr: "data-jav-image-choice",
variant: "javimageswitch",
text: !0,
epoch: n,
onChoose: (t) => {
- r.javImage = AC(t), i(), e.changed("javImage");
+ r.javImage = OC(t), i(), e.changed("javImage");
}
})
}),
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "视频封面默认大小",
kind: "related",
description: "首页和 JAV 等视频列表共用;小图展示完整封套,大图展示完整正封。",
- children: /* @__PURE__ */ (0, V.jsx)(PR, {
+ children: /* @__PURE__ */ (0, V.jsx)(NR, {
id: "javSizeSetting",
name: "video-size",
legend: "视频封面默认大小",
@@ -52967,7 +53063,7 @@ function Ibe({ host: e, tab: t, epoch: n }) {
onChoose: (t) => e.setVideoLayout(t)
})
}),
- /* @__PURE__ */ (0, V.jsx)(QR, {
+ /* @__PURE__ */ (0, V.jsx)(ZR, {
id: "feedAutoScrollSetting",
title: "新作自动滚动",
checked: r.feedAutoScroll,
@@ -52976,7 +53072,7 @@ function Ibe({ host: e, tab: t, epoch: n }) {
r.feedAutoScroll = t, i(), e.changed("feedAutoScroll");
}
}),
- Cbe.map(([t, n, r, i, a, o]) => /* @__PURE__ */ (0, V.jsx)(Lbe, {
+ Dbe.map(([t, n, r, i, a, o]) => /* @__PURE__ */ (0, V.jsx)(Vbe, {
host: e,
id: t,
settingKey: n,
@@ -52988,8 +53084,8 @@ function Ibe({ host: e, tab: t, epoch: n }) {
]
});
}
-function Lbe({ host: e, id: t, settingKey: n, label: r, title: i, describedBy: a, description: o }) {
- let s = Gj(), [c, l] = (0, B.useState)(null), u = (0, B.useRef)(null), d = e.store.value, f = (t) => {
+function Vbe({ host: e, id: t, settingKey: n, label: r, title: i, describedBy: a, description: o }) {
+ let s = Mj(), [c, l] = (0, B.useState)(null), u = (0, B.useRef)(null), d = e.store.value, f = (t) => {
l(t), Ue(u.current), s.mutate({ [n]: t }, {
onSuccess: (i) => {
d[n] = i[n] === !0, e.store.save(), e.changed("feedCompilations"), e.receipt(t ? `新作已收起${r}` : `新作已列出${r}`);
@@ -53017,28 +53113,28 @@ function Lbe({ host: e, id: t, settingKey: n, label: r, title: i, describedBy: a
})]
});
}
-function Rbe({ host: e, tab: t, epoch: n }) {
+function Hbe({ host: e, tab: t, epoch: n }) {
let r = e.store.value, i = () => e.store.save();
- return /* @__PURE__ */ (0, V.jsxs)(ZR, {
+ return /* @__PURE__ */ (0, V.jsxs)(XR, {
index: 2,
tab: t,
children: [
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "悬停放大",
description: "转圈完成后进入放大预览。",
children: /* @__PURE__ */ (0, V.jsx)("div", {
id: "hoverDelaySetting",
- children: /* @__PURE__ */ (0, V.jsx)(LR, {
+ children: /* @__PURE__ */ (0, V.jsx)(IR, {
id: "hoverDelaySetting",
label: "悬停放大",
value: r.hoverDelaySeconds,
onApply: (t) => {
- r.hoverDelaySeconds = MR(t, 0, 60, 5), i(), e.changed("hoverDelay");
+ r.hoverDelaySeconds = jR(t, 0, 60, 5), i(), e.changed("hoverDelay");
}
}, n)
})
}),
- /* @__PURE__ */ (0, V.jsx)(QR, {
+ /* @__PURE__ */ (0, V.jsx)(ZR, {
id: "detailAutoplaySetting",
title: "打开详情自动播放",
checked: r.detailAutoplay,
@@ -53047,7 +53143,7 @@ function Rbe({ host: e, tab: t, epoch: n }) {
r.detailAutoplay = e, i();
}
}),
- /* @__PURE__ */ (0, V.jsx)(QR, {
+ /* @__PURE__ */ (0, V.jsx)(ZR, {
id: "miniplayerSetting",
title: "小窗播放",
checked: r.miniplayer,
@@ -53056,12 +53152,12 @@ function Rbe({ host: e, tab: t, epoch: n }) {
r.miniplayer = t, i(), e.changed("miniplayer");
}
}),
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "快进 / 快退",
description: "卡片预览和详情播放器共用。",
children: /* @__PURE__ */ (0, V.jsx)("div", {
id: "seekSecondsSetting",
- children: /* @__PURE__ */ (0, V.jsx)(LR, {
+ children: /* @__PURE__ */ (0, V.jsx)(IR, {
id: "seekSecondsSetting",
label: "快进 / 快退",
value: r.seekSeconds,
@@ -53071,13 +53167,13 @@ function Rbe({ host: e, tab: t, epoch: n }) {
}, n)
})
}),
- /* @__PURE__ */ (0, V.jsx)(zbe, { epoch: n }),
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(Ube, { epoch: n }),
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "相关推荐",
description: "详情下方一次显示的相似作品数量。",
children: /* @__PURE__ */ (0, V.jsx)("div", {
id: "relatedLimitSetting",
- children: /* @__PURE__ */ (0, V.jsx)(LR, {
+ children: /* @__PURE__ */ (0, V.jsx)(IR, {
id: "relatedLimitSetting",
label: "相关推荐",
value: r.relatedLimit,
@@ -53090,26 +53186,26 @@ function Rbe({ host: e, tab: t, epoch: n }) {
]
});
}
-function zbe({ epoch: e }) {
+function Ube({ epoch: e }) {
let t = TS({
- queryKey: Hj,
- queryFn: ({ signal: e }) => Wj(e)
- }), n = Iue(), r = n.reset;
+ queryKey: kj,
+ queryFn: ({ signal: e }) => jj(e)
+ }), n = wue(), r = n.reset;
(0, B.useEffect)(() => {
r();
}, [e, r]);
- let i = t.data?.mode || "off", a = n.isPending ? tz() : t.isFetching ? Pe("正在读取状态") : n.isError ? rz(nz(n.error, "保存失败")) : t.isError ? rz(`状态未取得:${nz(t.error, String(t.error))}`) : t.data ? rz(Rue(t.data)) : "读取运行状态…";
- return /* @__PURE__ */ (0, V.jsx)($R, {
+ let i = t.data?.mode || "off", a = n.isPending ? ez() : t.isFetching ? Pe("正在读取状态") : n.isError ? nz(tz(n.error, "保存失败")) : t.isError ? nz(`状态未取得:${tz(t.error, String(t.error))}`) : t.data ? nz(Eue(t.data)) : "读取运行状态…";
+ return /* @__PURE__ */ (0, V.jsx)(QR, {
title: "视频缩略图采集",
- description: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("small", { children: "拖动进度条时按时间点看画面。精准每 10 秒一张,粗略每 30 秒一张;两小时的片子约 720 / 240 张,占 20–100 / 7–35 MB。只采集本机磁盘上的片子,网盘上的每张都要回源拉一次。" }), /* @__PURE__ */ (0, V.jsx)(ez, {
+ description: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("small", { children: "拖动进度条时按时间点看画面。精准每 10 秒一张,粗略每 30 秒一张;两小时的片子约 720 / 240 张,占 20–100 / 7–35 MB。只采集本机磁盘上的片子,网盘上的每张都要回源拉一次。" }), /* @__PURE__ */ (0, V.jsx)($R, {
id: "videoThumbnailState",
"aria-live": "polite",
html: a
})] }),
- children: /* @__PURE__ */ (0, V.jsx)(FR, {
+ children: /* @__PURE__ */ (0, V.jsx)(PR, {
id: "videoThumbnailSetting",
label: "视频缩略图采集",
- options: bbe,
+ options: wbe,
value: n.isPending || n.isError ? n.variables ?? i : i,
disabled: n.isPending || t.isFetching,
epoch: e,
@@ -53117,26 +53213,26 @@ function zbe({ epoch: e }) {
})
});
}
-function Bbe({ host: e, epoch: t }) {
- let n = e.store.value, r = Gj();
- return /* @__PURE__ */ (0, V.jsx)($R, {
+function Wbe({ host: e, epoch: t }) {
+ let n = e.store.value, r = Mj();
+ return /* @__PURE__ */ (0, V.jsx)(QR, {
title: "搜索记录",
description: "保存在 Peach 账本,所有访问端同步。",
children: /* @__PURE__ */ (0, V.jsx)("div", {
id: "searchHistoryLimitSetting",
- children: /* @__PURE__ */ (0, V.jsx)(LR, {
+ children: /* @__PURE__ */ (0, V.jsx)(IR, {
id: "searchHistoryLimitSetting",
label: "搜索记录",
value: n.searchHistoryLimit,
onApply: (t) => {
- n.searchHistoryLimit = MR(t, 0, 50, 10), e.store.save(), e.changed("searchHistoryLimit"), r.mutate({ searchHistoryLimit: n.searchHistoryLimit }, { onError: () => {} });
+ n.searchHistoryLimit = jR(t, 0, 50, 10), e.store.save(), e.changed("searchHistoryLimit"), r.mutate({ searchHistoryLimit: n.searchHistoryLimit }, { onError: () => {} });
}
}, t)
})
});
}
-function Vbe({ host: e, tab: t, epoch: n }) {
- let r = e.store.value, i = Gj(), o = Gj(), [s, c] = (0, B.useState)("");
+function Gbe({ host: e, tab: t, epoch: n }) {
+ let r = e.store.value, i = Mj(), o = Mj(), [s, c] = (0, B.useState)("");
(0, B.useEffect)(() => {
c("");
}, [n]);
@@ -53146,22 +53242,22 @@ function Vbe({ host: e, tab: t, epoch: n }) {
typeof t.followInitialDays == "number" && (r.followInitialDays = t.followInitialDays), e.store.save(), c("已保存,适用于尚未开始采集的来源。"), e.receipt("已保存首次采集历史范围");
},
onError: (t) => {
- c(nz(t, "")), e.failure("保存首次采集历史范围", t);
+ c(tz(t, "")), e.failure("保存首次采集历史范围", t);
}
}));
};
- return /* @__PURE__ */ (0, V.jsxs)(ZR, {
+ return /* @__PURE__ */ (0, V.jsxs)(XR, {
index: 4,
tab: t,
children: [
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "首次采集历史范围",
description: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("small", { children: "按发布时间限制新来源首次导入的内容;范围内不足 30 条时补到 30 条。没有日期的条目仍会导入;已有内容不受影响,支持历史分页的来源可手动加载更早。" }), /* @__PURE__ */ (0, V.jsx)("small", {
id: "followInitialDaysState",
"aria-live": "polite",
children: s
})] }),
- children: /* @__PURE__ */ (0, V.jsx)(FR, {
+ children: /* @__PURE__ */ (0, V.jsx)(PR, {
id: "followInitialDaysSetting",
label: "首次采集历史范围",
options: e.followInitialRanges,
@@ -53171,14 +53267,14 @@ function Vbe({ host: e, tab: t, epoch: n }) {
onPick: (e) => l(Number(e))
})
}),
- /* @__PURE__ */ (0, V.jsx)(Hbe, { epoch: n }),
- /* @__PURE__ */ (0, V.jsx)($R, {
+ /* @__PURE__ */ (0, V.jsx)(Kbe, { epoch: n }),
+ /* @__PURE__ */ (0, V.jsx)(QR, {
title: "头像与站点图标刷新",
description: "创作者头像、来源图标和外链圆标保存在本机,到期后下次显示时重新取一次;视频与图片不保存。",
- children: /* @__PURE__ */ (0, V.jsx)(FR, {
+ children: /* @__PURE__ */ (0, V.jsx)(PR, {
id: "metadataRefreshSetting",
label: "头像与站点图标刷新",
- options: xbe,
+ options: Tbe,
value: String(r.metadataRefreshDays),
epoch: n,
onPick: (t) => {
@@ -53190,25 +53286,25 @@ function Vbe({ host: e, tab: t, epoch: n }) {
]
});
}
-function Hbe({ epoch: e }) {
+function Kbe({ epoch: e }) {
let t = TS({
- queryKey: Vj,
- queryFn: ({ signal: e }) => Uj(e)
- }), n = Fue(), r = n.reset;
+ queryKey: Oj,
+ queryFn: ({ signal: e }) => Aj(e)
+ }), n = Cue(), r = n.reset;
(0, B.useEffect)(() => {
r();
}, [e, r]);
- let i = t.data, a = n.isPending || t.isFetching || t.isError && !n.isError, o = n.isPending ? tz() : t.isFetching ? Pe("正在读取状态") : n.isError ? rz(nz(n.error, "保存失败")) : t.isError ? rz(`状态未取得:${nz(t.error, String(t.error))}`) : i ? rz(Lue(i)) : "读取运行状态…";
- return /* @__PURE__ */ (0, V.jsx)($R, {
+ let i = t.data, a = n.isPending || t.isFetching || t.isError && !n.isError, o = n.isPending ? ez() : t.isFetching ? Pe("正在读取状态") : n.isError ? nz(tz(n.error, "保存失败")) : t.isError ? nz(`状态未取得:${tz(t.error, String(t.error))}`) : i ? nz(Tue(i)) : "读取运行状态…";
+ return /* @__PURE__ */ (0, V.jsx)(QR, {
title: "关注自动更新",
- description: /* @__PURE__ */ (0, V.jsx)(ez, {
+ description: /* @__PURE__ */ (0, V.jsx)($R, {
id: "followScheduleState",
"aria-live": "polite",
html: o
}),
children: /* @__PURE__ */ (0, V.jsx)("div", {
id: "followScheduleSetting",
- children: /* @__PURE__ */ (0, V.jsx)(LR, {
+ children: /* @__PURE__ */ (0, V.jsx)(IR, {
id: "followScheduleSetting",
label: "关注自动更新",
value: i && !a ? i.enabled ? i.interval_minutes : 0 : null,
@@ -53218,13 +53314,13 @@ function Hbe({ epoch: e }) {
})
});
}
-function Ube({ host: e, machine: t }) {
+function qbe({ host: e, machine: t }) {
return t === "summary" ? /* @__PURE__ */ (0, V.jsx)("div", {
id: "machineSettings",
children: /* @__PURE__ */ (0, V.jsx)("div", {
className: "peach-react",
- children: /* @__PURE__ */ (0, V.jsx)(ube, { openConfiguration: () => {
- JR(), e.openConfiguration();
+ children: /* @__PURE__ */ (0, V.jsx)(mbe, { openConfiguration: () => {
+ qR(), e.openConfiguration();
} })
})
}, "summary") : t === "note" ? /* @__PURE__ */ (0, V.jsx)("div", {
@@ -53232,19 +53328,19 @@ function Ube({ host: e, machine: t }) {
dangerouslySetInnerHTML: { __html: Ie("媒体文件夹、端口、代理与更新只能在运行 Peach 服务的那台设备上改:在它的浏览器里打开配置页。", { label: "在服务端设备修改" }) }
}, "note") : /* @__PURE__ */ (0, V.jsx)("div", { id: "machineSettings" }, "none");
}
-function rz(e) {
+function nz(e) {
return e.replace(/[&<>"']/g, (e) => `&#${e.charCodeAt(0)};`);
}
//#endregion
//#region src/react/stats/stats.ts
-var Wbe = "/api/stats", iz = ["stats"], az = (e) => G(Wbe, e);
-async function Gbe(e) {
+var Jbe = "/api/stats", rz = ["stats"], iz = (e) => G(Jbe, e);
+async function Ybe(e) {
await z.fetchQuery({
- queryKey: iz,
- queryFn: () => az(e)
+ queryKey: rz,
+ queryFn: () => iz(e)
});
}
-var oz = (e, t) => t ? Math.round(e / t * 100) : 0, Kbe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, sz = (e) => e.duration ? Math.min(e.play_seconds / e.duration, 1) * 100 : 0, cz = (e) => (e.max_reached || 0) * 100, qbe = (e) => e.kind === "online" ? "在线直接观看" : sz(e) < cz(e) - 25 ? "快进扫过" : e.o_count ? `高潮 ${e.o_count}` : "正常观看", Jbe = (e) => `${e.kind === "online" ? "/follow/item/" : "/item/"}${e.id}`, Ybe = (e) => Math.max(1, ...e) * 1.1, Xbe = (e) => Math.max(4, Math.min(14, Math.round(90 / Math.max(1, e)))), Zbe = {
+var az = (e, t) => t ? Math.round(e / t * 100) : 0, Xbe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, oz = (e) => e.duration ? Math.min(e.play_seconds / e.duration, 1) * 100 : 0, sz = (e) => (e.max_reached || 0) * 100, Zbe = (e) => e.kind === "online" ? "在线直接观看" : oz(e) < sz(e) - 25 ? "快进扫过" : e.o_count ? `高潮 ${e.o_count}` : "正常观看", Qbe = (e) => `${e.kind === "online" ? "/follow/item/" : "/item/"}${e.id}`, $be = (e) => Math.max(1, ...e) * 1.1, exe = (e) => Math.max(4, Math.min(14, Math.round(90 / Math.max(1, e)))), txe = {
video: "视频",
image: "图片",
illustration: "插画",
@@ -53252,18 +53348,18 @@ var oz = (e, t) => t ? Math.round(e / t * 100) : 0, Kbe = (e) => e >= 3600 ? `${
audio: "音频",
account: "账号",
other: "其它文件"
-}, Qbe = (e) => e.map((e) => ({
- name: Zbe[e.k] ?? e.k,
+}, nxe = (e) => e.map((e) => ({
+ name: txe[e.k] ?? e.k,
value: e.n
-})).sort((e, t) => t.value - e.value), $be = {
+})).sort((e, t) => t.value - e.value), rxe = {
速食: "<5 分钟",
短: "5–15 分钟",
中: "15–40 分钟",
长: ">40 分钟"
-}, lz = (e, t = {}) => e.map((e) => ({
+}, cz = (e, t = {}) => e.map((e) => ({
name: t[e.k] ?? e.k,
value: e.n
-})), exe = (e) => lz(e, $be), txe = [
+})), ixe = (e) => cz(e, rxe), axe = [
[
1,
1,
@@ -53299,49 +53395,49 @@ var oz = (e, t) => t ? Math.round(e / t * 100) : 0, Kbe = (e) => e >= 3600 ? `${
Infinity,
"≥10 次"
]
-], nxe = (e) => txe.map(([t, n, r]) => ({
+], oxe = (e) => axe.map(([t, n, r]) => ({
name: r,
value: e.filter((e) => e.k >= t && e.k <= n).reduce((e, t) => e + t.n, 0)
-})), rxe = /* @__PURE__ */ "dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture".split(".");
-function uz(e) {
- return typeof e == "string" && rxe.includes(e);
+})), sxe = /* @__PURE__ */ "dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture".split(".");
+function lz(e) {
+ return typeof e == "string" && sxe.includes(e);
}
//#endregion
//#region node_modules/recharts/es6/util/svgPropertiesNoEvents.js
-var ixe = /* @__PURE__ */ new Set(/* @__PURE__ */ "aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle".split("."));
-function dz(e) {
- return typeof e == "string" && ixe.has(e);
+var cxe = /* @__PURE__ */ new Set(/* @__PURE__ */ "aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle".split("."));
+function uz(e) {
+ return typeof e == "string" && cxe.has(e);
}
-function fz(e) {
+function dz(e) {
return typeof e == "string" && e.startsWith("data-");
}
-function pz(e) {
+function fz(e) {
if (typeof e != "object" || !e) return {};
var t = {};
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (dz(n) || fz(n)) && (t[n] = e[n]);
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (uz(n) || dz(n)) && (t[n] = e[n]);
return t;
}
-function mz(e) {
+function pz(e) {
if (e == null) return null;
if (/*#__PURE__*/ (0, B.isValidElement)(e) && typeof e.props == "object" && e.props !== null) {
var t = e.props;
- return pz(t);
+ return fz(t);
}
- return typeof e == "object" && !Array.isArray(e) ? pz(e) : null;
+ return typeof e == "object" && !Array.isArray(e) ? fz(e) : null;
}
//#endregion
//#region node_modules/recharts/es6/util/svgPropertiesAndEvents.js
-function hz(e) {
+function mz(e) {
var t = {};
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (dz(n) || fz(n) || uz(n)) && (t[n] = e[n]);
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (uz(n) || dz(n) || lz(n)) && (t[n] = e[n]);
return t;
}
-function axe(e) {
- return e == null ? null : /*#__PURE__*/ (0, B.isValidElement)(e) ? hz(e.props) : typeof e == "object" && !Array.isArray(e) ? hz(e) : null;
+function lxe(e) {
+ return e == null ? null : /*#__PURE__*/ (0, B.isValidElement)(e) ? mz(e.props) : typeof e == "object" && !Array.isArray(e) ? mz(e) : null;
}
//#endregion
//#region node_modules/recharts/es6/container/Surface.js
-var oxe = [
+var uxe = [
"children",
"width",
"height",
@@ -53351,25 +53447,25 @@ var oxe = [
"title",
"desc"
];
-function gz() {
- return gz = Object.assign ? Object.assign.bind() : function(e) {
+function hz() {
+ return hz = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, gz.apply(null, arguments);
+ }, hz.apply(null, arguments);
}
-function sxe(e, t) {
+function dxe(e, t) {
if (e == null) return {};
- var n, r, i = cxe(e, t);
+ var n, r, i = fxe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function cxe(e, t) {
+function fxe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -53378,14 +53474,14 @@ function cxe(e, t) {
}
return n;
}
-var _z = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { children: n, width: r, height: i, viewBox: a, className: o, style: s, title: c, desc: l } = e, u = sxe(e, oxe), d = a || {
+var gz = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { children: n, width: r, height: i, viewBox: a, className: o, style: s, title: c, desc: l } = e, u = dxe(e, uxe), d = a || {
width: r,
height: i,
x: 0,
y: 0
}, f = _h("recharts-surface", o);
- return /*#__PURE__*/ B.createElement("svg", gz({}, hz(u), {
+ return /*#__PURE__*/ B.createElement("svg", hz({}, mz(u), {
className: f,
width: r,
height: i,
@@ -53393,26 +53489,26 @@ var _z = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
viewBox: `${d.x} ${d.y} ${d.width} ${d.height}`,
ref: t
}), /*#__PURE__*/ B.createElement("title", null, c), /*#__PURE__*/ B.createElement("desc", null, l), n);
-}), lxe = ["children", "className"];
-function vz() {
- return vz = Object.assign ? Object.assign.bind() : function(e) {
+}), pxe = ["children", "className"];
+function _z() {
+ return _z = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, vz.apply(null, arguments);
+ }, _z.apply(null, arguments);
}
-function uxe(e, t) {
+function mxe(e, t) {
if (e == null) return {};
- var n, r, i = dxe(e, t);
+ var n, r, i = hxe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function dxe(e, t) {
+function hxe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -53421,39 +53517,39 @@ function dxe(e, t) {
}
return n;
}
-var yz = /*#__PURE__*/ B.forwardRef((e, t) => {
- var { children: n, className: r } = e, i = uxe(e, lxe), a = _h("recharts-layer", r);
- return /*#__PURE__*/ B.createElement("g", vz({ className: a }, hz(i), { ref: t }), n);
-}), bz = /*#__PURE__*/ (0, B.createContext)(null), fxe = () => (0, B.useContext)(bz);
+var vz = /*#__PURE__*/ B.forwardRef((e, t) => {
+ var { children: n, className: r } = e, i = mxe(e, pxe), a = _h("recharts-layer", r);
+ return /*#__PURE__*/ B.createElement("g", _z({ className: a }, mz(i), { ref: t }), n);
+}), yz = /*#__PURE__*/ (0, B.createContext)(null), gxe = () => (0, B.useContext)(yz);
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/constant.js
-function xz(e) {
+function bz(e) {
return function() {
return e;
};
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/math.js
-var Sz = Math.cos, Cz = Math.sin, wz = Math.sqrt, Tz = Math.PI;
-Tz / 2;
-var Ez = 2 * Tz, Dz = Math.PI, Oz = 2 * Dz, kz = 1e-6, pxe = Oz - kz;
-function Az(e) {
+var xz = Math.cos, Sz = Math.sin, Cz = Math.sqrt, wz = Math.PI;
+wz / 2;
+var Tz = 2 * wz, Ez = Math.PI, Dz = 2 * Ez, Oz = 1e-6, _xe = Dz - Oz;
+function kz(e) {
this._ += e[0];
for (let t = 1, n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
}
-function mxe(e) {
+function vxe(e) {
let t = Math.floor(e);
if (!(t >= 0)) throw Error(`invalid digits: ${e}`);
- if (t > 15) return Az;
+ if (t > 15) return kz;
let n = 10 ** t;
return function(e) {
this._ += e[0];
for (let t = 1, r = e.length; t < r; ++t) this._ += Math.round(arguments[t] * n) / n + e[t];
};
}
-var jz = class {
+var Az = class {
constructor(e) {
- this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? Az : mxe(e);
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? kz : vxe(e);
}
moveTo(e, t) {
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
@@ -53474,18 +53570,18 @@ var jz = class {
if (e = +e, t = +t, n = +n, r = +r, i = +i, i < 0) throw Error(`negative radius: ${i}`);
let a = this._x1, o = this._y1, s = n - e, c = r - t, l = a - e, u = o - t, d = l * l + u * u;
if (this._x1 === null) this._append`M${this._x1 = e},${this._y1 = t}`;
- else if (d > kz) {
- if (!(Math.abs(u * s - c * l) > kz) || !i) this._append`L${this._x1 = e},${this._y1 = t}`;
+ else if (d > Oz) {
+ if (!(Math.abs(u * s - c * l) > Oz) || !i) this._append`L${this._x1 = e},${this._y1 = t}`;
else {
- let f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((Dz - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
- Math.abs(y - 1) > kz && this._append`L${e + y * l},${t + y * u}`, this._append`A${i},${i},0,0,${+(u * f > l * p)},${this._x1 = e + b * s},${this._y1 = t + b * c}`;
+ let f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((Ez - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
+ Math.abs(y - 1) > Oz && this._append`L${e + y * l},${t + y * u}`, this._append`A${i},${i},0,0,${+(u * f > l * p)},${this._x1 = e + b * s},${this._y1 = t + b * c}`;
}
}
}
arc(e, t, n, r, i, a) {
if (e = +e, t = +t, n = +n, a = !!a, n < 0) throw Error(`negative radius: ${n}`);
let o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
- this._x1 === null ? this._append`M${c},${l}` : (Math.abs(this._x1 - c) > kz || Math.abs(this._y1 - l) > kz) && this._append`L${c},${l}`, n && (d < 0 && (d = d % Oz + Oz), d > pxe ? this._append`A${n},${n},0,1,${u},${e - o},${t - s}A${n},${n},0,1,${u},${this._x1 = c},${this._y1 = l}` : d > kz && this._append`A${n},${n},0,${+(d >= Dz)},${u},${this._x1 = e + n * Math.cos(i)},${this._y1 = t + n * Math.sin(i)}`);
+ this._x1 === null ? this._append`M${c},${l}` : (Math.abs(this._x1 - c) > Oz || Math.abs(this._y1 - l) > Oz) && this._append`L${c},${l}`, n && (d < 0 && (d = d % Dz + Dz), d > _xe ? this._append`A${n},${n},0,1,${u},${e - o},${t - s}A${n},${n},0,1,${u},${this._x1 = c},${this._y1 = l}` : d > Oz && this._append`A${n},${n},0,${+(d >= Ez)},${u},${this._x1 = e + n * Math.cos(i)},${this._y1 = t + n * Math.sin(i)}`);
}
rect(e, t, n, r) {
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${n = +n}v${+r}h${-n}Z`;
@@ -53494,10 +53590,10 @@ var jz = class {
return this._;
}
};
-jz.prototype;
+Az.prototype;
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/path.js
-function Mz(e) {
+function jz(e) {
let t = 3;
return e.digits = function(n) {
if (!arguments.length) return t;
@@ -53508,18 +53604,18 @@ function Mz(e) {
t = e;
}
return e;
- }, () => new jz(t);
+ }, () => new Az(t);
}
Array.prototype.slice;
-function Nz(e) {
+function Mz(e) {
return typeof e == "object" && "length" in e ? e : Array.from(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/linear.js
-function Pz(e) {
+function Nz(e) {
this._context = e;
}
-Pz.prototype = {
+Nz.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -53542,33 +53638,33 @@ Pz.prototype = {
}
}
};
-function Fz(e) {
- return new Pz(e);
+function Pz(e) {
+ return new Nz(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/point.js
-function Iz(e) {
+function Fz(e) {
return e[0];
}
-function Lz(e) {
+function Iz(e) {
return e[1];
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/line.js
-function Rz(e, t) {
- var n = xz(!0), r = null, i = Fz, a = null, o = Mz(s);
- e = typeof e == "function" ? e : e === void 0 ? Iz : xz(e), t = typeof t == "function" ? t : t === void 0 ? Lz : xz(t);
+function Lz(e, t) {
+ var n = bz(!0), r = null, i = Pz, a = null, o = jz(s);
+ e = typeof e == "function" ? e : e === void 0 ? Fz : bz(e), t = typeof t == "function" ? t : t === void 0 ? Iz : bz(t);
function s(s) {
- var c, l = (s = Nz(s)).length, u, d = !1, f;
+ var c, l = (s = Mz(s)).length, u, d = !1, f;
for (r ?? (a = i(f = o())), c = 0; c <= l; ++c) !(c < l && n(u = s[c], c, s)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()), d && a.point(+e(u, c, s), +t(u, c, s));
if (f) return a = null, f + "" || null;
}
return s.x = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : xz(+t), s) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : bz(+t), s) : e;
}, s.y = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : xz(+e), s) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : bz(+e), s) : t;
}, s.defined = function(e) {
- return arguments.length ? (n = typeof e == "function" ? e : xz(!!e), s) : n;
+ return arguments.length ? (n = typeof e == "function" ? e : bz(!!e), s) : n;
}, s.curve = function(e) {
return arguments.length ? (i = e, r != null && (a = i(r)), s) : i;
}, s.context = function(e) {
@@ -53577,11 +53673,11 @@ function Rz(e, t) {
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/area.js
-function zz(e, t, n) {
- var r = null, i = xz(!0), a = null, o = Fz, s = null, c = Mz(l);
- e = typeof e == "function" ? e : e === void 0 ? Iz : xz(+e), t = typeof t == "function" ? t : xz(t === void 0 ? 0 : +t), n = typeof n == "function" ? n : n === void 0 ? Lz : xz(+n);
+function Rz(e, t, n) {
+ var r = null, i = bz(!0), a = null, o = Pz, s = null, c = jz(l);
+ e = typeof e == "function" ? e : e === void 0 ? Fz : bz(+e), t = typeof t == "function" ? t : bz(t === void 0 ? 0 : +t), n = typeof n == "function" ? n : n === void 0 ? Iz : bz(+n);
function l(l) {
- var u, d, f, p = (l = Nz(l)).length, m, h = !1, g, _ = Array(p), v = Array(p);
+ var u, d, f, p = (l = Mz(l)).length, m, h = !1, g, _ = Array(p), v = Array(p);
for (a ?? (s = o(g = c())), u = 0; u <= p; ++u) {
if (!(u < p && i(m = l[u], u, l)) === h) {
if (h = !h) d = u, s.areaStart(), s.lineStart();
@@ -53595,20 +53691,20 @@ function zz(e, t, n) {
if (g) return s = null, g + "" || null;
}
function u() {
- return Rz().defined(i).curve(o).context(a);
+ return Lz().defined(i).curve(o).context(a);
}
return l.x = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : xz(+t), r = null, l) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : bz(+t), r = null, l) : e;
}, l.x0 = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : xz(+t), l) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : bz(+t), l) : e;
}, l.x1 = function(e) {
- return arguments.length ? (r = e == null ? null : typeof e == "function" ? e : xz(+e), l) : r;
+ return arguments.length ? (r = e == null ? null : typeof e == "function" ? e : bz(+e), l) : r;
}, l.y = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : xz(+e), n = null, l) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : bz(+e), n = null, l) : t;
}, l.y0 = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : xz(+e), l) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : bz(+e), l) : t;
}, l.y1 = function(e) {
- return arguments.length ? (n = e == null ? null : typeof e == "function" ? e : xz(+e), l) : n;
+ return arguments.length ? (n = e == null ? null : typeof e == "function" ? e : bz(+e), l) : n;
}, l.lineX0 = l.lineY0 = function() {
return u().x(e).y(t);
}, l.lineY1 = function() {
@@ -53616,7 +53712,7 @@ function zz(e, t, n) {
}, l.lineX1 = function() {
return u().x(r).y(t);
}, l.defined = function(e) {
- return arguments.length ? (i = typeof e == "function" ? e : xz(!!e), l) : i;
+ return arguments.length ? (i = typeof e == "function" ? e : bz(!!e), l) : i;
}, l.curve = function(e) {
return arguments.length ? (o = e, a != null && (s = o(a)), l) : o;
}, l.context = function(e) {
@@ -53625,7 +53721,7 @@ function zz(e, t, n) {
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/bump.js
-var Bz = class {
+var zz = class {
constructor(e, t) {
this._context = e, this._x = t;
}
@@ -53652,70 +53748,70 @@ var Bz = class {
this._x0 = e, this._y0 = t;
}
};
-function hxe(e) {
- return new Bz(e, !0);
+function yxe(e) {
+ return new zz(e, !0);
}
-function gxe(e) {
- return new Bz(e, !1);
+function bxe(e) {
+ return new zz(e, !1);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/symbol/circle.js
-var Vz = { draw(e, t) {
- let n = wz(t / Tz);
- e.moveTo(n, 0), e.arc(0, 0, n, 0, Ez);
-} }, _xe = { draw(e, t) {
- let n = wz(t / 5) / 2;
+var Bz = { draw(e, t) {
+ let n = Cz(t / wz);
+ e.moveTo(n, 0), e.arc(0, 0, n, 0, Tz);
+} }, xxe = { draw(e, t) {
+ let n = Cz(t / 5) / 2;
e.moveTo(-3 * n, -n), e.lineTo(-n, -n), e.lineTo(-n, -3 * n), e.lineTo(n, -3 * n), e.lineTo(n, -n), e.lineTo(3 * n, -n), e.lineTo(3 * n, n), e.lineTo(n, n), e.lineTo(n, 3 * n), e.lineTo(-n, 3 * n), e.lineTo(-n, n), e.lineTo(-3 * n, n), e.closePath();
-} }, Hz = wz(1 / 3), vxe = Hz * 2, yxe = { draw(e, t) {
- let n = wz(t / vxe), r = n * Hz;
+} }, Vz = Cz(1 / 3), Sxe = Vz * 2, Cxe = { draw(e, t) {
+ let n = Cz(t / Sxe), r = n * Vz;
e.moveTo(0, -n), e.lineTo(r, 0), e.lineTo(0, n), e.lineTo(-r, 0), e.closePath();
-} }, bxe = { draw(e, t) {
- let n = wz(t), r = -n / 2;
+} }, wxe = { draw(e, t) {
+ let n = Cz(t), r = -n / 2;
e.rect(r, r, n, n);
-} }, xxe = .8908130915292852, Uz = Cz(Tz / 10) / Cz(7 * Tz / 10), Sxe = Cz(Ez / 10) * Uz, Cxe = -Sz(Ez / 10) * Uz, wxe = { draw(e, t) {
- let n = wz(t * xxe), r = Sxe * n, i = Cxe * n;
+} }, Txe = .8908130915292852, Hz = Sz(wz / 10) / Sz(7 * wz / 10), Exe = Sz(Tz / 10) * Hz, Dxe = -xz(Tz / 10) * Hz, Oxe = { draw(e, t) {
+ let n = Cz(t * Txe), r = Exe * n, i = Dxe * n;
e.moveTo(0, -n), e.lineTo(r, i);
for (let t = 1; t < 5; ++t) {
- let a = Ez * t / 5, o = Sz(a), s = Cz(a);
+ let a = Tz * t / 5, o = xz(a), s = Sz(a);
e.lineTo(s * n, -o * n), e.lineTo(o * r - s * i, s * r + o * i);
}
e.closePath();
-} }, Wz = wz(3), Txe = { draw(e, t) {
- let n = -wz(t / (Wz * 3));
- e.moveTo(0, n * 2), e.lineTo(-Wz * n, -n), e.lineTo(Wz * n, -n), e.closePath();
-} }, Gz = -.5, Kz = wz(3) / 2, qz = 1 / wz(12), Exe = (qz / 2 + 1) * 3, Dxe = { draw(e, t) {
- let n = wz(t / Exe), r = n / 2, i = n * qz, a = r, o = n * qz + n, s = -a, c = o;
- e.moveTo(r, i), e.lineTo(a, o), e.lineTo(s, c), e.lineTo(Gz * r - Kz * i, Kz * r + Gz * i), e.lineTo(Gz * a - Kz * o, Kz * a + Gz * o), e.lineTo(Gz * s - Kz * c, Kz * s + Gz * c), e.lineTo(Gz * r + Kz * i, Gz * i - Kz * r), e.lineTo(Gz * a + Kz * o, Gz * o - Kz * a), e.lineTo(Gz * s + Kz * c, Gz * c - Kz * s), e.closePath();
+} }, Uz = Cz(3), kxe = { draw(e, t) {
+ let n = -Cz(t / (Uz * 3));
+ e.moveTo(0, n * 2), e.lineTo(-Uz * n, -n), e.lineTo(Uz * n, -n), e.closePath();
+} }, Wz = -.5, Gz = Cz(3) / 2, Kz = 1 / Cz(12), Axe = (Kz / 2 + 1) * 3, jxe = { draw(e, t) {
+ let n = Cz(t / Axe), r = n / 2, i = n * Kz, a = r, o = n * Kz + n, s = -a, c = o;
+ e.moveTo(r, i), e.lineTo(a, o), e.lineTo(s, c), e.lineTo(Wz * r - Gz * i, Gz * r + Wz * i), e.lineTo(Wz * a - Gz * o, Gz * a + Wz * o), e.lineTo(Wz * s - Gz * c, Gz * s + Wz * c), e.lineTo(Wz * r + Gz * i, Wz * i - Gz * r), e.lineTo(Wz * a + Gz * o, Wz * o - Gz * a), e.lineTo(Wz * s + Gz * c, Wz * c - Gz * s), e.closePath();
} };
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/symbol.js
-function Oxe(e, t) {
- let n = null, r = Mz(i);
- e = typeof e == "function" ? e : xz(e || Vz), t = typeof t == "function" ? t : xz(t === void 0 ? 64 : +t);
+function Mxe(e, t) {
+ let n = null, r = jz(i);
+ e = typeof e == "function" ? e : bz(e || Bz), t = typeof t == "function" ? t : bz(t === void 0 ? 64 : +t);
function i() {
let i;
if (n ||= i = r(), e.apply(this, arguments).draw(n, +t.apply(this, arguments)), i) return n = null, i + "" || null;
}
return i.type = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : xz(t), i) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : bz(t), i) : e;
}, i.size = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : xz(+e), i) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : bz(+e), i) : t;
}, i.context = function(e) {
return arguments.length ? (n = e ?? null, i) : n;
}, i;
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/noop.js
-function Jz() {}
+function qz() {}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/basis.js
-function Yz(e, t, n) {
+function Jz(e, t, n) {
e._context.bezierCurveTo((2 * e._x0 + e._x1) / 3, (2 * e._y0 + e._y1) / 3, (e._x0 + 2 * e._x1) / 3, (e._y0 + 2 * e._y1) / 3, (e._x0 + 4 * e._x1 + t) / 6, (e._y0 + 4 * e._y1 + n) / 6);
}
-function Xz(e) {
+function Yz(e) {
this._context = e;
}
-Xz.prototype = {
+Yz.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -53727,7 +53823,7 @@ Xz.prototype = {
},
lineEnd: function() {
switch (this._point) {
- case 3: Yz(this, this._x1, this._y1);
+ case 3: Jz(this, this._x1, this._y1);
case 2: this._context.lineTo(this._x1, this._y1);
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
@@ -53741,22 +53837,22 @@ Xz.prototype = {
this._point = 2;
break;
case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
- default: Yz(this, e, t);
+ default: Jz(this, e, t);
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
-function kxe(e) {
- return new Xz(e);
+function Nxe(e) {
+ return new Yz(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/basisClosed.js
-function Zz(e) {
+function Xz(e) {
this._context = e;
}
-Zz.prototype = {
- areaStart: Jz,
- areaEnd: Jz,
+Xz.prototype = {
+ areaStart: qz,
+ areaEnd: qz,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
},
@@ -53782,20 +53878,20 @@ Zz.prototype = {
case 2:
this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
break;
- default: Yz(this, e, t);
+ default: Jz(this, e, t);
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
-function Axe(e) {
- return new Zz(e);
+function Pxe(e) {
+ return new Xz(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/basisOpen.js
-function Qz(e) {
+function Zz(e) {
this._context = e;
}
-Qz.prototype = {
+Zz.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -53822,22 +53918,22 @@ Qz.prototype = {
this._line ? this._context.lineTo(n, r) : this._context.moveTo(n, r);
break;
case 3: this._point = 4;
- default: Yz(this, e, t);
+ default: Jz(this, e, t);
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
-function jxe(e) {
- return new Qz(e);
+function Fxe(e) {
+ return new Zz(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/linearClosed.js
-function $z(e) {
+function Qz(e) {
this._context = e;
}
-$z.prototype = {
- areaStart: Jz,
- areaEnd: Jz,
+Qz.prototype = {
+ areaStart: qz,
+ areaEnd: qz,
lineStart: function() {
this._point = 0;
},
@@ -53848,30 +53944,30 @@ $z.prototype = {
e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
}
};
-function Mxe(e) {
- return new $z(e);
+function Ixe(e) {
+ return new Qz(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/monotone.js
-function eB(e) {
+function $z(e) {
return e < 0 ? -1 : 1;
}
-function tB(e, t, n) {
+function eB(e, t, n) {
var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
- return (eB(a) + eB(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
+ return ($z(a) + $z(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
}
-function nB(e, t) {
+function tB(e, t) {
var n = e._x1 - e._x0;
return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
}
-function rB(e, t, n) {
+function nB(e, t, n) {
var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
}
-function iB(e) {
+function rB(e) {
this._context = e;
}
-iB.prototype = {
+rB.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -53886,7 +53982,7 @@ iB.prototype = {
case 2:
this._context.lineTo(this._x1, this._y1);
break;
- case 3: rB(this, this._t0, nB(this, this._t0));
+ case 3: nB(this, this._t0, tB(this, this._t0));
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
@@ -53901,24 +53997,24 @@ iB.prototype = {
this._point = 2;
break;
case 2:
- this._point = 3, rB(this, nB(this, n = tB(this, e, t)), n);
+ this._point = 3, nB(this, tB(this, n = eB(this, e, t)), n);
break;
- default: rB(this, this._t0, n = tB(this, e, t));
+ default: nB(this, this._t0, n = eB(this, e, t));
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
}
}
};
-function aB(e) {
- this._context = new oB(e);
+function iB(e) {
+ this._context = new aB(e);
}
-(aB.prototype = Object.create(iB.prototype)).point = function(e, t) {
- iB.prototype.point.call(this, t, e);
+(iB.prototype = Object.create(rB.prototype)).point = function(e, t) {
+ rB.prototype.point.call(this, t, e);
};
-function oB(e) {
+function aB(e) {
this._context = e;
}
-oB.prototype = {
+aB.prototype = {
moveTo: function(e, t) {
this._context.moveTo(t, e);
},
@@ -53932,18 +54028,18 @@ oB.prototype = {
this._context.bezierCurveTo(t, e, r, n, a, i);
}
};
-function Nxe(e) {
- return new iB(e);
+function Lxe(e) {
+ return new rB(e);
}
-function Pxe(e) {
- return new aB(e);
+function Rxe(e) {
+ return new iB(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/natural.js
-function sB(e) {
+function oB(e) {
this._context = e;
}
-sB.prototype = {
+oB.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -53957,7 +54053,7 @@ sB.prototype = {
var e = this._x, t = this._y, n = e.length;
if (n) {
if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), n === 2) this._context.lineTo(e[1], t[1]);
- else for (var r = cB(e), i = cB(t), a = 0, o = 1; o < n; ++a, ++o) this._context.bezierCurveTo(r[0][a], i[0][a], r[1][a], i[1][a], e[o], t[o]);
+ else for (var r = sB(e), i = sB(t), a = 0, o = 1; o < n; ++a, ++o) this._context.bezierCurveTo(r[0][a], i[0][a], r[1][a], i[1][a], e[o], t[o]);
}
(this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
},
@@ -53965,7 +54061,7 @@ sB.prototype = {
this._x.push(+e), this._y.push(+t);
}
};
-function cB(e) {
+function sB(e) {
var t, n = e.length - 1, r, i = Array(n), a = Array(n), o = Array(n);
for (i[0] = 0, a[0] = 2, o[0] = e[0] + 2 * e[1], t = 1; t < n - 1; ++t) i[t] = 1, a[t] = 4, o[t] = 4 * e[t] + 2 * e[t + 1];
for (i[n - 1] = 2, a[n - 1] = 7, o[n - 1] = 8 * e[n - 1] + e[n], t = 1; t < n; ++t) r = i[t] / a[t - 1], a[t] -= r, o[t] -= r * o[t - 1];
@@ -53973,15 +54069,15 @@ function cB(e) {
for (a[n - 1] = (e[n] + i[n - 1]) / 2, t = 0; t < n - 1; ++t) a[t] = 2 * e[t + 1] - i[t + 1];
return [i, a];
}
-function Fxe(e) {
- return new sB(e);
+function zxe(e) {
+ return new oB(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/step.js
-function lB(e, t) {
+function cB(e, t) {
this._context = e, this._t = t;
}
-lB.prototype = {
+cB.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -54009,78 +54105,78 @@ lB.prototype = {
this._x = e, this._y = t;
}
};
-function Ixe(e) {
- return new lB(e, .5);
+function Bxe(e) {
+ return new cB(e, .5);
}
-function Lxe(e) {
- return new lB(e, 0);
+function Vxe(e) {
+ return new cB(e, 0);
}
-function Rxe(e) {
- return new lB(e, 1);
+function Hxe(e) {
+ return new cB(e, 1);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/none.js
-function uB(e, t) {
+function lB(e, t) {
if ((o = e.length) > 1) for (var n = 1, r, i, a = e[t[0]], o, s = a.length; n < o; ++n) for (i = a, a = e[t[n]], r = 0; r < s; ++r) a[r][1] += a[r][0] = isNaN(i[r][1]) ? i[r][0] : i[r][1];
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/order/none.js
-function dB(e) {
+function uB(e) {
for (var t = e.length, n = Array(t); --t >= 0;) n[t] = t;
return n;
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/stack.js
-function zxe(e, t) {
+function Uxe(e, t) {
return e[t];
}
-function Bxe(e) {
+function Wxe(e) {
let t = [];
return t.key = e, t;
}
-function Vxe() {
- var e = xz([]), t = dB, n = uB, r = zxe;
+function Gxe() {
+ var e = bz([]), t = uB, n = lB, r = Uxe;
function i(i) {
- var a = Array.from(e.apply(this, arguments), Bxe), o, s = a.length, c = -1, l;
+ var a = Array.from(e.apply(this, arguments), Wxe), o, s = a.length, c = -1, l;
for (let e of i) for (o = 0, ++c; o < s; ++o) (a[o][c] = [0, +r(e, a[o].key, c, i)]).data = e;
- for (o = 0, l = Nz(t(a)); o < s; ++o) a[l[o]].index = o;
+ for (o = 0, l = Mz(t(a)); o < s; ++o) a[l[o]].index = o;
return n(a, l), a;
}
return i.keys = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : xz(Array.from(t)), i) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : bz(Array.from(t)), i) : e;
}, i.value = function(e) {
- return arguments.length ? (r = typeof e == "function" ? e : xz(+e), i) : r;
+ return arguments.length ? (r = typeof e == "function" ? e : bz(+e), i) : r;
}, i.order = function(e) {
- return arguments.length ? (t = e == null ? dB : typeof e == "function" ? e : xz(Array.from(e)), i) : t;
+ return arguments.length ? (t = e == null ? uB : typeof e == "function" ? e : bz(Array.from(e)), i) : t;
}, i.offset = function(e) {
- return arguments.length ? (n = e ?? uB, i) : n;
+ return arguments.length ? (n = e ?? lB, i) : n;
}, i;
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/expand.js
-function Hxe(e, t) {
+function Kxe(e, t) {
if ((r = e.length) > 0) {
for (var n, r, i = 0, a = e[0].length, o; i < a; ++i) {
for (o = n = 0; n < r; ++n) o += e[n][i][1] || 0;
if (o) for (n = 0; n < r; ++n) e[n][i][1] /= o;
}
- uB(e, t);
+ lB(e, t);
}
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/silhouette.js
-function Uxe(e, t) {
+function qxe(e, t) {
if ((i = e.length) > 0) {
for (var n = 0, r = e[t[0]], i, a = r.length; n < a; ++n) {
for (var o = 0, s = 0; o < i; ++o) s += e[o][n][1] || 0;
r[n][1] += r[n][0] = -s / 2;
}
- uB(e, t);
+ lB(e, t);
}
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/wiggle.js
-function Wxe(e, t) {
+function Jxe(e, t) {
if (!(!((o = e.length) > 0) || !((a = (i = e[t[0]]).length) > 0))) {
for (var n = 0, r = 1, i, a, o; r < a; ++r) {
for (var s = 0, c = 0, l = 0; s < o; ++s) {
@@ -54092,53 +54188,53 @@ function Wxe(e, t) {
}
i[r - 1][1] += i[r - 1][0] = n, c && (n -= l / c);
}
- i[r - 1][1] += i[r - 1][0] = n, uB(e, t);
+ i[r - 1][1] += i[r - 1][0] = n, lB(e, t);
}
}
//#endregion
//#region node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
-function fB(e) {
+function dB(e) {
return e === "__proto__";
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
-var Gxe = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
-function pB(e) {
+var Yxe = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
+function fB(e) {
switch (typeof e) {
case "number":
case "symbol": return !1;
- case "string": return e === "" || e.startsWith(".") || e.endsWith(".") ? !1 : Gxe.test(e);
+ case "string": return e === "" || e.startsWith(".") || e.endsWith(".") ? !1 : Yxe.test(e);
default: return !1;
}
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
-function mB(e) {
+function pB(e) {
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
-function hB(e) {
+function mB(e) {
return typeof e == "symbol" || e instanceof Symbol;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toString.mjs
-function Kxe(e) {
- return e == null ? "" : gB(e);
+function Xxe(e) {
+ return e == null ? "" : hB(e);
}
-function gB(e) {
+function hB(e) {
if (typeof e == "string") return e;
- if (Array.isArray(e)) return e.map(gB).join(",");
- if (hB(e)) return e.toString();
+ if (Array.isArray(e)) return e.map(hB).join(",");
+ if (mB(e)) return e.toString();
let t = e + "";
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toPath.mjs
-function _B(e) {
- if (Array.isArray(e)) return e.map(mB);
+function gB(e) {
+ if (Array.isArray(e)) return e.map(pB);
if (typeof e == "symbol") return [e];
- e = Kxe(e);
+ e = Xxe(e);
let t = [], n = e.length;
if (n === 0) return t;
let r = 0, i = "", a = "", o = !1, s = !1, c = /^-?\d+(?:\.\d+)?$/;
@@ -54166,100 +54262,100 @@ function _B(e) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/get.mjs
-function vB(e, t, n) {
+function _B(e, t, n) {
if (e == null) return n;
switch (typeof t) {
case "string": {
- if (fB(t)) return n;
+ if (dB(t)) return n;
let r = e[t];
- return r === void 0 ? pB(t) && !Object.hasOwn(e, t) ? vB(e, _B(t), n) : n : r;
+ return r === void 0 ? fB(t) && !Object.hasOwn(e, t) ? _B(e, gB(t), n) : n : r;
}
case "number":
case "symbol": {
- typeof t == "number" && (t = mB(t));
+ typeof t == "number" && (t = pB(t));
let r = e[t];
return r === void 0 ? n : r;
}
default: {
- if (Array.isArray(t)) return qxe(e, t, n);
- if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), fB(t)) return n;
+ if (Array.isArray(t)) return Zxe(e, t, n);
+ if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), dB(t)) return n;
let r = e[t];
return r === void 0 ? n : r;
}
}
}
-function qxe(e, t, n) {
+function Zxe(e, t, n) {
if (t.length === 0) return n;
let r = e;
for (let e = 0; e < t.length; e++) {
- if (r == null || fB(t[e])) return n;
+ if (r == null || dB(t[e])) return n;
r = r[t[e]];
}
return r === void 0 ? n : r;
}
//#endregion
//#region node_modules/recharts/es6/util/round.js
-var Jxe = 4;
-function yB(e) {
- var t = 10 ** (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Jxe), n = Math.round(e * t) / t;
+var Qxe = 4;
+function vB(e) {
+ var t = 10 ** (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qxe), n = Math.round(e * t) / t;
return Object.is(n, -0) ? 0 : n;
}
-function bB(e) {
+function yB(e) {
var t = [...arguments].slice(1);
return e.reduce((e, n, r) => {
var i = t[r - 1];
- return typeof i == "string" ? e + i + n : i === void 0 ? e + n : e + yB(i) + n;
+ return typeof i == "string" ? e + i + n : i === void 0 ? e + n : e + vB(i) + n;
}, "");
}
//#endregion
//#region node_modules/recharts/es6/util/DataUtils.js
-var xB = (e) => e === 0 ? 0 : e > 0 ? 1 : -1, SB = (e) => typeof e == "number" && e != +e, CB = (e) => typeof e == "string" && e.indexOf("%") === e.length - 1, Z = (e) => (typeof e == "number" || e instanceof Number) && !SB(e), wB = (e) => Z(e) || typeof e == "string", Yxe = 0, TB = (e) => {
- var t = ++Yxe;
+var bB = (e) => e === 0 ? 0 : e > 0 ? 1 : -1, xB = (e) => typeof e == "number" && e != +e, SB = (e) => typeof e == "string" && e.indexOf("%") === e.length - 1, Z = (e) => (typeof e == "number" || e instanceof Number) && !xB(e), CB = (e) => Z(e) || typeof e == "string", $xe = 0, wB = (e) => {
+ var t = ++$xe;
return `${e || ""}${t}`;
-}, EB = function(e, t) {
+}, TB = function(e, t) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
if (!Z(e) && typeof e != "string") return n;
var i;
- if (CB(e)) {
+ if (SB(e)) {
if (t == null) return n;
var a = e.indexOf("%");
i = t * parseFloat(e.slice(0, a)) / 100;
} else i = +e;
- return SB(i) && (i = n), r && t != null && i > t && (i = t), i;
-}, DB = (e) => {
+ return xB(i) && (i = n), r && t != null && i > t && (i = t), i;
+}, EB = (e) => {
if (!Array.isArray(e)) return !1;
for (var t = e.length, n = {}, r = 0; r < t; r++) if (!n[String(e[r])]) n[String(e[r])] = !0;
else return !0;
return !1;
};
-function OB(e, t, n) {
- return Z(e) && Z(t) ? yB(e + n * (t - e)) : t;
+function DB(e, t, n) {
+ return Z(e) && Z(t) ? vB(e + n * (t - e)) : t;
}
-function kB(e, t, n) {
- if (!(!e || !e.length)) return e.find((e) => e && (typeof t == "function" ? t(e) : vB(e, t)) === n);
+function OB(e, t, n) {
+ if (!(!e || !e.length)) return e.find((e) => e && (typeof t == "function" ? t(e) : _B(e, t)) === n);
}
-var AB = (e) => e == null, jB = (e) => AB(e) ? e : `${e.charAt(0).toUpperCase()}${e.slice(1)}`;
-function MB(e) {
+var kB = (e) => e == null, AB = (e) => kB(e) ? e : `${e.charAt(0).toUpperCase()}${e.slice(1)}`;
+function jB(e) {
return e != null;
}
-function NB() {}
+function MB() {}
//#endregion
//#region node_modules/recharts/es6/shape/Symbols.js
-var Xxe = [
+var eSe = [
"type",
"size",
"sizeType"
];
-function PB() {
- return PB = Object.assign ? Object.assign.bind() : function(e) {
+function NB() {
+ return NB = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, PB.apply(null, arguments);
+ }, NB.apply(null, arguments);
}
-function FB(e, t) {
+function PB(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -54269,30 +54365,30 @@ function FB(e, t) {
}
return n;
}
-function IB(e) {
+function FB(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? FB(Object(n), !0).forEach(function(t) {
- Zxe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : FB(Object(n)).forEach(function(t) {
+ t % 2 ? PB(Object(n), !0).forEach(function(t) {
+ tSe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : PB(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Zxe(e, t, n) {
- return (t = Qxe(t)) in e ? Object.defineProperty(e, t, {
+function tSe(e, t, n) {
+ return (t = nSe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Qxe(e) {
- var t = $xe(e, "string");
+function nSe(e) {
+ var t = rSe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function $xe(e, t) {
+function rSe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -54302,16 +54398,16 @@ function $xe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function eSe(e, t) {
+function iSe(e, t) {
if (e == null) return {};
- var n, r, i = tSe(e, t);
+ var n, r, i = aSe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function tSe(e, t) {
+function aSe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -54320,68 +54416,68 @@ function tSe(e, t) {
}
return n;
}
-var LB = {
- symbolCircle: Vz,
- symbolCross: _xe,
- symbolDiamond: yxe,
- symbolSquare: bxe,
- symbolStar: wxe,
- symbolTriangle: Txe,
- symbolWye: Dxe
-}, nSe = Math.PI / 180, rSe = (e) => LB[`symbol${jB(e)}`] || Vz, iSe = (e, t, n) => {
+var IB = {
+ symbolCircle: Bz,
+ symbolCross: xxe,
+ symbolDiamond: Cxe,
+ symbolSquare: wxe,
+ symbolStar: Oxe,
+ symbolTriangle: kxe,
+ symbolWye: jxe
+}, oSe = Math.PI / 180, sSe = (e) => IB[`symbol${AB(e)}`] || Bz, cSe = (e, t, n) => {
if (t === "area") return e;
switch (n) {
case "cross": return 5 * e * e / 9;
case "diamond": return .5 * e * e / Math.sqrt(3);
case "square": return e * e;
case "star":
- var r = 18 * nSe;
+ var r = 18 * oSe;
return 1.25 * e * e * (Math.tan(r) - Math.tan(r * 2) * Math.tan(r) ** 2);
case "triangle": return Math.sqrt(3) * e * e / 4;
case "wye": return (21 - 10 * Math.sqrt(3)) * e * e / 8;
default: return Math.PI * e * e / 4;
}
-}, aSe = (e, t) => {
- LB[`symbol${jB(e)}`] = t;
-}, RB = (e) => {
- var { type: t = "circle", size: n = 64, sizeType: r = "area" } = e, i = IB(IB({}, eSe(e, Xxe)), {}, {
+}, lSe = (e, t) => {
+ IB[`symbol${AB(e)}`] = t;
+}, LB = (e) => {
+ var { type: t = "circle", size: n = 64, sizeType: r = "area" } = e, i = FB(FB({}, iSe(e, eSe)), {}, {
type: t,
size: n,
sizeType: r
}), a = "circle";
typeof t == "string" && (a = t);
var o = () => {
- var e = rSe(a), t = Oxe().type(e).size(iSe(n, r, a))();
+ var e = sSe(a), t = Mxe().type(e).size(cSe(n, r, a))();
if (t !== null) return t;
- }, { className: s, cx: c, cy: l } = i, u = hz(i);
- return Z(c) && Z(l) && Z(n) ? /*#__PURE__*/ B.createElement("path", PB({}, u, {
+ }, { className: s, cx: c, cy: l } = i, u = mz(i);
+ return Z(c) && Z(l) && Z(n) ? /*#__PURE__*/ B.createElement("path", NB({}, u, {
className: _h("recharts-symbols", s),
transform: `translate(${c}, ${l})`,
d: o()
})) : null;
};
-RB.registerSymbol = aSe;
+LB.registerSymbol = lSe;
//#endregion
//#region node_modules/recharts/es6/util/types.js
-var zB = (e) => "radius" in e && "startAngle" in e && "endAngle" in e, BB = (e, t) => {
+var RB = (e) => "radius" in e && "startAngle" in e && "endAngle" in e, zB = (e, t) => {
if (!e || typeof e == "function" || typeof e == "boolean") return null;
var n = e;
if (/*#__PURE__*/ (0, B.isValidElement)(e) && (n = e.props), typeof n != "object" && typeof n != "function") return null;
var r = {};
return Object.keys(n).forEach((e) => {
- uz(e) && typeof n[e] == "function" && (r[e] = t || ((t) => n[e](n, t)));
+ lz(e) && typeof n[e] == "function" && (r[e] = t || ((t) => n[e](n, t)));
}), r;
-}, oSe = (e, t, n) => (r) => (e(t, n, r), null), VB = (e, t, n) => {
+}, uSe = (e, t, n) => (r) => (e(t, n, r), null), BB = (e, t, n) => {
if (e === null || typeof e != "object" && typeof e != "function") return null;
var r = null;
return Object.keys(e).forEach((i) => {
var a = e[i];
- uz(i) && typeof a == "function" && (r ||= {}, r[i] = oSe(a, t, n));
+ lz(i) && typeof a == "function" && (r ||= {}, r[i] = uSe(a, t, n));
}), r;
};
//#endregion
//#region node_modules/recharts/es6/util/resolveDefaultProps.js
-function HB(e, t) {
+function VB(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -54391,30 +54487,30 @@ function HB(e, t) {
}
return n;
}
-function sSe(e) {
+function dSe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? HB(Object(n), !0).forEach(function(t) {
- cSe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : HB(Object(n)).forEach(function(t) {
+ t % 2 ? VB(Object(n), !0).forEach(function(t) {
+ fSe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : VB(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function cSe(e, t, n) {
- return (t = lSe(t)) in e ? Object.defineProperty(e, t, {
+function fSe(e, t, n) {
+ return (t = pSe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function lSe(e) {
- var t = uSe(e, "string");
+function pSe(e) {
+ var t = mSe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function uSe(e, t) {
+function mSe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -54424,22 +54520,22 @@ function uSe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function UB(e, t) {
- var n = sSe({}, e), r = t;
+function HB(e, t) {
+ var n = dSe({}, e), r = t;
return Object.keys(t).reduce((e, t) => (e[t] === void 0 && r[t] !== void 0 && (e[t] = r[t]), e), n);
}
//#endregion
//#region node_modules/recharts/es6/component/DefaultLegendContent.js
-function WB() {
- return WB = Object.assign ? Object.assign.bind() : function(e) {
+function UB() {
+ return UB = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, WB.apply(null, arguments);
+ }, UB.apply(null, arguments);
}
-function GB(e, t) {
+function WB(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -54449,30 +54545,30 @@ function GB(e, t) {
}
return n;
}
-function KB(e) {
+function GB(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? GB(Object(n), !0).forEach(function(t) {
- dSe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : GB(Object(n)).forEach(function(t) {
+ t % 2 ? WB(Object(n), !0).forEach(function(t) {
+ hSe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : WB(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function dSe(e, t, n) {
- return (t = fSe(t)) in e ? Object.defineProperty(e, t, {
+function hSe(e, t, n) {
+ return (t = gSe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function fSe(e) {
- var t = pSe(e, "string");
+function gSe(e) {
+ var t = _Se(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function pSe(e, t) {
+function _Se(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -54482,7 +54578,7 @@ function pSe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var qB = 32, mSe = {
+var KB = 32, vSe = {
align: "center",
iconSize: 14,
inactiveColor: "#ccc",
@@ -54490,20 +54586,20 @@ var qB = 32, mSe = {
verticalAlign: "middle",
labelStyle: {}
};
-function hSe(e) {
+function ySe(e) {
if (typeof e == "object" && e && "strokeDasharray" in e) return String(e.strokeDasharray);
}
-function gSe(e) {
- var { data: t, iconType: n, inactiveColor: r } = e, i = qB / 2, a = qB / 6, o = qB / 3, s = t.inactive ? r : t.color, c = n ?? t.type;
+function bSe(e) {
+ var { data: t, iconType: n, inactiveColor: r } = e, i = KB / 2, a = KB / 6, o = KB / 3, s = t.inactive ? r : t.color, c = n ?? t.type;
if (c === "none") return null;
if (c === "plainline") return /*#__PURE__*/ B.createElement("line", {
strokeWidth: 4,
fill: "none",
stroke: s,
- strokeDasharray: hSe(t.payload),
+ strokeDasharray: ySe(t.payload),
x1: 0,
y1: i,
- x2: qB,
+ x2: KB,
y2: i,
className: "recharts-legend-icon"
});
@@ -54513,35 +54609,35 @@ function gSe(e) {
stroke: s,
d: `M0,${i}h${o}
A${a},${a},0,1,1,${2 * o},${i}
- H${qB}M${2 * o},${i}
+ H${KB}M${2 * o},${i}
A${a},${a},0,1,1,${o},${i}`,
className: "recharts-legend-icon"
});
if (c === "rect") return /*#__PURE__*/ B.createElement("path", {
stroke: "none",
fill: s,
- d: `M0,${qB / 8}h${qB}v${qB * 3 / 4}h${-qB}z`,
+ d: `M0,${KB / 8}h${KB}v${KB * 3 / 4}h${-KB}z`,
className: "recharts-legend-icon"
});
if (/*#__PURE__*/ B.isValidElement(t.legendIcon)) {
- var l = KB({}, t);
+ var l = GB({}, t);
return delete l.legendIcon, /*#__PURE__*/ B.cloneElement(t.legendIcon, l);
}
- return /*#__PURE__*/ B.createElement(RB, {
+ return /*#__PURE__*/ B.createElement(LB, {
fill: s,
cx: i,
cy: i,
- size: qB,
+ size: KB,
sizeType: "diameter",
type: c
});
}
-function _Se(e) {
+function xSe(e) {
var { payload: t, iconSize: n, layout: r, formatter: i, inactiveColor: a, iconType: o, labelStyle: s } = e, c = {
x: 0,
y: 0,
- width: qB,
- height: qB
+ width: KB,
+ height: KB
}, l = {
display: r === "horizontal" ? "inline-block" : "block",
marginRight: 10
@@ -54557,20 +54653,20 @@ function _Se(e) {
inactive: t.inactive
});
if (t.type === "none") return null;
- var p = typeof s == "object" ? KB({}, s) : {};
+ var p = typeof s == "object" ? GB({}, s) : {};
p.color = t.inactive ? a : p.color || t.color;
var m = d ? d(t.value, t, r) : t.value;
- return /*#__PURE__*/ B.createElement("li", WB({
+ return /*#__PURE__*/ B.createElement("li", UB({
className: f,
style: l,
key: `legend-item-${r}`
- }, VB(e, t, r)), /*#__PURE__*/ B.createElement(_z, {
+ }, BB(e, t, r)), /*#__PURE__*/ B.createElement(gz, {
width: n,
height: n,
viewBox: c,
style: u,
"aria-label": `${m} legend icon`
- }, /*#__PURE__*/ B.createElement(gSe, {
+ }, /*#__PURE__*/ B.createElement(bSe, {
data: t,
iconType: o,
inactiveColor: a
@@ -54580,8 +54676,8 @@ function _Se(e) {
}, m));
});
}
-var vSe = (e) => {
- var t = UB(e, mSe), { payload: n, layout: r, align: i } = t;
+var SSe = (e) => {
+ var t = HB(e, vSe), { payload: n, layout: r, align: i } = t;
if (!n || !n.length) return null;
var a = {
padding: 0,
@@ -54591,11 +54687,11 @@ var vSe = (e) => {
return /*#__PURE__*/ B.createElement("ul", {
className: "recharts-default-legend",
style: a
- }, /*#__PURE__*/ B.createElement(_Se, WB({}, t, { payload: n })));
+ }, /*#__PURE__*/ B.createElement(xSe, UB({}, t, { payload: n })));
};
//#endregion
//#region node_modules/es-toolkit/dist/array/uniqBy.mjs
-function ySe(e, t) {
+function CSe(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r = 0; r < e.length; r++) {
let i = e[r], a = t(i, r, e);
@@ -54605,72 +54701,72 @@ function ySe(e, t) {
}
//#endregion
//#region node_modules/es-toolkit/dist/function/ary.mjs
-function bSe(e, t) {
+function wSe(e, t) {
return function(...n) {
return e.apply(this, n.slice(0, t));
};
}
//#endregion
//#region node_modules/es-toolkit/dist/function/identity.mjs
-function JB(e) {
+function qB(e) {
return e;
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isLength.mjs
-function xSe(e) {
+function TSe(e) {
return Number.isSafeInteger(e) && e >= 0;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
-function YB(e) {
- return e != null && typeof e != "function" && xSe(e.length);
+function JB(e) {
+ return e != null && typeof e != "function" && TSe(e.length);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/property.mjs
-function SSe(e) {
+function ESe(e) {
return function(t) {
- return vB(t, e);
+ return _B(t, e);
};
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
-function XB(e) {
+function YB(e) {
return e == null || typeof e != "object" && typeof e != "function";
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
-function CSe(e) {
+function DSe(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
-function wSe(e) {
+function OSe(e) {
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
-function ZB(e) {
+function XB(e) {
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/tags.mjs
-var TSe = "[object RegExp]", QB = "[object String]", $B = "[object Number]", eV = "[object Boolean]", tV = "[object Arguments]", ESe = "[object Symbol]", DSe = "[object Date]", OSe = "[object Map]", kSe = "[object Set]", ASe = "[object Array]", jSe = "[object ArrayBuffer]", MSe = "[object Object]", NSe = "[object DataView]", PSe = "[object Uint8Array]", FSe = "[object Uint8ClampedArray]", ISe = "[object Uint16Array]", LSe = "[object Uint32Array]", RSe = "[object Int8Array]", zSe = "[object Int16Array]", BSe = "[object Int32Array]", VSe = "[object Float32Array]", HSe = "[object Float64Array]", nV = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
+var kSe = "[object RegExp]", ZB = "[object String]", QB = "[object Number]", $B = "[object Boolean]", eV = "[object Arguments]", ASe = "[object Symbol]", jSe = "[object Date]", MSe = "[object Map]", NSe = "[object Set]", PSe = "[object Array]", FSe = "[object ArrayBuffer]", ISe = "[object Object]", LSe = "[object DataView]", RSe = "[object Uint8Array]", zSe = "[object Uint8ClampedArray]", BSe = "[object Uint16Array]", VSe = "[object Uint32Array]", HSe = "[object Int8Array]", USe = "[object Int16Array]", WSe = "[object Int32Array]", GSe = "[object Float32Array]", KSe = "[object Float64Array]", tV = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
return this;
})();
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isBuffer.mjs
-function USe(e) {
- return nV.Buffer !== void 0 && nV.Buffer.isBuffer(e);
+function qSe(e) {
+ return tV.Buffer !== void 0 && tV.Buffer.isBuffer(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
-function WSe(e, t) {
+function nV(e, t) {
return rV(e, void 0, e, /* @__PURE__ */ new Map(), t);
}
function rV(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
let a = i?.(e, t, n, r);
if (a !== void 0) return a;
- if (XB(e)) return e;
+ if (YB(e)) return e;
if (r.has(e)) return r.get(e);
if (Array.isArray(e)) {
let t = Array(e.length);
@@ -54695,8 +54791,8 @@ function rV(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
for (let a of e) t.add(rV(a, void 0, n, r, i));
return t;
}
- if (USe(e)) return e.subarray();
- if (CSe(e)) {
+ if (qSe(e)) return e.subarray();
+ if (DSe(e)) {
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
r.set(e, t);
for (let a = 0; a < e.length; a++) t[a] = rV(e[a], a, n, r, i);
@@ -54738,36 +54834,36 @@ function rV(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
return e;
}
function iV(e, t, n = e, r, i) {
- let a = [...Object.keys(t), ...wSe(t)];
+ let a = [...Object.keys(t), ...OSe(t)];
for (let o = 0; o < a.length; o++) {
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
(c == null || c.writable) && (e[s] = rV(t[s], s, n, r, i));
}
}
function aV(e) {
- switch (ZB(e)) {
- case tV:
- case ASe:
- case jSe:
- case NSe:
+ switch (XB(e)) {
case eV:
- case DSe:
- case VSe:
- case HSe:
- case RSe:
- case zSe:
- case BSe:
- case OSe:
+ case PSe:
+ case FSe:
+ case LSe:
case $B:
+ case jSe:
+ case GSe:
+ case KSe:
+ case HSe:
+ case USe:
+ case WSe:
case MSe:
- case TSe:
- case kSe:
case QB:
- case ESe:
- case PSe:
- case FSe:
case ISe:
- case LSe: return !0;
+ case kSe:
+ case NSe:
+ case ZB:
+ case ASe:
+ case RSe:
+ case zSe:
+ case BSe:
+ case VSe: return !0;
default: return !1;
}
}
@@ -54797,21 +54893,21 @@ function lV(e, t, n) {
function uV(e, t, n, r, i = !1) {
if (t === e) return !0;
switch (typeof t) {
- case "object": return dV(e, t, n, r, i);
+ case "object": return JSe(e, t, n, r, i);
case "function": return Object.keys(t).length > 0 ? uV(e, { ...t }, n, r, i) : sV(e, t);
default: return cV(e) && i ? typeof t != "string" || t === "" : sV(e, t);
}
}
-function dV(e, t, n, r, i = !1) {
+function JSe(e, t, n, r, i = !1) {
if (t == null) return !0;
- if (Array.isArray(t)) return fV(e, t, n, r);
- if (t instanceof Map) return GSe(e, t, n, r);
- if (t instanceof Set) return KSe(e, t, n, r);
+ if (Array.isArray(t)) return dV(e, t, n, r);
+ if (t instanceof Map) return YSe(e, t, n, r);
+ if (t instanceof Set) return XSe(e, t, n, r);
let a = Object.keys(t);
if (e == null) return i && a.length === 0;
- if (i) XB(e) && (e = Object(e));
+ if (i) YB(e) && (e = Object(e));
else {
- let t = ZB(e);
+ let t = XB(e);
if (t !== "[object Object]" && t !== "[object Arguments]") return !1;
}
if (a.length === 0) return !0;
@@ -54827,13 +54923,13 @@ function dV(e, t, n, r, i = !1) {
r?.delete(t);
}
}
-function GSe(e, t, n, r) {
+function YSe(e, t, n, r) {
if (t.size === 0) return !0;
if (!(e instanceof Map)) return !1;
for (let [i, a] of t.entries()) if (n(e.get(i), a, i, e, t, r) === !1) return !1;
return !0;
}
-function fV(e, t, n, r) {
+function dV(e, t, n, r) {
if (t.length === 0) return !0;
if (!Array.isArray(e)) return !1;
let i = /* @__PURE__ */ new Set();
@@ -54851,38 +54947,38 @@ function fV(e, t, n, r) {
}
return !0;
}
-function KSe(e, t, n, r) {
- return t.size === 0 || e instanceof Set && fV([...e], [...t], n, r);
+function XSe(e, t, n, r) {
+ return t.size === 0 || e instanceof Set && dV([...e], [...t], n, r);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs
-function pV(e, t) {
+function fV(e, t) {
return lV(e, t, () => void 0);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/matches.mjs
-function qSe(e) {
- return e = oV(e), (t) => pV(t, e);
+function ZSe(e) {
+ return e = oV(e), (t) => fV(t, e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
-function JSe(e, t) {
- return WSe(e, (n, r, i, a) => {
+function QSe(e, t) {
+ return nV(e, (n, r, i, a) => {
let o = t?.(n, r, i, a);
if (o !== void 0) return o;
if (typeof e == "object") {
- if (ZB(e) === "[object Object]" && typeof e.constructor != "function") {
+ if (XB(e) === "[object Object]" && typeof e.constructor != "function") {
let t = {};
return a.set(e, t), iV(t, e, i, a), t;
}
switch (Object.prototype.toString.call(e)) {
- case $B:
case QB:
- case eV: {
+ case ZB:
+ case $B: {
let t = new e.constructor(e?.valueOf());
return iV(t, e), t;
}
- case tV: {
+ case eV: {
let t = {};
return iV(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
}
@@ -54893,79 +54989,79 @@ function JSe(e, t) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
-function YSe(e) {
- return JSe(e);
+function $Se(e) {
+ return QSe(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
-var XSe = /^(?:0|[1-9]\d*)$/;
-function mV(e, t = 2 ** 53 - 1) {
+var eCe = /^(?:0|[1-9]\d*)$/;
+function pV(e, t = 2 ** 53 - 1) {
switch (typeof e) {
case "number": return Number.isInteger(e) && e >= 0 && e < t;
case "symbol": return !1;
- case "string": return XSe.test(e);
+ case "string": return eCe.test(e);
}
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
-function ZSe(e) {
- return typeof e == "object" && !!e && ZB(e) === "[object Arguments]";
+function tCe(e) {
+ return typeof e == "object" && !!e && XB(e) === "[object Arguments]";
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/has.mjs
-function QSe(e, t) {
+function nCe(e, t) {
let n;
- if (n = Array.isArray(t) ? t : typeof t == "string" && pB(t) && !(t in Object(e)) ? _B(t) : [t], n.length === 0) return !1;
+ if (n = Array.isArray(t) ? t : typeof t == "string" && fB(t) && !(t in Object(e)) ? gB(t) : [t], n.length === 0) return !1;
let r = e;
for (let e = 0; e < n.length; e++) {
- let t = mB(n[e]);
- if ((r == null || !Object.hasOwn(r, t)) && !((Array.isArray(r) || ZSe(r)) && mV(t) && Number(t) < r.length)) return !1;
+ let t = pB(n[e]);
+ if ((r == null || !Object.hasOwn(r, t)) && !((Array.isArray(r) || tCe(r)) && pV(t) && Number(t) < r.length)) return !1;
r = r[t];
}
return !0;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs
-function $Se(e, t) {
+function rCe(e, t) {
switch (typeof e) {
case "object":
Object.is(e?.valueOf(), -0) && (e = "-0");
break;
- case "number": e = mB(e);
+ case "number": e = pB(e);
}
- return t = YSe(t), function(n) {
- let r = vB(n, e);
- return r === void 0 ? QSe(n, e) : t === void 0 ? r === void 0 : pV(r, t);
+ return t = $Se(t), function(n) {
+ let r = _B(n, e);
+ return r === void 0 ? nCe(n, e) : t === void 0 ? r === void 0 : fV(r, t);
};
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/iteratee.mjs
-function hV(e) {
- if (e == null) return JB;
+function mV(e) {
+ if (e == null) return qB;
switch (typeof e) {
case "function": return e;
- case "object": return Array.isArray(e) && e.length === 2 ? $Se(e[0], e[1]) : qSe(e);
- default: return SSe(e);
+ case "object": return Array.isArray(e) && e.length === 2 ? rCe(e[0], e[1]) : ZSe(e);
+ default: return ESe(e);
}
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/normalizeZero.mjs
-function eCe(e) {
+function iCe(e) {
return e === 0 ? 0 : e;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/uniqBy.mjs
-function gV(e, t = JB) {
- return YB(e) ? ySe(Array.from(e), bSe(hV(t), 1)).map(eCe) : [];
+function hV(e, t = qB) {
+ return JB(e) ? CSe(Array.from(e), wSe(mV(t), 1)).map(iCe) : [];
}
//#endregion
//#region node_modules/recharts/es6/util/payload/getUniqPayload.js
-function _V(e, t, n) {
- return t === !0 ? gV(e, n) : typeof t == "function" ? gV(e, t) : e;
+function gV(e, t, n) {
+ return t === !0 ? hV(e, n) : typeof t == "function" ? hV(e, t) : e;
}
//#endregion
//#region node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
-var tCe = /* @__PURE__ */ xt(((e) => {
+var aCe = /* @__PURE__ */ xt(((e) => {
var t = Ot(), n = Uh();
function r(e, t) {
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
@@ -55010,60 +55106,60 @@ var tCe = /* @__PURE__ */ xt(((e) => {
f.hasValue = !0, f.value = p;
}, [p]), l(p), p;
};
-})), nCe = /* @__PURE__ */ xt(((e, t) => {
- t.exports = tCe();
-})), vV = /*#__PURE__*/ (0, B.createContext)(null), rCe = nCe(), iCe = (e) => e, yV = () => {
- var e = (0, B.useContext)(vV);
- return e ? e.store.dispatch : iCe;
-}, bV = () => {}, aCe = () => bV, oCe = (e, t) => e === t;
+})), oCe = /* @__PURE__ */ xt(((e, t) => {
+ t.exports = aCe();
+})), _V = /*#__PURE__*/ (0, B.createContext)(null), sCe = oCe(), cCe = (e) => e, vV = () => {
+ var e = (0, B.useContext)(_V);
+ return e ? e.store.dispatch : cCe;
+}, yV = () => {}, lCe = () => yV, uCe = (e, t) => e === t;
function Q(e) {
- var t = (0, B.useContext)(vV), n = (0, B.useMemo)(() => t ? (t) => {
+ var t = (0, B.useContext)(_V), n = (0, B.useMemo)(() => t ? (t) => {
if (t != null) return e(t);
- } : bV, [t, e]);
- return (0, rCe.useSyncExternalStoreWithSelector)(t ? t.subscription.addNestedSub : aCe, t ? t.store.getState : bV, t ? t.store.getState : bV, n, oCe);
+ } : yV, [t, e]);
+ return (0, sCe.useSyncExternalStoreWithSelector)(t ? t.subscription.addNestedSub : lCe, t ? t.store.getState : yV, t ? t.store.getState : yV, n, uCe);
}
//#endregion
//#region node_modules/reselect/dist/reselect.mjs
-function sCe(e, t = `expected a function, instead received ${typeof e}`) {
+function dCe(e, t = `expected a function, instead received ${typeof e}`) {
if (typeof e != "function") throw TypeError(t);
}
-function cCe(e, t = `expected an object, instead received ${typeof e}`) {
+function fCe(e, t = `expected an object, instead received ${typeof e}`) {
if (typeof e != "object") throw TypeError(t);
}
-function lCe(e, t = "expected all items to be functions, instead received the following types: ") {
+function pCe(e, t = "expected all items to be functions, instead received the following types: ") {
if (!e.every((e) => typeof e == "function")) {
let n = e.map((e) => typeof e == "function" ? `function ${e.name || "unnamed"}()` : typeof e).join(", ");
throw TypeError(`${t}[${n}]`);
}
}
-var xV = (e) => Array.isArray(e) ? e : [e];
-function uCe(e) {
+var bV = (e) => Array.isArray(e) ? e : [e];
+function mCe(e) {
let t = Array.isArray(e[0]) ? e[0] : e;
- return lCe(t, "createSelector expects all input-selectors to be functions, but received the following types: "), t;
+ return pCe(t, "createSelector expects all input-selectors to be functions, but received the following types: "), t;
}
-function dCe(e, t) {
+function hCe(e, t) {
let n = [], { length: r } = e;
for (let i = 0; i < r; i++) n.push(e[i].apply(null, t));
return n;
}
-var fCe = class {
+var gCe = class {
constructor(e) {
this.value = e;
}
deref() {
return this.value;
}
-}, pCe = typeof WeakRef < "u" ? WeakRef : fCe, mCe = 0, SV = 1;
-function CV() {
+}, _Ce = typeof WeakRef < "u" ? WeakRef : gCe, vCe = 0, xV = 1;
+function SV() {
return {
- s: mCe,
+ s: vCe,
v: void 0,
o: null,
p: null
};
}
-function wV(e, t = {}) {
- let n = CV(), { resultEqualityCheck: r } = t, i, a = 0;
+function CV(e, t = {}) {
+ let n = SV(), { resultEqualityCheck: r } = t, i, a = 0;
function o() {
let t = n, { length: o } = arguments;
for (let e = 0, n = o; e < n; e++) {
@@ -55072,43 +55168,43 @@ function wV(e, t = {}) {
let e = t.o;
e === null && (t.o = e = /* @__PURE__ */ new WeakMap());
let r = e.get(n);
- r === void 0 ? (t = CV(), e.set(n, t)) : t = r;
+ r === void 0 ? (t = SV(), e.set(n, t)) : t = r;
} else {
let e = t.p;
e === null && (t.p = e = /* @__PURE__ */ new Map());
let r = e.get(n);
- r === void 0 ? (t = CV(), e.set(n, t)) : t = r;
+ r === void 0 ? (t = SV(), e.set(n, t)) : t = r;
}
}
let s = t, c;
- if (t.s === SV) c = t.v;
+ if (t.s === xV) c = t.v;
else if (c = e.apply(null, arguments), a++, r) {
let e = i?.deref?.() ?? i;
- e != null && r(e, c) && (c = e, a !== 0 && a--), i = typeof c == "object" && c || typeof c == "function" ? new pCe(c) : c;
+ e != null && r(e, c) && (c = e, a !== 0 && a--), i = typeof c == "object" && c || typeof c == "function" ? new _Ce(c) : c;
}
- return s.s = SV, s.v = c, c;
+ return s.s = xV, s.v = c, c;
}
return o.clearCache = () => {
- n = CV(), o.resetResultsCount();
+ n = SV(), o.resetResultsCount();
}, o.resultsCount = () => a, o.resetResultsCount = () => {
a = 0;
}, o;
}
-function hCe(e, ...t) {
+function yCe(e, ...t) {
let n = typeof e == "function" ? {
memoize: e,
memoizeOptions: t
} : e, r = (...e) => {
let t = 0, r = 0, i, a = {}, o = e.pop();
- typeof o == "object" && (a = o, o = e.pop()), sCe(o, `createSelector expects an output function after the inputs, but received: [${typeof o}]`);
- let { memoize: s, memoizeOptions: c = [], argsMemoize: l = wV, argsMemoizeOptions: u = [], devModeChecks: d = {} } = {
+ typeof o == "object" && (a = o, o = e.pop()), dCe(o, `createSelector expects an output function after the inputs, but received: [${typeof o}]`);
+ let { memoize: s, memoizeOptions: c = [], argsMemoize: l = CV, argsMemoizeOptions: u = [], devModeChecks: d = {} } = {
...n,
...a
- }, f = xV(c), p = xV(u), m = uCe(e), h = s(function() {
+ }, f = bV(c), p = bV(u), m = mCe(e), h = s(function() {
return t++, o.apply(null, arguments);
}, ...f), g = l(function() {
r++;
- let e = dCe(m, arguments);
+ let e = hCe(m, arguments);
return i = h.apply(null, e), i;
}, ...p);
return Object.assign(g, {
@@ -55130,14 +55226,14 @@ function hCe(e, ...t) {
};
return Object.assign(r, { withTypes: () => r }), r;
}
-var $ = /* @__PURE__ */ hCe(wV), gCe = Object.assign((e, t = $) => {
- cCe(e, `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);
+var $ = /* @__PURE__ */ yCe(CV), bCe = Object.assign((e, t = $) => {
+ fCe(e, `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);
let n = Object.keys(e);
return t(n.map((t) => e[t]), (...e) => e.reduce((e, t, r) => (e[n[r]] = t, e), {}));
-}, { withTypes: () => gCe });
+}, { withTypes: () => bCe });
//#endregion
//#region node_modules/es-toolkit/dist/array/flatten.mjs
-function _Ce(e, t = 1) {
+function xCe(e, t = 1) {
let n = [], r = Math.floor(t), i = (e, t) => {
for (let a = 0; a < e.length; a++) {
let o = e[a];
@@ -55148,17 +55244,17 @@ function _Ce(e, t = 1) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs
-function TV(e, t, n) {
- return cV(n) && (typeof t == "number" && YB(n) && mV(t) && t < n.length || typeof t == "string" && t in n) ? sV(n[t], e) : !1;
+function wV(e, t, n) {
+ return cV(n) && (typeof t == "number" && JB(n) && pV(t) && t < n.length || typeof t == "string" && t in n) ? sV(n[t], e) : !1;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/compareValues.mjs
-function EV(e) {
+function TV(e) {
return typeof e == "symbol" ? 1 : e === null ? 2 : e === void 0 ? 3 : e === e ? 0 : 4;
}
-var vCe = (e, t, n) => {
+var SCe = (e, t, n) => {
if (e !== t) {
- let r = EV(e), i = EV(t);
+ let r = TV(e), i = TV(t);
if (r === i && r === 0) {
if (e < t) return n === "desc" ? 1 : -1;
if (e > t) return n === "desc" ? -1 : 1;
@@ -55166,15 +55262,15 @@ var vCe = (e, t, n) => {
return n === "desc" ? i - r : r - i;
}
return 0;
-}, yCe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, bCe = /^\w*$/;
-function xCe(e, t) {
- return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || hB(e) ? !0 : typeof e == "string" && (bCe.test(e) || !yCe.test(e)) || t != null && Object.hasOwn(t, e);
+}, CCe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, wCe = /^\w*$/;
+function TCe(e, t) {
+ return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || mB(e) ? !0 : typeof e == "string" && (wCe.test(e) || !CCe.test(e)) || t != null && Object.hasOwn(t, e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/orderBy.mjs
-function SCe(e, t, n, r) {
+function ECe(e, t, n, r) {
if (e == null) return [];
- n = r ? void 0 : n, Array.isArray(e) || (e = YB(e) ? Array.from(e) : Object.values(e)), Array.isArray(t) || (t = t == null ? [null] : [t]), t.length === 0 && (t = [null]), Array.isArray(n) || (n = n == null ? [] : [n]), n = n.map((e) => String(e));
+ n = r ? void 0 : n, Array.isArray(e) || (e = JB(e) ? Array.from(e) : Object.values(e)), Array.isArray(t) || (t = t == null ? [null] : [t]), t.length === 0 && (t = [null]), Array.isArray(n) || (n = n == null ? [] : [n]), n = n.map((e) => String(e));
let i = (e, t) => {
let n = e, r = 0;
for (; r < t.length && n != null; ++r) n = n[t[r]];
@@ -55182,16 +55278,16 @@ function SCe(e, t, n, r) {
}, a = (e, t) => {
if (e == null) return t;
if (t != null) return typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : t[e];
- }, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) || xCe(e) ? e : {
+ }, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) || TCe(e) ? e : {
key: e,
- path: _B(e)
+ path: gB(e)
}));
return e.map((e) => ({
original: e,
criteria: o.map((t) => a(t, e))
})).slice().sort((e, t) => {
for (let r = 0; r < o.length; r++) {
- let i = vCe(e.criteria[r], t.criteria[r], n[r]);
+ let i = SCe(e.criteria[r], t.criteria[r], n[r]);
if (i !== 0) return i;
}
return 0;
@@ -55199,25 +55295,25 @@ function SCe(e, t, n, r) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/sortBy.mjs
-function DV(e, ...t) {
+function EV(e, ...t) {
let n = t.length;
- return n > 1 && TV(e, t[0], t[1]) ? t = [] : n > 2 && TV(t[0], t[1], t[2]) && (t = [t[0]]), SCe(e, _Ce(t), ["asc"]);
+ return n > 1 && wV(e, t[0], t[1]) ? t = [] : n > 2 && wV(t[0], t[1], t[2]) && (t = [t[0]]), ECe(e, xCe(t), ["asc"]);
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/legendSelectors.js
-var OV = (e) => e.legend.settings, CCe = (e) => e.legend.size, wCe = $([(e) => e.legend.payload, OV], (e, t) => {
+var DV = (e) => e.legend.settings, DCe = (e) => e.legend.size, OCe = $([(e) => e.legend.payload, DV], (e, t) => {
var { itemSorter: n } = t, r = e.flat(1);
- return n ? DV(r, n) : r;
+ return n ? EV(r, n) : r;
});
//#endregion
//#region node_modules/recharts/es6/context/legendPayloadContext.js
-function TCe() {
- return Q(wCe);
+function kCe() {
+ return Q(OCe);
}
//#endregion
//#region node_modules/recharts/es6/util/useElementOffset.js
-var kV = 1;
-function AV() {
+var OV = 1;
+function kV() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], [t, n] = (0, B.useState)({
height: 0,
left: 0,
@@ -55232,7 +55328,7 @@ function AV() {
top: r.top,
width: r.width
};
- (Math.abs(i.height - t.height) > kV || Math.abs(i.left - t.left) > kV || Math.abs(i.top - t.top) > kV || Math.abs(i.width - t.width) > kV) && n({
+ (Math.abs(i.height - t.height) > OV || Math.abs(i.left - t.left) > OV || Math.abs(i.top - t.top) > OV || Math.abs(i.width - t.width) > OV) && n({
height: i.height,
left: i.left,
top: i.top,
@@ -55249,26 +55345,26 @@ function AV() {
}
//#endregion
//#region node_modules/redux/dist/redux.mjs
-function jV(e) {
+function AV(e) {
return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
}
-var MV = typeof Symbol == "function" && Symbol.observable || "@@observable", NV = () => Math.random().toString(36).substring(7).split("").join("."), PV = {
- INIT: `@@redux/INIT${/* @__PURE__ */ NV()}`,
- REPLACE: `@@redux/REPLACE${/* @__PURE__ */ NV()}`,
- PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${NV()}`
+var jV = typeof Symbol == "function" && Symbol.observable || "@@observable", MV = () => Math.random().toString(36).substring(7).split("").join("."), NV = {
+ INIT: `@@redux/INIT${/* @__PURE__ */ MV()}`,
+ REPLACE: `@@redux/REPLACE${/* @__PURE__ */ MV()}`,
+ PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${MV()}`
};
-function FV(e) {
+function PV(e) {
if (typeof e != "object" || !e) return !1;
let t = e;
for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
}
-function IV(e, t, n) {
- if (typeof e != "function") throw Error(jV(2));
- if (typeof t == "function" && typeof n == "function" || typeof n == "function" && typeof arguments[3] == "function") throw Error(jV(0));
+function FV(e, t, n) {
+ if (typeof e != "function") throw Error(AV(2));
+ if (typeof t == "function" && typeof n == "function" || typeof n == "function" && typeof arguments[3] == "function") throw Error(AV(0));
if (typeof t == "function" && n === void 0 && (n = t, t = void 0), n !== void 0) {
- if (typeof n != "function") throw Error(jV(1));
- return n(IV)(e, t);
+ if (typeof n != "function") throw Error(AV(1));
+ return n(FV)(e, t);
}
let r = e, i = t, a = /* @__PURE__ */ new Map(), o = a, s = 0, c = !1;
function l() {
@@ -55277,27 +55373,27 @@ function IV(e, t, n) {
}));
}
function u() {
- if (c) throw Error(jV(3));
+ if (c) throw Error(AV(3));
return i;
}
function d(e) {
- if (typeof e != "function") throw Error(jV(4));
- if (c) throw Error(jV(5));
+ if (typeof e != "function") throw Error(AV(4));
+ if (c) throw Error(AV(5));
let t = !0;
l();
let n = s++;
return o.set(n, e), function() {
if (t) {
- if (c) throw Error(jV(6));
+ if (c) throw Error(AV(6));
t = !1, l(), o.delete(n), a = null;
}
};
}
function f(e) {
- if (!FV(e)) throw Error(jV(7));
- if (e.type === void 0) throw Error(jV(8));
- if (typeof e.type != "string") throw Error(jV(17));
- if (c) throw Error(jV(9));
+ if (!PV(e)) throw Error(AV(7));
+ if (e.type === void 0) throw Error(AV(8));
+ if (typeof e.type != "string") throw Error(AV(17));
+ if (c) throw Error(AV(9));
try {
c = !0, i = r(i, e);
} finally {
@@ -55308,41 +55404,41 @@ function IV(e, t, n) {
}), e;
}
function p(e) {
- if (typeof e != "function") throw Error(jV(10));
- r = e, f({ type: PV.REPLACE });
+ if (typeof e != "function") throw Error(AV(10));
+ r = e, f({ type: NV.REPLACE });
}
function m() {
let e = d;
return {
subscribe(t) {
- if (typeof t != "object" || !t) throw Error(jV(11));
+ if (typeof t != "object" || !t) throw Error(AV(11));
function n() {
let e = t;
e.next && e.next(u());
}
return n(), { unsubscribe: e(n) };
},
- [MV]() {
+ [jV]() {
return this;
}
};
}
- return f({ type: PV.INIT }), {
+ return f({ type: NV.INIT }), {
dispatch: f,
subscribe: d,
getState: u,
replaceReducer: p,
- [MV]: m
+ [jV]: m
};
}
-function ECe(e) {
+function ACe(e) {
Object.keys(e).forEach((t) => {
let n = e[t];
- if (n(void 0, { type: PV.INIT }) === void 0) throw Error(jV(12));
- if (n(void 0, { type: PV.PROBE_UNKNOWN_ACTION() }) === void 0) throw Error(jV(13));
+ if (n(void 0, { type: NV.INIT }) === void 0) throw Error(AV(12));
+ if (n(void 0, { type: NV.PROBE_UNKNOWN_ACTION() }) === void 0) throw Error(AV(13));
});
}
-function LV(e) {
+function IV(e) {
let t = Object.keys(e), n = {};
for (let r = 0; r < t.length; r++) {
let i = t[r];
@@ -55350,7 +55446,7 @@ function LV(e) {
}
let r = Object.keys(n), i;
try {
- ECe(n);
+ ACe(n);
} catch (e) {
i = e;
}
@@ -55359,124 +55455,124 @@ function LV(e) {
let a = !1, o = {};
for (let i = 0; i < r.length; i++) {
let s = r[i], c = n[s], l = e[s], u = c(l, t);
- if (u === void 0) throw t && t.type, Error(jV(14));
+ if (u === void 0) throw t && t.type, Error(AV(14));
o[s] = u, a ||= u !== l;
}
return a ||= r.length !== Object.keys(e).length, a ? o : e;
};
}
-function RV(...e) {
+function LV(...e) {
return e.length === 0 ? (e) => e : e.length === 1 ? e[0] : e.reduce((e, t) => (...n) => e(t(...n)));
}
-function DCe(...e) {
+function jCe(...e) {
return (t) => (n, r) => {
let i = t(n, r), a = () => {
- throw Error(jV(15));
+ throw Error(AV(15));
}, o = {
getState: i.getState,
dispatch: (e, ...t) => a(e, ...t)
};
- return a = RV(...e.map((e) => e(o)))(i.dispatch), {
+ return a = LV(...e.map((e) => e(o)))(i.dispatch), {
...i,
dispatch: a
};
};
}
-function zV(e) {
- return FV(e) && "type" in e && typeof e.type == "string";
+function RV(e) {
+ return PV(e) && "type" in e && typeof e.type == "string";
}
//#endregion
//#region node_modules/@reduxjs/toolkit/node_modules/immer/dist/immer.mjs
-var BV = Symbol.for("immer-nothing"), VV = Symbol.for("immer-draftable"), HV = Symbol.for("immer-state");
-function UV(e, ...t) {
+var zV = Symbol.for("immer-nothing"), BV = Symbol.for("immer-draftable"), VV = Symbol.for("immer-state");
+function HV(e, ...t) {
throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
}
-var WV = Object, GV = WV.getPrototypeOf, KV = "constructor", qV = "prototype", JV = "configurable", YV = "enumerable", XV = "writable", ZV = "value", QV = (e) => !!e && !!e[HV];
-function $V(e) {
- return e ? tH(e) || sH(e) || !!e[VV] || !!e[KV]?.[VV] || cH(e) || lH(e) : !1;
+var UV = Object, WV = UV.getPrototypeOf, GV = "constructor", KV = "prototype", qV = "configurable", JV = "enumerable", YV = "writable", XV = "value", ZV = (e) => !!e && !!e[VV];
+function QV(e) {
+ return e ? eH(e) || oH(e) || !!e[BV] || !!e[GV]?.[BV] || sH(e) || cH(e) : !1;
}
-var OCe = WV[qV][KV].toString(), eH = /* @__PURE__ */ new WeakMap();
-function tH(e) {
- if (!e || !uH(e)) return !1;
- let t = GV(e);
- if (t === null || t === WV[qV]) return !0;
- let n = WV.hasOwnProperty.call(t, KV) && t[KV];
+var MCe = UV[KV][GV].toString(), $V = /* @__PURE__ */ new WeakMap();
+function eH(e) {
+ if (!e || !lH(e)) return !1;
+ let t = WV(e);
+ if (t === null || t === UV[KV]) return !0;
+ let n = UV.hasOwnProperty.call(t, GV) && t[GV];
if (n === Object) return !0;
- if (!dH(n)) return !1;
- let r = eH.get(n);
- return r === void 0 && (r = Function.toString.call(n), eH.set(n, r)), r === OCe;
+ if (!uH(n)) return !1;
+ let r = $V.get(n);
+ return r === void 0 && (r = Function.toString.call(n), $V.set(n, r)), r === MCe;
}
-function nH(e, t, n = !0) {
- rH(e) === 0 ? (n ? Reflect.ownKeys(e) : WV.keys(e)).forEach((n) => {
+function tH(e, t, n = !0) {
+ nH(e) === 0 ? (n ? Reflect.ownKeys(e) : UV.keys(e)).forEach((n) => {
t(n, e[n], e);
}) : e.forEach((n, r) => t(r, n, e));
}
-function rH(e) {
- let t = e[HV];
- return t ? t.type_ : sH(e) ? 1 : cH(e) ? 2 : lH(e) ? 3 : 0;
+function nH(e) {
+ let t = e[VV];
+ return t ? t.type_ : oH(e) ? 1 : sH(e) ? 2 : cH(e) ? 3 : 0;
}
-var iH = (e, t, n = rH(e)) => n === 2 ? e.has(t) : WV[qV].hasOwnProperty.call(e, t), aH = (e, t, n = rH(e)) => n === 2 ? e.get(t) : e[t], oH = (e, t, n, r = rH(e)) => {
+var rH = (e, t, n = nH(e)) => n === 2 ? e.has(t) : UV[KV].hasOwnProperty.call(e, t), iH = (e, t, n = nH(e)) => n === 2 ? e.get(t) : e[t], aH = (e, t, n, r = nH(e)) => {
r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
};
-function kCe(e, t) {
+function NCe(e, t) {
return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
}
-var sH = Array.isArray, cH = (e) => e instanceof Map, lH = (e) => e instanceof Set, uH = (e) => typeof e == "object", dH = (e) => typeof e == "function", fH = (e) => typeof e == "boolean";
-function ACe(e) {
+var oH = Array.isArray, sH = (e) => e instanceof Map, cH = (e) => e instanceof Set, lH = (e) => typeof e == "object", uH = (e) => typeof e == "function", dH = (e) => typeof e == "boolean";
+function PCe(e) {
let t = +e;
return Number.isInteger(t) && String(t) === e;
}
-var pH = (e) => e.copy_ || e.base_, mH = (e) => e.modified_ ? e.copy_ : e.base_;
-function hH(e, t) {
- if (cH(e)) return new Map(e);
- if (lH(e)) return new Set(e);
- if (sH(e)) return Array[qV].slice.call(e);
- let n = tH(e);
+var fH = (e) => e.copy_ || e.base_, pH = (e) => e.modified_ ? e.copy_ : e.base_;
+function mH(e, t) {
+ if (sH(e)) return new Map(e);
+ if (cH(e)) return new Set(e);
+ if (oH(e)) return Array[KV].slice.call(e);
+ let n = eH(e);
if (t === !0 || t === "class_only" && !n) {
- let t = WV.getOwnPropertyDescriptors(e);
- delete t[HV];
+ let t = UV.getOwnPropertyDescriptors(e);
+ delete t[VV];
let n = Reflect.ownKeys(t);
for (let r = 0; r < n.length; r++) {
let i = n[r], a = t[i];
- a[XV] === !1 && (a[XV] = !0, a[JV] = !0), (a.get || a.set) && (t[i] = {
- [JV]: !0,
- [XV]: !0,
- [YV]: a[YV],
- [ZV]: e[i]
+ a[YV] === !1 && (a[YV] = !0, a[qV] = !0), (a.get || a.set) && (t[i] = {
+ [qV]: !0,
+ [YV]: !0,
+ [JV]: a[JV],
+ [XV]: e[i]
});
}
- return WV.create(GV(e), t);
+ return UV.create(WV(e), t);
}
{
- let t = GV(e);
+ let t = WV(e);
if (t !== null && n) return { ...e };
- let r = WV.create(t);
- return WV.assign(r, e);
- }
-}
-function gH(e, t = !1) {
- return vH(e) || QV(e) || !$V(e) ? e : (rH(e) > 1 && WV.defineProperties(e, {
- set: _H,
- add: _H,
- clear: _H,
- delete: _H
- }), WV.freeze(e), t && nH(e, (e, t) => {
- gH(t, !0);
+ let r = UV.create(t);
+ return UV.assign(r, e);
+ }
+}
+function hH(e, t = !1) {
+ return _H(e) || ZV(e) || !QV(e) ? e : (nH(e) > 1 && UV.defineProperties(e, {
+ set: gH,
+ add: gH,
+ clear: gH,
+ delete: gH
+ }), UV.freeze(e), t && tH(e, (e, t) => {
+ hH(t, !0);
}, !1), e);
}
-function jCe() {
- UV(2);
+function FCe() {
+ HV(2);
}
-var _H = { [ZV]: jCe };
-function vH(e) {
- return e === null || !uH(e) || WV.isFrozen(e);
+var gH = { [XV]: FCe };
+function _H(e) {
+ return e === null || !lH(e) || UV.isFrozen(e);
}
-var yH = "MapSet", bH = "Patches", xH = "ArrayMethods", SH = {};
-function CH(e) {
- let t = SH[e];
- return t || UV(0, e), t;
+var vH = "MapSet", yH = "Patches", bH = "ArrayMethods", xH = {};
+function SH(e) {
+ let t = xH[e];
+ return t || HV(0, e), t;
}
-var wH = (e) => !!SH[e], TH, EH = () => TH, MCe = (e, t) => ({
+var CH = (e) => !!xH[e], wH, TH = () => wH, ICe = (e, t) => ({
drafts_: [],
parent_: e,
immer_: t,
@@ -55484,114 +55580,114 @@ var wH = (e) => !!SH[e], TH, EH = () => TH, MCe = (e, t) => ({
unfinalizedDrafts_: 0,
handledSet_: /* @__PURE__ */ new Set(),
processedForPatches_: /* @__PURE__ */ new Set(),
- mapSetPlugin_: wH(yH) ? CH(yH) : void 0,
- arrayMethodsPlugin_: wH(xH) ? CH(xH) : void 0
+ mapSetPlugin_: CH(vH) ? SH(vH) : void 0,
+ arrayMethodsPlugin_: CH(bH) ? SH(bH) : void 0
});
-function DH(e, t) {
- t && (e.patchPlugin_ = CH(bH), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
+function EH(e, t) {
+ t && (e.patchPlugin_ = SH(yH), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
}
-function OH(e) {
- kH(e), e.drafts_.forEach(NCe), e.drafts_ = null;
+function DH(e) {
+ OH(e), e.drafts_.forEach(LCe), e.drafts_ = null;
}
-function kH(e) {
- e === TH && (TH = e.parent_);
+function OH(e) {
+ e === wH && (wH = e.parent_);
}
-var AH = (e) => TH = MCe(TH, e);
-function NCe(e) {
- let t = e[HV];
+var kH = (e) => wH = ICe(wH, e);
+function LCe(e) {
+ let t = e[VV];
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
}
-function jH(e, t) {
+function AH(e, t) {
t.unfinalizedDrafts_ = t.drafts_.length;
let n = t.drafts_[0];
if (e !== void 0 && e !== n) {
- n[HV].modified_ && (OH(t), UV(4)), $V(e) && (e = MH(t, e));
+ n[VV].modified_ && (DH(t), HV(4)), QV(e) && (e = jH(t, e));
let { patchPlugin_: r } = t;
- r && r.generateReplacementPatches_(n[HV].base_, e, t);
- } else e = MH(t, n);
- return PCe(t, e, !0), OH(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === BV ? void 0 : e;
-}
-function MH(e, t) {
- if (vH(t)) return t;
- let n = t[HV];
- if (!n) return LH(t, e.handledSet_, e);
- if (!PH(n, e)) return t;
+ r && r.generateReplacementPatches_(n[VV].base_, e, t);
+ } else e = jH(t, n);
+ return RCe(t, e, !0), DH(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === zV ? void 0 : e;
+}
+function jH(e, t) {
+ if (_H(t)) return t;
+ let n = t[VV];
+ if (!n) return IH(t, e.handledSet_, e);
+ if (!NH(n, e)) return t;
if (!n.modified_) return n.base_;
if (!n.finalized_) {
let { callbacks_: t } = n;
if (t) for (; t.length > 0;) t.pop()(e);
- IH(n, e);
+ FH(n, e);
}
return n.copy_;
}
-function PCe(e, t, n = !1) {
- !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && gH(t, n);
+function RCe(e, t, n = !1) {
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && hH(t, n);
}
-function NH(e) {
+function MH(e) {
e.finalized_ = !0, e.scope_.unfinalizedDrafts_--;
}
-var PH = (e, t) => e.scope_ === t, FCe = [];
-function FH(e, t, n, r) {
- let i = pH(e), a = e.type_;
- if (r !== void 0 && aH(i, r, a) === t) {
- oH(i, r, n, a);
+var NH = (e, t) => e.scope_ === t, zCe = [];
+function PH(e, t, n, r) {
+ let i = fH(e), a = e.type_;
+ if (r !== void 0 && iH(i, r, a) === t) {
+ aH(i, r, n, a);
return;
}
if (!e.draftLocations_) {
let t = e.draftLocations_ = /* @__PURE__ */ new Map();
- nH(i, (e, n) => {
- if (QV(n)) {
+ tH(i, (e, n) => {
+ if (ZV(n)) {
let r = t.get(n) || [];
r.push(e), t.set(n, r);
}
});
}
- let o = e.draftLocations_.get(t) ?? FCe;
- for (let e of o) oH(i, e, n, a);
+ let o = e.draftLocations_.get(t) ?? zCe;
+ for (let e of o) aH(i, e, n, a);
}
-function ICe(e, t, n) {
+function BCe(e, t, n) {
e.callbacks_.push(function(r) {
let i = t;
- if (!i || !PH(i, r)) return;
+ if (!i || !NH(i, r)) return;
r.mapSetPlugin_?.fixSetContents(i);
- let a = mH(i);
- FH(e, i.draft_ ?? i, a, n), IH(i, r);
+ let a = pH(i);
+ PH(e, i.draft_ ?? i, a, n), FH(i, r);
});
}
-function IH(e, t) {
+function FH(e, t) {
if (e.modified_ && !e.finalized_ && (e.type_ === 3 || e.type_ === 1 && e.allIndicesReassigned_ || (e.assigned_?.size ?? 0) > 0)) {
let { patchPlugin_: n } = t;
if (n) {
let r = n.getPath(e);
r && n.generatePatches_(e, r, t);
}
- NH(e);
+ MH(e);
}
}
-function LCe(e, t, n) {
+function VCe(e, t, n) {
let { scope_: r } = e;
- if (QV(n)) {
- let i = n[HV];
- PH(i, r) && i.callbacks_.push(function() {
- UH(e), FH(e, n, mH(i), t);
+ if (ZV(n)) {
+ let i = n[VV];
+ NH(i, r) && i.callbacks_.push(function() {
+ HH(e), PH(e, n, pH(i), t);
});
- } else $V(n) && e.callbacks_.push(function() {
- let i = pH(e);
- e.type_ === 3 ? i.has(n) && LH(n, r.handledSet_, r) : aH(i, t, e.type_) === n && r.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && LH(aH(e.copy_, t, e.type_), r.handledSet_, r);
+ } else QV(n) && e.callbacks_.push(function() {
+ let i = fH(e);
+ e.type_ === 3 ? i.has(n) && IH(n, r.handledSet_, r) : iH(i, t, e.type_) === n && r.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && IH(iH(e.copy_, t, e.type_), r.handledSet_, r);
});
}
-function LH(e, t, n) {
- return !n.immer_.autoFreeze_ && n.unfinalizedDrafts_ < 1 || QV(e) || t.has(e) || !$V(e) || vH(e) ? e : (t.add(e), nH(e, (r, i) => {
- if (QV(i)) {
- let t = i[HV];
- PH(t, n) && (oH(e, r, mH(t), e.type_), NH(t));
- } else $V(i) && LH(i, t, n);
+function IH(e, t, n) {
+ return !n.immer_.autoFreeze_ && n.unfinalizedDrafts_ < 1 || ZV(e) || t.has(e) || !QV(e) || _H(e) ? e : (t.add(e), tH(e, (r, i) => {
+ if (ZV(i)) {
+ let t = i[VV];
+ NH(t, n) && (aH(e, r, pH(t), e.type_), MH(t));
+ } else QV(i) && IH(i, t, n);
}), e);
}
-function RCe(e, t) {
- let n = sH(e), r = {
+function HCe(e, t) {
+ let n = oH(e), r = {
type_: +!!n,
- scope_: t ? t.scope_ : EH(),
+ scope_: t ? t.scope_ : TH(),
modified_: !1,
finalized_: !1,
assigned_: void 0,
@@ -55602,108 +55698,108 @@ function RCe(e, t) {
revoke_: null,
isManual_: !1,
callbacks_: void 0
- }, i = r, a = RH;
- n && (i = [r], a = zH);
+ }, i = r, a = LH;
+ n && (i = [r], a = RH);
let { revoke: o, proxy: s } = Proxy.revocable(i, a);
return r.draft_ = s, r.revoke_ = o, [s, r];
}
-var RH = {
+var LH = {
get(e, t) {
- if (t === HV) return e;
+ if (t === VV) return e;
let n = e.scope_.arrayMethodsPlugin_, r = e.type_ === 1 && typeof t == "string";
if (r && n?.isArrayOperationMethod(t)) return n.createMethodInterceptor(e, t);
- let i = pH(e);
- if (!iH(i, t, e.type_)) return BCe(e, i, t);
+ let i = fH(e);
+ if (!rH(i, t, e.type_)) return WCe(e, i, t);
let a = i[t];
- if (e.finalized_ || !$V(a) || r && e.operationMethod && n?.isMutatingArrayMethod(e.operationMethod) && ACe(t)) return a;
- if (a === BH(e.base_, t) || zCe(e, t, a)) {
- UH(e);
- let n = e.type_ === 1 ? +t : t, r = WH(e.scope_, a, e, n);
+ if (e.finalized_ || !QV(a) || r && e.operationMethod && n?.isMutatingArrayMethod(e.operationMethod) && PCe(t)) return a;
+ if (a === zH(e.base_, t) || UCe(e, t, a)) {
+ HH(e);
+ let n = e.type_ === 1 ? +t : t, r = UH(e.scope_, a, e, n);
return e.copy_[n] = r;
}
return a;
},
has(e, t) {
- return t in pH(e);
+ return t in fH(e);
},
ownKeys(e) {
- return Reflect.ownKeys(pH(e));
+ return Reflect.ownKeys(fH(e));
},
set(e, t, n) {
- let r = VH(pH(e), t);
+ let r = BH(fH(e), t);
if (r?.set) return r.set.call(e.draft_, n), !0;
if (!e.modified_) {
- let r = BH(pH(e), t), i = r?.[HV];
+ let r = zH(fH(e), t), i = r?.[VV];
if (i && i.base_ === n) return e.copy_[t] = n, e.assigned_.set(t, !1), !0;
- if (kCe(n, r) && (n !== void 0 || iH(e.base_, t, e.type_))) return !0;
- UH(e), HH(e);
+ if (NCe(n, r) && (n !== void 0 || rH(e.base_, t, e.type_))) return !0;
+ HH(e), VH(e);
}
- return e.copy_[t] === n && (n !== void 0 || iH(e.copy_, t, e.type_)) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0), LCe(e, t, n), !0);
+ return e.copy_[t] === n && (n !== void 0 || rH(e.copy_, t, e.type_)) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0), VCe(e, t, n), !0);
},
deleteProperty(e, t) {
- return UH(e), BH(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), HH(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
+ return HH(e), zH(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), VH(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
},
getOwnPropertyDescriptor(e, t) {
- let n = pH(e), r = Reflect.getOwnPropertyDescriptor(n, t);
+ let n = fH(e), r = Reflect.getOwnPropertyDescriptor(n, t);
return r && {
- [XV]: !0,
- [JV]: e.type_ !== 1 || t !== "length",
- [YV]: r[YV],
- [ZV]: n[t]
+ [YV]: !0,
+ [qV]: e.type_ !== 1 || t !== "length",
+ [JV]: r[JV],
+ [XV]: n[t]
};
},
defineProperty() {
- UV(11);
+ HV(11);
},
getPrototypeOf(e) {
- return GV(e.base_);
+ return WV(e.base_);
},
setPrototypeOf() {
- UV(12);
+ HV(12);
}
-}, zH = {};
-for (let e in RH) {
- let t = RH[e];
- zH[e] = function() {
+}, RH = {};
+for (let e in LH) {
+ let t = LH[e];
+ RH[e] = function() {
let e = arguments;
return e[0] = e[0][0], t.apply(this, e);
};
}
-zH.deleteProperty = function(e, t) {
- return zH.set.call(this, e, t, void 0);
-}, zH.set = function(e, t, n) {
- return RH.set.call(this, e[0], t, n, e[0]);
+RH.deleteProperty = function(e, t) {
+ return RH.set.call(this, e, t, void 0);
+}, RH.set = function(e, t, n) {
+ return LH.set.call(this, e[0], t, n, e[0]);
};
-function BH(e, t) {
- let n = e[HV];
- return (n ? pH(n) : e)[t];
+function zH(e, t) {
+ let n = e[VV];
+ return (n ? fH(n) : e)[t];
}
-function zCe(e, t, n) {
- return e.type_ !== 1 || !e.allIndicesReassigned_ || e.assigned_?.get(t) || !$V(n) || n[HV] ? !1 : e.baseRefs_.has(n);
+function UCe(e, t, n) {
+ return e.type_ !== 1 || !e.allIndicesReassigned_ || e.assigned_?.get(t) || !QV(n) || n[VV] ? !1 : e.baseRefs_.has(n);
}
-function BCe(e, t, n) {
- let r = VH(t, n);
- return r ? ZV in r ? r[ZV] : r.get?.call(e.draft_) : void 0;
+function WCe(e, t, n) {
+ let r = BH(t, n);
+ return r ? XV in r ? r[XV] : r.get?.call(e.draft_) : void 0;
}
-function VH(e, t) {
+function BH(e, t) {
if (!(t in e)) return;
- let n = GV(e);
+ let n = WV(e);
for (; n;) {
let e = Object.getOwnPropertyDescriptor(n, t);
if (e) return e;
- n = GV(n);
+ n = WV(n);
}
}
-function HH(e) {
- e.modified_ || (e.modified_ = !0, e.parent_ && HH(e.parent_));
+function VH(e) {
+ e.modified_ || (e.modified_ = !0, e.parent_ && VH(e.parent_));
}
-function UH(e) {
- e.copy_ ||= (e.assigned_ = /* @__PURE__ */ new Map(), hH(e.base_, e.scope_.immer_.useStrictShallowCopy_));
+function HH(e) {
+ e.copy_ ||= (e.assigned_ = /* @__PURE__ */ new Map(), mH(e.base_, e.scope_.immer_.useStrictShallowCopy_));
}
-var VCe = class {
+var GCe = class {
constructor(e) {
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (e, t, n) => {
- if (dH(e) && !dH(t)) {
+ if (uH(e) && !uH(t)) {
let n = t;
t = e;
let r = this;
@@ -55711,30 +55807,30 @@ var VCe = class {
return r.produce(e, (e) => t.call(this, e, ...i));
};
}
- dH(t) || UV(6), n !== void 0 && !dH(n) && UV(7);
+ uH(t) || HV(6), n !== void 0 && !uH(n) && HV(7);
let r;
- if ($V(e)) {
- let i = AH(this), a = WH(i, e, void 0), o = !0;
+ if (QV(e)) {
+ let i = kH(this), a = UH(i, e, void 0), o = !0;
try {
r = t(a), o = !1;
} finally {
- o ? OH(i) : kH(i);
+ o ? DH(i) : OH(i);
}
- return DH(i, n), jH(r, i);
+ return EH(i, n), AH(r, i);
}
- if (!e || !uH(e)) {
- if (r = t(e), r === void 0 && (r = e), r === BV && (r = void 0), this.autoFreeze_ && gH(r, !0), n) {
+ if (!e || !lH(e)) {
+ if (r = t(e), r === void 0 && (r = e), r === zV && (r = void 0), this.autoFreeze_ && hH(r, !0), n) {
let t = [], i = [];
- CH(bH).generateReplacementPatches_(e, r, {
+ SH(yH).generateReplacementPatches_(e, r, {
patches_: t,
inversePatches_: i
}), n(t, i);
}
return r;
}
- UV(1, e);
+ HV(1, e);
}, this.produceWithPatches = (e, t) => {
- if (dH(e)) return (t, ...n) => this.produceWithPatches(t, (t) => e(t, ...n));
+ if (uH(e)) return (t, ...n) => this.produceWithPatches(t, (t) => e(t, ...n));
let n, r;
return [
this.produce(e, t, (e, t) => {
@@ -55743,18 +55839,18 @@ var VCe = class {
n,
r
];
- }, fH(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), fH(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), fH(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
+ }, dH(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), dH(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), dH(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
}
createDraft(e) {
- $V(e) || UV(8), QV(e) && (e = GH(e));
- let t = AH(this), n = WH(t, e, void 0);
- return n[HV].isManual_ = !0, kH(t), n;
+ QV(e) || HV(8), ZV(e) && (e = WH(e));
+ let t = kH(this), n = UH(t, e, void 0);
+ return n[VV].isManual_ = !0, OH(t), n;
}
finishDraft(e, t) {
- let n = e && e[HV];
- (!n || !n.isManual_) && UV(9);
+ let n = e && e[VV];
+ (!n || !n.isManual_) && HV(9);
let { scope_: r } = n;
- return DH(r, t), jH(void 0, r);
+ return EH(r, t), AH(void 0, r);
}
setAutoFreeze(e) {
this.autoFreeze_ = e;
@@ -55778,48 +55874,48 @@ var VCe = class {
}
}
n > -1 && (t = t.slice(n + 1));
- let r = CH(bH).applyPatches_;
- return QV(e) ? r(e, t) : this.produce(e, (e) => r(e, t));
+ let r = SH(yH).applyPatches_;
+ return ZV(e) ? r(e, t) : this.produce(e, (e) => r(e, t));
}
};
-function WH(e, t, n, r) {
- let [i, a] = cH(t) ? CH(yH).proxyMap_(t, n) : lH(t) ? CH(yH).proxySet_(t, n) : RCe(t, n);
- return (n?.scope_ ?? EH()).drafts_.push(i), a.callbacks_ = n?.callbacks_ ?? [], a.key_ = r, n && r !== void 0 ? ICe(n, a, r) : a.callbacks_.push(function(e) {
+function UH(e, t, n, r) {
+ let [i, a] = sH(t) ? SH(vH).proxyMap_(t, n) : cH(t) ? SH(vH).proxySet_(t, n) : HCe(t, n);
+ return (n?.scope_ ?? TH()).drafts_.push(i), a.callbacks_ = n?.callbacks_ ?? [], a.key_ = r, n && r !== void 0 ? BCe(n, a, r) : a.callbacks_.push(function(e) {
e.mapSetPlugin_?.fixSetContents(a);
let { patchPlugin_: t } = e;
a.modified_ && t && t.generatePatches_(a, [], e);
}), i;
}
-function GH(e) {
- return QV(e) || UV(10, e), KH(e);
+function WH(e) {
+ return ZV(e) || HV(10, e), GH(e);
}
-function KH(e) {
- if (!$V(e) || vH(e)) return e;
- let t = e[HV], n, r = !0;
+function GH(e) {
+ if (!QV(e) || _H(e)) return e;
+ let t = e[VV], n, r = !0;
if (t) {
if (!t.modified_) return t.base_;
- t.finalized_ = !0, n = hH(e, t.scope_.immer_.useStrictShallowCopy_), r = t.scope_.immer_.shouldUseStrictIteration();
- } else n = hH(e, !0);
- return nH(n, (e, t) => {
- oH(n, e, KH(t));
+ t.finalized_ = !0, n = mH(e, t.scope_.immer_.useStrictShallowCopy_), r = t.scope_.immer_.shouldUseStrictIteration();
+ } else n = mH(e, !0);
+ return tH(n, (e, t) => {
+ aH(n, e, GH(t));
}, r), t && (t.finalized_ = !1), n;
}
globalThis.Iterator?.from;
-var qH = new VCe().produce;
+var KH = new GCe().produce;
//#endregion
//#region node_modules/redux-thunk/dist/redux-thunk.mjs
-function JH(e) {
+function qH(e) {
return ({ dispatch: t, getState: n }) => (r) => (i) => typeof i == "function" ? i(t, n, e) : r(i);
}
-var HCe = JH(), UCe = JH, WCe = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
- if (arguments.length !== 0) return typeof arguments[0] == "object" ? RV : RV.apply(null, arguments);
+var KCe = qH(), qCe = qH, JCe = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
+ if (arguments.length !== 0) return typeof arguments[0] == "object" ? LV : LV.apply(null, arguments);
};
typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__;
-function YH(e, t) {
+function JH(e, t) {
function n(...n) {
if (t) {
let r = t(...n);
- if (!r) throw Error(AU(0));
+ if (!r) throw Error(kU(0));
return {
type: e,
payload: r.payload,
@@ -55832,9 +55928,9 @@ function YH(e, t) {
payload: n[0]
};
}
- return n.toString = () => `${e}`, n.type = e, n.match = (t) => zV(t) && t.type === e, n;
+ return n.toString = () => `${e}`, n.type = e, n.match = (t) => RV(t) && t.type === e, n;
}
-var XH = class e extends Array {
+var YH = class e extends Array {
constructor(...t) {
super(...t), Object.setPrototypeOf(this, e.prototype);
}
@@ -55848,29 +55944,29 @@ var XH = class e extends Array {
return t.length === 1 && Array.isArray(t[0]) ? new e(...t[0].concat(this)) : new e(...t.concat(this));
}
};
-function ZH(e) {
- return $V(e) ? qH(e, () => {}) : e;
+function XH(e) {
+ return QV(e) ? KH(e, () => {}) : e;
}
-function QH(e, t, n) {
+function ZH(e, t, n) {
return e.has(t) ? e.get(t) : e.set(t, n(t)).get(t);
}
-function GCe(e) {
+function YCe(e) {
return typeof e == "boolean";
}
-var KCe = () => function(e) {
- let { thunk: t = !0, immutableCheck: n = !0, serializableCheck: r = !0, actionCreatorCheck: i = !0 } = e ?? {}, a = new XH();
- return t && (GCe(t) ? a.push(HCe) : a.push(UCe(t.extraArgument))), a;
-}, $H = "RTK_autoBatch", eU = () => (e) => ({
+var XCe = () => function(e) {
+ let { thunk: t = !0, immutableCheck: n = !0, serializableCheck: r = !0, actionCreatorCheck: i = !0 } = e ?? {}, a = new YH();
+ return t && (YCe(t) ? a.push(KCe) : a.push(qCe(t.extraArgument))), a;
+}, QH = "RTK_autoBatch", $H = () => (e) => ({
payload: e,
- meta: { [$H]: !0 }
-}), tU = (e) => (t) => {
+ meta: { [QH]: !0 }
+}), eU = (e) => (t) => {
setTimeout(t, e);
-}, qCe = (e, t) => (n) => {
+}, ZCe = (e, t) => (n) => {
let r = !1, i = () => {
r || (r = !0, cancelAnimationFrame(a), clearTimeout(o), n());
}, a = e(i), o = setTimeout(i, t);
-}, nU = (e = { type: "raf" }) => (t) => (...n) => {
- let r = t(...n), i = !0, a = !1, o = !1, s = /* @__PURE__ */ new Set(), c = e.type === "tick" ? queueMicrotask : e.type === "raf" ? typeof window < "u" && window.requestAnimationFrame ? qCe(window.requestAnimationFrame, 100) : tU(10) : e.type === "callback" ? e.queueNotification : tU(e.timeout), l = () => {
+}, tU = (e = { type: "raf" }) => (t) => (...n) => {
+ let r = t(...n), i = !0, a = !1, o = !1, s = /* @__PURE__ */ new Set(), c = e.type === "tick" ? queueMicrotask : e.type === "raf" ? typeof window < "u" && window.requestAnimationFrame ? ZCe(window.requestAnimationFrame, 100) : eU(10) : e.type === "callback" ? e.queueNotification : eU(e.timeout), l = () => {
o = !1, a && (a = !1, s.forEach((e) => e()));
};
return Object.assign({}, r, {
@@ -55882,37 +55978,37 @@ var KCe = () => function(e) {
},
dispatch(e) {
try {
- return i = !e?.meta?.[$H], a = !i, a && (o || (o = !0, c(l))), r.dispatch(e);
+ return i = !e?.meta?.[QH], a = !i, a && (o || (o = !0, c(l))), r.dispatch(e);
} finally {
i = !0;
}
}
});
-}, JCe = (e) => function(t) {
- let { autoBatch: n = !0 } = t ?? {}, r = new XH(e);
- return n && r.push(nU(typeof n == "object" ? n : void 0)), r;
+}, QCe = (e) => function(t) {
+ let { autoBatch: n = !0 } = t ?? {}, r = new YH(e);
+ return n && r.push(tU(typeof n == "object" ? n : void 0)), r;
};
-function YCe(e) {
- let t = KCe(), { reducer: n = void 0, middleware: r, devTools: i = !0, duplicateMiddlewareCheck: a = !0, preloadedState: o = void 0, enhancers: s = void 0 } = e || {}, c;
+function $Ce(e) {
+ let t = XCe(), { reducer: n = void 0, middleware: r, devTools: i = !0, duplicateMiddlewareCheck: a = !0, preloadedState: o = void 0, enhancers: s = void 0 } = e || {}, c;
if (typeof n == "function") c = n;
- else if (FV(n)) c = LV(n);
- else throw Error(AU(1));
+ else if (PV(n)) c = IV(n);
+ else throw Error(kU(1));
let l;
l = typeof r == "function" ? r(t) : t();
- let u = RV;
- i && (u = WCe({
+ let u = LV;
+ i && (u = JCe({
trace: !1,
...typeof i == "object" && i
}));
- let d = JCe(DCe(...l)), f = typeof s == "function" ? s(d) : d(), p = u(...f);
- return IV(c, o, p);
+ let d = QCe(jCe(...l)), f = typeof s == "function" ? s(d) : d(), p = u(...f);
+ return FV(c, o, p);
}
-function rU(e) {
+function nU(e) {
let t = {}, n = [], r, i = {
addCase(e, n) {
let r = typeof e == "string" ? e : e.type;
- if (!r) throw Error(AU(28));
- if (r in t) throw Error(AU(29));
+ if (!r) throw Error(kU(28));
+ if (r in t) throw Error(kU(29));
return t[r] = n, i;
},
addAsyncThunk(e, r) {
@@ -55937,25 +56033,25 @@ function rU(e) {
r
];
}
-function XCe(e) {
+function ewe(e) {
return typeof e == "function";
}
-function ZCe(e, t) {
- let [n, r, i] = rU(t), a;
- if (XCe(e)) a = () => ZH(e());
+function twe(e, t) {
+ let [n, r, i] = nU(t), a;
+ if (ewe(e)) a = () => XH(e());
else {
- let t = ZH(e);
+ let t = XH(e);
a = () => t;
}
function o(e = a(), t) {
let o = [n[t.type], ...r.filter(({ matcher: e }) => e(t)).map(({ reducer: e }) => e)];
return o.filter((e) => !!e).length === 0 && (o = [i]), o.reduce((e, n) => {
if (n) {
- if (QV(e)) {
+ if (ZV(e)) {
let r = n(e, t);
return r === void 0 ? e : r;
}
- if ($V(e)) return qH(e, (e) => n(e, t));
+ if (QV(e)) return KH(e, (e) => n(e, t));
{
let r = n(e, t);
if (r === void 0) {
@@ -55970,20 +56066,20 @@ function ZCe(e, t) {
}
return o.getInitialState = a, o;
}
-var QCe = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", $Ce = (e = 21) => {
+var nwe = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", rwe = (e = 21) => {
let t = "", n = e;
- for (; n--;) t += QCe[Math.random() * 64 | 0];
+ for (; n--;) t += nwe[Math.random() * 64 | 0];
return t;
-}, ewe = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
-function twe(e, t) {
+}, iwe = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
+function awe(e, t) {
return `${e}/${t}`;
}
-function nwe({ creators: e } = {}) {
- let t = e?.asyncThunk?.[ewe];
+function owe({ creators: e } = {}) {
+ let t = e?.asyncThunk?.[iwe];
return function(e) {
let { name: n, reducerPath: r = n } = e;
- if (!n) throw Error(AU(11));
- let i = (typeof e.reducers == "function" ? e.reducers(iwe()) : e.reducers) || {}, a = Object.keys(i), o = {
+ if (!n) throw Error(kU(11));
+ let i = (typeof e.reducers == "function" ? e.reducers(cwe()) : e.reducers) || {}, a = Object.keys(i), o = {
sliceCaseReducersByName: {},
sliceCaseReducersByType: {},
actionCreators: {},
@@ -55991,8 +56087,8 @@ function nwe({ creators: e } = {}) {
}, s = {
addCase(e, t) {
let n = typeof e == "string" ? e : e.type;
- if (!n) throw Error(AU(12));
- if (n in o.sliceCaseReducersByType) throw Error(AU(13));
+ if (!n) throw Error(kU(12));
+ if (n in o.sliceCaseReducersByType) throw Error(kU(13));
return o.sliceCaseReducersByType[n] = t, s;
},
addMatcher(e, t) {
@@ -56011,17 +56107,17 @@ function nwe({ creators: e } = {}) {
a.forEach((r) => {
let a = i[r], o = {
reducerName: r,
- type: twe(n, r),
+ type: awe(n, r),
createNotation: typeof e.reducers == "function"
};
- owe(a) ? cwe(o, a, s, t) : awe(o, a, s);
+ uwe(a) ? fwe(o, a, s, t) : lwe(o, a, s);
});
function c() {
- let [t = {}, n = [], r = void 0] = typeof e.extraReducers == "function" ? rU(e.extraReducers) : [e.extraReducers], i = {
+ let [t = {}, n = [], r = void 0] = typeof e.extraReducers == "function" ? nU(e.extraReducers) : [e.extraReducers], i = {
...t,
...o.sliceCaseReducersByType
};
- return ZCe(e.initialState, (e) => {
+ return twe(e.initialState, (e) => {
for (let t in i) e.addCase(t, i[t]);
for (let t of o.sliceMatchers) e.addMatcher(t.matcher, t.reducer);
for (let t of n) e.addMatcher(t.matcher, t.reducer);
@@ -56038,12 +56134,12 @@ function nwe({ creators: e } = {}) {
function h(t, n = !1) {
function r(e) {
let i = e[t];
- return i === void 0 && n && (i = QH(d, r, m)), i;
+ return i === void 0 && n && (i = ZH(d, r, m)), i;
}
function i(t = l) {
- return QH(QH(u, n, () => /* @__PURE__ */ new WeakMap()), t, () => {
+ return ZH(ZH(u, n, () => /* @__PURE__ */ new WeakMap()), t, () => {
let r = {};
- for (let [i, a] of Object.entries(e.selectors ?? {})) r[i] = rwe(a, t, () => QH(d, t, m), n);
+ for (let [i, a] of Object.entries(e.selectors ?? {})) r[i] = swe(a, t, () => ZH(d, t, m), n);
return r;
});
}
@@ -56077,15 +56173,15 @@ function nwe({ creators: e } = {}) {
return g;
};
}
-function rwe(e, t, n, r) {
+function swe(e, t, n, r) {
function i(i, ...a) {
let o = t(i);
return o === void 0 && r && (o = n()), e(o, ...a);
}
return i.unwrapped = e, i;
}
-var iU = /* @__PURE__ */ nwe();
-function iwe() {
+var rU = /* @__PURE__ */ owe();
+function cwe() {
function e(e, t) {
return {
_reducerDefinitionType: "asyncThunk",
@@ -56109,57 +56205,57 @@ function iwe() {
asyncThunk: e
};
}
-function awe({ type: e, reducerName: t, createNotation: n }, r, i) {
+function lwe({ type: e, reducerName: t, createNotation: n }, r, i) {
let a, o;
if ("reducer" in r) {
- if (n && !swe(r)) throw Error(AU(17));
+ if (n && !dwe(r)) throw Error(kU(17));
a = r.reducer, o = r.prepare;
} else a = r;
- i.addCase(e, a).exposeCaseReducer(t, a).exposeAction(t, o ? YH(e, o) : YH(e));
+ i.addCase(e, a).exposeCaseReducer(t, a).exposeAction(t, o ? JH(e, o) : JH(e));
}
-function owe(e) {
+function uwe(e) {
return e._reducerDefinitionType === "asyncThunk";
}
-function swe(e) {
+function dwe(e) {
return e._reducerDefinitionType === "reducerWithPrepare";
}
-function cwe({ type: e, reducerName: t }, n, r, i) {
- if (!i) throw Error(AU(18));
+function fwe({ type: e, reducerName: t }, n, r, i) {
+ if (!i) throw Error(kU(18));
let { payloadCreator: a, fulfilled: o, pending: s, rejected: c, settled: l, options: u } = n, d = i(e, a, u);
r.exposeAction(t, d), o && r.addCase(d.fulfilled, o), s && r.addCase(d.pending, s), c && r.addCase(d.rejected, c), l && r.addMatcher(d.settled, l), r.exposeCaseReducer(t, {
- fulfilled: o || aU,
- pending: s || aU,
- rejected: c || aU,
- settled: l || aU
+ fulfilled: o || iU,
+ pending: s || iU,
+ rejected: c || iU,
+ settled: l || iU
});
}
-function aU() {}
-var lwe = "task", oU = "listener", sU = "completed", cU = "cancelled", uwe = `task-${cU}`, dwe = `task-${sU}`, lU = `${oU}-${cU}`, fwe = `${oU}-${sU}`, uU = class {
+function iU() {}
+var pwe = "task", aU = "listener", oU = "completed", sU = "cancelled", mwe = `task-${sU}`, hwe = `task-${oU}`, cU = `${aU}-${sU}`, gwe = `${aU}-${oU}`, lU = class {
constructor(e) {
- this.code = e, this.message = `${lwe} ${cU} (reason: ${e})`;
+ this.code = e, this.message = `${pwe} ${sU} (reason: ${e})`;
}
code;
name = "TaskAbortError";
message;
-}, dU = (e, t) => {
- if (typeof e != "function") throw TypeError(AU(32));
-}, fU = () => {}, pU = (e, t = fU) => (e.catch(t), e), mU = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)), hU = (e) => {
- if (e.aborted) throw new uU(e.reason);
+}, uU = (e, t) => {
+ if (typeof e != "function") throw TypeError(kU(32));
+}, dU = () => {}, fU = (e, t = dU) => (e.catch(t), e), pU = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)), mU = (e) => {
+ if (e.aborted) throw new lU(e.reason);
};
-function gU(e, t) {
- let n = fU;
+function hU(e, t) {
+ let n = dU;
return new Promise((r, i) => {
- let a = () => i(new uU(e.reason));
+ let a = () => i(new lU(e.reason));
if (e.aborted) {
a();
return;
}
- n = mU(e, a), t.finally(() => n()).then(r, i);
+ n = pU(e, a), t.finally(() => n()).then(r, i);
}).finally(() => {
- n = fU;
+ n = dU;
});
}
-var pwe = async (e, t) => {
+var _we = async (e, t) => {
try {
return await Promise.resolve(), {
status: "ok",
@@ -56167,40 +56263,40 @@ var pwe = async (e, t) => {
};
} catch (e) {
return {
- status: e instanceof uU ? "cancelled" : "rejected",
+ status: e instanceof lU ? "cancelled" : "rejected",
error: e
};
} finally {
t?.();
}
-}, _U = (e) => (t) => pU(gU(e, t).then((t) => (hU(e), t))), vU = (e) => {
- let t = _U(e);
+}, gU = (e) => (t) => fU(hU(e, t).then((t) => (mU(e), t))), _U = (e) => {
+ let t = gU(e);
return (e) => t(new Promise((t) => setTimeout(t, e)));
-}, { assign: yU } = Object, bU = {}, xU = "listenerMiddleware", mwe = (e, t) => {
- let n = (t) => mU(e, () => t.abort(e.reason));
+}, { assign: vU } = Object, yU = {}, bU = "listenerMiddleware", vwe = (e, t) => {
+ let n = (t) => pU(e, () => t.abort(e.reason));
return (r, i) => {
- dU(r, "taskExecutor");
+ uU(r, "taskExecutor");
let a = new AbortController();
n(a);
- let o = pwe(async () => {
- hU(e), hU(a.signal);
+ let o = _we(async () => {
+ mU(e), mU(a.signal);
let t = await r({
- pause: _U(a.signal),
- delay: vU(a.signal),
+ pause: gU(a.signal),
+ delay: _U(a.signal),
signal: a.signal
});
- return hU(a.signal), t;
- }, () => a.abort(dwe));
- return i?.autoJoin && t.push(o.catch(fU)), {
- result: _U(e)(o),
+ return mU(a.signal), t;
+ }, () => a.abort(hwe));
+ return i?.autoJoin && t.push(o.catch(dU)), {
+ result: gU(e)(o),
cancel() {
- a.abort(uwe);
+ a.abort(mwe);
}
};
};
-}, hwe = (e, t) => {
+}, ywe = (e, t) => {
let n = async (n, r) => {
- hU(t);
+ mU(t);
let i = () => {}, a = [new Promise((t, r) => {
let a = e({
predicate: n,
@@ -56218,47 +56314,47 @@ var pwe = async (e, t) => {
})];
r != null && a.push(new Promise((e) => setTimeout(e, r, null)));
try {
- let e = await gU(t, Promise.race(a));
- return hU(t), e;
+ let e = await hU(t, Promise.race(a));
+ return mU(t), e;
} finally {
i();
}
};
- return ((e, t) => pU(n(e, t)));
-}, SU = (e) => {
+ return ((e, t) => fU(n(e, t)));
+}, xU = (e) => {
let { type: t, actionCreator: n, matcher: r, predicate: i, effect: a } = e;
- if (t) i = YH(t).match;
+ if (t) i = JH(t).match;
else if (n) t = n.type, i = n.match;
else if (r) i = r;
- else if (!i) throw Error(AU(21));
- return dU(a, "options.listener"), {
+ else if (!i) throw Error(kU(21));
+ return uU(a, "options.listener"), {
predicate: i,
type: t,
effect: a
};
-}, CU = /* @__PURE__ */ yU((e) => {
- let { type: t, predicate: n, effect: r } = SU(e);
+}, SU = /* @__PURE__ */ vU((e) => {
+ let { type: t, predicate: n, effect: r } = xU(e);
return {
- id: $Ce(),
+ id: rwe(),
effect: r,
type: t,
predicate: n,
pending: /* @__PURE__ */ new Set(),
unsubscribe: () => {
- throw Error(AU(22));
+ throw Error(kU(22));
}
};
-}, { withTypes: () => CU }), wU = (e, t) => {
- let { type: n, effect: r, predicate: i } = SU(t);
+}, { withTypes: () => SU }), CU = (e, t) => {
+ let { type: n, effect: r, predicate: i } = xU(t);
return Array.from(e.values()).find((e) => (typeof n == "string" ? e.type === n : e.predicate === i) && e.effect === r);
-}, TU = (e) => {
+}, wU = (e) => {
e.pending.forEach((e) => {
- e.abort(lU);
+ e.abort(cU);
});
-}, gwe = (e, t) => () => {
- for (let e of t.keys()) TU(e);
+}, bwe = (e, t) => () => {
+ for (let e of t.keys()) wU(e);
e.clear();
-}, EU = (e, t, n) => {
+}, TU = (e, t, n) => {
try {
e(t, n);
} catch (e) {
@@ -56266,74 +56362,74 @@ var pwe = async (e, t) => {
throw e;
}, 0);
}
-}, DU = /* @__PURE__ */ yU(/* @__PURE__ */ YH(`${xU}/add`), { withTypes: () => DU }), _we = /* @__PURE__ */ YH(`${xU}/removeAll`), OU = /* @__PURE__ */ yU(/* @__PURE__ */ YH(`${xU}/remove`), { withTypes: () => OU }), vwe = (...e) => {
- console.error(`${xU}/error`, ...e);
-}, kU = (e = {}) => {
+}, EU = /* @__PURE__ */ vU(/* @__PURE__ */ JH(`${bU}/add`), { withTypes: () => EU }), xwe = /* @__PURE__ */ JH(`${bU}/removeAll`), DU = /* @__PURE__ */ vU(/* @__PURE__ */ JH(`${bU}/remove`), { withTypes: () => DU }), Swe = (...e) => {
+ console.error(`${bU}/error`, ...e);
+}, OU = (e = {}) => {
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = (e) => {
let t = n.get(e) ?? 0;
n.set(e, t + 1);
}, i = (e) => {
let t = n.get(e) ?? 1;
t === 1 ? n.delete(e) : n.set(e, t - 1);
- }, { extra: a, onError: o = vwe } = e;
- dU(o, "onError");
+ }, { extra: a, onError: o = Swe } = e;
+ uU(o, "onError");
let s = (e) => (e.unsubscribe = () => t.delete(e.id), t.set(e.id, e), (t) => {
- e.unsubscribe(), t?.cancelActive && TU(e);
+ e.unsubscribe(), t?.cancelActive && wU(e);
}), c = ((e) => {
- let n = wU(t, e) ?? CU(e);
+ let n = CU(t, e) ?? SU(e);
return s(n);
});
- yU(c, { withTypes: () => c });
+ vU(c, { withTypes: () => c });
let l = (e) => {
- let n = wU(t, e);
- return n && (n.unsubscribe(), e.cancelActive && TU(n)), !!n;
+ let n = CU(t, e);
+ return n && (n.unsubscribe(), e.cancelActive && wU(n)), !!n;
};
- yU(l, { withTypes: () => l });
+ vU(l, { withTypes: () => l });
let u = async (e, n, s, l) => {
- let u = new AbortController(), d = hwe(c, u.signal), f = [];
+ let u = new AbortController(), d = ywe(c, u.signal), f = [];
try {
- e.pending.add(u), r(e), await Promise.resolve(e.effect(n, yU({}, s, {
+ e.pending.add(u), r(e), await Promise.resolve(e.effect(n, vU({}, s, {
getOriginalState: l,
condition: (e, t) => d(e, t).then(Boolean),
take: d,
- delay: vU(u.signal),
- pause: _U(u.signal),
+ delay: _U(u.signal),
+ pause: gU(u.signal),
extra: a,
signal: u.signal,
- fork: mwe(u.signal, f),
+ fork: vwe(u.signal, f),
unsubscribe: e.unsubscribe,
subscribe: () => {
t.set(e.id, e);
},
cancelActiveListeners: () => {
e.pending.forEach((e, t, n) => {
- e !== u && (e.abort(lU), n.delete(e));
+ e !== u && (e.abort(cU), n.delete(e));
});
},
cancel: () => {
- u.abort(lU), e.pending.delete(u);
+ u.abort(cU), e.pending.delete(u);
},
throwIfCancelled: () => {
- hU(u.signal);
+ mU(u.signal);
}
})));
} catch (e) {
- e instanceof uU || EU(o, e, { raisedBy: "effect" });
+ e instanceof lU || TU(o, e, { raisedBy: "effect" });
} finally {
- await Promise.all(f), u.abort(fwe), i(e), e.pending.delete(u);
+ await Promise.all(f), u.abort(gwe), i(e), e.pending.delete(u);
}
- }, d = gwe(t, n);
+ }, d = bwe(t, n);
return {
middleware: (e) => (n) => (r) => {
- if (!zV(r)) return n(r);
- if (DU.match(r)) return c(r.payload);
- if (_we.match(r)) {
+ if (!RV(r)) return n(r);
+ if (EU.match(r)) return c(r.payload);
+ if (xwe.match(r)) {
d();
return;
}
- if (OU.match(r)) return l(r.payload);
+ if (DU.match(r)) return l(r.payload);
let i = e.getState(), a = () => {
- if (i === bU) throw Error(AU(23));
+ if (i === yU) throw Error(kU(23));
return i;
}, s;
try {
@@ -56344,13 +56440,13 @@ var pwe = async (e, t) => {
try {
s = t.predicate(r, n, i);
} catch (e) {
- s = !1, EU(o, e, { raisedBy: "predicate" });
+ s = !1, TU(o, e, { raisedBy: "predicate" });
}
s && u(t, r, e, a);
}
}
} finally {
- i = bU;
+ i = yU;
}
return s;
},
@@ -56359,12 +56455,12 @@ var pwe = async (e, t) => {
clearListeners: d
};
};
-function AU(e) {
+function kU(e) {
return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
}
//#endregion
//#region node_modules/recharts/es6/state/layoutSlice.js
-var jU = iU({
+var AU = rU({
name: "chartLayout",
initialState: {
layoutType: "horizontal",
@@ -56392,23 +56488,23 @@ var jU = iU({
e.scale = t.payload;
}
}
-}), { setMargin: ywe, setLayout: bwe, setChartSize: xwe, setScale: Swe } = jU.actions, Cwe = jU.reducer;
+}), { setMargin: Cwe, setLayout: wwe, setChartSize: Twe, setScale: Ewe } = AU.actions, Dwe = AU.reducer;
//#endregion
//#region node_modules/recharts/es6/util/getSliced.js
-function MU(e, t, n) {
+function jU(e, t, n) {
return Array.isArray(e) && e && t + n !== 0 ? e.slice(t, n + 1) : e;
}
//#endregion
//#region node_modules/recharts/es6/util/isWellBehavedNumber.js
-function NU(e) {
+function MU(e) {
return Number.isFinite(e);
}
-function PU(e) {
+function NU(e) {
return typeof e == "number" && e > 0 && Number.isFinite(e);
}
//#endregion
//#region node_modules/recharts/es6/util/ChartUtils.js
-function FU(e, t) {
+function PU(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -56418,30 +56514,30 @@ function FU(e, t) {
}
return n;
}
-function IU(e) {
+function FU(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? FU(Object(n), !0).forEach(function(t) {
- wwe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : FU(Object(n)).forEach(function(t) {
+ t % 2 ? PU(Object(n), !0).forEach(function(t) {
+ Owe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : PU(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function wwe(e, t, n) {
- return (t = Twe(t)) in e ? Object.defineProperty(e, t, {
+function Owe(e, t, n) {
+ return (t = kwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Twe(e) {
- var t = Ewe(e, "string");
+function kwe(e) {
+ var t = Awe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Ewe(e, t) {
+function Awe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -56451,63 +56547,63 @@ function Ewe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function LU(e, t, n) {
- return AB(e) || AB(t) ? n : wB(t) ? vB(e, t, n) : typeof t == "function" ? t(e) : n;
+function IU(e, t, n) {
+ return kB(e) || kB(t) ? n : CB(t) ? _B(e, t, n) : typeof t == "function" ? t(e) : n;
}
-var Dwe = (e, t, n) => {
+var jwe = (e, t, n) => {
if (t && n) {
var { width: r, height: i } = n, { align: a, verticalAlign: o, layout: s } = t;
- if ((s === "vertical" || s === "horizontal" && o === "middle") && a !== "center" && Z(e[a])) return IU(IU({}, e), {}, { [a]: e[a] + (r || 0) });
- if ((s === "horizontal" || s === "vertical" && a === "center") && o !== "middle" && Z(e[o])) return IU(IU({}, e), {}, { [o]: e[o] + (i || 0) });
+ if ((s === "vertical" || s === "horizontal" && o === "middle") && a !== "center" && Z(e[a])) return FU(FU({}, e), {}, { [a]: e[a] + (r || 0) });
+ if ((s === "horizontal" || s === "vertical" && a === "center") && o !== "middle" && Z(e[o])) return FU(FU({}, e), {}, { [o]: e[o] + (i || 0) });
}
return e;
-}, RU = (e, t) => e === "horizontal" && t === "xAxis" || e === "vertical" && t === "yAxis" || e === "centric" && t === "angleAxis" || e === "radial" && t === "radiusAxis", zU = (e, t, n, r) => {
+}, LU = (e, t) => e === "horizontal" && t === "xAxis" || e === "vertical" && t === "yAxis" || e === "centric" && t === "angleAxis" || e === "radial" && t === "radiusAxis", RU = (e, t, n, r) => {
if (r) return e.map((e) => e.coordinate);
var i, a, o = e.map((e) => (e.coordinate === t && (i = !0), e.coordinate === n && (a = !0), e.coordinate));
return i || o.push(t), a || o.push(n), o;
-}, BU = (e, t, n) => {
+}, zU = (e, t, n) => {
if (!e) return null;
var { duplicateDomain: r, type: i, range: a, scale: o, realScaleType: s, isCategorical: c, categoricalDomain: l, tickCount: u, ticks: d, niceTicks: f, axisType: p } = e;
if (!o) return null;
var m = s === "scaleBand" && o.bandwidth ? o.bandwidth() / 2 : 2, h = (t || n) && i === "category" && o.bandwidth ? o.bandwidth() / m : 0;
- return h = p === "angleAxis" && a && a.length >= 2 ? xB(a[0] - a[1]) * 2 * h : h, t && (d || f) ? (d || f || []).map((e, t) => {
+ return h = p === "angleAxis" && a && a.length >= 2 ? bB(a[0] - a[1]) * 2 * h : h, t && (d || f) ? (d || f || []).map((e, t) => {
var n = r ? r.indexOf(e) : e, i = o.map(n);
- return NU(i) ? {
+ return MU(i) ? {
coordinate: i + h,
value: e,
offset: h,
index: t
} : null;
- }).filter(MB) : c && l ? l.map((e, t) => {
+ }).filter(jB) : c && l ? l.map((e, t) => {
var n = o.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + h,
value: e,
index: t,
offset: h
} : null;
- }).filter(MB) : o.ticks && !n && u != null ? o.ticks(u).map((e, t) => {
+ }).filter(jB) : o.ticks && !n && u != null ? o.ticks(u).map((e, t) => {
var n = o.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + h,
value: e,
index: t,
offset: h
} : null;
- }).filter(MB) : o.domain().map((e, t) => {
+ }).filter(jB) : o.domain().map((e, t) => {
var n = o.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + h,
value: r ? r[e] : e,
index: t,
offset: h
} : null;
- }).filter(MB);
-}, VU = (e, t) => {
+ }).filter(jB);
+}, BU = (e, t) => {
if (!t || t.length !== 2 || !Z(t[0]) || !Z(t[1])) return e;
var n = Math.min(t[0], t[1]), r = Math.max(t[0], t[1]), i = [e[0], e[1]];
return (!Z(e[0]) || e[0] < n) && (i[0] = n), (!Z(e[1]) || e[1] > r) && (i[1] = r), i[0] > r && (i[0] = r), i[1] < n && (i[1] = n), i;
-}, Owe = {
+}, Mwe = {
sign: (e) => {
var t = e.length;
if (!(t <= 0)) {
@@ -56515,16 +56611,16 @@ var Dwe = (e, t, n) => {
if (!(n == null || n <= 0)) for (var r = 0; r < n; ++r) for (var i = 0, a = 0, o = 0; o < t; ++o) {
var s = e[o]?.[r];
if (s != null) {
- var c = s[1], l = s[0], u = SB(c) ? l : c;
+ var c = s[1], l = s[0], u = xB(c) ? l : c;
u >= 0 ? (s[0] = i, i += u, s[1] = i) : (s[0] = a, a += u, s[1] = a);
}
}
}
},
- expand: Hxe,
- none: uB,
- silhouette: Uxe,
- wiggle: Wxe,
+ expand: Kxe,
+ none: lB,
+ silhouette: qxe,
+ wiggle: Jxe,
positive: (e) => {
var t = e.length;
if (!(t <= 0)) {
@@ -56532,70 +56628,70 @@ var Dwe = (e, t, n) => {
if (!(n == null || n <= 0)) for (var r = 0; r < n; ++r) for (var i = 0, a = 0; a < t; ++a) {
var o = e[a]?.[r];
if (o != null) {
- var s = SB(o[1]) ? o[0] : o[1];
+ var s = xB(o[1]) ? o[0] : o[1];
s >= 0 ? (o[0] = i, i += s, o[1] = i) : (o[0] = 0, o[1] = 0);
}
}
}
}
-}, kwe = (e, t, n) => {
- var r = Owe[n] ?? uB, i = Vxe().keys(t).value((e, t) => Number(LU(e, t, 0))).order(dB).offset(r)(e);
+}, Nwe = (e, t, n) => {
+ var r = Mwe[n] ?? lB, i = Gxe().keys(t).value((e, t) => Number(IU(e, t, 0))).order(uB).offset(r)(e);
return i.forEach((n, r) => {
n.forEach((n, i) => {
- var a = LU(e[i], t[r], 0);
+ var a = IU(e[i], t[r], 0);
Array.isArray(a) && a.length === 2 && Z(a[0]) && Z(a[1]) && (n[0] = a[0], n[1] = a[1]);
});
}), i;
};
-function HU(e) {
+function VU(e) {
return e == null ? void 0 : String(e);
}
-function UU(e) {
+function HU(e) {
var { axis: t, ticks: n, bandSize: r, entry: i, index: a, dataKey: o } = e;
if (t.type === "category") {
- if (!t.allowDuplicatedCategory && t.dataKey && !AB(i[t.dataKey])) {
- var s = kB(n, "value", i[t.dataKey]);
+ if (!t.allowDuplicatedCategory && t.dataKey && !kB(i[t.dataKey])) {
+ var s = OB(n, "value", i[t.dataKey]);
if (s) return s.coordinate + r / 2;
}
return n != null && n[a] ? n[a].coordinate + r / 2 : null;
}
- var c = LU(i, AB(o) ? t.dataKey : o), l = t.scale.map(c);
+ var c = IU(i, kB(o) ? t.dataKey : o), l = t.scale.map(c);
return Z(l) ? l : null;
}
-var WU = (e) => {
+var UU = (e) => {
var { axis: t, ticks: n, offset: r, bandSize: i, entry: a, index: o } = e;
if (t.type === "category") return n[o] ? n[o].coordinate + r : null;
- var s = LU(a, t.dataKey, t.scale.domain()[o]);
- if (AB(s)) return null;
+ var s = IU(a, t.dataKey, t.scale.domain()[o]);
+ if (kB(s)) return null;
var c = t.scale.map(s);
return Z(c) ? c - i / 2 + r : null;
-}, GU = (e) => {
+}, WU = (e) => {
var { numericAxis: t } = e, n = t.scale.domain();
if (t.type === "number") {
var r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
return r <= 0 && i >= 0 ? 0 : i < 0 ? i : r;
}
return n[0];
-}, Awe = (e) => {
+}, Pwe = (e) => {
var t = e.flat(2).filter(Z);
return [Math.min(...t), Math.max(...t)];
-}, jwe = (e) => [e[0] === Infinity ? 0 : e[0], e[1] === -Infinity ? 0 : e[1]], Mwe = (e, t, n) => {
- if (e != null) return jwe(Object.keys(e).reduce((r, i) => {
+}, Fwe = (e) => [e[0] === Infinity ? 0 : e[0], e[1] === -Infinity ? 0 : e[1]], Iwe = (e, t, n) => {
+ if (e != null) return Fwe(Object.keys(e).reduce((r, i) => {
var a = e[i];
if (!a) return r;
var { stackedData: o } = a, s = o.reduce((e, r) => {
- var i = Awe(MU(r, t, n));
- return !NU(i[0]) || !NU(i[1]) ? e : [Math.min(e[0], i[0]), Math.max(e[1], i[1])];
+ var i = Pwe(jU(r, t, n));
+ return !MU(i[0]) || !MU(i[1]) ? e : [Math.min(e[0], i[0]), Math.max(e[1], i[1])];
}, [Infinity, -Infinity]);
return [Math.min(s[0], r[0]), Math.max(s[1], r[1])];
}, [Infinity, -Infinity]));
-}, KU = /^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, qU = /^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, JU = (e, t, n) => {
+}, GU = /^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, KU = /^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, qU = (e, t, n) => {
if (e && e.scale && e.scale.bandwidth) {
var r = e.scale.bandwidth();
if (!n || r > 0) return r;
}
if (e && t && t.length >= 2) {
- for (var i = DV(t, (e) => e.coordinate), a = Infinity, o = 1, s = i.length; o < s; o++) {
+ for (var i = EV(t, (e) => e.coordinate), a = Infinity, o = 1, s = i.length; o < s; o++) {
var c = i[o], l = i[o - 1];
a = Math.min((c?.coordinate || 0) - (l?.coordinate || 0), a);
}
@@ -56603,26 +56699,26 @@ var WU = (e) => {
}
return n ? void 0 : 0;
};
-function YU(e) {
+function JU(e) {
var { tooltipEntrySettings: t, dataKey: n, payload: r, value: i, name: a } = e;
- return IU(IU({}, t), {}, {
+ return FU(FU({}, t), {}, {
dataKey: n,
payload: r,
value: i,
name: a
});
}
-function XU(e, t) {
+function YU(e, t) {
if (e) return String(e);
if (typeof t == "string") return t;
}
-var Nwe = (e, t) => {
+var Lwe = (e, t) => {
if (t === "horizontal") return e.relativeX;
if (t === "vertical") return e.relativeY;
-}, Pwe = (e, t) => t === "centric" ? e.angle : e.radius, ZU = (e) => e.layout.width, QU = (e) => e.layout.height, Fwe = (e) => e.layout.scale, $U = (e) => e.layout.margin, eW = $((e) => e.cartesianAxis.xAxis, (e) => Object.values(e)), tW = $((e) => e.cartesianAxis.yAxis, (e) => Object.values(e)), Iwe = "data-recharts-item-index";
+}, Rwe = (e, t) => t === "centric" ? e.angle : e.radius, XU = (e) => e.layout.width, ZU = (e) => e.layout.height, zwe = (e) => e.layout.scale, QU = (e) => e.layout.margin, $U = $((e) => e.cartesianAxis.xAxis, (e) => Object.values(e)), eW = $((e) => e.cartesianAxis.yAxis, (e) => Object.values(e)), Bwe = "data-recharts-item-index";
//#endregion
//#region node_modules/recharts/es6/state/selectors/selectChartOffsetInternal.js
-function nW(e, t) {
+function tW(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -56632,30 +56728,30 @@ function nW(e, t) {
}
return n;
}
-function rW(e) {
+function nW(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? nW(Object(n), !0).forEach(function(t) {
- Lwe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : nW(Object(n)).forEach(function(t) {
+ t % 2 ? tW(Object(n), !0).forEach(function(t) {
+ Vwe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : tW(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Lwe(e, t, n) {
- return (t = Rwe(t)) in e ? Object.defineProperty(e, t, {
+function Vwe(e, t, n) {
+ return (t = Hwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Rwe(e) {
- var t = zwe(e, "string");
+function Hwe(e) {
+ var t = Uwe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function zwe(e, t) {
+function Uwe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -56665,58 +56761,58 @@ function zwe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var Bwe = (e) => e.brush.height;
-function Vwe(e) {
- return tW(e).reduce((e, t) => t.orientation === "left" && !t.mirror && !t.hide ? e + (typeof t.width == "number" ? t.width : 60) : e, 0);
+var Wwe = (e) => e.brush.height;
+function Gwe(e) {
+ return eW(e).reduce((e, t) => t.orientation === "left" && !t.mirror && !t.hide ? e + (typeof t.width == "number" ? t.width : 60) : e, 0);
}
-function Hwe(e) {
- return tW(e).reduce((e, t) => t.orientation === "right" && !t.mirror && !t.hide ? e + (typeof t.width == "number" ? t.width : 60) : e, 0);
+function Kwe(e) {
+ return eW(e).reduce((e, t) => t.orientation === "right" && !t.mirror && !t.hide ? e + (typeof t.width == "number" ? t.width : 60) : e, 0);
}
-function Uwe(e) {
- return eW(e).reduce((e, t) => t.orientation === "top" && !t.mirror && !t.hide ? e + t.height : e, 0);
+function qwe(e) {
+ return $U(e).reduce((e, t) => t.orientation === "top" && !t.mirror && !t.hide ? e + t.height : e, 0);
}
-function Wwe(e) {
- return eW(e).reduce((e, t) => t.orientation === "bottom" && !t.mirror && !t.hide ? e + t.height : e, 0);
+function Jwe(e) {
+ return $U(e).reduce((e, t) => t.orientation === "bottom" && !t.mirror && !t.hide ? e + t.height : e, 0);
}
-var iW = $([
+var rW = $([
+ XU,
ZU,
QU,
- $U,
- Bwe,
- Vwe,
- Hwe,
- Uwe,
Wwe,
- OV,
- CCe
+ Gwe,
+ Kwe,
+ qwe,
+ Jwe,
+ DV,
+ DCe
], (e, t, n, r, i, a, o, s, c, l) => {
var u = {
left: (n.left || 0) + i,
right: (n.right || 0) + a
- }, d = rW(rW({}, {
+ }, d = nW(nW({}, {
top: (n.top || 0) + o,
bottom: (n.bottom || 0) + s
}), u), f = d.bottom;
- d.bottom += r, d = Dwe(d, c, l);
+ d.bottom += r, d = jwe(d, c, l);
var p = e - d.left - d.right, m = t - d.top - d.bottom;
- return rW(rW({ brushBottom: f }, d), {}, {
+ return nW(nW({ brushBottom: f }, d), {}, {
width: Math.max(p, 0),
height: Math.max(m, 0)
});
-}), Gwe = $(iW, (e) => ({
+}), Ywe = $(rW, (e) => ({
x: e.left,
y: e.top,
width: e.width,
height: e.height
-})), aW = $(ZU, QU, (e, t) => ({
+})), iW = $(XU, ZU, (e, t) => ({
x: 0,
y: 0,
width: e,
height: t
-})), Kwe = /*#__PURE__*/ (0, B.createContext)(null), oW = () => (0, B.useContext)(Kwe) != null, sW = (e) => e.brush, cW = $([
- sW,
- iW,
- $U
+})), Xwe = /*#__PURE__*/ (0, B.createContext)(null), aW = () => (0, B.useContext)(Xwe) != null, oW = (e) => e.brush, sW = $([
+ oW,
+ rW,
+ QU
], (e, t, n) => ({
height: e.height,
x: Z(e.x) ? e.x : t.left,
@@ -56725,7 +56821,7 @@ var iW = $([
}));
//#endregion
//#region node_modules/es-toolkit/dist/function/debounce.mjs
-function qwe(e, t, { signal: n, edges: r } = {}) {
+function Zwe(e, t, { signal: n, edges: r } = {}) {
let i, a = null, o = r != null && r.includes("leading"), s = r == null || r.includes("trailing"), c = () => {
a !== null && (e.apply(i, a), i = void 0, a = null);
}, l = () => {
@@ -56750,11 +56846,11 @@ function qwe(e, t, { signal: n, edges: r } = {}) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/function/debounce.mjs
-function Jwe(e, t = 0, n = {}) {
+function Qwe(e, t = 0, n = {}) {
typeof n != "object" && (n = {});
let { leading: r = !1, trailing: i = !0, maxWait: a } = n, o = [, ,];
r && (o[0] = "leading"), i && (o[1] = "trailing");
- let s, c = null, l = qwe(function(...t) {
+ let s, c = null, l = Zwe(function(...t) {
s = e.apply(this, t), c = null;
}, t, { edges: o }), u = function(...t) {
return a != null && (c === null && (c = Date.now()), Date.now() - c >= a) ? ((r || i) && (s = e.apply(this, t)), c = Date.now(), l.cancel(), l.schedule(), s) : (l.apply(this, t), s);
@@ -56763,9 +56859,9 @@ function Jwe(e, t = 0, n = {}) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/function/throttle.mjs
-function Ywe(e, t = 0, n = {}) {
+function $we(e, t = 0, n = {}) {
let { leading: r = !0, trailing: i = !0 } = n;
- return Jwe(e, t, {
+ return Qwe(e, t, {
leading: r,
maxWait: t,
trailing: i
@@ -56773,7 +56869,7 @@ function Ywe(e, t = 0, n = {}) {
}
//#endregion
//#region node_modules/recharts/es6/util/LogUtils.js
-var lW = function(e, t) {
+var cW = function(e, t) {
var n = [...arguments].slice(2);
if (typeof console < "u" && console.warn && (t === void 0 && console.warn("LogUtils requires an error message argument"), !e)) {
if (t === void 0) console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
@@ -56782,7 +56878,7 @@ var lW = function(e, t) {
console.warn(t.replace(/%s/g, () => n[r++]));
}
}
-}, uW = {
+}, lW = {
width: "100%",
height: "100%",
debounce: 0,
@@ -56791,45 +56887,45 @@ var lW = function(e, t) {
width: -1,
height: -1
}
-}, dW = (e, t, n) => {
- var { width: r = uW.width, height: i = uW.height, aspect: a, maxHeight: o } = n, s = CB(r) ? e : Number(r), c = CB(i) ? t : Number(i);
+}, uW = (e, t, n) => {
+ var { width: r = lW.width, height: i = lW.height, aspect: a, maxHeight: o } = n, s = SB(r) ? e : Number(r), c = SB(i) ? t : Number(i);
return a && a > 0 && (s ? c = s / a : c && (s = c * a), o && c != null && c > o && (c = o)), {
calculatedWidth: s,
calculatedHeight: c
};
-}, Xwe = {
+}, eTe = {
width: 0,
height: 0,
overflow: "visible"
-}, Zwe = {
+}, tTe = {
width: 0,
overflowX: "visible"
-}, Qwe = {
+}, nTe = {
height: 0,
overflowY: "visible"
-}, $we = {}, eTe = (e) => {
- var { width: t, height: n } = e, r = CB(t), i = CB(n);
- return r && i ? Xwe : r ? Zwe : i ? Qwe : $we;
+}, rTe = {}, iTe = (e) => {
+ var { width: t, height: n } = e, r = SB(t), i = SB(n);
+ return r && i ? eTe : r ? tTe : i ? nTe : rTe;
};
-function tTe(e) {
+function aTe(e) {
var { width: t, height: n, aspect: r } = e, i = t, a = n;
- return i === void 0 && a === void 0 ? (i = uW.width, a = uW.height) : i === void 0 ? i = r && r > 0 ? void 0 : uW.width : a === void 0 && (a = r && r > 0 ? void 0 : uW.height), {
+ return i === void 0 && a === void 0 ? (i = lW.width, a = lW.height) : i === void 0 ? i = r && r > 0 ? void 0 : lW.width : a === void 0 && (a = r && r > 0 ? void 0 : lW.height), {
width: i,
height: a
};
}
//#endregion
//#region node_modules/recharts/es6/component/ResponsiveContainer.js
-function fW() {
- return fW = Object.assign ? Object.assign.bind() : function(e) {
+function dW() {
+ return dW = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, fW.apply(null, arguments);
+ }, dW.apply(null, arguments);
}
-function pW(e, t) {
+function fW(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -56839,30 +56935,30 @@ function pW(e, t) {
}
return n;
}
-function mW(e) {
+function pW(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? pW(Object(n), !0).forEach(function(t) {
- nTe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : pW(Object(n)).forEach(function(t) {
+ t % 2 ? fW(Object(n), !0).forEach(function(t) {
+ oTe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fW(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function nTe(e, t, n) {
- return (t = rTe(t)) in e ? Object.defineProperty(e, t, {
+function oTe(e, t, n) {
+ return (t = sTe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function rTe(e) {
- var t = iTe(e, "string");
+function sTe(e) {
+ var t = cTe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function iTe(e, t) {
+function cTe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -56872,19 +56968,19 @@ function iTe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var hW = /*#__PURE__*/ (0, B.createContext)(uW.initialDimension);
-function aTe(e) {
- return PU(e.width) && PU(e.height);
+var mW = /*#__PURE__*/ (0, B.createContext)(lW.initialDimension);
+function lTe(e) {
+ return NU(e.width) && NU(e.height);
}
-function gW(e) {
+function hW(e) {
var { children: t, width: n, height: r } = e, i = (0, B.useMemo)(() => ({
width: n,
height: r
}), [n, r]);
- return aTe(i) ? /*#__PURE__*/ B.createElement(hW.Provider, { value: i }, t) : null;
+ return lTe(i) ? /*#__PURE__*/ B.createElement(mW.Provider, { value: i }, t) : null;
}
-var _W = () => (0, B.useContext)(hW), oTe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { aspect: n, initialDimension: r = uW.initialDimension, width: i, height: a, minWidth: o = uW.minWidth, minHeight: s, maxHeight: c, children: l, debounce: u = uW.debounce, id: d, className: f, onResize: p, style: m = {} } = e, h = (0, B.useRef)(null), g = (0, B.useRef)();
+var gW = () => (0, B.useContext)(mW), uTe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { aspect: n, initialDimension: r = lW.initialDimension, width: i, height: a, minWidth: o = lW.minWidth, minHeight: s, maxHeight: c, children: l, debounce: u = lW.debounce, id: d, className: f, onResize: p, style: m = {} } = e, h = (0, B.useRef)(null), g = (0, B.useRef)();
g.current = p, (0, B.useImperativeHandle)(t, () => h.current);
var [_, v] = (0, B.useState)({
containerWidth: r.width,
@@ -56899,7 +56995,7 @@ var _W = () => (0, B.useContext)(hW), oTe = /*#__PURE__*/ (0, B.forwardRef)((e,
});
}, []);
(0, B.useEffect)(() => {
- if (h.current == null || typeof ResizeObserver > "u") return NB;
+ if (h.current == null || typeof ResizeObserver > "u") return MB;
var e = (e) => {
var t, n = e[0];
if (n != null) {
@@ -56907,7 +57003,7 @@ var _W = () => (0, B.useContext)(hW), oTe = /*#__PURE__*/ (0, B.forwardRef)((e,
y(r, i), (t = g.current) == null || t.call(g, r, i);
}
};
- u > 0 && (e = Ywe(e, u, {
+ u > 0 && (e = $we(e, u, {
trailing: !0,
leading: !1
}));
@@ -56917,17 +57013,17 @@ var _W = () => (0, B.useContext)(hW), oTe = /*#__PURE__*/ (0, B.forwardRef)((e,
};
}, [y, u]);
var { containerWidth: b, containerHeight: x } = _;
- lW(!n || n > 0, "The aspect(%s) must be greater than zero.", n);
- var { calculatedWidth: S, calculatedHeight: C } = dW(b, x, {
+ cW(!n || n > 0, "The aspect(%s) must be greater than zero.", n);
+ var { calculatedWidth: S, calculatedHeight: C } = uW(b, x, {
width: i,
height: a,
aspect: n,
maxHeight: c
});
- return lW(S != null && S > 0 || C != null && C > 0, "The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.", S, C, i, a, o, s, n), /*#__PURE__*/ B.createElement("div", {
+ return cW(S != null && S > 0 || C != null && C > 0, "The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.", S, C, i, a, o, s, n), /*#__PURE__*/ B.createElement("div", {
id: d ? `${d}` : void 0,
className: _h("recharts-responsive-container", f),
- style: mW(mW({}, m), {}, {
+ style: pW(pW({}, m), {}, {
width: i,
height: a,
minWidth: o,
@@ -56935,30 +57031,30 @@ var _W = () => (0, B.useContext)(hW), oTe = /*#__PURE__*/ (0, B.forwardRef)((e,
maxHeight: c
}),
ref: h
- }, /*#__PURE__*/ B.createElement("div", { style: eTe({
+ }, /*#__PURE__*/ B.createElement("div", { style: iTe({
width: i,
height: a
- }) }, /*#__PURE__*/ B.createElement(gW, {
+ }) }, /*#__PURE__*/ B.createElement(hW, {
width: S,
height: C
}, l)));
-}), vW = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = _W();
- if (PU(n.width) && PU(n.height)) return e.children;
- var { width: r, height: i } = tTe({
+}), _W = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var n = gW();
+ if (NU(n.width) && NU(n.height)) return e.children;
+ var { width: r, height: i } = aTe({
width: e.width,
height: e.height,
aspect: e.aspect
- }), { calculatedWidth: a, calculatedHeight: o } = dW(void 0, void 0, {
+ }), { calculatedWidth: a, calculatedHeight: o } = uW(void 0, void 0, {
width: r,
height: i,
aspect: e.aspect,
maxHeight: e.maxHeight
});
- return Z(a) && Z(o) ? /*#__PURE__*/ B.createElement(gW, {
+ return Z(a) && Z(o) ? /*#__PURE__*/ B.createElement(hW, {
width: a,
height: o
- }, e.children) : /*#__PURE__*/ B.createElement(oTe, fW({}, e, {
+ }, e.children) : /*#__PURE__*/ B.createElement(uTe, dW({}, e, {
width: r,
height: i,
ref: t
@@ -56966,7 +57062,7 @@ var _W = () => (0, B.useContext)(hW), oTe = /*#__PURE__*/ (0, B.forwardRef)((e,
});
//#endregion
//#region node_modules/recharts/es6/context/chartLayoutContext.js
-function yW(e) {
+function vW(e) {
if (e) return {
x: e.x,
y: e.y,
@@ -56976,15 +57072,15 @@ function yW(e) {
height: e.height
};
}
-var bW = () => {
- var e = oW(), t = Q(Gwe), n = Q(cW), r = Q(sW)?.padding;
+var yW = () => {
+ var e = aW(), t = Q(Ywe), n = Q(sW), r = Q(oW)?.padding;
return !e || !n || !r ? t : {
width: n.width - r.left - r.right,
height: n.height - r.top - r.bottom,
x: r.left,
y: r.top
};
-}, sTe = {
+}, dTe = {
top: 0,
bottom: 0,
left: 0,
@@ -56992,16 +57088,16 @@ var bW = () => {
width: 0,
height: 0,
brushBottom: 0
-}, xW = () => Q(iW) ?? sTe, SW = () => Q(ZU), CW = () => Q(QU), cTe = () => Q((e) => e.layout.margin), wW = (e) => e.layout.layoutType, TW = () => Q(wW), EW = () => {
- var e = TW();
+}, bW = () => Q(rW) ?? dTe, xW = () => Q(XU), SW = () => Q(ZU), fTe = () => Q((e) => e.layout.margin), CW = (e) => e.layout.layoutType, wW = () => Q(CW), TW = () => {
+ var e = wW();
if (e === "horizontal" || e === "vertical") return e;
-}, DW = (e) => {
+}, EW = (e) => {
var t = e.layout.layoutType;
if (t === "centric" || t === "radial") return t;
-}, OW = () => Q(DW), lTe = () => TW() !== void 0, kW = (e) => {
- var t = yV(), n = oW(), { width: r, height: i } = e, a = _W(), o = r, s = i;
+}, DW = () => Q(EW), pTe = () => wW() !== void 0, OW = (e) => {
+ var t = vV(), n = aW(), { width: r, height: i } = e, a = gW(), o = r, s = i;
return a && (o = a.width > 0 ? a.width : r, s = a.height > 0 ? a.height : i), (0, B.useEffect)(() => {
- !n && PU(o) && PU(s) && t(xwe({
+ !n && NU(o) && NU(s) && t(Twe({
width: o,
height: s
}));
@@ -57011,64 +57107,64 @@ var bW = () => {
o,
s
]), null;
-}, AW = Symbol.for("immer-nothing"), jW = Symbol.for("immer-draftable"), MW = Symbol.for("immer-state");
-function NW(e, ...t) {
+}, kW = Symbol.for("immer-nothing"), AW = Symbol.for("immer-draftable"), jW = Symbol.for("immer-state");
+function MW(e, ...t) {
throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
}
-var PW = Object.getPrototypeOf;
-function FW(e) {
- return !!e && !!e[MW];
+var NW = Object.getPrototypeOf;
+function PW(e) {
+ return !!e && !!e[jW];
}
-function IW(e) {
- return e ? RW(e) || Array.isArray(e) || !!e[jW] || !!e.constructor?.[jW] || UW(e) || WW(e) : !1;
+function FW(e) {
+ return e ? LW(e) || Array.isArray(e) || !!e[AW] || !!e.constructor?.[AW] || HW(e) || UW(e) : !1;
}
-var uTe = Object.prototype.constructor.toString(), LW = /* @__PURE__ */ new WeakMap();
-function RW(e) {
+var mTe = Object.prototype.constructor.toString(), IW = /* @__PURE__ */ new WeakMap();
+function LW(e) {
if (!e || typeof e != "object") return !1;
let t = Object.getPrototypeOf(e);
if (t === null || t === Object.prototype) return !0;
let n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
if (n === Object) return !0;
if (typeof n != "function") return !1;
- let r = LW.get(n);
- return r === void 0 && (r = Function.toString.call(n), LW.set(n, r)), r === uTe;
+ let r = IW.get(n);
+ return r === void 0 && (r = Function.toString.call(n), IW.set(n, r)), r === mTe;
}
-function zW(e, t, n = !0) {
- BW(e) === 0 ? (n ? Reflect.ownKeys(e) : Object.keys(e)).forEach((n) => {
+function RW(e, t, n = !0) {
+ zW(e) === 0 ? (n ? Reflect.ownKeys(e) : Object.keys(e)).forEach((n) => {
t(n, e[n], e);
}) : e.forEach((n, r) => t(r, n, e));
}
-function BW(e) {
- let t = e[MW];
- return t ? t.type_ : Array.isArray(e) ? 1 : UW(e) ? 2 : WW(e) ? 3 : 0;
+function zW(e) {
+ let t = e[jW];
+ return t ? t.type_ : Array.isArray(e) ? 1 : HW(e) ? 2 : UW(e) ? 3 : 0;
}
-function VW(e, t) {
- return BW(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
+function BW(e, t) {
+ return zW(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
}
-function HW(e, t, n) {
- let r = BW(e);
+function VW(e, t, n) {
+ let r = zW(e);
r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
}
-function dTe(e, t) {
+function hTe(e, t) {
return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
}
-function UW(e) {
+function HW(e) {
return e instanceof Map;
}
-function WW(e) {
+function UW(e) {
return e instanceof Set;
}
-function GW(e) {
+function WW(e) {
return e.copy_ || e.base_;
}
-function KW(e, t) {
- if (UW(e)) return new Map(e);
- if (WW(e)) return new Set(e);
+function GW(e, t) {
+ if (HW(e)) return new Map(e);
+ if (UW(e)) return new Set(e);
if (Array.isArray(e)) return Array.prototype.slice.call(e);
- let n = RW(e);
+ let n = LW(e);
if (t === !0 || t === "class_only" && !n) {
let t = Object.getOwnPropertyDescriptors(e);
- delete t[MW];
+ delete t[jW];
let n = Reflect.ownKeys(t);
for (let r = 0; r < n.length; r++) {
let i = n[r], a = t[i];
@@ -57079,40 +57175,40 @@ function KW(e, t) {
value: e[i]
});
}
- return Object.create(PW(e), t);
+ return Object.create(NW(e), t);
}
{
- let t = PW(e);
+ let t = NW(e);
if (t !== null && n) return { ...e };
let r = Object.create(t);
return Object.assign(r, e);
}
}
-function qW(e, t = !1) {
- return YW(e) || FW(e) || !IW(e) ? e : (BW(e) > 1 && Object.defineProperties(e, {
- set: JW,
- add: JW,
- clear: JW,
- delete: JW
- }), Object.freeze(e), t && Object.values(e).forEach((e) => qW(e, !0)), e);
+function KW(e, t = !1) {
+ return JW(e) || PW(e) || !FW(e) ? e : (zW(e) > 1 && Object.defineProperties(e, {
+ set: qW,
+ add: qW,
+ clear: qW,
+ delete: qW
+ }), Object.freeze(e), t && Object.values(e).forEach((e) => KW(e, !0)), e);
}
-function fTe() {
- NW(2);
+function gTe() {
+ MW(2);
}
-var JW = { value: fTe };
-function YW(e) {
+var qW = { value: gTe };
+function JW(e) {
return typeof e != "object" || !e || Object.isFrozen(e);
}
-var pTe = {};
-function XW(e) {
- let t = pTe[e];
- return t || NW(0, e), t;
+var _Te = {};
+function YW(e) {
+ let t = _Te[e];
+ return t || MW(0, e), t;
}
-var ZW;
-function QW() {
- return ZW;
+var XW;
+function ZW() {
+ return XW;
}
-function mTe(e, t) {
+function vTe(e, t) {
return {
drafts_: [],
parent_: e,
@@ -57121,62 +57217,62 @@ function mTe(e, t) {
unfinalizedDrafts_: 0
};
}
-function $W(e, t) {
- t && (XW("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
+function QW(e, t) {
+ t && (YW("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
+}
+function $W(e) {
+ eG(e), e.drafts_.forEach(yTe), e.drafts_ = null;
}
function eG(e) {
- tG(e), e.drafts_.forEach(hTe), e.drafts_ = null;
+ e === XW && (XW = e.parent_);
}
function tG(e) {
- e === ZW && (ZW = e.parent_);
+ return XW = vTe(XW, e);
}
-function nG(e) {
- return ZW = mTe(ZW, e);
-}
-function hTe(e) {
- let t = e[MW];
+function yTe(e) {
+ let t = e[jW];
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
}
-function rG(e, t) {
+function nG(e, t) {
t.unfinalizedDrafts_ = t.drafts_.length;
let n = t.drafts_[0];
- return e !== void 0 && e !== n ? (n[MW].modified_ && (eG(t), NW(4)), IW(e) && (e = iG(t, e), t.parent_ || oG(t, e)), t.patches_ && XW("Patches").generateReplacementPatches_(n[MW].base_, e, t.patches_, t.inversePatches_)) : e = iG(t, n, []), eG(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === AW ? void 0 : e;
+ return e !== void 0 && e !== n ? (n[jW].modified_ && ($W(t), MW(4)), FW(e) && (e = rG(t, e), t.parent_ || aG(t, e)), t.patches_ && YW("Patches").generateReplacementPatches_(n[jW].base_, e, t.patches_, t.inversePatches_)) : e = rG(t, n, []), $W(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === kW ? void 0 : e;
}
-function iG(e, t, n) {
- if (YW(t)) return t;
- let r = e.immer_.shouldUseStrictIteration(), i = t[MW];
- if (!i) return zW(t, (r, a) => aG(e, i, t, r, a, n), r), t;
+function rG(e, t, n) {
+ if (JW(t)) return t;
+ let r = e.immer_.shouldUseStrictIteration(), i = t[jW];
+ if (!i) return RW(t, (r, a) => iG(e, i, t, r, a, n), r), t;
if (i.scope_ !== e) return t;
- if (!i.modified_) return oG(e, i.base_, !0), i.base_;
+ if (!i.modified_) return aG(e, i.base_, !0), i.base_;
if (!i.finalized_) {
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
let t = i.copy_, a = t, o = !1;
- i.type_ === 3 && (a = new Set(t), t.clear(), o = !0), zW(a, (r, a) => aG(e, i, t, r, a, n, o), r), oG(e, t, !1), n && e.patches_ && XW("Patches").generatePatches_(i, n, e.patches_, e.inversePatches_);
+ i.type_ === 3 && (a = new Set(t), t.clear(), o = !0), RW(a, (r, a) => iG(e, i, t, r, a, n, o), r), aG(e, t, !1), n && e.patches_ && YW("Patches").generatePatches_(i, n, e.patches_, e.inversePatches_);
}
return i.copy_;
}
-function aG(e, t, n, r, i, a, o) {
+function iG(e, t, n, r, i, a, o) {
if (i == null || typeof i != "object" && !o) return;
- let s = YW(i);
+ let s = JW(i);
if (!(s && !o)) {
- if (FW(i)) {
- let o = iG(e, i, a && t && t.type_ !== 3 && !VW(t.assigned_, r) ? a.concat(r) : void 0);
- if (HW(n, r, o), FW(o)) e.canAutoFreeze_ = !1;
+ if (PW(i)) {
+ let o = rG(e, i, a && t && t.type_ !== 3 && !BW(t.assigned_, r) ? a.concat(r) : void 0);
+ if (VW(n, r, o), PW(o)) e.canAutoFreeze_ = !1;
else return;
} else o && n.add(i);
- if (IW(i) && !s) {
+ if (FW(i) && !s) {
if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1 || t && t.base_ && t.base_[r] === i && s) return;
- iG(e, i), (!t || !t.scope_.parent_) && typeof r != "symbol" && (UW(n) ? n.has(r) : Object.prototype.propertyIsEnumerable.call(n, r)) && oG(e, i);
+ rG(e, i), (!t || !t.scope_.parent_) && typeof r != "symbol" && (HW(n) ? n.has(r) : Object.prototype.propertyIsEnumerable.call(n, r)) && aG(e, i);
}
}
}
-function oG(e, t, n = !1) {
- !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && qW(t, n);
+function aG(e, t, n = !1) {
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && KW(t, n);
}
-function gTe(e, t) {
+function bTe(e, t) {
let n = Array.isArray(e), r = {
type_: +!!n,
- scope_: t ? t.scope_ : QW(),
+ scope_: t ? t.scope_ : ZW(),
modified_: !1,
finalized_: !1,
assigned_: {},
@@ -57186,41 +57282,41 @@ function gTe(e, t) {
copy_: null,
revoke_: null,
isManual_: !1
- }, i = r, a = sG;
- n && (i = [r], a = cG);
+ }, i = r, a = oG;
+ n && (i = [r], a = sG);
let { revoke: o, proxy: s } = Proxy.revocable(i, a);
return r.draft_ = s, r.revoke_ = o, s;
}
-var sG = {
+var oG = {
get(e, t) {
- if (t === MW) return e;
- let n = GW(e);
- if (!VW(n, t)) return _Te(e, n, t);
+ if (t === jW) return e;
+ let n = WW(e);
+ if (!BW(n, t)) return xTe(e, n, t);
let r = n[t];
- return e.finalized_ || !IW(r) ? r : r === lG(e.base_, t) ? (fG(e), e.copy_[t] = pG(r, e)) : r;
+ return e.finalized_ || !FW(r) ? r : r === cG(e.base_, t) ? (dG(e), e.copy_[t] = fG(r, e)) : r;
},
has(e, t) {
- return t in GW(e);
+ return t in WW(e);
},
ownKeys(e) {
- return Reflect.ownKeys(GW(e));
+ return Reflect.ownKeys(WW(e));
},
set(e, t, n) {
- let r = uG(GW(e), t);
+ let r = lG(WW(e), t);
if (r?.set) return r.set.call(e.draft_, n), !0;
if (!e.modified_) {
- let r = lG(GW(e), t), i = r?.[MW];
+ let r = cG(WW(e), t), i = r?.[jW];
if (i && i.base_ === n) return e.copy_[t] = n, e.assigned_[t] = !1, !0;
- if (dTe(n, r) && (n !== void 0 || VW(e.base_, t))) return !0;
- fG(e), dG(e);
+ if (hTe(n, r) && (n !== void 0 || BW(e.base_, t))) return !0;
+ dG(e), uG(e);
}
return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_[t] = !0, !0);
},
deleteProperty(e, t) {
- return lG(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, fG(e), dG(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
+ return cG(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, dG(e), uG(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
},
getOwnPropertyDescriptor(e, t) {
- let n = GW(e), r = Reflect.getOwnPropertyDescriptor(n, t);
+ let n = WW(e), r = Reflect.getOwnPropertyDescriptor(n, t);
return r && {
writable: !0,
configurable: e.type_ !== 1 || t !== "length",
@@ -57229,48 +57325,48 @@ var sG = {
};
},
defineProperty() {
- NW(11);
+ MW(11);
},
getPrototypeOf(e) {
- return PW(e.base_);
+ return NW(e.base_);
},
setPrototypeOf() {
- NW(12);
+ MW(12);
}
-}, cG = {};
-zW(sG, (e, t) => {
- cG[e] = function() {
+}, sG = {};
+RW(oG, (e, t) => {
+ sG[e] = function() {
return arguments[0] = arguments[0][0], t.apply(this, arguments);
};
-}), cG.deleteProperty = function(e, t) {
- return cG.set.call(this, e, t, void 0);
-}, cG.set = function(e, t, n) {
- return sG.set.call(this, e[0], t, n, e[0]);
+}), sG.deleteProperty = function(e, t) {
+ return sG.set.call(this, e, t, void 0);
+}, sG.set = function(e, t, n) {
+ return oG.set.call(this, e[0], t, n, e[0]);
};
-function lG(e, t) {
- let n = e[MW];
- return (n ? GW(n) : e)[t];
+function cG(e, t) {
+ let n = e[jW];
+ return (n ? WW(n) : e)[t];
}
-function _Te(e, t, n) {
- let r = uG(t, n);
+function xTe(e, t, n) {
+ let r = lG(t, n);
return r ? "value" in r ? r.value : r.get?.call(e.draft_) : void 0;
}
-function uG(e, t) {
+function lG(e, t) {
if (!(t in e)) return;
- let n = PW(e);
+ let n = NW(e);
for (; n;) {
let e = Object.getOwnPropertyDescriptor(n, t);
if (e) return e;
- n = PW(n);
+ n = NW(n);
}
}
-function dG(e) {
- e.modified_ || (e.modified_ = !0, e.parent_ && dG(e.parent_));
+function uG(e) {
+ e.modified_ || (e.modified_ = !0, e.parent_ && uG(e.parent_));
}
-function fG(e) {
- e.copy_ ||= KW(e.base_, e.scope_.immer_.useStrictShallowCopy_);
+function dG(e) {
+ e.copy_ ||= GW(e.base_, e.scope_.immer_.useStrictShallowCopy_);
}
-var vTe = class {
+var STe = class {
constructor(e) {
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !0, this.produce = (e, t, n) => {
if (typeof e == "function" && typeof t != "function") {
@@ -57281,25 +57377,25 @@ var vTe = class {
return r.produce(e, (e) => t.call(this, e, ...i));
};
}
- typeof t != "function" && NW(6), n !== void 0 && typeof n != "function" && NW(7);
+ typeof t != "function" && MW(6), n !== void 0 && typeof n != "function" && MW(7);
let r;
- if (IW(e)) {
- let i = nG(this), a = pG(e, void 0), o = !0;
+ if (FW(e)) {
+ let i = tG(this), a = fG(e, void 0), o = !0;
try {
r = t(a), o = !1;
} finally {
- o ? eG(i) : tG(i);
+ o ? $W(i) : eG(i);
}
- return $W(i, n), rG(r, i);
+ return QW(i, n), nG(r, i);
}
if (!e || typeof e != "object") {
- if (r = t(e), r === void 0 && (r = e), r === AW && (r = void 0), this.autoFreeze_ && qW(r, !0), n) {
+ if (r = t(e), r === void 0 && (r = e), r === kW && (r = void 0), this.autoFreeze_ && KW(r, !0), n) {
let t = [], i = [];
- XW("Patches").generateReplacementPatches_(e, r, t, i), n(t, i);
+ YW("Patches").generateReplacementPatches_(e, r, t, i), n(t, i);
}
return r;
}
- NW(1, e);
+ MW(1, e);
}, this.produceWithPatches = (e, t) => {
if (typeof e == "function") return (t, ...n) => this.produceWithPatches(t, (t) => e(t, ...n));
let n, r;
@@ -57313,15 +57409,15 @@ var vTe = class {
}, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy), typeof e?.useStrictIteration == "boolean" && this.setUseStrictIteration(e.useStrictIteration);
}
createDraft(e) {
- IW(e) || NW(8), FW(e) && (e = yTe(e));
- let t = nG(this), n = pG(e, void 0);
- return n[MW].isManual_ = !0, tG(t), n;
+ FW(e) || MW(8), PW(e) && (e = CTe(e));
+ let t = tG(this), n = fG(e, void 0);
+ return n[jW].isManual_ = !0, eG(t), n;
}
finishDraft(e, t) {
- let n = e && e[MW];
- (!n || !n.isManual_) && NW(9);
+ let n = e && e[jW];
+ (!n || !n.isManual_) && MW(9);
let { scope_: r } = n;
- return $W(r, t), rG(void 0, r);
+ return QW(r, t), nG(void 0, r);
}
setAutoFreeze(e) {
this.autoFreeze_ = e;
@@ -57345,35 +57441,35 @@ var vTe = class {
}
}
n > -1 && (t = t.slice(n + 1));
- let r = XW("Patches").applyPatches_;
- return FW(e) ? r(e, t) : this.produce(e, (e) => r(e, t));
+ let r = YW("Patches").applyPatches_;
+ return PW(e) ? r(e, t) : this.produce(e, (e) => r(e, t));
}
};
-function pG(e, t) {
- let n = UW(e) ? XW("MapSet").proxyMap_(e, t) : WW(e) ? XW("MapSet").proxySet_(e, t) : gTe(e, t);
- return (t ? t.scope_ : QW()).drafts_.push(n), n;
+function fG(e, t) {
+ let n = HW(e) ? YW("MapSet").proxyMap_(e, t) : UW(e) ? YW("MapSet").proxySet_(e, t) : bTe(e, t);
+ return (t ? t.scope_ : ZW()).drafts_.push(n), n;
}
-function yTe(e) {
- return FW(e) || NW(10, e), mG(e);
+function CTe(e) {
+ return PW(e) || MW(10, e), pG(e);
}
-function mG(e) {
- if (!IW(e) || YW(e)) return e;
- let t = e[MW], n, r = !0;
+function pG(e) {
+ if (!FW(e) || JW(e)) return e;
+ let t = e[jW], n, r = !0;
if (t) {
if (!t.modified_) return t.base_;
- t.finalized_ = !0, n = KW(e, t.scope_.immer_.useStrictShallowCopy_), r = t.scope_.immer_.shouldUseStrictIteration();
- } else n = KW(e, !0);
- return zW(n, (e, t) => {
- HW(n, e, mG(t));
+ t.finalized_ = !0, n = GW(e, t.scope_.immer_.useStrictShallowCopy_), r = t.scope_.immer_.shouldUseStrictIteration();
+ } else n = GW(e, !0);
+ return RW(n, (e, t) => {
+ VW(n, e, pG(t));
}, r), t && (t.finalized_ = !1), n;
}
-new vTe().produce;
-function hG(e) {
+new STe().produce;
+function mG(e) {
return e;
}
//#endregion
//#region node_modules/recharts/es6/state/legendSlice.js
-var gG = iU({
+var hG = rU({
name: "legend",
initialState: {
settings: {
@@ -57397,43 +57493,43 @@ var gG = iU({
},
addLegendPayload: {
reducer(e, t) {
- e.payload.push(hG(t.payload));
+ e.payload.push(mG(t.payload));
},
- prepare: eU()
+ prepare: $H()
},
replaceLegendPayload: {
reducer(e, t) {
- var { prev: n, next: r } = t.payload, i = GH(e).payload.indexOf(hG(n));
- i > -1 && (e.payload[i] = hG(r));
+ var { prev: n, next: r } = t.payload, i = WH(e).payload.indexOf(mG(n));
+ i > -1 && (e.payload[i] = mG(r));
},
- prepare: eU()
+ prepare: $H()
},
removeLegendPayload: {
reducer(e, t) {
- var n = GH(e).payload.indexOf(hG(t.payload));
+ var n = WH(e).payload.indexOf(mG(t.payload));
n > -1 && e.payload.splice(n, 1);
},
- prepare: eU()
+ prepare: $H()
}
}
-}), { setLegendSize: _G, setLegendSettings: bTe, addLegendPayload: vG, replaceLegendPayload: yG, removeLegendPayload: bG } = gG.actions, xTe = gG.reducer, STe = /* @__PURE__ */ xt(((e) => {
+}), { setLegendSize: gG, setLegendSettings: wTe, addLegendPayload: _G, replaceLegendPayload: vG, removeLegendPayload: yG } = hG.actions, TTe = hG.reducer, ETe = /* @__PURE__ */ xt(((e) => {
var t = Ot();
t.useSyncExternalStore, t.useRef, t.useEffect, t.useMemo, t.useDebugValue;
}));
(/* @__PURE__ */ xt(((e, t) => {
- t.exports = STe();
+ t.exports = ETe();
})))();
-function CTe(e) {
+function DTe(e) {
e();
}
-function wTe() {
+function OTe() {
let e = null, t = null;
return {
clear() {
e = null, t = null;
},
notify() {
- CTe(() => {
+ DTe(() => {
let t = e;
for (; t;) t.callback(), t = t.next;
});
@@ -57455,12 +57551,12 @@ function wTe() {
}
};
}
-var xG = {
+var bG = {
notify() {},
get: () => []
};
-function TTe(e, t) {
- let n, r = xG, i = 0, a = !1;
+function kTe(e, t) {
+ let n, r = bG, i = 0, a = !1;
function o(e) {
u();
let t = r.subscribe(e), n = !1;
@@ -57478,10 +57574,10 @@ function TTe(e, t) {
return a;
}
function u() {
- i++, n || (n = t ? t.addNestedSub(c) : e.subscribe(c), r = wTe());
+ i++, n || (n = t ? t.addNestedSub(c) : e.subscribe(c), r = OTe());
}
function d() {
- i--, n && i === 0 && (n(), n = void 0, r.clear(), r = xG);
+ i--, n && i === 0 && (n(), n = void 0, r.clear(), r = bG);
}
function f() {
a || (a = !0, u());
@@ -57500,44 +57596,44 @@ function TTe(e, t) {
};
return m;
}
-var ETe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, DTe = typeof navigator < "u" && navigator.product === "ReactNative", OTe = ETe || DTe ? B.useLayoutEffect : B.useEffect;
-function SG(e, t) {
+var ATe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, jTe = typeof navigator < "u" && navigator.product === "ReactNative", MTe = ATe || jTe ? B.useLayoutEffect : B.useEffect;
+function xG(e, t) {
return e === t ? e !== 0 || t !== 0 || 1 / e == 1 / t : e !== e && t !== t;
}
-function kTe(e, t) {
- if (SG(e, t)) return !0;
+function NTe(e, t) {
+ if (xG(e, t)) return !0;
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
let n = Object.keys(e), r = Object.keys(t);
if (n.length !== r.length) return !1;
- for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !SG(e[n[r]], t[n[r]])) return !1;
+ for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !xG(e[n[r]], t[n[r]])) return !1;
return !0;
}
-var ATe = /* @__PURE__ */ Symbol.for("react-redux-context"), jTe = typeof globalThis < "u" ? globalThis : {};
-function MTe() {
+var PTe = /* @__PURE__ */ Symbol.for("react-redux-context"), FTe = typeof globalThis < "u" ? globalThis : {};
+function ITe() {
if (!B.createContext) return {};
- let e = jTe[ATe] ??= /* @__PURE__ */ new Map(), t = e.get(B.createContext);
+ let e = FTe[PTe] ??= /* @__PURE__ */ new Map(), t = e.get(B.createContext);
return t || (t = B.createContext(null), e.set(B.createContext, t)), t;
}
-var NTe = /* @__PURE__ */ MTe();
-function PTe(e) {
+var LTe = /* @__PURE__ */ ITe();
+function RTe(e) {
let { children: t, context: n, serverState: r, store: i } = e, a = B.useMemo(() => {
- let e = TTe(i);
+ let e = kTe(i);
return {
store: i,
subscription: e,
getServerState: r ? () => r : void 0
};
}, [i, r]), o = B.useMemo(() => i.getState(), [i]);
- OTe(() => {
+ MTe(() => {
let { subscription: e } = a;
return e.onStateChange = e.notifyNestedSubs, e.trySubscribe(), o !== i.getState() && e.notifyNestedSubs(), () => {
e.tryUnsubscribe(), e.onStateChange = void 0;
};
}, [a, o]);
- let s = n || NTe;
+ let s = n || LTe;
return /* @__PURE__ */ B.createElement(s.Provider, { value: a }, t);
}
-var FTe = PTe, ITe = /* @__PURE__ */ new Set([
+var zTe = RTe, BTe = /* @__PURE__ */ new Set([
"axisLine",
"tickLine",
"activeBar",
@@ -57560,29 +57656,29 @@ var FTe = PTe, ITe = /* @__PURE__ */ new Set([
"radius",
"throttledEvents"
]);
-function LTe(e, t) {
+function VTe(e, t) {
return e == null && t == null ? !0 : typeof e == "number" && typeof t == "number" ? e === t || e !== e && t !== t : e === t;
}
-function CG(e, t) {
- for (var n of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) if (ITe.has(n)) {
+function SG(e, t) {
+ for (var n of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) if (BTe.has(n)) {
if (e[n] == null && t[n] == null) continue;
- if (!kTe(e[n], t[n])) return !1;
- } else if (!LTe(e[n], t[n])) return !1;
+ if (!NTe(e[n], t[n])) return !1;
+ } else if (!VTe(e[n], t[n])) return !1;
return !0;
}
//#endregion
//#region node_modules/recharts/es6/component/Legend.js
-var RTe = ["contextPayload"];
-function wG() {
- return wG = Object.assign ? Object.assign.bind() : function(e) {
+var HTe = ["contextPayload"];
+function CG() {
+ return CG = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, wG.apply(null, arguments);
+ }, CG.apply(null, arguments);
}
-function TG(e, t) {
+function wG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -57592,30 +57688,30 @@ function TG(e, t) {
}
return n;
}
-function EG(e) {
+function TG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? TG(Object(n), !0).forEach(function(t) {
- zTe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : TG(Object(n)).forEach(function(t) {
+ t % 2 ? wG(Object(n), !0).forEach(function(t) {
+ UTe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : wG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function zTe(e, t, n) {
- return (t = BTe(t)) in e ? Object.defineProperty(e, t, {
+function UTe(e, t, n) {
+ return (t = WTe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function BTe(e) {
- var t = VTe(e, "string");
+function WTe(e) {
+ var t = GTe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function VTe(e, t) {
+function GTe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -57625,16 +57721,16 @@ function VTe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function HTe(e, t) {
+function KTe(e, t) {
if (e == null) return {};
- var n, r, i = UTe(e, t);
+ var n, r, i = qTe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function UTe(e, t) {
+function qTe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -57643,36 +57739,36 @@ function UTe(e, t) {
}
return n;
}
-function WTe(e) {
+function JTe(e) {
return e.value;
}
-function GTe(e) {
- var { contextPayload: t } = e, n = HTe(e, RTe), r = _V(t, e.payloadUniqBy, WTe), i = EG(EG({}, n), {}, { payload: r });
- return /*#__PURE__*/ B.isValidElement(e.content) ? /*#__PURE__*/ B.cloneElement(e.content, i) : typeof e.content == "function" ? /*#__PURE__*/ B.createElement(e.content, i) : /*#__PURE__*/ B.createElement(vSe, i);
+function YTe(e) {
+ var { contextPayload: t } = e, n = KTe(e, HTe), r = gV(t, e.payloadUniqBy, JTe), i = TG(TG({}, n), {}, { payload: r });
+ return /*#__PURE__*/ B.isValidElement(e.content) ? /*#__PURE__*/ B.cloneElement(e.content, i) : typeof e.content == "function" ? /*#__PURE__*/ B.createElement(e.content, i) : /*#__PURE__*/ B.createElement(SSe, i);
}
-function KTe(e, t, n, r, i, a) {
+function XTe(e, t, n, r, i, a) {
var { layout: o, align: s, verticalAlign: c } = t, l, u;
- return (!e || (e.left === void 0 || e.left === null) && (e.right === void 0 || e.right === null)) && (l = s === "center" && o === "vertical" ? { left: ((r || 0) - a.width) / 2 } : s === "right" ? { right: n && n.right || 0 } : { left: n && n.left || 0 }), (!e || (e.top === void 0 || e.top === null) && (e.bottom === void 0 || e.bottom === null)) && (u = c === "middle" ? { top: ((i || 0) - a.height) / 2 } : c === "bottom" ? { bottom: n && n.bottom || 0 } : { top: n && n.top || 0 }), EG(EG({}, l), u);
+ return (!e || (e.left === void 0 || e.left === null) && (e.right === void 0 || e.right === null)) && (l = s === "center" && o === "vertical" ? { left: ((r || 0) - a.width) / 2 } : s === "right" ? { right: n && n.right || 0 } : { left: n && n.left || 0 }), (!e || (e.top === void 0 || e.top === null) && (e.bottom === void 0 || e.bottom === null)) && (u = c === "middle" ? { top: ((i || 0) - a.height) / 2 } : c === "bottom" ? { bottom: n && n.bottom || 0 } : { top: n && n.top || 0 }), TG(TG({}, l), u);
}
-function qTe(e) {
- var t = yV();
+function ZTe(e) {
+ var t = vV();
return (0, B.useEffect)(() => {
- t(bTe(e));
+ t(wTe(e));
}, [t, e]), null;
}
-function JTe(e) {
- var t = yV();
- return (0, B.useEffect)(() => (t(_G(e)), () => {
- t(_G({
+function QTe(e) {
+ var t = vV();
+ return (0, B.useEffect)(() => (t(gG(e)), () => {
+ t(gG({
width: 0,
height: 0
}));
}), [t, e]), null;
}
-function YTe(e, t, n, r) {
+function $Te(e, t, n, r) {
return e === "vertical" && t != null ? { height: t } : e === "horizontal" ? { width: n || r } : null;
}
-var XTe = {
+var eEe = {
align: "center",
iconSize: 14,
inactiveColor: "#ccc",
@@ -57680,28 +57776,28 @@ var XTe = {
layout: "horizontal",
verticalAlign: "bottom"
};
-function ZTe(e) {
- var t = UB(e, XTe), n = TCe(), r = fxe(), i = cTe(), { width: a, height: o, wrapperStyle: s, portal: c } = t, [l, u] = AV([n]), d = SW(), f = CW();
+function tEe(e) {
+ var t = HB(e, eEe), n = kCe(), r = gxe(), i = fTe(), { width: a, height: o, wrapperStyle: s, portal: c } = t, [l, u] = kV([n]), d = xW(), f = SW();
if (d == null || f == null) return null;
- var p = d - (i?.left || 0) - (i?.right || 0), m = YTe(t.layout, o, a, p), h = c ? s : EG(EG({
+ var p = d - (i?.left || 0) - (i?.right || 0), m = $Te(t.layout, o, a, p), h = c ? s : TG(TG({
position: "absolute",
width: m?.width || a || "auto",
height: m?.height || o || "auto"
- }, KTe(s, t, i, d, f, l)), s), g = c ?? r;
+ }, XTe(s, t, i, d, f, l)), s), g = c ?? r;
if (g == null || n == null) return null;
var _ = /*#__PURE__*/ B.createElement("div", {
className: "recharts-legend-wrapper",
style: h,
ref: u
- }, /*#__PURE__*/ B.createElement(qTe, {
+ }, /*#__PURE__*/ B.createElement(ZTe, {
layout: t.layout,
align: t.align,
verticalAlign: t.verticalAlign,
itemSorter: t.itemSorter
- }), !c && /*#__PURE__*/ B.createElement(JTe, {
+ }), !c && /*#__PURE__*/ B.createElement(QTe, {
width: l.width,
height: l.height
- }), /*#__PURE__*/ B.createElement(GTe, wG({}, t, m, {
+ }), /*#__PURE__*/ B.createElement(YTe, CG({}, t, m, {
margin: i,
chartWidth: d,
chartHeight: f,
@@ -57709,20 +57805,20 @@ function ZTe(e) {
})));
return /*#__PURE__*/ (0, $f.createPortal)(_, g);
}
-var DG = /*#__PURE__*/ B.memo(ZTe, CG);
-DG.displayName = "Legend";
+var EG = /*#__PURE__*/ B.memo(tEe, SG);
+EG.displayName = "Legend";
//#endregion
//#region node_modules/recharts/es6/component/DefaultTooltipContent.js
-function OG() {
- return OG = Object.assign ? Object.assign.bind() : function(e) {
+function DG() {
+ return DG = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, OG.apply(null, arguments);
+ }, DG.apply(null, arguments);
}
-function kG(e, t) {
+function OG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -57732,30 +57828,30 @@ function kG(e, t) {
}
return n;
}
-function AG(e) {
+function kG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? kG(Object(n), !0).forEach(function(t) {
- QTe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : kG(Object(n)).forEach(function(t) {
+ t % 2 ? OG(Object(n), !0).forEach(function(t) {
+ nEe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : OG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function QTe(e, t, n) {
- return (t = $Te(t)) in e ? Object.defineProperty(e, t, {
+function nEe(e, t, n) {
+ return (t = rEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function $Te(e) {
- var t = eEe(e, "string");
+function rEe(e) {
+ var t = iEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function eEe(e, t) {
+function iEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -57765,10 +57861,10 @@ function eEe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function tEe(e) {
- return Array.isArray(e) && wB(e[0]) && wB(e[1]) ? e.join(" ~ ") : e;
+function aEe(e) {
+ return Array.isArray(e) && CB(e[0]) && CB(e[1]) ? e.join(" ~ ") : e;
}
-var jG = {
+var AG = {
separator: " : ",
contentStyle: {
margin: 0,
@@ -57786,30 +57882,30 @@ var jG = {
labelStyle: {},
accessibilityLayer: !1
};
-function nEe(e, t) {
- return t == null ? e : DV(e, t);
+function oEe(e, t) {
+ return t == null ? e : EV(e, t);
}
-var rEe = (e) => {
- var { separator: t = jG.separator, contentStyle: n, itemStyle: r, labelStyle: i = jG.labelStyle, payload: a, formatter: o, itemSorter: s, wrapperClassName: c, labelClassName: l, label: u, labelFormatter: d, accessibilityLayer: f = jG.accessibilityLayer } = e, p = () => {
+var sEe = (e) => {
+ var { separator: t = AG.separator, contentStyle: n, itemStyle: r, labelStyle: i = AG.labelStyle, payload: a, formatter: o, itemSorter: s, wrapperClassName: c, labelClassName: l, label: u, labelFormatter: d, accessibilityLayer: f = AG.accessibilityLayer } = e, p = () => {
if (a && a.length) {
var e = {
padding: 0,
margin: 0
- }, n = nEe(a, s).map((e, n) => {
+ }, n = oEe(a, s).map((e, n) => {
if (e.type === "none") return null;
- var i = e.formatter || o || tEe, { value: s, name: c } = e, l = s, u = c;
+ var i = e.formatter || o || aEe, { value: s, name: c } = e, l = s, u = c;
if (i) {
var d = i(s, c, e, n, a);
if (Array.isArray(d)) [l, u] = d;
else if (d != null) l = d;
else return null;
}
- var f = AG(AG({}, jG.itemStyle), {}, { color: e.color || jG.itemStyle.color }, r);
+ var f = kG(kG({}, AG.itemStyle), {}, { color: e.color || AG.itemStyle.color }, r);
return /*#__PURE__*/ B.createElement("li", {
className: "recharts-tooltip-item",
key: `tooltip-item-${n}`,
style: f
- }, wB(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-name" }, u) : null, wB(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-separator" }, t) : null, /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-value" }, l), /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-unit" }, e.unit || ""));
+ }, CB(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-name" }, u) : null, CB(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-separator" }, t) : null, /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-value" }, l), /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-unit" }, e.unit || ""));
});
return /*#__PURE__*/ B.createElement("ul", {
className: "recharts-tooltip-item-list",
@@ -57817,30 +57913,30 @@ var rEe = (e) => {
}, n);
}
return null;
- }, m = AG(AG({}, jG.contentStyle), n), h = AG({ margin: 0 }, i), g = !AB(u), _ = g ? u : "", v = _h("recharts-default-tooltip", c), y = _h("recharts-tooltip-label", l);
+ }, m = kG(kG({}, AG.contentStyle), n), h = kG({ margin: 0 }, i), g = !kB(u), _ = g ? u : "", v = _h("recharts-default-tooltip", c), y = _h("recharts-tooltip-label", l);
g && d && a != null && (_ = d(u, a));
var b = f ? {
role: "status",
"aria-live": "assertive"
} : {};
- return /*#__PURE__*/ B.createElement("div", OG({
+ return /*#__PURE__*/ B.createElement("div", DG({
className: v,
style: m
}, b), /*#__PURE__*/ B.createElement("p", {
className: y,
style: h
}, /*#__PURE__*/ B.isValidElement(_) ? _ : `${_}`), p());
-}, MG = "recharts-tooltip-wrapper", iEe = { visibility: "hidden" };
-function aEe(e) {
+}, jG = "recharts-tooltip-wrapper", cEe = { visibility: "hidden" };
+function lEe(e) {
var { coordinate: t, translateX: n, translateY: r } = e;
- return _h(MG, {
- [`${MG}-right`]: Z(n) && t && Z(t.x) && n >= t.x,
- [`${MG}-left`]: Z(n) && t && Z(t.x) && n < t.x,
- [`${MG}-bottom`]: Z(r) && t && Z(t.y) && r >= t.y,
- [`${MG}-top`]: Z(r) && t && Z(t.y) && r < t.y
+ return _h(jG, {
+ [`${jG}-right`]: Z(n) && t && Z(t.x) && n >= t.x,
+ [`${jG}-left`]: Z(n) && t && Z(t.x) && n < t.x,
+ [`${jG}-bottom`]: Z(r) && t && Z(t.y) && r >= t.y,
+ [`${jG}-top`]: Z(r) && t && Z(t.y) && r < t.y
});
}
-function NG(e) {
+function MG(e) {
var { allowEscapeViewBox: t, coordinate: n, key: r, offset: i, position: a, reverseDirection: o, tooltipDimension: s, viewBox: c, viewBoxDimension: l } = e;
if (a && Z(a[r])) return a[r];
var u = n[r] - s - (i > 0 ? i : 0), d = n[r] + i;
@@ -57848,13 +57944,13 @@ function NG(e) {
var f = c[r];
return f == null ? 0 : o[r] ? Math.max(u < f ? d : u, f) : l == null ? 0 : d + s > f + l ? Math.max(u, f) : Math.max(d, f);
}
-function oEe(e) {
+function uEe(e) {
var { translateX: t, translateY: n, useTranslate3d: r } = e;
return { transform: r ? `translate3d(${t}px, ${n}px, 0)` : `translate(${t}px, ${n}px)` };
}
-function sEe(e) {
+function dEe(e) {
var { allowEscapeViewBox: t, coordinate: n, offsetTop: r, offsetLeft: i, position: a, reverseDirection: o, tooltipBox: s, useTranslate3d: c, viewBox: l } = e, u, d, f;
- return s.height > 0 && s.width > 0 && n ? (d = NG({
+ return s.height > 0 && s.width > 0 && n ? (d = MG({
allowEscapeViewBox: t,
coordinate: n,
key: "x",
@@ -57864,7 +57960,7 @@ function sEe(e) {
tooltipDimension: s.width,
viewBox: l,
viewBoxDimension: l.width
- }), f = NG({
+ }), f = MG({
allowEscapeViewBox: t,
coordinate: n,
key: "y",
@@ -57874,27 +57970,27 @@ function sEe(e) {
tooltipDimension: s.height,
viewBox: l,
viewBoxDimension: l.height
- }), u = oEe({
+ }), u = uEe({
translateX: d,
translateY: f,
useTranslate3d: c
- })) : u = iEe, {
+ })) : u = cEe, {
cssProperties: u,
- cssClasses: aEe({
+ cssClasses: lEe({
translateX: d,
translateY: f,
coordinate: n
})
};
}
-var PG = {
+var NG = {
devToolsEnabled: !0,
isSsr: !(typeof window < "u" && window.document && window.document.createElement && window.setTimeout)
};
//#endregion
//#region node_modules/recharts/es6/util/usePrefersReducedMotion.js
-function FG() {
- var [e, t] = (0, B.useState)(() => PG.isSsr || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
+function PG() {
+ var [e, t] = (0, B.useState)(() => NG.isSsr || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
return (0, B.useEffect)(() => {
if (window.matchMedia) {
var e = window.matchMedia("(prefers-reduced-motion: reduce)"), n = () => {
@@ -57908,7 +58004,7 @@ function FG() {
}
//#endregion
//#region node_modules/recharts/es6/component/TooltipBoundingBox.js
-function IG(e, t) {
+function FG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -57918,30 +58014,30 @@ function IG(e, t) {
}
return n;
}
-function LG(e) {
+function IG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? IG(Object(n), !0).forEach(function(t) {
- cEe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : IG(Object(n)).forEach(function(t) {
+ t % 2 ? FG(Object(n), !0).forEach(function(t) {
+ fEe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : FG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function cEe(e, t, n) {
- return (t = lEe(t)) in e ? Object.defineProperty(e, t, {
+function fEe(e, t, n) {
+ return (t = pEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function lEe(e) {
- var t = uEe(e, "string");
+function pEe(e) {
+ var t = mEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function uEe(e, t) {
+function mEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -57951,11 +58047,11 @@ function uEe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function dEe(e) {
+function hEe(e) {
if (!(e.prefersReducedMotion && e.isAnimationActive === "auto") && e.isAnimationActive && e.active) return `transform ${e.animationDuration}ms ${e.animationEasing}`;
}
-function fEe(e) {
- var t = FG(), [n, r] = B.useState(() => ({
+function gEe(e) {
+ var t = PG(), [n, r] = B.useState(() => ({
dismissed: !1,
dismissedAtCoordinate: {
x: 0,
@@ -57975,8 +58071,8 @@ function fEe(e) {
return document.addEventListener("keydown", t), () => {
document.removeEventListener("keydown", t);
};
- }, [e.coordinate?.x, e.coordinate?.y]), n.dismissed && ((e.coordinate?.x ?? 0) !== n.dismissedAtCoordinate.x || (e.coordinate?.y ?? 0) !== n.dismissedAtCoordinate.y) && r(LG(LG({}, n), {}, { dismissed: !1 }));
- var { cssClasses: i, cssProperties: a } = sEe({
+ }, [e.coordinate?.x, e.coordinate?.y]), n.dismissed && ((e.coordinate?.x ?? 0) !== n.dismissedAtCoordinate.x || (e.coordinate?.y ?? 0) !== n.dismissedAtCoordinate.y) && r(IG(IG({}, n), {}, { dismissed: !1 }));
+ var { cssClasses: i, cssProperties: a } = dEe({
allowEscapeViewBox: e.allowEscapeViewBox,
coordinate: e.coordinate,
offsetLeft: typeof e.offset == "number" ? e.offset : e.offset.x,
@@ -57989,7 +58085,7 @@ function fEe(e) {
},
useTranslate3d: e.useTranslate3d,
viewBox: e.viewBox
- }), o = LG(LG({}, e.hasPortalFromProps ? {} : LG(LG({ transition: dEe({
+ }), o = IG(IG({}, e.hasPortalFromProps ? {} : IG(IG({ transition: hEe({
prefersReducedMotion: t,
isAnimationActive: e.isAnimationActive,
active: e.active,
@@ -58009,19 +58105,19 @@ function fEe(e) {
ref: e.innerRef
}, e.children);
}
-var pEe = /*#__PURE__*/ B.memo(fEe), RG = () => Q((e) => e.rootProps.accessibilityLayer) ?? !0;
+var _Ee = /*#__PURE__*/ B.memo(gEe), LG = () => Q((e) => e.rootProps.accessibilityLayer) ?? !0;
//#endregion
//#region node_modules/recharts/es6/shape/Curve.js
-function zG() {
- return zG = Object.assign ? Object.assign.bind() : function(e) {
+function RG() {
+ return RG = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, zG.apply(null, arguments);
+ }, RG.apply(null, arguments);
}
-function BG(e, t) {
+function zG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -58031,30 +58127,30 @@ function BG(e, t) {
}
return n;
}
-function VG(e) {
+function BG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? BG(Object(n), !0).forEach(function(t) {
- mEe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : BG(Object(n)).forEach(function(t) {
+ t % 2 ? zG(Object(n), !0).forEach(function(t) {
+ vEe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : zG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function mEe(e, t, n) {
- return (t = hEe(t)) in e ? Object.defineProperty(e, t, {
+function vEe(e, t, n) {
+ return (t = yEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function hEe(e) {
- var t = gEe(e, "string");
+function yEe(e) {
+ var t = bEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function gEe(e, t) {
+function bEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -58064,40 +58160,40 @@ function gEe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var HG = {
- curveBasisClosed: Axe,
- curveBasisOpen: jxe,
- curveBasis: kxe,
- curveBumpX: hxe,
- curveBumpY: gxe,
- curveLinearClosed: Mxe,
- curveLinear: Fz,
- curveMonotoneX: Nxe,
- curveMonotoneY: Pxe,
- curveNatural: Fxe,
- curveStep: Ixe,
- curveStepAfter: Rxe,
- curveStepBefore: Lxe
-}, UG = (e) => NU(e.x) && NU(e.y), WG = (e) => e.base != null && UG(e.base) && UG(e), GG = (e) => e.x, KG = (e) => e.y, _Ee = (e, t) => {
+var VG = {
+ curveBasisClosed: Pxe,
+ curveBasisOpen: Fxe,
+ curveBasis: Nxe,
+ curveBumpX: yxe,
+ curveBumpY: bxe,
+ curveLinearClosed: Ixe,
+ curveLinear: Pz,
+ curveMonotoneX: Lxe,
+ curveMonotoneY: Rxe,
+ curveNatural: zxe,
+ curveStep: Bxe,
+ curveStepAfter: Hxe,
+ curveStepBefore: Vxe
+}, HG = (e) => MU(e.x) && MU(e.y), UG = (e) => e.base != null && HG(e.base) && HG(e), WG = (e) => e.x, GG = (e) => e.y, xEe = (e, t) => {
if (typeof e == "function") return e;
- var n = `curve${jB(e)}`;
+ var n = `curve${AB(e)}`;
if ((n === "curveMonotone" || n === "curveBump") && t) {
- var r = HG[`${n}${t === "vertical" ? "Y" : "X"}`];
+ var r = VG[`${n}${t === "vertical" ? "Y" : "X"}`];
if (r) return r;
}
- return HG[n] || Fz;
-}, qG = {
+ return VG[n] || Pz;
+}, KG = {
connectNulls: !1,
type: "linear"
-}, vEe = (e) => {
- var { type: t = qG.type, points: n = [], baseLine: r, layout: i, connectNulls: a = qG.connectNulls } = e, o = _Ee(t, i), s = a ? n.filter(UG) : n;
+}, SEe = (e) => {
+ var { type: t = KG.type, points: n = [], baseLine: r, layout: i, connectNulls: a = KG.connectNulls } = e, o = xEe(t, i), s = a ? n.filter(HG) : n;
if (Array.isArray(r)) {
- var c, l = n.map((e, t) => VG(VG({}, e), {}, { base: r[t] }));
- return c = i === "vertical" ? zz().y(KG).x1(GG).x0((e) => e.base.x) : zz().x(GG).y1(KG).y0((e) => e.base.y), c.defined(WG).curve(o)(a ? l.filter(WG) : l);
+ var c, l = n.map((e, t) => BG(BG({}, e), {}, { base: r[t] }));
+ return c = i === "vertical" ? Rz().y(GG).x1(WG).x0((e) => e.base.x) : Rz().x(WG).y1(GG).y0((e) => e.base.y), c.defined(UG).curve(o)(a ? l.filter(UG) : l);
}
- return (i === "vertical" && Z(r) ? zz().y(KG).x1(GG).x0(r) : Z(r) ? zz().x(GG).y1(KG).y0(r) : Rz().x(GG).y(KG)).defined(UG).curve(o)(s);
-}, JG = (e) => {
- var { className: t, points: n, path: r, pathRef: i } = e, a = TW();
+ return (i === "vertical" && Z(r) ? Rz().y(GG).x1(WG).x0(r) : Z(r) ? Rz().x(WG).y1(GG).y0(r) : Lz().x(WG).y(GG)).defined(HG).curve(o)(s);
+}, qG = (e) => {
+ var { className: t, points: n, path: r, pathRef: i } = e, a = wW();
if ((!n || !n.length) && !r) return null;
var o = {
type: e.type,
@@ -58105,13 +58201,13 @@ var HG = {
baseLine: e.baseLine,
layout: e.layout || a,
connectNulls: e.connectNulls
- }, s = n && n.length ? vEe(o) : r;
- return /*#__PURE__*/ B.createElement("path", zG({}, pz(e), BB(e), {
+ }, s = n && n.length ? SEe(o) : r;
+ return /*#__PURE__*/ B.createElement("path", RG({}, fz(e), zB(e), {
className: _h("recharts-curve", t),
d: s === null ? void 0 : s,
ref: i
}));
-}, yEe = [
+}, CEe = [
"x",
"y",
"top",
@@ -58120,16 +58216,16 @@ var HG = {
"height",
"className"
];
-function YG() {
- return YG = Object.assign ? Object.assign.bind() : function(e) {
+function JG() {
+ return JG = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, YG.apply(null, arguments);
+ }, JG.apply(null, arguments);
}
-function XG(e, t) {
+function YG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -58139,30 +58235,30 @@ function XG(e, t) {
}
return n;
}
-function bEe(e) {
+function wEe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? XG(Object(n), !0).forEach(function(t) {
- xEe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : XG(Object(n)).forEach(function(t) {
+ t % 2 ? YG(Object(n), !0).forEach(function(t) {
+ TEe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : YG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function xEe(e, t, n) {
- return (t = SEe(t)) in e ? Object.defineProperty(e, t, {
+function TEe(e, t, n) {
+ return (t = EEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function SEe(e) {
- var t = CEe(e, "string");
+function EEe(e) {
+ var t = DEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function CEe(e, t) {
+function DEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -58172,16 +58268,16 @@ function CEe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function wEe(e, t) {
+function OEe(e, t) {
if (e == null) return {};
- var n, r, i = TEe(e, t);
+ var n, r, i = kEe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function TEe(e, t) {
+function kEe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -58190,8 +58286,8 @@ function TEe(e, t) {
}
return n;
}
-var EEe = (e, t, n, r, i, a) => `M${e},${i}v${r}M${a},${t}h${n}`, DEe = (e) => {
- var { x: t = 0, y: n = 0, top: r = 0, left: i = 0, width: a = 0, height: o = 0, className: s } = e, c = wEe(e, yEe), l = bEe({
+var AEe = (e, t, n, r, i, a) => `M${e},${i}v${r}M${a},${t}h${n}`, jEe = (e) => {
+ var { x: t = 0, y: n = 0, top: r = 0, left: i = 0, width: a = 0, height: o = 0, className: s } = e, c = OEe(e, CEe), l = wEe({
x: t,
y: n,
top: r,
@@ -58199,14 +58295,14 @@ var EEe = (e, t, n, r, i, a) => `M${e},${i}v${r}M${a},${t}h${n}`, DEe = (e) => {
width: a,
height: o
}, c);
- return !Z(t) || !Z(n) || !Z(a) || !Z(o) || !Z(r) || !Z(i) ? null : /*#__PURE__*/ B.createElement("path", YG({}, hz(l), {
+ return !Z(t) || !Z(n) || !Z(a) || !Z(o) || !Z(r) || !Z(i) ? null : /*#__PURE__*/ B.createElement("path", JG({}, mz(l), {
className: _h("recharts-cross", s),
- d: EEe(t, n, a, o, r, i)
+ d: AEe(t, n, a, o, r, i)
}));
};
//#endregion
//#region node_modules/recharts/es6/util/cursor/getCursorRectangle.js
-function OEe(e, t, n, r) {
+function MEe(e, t, n, r) {
var i = r / 2;
return {
stroke: "none",
@@ -58219,7 +58315,7 @@ function OEe(e, t, n, r) {
}
//#endregion
//#region node_modules/recharts/es6/animation/util.js
-function ZG(e, t) {
+function XG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -58229,30 +58325,30 @@ function ZG(e, t) {
}
return n;
}
-function QG(e) {
+function ZG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? ZG(Object(n), !0).forEach(function(t) {
- kEe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ZG(Object(n)).forEach(function(t) {
+ t % 2 ? XG(Object(n), !0).forEach(function(t) {
+ NEe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : XG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function kEe(e, t, n) {
- return (t = AEe(t)) in e ? Object.defineProperty(e, t, {
+function NEe(e, t, n) {
+ return (t = PEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function AEe(e) {
- var t = jEe(e, "string");
+function PEe(e) {
+ var t = FEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function jEe(e, t) {
+function FEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -58262,10 +58358,10 @@ function jEe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var MEe = (e) => e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`), $G = (e, t, n) => e.map((e) => `${MEe(e)} ${t}ms ${n}`).join(","), NEe = (e, t) => [Object.keys(e), Object.keys(t)].reduce((e, t) => e.filter((e) => t.includes(e))), eK = (e, t) => Object.keys(t).reduce((n, r) => QG(QG({}, n), {}, { [r]: e(r, t[r]) }), {});
+var IEe = (e) => e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`), QG = (e, t, n) => e.map((e) => `${IEe(e)} ${t}ms ${n}`).join(","), LEe = (e, t) => [Object.keys(e), Object.keys(t)].reduce((e, t) => e.filter((e) => t.includes(e))), $G = (e, t) => Object.keys(t).reduce((n, r) => ZG(ZG({}, n), {}, { [r]: e(r, t[r]) }), {});
//#endregion
//#region node_modules/recharts/es6/animation/configUpdate.js
-function tK(e, t) {
+function eK(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -58275,30 +58371,30 @@ function tK(e, t) {
}
return n;
}
-function nK(e) {
+function tK(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? tK(Object(n), !0).forEach(function(t) {
- PEe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : tK(Object(n)).forEach(function(t) {
+ t % 2 ? eK(Object(n), !0).forEach(function(t) {
+ REe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : eK(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function PEe(e, t, n) {
- return (t = FEe(t)) in e ? Object.defineProperty(e, t, {
+function REe(e, t, n) {
+ return (t = zEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function FEe(e) {
- var t = IEe(e, "string");
+function zEe(e) {
+ var t = BEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function IEe(e, t) {
+function BEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -58308,51 +58404,51 @@ function IEe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var rK = (e, t, n) => e + (t - e) * n, iK = (e) => {
+var nK = (e, t, n) => e + (t - e) * n, rK = (e) => {
var { from: t, to: n } = e;
return t !== n;
-}, aK = (e, t, n) => {
- var r = eK((t, n) => {
- if (iK(n)) {
+}, iK = (e, t, n) => {
+ var r = $G((t, n) => {
+ if (rK(n)) {
var [r, i] = e(n.from, n.to, n.velocity);
- return nK(nK({}, n), {}, {
+ return tK(tK({}, n), {}, {
from: r,
velocity: i
});
}
return n;
}, t);
- return n < 1 ? eK((e, t) => iK(t) && r[e] != null ? nK(nK({}, t), {}, {
- velocity: rK(t.velocity, r[e].velocity, n),
- from: rK(t.from, r[e].from, n)
- }) : t, t) : aK(e, r, n - 1);
+ return n < 1 ? $G((e, t) => rK(t) && r[e] != null ? tK(tK({}, t), {}, {
+ velocity: nK(t.velocity, r[e].velocity, n),
+ from: nK(t.from, r[e].from, n)
+ }) : t, t) : iK(e, r, n - 1);
};
-function LEe(e, t, n, r, i, a) {
- var o, s = r.reduce((n, r) => nK(nK({}, n), {}, { [r]: {
+function VEe(e, t, n, r, i, a) {
+ var o, s = r.reduce((n, r) => tK(tK({}, n), {}, { [r]: {
from: e[r],
velocity: 0,
to: t[r]
- } }), {}), c = () => eK((e, t) => t.from, s), l = () => !Object.values(s).filter(iK).length, u = null, d = (r) => {
+ } }), {}), c = () => $G((e, t) => t.from, s), l = () => !Object.values(s).filter(rK).length, u = null, d = (r) => {
o ||= r;
var f = (r - o) / n.dt;
- s = aK(n, s, f), i(nK(nK(nK({}, e), t), c())), o = r, l() || (u = a.setTimeout(d));
+ s = iK(n, s, f), i(tK(tK(tK({}, e), t), c())), o = r, l() || (u = a.setTimeout(d));
};
return () => (u = a.setTimeout(d), () => {
var e;
(e = u) == null || e();
});
}
-function REe(e, t, n, r, i, a, o) {
+function HEe(e, t, n, r, i, a, o) {
var s = null, c = i.reduce((n, r) => {
var i = e[r], a = t[r];
- return i == null || a == null ? n : nK(nK({}, n), {}, { [r]: [i, a] });
+ return i == null || a == null ? n : tK(tK({}, n), {}, { [r]: [i, a] });
}, {}), l, u = (i) => {
l ||= i;
- var d = (i - l) / r, f = eK((e, t) => rK(...t, n(d)), c);
- if (a(nK(nK(nK({}, e), t), f)), d < 1) s = o.setTimeout(u);
+ var d = (i - l) / r, f = $G((e, t) => nK(...t, n(d)), c);
+ if (a(tK(tK(tK({}, e), t), f)), d < 1) s = o.setTimeout(u);
else {
- var p = eK((e, t) => rK(...t, n(1)), c);
- a(nK(nK(nK({}, e), t), p));
+ var p = $G((e, t) => nK(...t, n(1)), c);
+ a(tK(tK(tK({}, e), t), p));
}
};
return () => (s = o.setTimeout(u), () => {
@@ -58360,15 +58456,15 @@ function REe(e, t, n, r, i, a, o) {
(e = s) == null || e();
});
}
-var zEe = (e, t, n, r, i, a) => {
- var o = NEe(e, t);
- return n == null ? () => (i(nK(nK({}, e), t)), () => {}) : n.isStepper === !0 ? LEe(e, t, n, o, i, a) : REe(e, t, n, r, o, i, a);
-}, oK = (e, t) => [
+var UEe = (e, t, n, r, i, a) => {
+ var o = LEe(e, t);
+ return n == null ? () => (i(tK(tK({}, e), t)), () => {}) : n.isStepper === !0 ? VEe(e, t, n, o, i, a) : HEe(e, t, n, r, o, i, a);
+}, aK = (e, t) => [
0,
3 * e,
3 * t - 6 * e,
3 * e - 3 * t + 1
-], sK = (e, t) => e.map((e, n) => e * t ** n).reduce((e, t) => e + t), cK = (e, t) => (n) => sK(oK(e, t), n), BEe = (e, t) => (n) => sK([...oK(e, t).map((e, t) => e * t).slice(1), 0], n), VEe = (e) => {
+], oK = (e, t) => e.map((e, n) => e * t ** n).reduce((e, t) => e + t), sK = (e, t) => (n) => oK(aK(e, t), n), WEe = (e, t) => (n) => oK([...aK(e, t).map((e, t) => e * t).slice(1), 0], n), GEe = (e) => {
var t, n = e.split("(");
if (n.length !== 2 || n[0] !== "cubic-bezier") return null;
var r = (t = n[1]) == null || (t = t.split(")")[0]) == null ? void 0 : t.split(",");
@@ -58380,7 +58476,7 @@ var zEe = (e, t, n, r, i, a) => {
i[2],
i[3]
];
-}, HEe = function() {
+}, KEe = function() {
var e = [...arguments];
if (e.length === 1) switch (e[0]) {
case "linear": return [
@@ -58414,7 +58510,7 @@ var zEe = (e, t, n, r, i, a) => {
1
];
default:
- var t = VEe(e[0]);
+ var t = GEe(e[0]);
if (t) return t;
}
return e.length === 4 ? e : [
@@ -58423,8 +58519,8 @@ var zEe = (e, t, n, r, i, a) => {
1,
1
];
-}, UEe = (e, t, n, r) => {
- var i = cK(e, n), a = cK(t, r), o = BEe(e, n), s = (e) => e > 1 ? 1 : e < 0 ? 0 : e, c = (e) => {
+}, qEe = (e, t, n, r) => {
+ var i = sK(e, n), a = sK(t, r), o = WEe(e, n), s = (e) => e > 1 ? 1 : e < 0 ? 0 : e, c = (e) => {
for (var t = e > 1 ? 1 : e, n = t, r = 0; r < 8; ++r) {
var c = i(n) - t, l = o(n);
if (Math.abs(c - t) < 1e-4 || l < 1e-4) return a(n);
@@ -58433,29 +58529,29 @@ var zEe = (e, t, n, r, i, a) => {
return a(n);
};
return c.isStepper = !1, c;
-}, lK = function() {
- return UEe(...HEe(...arguments));
-}, WEe = function() {
+}, cK = function() {
+ return qEe(...KEe(...arguments));
+}, JEe = function() {
var { stiff: e = 100, damping: t = 8, dt: n = 17 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = (r, i, a) => {
var o = a + (-(r - i) * e - a * t) * n / 1e3, s = a * n / 1e3 + r;
return Math.abs(s - i) < 1e-4 && Math.abs(o) < 1e-4 ? [i, 0] : [s, o];
};
return r.isStepper = !0, r.dt = n, r;
-}, GEe = (e) => {
+}, YEe = (e) => {
if (typeof e == "string") switch (e) {
case "ease":
case "ease-in-out":
case "ease-out":
case "ease-in":
- case "linear": return lK(e);
- case "spring": return WEe();
- default: if (e.split("(")[0] === "cubic-bezier") return lK(e);
+ case "linear": return cK(e);
+ case "spring": return JEe();
+ default: if (e.split("(")[0] === "cubic-bezier") return cK(e);
}
return typeof e == "function" ? e : null;
};
//#endregion
//#region node_modules/recharts/es6/animation/AnimationManager.js
-function KEe(e) {
+function XEe(e) {
var t, n = () => null, r = !1, i = null, a = (o) => {
if (!r) {
if (Array.isArray(o)) {
@@ -58486,7 +58582,7 @@ function KEe(e) {
}
//#endregion
//#region node_modules/recharts/es6/animation/timeoutController.js
-var qEe = class {
+var ZEe = class {
setTimeout(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = performance.now(), r = null, i = (a) => {
a - n >= t ? e(a) : typeof requestAnimationFrame == "function" && (r = requestAnimationFrame(i));
@@ -58498,14 +58594,14 @@ var qEe = class {
};
//#endregion
//#region node_modules/recharts/es6/animation/createDefaultAnimationManager.js
-function JEe() {
- return KEe(new qEe());
+function QEe() {
+ return XEe(new ZEe());
}
//#endregion
//#region node_modules/recharts/es6/animation/useAnimationManager.js
-var YEe = /*#__PURE__*/ (0, B.createContext)(JEe);
-function XEe(e, t) {
- var n = (0, B.useContext)(YEe);
+var $Ee = /*#__PURE__*/ (0, B.createContext)(QEe);
+function eDe(e, t) {
+ var n = (0, B.useContext)($Ee);
return (0, B.useMemo)(() => t ?? n(e), [
e,
t,
@@ -58514,7 +58610,7 @@ function XEe(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/animation/JavascriptAnimate.js
-var ZEe = {
+var tDe = {
begin: 0,
duration: 1e3,
easing: "ease",
@@ -58522,14 +58618,14 @@ var ZEe = {
canBegin: !0,
onAnimationEnd: () => {},
onAnimationStart: () => {}
-}, uK = { t: 0 }, dK = { t: 1 };
-function fK(e) {
- var t = UB(e, ZEe), { isActive: n, canBegin: r, duration: i, easing: a, begin: o, onAnimationEnd: s, onAnimationStart: c, children: l } = t, u = FG(), d = n === "auto" ? !PG.isSsr && !u : n, f = XEe(t.animationId, t.animationManager), [p, m] = (0, B.useState)(d ? uK : dK), h = (0, B.useRef)(null);
+}, lK = { t: 0 }, uK = { t: 1 };
+function dK(e) {
+ var t = HB(e, tDe), { isActive: n, canBegin: r, duration: i, easing: a, begin: o, onAnimationEnd: s, onAnimationStart: c, children: l } = t, u = PG(), d = n === "auto" ? !NG.isSsr && !u : n, f = eDe(t.animationId, t.animationManager), [p, m] = (0, B.useState)(d ? lK : uK), h = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
- d || m(dK);
+ d || m(uK);
}, [d]), (0, B.useEffect)(() => {
- if (!d || !r) return NB;
- var e = zEe(uK, dK, GEe(a), i, m, f.getTimeoutController());
+ if (!d || !r) return MB;
+ var e = UEe(lK, uK, YEe(a), i, m, f.getTimeoutController());
return f.start([
c,
o,
@@ -58554,14 +58650,14 @@ function fK(e) {
}
//#endregion
//#region node_modules/recharts/es6/util/useAnimationId.js
-function pK(e) {
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "animation-", n = (0, B.useRef)(TB(t)), r = (0, B.useRef)(e);
- return r.current !== e && (n.current = TB(t), r.current = e), n.current;
+function fK(e) {
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "animation-", n = (0, B.useRef)(wB(t)), r = (0, B.useRef)(e);
+ return r.current !== e && (n.current = wB(t), r.current = e), n.current;
}
//#endregion
//#region node_modules/recharts/es6/shape/Rectangle.js
-var QEe = ["radius"], $Ee = ["radius"], eDe, tDe, nDe, rDe, iDe, aDe, oDe, sDe, cDe, lDe;
-function mK(e, t) {
+var nDe = ["radius"], rDe = ["radius"], iDe, aDe, oDe, sDe, cDe, lDe, uDe, dDe, fDe, pDe;
+function pK(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -58571,30 +58667,30 @@ function mK(e, t) {
}
return n;
}
-function hK(e) {
+function mK(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? mK(Object(n), !0).forEach(function(t) {
- uDe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : mK(Object(n)).forEach(function(t) {
+ t % 2 ? pK(Object(n), !0).forEach(function(t) {
+ mDe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : pK(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function uDe(e, t, n) {
- return (t = dDe(t)) in e ? Object.defineProperty(e, t, {
+function mDe(e, t, n) {
+ return (t = hDe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function dDe(e) {
- var t = fDe(e, "string");
+function hDe(e) {
+ var t = gDe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function fDe(e, t) {
+function gDe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -58604,25 +58700,25 @@ function fDe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function gK() {
- return gK = Object.assign ? Object.assign.bind() : function(e) {
+function hK() {
+ return hK = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, gK.apply(null, arguments);
+ }, hK.apply(null, arguments);
}
-function _K(e, t) {
+function gK(e, t) {
if (e == null) return {};
- var n, r, i = pDe(e, t);
+ var n, r, i = _De(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function pDe(e, t) {
+function _De(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -58631,11 +58727,11 @@ function pDe(e, t) {
}
return n;
}
-function vK(e, t) {
+function _K(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
-var yK = (e, t, n, r, i) => {
- var a = yB(n), o = yB(r), s = Math.min(Math.abs(a) / 2, Math.abs(o) / 2), c = o >= 0 ? 1 : -1, l = a >= 0 ? 1 : -1, u = +(o >= 0 && a >= 0 || o < 0 && a < 0), d;
+var vK = (e, t, n, r, i) => {
+ var a = vB(n), o = vB(r), s = Math.min(Math.abs(a) / 2, Math.abs(o) / 2), c = o >= 0 ? 1 : -1, l = a >= 0 ? 1 : -1, u = +(o >= 0 && a >= 0 || o < 0 && a < 0), d;
if (s > 0 && Array.isArray(i)) {
for (var f = [
0,
@@ -58646,44 +58742,44 @@ var yK = (e, t, n, r, i) => {
var h = i[p] ?? 0;
f[p] = h > s ? s : h;
}
- d = bB(eDe ||= vK([
+ d = yB(iDe ||= _K([
"M",
",",
""
- ]), e, t + c * f[0]), f[0] > 0 && (d += bB(tDe ||= vK([
+ ]), e, t + c * f[0]), f[0] > 0 && (d += yB(aDe ||= _K([
"A ",
",",
",0,0,",
",",
",",
""
- ]), f[0], f[0], u, e + l * f[0], t)), d += bB(nDe ||= vK([
+ ]), f[0], f[0], u, e + l * f[0], t)), d += yB(oDe ||= _K([
"L ",
",",
""
- ]), e + n - l * f[1], t), f[1] > 0 && (d += bB(rDe ||= vK([
+ ]), e + n - l * f[1], t), f[1] > 0 && (d += yB(sDe ||= _K([
"A ",
",",
",0,0,",
",\n ",
",",
""
- ]), f[1], f[1], u, e + n, t + c * f[1])), d += bB(iDe ||= vK([
+ ]), f[1], f[1], u, e + n, t + c * f[1])), d += yB(cDe ||= _K([
"L ",
",",
""
- ]), e + n, t + r - c * f[2]), f[2] > 0 && (d += bB(aDe ||= vK([
+ ]), e + n, t + r - c * f[2]), f[2] > 0 && (d += yB(lDe ||= _K([
"A ",
",",
",0,0,",
",\n ",
",",
""
- ]), f[2], f[2], u, e + n - l * f[2], t + r)), d += bB(oDe ||= vK([
+ ]), f[2], f[2], u, e + n - l * f[2], t + r)), d += yB(uDe ||= _K([
"L ",
",",
""
- ]), e + l * f[3], t + r), f[3] > 0 && (d += bB(sDe ||= vK([
+ ]), e + l * f[3], t + r), f[3] > 0 && (d += yB(dDe ||= _K([
"A ",
",",
",0,0,",
@@ -58693,8 +58789,8 @@ var yK = (e, t, n, r, i) => {
]), f[3], f[3], u, e, t + r - c * f[3])), d += "Z";
} else if (s > 0 && i === +i && i > 0) {
var g = Math.min(s, i);
- d = bB(cDe ||= vK(/* @__PURE__ */ "M .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,. Z".split(".")), e, t + c * g, g, g, u, e + l * g, t, e + n - l * g, t, g, g, u, e + n, t + c * g, e + n, t + r - c * g, g, g, u, e + n - l * g, t + r, e + l * g, t + r, g, g, u, e, t + r - c * g);
- } else d = bB(lDe ||= vK([
+ d = yB(fDe ||= _K(/* @__PURE__ */ "M .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,. Z".split(".")), e, t + c * g, g, g, u, e + l * g, t, e + n - l * g, t, g, g, u, e + n, t + c * g, e + n, t + r - c * g, g, g, u, e + n - l * g, t + r, e + l * g, t + r, g, g, u, e, t + r - c * g);
+ } else d = yB(pDe ||= _K([
"M ",
",",
" h ",
@@ -58703,7 +58799,7 @@ var yK = (e, t, n, r, i) => {
" Z"
]), e, t, n, r, -n);
return d;
-}, bK = {
+}, yK = {
x: 0,
y: 0,
width: 0,
@@ -58714,15 +58810,15 @@ var yK = (e, t, n, r, i) => {
animationBegin: 0,
animationDuration: 1500,
animationEasing: "ease"
-}, xK = (e) => {
- var t = UB(e, bK), n = (0, B.useRef)(null), [r, i] = (0, B.useState)(-1);
+}, bK = (e) => {
+ var t = HB(e, yK), n = (0, B.useRef)(null), [r, i] = (0, B.useState)(-1);
(0, B.useEffect)(() => {
if (n.current && n.current.getTotalLength) try {
var e = n.current.getTotalLength();
e && i(e);
} catch {}
}, []);
- var { x: a, y: o, width: s, height: c, radius: l, className: u } = t, { animationEasing: d, animationDuration: f, animationBegin: p, isAnimationActive: m, isUpdateAnimationActive: h } = t, g = (0, B.useRef)(s), _ = (0, B.useRef)(c), v = (0, B.useRef)(a), y = (0, B.useRef)(o), b = pK((0, B.useMemo)(() => ({
+ var { x: a, y: o, width: s, height: c, radius: l, className: u } = t, { animationEasing: d, animationDuration: f, animationBegin: p, isAnimationActive: m, isUpdateAnimationActive: h } = t, g = (0, B.useRef)(s), _ = (0, B.useRef)(c), v = (0, B.useRef)(a), y = (0, B.useRef)(o), b = fK((0, B.useMemo)(() => ({
x: a,
y: o,
width: s,
@@ -58738,19 +58834,19 @@ var yK = (e, t, n, r, i) => {
if (a !== +a || o !== +o || s !== +s || c !== +c || s === 0 || c === 0) return null;
var x = _h("recharts-rectangle", u);
if (!h) {
- var S = hz(t), { radius: C } = S, w = _K(S, QEe);
- return /*#__PURE__*/ B.createElement("path", gK({}, w, {
- x: yB(a),
- y: yB(o),
- width: yB(s),
- height: yB(c),
+ var S = mz(t), { radius: C } = S, w = gK(S, nDe);
+ return /*#__PURE__*/ B.createElement("path", hK({}, w, {
+ x: vB(a),
+ y: vB(o),
+ width: vB(s),
+ height: vB(c),
radius: typeof l == "number" ? l : void 0,
className: x,
- d: yK(a, o, s, c, l)
+ d: vK(a, o, s, c, l)
}));
}
- var T = g.current, E = _.current, D = v.current, O = y.current, k = `0px ${r === -1 ? 1 : r}px`, A = `${r}px ${r}px`, j = $G(["strokeDasharray"], f, typeof d == "string" ? d : bK.animationEasing);
- return /*#__PURE__*/ B.createElement(fK, {
+ var T = g.current, E = _.current, D = v.current, O = y.current, k = `0px ${r === -1 ? 1 : r}px`, A = `${r}px ${r}px`, j = QG(["strokeDasharray"], f, typeof d == "string" ? d : yK.animationEasing);
+ return /*#__PURE__*/ B.createElement(dK, {
animationId: b,
key: b,
canBegin: r > 0,
@@ -58759,24 +58855,24 @@ var yK = (e, t, n, r, i) => {
isActive: h,
begin: p
}, (e) => {
- var r = OB(T, s, e), i = OB(E, c, e), u = OB(D, a, e), d = OB(O, o, e);
+ var r = DB(T, s, e), i = DB(E, c, e), u = DB(D, a, e), d = DB(O, o, e);
n.current && (g.current = r, _.current = i, v.current = u, y.current = d);
var f = m ? e > 0 ? {
transition: j,
strokeDasharray: A
- } : { strokeDasharray: k } : { strokeDasharray: A }, p = hz(t), { radius: h } = p, b = _K(p, $Ee);
- return /*#__PURE__*/ B.createElement("path", gK({}, b, {
+ } : { strokeDasharray: k } : { strokeDasharray: A }, p = mz(t), { radius: h } = p, b = gK(p, rDe);
+ return /*#__PURE__*/ B.createElement("path", hK({}, b, {
radius: typeof l == "number" ? l : void 0,
className: x,
- d: yK(u, d, r, i, l),
+ d: vK(u, d, r, i, l),
ref: n,
- style: hK(hK({}, f), t.style)
+ style: mK(mK({}, f), t.style)
}));
});
};
//#endregion
//#region node_modules/recharts/es6/util/PolarUtils.js
-function SK(e, t) {
+function xK(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -58786,30 +58882,30 @@ function SK(e, t) {
}
return n;
}
-function CK(e) {
+function SK(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? SK(Object(n), !0).forEach(function(t) {
- mDe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : SK(Object(n)).forEach(function(t) {
+ t % 2 ? xK(Object(n), !0).forEach(function(t) {
+ vDe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xK(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function mDe(e, t, n) {
- return (t = hDe(t)) in e ? Object.defineProperty(e, t, {
+function vDe(e, t, n) {
+ return (t = yDe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function hDe(e) {
- var t = gDe(e, "string");
+function yDe(e) {
+ var t = bDe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function gDe(e, t) {
+function bDe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -58819,10 +58915,10 @@ function gDe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var wK = Math.PI / 180, TK = (e) => e * Math.PI / 180, _De = (e) => e * 180 / Math.PI, EK = (e, t, n, r) => ({
- x: e + Math.cos(-wK * r) * n,
- y: t + Math.sin(-wK * r) * n
-}), vDe = function(e, t) {
+var CK = Math.PI / 180, wK = (e) => e * Math.PI / 180, xDe = (e) => e * 180 / Math.PI, TK = (e, t, n, r) => ({
+ x: e + Math.cos(-CK * r) * n,
+ y: t + Math.sin(-CK * r) * n
+}), SDe = function(e, t) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
top: 0,
right: 0,
@@ -58833,11 +58929,11 @@ var wK = Math.PI / 180, TK = (e) => e * Math.PI / 180, _De = (e) => e * 180 / Ma
brushBottom: 0
};
return Math.min(Math.abs(e - (n.left || 0) - (n.right || 0)), Math.abs(t - (n.top || 0) - (n.bottom || 0))) / 2;
-}, yDe = (e, t) => {
+}, CDe = (e, t) => {
var { x: n, y: r } = e, { x: i, y: a } = t;
return Math.sqrt((n - i) ** 2 + (r - a) ** 2);
-}, bDe = (e, t) => {
- var { x: n, y: r } = e, { cx: i, cy: a } = t, o = yDe({
+}, wDe = (e, t) => {
+ var { x: n, y: r } = e, { cx: i, cy: a } = t, o = CDe({
x: n,
y: r
}, {
@@ -58851,25 +58947,25 @@ var wK = Math.PI / 180, TK = (e) => e * Math.PI / 180, _De = (e) => e * 180 / Ma
var s = (n - i) / o, c = Math.acos(s);
return r > a && (c = 2 * Math.PI - c), {
radius: o,
- angle: _De(c),
+ angle: xDe(c),
angleInRadian: c
};
-}, xDe = (e) => {
+}, TDe = (e) => {
var { startAngle: t, endAngle: n } = e, r = Math.floor(t / 360), i = Math.floor(n / 360), a = Math.min(r, i);
return {
startAngle: t - a * 360,
endAngle: n - a * 360
};
-}, SDe = (e, t) => {
+}, EDe = (e, t) => {
var { startAngle: n, endAngle: r } = t, i = Math.floor(n / 360), a = Math.floor(r / 360);
return e + Math.min(i, a) * 360;
-}, CDe = (e, t) => {
- var { relativeX: n, relativeY: r } = e, { radius: i, angle: a } = bDe({
+}, DDe = (e, t) => {
+ var { relativeX: n, relativeY: r } = e, { radius: i, angle: a } = wDe({
x: n,
y: r
}, t), { innerRadius: o, outerRadius: s } = t;
if (i < o || i > s || i === 0) return null;
- var { startAngle: c, endAngle: l } = xDe(t), u = a, d;
+ var { startAngle: c, endAngle: l } = TDe(t), u = a, d;
if (c <= l) {
for (; u > l;) u -= 360;
for (; u < c;) u += 360;
@@ -58879,17 +58975,17 @@ var wK = Math.PI / 180, TK = (e) => e * Math.PI / 180, _De = (e) => e * 180 / Ma
for (; u < l;) u += 360;
d = u >= l && u <= c;
}
- return d ? CK(CK({}, t), {}, {
+ return d ? SK(SK({}, t), {}, {
radius: i,
- angle: SDe(u, t)
+ angle: EDe(u, t)
}) : null;
};
//#endregion
//#region node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js
-function DK(e) {
+function EK(e) {
var { cx: t, cy: n, radius: r, startAngle: i, endAngle: a } = e;
return {
- points: [EK(t, n, r, i), EK(t, n, r, a)],
+ points: [TK(t, n, r, i), TK(t, n, r, a)],
cx: t,
cy: n,
radius: r,
@@ -58899,29 +58995,29 @@ function DK(e) {
}
//#endregion
//#region node_modules/recharts/es6/shape/Sector.js
-var wDe, TDe, EDe, DDe, ODe, kDe, ADe;
-function OK() {
- return OK = Object.assign ? Object.assign.bind() : function(e) {
+var ODe, kDe, ADe, jDe, MDe, NDe, PDe;
+function DK() {
+ return DK = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, OK.apply(null, arguments);
+ }, DK.apply(null, arguments);
}
-function kK(e, t) {
+function OK(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
-var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) => {
- var { cx: t, cy: n, radius: r, angle: i, sign: a, isExternal: o, cornerRadius: s, cornerIsExternal: c } = e, l = s * (o ? 1 : -1) + r, u = Math.asin(s / l) / wK, d = c ? i : i + a * u, f = EK(t, n, l, d), p = EK(t, n, r, d), m = c ? i - a * u : i;
+var FDe = (e, t) => bB(t - e) * Math.min(Math.abs(t - e), 359.999), kK = (e) => {
+ var { cx: t, cy: n, radius: r, angle: i, sign: a, isExternal: o, cornerRadius: s, cornerIsExternal: c } = e, l = s * (o ? 1 : -1) + r, u = Math.asin(s / l) / CK, d = c ? i : i + a * u, f = TK(t, n, l, d), p = TK(t, n, r, d), m = c ? i - a * u : i;
return {
center: f,
circleTangency: p,
- lineTangency: EK(t, n, l * Math.cos(u * wK), m),
+ lineTangency: TK(t, n, l * Math.cos(u * CK), m),
theta: u
};
-}, jK = (e) => {
- var { cx: t, cy: n, innerRadius: r, outerRadius: i, startAngle: a, endAngle: o } = e, s = jDe(a, o), c = a + s, l = EK(t, n, i, a), u = EK(t, n, i, c), d = bB(wDe ||= kK([
+}, AK = (e) => {
+ var { cx: t, cy: n, innerRadius: r, outerRadius: i, startAngle: a, endAngle: o } = e, s = FDe(a, o), c = a + s, l = TK(t, n, i, a), u = TK(t, n, i, c), d = yB(ODe ||= OK([
"M ",
",",
"\n A ",
@@ -58933,8 +59029,8 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
"\n "
]), l.x, l.y, i, i, +(Math.abs(s) > 180), +(a > c), u.x, u.y);
if (r > 0) {
- var f = EK(t, n, r, a), p = EK(t, n, r, c);
- d += bB(TDe ||= kK([
+ var f = TK(t, n, r, a), p = TK(t, n, r, c);
+ d += yB(kDe ||= OK([
"L ",
",",
"\n A ",
@@ -58945,14 +59041,14 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
",",
" Z"
]), p.x, p.y, r, r, +(Math.abs(s) > 180), +(a <= c), f.x, f.y);
- } else d += bB(EDe ||= kK([
+ } else d += yB(ADe ||= OK([
"L ",
",",
" Z"
]), t, n);
return d;
-}, MDe = (e) => {
- var { cx: t, cy: n, innerRadius: r, outerRadius: i, cornerRadius: a, forceCornerRadius: o, cornerIsExternal: s, startAngle: c, endAngle: l } = e, u = xB(l - c), { circleTangency: d, lineTangency: f, theta: p } = AK({
+}, IDe = (e) => {
+ var { cx: t, cy: n, innerRadius: r, outerRadius: i, cornerRadius: a, forceCornerRadius: o, cornerIsExternal: s, startAngle: c, endAngle: l } = e, u = bB(l - c), { circleTangency: d, lineTangency: f, theta: p } = kK({
cx: t,
cy: n,
radius: i,
@@ -58960,7 +59056,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
sign: u,
cornerRadius: a,
cornerIsExternal: s
- }), { circleTangency: m, lineTangency: h, theta: g } = AK({
+ }), { circleTangency: m, lineTangency: h, theta: g } = kK({
cx: t,
cy: n,
radius: i,
@@ -58969,7 +59065,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
cornerRadius: a,
cornerIsExternal: s
}), _ = s ? Math.abs(c - l) : Math.abs(c - l) - p - g;
- if (_ < 0) return o ? bB(DDe ||= kK([
+ if (_ < 0) return o ? yB(jDe ||= OK([
"M ",
",",
"\n a",
@@ -58979,7 +59075,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
",",
",0,0,1,",
",0\n "
- ]), f.x, f.y, a, a, a * 2, a, a, -a * 2) : jK({
+ ]), f.x, f.y, a, a, a * 2, a, a, -a * 2) : AK({
cx: t,
cy: n,
innerRadius: r,
@@ -58987,7 +59083,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
startAngle: c,
endAngle: l
});
- var v = bB(ODe ||= kK([
+ var v = yB(MDe ||= OK([
"M ",
",",
"\n A",
@@ -59009,7 +59105,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
"\n "
]), f.x, f.y, a, a, +(u < 0), d.x, d.y, i, i, +(_ > 180), +(u < 0), m.x, m.y, a, a, +(u < 0), h.x, h.y);
if (r > 0) {
- var { circleTangency: y, lineTangency: b, theta: x } = AK({
+ var { circleTangency: y, lineTangency: b, theta: x } = kK({
cx: t,
cy: n,
radius: r,
@@ -59018,7 +59114,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
isExternal: !0,
cornerRadius: a,
cornerIsExternal: s
- }), { circleTangency: S, lineTangency: C, theta: w } = AK({
+ }), { circleTangency: S, lineTangency: C, theta: w } = kK({
cx: t,
cy: n,
radius: r,
@@ -59029,7 +59125,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
cornerIsExternal: s
}), T = s ? Math.abs(c - l) : Math.abs(c - l) - x - w;
if (T < 0 && a === 0) return `${v}L${t},${n}Z`;
- v += bB(kDe ||= kK([
+ v += yB(NDe ||= OK([
"L",
",",
"\n A",
@@ -59050,13 +59146,13 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
",",
"Z"
]), C.x, C.y, a, a, +(u < 0), S.x, S.y, r, r, +(T > 180), +(u > 0), y.x, y.y, a, a, +(u < 0), b.x, b.y);
- } else v += bB(ADe ||= kK([
+ } else v += yB(PDe ||= OK([
"L",
",",
"Z"
]), t, n);
return v;
-}, NDe = {
+}, LDe = {
cx: 0,
cy: 0,
innerRadius: 0,
@@ -59066,10 +59162,10 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
cornerRadius: 0,
forceCornerRadius: !1,
cornerIsExternal: !1
-}, MK = (e) => {
- var t = UB(e, NDe), { cx: n, cy: r, innerRadius: i, outerRadius: a, cornerRadius: o, forceCornerRadius: s, cornerIsExternal: c, startAngle: l, endAngle: u, className: d } = t;
+}, jK = (e) => {
+ var t = HB(e, LDe), { cx: n, cy: r, innerRadius: i, outerRadius: a, cornerRadius: o, forceCornerRadius: s, cornerIsExternal: c, startAngle: l, endAngle: u, className: d } = t;
if (a < i || l === u) return null;
- var f = _h("recharts-sector", d), p = a - i, m = EB(o, p, 0, !0), h = m > 0 && Math.abs(l - u) < 360 ? MDe({
+ var f = _h("recharts-sector", d), p = a - i, m = TB(o, p, 0, !0), h = m > 0 && Math.abs(l - u) < 360 ? IDe({
cx: n,
cy: r,
innerRadius: i,
@@ -59079,7 +59175,7 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
cornerIsExternal: c,
startAngle: l,
endAngle: u
- }) : jK({
+ }) : AK({
cx: n,
cy: r,
innerRadius: i,
@@ -59087,14 +59183,14 @@ var jDe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 359.999), AK = (e) =>
startAngle: l,
endAngle: u
});
- return /*#__PURE__*/ B.createElement("path", OK({}, hz(t), {
+ return /*#__PURE__*/ B.createElement("path", DK({}, mz(t), {
className: f,
d: h
}));
};
//#endregion
//#region node_modules/recharts/es6/util/cursor/getCursorPoints.js
-function PDe(e, t, n) {
+function RDe(e, t, n) {
if (e === "horizontal") return [{
x: t.x,
y: n.top
@@ -59109,9 +59205,9 @@ function PDe(e, t, n) {
x: n.left + n.width,
y: t.y
}];
- if (zB(t)) {
+ if (RB(t)) {
if (e === "centric") {
- var { cx: r, cy: i, innerRadius: a, outerRadius: o, angle: s } = t, c = EK(r, i, a, s), l = EK(r, i, o, s);
+ var { cx: r, cy: i, innerRadius: a, outerRadius: o, angle: s } = t, c = TK(r, i, a, s), l = TK(r, i, o, s);
return [{
x: c.x,
y: c.y
@@ -59120,30 +59216,30 @@ function PDe(e, t, n) {
y: l.y
}];
}
- return DK(t);
+ return EK(t);
}
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toNumber.mjs
-function FDe(e) {
- return hB(e) ? NaN : Number(e);
+function zDe(e) {
+ return mB(e) ? NaN : Number(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toFinite.mjs
-function NK(e) {
- return e ? (e = FDe(e), e === Infinity || e === -Infinity ? (e < 0 ? -1 : 1) * Number.MAX_VALUE : e === e ? e : 0) : e === 0 ? e : 0;
+function MK(e) {
+ return e ? (e = zDe(e), e === Infinity || e === -Infinity ? (e < 0 ? -1 : 1) * Number.MAX_VALUE : e === e ? e : 0) : e === 0 ? e : 0;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/math/range.mjs
-function PK(e, t, n) {
- n && typeof n != "number" && TV(e, t, n) && (t = n = void 0), e = NK(e), t === void 0 ? (t = e, e = 0) : t = NK(t), n = n === void 0 ? e < t ? 1 : -1 : NK(n);
+function NK(e, t, n) {
+ n && typeof n != "number" && wV(e, t, n) && (t = n = void 0), e = MK(e), t === void 0 ? (t = e, e = 0) : t = MK(t), n = n === void 0 ? e < t ? 1 : -1 : MK(n);
let r = Math.max(Math.ceil((t - e) / (n || 1)), 0), i = Array(r);
for (let t = 0; t < r; t++) i[t] = e, e += n;
return i;
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/dataSelectors.js
-var FK = (e) => e.chartData, IK = $([FK], (e) => {
+var PK = (e) => e.chartData, FK = $([PK], (e) => {
var t = e.chartData == null ? 0 : e.chartData.length - 1;
return {
chartData: e.chartData,
@@ -59151,35 +59247,35 @@ var FK = (e) => e.chartData, IK = $([FK], (e) => {
dataEndIndex: t,
dataStartIndex: 0
};
-}), LK = (e, t, n, r) => r ? IK(e) : FK(e), RK = (e, t, n) => n ? IK(e) : FK(e);
+}), IK = (e, t, n, r) => r ? FK(e) : PK(e), LK = (e, t, n) => n ? FK(e) : PK(e);
//#endregion
//#region node_modules/recharts/es6/util/isDomainSpecifiedByUser.js
-function zK(e) {
+function RK(e) {
if (Array.isArray(e) && e.length === 2) {
var [t, n] = e;
- if (NU(t) && NU(n)) return !0;
+ if (MU(t) && MU(n)) return !0;
}
return !1;
}
-function BK(e, t, n) {
+function zK(e, t, n) {
return n ? e : [Math.min(e[0], t[0]), Math.max(e[1], t[1])];
}
-function VK(e, t) {
+function BK(e, t) {
if (t && typeof e != "function" && Array.isArray(e) && e.length === 2) {
var [n, r] = e, i, a;
- if (NU(n)) i = n;
+ if (MU(n)) i = n;
else if (typeof n == "function") return;
- if (NU(r)) a = r;
+ if (MU(r)) a = r;
else if (typeof r == "function") return;
var o = [i, a];
- if (zK(o)) return o;
+ if (RK(o)) return o;
}
}
-function IDe(e, t, n) {
+function BDe(e, t, n) {
if (!(!n && t == null)) {
if (typeof e == "function" && t != null) try {
var r = e(t, n);
- if (zK(r)) return BK(r, t, n);
+ if (RK(r)) return zK(r, t, n);
} catch {}
if (Array.isArray(e) && e.length === 2) {
var [i, a] = e, o, s;
@@ -59188,8 +59284,8 @@ function IDe(e, t, n) {
else if (typeof i == "function") try {
t != null && (o = i(t?.[0]));
} catch {}
- else if (typeof i == "string" && KU.test(i)) {
- var c = KU.exec(i);
+ else if (typeof i == "string" && GU.test(i)) {
+ var c = GU.exec(i);
if (c == null || c[1] == null || t == null) o = void 0;
else {
var l = +c[1];
@@ -59201,8 +59297,8 @@ function IDe(e, t, n) {
else if (typeof a == "function") try {
t != null && (s = a(t?.[1]));
} catch {}
- else if (typeof a == "string" && qU.test(a)) {
- var u = qU.exec(a);
+ else if (typeof a == "string" && KU.test(a)) {
+ var u = KU.exec(a);
if (u == null || u[1] == null || t == null) s = void 0;
else {
var d = +u[1];
@@ -59210,13 +59306,13 @@ function IDe(e, t, n) {
}
} else s = t?.[1];
var f = [o, s];
- if (zK(f)) return t == null ? f : BK(f, t, n);
+ if (RK(f)) return t == null ? f : zK(f, t, n);
}
}
}
//#endregion
//#region node_modules/recharts/es6/util/scale/util/arithmetic.js
-var HK = /* @__PURE__ */ Tt((/* @__PURE__ */ xt(((e, t) => {
+var VK = /* @__PURE__ */ Tt((/* @__PURE__ */ xt(((e, t) => {
(function(e) {
var n = 1e9, r = {
precision: 20,
@@ -59592,75 +59688,75 @@ var HK = /* @__PURE__ */ Tt((/* @__PURE__ */ xt(((e, t) => {
}) : t !== void 0 && t.exports ? t.exports = r : (e ||= typeof self < "u" && self && self.self == self ? self : Function("return this")(), e.Decimal = r);
})(e);
})))());
-function UK(e) {
- return e === 0 ? 1 : Math.floor(new HK.default(e).abs().log(10).toNumber()) + 1;
+function HK(e) {
+ return e === 0 ? 1 : Math.floor(new VK.default(e).abs().log(10).toNumber()) + 1;
}
-function WK(e, t, n) {
- for (var r = new HK.default(e), i = 0, a = []; r.lt(t) && i < 1e5;) a.push(r.toNumber()), r = r.add(n), i++;
+function UK(e, t, n) {
+ for (var r = new VK.default(e), i = 0, a = []; r.lt(t) && i < 1e5;) a.push(r.toNumber()), r = r.add(n), i++;
return a;
}
//#endregion
//#region node_modules/recharts/es6/util/scale/getNiceTickValues.js
-var GK = (e) => {
+var WK = (e) => {
var [t, n] = e, [r, i] = [t, n];
return t > n && ([r, i] = [n, t]), [r, i];
+}, GK = (e, t, n) => {
+ if (e.lte(0)) return new VK.default(0);
+ var r = HK(e.toNumber()), i = new VK.default(10).pow(r), a = e.div(i), o = r === 1 ? .1 : .05, s = new VK.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);
+ return t ? new VK.default(s.toNumber()) : new VK.default(Math.ceil(s.toNumber()));
}, KK = (e, t, n) => {
- if (e.lte(0)) return new HK.default(0);
- var r = UK(e.toNumber()), i = new HK.default(10).pow(r), a = e.div(i), o = r === 1 ? .1 : .05, s = new HK.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);
- return t ? new HK.default(s.toNumber()) : new HK.default(Math.ceil(s.toNumber()));
-}, qK = (e, t, n) => {
- if (e.lte(0)) return new HK.default(0);
+ if (e.lte(0)) return new VK.default(0);
var r = [
1,
2,
2.5,
5
- ], i = e.toNumber(), a = Math.floor(new HK.default(i).abs().log(10).toNumber()), o = new HK.default(10).pow(a), s = e.div(o).toNumber(), c = r.findIndex((e) => e >= s - 1e-10);
+ ], i = e.toNumber(), a = Math.floor(new VK.default(i).abs().log(10).toNumber()), o = new VK.default(10).pow(a), s = e.div(o).toNumber(), c = r.findIndex((e) => e >= s - 1e-10);
if (c === -1 && (o = o.mul(10), c = 0), c += n, c >= r.length) {
var l = Math.floor(c / r.length);
- c %= r.length, o = o.mul(new HK.default(10).pow(l));
+ c %= r.length, o = o.mul(new VK.default(10).pow(l));
}
- var u = r[c] ?? 1, d = new HK.default(u).mul(o);
- return t ? d : new HK.default(Math.ceil(d.toNumber()));
-}, LDe = (e, t, n) => {
- var r = new HK.default(1), i = new HK.default(e);
+ var u = r[c] ?? 1, d = new VK.default(u).mul(o);
+ return t ? d : new VK.default(Math.ceil(d.toNumber()));
+}, VDe = (e, t, n) => {
+ var r = new VK.default(1), i = new VK.default(e);
if (!i.isint() && n) {
var a = Math.abs(e);
- a < 1 ? (r = new HK.default(10).pow(UK(e) - 1), i = new HK.default(Math.floor(i.div(r).toNumber())).mul(r)) : a > 1 && (i = new HK.default(Math.floor(e)));
- } else e === 0 ? i = new HK.default(Math.floor((t - 1) / 2)) : n || (i = new HK.default(Math.floor(e)));
- for (var o = Math.floor((t - 1) / 2), s = [], c = 0; c < t; c++) s.push(i.add(new HK.default(c - o).mul(r)).toNumber());
+ a < 1 ? (r = new VK.default(10).pow(HK(e) - 1), i = new VK.default(Math.floor(i.div(r).toNumber())).mul(r)) : a > 1 && (i = new VK.default(Math.floor(e)));
+ } else e === 0 ? i = new VK.default(Math.floor((t - 1) / 2)) : n || (i = new VK.default(Math.floor(e)));
+ for (var o = Math.floor((t - 1) / 2), s = [], c = 0; c < t; c++) s.push(i.add(new VK.default(c - o).mul(r)).toNumber());
return s;
-}, JK = function(e, t, n, r) {
- var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : KK;
+}, qK = function(e, t, n, r) {
+ var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : GK;
if (!Number.isFinite((t - e) / (n - 1))) return {
- step: new HK.default(0),
- tickMin: new HK.default(0),
- tickMax: new HK.default(0)
- };
- var o = a(new HK.default(t).sub(e).div(n - 1), r, i), s;
- e <= 0 && t >= 0 ? s = new HK.default(0) : (s = new HK.default(e).add(t).div(2), s = s.sub(new HK.default(s).mod(o)));
- var c = Math.ceil(s.sub(e).div(o).toNumber()), l = Math.ceil(new HK.default(t).sub(s).div(o).toNumber()), u = c + l + 1;
- return u > n ? JK(e, t, n, r, i + 1, a) : (u < n && (l = t > 0 ? l + (n - u) : l, c = t > 0 ? c : c + (n - u)), {
+ step: new VK.default(0),
+ tickMin: new VK.default(0),
+ tickMax: new VK.default(0)
+ };
+ var o = a(new VK.default(t).sub(e).div(n - 1), r, i), s;
+ e <= 0 && t >= 0 ? s = new VK.default(0) : (s = new VK.default(e).add(t).div(2), s = s.sub(new VK.default(s).mod(o)));
+ var c = Math.ceil(s.sub(e).div(o).toNumber()), l = Math.ceil(new VK.default(t).sub(s).div(o).toNumber()), u = c + l + 1;
+ return u > n ? qK(e, t, n, r, i + 1, a) : (u < n && (l = t > 0 ? l + (n - u) : l, c = t > 0 ? c : c + (n - u)), {
step: o,
- tickMin: s.sub(new HK.default(c).mul(o)),
- tickMax: s.add(new HK.default(l).mul(o))
+ tickMin: s.sub(new VK.default(c).mul(o)),
+ tickMax: s.add(new VK.default(l).mul(o))
});
-}, YK = function(e) {
- var [t, n] = e, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 6, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "auto", o = Math.max(r, 2), [s, c] = GK([t, n]);
+}, JK = function(e) {
+ var [t, n] = e, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 6, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "auto", o = Math.max(r, 2), [s, c] = WK([t, n]);
if (s === -Infinity || c === Infinity) {
var l = c === Infinity ? [s, ...Array(r - 1).fill(Infinity)] : [...Array(r - 1).fill(-Infinity), c];
return t > n ? l.reverse() : l;
}
- if (s === c) return LDe(s, r, i);
- var { step: u, tickMin: d, tickMax: f } = JK(s, c, o, i, 0, a === "snap125" ? qK : KK), p = WK(d, f.add(new HK.default(.1).mul(u)), u);
+ if (s === c) return VDe(s, r, i);
+ var { step: u, tickMin: d, tickMax: f } = qK(s, c, o, i, 0, a === "snap125" ? KK : GK), p = UK(d, f.add(new VK.default(.1).mul(u)), u);
return t > n ? p.reverse() : p;
-}, XK = function(e, t) {
- var [n, r] = e, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "auto", [o, s] = GK([n, r]);
+}, YK = function(e, t) {
+ var [n, r] = e, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "auto", [o, s] = WK([n, r]);
if (o === -Infinity || s === Infinity) return [n, r];
if (o === s) return [o];
- var c = a === "snap125" ? qK : KK, l = Math.max(t, 2), u = c(new HK.default(s).sub(o).div(l - 1), i, 0), d = [...WK(new HK.default(o), new HK.default(s), u), s];
+ var c = a === "snap125" ? KK : GK, l = Math.max(t, 2), u = c(new VK.default(s).sub(o).div(l - 1), i, 0), d = [...UK(new VK.default(o), new VK.default(s), u), s];
return i === !1 && (d = d.map((e) => Math.round(e))), n > r ? d.reverse() : d;
-}, ZK = (e) => e.rootProps.maxBarSize, QK = (e) => e.rootProps.barGap, $K = (e) => e.rootProps.barCategoryGap, eq = (e) => e.rootProps.barSize, tq = (e) => e.rootProps.stackOffset, nq = (e) => e.rootProps.reverseStackOrder, rq = (e) => e.options.chartName, iq = (e) => e.rootProps.syncId, aq = (e) => e.rootProps.syncMethod, oq = (e) => e.options.eventEmitter, RDe = (e) => e.rootProps.baseValue, sq = {
+}, XK = (e) => e.rootProps.maxBarSize, ZK = (e) => e.rootProps.barGap, QK = (e) => e.rootProps.barCategoryGap, $K = (e) => e.rootProps.barSize, eq = (e) => e.rootProps.stackOffset, tq = (e) => e.rootProps.reverseStackOrder, nq = (e) => e.options.chartName, rq = (e) => e.rootProps.syncId, iq = (e) => e.rootProps.syncMethod, aq = (e) => e.options.eventEmitter, HDe = (e) => e.rootProps.baseValue, oq = {
grid: -100,
barBackground: -50,
area: 100,
@@ -59673,7 +59769,7 @@ var GK = (e) => {
cursorLine: 1100,
activeDot: 1200,
label: 2e3
-}, cq = {
+}, sq = {
allowDecimals: !1,
allowDuplicatedCategory: !0,
allowDataOverflow: !1,
@@ -59694,8 +59790,8 @@ var GK = (e) => {
tickLine: !0,
tickSize: 8,
type: "auto",
- zIndex: sq.axis
-}, lq = {
+ zIndex: oq.axis
+}, cq = {
allowDataOverflow: !1,
allowDecimals: !1,
allowDuplicatedCategory: !0,
@@ -59714,19 +59810,19 @@ var GK = (e) => {
tickCount: 5,
tickLine: !0,
type: "auto",
- zIndex: sq.axis
-}, uq = (e, t) => {
+ zIndex: oq.axis
+}, lq = (e, t) => {
if (!(!e || !t)) return e != null && e.reversed ? [t[1], t[0]] : t;
};
//#endregion
//#region node_modules/recharts/es6/util/getAxisTypeBasedOnLayout.js
-function dq(e, t, n) {
+function uq(e, t, n) {
if (n !== "auto") return n;
- if (e != null) return RU(e, t) ? "category" : "number";
+ if (e != null) return LU(e, t) ? "category" : "number";
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/polarAxisSelectors.js
-function fq(e, t) {
+function dq(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -59736,30 +59832,30 @@ function fq(e, t) {
}
return n;
}
-function pq(e) {
+function fq(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? fq(Object(n), !0).forEach(function(t) {
- zDe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fq(Object(n)).forEach(function(t) {
+ t % 2 ? dq(Object(n), !0).forEach(function(t) {
+ UDe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : dq(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function zDe(e, t, n) {
- return (t = BDe(t)) in e ? Object.defineProperty(e, t, {
+function UDe(e, t, n) {
+ return (t = WDe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function BDe(e) {
- var t = VDe(e, "string");
+function WDe(e) {
+ var t = GDe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function VDe(e, t) {
+function GDe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -59769,81 +59865,81 @@ function VDe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var mq = {
- allowDataOverflow: cq.allowDataOverflow,
- allowDecimals: cq.allowDecimals,
+var pq = {
+ allowDataOverflow: sq.allowDataOverflow,
+ allowDecimals: sq.allowDecimals,
allowDuplicatedCategory: !1,
dataKey: void 0,
domain: void 0,
- id: cq.angleAxisId,
+ id: sq.angleAxisId,
includeHidden: !1,
name: void 0,
- reversed: cq.reversed,
- scale: cq.scale,
- tick: cq.tick,
+ reversed: sq.reversed,
+ scale: sq.scale,
+ tick: sq.tick,
tickCount: void 0,
ticks: void 0,
- type: cq.type,
+ type: sq.type,
unit: void 0,
niceTicks: "auto"
-}, hq = {
- allowDataOverflow: lq.allowDataOverflow,
- allowDecimals: lq.allowDecimals,
- allowDuplicatedCategory: lq.allowDuplicatedCategory,
+}, mq = {
+ allowDataOverflow: cq.allowDataOverflow,
+ allowDecimals: cq.allowDecimals,
+ allowDuplicatedCategory: cq.allowDuplicatedCategory,
dataKey: void 0,
domain: void 0,
- id: lq.radiusAxisId,
- includeHidden: lq.includeHidden,
+ id: cq.radiusAxisId,
+ includeHidden: cq.includeHidden,
name: void 0,
- reversed: lq.reversed,
- scale: lq.scale,
- tick: lq.tick,
- tickCount: lq.tickCount,
+ reversed: cq.reversed,
+ scale: cq.scale,
+ tick: cq.tick,
+ tickCount: cq.tickCount,
ticks: void 0,
- type: lq.type,
+ type: cq.type,
unit: void 0,
niceTicks: "auto"
-}, gq = $([(e, t) => {
+}, hq = $([(e, t) => {
if (t != null) return e.polarAxis.angleAxis[t];
-}, DW], (e, t) => {
+}, EW], (e, t) => {
if (e != null) return e;
- var n = dq(t, "angleAxis", mq.type) ?? "category";
- return pq(pq({}, mq), {}, { type: n });
-}), _q = $([(e, t) => e.polarAxis.radiusAxis[t], DW], (e, t) => {
+ var n = uq(t, "angleAxis", pq.type) ?? "category";
+ return fq(fq({}, pq), {}, { type: n });
+}), gq = $([(e, t) => e.polarAxis.radiusAxis[t], EW], (e, t) => {
if (e != null) return e;
- var n = dq(t, "radiusAxis", hq.type) ?? "category";
- return pq(pq({}, hq), {}, { type: n });
-}), vq = (e) => e.polarOptions, yq = $([
+ var n = uq(t, "radiusAxis", mq.type) ?? "category";
+ return fq(fq({}, mq), {}, { type: n });
+}), _q = (e) => e.polarOptions, vq = $([
+ XU,
ZU,
- QU,
- iW
-], vDe), bq = $([vq, yq], (e, t) => {
- if (e != null) return EB(e.innerRadius, t, 0);
-}), xq = $([vq, yq], (e, t) => {
- if (e != null) return EB(e.outerRadius, t, t * .8);
-}), Sq = $([vq], (e) => {
+ rW
+], SDe), yq = $([_q, vq], (e, t) => {
+ if (e != null) return TB(e.innerRadius, t, 0);
+}), bq = $([_q, vq], (e, t) => {
+ if (e != null) return TB(e.outerRadius, t, t * .8);
+}), xq = $([_q], (e) => {
if (e == null) return [0, 0];
var { startAngle: t, endAngle: n } = e;
return [t, n];
-}), HDe = $([gq, Sq], uq), Cq = $([
+}), KDe = $([hq, xq], lq), Sq = $([
+ vq,
yq,
- bq,
- xq
+ bq
], (e, t, n) => {
if (e != null && t != null && n != null) return [t, n];
-}), UDe = $([_q, Cq], uq), wq = $([
- wW,
- vq,
+}), qDe = $([gq, Sq], lq), Cq = $([
+ CW,
+ _q,
+ yq,
bq,
- xq,
- ZU,
- QU
+ XU,
+ ZU
], (e, t, n, r, i, a) => {
if (!(e !== "centric" && e !== "radial" || t == null || n == null || r == null)) {
var { cx: o, cy: s, startAngle: c, endAngle: l } = t;
return {
- cx: EB(o, i, i / 2),
- cy: EB(s, a, a / 2),
+ cx: TB(o, i, i / 2),
+ cy: TB(s, a, a / 2),
innerRadius: n,
outerRadius: r,
startAngle: c,
@@ -59851,22 +59947,22 @@ var mq = {
clockWise: !1
};
}
-}), Tq = (e, t) => t, Eq = (e, t, n) => n;
+}), wq = (e, t) => t, Tq = (e, t, n) => n;
//#endregion
//#region node_modules/recharts/es6/util/stacks/getStackSeriesIdentifier.js
-function Dq(e) {
+function Eq(e) {
return e?.id;
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineDisplayedStackedData.js
-function Oq(e, t, n) {
+function Dq(e, t, n) {
var { chartData: r = [] } = t, { allowDuplicatedCategory: i, dataKey: a } = n, o = /* @__PURE__ */ new Map();
return e.forEach((e) => {
var t = e.data ?? r;
if (t != null && t.length !== 0) {
- var n = Dq(e);
+ var n = Eq(e);
t.forEach((t, r) => {
- var s = a == null || i ? r : String(LU(t, a, null)), c = LU(t, e.dataKey, 0), l = o.has(s) ? o.get(s) : {};
+ var s = a == null || i ? r : String(IU(t, a, null)), c = IU(t, e.dataKey, 0), l = o.has(s) ? o.get(s) : {};
Object.assign(l, { [n]: c }), o.set(s, l);
});
}
@@ -59874,18 +59970,18 @@ function Oq(e, t, n) {
}
//#endregion
//#region node_modules/recharts/es6/state/types/StackedGraphicalItem.js
-function kq(e) {
+function Oq(e) {
return "stackId" in e && e.stackId != null && e.dataKey != null;
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/numberDomainEqualityCheck.js
-var Aq = (e, t) => e === t ? !0 : e == null || t == null ? !1 : e[0] === t[0] && e[1] === t[1];
+var kq = (e, t) => e === t ? !0 : e == null || t == null ? !1 : e[0] === t[0] && e[1] === t[1];
//#endregion
//#region node_modules/recharts/es6/state/selectors/arrayEqualityCheck.js
-function jq(e, t) {
+function Aq(e, t) {
return Array.isArray(e) && Array.isArray(t) && e.length === 0 && t.length === 0 ? !0 : e === t;
}
-function WDe(e, t) {
+function JDe(e, t) {
if (e.length === t.length) {
for (var n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
return !0;
@@ -59894,13 +59990,13 @@ function WDe(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/selectTooltipAxisType.js
-var Mq = (e) => {
- var t = wW(e);
+var jq = (e) => {
+ var t = CW(e);
return t === "horizontal" ? "xAxis" : t === "vertical" ? "yAxis" : t === "centric" ? "angleAxis" : "radiusAxis";
-}, Nq = (e) => e.tooltip.settings.axisId;
+}, Mq = (e) => e.tooltip.settings.axisId;
//#endregion
//#region node_modules/recharts/es6/util/scale/RechartsScale.js
-function Pq(e) {
+function Nq(e) {
if (e != null) {
var t = e.ticks, n = e.bandwidth, r = e.range(), i = [Math.min(...r), Math.max(...r)];
return {
@@ -59941,13 +60037,13 @@ function Pq(e) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineCheckedDomain.js
-var Fq = (e, t) => {
+var Pq = (e, t) => {
if (t != null) switch (e) {
case "linear":
- if (!zK(t)) {
+ if (!RK(t)) {
for (var n, r, i = 0; i < t.length; i++) {
var a = t[i];
- NU(a) && ((n === void 0 || a < n) && (n = a), (r === void 0 || a > r) && (r = a));
+ MU(a) && ((n === void 0 || a < n) && (n = a), (r === void 0 || a > r) && (r = a));
}
return n !== void 0 && r !== void 0 ? [n, r] : void 0;
}
@@ -59957,14 +60053,14 @@ var Fq = (e, t) => {
};
//#endregion
//#region node_modules/d3-array/src/ascending.js
-function Iq(e, t) {
+function Fq(e, t) {
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/bisector.js
-function Lq(e) {
+function Iq(e) {
let t = e, n = e;
- e.length === 1 && (t = (t, n) => e(t) - n, n = GDe(e));
+ e.length === 1 && (t = (t, n) => e(t) - n, n = YDe(e));
function r(e, t, r, i) {
for (r ??= 0, i ??= e.length; r < i;) {
let a = r + i >>> 1;
@@ -59990,15 +60086,15 @@ function Lq(e) {
right: i
};
}
-function GDe(e) {
- return (t, n) => Iq(e(t), n);
+function YDe(e) {
+ return (t, n) => Fq(e(t), n);
}
//#endregion
//#region node_modules/d3-array/src/number.js
-function Rq(e) {
+function Lq(e) {
return e === null ? NaN : +e;
}
-function* KDe(e, t) {
+function* XDe(e, t) {
if (t === void 0) for (let t of e) t != null && (t = +t) >= t && (yield t);
else {
let n = -1;
@@ -60007,52 +60103,52 @@ function* KDe(e, t) {
}
//#endregion
//#region node_modules/d3-array/src/bisect.js
-var zq = Lq(Iq), Bq = zq.right;
-zq.left, Lq(Rq).center;
+var Rq = Iq(Fq), zq = Rq.right;
+Rq.left, Iq(Lq).center;
//#endregion
//#region node_modules/internmap/src/index.js
-var Vq = class extends Map {
- constructor(e, t = YDe) {
+var Bq = class extends Map {
+ constructor(e, t = $De) {
if (super(), Object.defineProperties(this, {
_intern: { value: /* @__PURE__ */ new Map() },
_key: { value: t }
}), e != null) for (let [t, n] of e) this.set(t, n);
}
get(e) {
- return super.get(Hq(this, e));
+ return super.get(Vq(this, e));
}
has(e) {
- return super.has(Hq(this, e));
+ return super.has(Vq(this, e));
}
set(e, t) {
- return super.set(qDe(this, e), t);
+ return super.set(ZDe(this, e), t);
}
delete(e) {
- return super.delete(JDe(this, e));
+ return super.delete(QDe(this, e));
}
};
-function Hq({ _intern: e, _key: t }, n) {
+function Vq({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) ? e.get(r) : n;
}
-function qDe({ _intern: e, _key: t }, n) {
+function ZDe({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) ? e.get(r) : (e.set(r, n), n);
}
-function JDe({ _intern: e, _key: t }, n) {
+function QDe({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) && (n = e.get(n), e.delete(r)), n;
}
-function YDe(e) {
+function $De(e) {
return typeof e == "object" && e ? e.valueOf() : e;
}
//#endregion
//#region node_modules/d3-array/src/ticks.js
-var Uq = Math.sqrt(50), Wq = Math.sqrt(10), Gq = Math.sqrt(2);
-function Kq(e, t, n) {
+var Hq = Math.sqrt(50), Uq = Math.sqrt(10), Wq = Math.sqrt(2);
+function Gq(e, t, n) {
var r, i = -1, a, o, s;
if (t = +t, e = +e, n = +n, e === t && n > 0) return [e];
- if ((r = t < e) && (a = e, e = t, t = a), (s = qq(e, t, n)) === 0 || !isFinite(s)) return [];
+ if ((r = t < e) && (a = e, e = t, t = a), (s = Kq(e, t, n)) === 0 || !isFinite(s)) return [];
if (s > 0) {
let n = Math.round(e / s), r = Math.round(t / s);
for (n * s < e && ++n, r * s > t && --r, o = Array(a = r - n + 1); ++i < a;) o[i] = (n + i) * s;
@@ -60063,17 +60159,17 @@ function Kq(e, t, n) {
}
return r && o.reverse(), o;
}
-function qq(e, t, n) {
+function Kq(e, t, n) {
var r = (t - e) / Math.max(0, n), i = Math.floor(Math.log(r) / Math.LN10), a = r / 10 ** i;
- return i >= 0 ? (a >= Uq ? 10 : a >= Wq ? 5 : a >= Gq ? 2 : 1) * 10 ** i : -(10 ** -i) / (a >= Uq ? 10 : a >= Wq ? 5 : a >= Gq ? 2 : 1);
+ return i >= 0 ? (a >= Hq ? 10 : a >= Uq ? 5 : a >= Wq ? 2 : 1) * 10 ** i : -(10 ** -i) / (a >= Hq ? 10 : a >= Uq ? 5 : a >= Wq ? 2 : 1);
}
-function Jq(e, t, n) {
+function qq(e, t, n) {
var r = Math.abs(t - e) / Math.max(0, n), i = 10 ** Math.floor(Math.log(r) / Math.LN10), a = r / i;
- return a >= Uq ? i *= 10 : a >= Wq ? i *= 5 : a >= Gq && (i *= 2), t < e ? -i : i;
+ return a >= Hq ? i *= 10 : a >= Uq ? i *= 5 : a >= Wq && (i *= 2), t < e ? -i : i;
}
//#endregion
//#region node_modules/d3-array/src/max.js
-function Yq(e, t) {
+function Jq(e, t) {
let n;
if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
else {
@@ -60084,7 +60180,7 @@ function Yq(e, t) {
}
//#endregion
//#region node_modules/d3-array/src/min.js
-function Xq(e, t) {
+function Yq(e, t) {
let n;
if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
else {
@@ -60095,36 +60191,36 @@ function Xq(e, t) {
}
//#endregion
//#region node_modules/d3-array/src/quickselect.js
-function Zq(e, t, n = 0, r = e.length - 1, i = Iq) {
+function Xq(e, t, n = 0, r = e.length - 1, i = Fq) {
for (; r > n;) {
if (r - n > 600) {
let a = r - n + 1, o = t - n + 1, s = Math.log(a), c = .5 * Math.exp(2 * s / 3), l = .5 * Math.sqrt(s * c * (a - c) / a) * (o - a / 2 < 0 ? -1 : 1);
- Zq(e, t, Math.max(n, Math.floor(t - o * c / a + l)), Math.min(r, Math.floor(t + (a - o) * c / a + l)), i);
+ Xq(e, t, Math.max(n, Math.floor(t - o * c / a + l)), Math.min(r, Math.floor(t + (a - o) * c / a + l)), i);
}
let a = e[t], o = n, s = r;
- for (Qq(e, n, t), i(e[r], a) > 0 && Qq(e, n, r); o < s;) {
- for (Qq(e, o, s), ++o, --s; i(e[o], a) < 0;) ++o;
+ for (Zq(e, n, t), i(e[r], a) > 0 && Zq(e, n, r); o < s;) {
+ for (Zq(e, o, s), ++o, --s; i(e[o], a) < 0;) ++o;
for (; i(e[s], a) > 0;) --s;
}
- i(e[n], a) === 0 ? Qq(e, n, s) : (++s, Qq(e, s, r)), s <= t && (n = s + 1), t <= s && (r = s - 1);
+ i(e[n], a) === 0 ? Zq(e, n, s) : (++s, Zq(e, s, r)), s <= t && (n = s + 1), t <= s && (r = s - 1);
}
return e;
}
-function Qq(e, t, n) {
+function Zq(e, t, n) {
let r = e[t];
e[t] = e[n], e[n] = r;
}
//#endregion
//#region node_modules/d3-array/src/quantile.js
-function XDe(e, t, n) {
- if (e = Float64Array.from(KDe(e, n)), r = e.length) {
- if ((t = +t) <= 0 || r < 2) return Xq(e);
- if (t >= 1) return Yq(e);
- var r, i = (r - 1) * t, a = Math.floor(i), o = Yq(Zq(e, a).subarray(0, a + 1));
- return o + (Xq(e.subarray(a + 1)) - o) * (i - a);
+function eOe(e, t, n) {
+ if (e = Float64Array.from(XDe(e, n)), r = e.length) {
+ if ((t = +t) <= 0 || r < 2) return Yq(e);
+ if (t >= 1) return Jq(e);
+ var r, i = (r - 1) * t, a = Math.floor(i), o = Jq(Xq(e, a).subarray(0, a + 1));
+ return o + (Yq(e.subarray(a + 1)) - o) * (i - a);
}
}
-function ZDe(e, t, n = Rq) {
+function tOe(e, t, n = Lq) {
if (r = e.length) {
if ((t = +t) <= 0 || r < 2) return +n(e[0], 0, e);
if (t >= 1) return +n(e[r - 1], r - 1, e);
@@ -60134,14 +60230,14 @@ function ZDe(e, t, n = Rq) {
}
//#endregion
//#region node_modules/d3-array/src/range.js
-function QDe(e, t, n) {
+function nOe(e, t, n) {
e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
return a;
}
//#endregion
//#region node_modules/d3-array/src/sum.js
-function $q(e, t) {
+function Qq(e, t) {
let n = 0;
if (t === void 0) for (let t of e) (t = +t) && (n += t);
else {
@@ -60152,7 +60248,7 @@ function $q(e, t) {
}
//#endregion
//#region node_modules/d3-scale/src/init.js
-function eJ(e, t) {
+function $q(e, t) {
switch (arguments.length) {
case 0: break;
case 1:
@@ -60162,7 +60258,7 @@ function eJ(e, t) {
}
return this;
}
-function tJ(e, t) {
+function eJ(e, t) {
switch (arguments.length) {
case 0: break;
case 1:
@@ -60174,20 +60270,20 @@ function tJ(e, t) {
}
//#endregion
//#region node_modules/d3-scale/src/ordinal.js
-var nJ = Symbol("implicit");
-function rJ() {
- var e = new Vq(), t = [], n = [], r = nJ;
+var tJ = Symbol("implicit");
+function nJ() {
+ var e = new Bq(), t = [], n = [], r = tJ;
function i(i) {
let a = e.get(i);
if (a === void 0) {
- if (r !== nJ) return r;
+ if (r !== tJ) return r;
e.set(i, a = t.push(i) - 1);
}
return n[a % n.length];
}
return i.domain = function(n) {
if (!arguments.length) return t.slice();
- t = [], e = new Vq();
+ t = [], e = new Bq();
for (let r of n) e.has(r) || e.set(r, t.push(r) - 1);
return i;
}, i.range = function(e) {
@@ -60195,18 +60291,18 @@ function rJ() {
}, i.unknown = function(e) {
return arguments.length ? (r = e, i) : r;
}, i.copy = function() {
- return rJ(t, n).unknown(r);
- }, eJ.apply(i, arguments), i;
+ return nJ(t, n).unknown(r);
+ }, $q.apply(i, arguments), i;
}
//#endregion
//#region node_modules/d3-scale/src/band.js
-function iJ() {
- var e = rJ().unknown(void 0), t = e.domain, n = e.range, r = 0, i = 1, a, o, s = !1, c = 0, l = 0, u = .5;
+function rJ() {
+ var e = nJ().unknown(void 0), t = e.domain, n = e.range, r = 0, i = 1, a, o, s = !1, c = 0, l = 0, u = .5;
delete e.unknown;
function d() {
var e = t().length, d = i < r, f = d ? i : r, p = d ? r : i;
a = (p - f) / Math.max(1, e - c + l * 2), s && (a = Math.floor(a)), f += (p - f - a * (e - c)) * u, o = a * (1 - c), s && (f = Math.round(f), o = Math.round(o));
- var m = QDe(e).map(function(e) {
+ var m = nOe(e).map(function(e) {
return f + a * e;
});
return n(d ? m.reverse() : m);
@@ -60232,32 +60328,32 @@ function iJ() {
}, e.align = function(e) {
return arguments.length ? (u = Math.max(0, Math.min(1, e)), d()) : u;
}, e.copy = function() {
- return iJ(t(), [r, i]).round(s).paddingInner(c).paddingOuter(l).align(u);
- }, eJ.apply(d(), arguments);
+ return rJ(t(), [r, i]).round(s).paddingInner(c).paddingOuter(l).align(u);
+ }, $q.apply(d(), arguments);
}
-function aJ(e) {
+function iJ(e) {
var t = e.copy;
return e.padding = e.paddingOuter, delete e.paddingInner, delete e.paddingOuter, e.copy = function() {
- return aJ(t());
+ return iJ(t());
}, e;
}
-function $De() {
- return aJ(iJ.apply(null, arguments).paddingInner(1));
+function rOe() {
+ return iJ(rJ.apply(null, arguments).paddingInner(1));
}
//#endregion
//#region node_modules/d3-color/src/define.js
-function oJ(e, t, n) {
+function aJ(e, t, n) {
e.prototype = t.prototype = n, n.constructor = e;
}
-function sJ(e, t) {
+function oJ(e, t) {
var n = Object.create(e.prototype);
for (var r in t) n[r] = t[r];
return n;
}
//#endregion
//#region node_modules/d3-color/src/color.js
-function cJ() {}
-var lJ = .7, uJ = 1 / lJ, dJ = "\\s*([+-]?\\d+)\\s*", fJ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", pJ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", eOe = /^#([0-9a-f]{3,8})$/, tOe = RegExp(`^rgb\\(${dJ},${dJ},${dJ}\\)$`), nOe = RegExp(`^rgb\\(${pJ},${pJ},${pJ}\\)$`), rOe = RegExp(`^rgba\\(${dJ},${dJ},${dJ},${fJ}\\)$`), iOe = RegExp(`^rgba\\(${pJ},${pJ},${pJ},${fJ}\\)$`), aOe = RegExp(`^hsl\\(${fJ},${pJ},${pJ}\\)$`), oOe = RegExp(`^hsla\\(${fJ},${pJ},${pJ},${fJ}\\)$`), mJ = {
+function sJ() {}
+var cJ = .7, lJ = 1 / cJ, uJ = "\\s*([+-]?\\d+)\\s*", dJ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", fJ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", iOe = /^#([0-9a-f]{3,8})$/, aOe = RegExp(`^rgb\\(${uJ},${uJ},${uJ}\\)$`), oOe = RegExp(`^rgb\\(${fJ},${fJ},${fJ}\\)$`), sOe = RegExp(`^rgba\\(${uJ},${uJ},${uJ},${dJ}\\)$`), cOe = RegExp(`^rgba\\(${fJ},${fJ},${fJ},${dJ}\\)$`), lOe = RegExp(`^hsl\\(${dJ},${fJ},${fJ}\\)$`), uOe = RegExp(`^hsla\\(${dJ},${fJ},${fJ},${dJ}\\)$`), pJ = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
@@ -60407,27 +60503,27 @@ var lJ = .7, uJ = 1 / lJ, dJ = "\\s*([+-]?\\d+)\\s*", fJ = "\\s*([+-]?(?:\\d*\\.
yellow: 16776960,
yellowgreen: 10145074
};
-oJ(cJ, _J, {
+aJ(sJ, _J, {
copy(e) {
return Object.assign(new this.constructor(), this, e);
},
displayable() {
return this.rgb().displayable();
},
- hex: hJ,
- formatHex: hJ,
- formatHex8: sOe,
- formatHsl: cOe,
+ hex: mJ,
+ formatHex: mJ,
+ formatHex8: dOe,
+ formatHsl: hJ,
formatRgb: gJ,
toString: gJ
});
-function hJ() {
+function mJ() {
return this.rgb().formatHex();
}
-function sOe() {
+function dOe() {
return this.rgb().formatHex8();
}
-function cOe() {
+function hJ() {
return OJ(this).formatHsl();
}
function gJ() {
@@ -60435,7 +60531,7 @@ function gJ() {
}
function _J(e) {
var t, n;
- return e = (e + "").trim().toLowerCase(), (t = eOe.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? vJ(t) : n === 3 ? new xJ(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? yJ(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? yJ(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = tOe.exec(e)) ? new xJ(t[1], t[2], t[3], 1) : (t = nOe.exec(e)) ? new xJ(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = rOe.exec(e)) ? yJ(t[1], t[2], t[3], t[4]) : (t = iOe.exec(e)) ? yJ(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = aOe.exec(e)) ? DJ(t[1], t[2] / 100, t[3] / 100, 1) : (t = oOe.exec(e)) ? DJ(t[1], t[2] / 100, t[3] / 100, t[4]) : mJ.hasOwnProperty(e) ? vJ(mJ[e]) : e === "transparent" ? new xJ(NaN, NaN, NaN, 0) : null;
+ return e = (e + "").trim().toLowerCase(), (t = iOe.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? vJ(t) : n === 3 ? new xJ(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? yJ(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? yJ(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = aOe.exec(e)) ? new xJ(t[1], t[2], t[3], 1) : (t = oOe.exec(e)) ? new xJ(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = sOe.exec(e)) ? yJ(t[1], t[2], t[3], t[4]) : (t = cOe.exec(e)) ? yJ(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = lOe.exec(e)) ? DJ(t[1], t[2] / 100, t[3] / 100, 1) : (t = uOe.exec(e)) ? DJ(t[1], t[2] / 100, t[3] / 100, t[4]) : pJ.hasOwnProperty(e) ? vJ(pJ[e]) : e === "transparent" ? new xJ(NaN, NaN, NaN, 0) : null;
}
function vJ(e) {
return new xJ(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
@@ -60443,21 +60539,21 @@ function vJ(e) {
function yJ(e, t, n, r) {
return r <= 0 && (e = t = n = NaN), new xJ(e, t, n, r);
}
-function lOe(e) {
- return e instanceof cJ || (e = _J(e)), e ? (e = e.rgb(), new xJ(e.r, e.g, e.b, e.opacity)) : new xJ();
+function fOe(e) {
+ return e instanceof sJ || (e = _J(e)), e ? (e = e.rgb(), new xJ(e.r, e.g, e.b, e.opacity)) : new xJ();
}
function bJ(e, t, n, r) {
- return arguments.length === 1 ? lOe(e) : new xJ(e, t, n, r ?? 1);
+ return arguments.length === 1 ? fOe(e) : new xJ(e, t, n, r ?? 1);
}
function xJ(e, t, n, r) {
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
}
-oJ(xJ, bJ, sJ(cJ, {
+aJ(xJ, bJ, oJ(sJ, {
brighter(e) {
- return e = e == null ? uJ : uJ ** +e, new xJ(this.r * e, this.g * e, this.b * e, this.opacity);
+ return e = e == null ? lJ : lJ ** +e, new xJ(this.r * e, this.g * e, this.b * e, this.opacity);
},
darker(e) {
- return e = e == null ? lJ : lJ ** +e, new xJ(this.r * e, this.g * e, this.b * e, this.opacity);
+ return e = e == null ? cJ : cJ ** +e, new xJ(this.r * e, this.g * e, this.b * e, this.opacity);
},
rgb() {
return this;
@@ -60470,14 +60566,14 @@ oJ(xJ, bJ, sJ(cJ, {
},
hex: SJ,
formatHex: SJ,
- formatHex8: uOe,
+ formatHex8: pOe,
formatRgb: CJ,
toString: CJ
}));
function SJ() {
return `#${EJ(this.r)}${EJ(this.g)}${EJ(this.b)}`;
}
-function uOe() {
+function pOe() {
return `#${EJ(this.r)}${EJ(this.g)}${EJ(this.b)}${EJ((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function CJ() {
@@ -60498,24 +60594,24 @@ function DJ(e, t, n, r) {
}
function OJ(e) {
if (e instanceof kJ) return new kJ(e.h, e.s, e.l, e.opacity);
- if (e instanceof cJ || (e = _J(e)), !e) return new kJ();
+ if (e instanceof sJ || (e = _J(e)), !e) return new kJ();
if (e instanceof kJ) return e;
e = e.rgb();
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new kJ(o, s, c, e.opacity);
}
-function dOe(e, t, n, r) {
+function mOe(e, t, n, r) {
return arguments.length === 1 ? OJ(e) : new kJ(e, t, n, r ?? 1);
}
function kJ(e, t, n, r) {
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
}
-oJ(kJ, dOe, sJ(cJ, {
+aJ(kJ, mOe, oJ(sJ, {
brighter(e) {
- return e = e == null ? uJ : uJ ** +e, new kJ(this.h, this.s, this.l * e, this.opacity);
+ return e = e == null ? lJ : lJ ** +e, new kJ(this.h, this.s, this.l * e, this.opacity);
},
darker(e) {
- return e = e == null ? lJ : lJ ** +e, new kJ(this.h, this.s, this.l * e, this.opacity);
+ return e = e == null ? cJ : cJ ** +e, new kJ(this.h, this.s, this.l * e, this.opacity);
},
rgb() {
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
@@ -60546,29 +60642,29 @@ function MJ(e, t, n) {
var NJ = (e) => () => e;
//#endregion
//#region node_modules/d3-interpolate/src/color.js
-function fOe(e, t) {
+function hOe(e, t) {
return function(n) {
return e + n * t;
};
}
-function pOe(e, t, n) {
+function gOe(e, t, n) {
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
return (e + r * t) ** +n;
};
}
-function mOe(e) {
+function _Oe(e) {
return (e = +e) == 1 ? PJ : function(t, n) {
- return n - t ? pOe(t, n, e) : NJ(isNaN(t) ? n : t);
+ return n - t ? gOe(t, n, e) : NJ(isNaN(t) ? n : t);
};
}
function PJ(e, t) {
var n = t - e;
- return n ? fOe(e, n) : NJ(isNaN(e) ? t : e);
+ return n ? hOe(e, n) : NJ(isNaN(e) ? t : e);
}
//#endregion
//#region node_modules/d3-interpolate/src/rgb.js
var FJ = (function e(t) {
- var n = mOe(t);
+ var n = _Oe(t);
function r(e, t) {
var r = n((e = bJ(e)).r, (t = bJ(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = PJ(e.opacity, t.opacity);
return function(t) {
@@ -60579,7 +60675,7 @@ var FJ = (function e(t) {
})(1);
//#endregion
//#region node_modules/d3-interpolate/src/numberArray.js
-function hOe(e, t) {
+function vOe(e, t) {
t ||= [];
var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
return function(a) {
@@ -60587,12 +60683,12 @@ function hOe(e, t) {
return r;
};
}
-function gOe(e) {
+function yOe(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/d3-interpolate/src/array.js
-function _Oe(e, t) {
+function bOe(e, t) {
var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o;
for (o = 0; o < r; ++o) i[o] = zJ(e[o], t[o]);
for (; o < n; ++o) a[o] = t[o];
@@ -60603,7 +60699,7 @@ function _Oe(e, t) {
}
//#endregion
//#region node_modules/d3-interpolate/src/date.js
-function vOe(e, t) {
+function xOe(e, t) {
var n = /* @__PURE__ */ new Date();
return e = +e, t = +t, function(r) {
return n.setTime(e * (1 - r) + t * r), n;
@@ -60618,7 +60714,7 @@ function IJ(e, t) {
}
//#endregion
//#region node_modules/d3-interpolate/src/object.js
-function yOe(e, t) {
+function SOe(e, t) {
var n = {}, r = {}, i;
for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = zJ(e[i], t[i]) : r[i] = t[i];
return function(e) {
@@ -60629,23 +60725,23 @@ function yOe(e, t) {
//#endregion
//#region node_modules/d3-interpolate/src/string.js
var LJ = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, RJ = new RegExp(LJ.source, "g");
-function bOe(e) {
+function COe(e) {
return function() {
return e;
};
}
-function xOe(e) {
+function wOe(e) {
return function(t) {
return e(t) + "";
};
}
-function SOe(e, t) {
+function TOe(e, t) {
var n = LJ.lastIndex = RJ.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
for (e += "", t += ""; (r = LJ.exec(e)) && (i = RJ.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
i: o,
x: IJ(r, i)
})), n = RJ.lastIndex;
- return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? xOe(c[0].x) : bOe(t) : (t = c.length, function(e) {
+ return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? wOe(c[0].x) : COe(t) : (t = c.length, function(e) {
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
return s.join("");
});
@@ -60654,7 +60750,7 @@ function SOe(e, t) {
//#region node_modules/d3-interpolate/src/value.js
function zJ(e, t) {
var n = typeof t, r;
- return t == null || n === "boolean" ? NJ(t) : (n === "number" ? IJ : n === "string" ? (r = _J(t)) ? (t = r, FJ) : SOe : t instanceof _J ? FJ : t instanceof Date ? vOe : gOe(t) ? hOe : Array.isArray(t) ? _Oe : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? yOe : IJ)(e, t);
+ return t == null || n === "boolean" ? NJ(t) : (n === "number" ? IJ : n === "string" ? (r = _J(t)) ? (t = r, FJ) : TOe : t instanceof _J ? FJ : t instanceof Date ? xOe : yOe(t) ? vOe : Array.isArray(t) ? bOe : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? SOe : IJ)(e, t);
}
//#endregion
//#region node_modules/d3-interpolate/src/round.js
@@ -60665,7 +60761,7 @@ function BJ(e, t) {
}
//#endregion
//#region node_modules/d3-interpolate/src/piecewise.js
-function COe(e, t) {
+function EOe(e, t) {
t === void 0 && (t = e, e = zJ);
for (var n = 0, r = t.length - 1, i = t[0], a = Array(r < 0 ? 0 : r); n < r;) a[n] = e(i, i = t[++n]);
return function(e) {
@@ -60675,7 +60771,7 @@ function COe(e, t) {
}
//#endregion
//#region node_modules/d3-scale/src/constant.js
-function wOe(e) {
+function DOe(e) {
return function() {
return e;
};
@@ -60694,25 +60790,25 @@ function UJ(e) {
function WJ(e, t) {
return (t -= e = +e) ? function(n) {
return (n - e) / t;
- } : wOe(isNaN(t) ? NaN : .5);
+ } : DOe(isNaN(t) ? NaN : .5);
}
-function TOe(e, t) {
+function OOe(e, t) {
var n;
return e > t && (n = e, e = t, t = n), function(n) {
return Math.max(e, Math.min(t, n));
};
}
-function EOe(e, t, n) {
+function kOe(e, t, n) {
var r = e[0], i = e[1], a = t[0], o = t[1];
return i < r ? (r = WJ(i, r), a = n(o, a)) : (r = WJ(r, i), a = n(a, o)), function(e) {
return a(r(e));
};
}
-function DOe(e, t, n) {
+function AOe(e, t, n) {
var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = WJ(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
return function(t) {
- var n = Bq(e, t, 1, r) - 1;
+ var n = zq(e, t, 1, r) - 1;
return a[n](i[n](t));
};
}
@@ -60723,7 +60819,7 @@ function KJ() {
var e = HJ, t = HJ, n = zJ, r, i, a, o = UJ, s, c, l;
function u() {
var n = Math.min(e.length, t.length);
- return o !== UJ && (o = TOe(e[0], e[n - 1])), s = n > 2 ? DOe : EOe, c = l = null, d;
+ return o !== UJ && (o = OOe(e[0], e[n - 1])), s = n > 2 ? AOe : kOe, c = l = null, d;
}
function d(i) {
return i == null || isNaN(i = +i) ? a : (c ||= s(e.map(r), t, n))(r(o(i)));
@@ -60751,7 +60847,7 @@ function qJ() {
}
//#endregion
//#region node_modules/d3-format/src/formatDecimal.js
-function OOe(e) {
+function jOe(e) {
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
}
function JJ(e, t) {
@@ -60766,7 +60862,7 @@ function YJ(e) {
}
//#endregion
//#region node_modules/d3-format/src/formatGroup.js
-function kOe(e, t) {
+function MOe(e, t) {
return function(n, r) {
for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
return a.reverse().join(t);
@@ -60774,7 +60870,7 @@ function kOe(e, t) {
}
//#endregion
//#region node_modules/d3-format/src/formatNumerals.js
-function AOe(e) {
+function NOe(e) {
return function(t) {
return t.replace(/[0-9]/g, function(t) {
return e[+t];
@@ -60783,9 +60879,9 @@ function AOe(e) {
}
//#endregion
//#region node_modules/d3-format/src/formatSpecifier.js
-var jOe = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
+var POe = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function XJ(e) {
- if (!(t = jOe.exec(e))) throw Error("invalid format: " + e);
+ if (!(t = POe.exec(e))) throw Error("invalid format: " + e);
var t;
return new ZJ({
fill: t[1],
@@ -60809,7 +60905,7 @@ ZJ.prototype.toString = function() {
};
//#endregion
//#region node_modules/d3-format/src/formatTrim.js
-function MOe(e) {
+function FOe(e) {
out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
case ".":
r = i = n;
@@ -60826,7 +60922,7 @@ function MOe(e) {
//#endregion
//#region node_modules/d3-format/src/formatPrefixAuto.js
var QJ;
-function NOe(e, t) {
+function IOe(e, t) {
var n = JJ(e, t);
if (!n) return QJ = void 0, e.toPrecision(t);
var r = n[0], i = n[1], a = i - (QJ = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
@@ -60846,14 +60942,14 @@ var eY = {
"%": (e, t) => (e * 100).toFixed(t),
b: (e) => Math.round(e).toString(2),
c: (e) => e + "",
- d: OOe,
+ d: jOe,
e: (e, t) => e.toExponential(t),
f: (e, t) => e.toFixed(t),
g: (e, t) => e.toPrecision(t),
o: (e) => Math.round(e).toString(8),
p: (e, t) => $J(e * 100, t),
r: $J,
- s: NOe,
+ s: IOe,
X: (e) => Math.round(e).toString(16).toUpperCase(),
x: (e) => Math.round(e).toString(16)
};
@@ -60883,8 +60979,8 @@ var nY = Array.prototype.map, rY = [
"Z",
"Y"
];
-function POe(e) {
- var t = e.grouping === void 0 || e.thousands === void 0 ? tY : kOe(nY.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? tY : AOe(nY.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
+function LOe(e) {
+ var t = e.grouping === void 0 || e.thousands === void 0 ? tY : MOe(nY.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? tY : NOe(nY.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
function l(e, l) {
e = XJ(e);
var u = e.fill, d = e.align, f = e.sign, p = e.symbol, m = e.zero, h = e.width, g = e.comma, _ = e.precision, v = e.trim, y = e.type;
@@ -60897,7 +60993,7 @@ function POe(e) {
else {
e = +e;
var w = e < 0 || 1 / e < 0;
- if (e = isNaN(e) ? c : S(Math.abs(e), _), v && (e = MOe(e)), w && +e == 0 && f !== "+" && (w = !1), n = (w ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (y === "s" && !isNaN(e) && QJ !== void 0 ? rY[8 + QJ / 3] : "") + r + (w && f === "(" ? ")" : ""), C) {
+ if (e = isNaN(e) ? c : S(Math.abs(e), _), v && (e = FOe(e)), w && +e == 0 && f !== "+" && (w = !1), n = (w ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (y === "s" && !isNaN(e) && QJ !== void 0 ? rY[8 + QJ / 3] : "") + r + (w && f === "(" ? ")" : ""), C) {
for (o = -1, l = e.length; ++o < l;) if (p = e.charCodeAt(o), 48 > p || p > 57) {
r = (p === 46 ? i + e.slice(o + 1) : e.slice(o)) + r, e = e.slice(0, o);
break;
@@ -60938,46 +61034,46 @@ function POe(e) {
//#endregion
//#region node_modules/d3-format/src/defaultLocale.js
var iY, aY, oY;
-FOe({
+ROe({
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
-function FOe(e) {
- return iY = POe(e), aY = iY.format, oY = iY.formatPrefix, iY;
+function ROe(e) {
+ return iY = LOe(e), aY = iY.format, oY = iY.formatPrefix, iY;
}
//#endregion
//#region node_modules/d3-format/src/precisionFixed.js
-function IOe(e) {
+function zOe(e) {
return Math.max(0, -YJ(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionPrefix.js
-function LOe(e, t) {
+function BOe(e, t) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(YJ(t) / 3))) * 3 - YJ(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionRound.js
-function ROe(e, t) {
+function VOe(e, t) {
return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, YJ(t) - YJ(e)) + 1;
}
//#endregion
//#region node_modules/d3-scale/src/tickFormat.js
function sY(e, t, n, r) {
- var i = Jq(e, t, n), a;
+ var i = qq(e, t, n), a;
switch (r = XJ(r ?? ",f"), r.type) {
case "s":
var o = Math.max(Math.abs(e), Math.abs(t));
- return r.precision == null && !isNaN(a = LOe(i, o)) && (r.precision = a), oY(r, o);
+ return r.precision == null && !isNaN(a = BOe(i, o)) && (r.precision = a), oY(r, o);
case "":
case "e":
case "g":
case "p":
case "r":
- r.precision == null && !isNaN(a = ROe(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
+ r.precision == null && !isNaN(a = VOe(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
break;
case "f":
- case "%": r.precision == null && !isNaN(a = IOe(i)) && (r.precision = a - (r.type === "%") * 2);
+ case "%": r.precision == null && !isNaN(a = zOe(i)) && (r.precision = a - (r.type === "%") * 2);
}
return aY(r);
}
@@ -60987,7 +61083,7 @@ function cY(e) {
var t = e.domain;
return e.ticks = function(e) {
var n = t();
- return Kq(n[0], n[n.length - 1], e ?? 10);
+ return Gq(n[0], n[n.length - 1], e ?? 10);
}, e.tickFormat = function(e, n) {
var r = t();
return sY(r[0], r[r.length - 1], e ?? 10, n);
@@ -60995,7 +61091,7 @@ function cY(e) {
n ??= 10;
var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
- if (l = qq(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
+ if (l = Kq(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
else break;
@@ -61008,7 +61104,7 @@ function lY() {
var e = qJ();
return e.copy = function() {
return GJ(e, lY());
- }, eJ.apply(e, arguments), cY(e);
+ }, $q.apply(e, arguments), cY(e);
}
//#endregion
//#region node_modules/d3-scale/src/identity.js
@@ -61040,19 +61136,19 @@ function fY(e) {
function pY(e) {
return Math.exp(e);
}
-function zOe(e) {
+function HOe(e) {
return -Math.log(-e);
}
-function BOe(e) {
+function UOe(e) {
return -Math.exp(-e);
}
-function VOe(e) {
+function WOe(e) {
return isFinite(e) ? +("1e" + e) : e < 0 ? 0 : e;
}
-function HOe(e) {
- return e === 10 ? VOe : e === Math.E ? Math.exp : (t) => e ** +t;
+function GOe(e) {
+ return e === 10 ? WOe : e === Math.E ? Math.exp : (t) => e ** +t;
}
-function UOe(e) {
+function KOe(e) {
return e === Math.E ? Math.log : e === 10 && Math.log10 || e === 2 && Math.log2 || (e = Math.log(e), (t) => Math.log(t) / e);
}
function mY(e) {
@@ -61061,7 +61157,7 @@ function mY(e) {
function hY(e) {
let t = e(fY, pY), n = t.domain, r = 10, i, a;
function o() {
- return i = UOe(r), a = HOe(r), n()[0] < 0 ? (i = mY(i), a = mY(a), e(zOe, BOe)) : e(fY, pY), t;
+ return i = KOe(r), a = GOe(r), n()[0] < 0 ? (i = mY(i), a = mY(a), e(HOe, UOe)) : e(fY, pY), t;
}
return t.base = function(e) {
return arguments.length ? (r = +e, o()) : r;
@@ -61081,8 +61177,8 @@ function hY(e) {
if (f > s) break;
m.push(f);
}
- m.length * 2 < p && (m = Kq(o, s, p));
- } else m = Kq(l, u, Math.min(u - l, p)).map(a);
+ m.length * 2 < p && (m = Gq(o, s, p));
+ } else m = Gq(l, u, Math.min(u - l, p)).map(a);
return c ? m.reverse() : m;
}, t.tickFormat = (e, n) => {
if (e ??= 10, n ??= r === 10 ? "s" : ",", typeof n != "function" && (!(r % 1) && (n = XJ(n)).precision == null && (n.trim = !0), n = aY(n)), e === Infinity) return n;
@@ -61098,7 +61194,7 @@ function hY(e) {
}
function gY() {
let e = hY(KJ()).domain([1, 10]);
- return e.copy = () => GJ(e, gY()).base(e.base()), eJ.apply(e, arguments), e;
+ return e.copy = () => GJ(e, gY()).base(e.base()), $q.apply(e, arguments), e;
}
//#endregion
//#region node_modules/d3-scale/src/symlog.js
@@ -61122,7 +61218,7 @@ function bY() {
var e = yY(KJ());
return e.copy = function() {
return GJ(e, bY()).constant(e.constant());
- }, eJ.apply(e, arguments);
+ }, $q.apply(e, arguments);
}
//#endregion
//#region node_modules/d3-scale/src/pow.js
@@ -61131,16 +61227,16 @@ function xY(e) {
return t < 0 ? -((-t) ** +e) : t ** +e;
};
}
-function WOe(e) {
+function qOe(e) {
return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e);
}
-function GOe(e) {
+function JOe(e) {
return e < 0 ? -e * e : e * e;
}
function SY(e) {
var t = e(UJ, UJ), n = 1;
function r() {
- return n === 1 ? e(UJ, UJ) : n === .5 ? e(WOe, GOe) : e(xY(n), xY(1 / n));
+ return n === 1 ? e(UJ, UJ) : n === .5 ? e(qOe, JOe) : e(xY(n), xY(1 / n));
}
return t.exponent = function(e) {
return arguments.length ? (n = +e, r()) : n;
@@ -61150,9 +61246,9 @@ function CY() {
var e = SY(KJ());
return e.copy = function() {
return GJ(e, CY()).exponent(e.exponent());
- }, eJ.apply(e, arguments), e;
+ }, $q.apply(e, arguments), e;
}
-function KOe() {
+function YOe() {
return CY.apply(null, arguments).exponent(.5);
}
//#endregion
@@ -61160,13 +61256,13 @@ function KOe() {
function wY(e) {
return Math.sign(e) * e * e;
}
-function qOe(e) {
+function XOe(e) {
return Math.sign(e) * Math.sqrt(Math.abs(e));
}
function TY() {
var e = qJ(), t = [0, 1], n = !1, r;
function i(t) {
- var i = qOe(e(t));
+ var i = XOe(e(t));
return isNaN(i) ? r : n ? Math.round(i) : i;
}
return i.invert = function(t) {
@@ -61185,7 +61281,7 @@ function TY() {
return arguments.length ? (r = e, i) : r;
}, i.copy = function() {
return TY(e.domain(), t).round(n).clamp(e.clamp()).unknown(r);
- }, eJ.apply(i, arguments), cY(i);
+ }, $q.apply(i, arguments), cY(i);
}
//#endregion
//#region node_modules/d3-scale/src/quantile.js
@@ -61193,11 +61289,11 @@ function EY() {
var e = [], t = [], n = [], r;
function i() {
var r = 0, i = Math.max(1, t.length);
- for (n = Array(i - 1); ++r < i;) n[r - 1] = ZDe(e, r / i);
+ for (n = Array(i - 1); ++r < i;) n[r - 1] = tOe(e, r / i);
return a;
}
function a(e) {
- return e == null || isNaN(e = +e) ? r : t[Bq(n, e)];
+ return e == null || isNaN(e = +e) ? r : t[zq(n, e)];
}
return a.invertExtent = function(r) {
var i = t.indexOf(r);
@@ -61206,7 +61302,7 @@ function EY() {
if (!arguments.length) return e.slice();
e = [];
for (let n of t) n != null && !isNaN(n = +n) && e.push(n);
- return e.sort(Iq), i();
+ return e.sort(Fq), i();
}, a.range = function(e) {
return arguments.length ? (t = Array.from(e), i()) : t.slice();
}, a.unknown = function(e) {
@@ -61215,14 +61311,14 @@ function EY() {
return n.slice();
}, a.copy = function() {
return EY().domain(e).range(t).unknown(r);
- }, eJ.apply(a, arguments);
+ }, $q.apply(a, arguments);
}
//#endregion
//#region node_modules/d3-scale/src/quantize.js
function DY() {
var e = 0, t = 1, n = 1, r = [.5], i = [0, 1], a;
function o(e) {
- return e != null && e <= e ? i[Bq(r, e, 0, n)] : a;
+ return e != null && e <= e ? i[zq(r, e, 0, n)] : a;
}
function s() {
var i = -1;
@@ -61242,14 +61338,14 @@ function DY() {
return r.slice();
}, o.copy = function() {
return DY().domain([e, t]).range(i).unknown(a);
- }, eJ.apply(cY(o), arguments);
+ }, $q.apply(cY(o), arguments);
}
//#endregion
//#region node_modules/d3-scale/src/threshold.js
function OY() {
var e = [.5], t = [0, 1], n, r = 1;
function i(i) {
- return i != null && i <= i ? t[Bq(e, i, 0, r)] : n;
+ return i != null && i <= i ? t[zq(e, i, 0, r)] : n;
}
return i.domain = function(n) {
return arguments.length ? (e = Array.from(n), r = Math.min(e.length, t.length - 1), i) : e.slice();
@@ -61262,7 +61358,7 @@ function OY() {
return arguments.length ? (n = e, i) : n;
}, i.copy = function() {
return OY().domain(e).range(t).unknown(n);
- }, eJ.apply(i, arguments);
+ }, $q.apply(i, arguments);
}
//#endregion
//#region node_modules/d3-time/src/interval.js
@@ -61362,8 +61458,8 @@ function JY(e) {
e.setDate(e.getDate() + t * 7);
}, (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * PY) / LY);
}
-var YY = JY(0), XY = JY(1), JOe = JY(2), YOe = JY(3), ZY = JY(4), XOe = JY(5), ZOe = JY(6);
-YY.range, XY.range, JOe.range, YOe.range, ZY.range, XOe.range, ZOe.range;
+var YY = JY(0), XY = JY(1), ZOe = JY(2), QOe = JY(3), ZY = JY(4), $Oe = JY(5), eke = JY(6);
+YY.range, XY.range, ZOe.range, QOe.range, ZY.range, $Oe.range, eke.range;
function QY(e) {
return jY((t) => {
t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
@@ -61371,8 +61467,8 @@ function QY(e) {
e.setUTCDate(e.getUTCDate() + t * 7);
}, (e, t) => (t - e) / LY);
}
-var $Y = QY(0), eX = QY(1), QOe = QY(2), $Oe = QY(3), tX = QY(4), eke = QY(5), tke = QY(6);
-$Y.range, eX.range, QOe.range, $Oe.range, tX.range, eke.range, tke.range;
+var $Y = QY(0), eX = QY(1), tke = QY(2), nke = QY(3), tX = QY(4), rke = QY(5), ike = QY(6);
+$Y.range, eX.range, tke.range, nke.range, tX.range, rke.range, ike.range;
//#endregion
//#region node_modules/d3-time/src/month.js
var nX = jY((e) => {
@@ -61511,15 +61607,15 @@ function oX(e, t, n, r, i, a) {
return r ? a.reverse() : a;
}
function c(t, n, r) {
- let i = Math.abs(n - t) / r, a = Lq(([, , e]) => e).right(o, i);
- if (a === o.length) return e.every(Jq(t / zY, n / zY, r));
- if (a === 0) return MY.every(Math.max(Jq(t, n, r), 1));
+ let i = Math.abs(n - t) / r, a = Iq(([, , e]) => e).right(o, i);
+ if (a === o.length) return e.every(qq(t / zY, n / zY, r));
+ if (a === 0) return MY.every(Math.max(qq(t, n, r), 1));
let [s, c] = o[i / o[a - 1][2] < o[a][2] / i ? a - 1 : a];
return s.every(c);
}
return [s, c];
}
-var [nke, rke] = oX(aX, rX, $Y, qY, WY, HY), [ike, ake] = oX(iX, nX, YY, GY, UY, VY);
+var [ake, oke] = oX(aX, rX, $Y, qY, WY, HY), [ske, cke] = oX(iX, nX, YY, GY, UY, VY);
//#endregion
//#region node_modules/d3-time-format/src/locale.js
function sX(e) {
@@ -61547,7 +61643,7 @@ function lX(e, t, n) {
L: 0
};
}
-function oke(e) {
+function lke(e) {
var t = e.dateTime, n = e.date, r = e.time, i = e.periods, a = e.days, o = e.shortDays, s = e.months, c = e.shortMonths, l = pX(i), u = mX(i), d = pX(a), f = mX(a), p = pX(o), m = mX(o), h = pX(s), g = mX(s), _ = pX(c), v = mX(c), y = {
a: N,
A: P,
@@ -61556,30 +61652,30 @@ function oke(e) {
c: null,
d: yX,
e: yX,
- f: kke,
- g: zke,
- G: Vke,
- H: Eke,
- I: Dke,
- j: Oke,
+ f: Mke,
+ g: Hke,
+ G: Wke,
+ H: kke,
+ I: Ake,
+ j: jke,
L: bX,
- m: Ake,
- M: jke,
+ m: Nke,
+ M: Pke,
p: I,
q: te,
Q: EX,
s: DX,
- S: Mke,
- u: Nke,
- U: Pke,
- V: Fke,
- w: Ike,
- W: Lke,
+ S: Fke,
+ u: Ike,
+ U: Lke,
+ V: Rke,
+ w: zke,
+ W: Bke,
x: null,
X: null,
- y: Rke,
- Y: Bke,
- Z: Hke,
+ y: Vke,
+ Y: Uke,
+ Z: Gke,
"%": TX
}, b = {
a: ne,
@@ -61589,30 +61685,30 @@ function oke(e) {
c: null,
d: SX,
e: SX,
- f: Kke,
- g: nAe,
- G: iAe,
- H: Uke,
- I: Wke,
- j: Gke,
+ f: Yke,
+ g: aAe,
+ G: sAe,
+ H: Kke,
+ I: qke,
+ j: Jke,
L: CX,
- m: qke,
- M: Jke,
+ m: Xke,
+ M: Zke,
p: oe,
q: se,
Q: EX,
s: DX,
- S: Yke,
- u: Xke,
- U: Zke,
- V: Qke,
- w: $ke,
- W: eAe,
+ S: Qke,
+ u: $ke,
+ U: eAe,
+ V: tAe,
+ w: nAe,
+ W: rAe,
x: null,
X: null,
- y: tAe,
- Y: rAe,
- Z: aAe,
+ y: iAe,
+ Y: oAe,
+ Z: cAe,
"%": TX
}, x = {
a: E,
@@ -61622,31 +61718,31 @@ function oke(e) {
c: A,
d: _X,
e: _X,
- f: Ske,
+ f: Tke,
g: gX,
G: hX,
H: vX,
I: vX,
- j: vke,
- L: xke,
- m: _ke,
- M: yke,
+ j: xke,
+ L: wke,
+ m: bke,
+ M: Ske,
p: T,
- q: gke,
- Q: wke,
- s: Tke,
- S: bke,
- u: dke,
- U: fke,
- V: pke,
- w: uke,
- W: mke,
+ q: yke,
+ Q: Dke,
+ s: Oke,
+ S: Cke,
+ u: mke,
+ U: hke,
+ V: gke,
+ w: pke,
+ W: _ke,
x: j,
X: M,
y: gX,
Y: hX,
- Z: hke,
- "%": Cke
+ Z: vke,
+ "%": Eke
};
y.x = S(n, y), y.X = S(r, y), y.c = S(t, y), b.x = S(n, b), b.X = S(r, b), b.c = S(t, b);
function S(e, t) {
@@ -61774,37 +61870,37 @@ var uX = {
"-": "",
_: " ",
0: "0"
-}, dX = /^\s*\d+/, ske = /^%/, cke = /[\\^$*+?|[\]().{}]/g;
+}, dX = /^\s*\d+/, uke = /^%/, dke = /[\\^$*+?|[\]().{}]/g;
function fX(e, t, n) {
var r = e < 0 ? "-" : "", i = (r ? -e : e) + "", a = i.length;
return r + (a < n ? Array(n - a + 1).join(t) + i : i);
}
-function lke(e) {
- return e.replace(cke, "\\$&");
+function fke(e) {
+ return e.replace(dke, "\\$&");
}
function pX(e) {
- return RegExp("^(?:" + e.map(lke).join("|") + ")", "i");
+ return RegExp("^(?:" + e.map(fke).join("|") + ")", "i");
}
function mX(e) {
return new Map(e.map((e, t) => [e.toLowerCase(), t]));
}
-function uke(e, t, n) {
+function pke(e, t, n) {
var r = dX.exec(t.slice(n, n + 1));
return r ? (e.w = +r[0], n + r[0].length) : -1;
}
-function dke(e, t, n) {
+function mke(e, t, n) {
var r = dX.exec(t.slice(n, n + 1));
return r ? (e.u = +r[0], n + r[0].length) : -1;
}
-function fke(e, t, n) {
+function hke(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.U = +r[0], n + r[0].length) : -1;
}
-function pke(e, t, n) {
+function gke(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.V = +r[0], n + r[0].length) : -1;
}
-function mke(e, t, n) {
+function _ke(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.W = +r[0], n + r[0].length) : -1;
}
@@ -61816,15 +61912,15 @@ function gX(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
}
-function hke(e, t, n) {
+function vke(e, t, n) {
var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
}
-function gke(e, t, n) {
+function yke(e, t, n) {
var r = dX.exec(t.slice(n, n + 1));
return r ? (e.q = r[0] * 3 - 3, n + r[0].length) : -1;
}
-function _ke(e, t, n) {
+function bke(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.m = r[0] - 1, n + r[0].length) : -1;
}
@@ -61832,7 +61928,7 @@ function _X(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.d = +r[0], n + r[0].length) : -1;
}
-function vke(e, t, n) {
+function xke(e, t, n) {
var r = dX.exec(t.slice(n, n + 3));
return r ? (e.m = 0, e.d = +r[0], n + r[0].length) : -1;
}
@@ -61840,159 +61936,159 @@ function vX(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.H = +r[0], n + r[0].length) : -1;
}
-function yke(e, t, n) {
+function Ske(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.M = +r[0], n + r[0].length) : -1;
}
-function bke(e, t, n) {
+function Cke(e, t, n) {
var r = dX.exec(t.slice(n, n + 2));
return r ? (e.S = +r[0], n + r[0].length) : -1;
}
-function xke(e, t, n) {
+function wke(e, t, n) {
var r = dX.exec(t.slice(n, n + 3));
return r ? (e.L = +r[0], n + r[0].length) : -1;
}
-function Ske(e, t, n) {
+function Tke(e, t, n) {
var r = dX.exec(t.slice(n, n + 6));
return r ? (e.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
}
-function Cke(e, t, n) {
- var r = ske.exec(t.slice(n, n + 1));
+function Eke(e, t, n) {
+ var r = uke.exec(t.slice(n, n + 1));
return r ? n + r[0].length : -1;
}
-function wke(e, t, n) {
+function Dke(e, t, n) {
var r = dX.exec(t.slice(n));
return r ? (e.Q = +r[0], n + r[0].length) : -1;
}
-function Tke(e, t, n) {
+function Oke(e, t, n) {
var r = dX.exec(t.slice(n));
return r ? (e.s = +r[0], n + r[0].length) : -1;
}
function yX(e, t) {
return fX(e.getDate(), t, 2);
}
-function Eke(e, t) {
+function kke(e, t) {
return fX(e.getHours(), t, 2);
}
-function Dke(e, t) {
+function Ake(e, t) {
return fX(e.getHours() % 12 || 12, t, 2);
}
-function Oke(e, t) {
+function jke(e, t) {
return fX(1 + GY.count(iX(e), e), t, 3);
}
function bX(e, t) {
return fX(e.getMilliseconds(), t, 3);
}
-function kke(e, t) {
+function Mke(e, t) {
return bX(e, t) + "000";
}
-function Ake(e, t) {
+function Nke(e, t) {
return fX(e.getMonth() + 1, t, 2);
}
-function jke(e, t) {
+function Pke(e, t) {
return fX(e.getMinutes(), t, 2);
}
-function Mke(e, t) {
+function Fke(e, t) {
return fX(e.getSeconds(), t, 2);
}
-function Nke(e) {
+function Ike(e) {
var t = e.getDay();
return t === 0 ? 7 : t;
}
-function Pke(e, t) {
+function Lke(e, t) {
return fX(YY.count(iX(e) - 1, e), t, 2);
}
function xX(e) {
var t = e.getDay();
return t >= 4 || t === 0 ? ZY(e) : ZY.ceil(e);
}
-function Fke(e, t) {
+function Rke(e, t) {
return e = xX(e), fX(ZY.count(iX(e), e) + (iX(e).getDay() === 4), t, 2);
}
-function Ike(e) {
+function zke(e) {
return e.getDay();
}
-function Lke(e, t) {
+function Bke(e, t) {
return fX(XY.count(iX(e) - 1, e), t, 2);
}
-function Rke(e, t) {
+function Vke(e, t) {
return fX(e.getFullYear() % 100, t, 2);
}
-function zke(e, t) {
+function Hke(e, t) {
return e = xX(e), fX(e.getFullYear() % 100, t, 2);
}
-function Bke(e, t) {
+function Uke(e, t) {
return fX(e.getFullYear() % 1e4, t, 4);
}
-function Vke(e, t) {
+function Wke(e, t) {
var n = e.getDay();
return e = n >= 4 || n === 0 ? ZY(e) : ZY.ceil(e), fX(e.getFullYear() % 1e4, t, 4);
}
-function Hke(e) {
+function Gke(e) {
var t = e.getTimezoneOffset();
return (t > 0 ? "-" : (t *= -1, "+")) + fX(t / 60 | 0, "0", 2) + fX(t % 60, "0", 2);
}
function SX(e, t) {
return fX(e.getUTCDate(), t, 2);
}
-function Uke(e, t) {
+function Kke(e, t) {
return fX(e.getUTCHours(), t, 2);
}
-function Wke(e, t) {
+function qke(e, t) {
return fX(e.getUTCHours() % 12 || 12, t, 2);
}
-function Gke(e, t) {
+function Jke(e, t) {
return fX(1 + KY.count(aX(e), e), t, 3);
}
function CX(e, t) {
return fX(e.getUTCMilliseconds(), t, 3);
}
-function Kke(e, t) {
+function Yke(e, t) {
return CX(e, t) + "000";
}
-function qke(e, t) {
+function Xke(e, t) {
return fX(e.getUTCMonth() + 1, t, 2);
}
-function Jke(e, t) {
+function Zke(e, t) {
return fX(e.getUTCMinutes(), t, 2);
}
-function Yke(e, t) {
+function Qke(e, t) {
return fX(e.getUTCSeconds(), t, 2);
}
-function Xke(e) {
+function $ke(e) {
var t = e.getUTCDay();
return t === 0 ? 7 : t;
}
-function Zke(e, t) {
+function eAe(e, t) {
return fX($Y.count(aX(e) - 1, e), t, 2);
}
function wX(e) {
var t = e.getUTCDay();
return t >= 4 || t === 0 ? tX(e) : tX.ceil(e);
}
-function Qke(e, t) {
+function tAe(e, t) {
return e = wX(e), fX(tX.count(aX(e), e) + (aX(e).getUTCDay() === 4), t, 2);
}
-function $ke(e) {
+function nAe(e) {
return e.getUTCDay();
}
-function eAe(e, t) {
+function rAe(e, t) {
return fX(eX.count(aX(e) - 1, e), t, 2);
}
-function tAe(e, t) {
+function iAe(e, t) {
return fX(e.getUTCFullYear() % 100, t, 2);
}
-function nAe(e, t) {
+function aAe(e, t) {
return e = wX(e), fX(e.getUTCFullYear() % 100, t, 2);
}
-function rAe(e, t) {
+function oAe(e, t) {
return fX(e.getUTCFullYear() % 1e4, t, 4);
}
-function iAe(e, t) {
+function sAe(e, t) {
var n = e.getUTCDay();
return e = n >= 4 || n === 0 ? tX(e) : tX.ceil(e), fX(e.getUTCFullYear() % 1e4, t, 4);
}
-function aAe() {
+function cAe() {
return "+0000";
}
function TX() {
@@ -62007,7 +62103,7 @@ function DX(e) {
//#endregion
//#region node_modules/d3-time-format/src/defaultLocale.js
var OX, kX, AX;
-oAe({
+lAe({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
@@ -62059,15 +62155,15 @@ oAe({
"Dec"
]
});
-function oAe(e) {
- return OX = oke(e), kX = OX.format, OX.parse, AX = OX.utcFormat, OX.utcParse, OX;
+function lAe(e) {
+ return OX = lke(e), kX = OX.format, OX.parse, AX = OX.utcFormat, OX.utcParse, OX;
}
//#endregion
//#region node_modules/d3-scale/src/time.js
-function sAe(e) {
+function uAe(e) {
return new Date(e);
}
-function cAe(e) {
+function dAe(e) {
return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
}
function jX(e, t, n, r, i, a, o, s, c, l) {
@@ -62078,7 +62174,7 @@ function jX(e, t, n, r, i, a, o, s, c, l) {
return u.invert = function(e) {
return new Date(d(e));
}, u.domain = function(e) {
- return arguments.length ? f(Array.from(e, cAe)) : f().map(sAe);
+ return arguments.length ? f(Array.from(e, dAe)) : f().map(uAe);
}, u.ticks = function(t) {
var n = f();
return e(n[0], n[n.length - 1], t ?? 10);
@@ -62091,13 +62187,13 @@ function jX(e, t, n, r, i, a, o, s, c, l) {
return GJ(u, jX(e, t, n, r, i, a, o, s, c, l));
}, u;
}
-function lAe() {
- return eJ.apply(jX(ike, ake, iX, nX, YY, GY, UY, VY, BY, kX).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
+function fAe() {
+ return $q.apply(jX(ske, cke, iX, nX, YY, GY, UY, VY, BY, kX).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
//#endregion
//#region node_modules/d3-scale/src/utcTime.js
-function uAe() {
- return eJ.apply(jX(nke, rke, aX, rX, $Y, KY, WY, HY, BY, AX).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
+function pAe() {
+ return $q.apply(jX(ake, oke, aX, rX, $Y, KY, WY, HY, BY, AX).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
}
//#endregion
//#region node_modules/d3-scale/src/sequential.js
@@ -62132,27 +62228,27 @@ function PX() {
var e = cY(MX()(UJ));
return e.copy = function() {
return NX(e, PX());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
function FX() {
var e = hY(MX()).domain([1, 10]);
return e.copy = function() {
return NX(e, FX()).base(e.base());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
function IX() {
var e = yY(MX());
return e.copy = function() {
return NX(e, IX()).constant(e.constant());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
function LX() {
var e = SY(MX());
return e.copy = function() {
return NX(e, LX()).exponent(e.exponent());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
-function dAe() {
+function mAe() {
return LX.apply(null, arguments).exponent(.5);
}
//#endregion
@@ -62160,22 +62256,22 @@ function dAe() {
function RX() {
var e = [], t = UJ;
function n(n) {
- if (n != null && !isNaN(n = +n)) return t((Bq(e, n, 1) - 1) / (e.length - 1));
+ if (n != null && !isNaN(n = +n)) return t((zq(e, n, 1) - 1) / (e.length - 1));
}
return n.domain = function(t) {
if (!arguments.length) return e.slice();
e = [];
for (let n of t) n != null && !isNaN(n = +n) && e.push(n);
- return e.sort(Iq), n;
+ return e.sort(Fq), n;
}, n.interpolator = function(e) {
return arguments.length ? (t = e, n) : t;
}, n.range = function() {
return e.map((n, r) => t(r / (e.length - 1)));
}, n.quantiles = function(t) {
- return Array.from({ length: t + 1 }, (n, r) => XDe(e, r / t));
+ return Array.from({ length: t + 1 }, (n, r) => eOe(e, r / t));
}, n.copy = function() {
return RX(t).domain(e);
- }, tJ.apply(n, arguments);
+ }, eJ.apply(n, arguments);
}
//#endregion
//#region node_modules/d3-scale/src/diverging.js
@@ -62198,7 +62294,7 @@ function zX() {
function m(e) {
return function(t) {
var n, r, i;
- return arguments.length ? ([n, r, i] = t, l = COe(e, [
+ return arguments.length ? ([n, r, i] = t, l = EOe(e, [
n,
r,
i
@@ -62219,7 +62315,7 @@ function BX() {
var e = cY(zX()(UJ));
return e.copy = function() {
return NX(e, BX());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
function VX() {
var e = hY(zX()).domain([
@@ -62229,38 +62325,38 @@ function VX() {
]);
return e.copy = function() {
return NX(e, VX()).base(e.base());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
function HX() {
var e = yY(zX());
return e.copy = function() {
return NX(e, HX()).constant(e.constant());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
function UX() {
var e = SY(zX());
return e.copy = function() {
return NX(e, UX()).exponent(e.exponent());
- }, tJ.apply(e, arguments);
+ }, eJ.apply(e, arguments);
}
-function fAe() {
+function hAe() {
return UX.apply(null, arguments).exponent(.5);
}
//#endregion
//#region node_modules/victory-vendor/es/d3-scale.js
var WX = /* @__PURE__ */ St({
- scaleBand: () => iJ,
+ scaleBand: () => rJ,
scaleDiverging: () => BX,
scaleDivergingLog: () => VX,
scaleDivergingPow: () => UX,
- scaleDivergingSqrt: () => fAe,
+ scaleDivergingSqrt: () => hAe,
scaleDivergingSymlog: () => HX,
scaleIdentity: () => uY,
- scaleImplicit: () => nJ,
+ scaleImplicit: () => tJ,
scaleLinear: () => lY,
scaleLog: () => gY,
- scaleOrdinal: () => rJ,
- scalePoint: () => $De,
+ scaleOrdinal: () => nJ,
+ scalePoint: () => rOe,
scalePow: () => CY,
scaleQuantile: () => EY,
scaleQuantize: () => DY,
@@ -62269,26 +62365,26 @@ var WX = /* @__PURE__ */ St({
scaleSequentialLog: () => FX,
scaleSequentialPow: () => LX,
scaleSequentialQuantile: () => RX,
- scaleSequentialSqrt: () => dAe,
+ scaleSequentialSqrt: () => mAe,
scaleSequentialSymlog: () => IX,
- scaleSqrt: () => KOe,
+ scaleSqrt: () => YOe,
scaleSymlog: () => bY,
scaleThreshold: () => OY,
- scaleTime: () => lAe,
- scaleUtc: () => uAe,
+ scaleTime: () => fAe,
+ scaleUtc: () => pAe,
tickFormat: () => sY
});
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineConfiguredScale.js
-function pAe(e) {
+function gAe(e) {
if (e in WX) return WX[e]();
- var t = `scale${jB(e)}`;
+ var t = `scale${AB(e)}`;
if (t in WX) return WX[t]();
}
function GX(e, t, n) {
if (typeof e == "function") return e.copy().domain(t).range(n);
if (e != null) {
- var r = pAe(e);
+ var r = gAe(e);
if (r != null) return r.domain(t).range(n), r;
}
}
@@ -62297,22 +62393,22 @@ function KX(e, t, n, r) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineRealScaleType.js
-function mAe(e) {
- return `scale${jB(e)}`;
+function _Ae(e) {
+ return `scale${AB(e)}`;
}
-function hAe(e) {
- return mAe(e) in WX;
+function vAe(e) {
+ return _Ae(e) in WX;
}
var qX = (e, t, n) => {
if (e != null) {
var { scale: r, type: i } = e;
if (r === "auto") return i === "category" && n && (n.indexOf("LineChart") >= 0 || n.indexOf("AreaChart") >= 0 || n.indexOf("ComposedChart") >= 0 && !t) ? "point" : i === "category" ? "band" : "linear";
- if (typeof r == "string") return hAe(r) ? r : "point";
+ if (typeof r == "string") return vAe(r) ? r : "point";
}
};
//#endregion
//#region node_modules/recharts/es6/util/scale/createCategoricalInverse.js
-function gAe(e, t) {
+function yAe(e, t) {
for (var n = 0, r = e.length, i = e[0] < e[e.length - 1]; n < r;) {
var a = Math.floor((n + r) / 2);
(i ? e[a] < t : e[a] > t) ? n = a + 1 : r = a;
@@ -62323,7 +62419,7 @@ function JX(e, t) {
if (e) {
var n = t ?? e.domain(), r = n.map((t) => e(t) ?? 0), i = e.range();
if (!(n.length === 0 || i.length < 2)) return (e) => {
- var t = gAe(r, e);
+ var t = yAe(r, e);
if (t <= 0) return n[0];
if (t >= n.length) return n[n.length - 1];
var i = r[t - 1] ?? 0, a = r[t] ?? 0;
@@ -62333,7 +62429,7 @@ function JX(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineInverseScaleFunction.js
-function _Ae(e) {
+function bAe(e) {
if (e != null) return "invert" in e && typeof e.invert == "function" ? e.invert.bind(e) : JX(e, void 0);
}
//#endregion
@@ -62352,26 +62448,26 @@ function XX(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? YX(Object(n), !0).forEach(function(t) {
- vAe(e, t, n[t]);
+ xAe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : YX(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function vAe(e, t, n) {
- return (t = yAe(t)) in e ? Object.defineProperty(e, t, {
+function xAe(e, t, n) {
+ return (t = SAe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function yAe(e) {
- var t = bAe(e, "string");
+function SAe(e) {
+ var t = CAe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function bAe(e, t) {
+function CAe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62439,7 +62535,7 @@ var ZX = [0, "auto"], QX = {
unit: void 0,
niceTicks: "auto",
width: 60
-}, nZ = (e, t) => e.cartesianAxis.yAxis[t], rZ = (e, t) => nZ(e, t) ?? tZ, xAe = {
+}, nZ = (e, t) => e.cartesianAxis.yAxis[t], rZ = (e, t) => nZ(e, t) ?? tZ, wAe = {
domain: [0, "auto"],
includeHidden: !1,
reversed: !1,
@@ -62452,16 +62548,16 @@ var ZX = [0, "auto"], QX = {
scale: "auto",
type: "number",
unit: ""
-}, iZ = (e, t) => e.cartesianAxis.zAxis[t] ?? xAe, aZ = (e, t, n) => {
+}, iZ = (e, t) => e.cartesianAxis.zAxis[t] ?? wAe, aZ = (e, t, n) => {
switch (t) {
case "xAxis": return eZ(e, n);
case "yAxis": return rZ(e, n);
case "zAxis": return iZ(e, n);
- case "angleAxis": return gq(e, n);
- case "radiusAxis": return _q(e, n);
+ case "angleAxis": return hq(e, n);
+ case "radiusAxis": return gq(e, n);
default: throw Error(`Unexpected axis type: ${t}`);
}
-}, SAe = (e, t, n) => {
+}, TAe = (e, t, n) => {
switch (t) {
case "xAxis": return eZ(e, n);
case "yAxis": return rZ(e, n);
@@ -62471,8 +62567,8 @@ var ZX = [0, "auto"], QX = {
switch (t) {
case "xAxis": return eZ(e, n);
case "yAxis": return rZ(e, n);
- case "angleAxis": return gq(e, n);
- case "radiusAxis": return _q(e, n);
+ case "angleAxis": return hq(e, n);
+ case "radiusAxis": return gq(e, n);
default: throw Error(`Unexpected axis type: ${t}`);
}
}, sZ = (e) => e.graphicalItems.cartesianItems.some((e) => e.type === "bar") || e.graphicalItems.polarItems.some((e) => e.type === "radialBar");
@@ -62488,40 +62584,40 @@ function cZ(e, t) {
}
};
}
-var lZ = (e) => e.graphicalItems.cartesianItems, CAe = $([Tq, Eq], cZ), uZ = (e, t, n) => e.filter(n).filter((e) => t?.includeHidden === !0 || !e.hide), dZ = $([
+var lZ = (e) => e.graphicalItems.cartesianItems, EAe = $([wq, Tq], cZ), uZ = (e, t, n) => e.filter(n).filter((e) => t?.includeHidden === !0 || !e.hide), dZ = $([
lZ,
aZ,
- CAe
-], uZ, { memoizeOptions: { resultEqualityCheck: jq } }), fZ = $([dZ], (e) => e.filter((e) => e.type === "area" || e.type === "bar").filter(kq)), pZ = (e) => e.filter((e) => !("stackId" in e) || e.stackId === void 0), wAe = $([dZ], pZ), mZ = (e) => e.map((e) => e.data).filter(Boolean).flat(1), TAe = $([dZ], mZ, { memoizeOptions: { resultEqualityCheck: jq } }), hZ = (e, t) => {
+ EAe
+], uZ, { memoizeOptions: { resultEqualityCheck: Aq } }), fZ = $([dZ], (e) => e.filter((e) => e.type === "area" || e.type === "bar").filter(Oq)), pZ = (e) => e.filter((e) => !("stackId" in e) || e.stackId === void 0), DAe = $([dZ], pZ), mZ = (e) => e.map((e) => e.data).filter(Boolean).flat(1), OAe = $([dZ], mZ, { memoizeOptions: { resultEqualityCheck: Aq } }), hZ = (e, t) => {
var { chartData: n = [], dataStartIndex: r, dataEndIndex: i } = t;
return e.length > 0 ? e : n.slice(r, i + 1);
-}, gZ = $([TAe, LK], hZ), _Z = (e, t, n) => t?.dataKey == null ? n.length > 0 ? n.map((e) => e.dataKey).flatMap((t) => e.map((e) => ({ value: LU(e, t) }))) : e.map((e) => ({ value: e })) : e.map((e) => ({ value: LU(e, t.dataKey) })), vZ = $([
+}, gZ = $([OAe, IK], hZ), _Z = (e, t, n) => t?.dataKey == null ? n.length > 0 ? n.map((e) => e.dataKey).flatMap((t) => e.map((e) => ({ value: IU(e, t) }))) : e.map((e) => ({ value: e })) : e.map((e) => ({ value: IU(e, t.dataKey) })), vZ = $([
gZ,
aZ,
dZ
], _Z);
function yZ(e) {
- if (wB(e) || e instanceof Date) {
+ if (CB(e) || e instanceof Date) {
var t = Number(e);
- if (NU(t)) return t;
+ if (MU(t)) return t;
}
}
function bZ(e) {
if (Array.isArray(e)) {
var t = [yZ(e[0]), yZ(e[1])];
- return zK(t) ? t : void 0;
+ return RK(t) ? t : void 0;
}
var n = yZ(e);
if (n != null) return [n, n];
}
function xZ(e) {
- return e.map(yZ).filter(MB);
+ return e.map(yZ).filter(jB);
}
-function EAe(e, t) {
+function kAe(e, t) {
var n = yZ(e), r = yZ(t);
return n == null && r == null ? 0 : n == null ? -1 : r == null ? 1 : n - r;
}
-var DAe = $([vZ], (e) => e?.map((e) => e.value).sort(EAe));
+var AAe = $([vZ], (e) => e?.map((e) => e.value).sort(kAe));
function SZ(e, t) {
switch (e) {
case "xAxis": return t.direction === "x";
@@ -62529,17 +62625,17 @@ function SZ(e, t) {
default: return !1;
}
}
-function OAe(e, t, n) {
- return !n || typeof t != "number" || SB(t) || !n.length ? [] : xZ(n.flatMap((n) => {
- var r = LU(e, n.dataKey), i, a;
- if (Array.isArray(r) ? [i, a] = r : i = a = r, !(!NU(i) || !NU(a))) return [t - i, t + a];
+function jAe(e, t, n) {
+ return !n || typeof t != "number" || xB(t) || !n.length ? [] : xZ(n.flatMap((n) => {
+ var r = IU(e, n.dataKey), i, a;
+ if (Array.isArray(r) ? [i, a] = r : i = a = r, !(!MU(i) || !MU(a))) return [t - i, t + a];
}));
}
-var CZ = (e) => oZ(e, Mq(e), Nq(e)), wZ = $([CZ], (e) => e?.dataKey), kAe = $([
+var CZ = (e) => oZ(e, jq(e), Mq(e)), wZ = $([CZ], (e) => e?.dataKey), MAe = $([
fZ,
- LK,
+ IK,
CZ
-], Oq), TZ = (e, t, n, r) => {
+], Dq), TZ = (e, t, n, r) => {
var i = t.reduce((e, t) => {
if (t.stackId == null) return e;
var n = e[t.stackId];
@@ -62548,22 +62644,22 @@ var CZ = (e) => oZ(e, Mq(e), Nq(e)), wZ = $([CZ], (e) => e?.dataKey), kAe = $([
return Object.fromEntries(Object.entries(i).map((t) => {
var [i, a] = t, o = r ? [...a].reverse() : a;
return [i, {
- stackedData: kwe(e, o.map(Dq), n),
+ stackedData: Nwe(e, o.map(Eq), n),
graphicalItems: o
}];
}));
}, EZ = $([
- kAe,
+ MAe,
fZ,
- tq,
- nq
+ eq,
+ tq
], TZ), DZ = (e, t, n, r) => {
var { dataStartIndex: i, dataEndIndex: a } = t;
if (r == null && n !== "zAxis") {
- var o = Mwe(e, i, a);
+ var o = Iwe(e, i, a);
if (o == null || o[0] !== 0 || o[1] !== 0) return o;
}
-}, AAe = $([aZ], (e) => e.allowDataOverflow), OZ = (e) => {
+}, NAe = $([aZ], (e) => e.allowDataOverflow), OZ = (e) => {
if (e == null || !("domain" in e)) return ZX;
if (e.domain != null) return e.domain;
if ("ticks" in e && e.ticks != null) {
@@ -62574,12 +62670,12 @@ var CZ = (e) => oZ(e, Mq(e), Nq(e)), wZ = $([CZ], (e) => e?.dataKey), kAe = $([
if (e.type === "category") return e.ticks.map(String);
}
return e?.domain ?? ZX;
-}, kZ = $([aZ], OZ), AZ = $([kZ, AAe], VK), jAe = $([
+}, kZ = $([aZ], OZ), AZ = $([kZ, NAe], BK), PAe = $([
EZ,
- FK,
- Tq,
+ PK,
+ wq,
AZ
-], DZ, { memoizeOptions: { resultEqualityCheck: Aq } }), jZ = (e) => e.errorBars, MAe = (e, t, n) => e.flatMap((e) => t[e.id]).filter(Boolean).filter((e) => SZ(n, e)), MZ = function() {
+], DZ, { memoizeOptions: { resultEqualityCheck: kq } }), jZ = (e) => e.errorBars, FAe = (e, t, n) => e.flatMap((e) => t[e.id]).filter(Boolean).filter((e) => SZ(n, e)), MZ = function() {
var e = [...arguments].filter(Boolean);
if (e.length !== 0) {
var t = e.flat();
@@ -62589,7 +62685,7 @@ var CZ = (e) => oZ(e, Mq(e), Nq(e)), wZ = $([CZ], (e) => e?.dataKey), kAe = $([
var a, o;
if (n.length > 0 && e.forEach((e) => {
n.forEach((n) => {
- var s = r[n.id]?.filter((e) => SZ(i, e)), c = LU(e, t.dataKey ?? n.dataKey), l = OAe(e, c, s);
+ var s = r[n.id]?.filter((e) => SZ(i, e)), c = IU(e, t.dataKey ?? n.dataKey), l = jAe(e, c, s);
if (l.length >= 2) {
var u = Math.min(...l), d = Math.max(...l);
(a == null || u < a) && (a = u), (o == null || d > o) && (o = d);
@@ -62598,98 +62694,98 @@ var CZ = (e) => oZ(e, Mq(e), Nq(e)), wZ = $([CZ], (e) => e?.dataKey), kAe = $([
f != null && (a = a == null ? f[0] : Math.min(a, f[0]), o = o == null ? f[1] : Math.max(o, f[1]));
});
}), t?.dataKey != null && e.forEach((e) => {
- var n = bZ(LU(e, t.dataKey));
+ var n = bZ(IU(e, t.dataKey));
n != null && (a = a == null ? n[0] : Math.min(a, n[0]), o = o == null ? n[1] : Math.max(o, n[1]));
- }), NU(a) && NU(o)) return [a, o];
-}, NAe = $([
+ }), MU(a) && MU(o)) return [a, o];
+}, IAe = $([
gZ,
aZ,
- wAe,
+ DAe,
jZ,
- Tq
-], NZ, { memoizeOptions: { resultEqualityCheck: Aq } });
-function PAe(e) {
+ wq
+], NZ, { memoizeOptions: { resultEqualityCheck: kq } });
+function LAe(e) {
var { value: t } = e;
- if (wB(t) || t instanceof Date) return t;
+ if (CB(t) || t instanceof Date) return t;
}
-var FAe = (e, t, n) => {
- var r = e.map(PAe).filter((e) => e != null);
- return n && (t.dataKey == null || t.allowDuplicatedCategory && DB(r)) ? PK(0, e.length) : t.allowDuplicatedCategory ? r : Array.from(new Set(r));
-}, PZ = (e) => e.referenceElements.dots, FZ = (e, t, n) => e.filter((e) => e.ifOverflow === "extendDomain").filter((e) => t === "xAxis" ? e.xAxisId === n : e.yAxisId === n), IAe = $([
+var RAe = (e, t, n) => {
+ var r = e.map(LAe).filter((e) => e != null);
+ return n && (t.dataKey == null || t.allowDuplicatedCategory && EB(r)) ? NK(0, e.length) : t.allowDuplicatedCategory ? r : Array.from(new Set(r));
+}, PZ = (e) => e.referenceElements.dots, FZ = (e, t, n) => e.filter((e) => e.ifOverflow === "extendDomain").filter((e) => t === "xAxis" ? e.xAxisId === n : e.yAxisId === n), zAe = $([
PZ,
- Tq,
- Eq
-], FZ), IZ = (e) => e.referenceElements.areas, LAe = $([
+ wq,
+ Tq
+], FZ), IZ = (e) => e.referenceElements.areas, BAe = $([
IZ,
- Tq,
- Eq
-], FZ), LZ = (e) => e.referenceElements.lines, RAe = $([
+ wq,
+ Tq
+], FZ), LZ = (e) => e.referenceElements.lines, VAe = $([
LZ,
- Tq,
- Eq
+ wq,
+ Tq
], FZ), RZ = (e, t) => {
if (e != null) {
var n = xZ(e.map((e) => t === "xAxis" ? e.x : e.y));
if (n.length !== 0) return [Math.min(...n), Math.max(...n)];
}
-}, zAe = $(IAe, Tq, RZ), zZ = (e, t) => {
+}, HAe = $(zAe, wq, RZ), zZ = (e, t) => {
if (e != null) {
var n = xZ(e.flatMap((e) => [t === "xAxis" ? e.x1 : e.y1, t === "xAxis" ? e.x2 : e.y2]));
if (n.length !== 0) return [Math.min(...n), Math.max(...n)];
}
-}, BAe = $([LAe, Tq], zZ);
-function VAe(e) {
+}, UAe = $([BAe, wq], zZ);
+function WAe(e) {
if (e.x != null) return xZ([e.x]);
var t = e.segment?.map((e) => e.x);
return t == null || t.length === 0 ? [] : xZ(t);
}
-function HAe(e) {
+function GAe(e) {
if (e.y != null) return xZ([e.y]);
var t = e.segment?.map((e) => e.y);
return t == null || t.length === 0 ? [] : xZ(t);
}
var BZ = (e, t) => {
if (e != null) {
- var n = e.flatMap((e) => t === "xAxis" ? VAe(e) : HAe(e));
+ var n = e.flatMap((e) => t === "xAxis" ? WAe(e) : GAe(e));
if (n.length !== 0) return [Math.min(...n), Math.max(...n)];
}
-}, UAe = $(zAe, $([RAe, Tq], BZ), BAe, (e, t, n) => MZ(e, n, t)), VZ = (e, t, n, r, i, a, o, s) => n ?? IDe(t, o === "vertical" && s === "xAxis" || o === "horizontal" && s === "yAxis" ? MZ(r, a, i) : MZ(a, i), e.allowDataOverflow), WAe = $([
+}, KAe = $(HAe, $([VAe, wq], BZ), UAe, (e, t, n) => MZ(e, n, t)), VZ = (e, t, n, r, i, a, o, s) => n ?? BDe(t, o === "vertical" && s === "xAxis" || o === "horizontal" && s === "yAxis" ? MZ(r, a, i) : MZ(a, i), e.allowDataOverflow), qAe = $([
aZ,
kZ,
AZ,
- jAe,
- NAe,
- UAe,
- wW,
- Tq
-], VZ, { memoizeOptions: { resultEqualityCheck: Aq } }), GAe = [0, 1], HZ = (e, t, n, r, i, a, o) => {
+ PAe,
+ IAe,
+ KAe,
+ CW,
+ wq
+], VZ, { memoizeOptions: { resultEqualityCheck: kq } }), JAe = [0, 1], HZ = (e, t, n, r, i, a, o) => {
if (e != null && n != null && n.length !== 0 || o !== void 0) {
- var { dataKey: s, type: c } = e, l = RU(t, a);
- return l && s == null ? PK(0, n?.length ?? 0) : c === "category" ? FAe(r, e, l) : i === "expand" ? GAe : o;
+ var { dataKey: s, type: c } = e, l = LU(t, a);
+ return l && s == null ? NK(0, n?.length ?? 0) : c === "category" ? RAe(r, e, l) : i === "expand" ? JAe : o;
}
}, UZ = $([
aZ,
- wW,
+ CW,
gZ,
vZ,
- tq,
- Tq,
- WAe
+ eq,
+ wq,
+ qAe
], HZ), WZ = $([
aZ,
sZ,
- rq
+ nq
], qX), GZ = (e, t, n) => {
var { niceTicks: r } = t;
if (r !== "none") {
var i = OZ(t), a = Array.isArray(i) && (i[0] === "auto" || i[1] === "auto");
- if ((r === "snap125" || r === "adaptive") && t != null && t.tickCount && zK(e)) {
- if (a) return YK(e, t.tickCount, t.allowDecimals, r);
- if (t.type === "number") return XK(e, t.tickCount, t.allowDecimals, r);
+ if ((r === "snap125" || r === "adaptive") && t != null && t.tickCount && RK(e)) {
+ if (a) return JK(e, t.tickCount, t.allowDecimals, r);
+ if (t.type === "number") return YK(e, t.tickCount, t.allowDecimals, r);
}
if (r === "auto" && n === "linear" && t != null && t.tickCount) {
- if (a && zK(e)) return YK(e, t.tickCount, t.allowDecimals, "adaptive");
- if (t.type === "number" && zK(e)) return XK(e, t.tickCount, t.allowDecimals, "adaptive");
+ if (a && RK(e)) return JK(e, t.tickCount, t.allowDecimals, "adaptive");
+ if (t.type === "number" && RK(e)) return YK(e, t.tickCount, t.allowDecimals, "adaptive");
}
}
}, KZ = $([
@@ -62697,16 +62793,16 @@ var BZ = (e, t) => {
oZ,
WZ
], GZ), qZ = (e, t, n, r) => {
- if (r !== "angleAxis" && e?.type === "number" && zK(t) && Array.isArray(n) && n.length > 0) {
+ if (r !== "angleAxis" && e?.type === "number" && RK(t) && Array.isArray(n) && n.length > 0) {
var i = t[0], a = n[0] ?? 0, o = t[1], s = n[n.length - 1] ?? 0;
return [Math.min(i, a), Math.max(o, s)];
}
return t;
-}, KAe = $([
+}, YAe = $([
aZ,
UZ,
KZ,
- Tq
+ wq
], qZ), JZ = $($(vZ, aZ, (e, t) => {
if (!(!t || t.type !== "number")) {
var n = Infinity, r = Array.from(xZ(e.map((e) => e.value))).sort((e, t) => e - t), i = r[0], a = r[r.length - 1];
@@ -62722,22 +62818,22 @@ var BZ = (e, t) => {
}
return n / o;
}
-}), wW, $K, iW, (e, t, n, r, i) => i, (e, t, n, r, i) => {
- if (!NU(e)) return 0;
+}), CW, QK, rW, (e, t, n, r, i) => i, (e, t, n, r, i) => {
+ if (!MU(e)) return 0;
var a = t === "vertical" ? r.height : r.width;
if (i === "gap") return e * a / 2;
if (i === "no-gap") {
- var o = EB(n, e * a), s = e * a / 2;
+ var o = TB(n, e * a), s = e * a / 2;
return s - o - (s - o) / a * o;
}
return 0;
-}), qAe = (e, t, n) => {
+}), XAe = (e, t, n) => {
var r = eZ(e, t);
return r == null || typeof r.padding != "string" ? 0 : JZ(e, "xAxis", t, n, r.padding);
-}, JAe = (e, t, n) => {
+}, ZAe = (e, t, n) => {
var r = rZ(e, t);
return r == null || typeof r.padding != "string" ? 0 : JZ(e, "yAxis", t, n, r.padding);
-}, YAe = $(eZ, qAe, (e, t) => {
+}, QAe = $(eZ, XAe, (e, t) => {
if (e == null) return {
left: 0,
right: 0
@@ -62750,7 +62846,7 @@ var BZ = (e, t) => {
left: (n.left ?? 0) + t,
right: (n.right ?? 0) + t
};
-}), XAe = $(rZ, JAe, (e, t) => {
+}), $Ae = $(rZ, ZAe, (e, t) => {
if (e == null) return {
top: 0,
bottom: 0
@@ -62763,98 +62859,98 @@ var BZ = (e, t) => {
top: (n.top ?? 0) + t,
bottom: (n.bottom ?? 0) + t
};
-}), ZAe = $([
- iW,
- YAe,
- cW,
+}), eje = $([
+ rW,
+ QAe,
sW,
+ oW,
(e, t, n) => n
], (e, t, n, r, i) => {
var { padding: a } = r;
return i ? [a.left, n.width - a.right] : [e.left + t.left, e.left + e.width - t.right];
-}), QAe = $([
- iW,
- wW,
- XAe,
- cW,
+}), tje = $([
+ rW,
+ CW,
+ $Ae,
sW,
+ oW,
(e, t, n) => n
], (e, t, n, r, i, a) => {
var { padding: o } = i;
return a ? [r.height - o.bottom, o.top] : t === "horizontal" ? [e.top + e.height - n.bottom, e.top + n.top] : [e.top + n.top, e.top + e.height - n.bottom];
}), YZ = (e, t, n, r) => {
switch (t) {
- case "xAxis": return ZAe(e, n, r);
- case "yAxis": return QAe(e, n, r);
+ case "xAxis": return eje(e, n, r);
+ case "yAxis": return tje(e, n, r);
case "zAxis": return iZ(e, n)?.range;
- case "angleAxis": return Sq(e);
- case "radiusAxis": return Cq(e, n);
+ case "angleAxis": return xq(e);
+ case "radiusAxis": return Sq(e, n);
default: return;
}
-}, XZ = $([aZ, YZ], uq), ZZ = $([
+}, XZ = $([aZ, YZ], lq), ZZ = $([
aZ,
WZ,
- $([WZ, KAe], Fq),
+ $([WZ, YAe], Pq),
XZ
], KX), QZ = (e, t, n, r) => {
if (n != null && n.dataKey != null) {
var { type: i, scale: a } = n;
- if (RU(e, r) && (i === "number" || a !== "auto")) return t.map((e) => e.value);
+ if (LU(e, r) && (i === "number" || a !== "auto")) return t.map((e) => e.value);
}
}, $Z = $([
- wW,
+ CW,
vZ,
oZ,
- Tq
-], QZ), eQ = $([ZZ], Pq);
-$([ZZ], _Ae), $([ZZ, DAe], JX), $([
+ wq
+], QZ), eQ = $([ZZ], Nq);
+$([ZZ], bAe), $([ZZ, AAe], JX), $([
dZ,
jZ,
- Tq
-], MAe);
+ wq
+], FAe);
function tQ(e, t) {
return e.id < t.id ? -1 : +(e.id > t.id);
}
-var nQ = (e, t) => t, rQ = (e, t, n) => n, $Ae = $(eW, nQ, rQ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(tQ)), eje = $(tW, nQ, rQ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(tQ)), iQ = (e, t) => ({
+var nQ = (e, t) => t, rQ = (e, t, n) => n, nje = $($U, nQ, rQ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(tQ)), rje = $(eW, nQ, rQ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(tQ)), iQ = (e, t) => ({
width: e.width,
height: t.height
-}), tje = (e, t) => ({
+}), ije = (e, t) => ({
width: typeof t.width == "number" ? t.width : 60,
height: e.height
-}), aQ = $(iW, eZ, iQ), nje = (e, t, n) => {
+}), aQ = $(rW, eZ, iQ), aje = (e, t, n) => {
switch (t) {
case "top": return e.top;
case "bottom": return n - e.bottom;
default: return 0;
}
-}, rje = (e, t, n) => {
+}, oje = (e, t, n) => {
switch (t) {
case "left": return e.left;
case "right": return n - e.right;
default: return 0;
}
-}, ije = $(QU, iW, $Ae, nQ, rQ, (e, t, n, r, i) => {
+}, sje = $(ZU, rW, nje, nQ, rQ, (e, t, n, r, i) => {
var a = {}, o;
return n.forEach((n) => {
var s = iQ(t, n);
- o ??= nje(t, r, e);
+ o ??= aje(t, r, e);
var c = r === "top" && !i || r === "bottom" && i;
a[n.id] = o - Number(c) * s.height, o += (c ? -1 : 1) * s.height;
}), a;
-}), aje = $(ZU, iW, eje, nQ, rQ, (e, t, n, r, i) => {
+}), cje = $(XU, rW, rje, nQ, rQ, (e, t, n, r, i) => {
var a = {}, o;
return n.forEach((n) => {
- var s = tje(t, n);
- o ??= rje(t, r, e);
+ var s = ije(t, n);
+ o ??= oje(t, r, e);
var c = r === "left" && !i || r === "right" && i;
a[n.id] = o - Number(c) * s.width, o += (c ? -1 : 1) * s.width;
}), a;
-}), oje = $([
- iW,
+}), lje = $([
+ rW,
eZ,
(e, t) => {
var n = eZ(e, t);
- if (n != null) return ije(e, n.orientation, n.mirror);
+ if (n != null) return sje(e, n.orientation, n.mirror);
},
(e, t) => t
], (e, t, n, r) => {
@@ -62868,12 +62964,12 @@ var nQ = (e, t) => t, rQ = (e, t, n) => n, $Ae = $(eW, nQ, rQ, (e, t, n) => e.fi
y: i
};
}
-}), sje = $([
- iW,
+}), uje = $([
+ rW,
rZ,
(e, t) => {
var n = rZ(e, t);
- if (n != null) return aje(e, n.orientation, n.mirror);
+ if (n != null) return cje(e, n.orientation, n.mirror);
},
(e, t) => t
], (e, t, n, r) => {
@@ -62887,7 +62983,7 @@ var nQ = (e, t) => t, rQ = (e, t, n) => n, $Ae = $(eW, nQ, rQ, (e, t, n) => e.fi
y: e.top
};
}
-}), oQ = $(iW, rZ, (e, t) => ({
+}), oQ = $(rW, rZ, (e, t) => ({
width: typeof t.width == "number" ? t.width : 60,
height: e.height
})), sQ = (e, t, n) => {
@@ -62898,27 +62994,27 @@ var nQ = (e, t) => t, rQ = (e, t, n) => n, $Ae = $(eW, nQ, rQ, (e, t, n) => e.fi
}
}, cQ = (e, t, n, r) => {
if (n != null) {
- var { allowDuplicatedCategory: i, type: a, dataKey: o } = n, s = RU(e, r), c = t.map((e) => e.value);
- if (o && s && a === "category" && i && DB(c)) return c;
+ var { allowDuplicatedCategory: i, type: a, dataKey: o } = n, s = LU(e, r), c = t.map((e) => e.value);
+ if (o && s && a === "category" && i && EB(c)) return c;
}
}, lQ = $([
- wW,
+ CW,
vZ,
aZ,
- Tq
+ wq
], cQ), uQ = $([
- wW,
- SAe,
+ CW,
+ TAe,
WZ,
eQ,
lQ,
$Z,
YZ,
KZ,
- Tq
+ wq
], (e, t, n, r, i, a, o, s, c) => {
if (t != null) {
- var l = RU(e, c);
+ var l = LU(e, c);
return {
angle: t.angle,
interval: t.interval,
@@ -62942,45 +63038,45 @@ var nQ = (e, t) => t, rQ = (e, t, n) => n, $Ae = $(eW, nQ, rQ, (e, t, n) => e.fi
}
}), dQ = (e, t, n, r, i, a, o, s, c) => {
if (t != null && r != null) {
- var l = RU(e, c), { type: u, ticks: d, tickCount: f } = t, p = n === "scaleBand" && typeof r.bandwidth == "function" ? r.bandwidth() / 2 : 2, m = u === "category" && r.bandwidth ? r.bandwidth() / p : 0;
- m = c === "angleAxis" && a != null && a.length >= 2 ? xB(a[0] - a[1]) * 2 * m : m;
+ var l = LU(e, c), { type: u, ticks: d, tickCount: f } = t, p = n === "scaleBand" && typeof r.bandwidth == "function" ? r.bandwidth() / 2 : 2, m = u === "category" && r.bandwidth ? r.bandwidth() / p : 0;
+ m = c === "angleAxis" && a != null && a.length >= 2 ? bB(a[0] - a[1]) * 2 * m : m;
var h = d || i;
return h ? h.map((e, t) => {
var n = o ? o.indexOf(e) : e, i = r.map(n);
- return NU(i) ? {
+ return MU(i) ? {
index: t,
coordinate: i + m,
value: e,
offset: m
} : null;
- }).filter(MB) : l && s ? s.map((e, t) => {
+ }).filter(jB) : l && s ? s.map((e, t) => {
var n = r.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + m,
value: e,
index: t,
offset: m
} : null;
- }).filter(MB) : r.ticks ? r.ticks(f).map((e, t) => {
+ }).filter(jB) : r.ticks ? r.ticks(f).map((e, t) => {
var n = r.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + m,
value: e,
index: t,
offset: m
} : null;
- }).filter(MB) : r.domain().map((e, t) => {
+ }).filter(jB) : r.domain().map((e, t) => {
var n = r.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + m,
value: o ? o[e] : e,
index: t,
offset: m
} : null;
- }).filter(MB);
+ }).filter(jB);
}
}, fQ = $([
- wW,
+ CW,
oZ,
WZ,
eQ,
@@ -62988,44 +63084,44 @@ var nQ = (e, t) => t, rQ = (e, t, n) => n, $Ae = $(eW, nQ, rQ, (e, t, n) => e.fi
YZ,
lQ,
$Z,
- Tq
+ wq
], dQ), pQ = (e, t, n, r, i, a, o) => {
if (t != null && n != null && r != null && r[0] !== r[1]) {
- var s = RU(e, o), { tickCount: c } = t, l = 0;
- return l = o === "angleAxis" && r?.length >= 2 ? xB(r[0] - r[1]) * 2 * l : l, s && a ? a.map((e, t) => {
+ var s = LU(e, o), { tickCount: c } = t, l = 0;
+ return l = o === "angleAxis" && r?.length >= 2 ? bB(r[0] - r[1]) * 2 * l : l, s && a ? a.map((e, t) => {
var r = n.map(e);
- return NU(r) ? {
+ return MU(r) ? {
coordinate: r + l,
value: e,
index: t,
offset: l
} : null;
- }).filter(MB) : n.ticks ? n.ticks(c).map((e, t) => {
+ }).filter(jB) : n.ticks ? n.ticks(c).map((e, t) => {
var r = n.map(e);
- return NU(r) ? {
+ return MU(r) ? {
coordinate: r + l,
value: e,
index: t,
offset: l
} : null;
- }).filter(MB) : n.domain().map((e, t) => {
+ }).filter(jB) : n.domain().map((e, t) => {
var r = n.map(e);
- return NU(r) ? {
+ return MU(r) ? {
coordinate: r + l,
value: i ? i[e] : e,
index: t,
offset: l
} : null;
- }).filter(MB);
+ }).filter(jB);
}
}, mQ = $([
- wW,
+ CW,
oZ,
eQ,
YZ,
lQ,
$Z,
- Tq
+ wq
], pQ), hQ = $(aZ, eQ, (e, t) => {
if (e != null && t != null) return XX(XX({}, e), {}, { scale: t });
});
@@ -63034,13 +63130,13 @@ $((e, t, n) => iZ(e, n), $([$([
WZ,
UZ,
XZ
-], KX)], Pq), (e, t) => {
+], KX)], Nq), (e, t) => {
if (e != null && t != null) return XX(XX({}, e), {}, { scale: t });
});
-var cje = $([
- wW,
- eW,
- tW
+var dje = $([
+ CW,
+ $U,
+ eW
], (e, t, n) => {
switch (e) {
case "horizontal": return t.some((e) => e.reversed) ? "right-to-left" : "left-to-right";
@@ -63071,21 +63167,21 @@ function vQ(e, t, n) {
function yQ(e, t) {
return vQ(t, gQ(e), _Q(e));
}
-function lje(e) {
+function fje(e) {
return Q((t) => yQ(t, e));
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineActiveLabel.js
var bQ = (e, t) => {
var n, r = Number(t);
- if (!(SB(r) || t == null)) return r >= 0 ? e == null || (n = e[r]) == null ? void 0 : n.value : void 0;
-}, uje = (e) => e.tooltip.settings, xQ = {
+ if (!(xB(r) || t == null)) return r >= 0 ? e == null || (n = e[r]) == null ? void 0 : n.value : void 0;
+}, pje = (e) => e.tooltip.settings, xQ = {
active: !1,
index: null,
dataKey: void 0,
graphicalItemId: void 0,
coordinate: void 0
-}, SQ = iU({
+}, SQ = rU({
name: "tooltip",
initialState: {
itemInteraction: {
@@ -63118,23 +63214,23 @@ var bQ = (e, t) => {
reducers: {
addTooltipEntrySettings: {
reducer(e, t) {
- e.tooltipItemPayloads.push(hG(t.payload));
+ e.tooltipItemPayloads.push(mG(t.payload));
},
- prepare: eU()
+ prepare: $H()
},
replaceTooltipEntrySettings: {
reducer(e, t) {
- var { prev: n, next: r } = t.payload, i = GH(e).tooltipItemPayloads.indexOf(hG(n));
- i > -1 && (e.tooltipItemPayloads[i] = hG(r));
+ var { prev: n, next: r } = t.payload, i = WH(e).tooltipItemPayloads.indexOf(mG(n));
+ i > -1 && (e.tooltipItemPayloads[i] = mG(r));
},
- prepare: eU()
+ prepare: $H()
},
removeTooltipEntrySettings: {
reducer(e, t) {
- var n = GH(e).tooltipItemPayloads.indexOf(hG(t.payload));
+ var n = WH(e).tooltipItemPayloads.indexOf(mG(t.payload));
n > -1 && e.tooltipItemPayloads.splice(n, 1);
},
- prepare: eU()
+ prepare: $H()
},
setTooltipSettingsState(e, t) {
e.settings = t.payload;
@@ -63164,7 +63260,7 @@ var bQ = (e, t) => {
e.keyboardInteraction.active = t.payload.active, e.keyboardInteraction.index = t.payload.activeIndex, e.keyboardInteraction.coordinate = t.payload.activeCoordinate;
}
}
-}), { addTooltipEntrySettings: dje, replaceTooltipEntrySettings: fje, removeTooltipEntrySettings: pje, setTooltipSettingsState: mje, setActiveMouseOverItemIndex: CQ, mouseLeaveItem: hje, mouseLeaveChart: wQ, setActiveClickItemIndex: gje, setMouseOverAxisIndex: TQ, setMouseClickAxisIndex: _je, setSyncInteraction: EQ, setKeyboardInteraction: DQ } = SQ.actions, vje = SQ.reducer;
+}), { addTooltipEntrySettings: mje, replaceTooltipEntrySettings: hje, removeTooltipEntrySettings: gje, setTooltipSettingsState: _je, setActiveMouseOverItemIndex: CQ, mouseLeaveItem: vje, mouseLeaveChart: wQ, setActiveClickItemIndex: yje, setMouseOverAxisIndex: TQ, setMouseClickAxisIndex: bje, setSyncInteraction: EQ, setKeyboardInteraction: DQ } = SQ.actions, xje = SQ.reducer;
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineTooltipInteractionState.js
function OQ(e, t) {
@@ -63181,26 +63277,26 @@ function kQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? OQ(Object(n), !0).forEach(function(t) {
- yje(e, t, n[t]);
+ Sje(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : OQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function yje(e, t, n) {
- return (t = bje(t)) in e ? Object.defineProperty(e, t, {
+function Sje(e, t, n) {
+ return (t = Cje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function bje(e) {
- var t = xje(e, "string");
+function Cje(e) {
+ var t = wje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function xje(e, t) {
+function wje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63210,21 +63306,21 @@ function xje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function Sje(e, t, n) {
+function Tje(e, t, n) {
return t === "axis" ? n === "click" ? e.axisInteraction.click : e.axisInteraction.hover : n === "click" ? e.itemInteraction.click : e.itemInteraction.hover;
}
-function Cje(e) {
+function Eje(e) {
return e.index != null;
}
var AQ = (e, t, n, r) => {
if (t == null) return xQ;
- var i = Sje(e, t, n);
+ var i = Tje(e, t, n);
if (i == null) return xQ;
if (i.active) return i;
if (e.keyboardInteraction.active) return e.keyboardInteraction;
if (e.syncInteraction.active && e.syncInteraction.index != null) return e.syncInteraction;
var a = e.settings.active === !0;
- if (Cje(i)) {
+ if (Eje(i)) {
if (a) return kQ(kQ({}, i), {}, { active: !0 });
} else if (r != null) return {
active: !0,
@@ -63237,7 +63333,7 @@ var AQ = (e, t, n, r) => {
};
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineActiveTooltipIndex.js
-function wje(e) {
+function Dje(e) {
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
if (e instanceof Date) {
var t = e.valueOf();
@@ -63246,24 +63342,24 @@ function wje(e) {
var n = Number(e);
return Number.isFinite(n) ? n : void 0;
}
-function Tje(e, t) {
- var n = wje(e), r = t[0], i = t[1];
+function Oje(e, t) {
+ var n = Dje(e), r = t[0], i = t[1];
return n !== void 0 && n >= Math.min(r, i) && n <= Math.max(r, i);
}
-function Eje(e, t, n) {
+function kje(e, t, n) {
if (n == null || t == null) return !0;
- var r = LU(e, t);
- return r == null || !zK(n) || Tje(r, n);
+ var r = IU(e, t);
+ return r == null || !RK(n) || Oje(r, n);
}
var jQ = (e, t, n, r) => {
var i = e?.index;
if (i == null) return null;
var a = Number(i);
- if (!NU(a)) return i;
+ if (!MU(a)) return i;
var o = 0, s = Infinity;
t.length > 0 && (s = t.length - 1);
var c = Math.max(o, Math.min(a, s)), l = t[c];
- return l == null || Eje(l, n, r) ? String(c) : null;
+ return l == null || kje(l, n, r) ? String(c) : null;
}, MQ = (e, t, n, r, i, a, o) => {
if (a != null) {
var s = o[0]?.getPosition(a);
@@ -63307,26 +63403,26 @@ function LQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? IQ(Object(n), !0).forEach(function(t) {
- Dje(e, t, n[t]);
+ Aje(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : IQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Dje(e, t, n) {
- return (t = Oje(t)) in e ? Object.defineProperty(e, t, {
+function Aje(e, t, n) {
+ return (t = jje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Oje(e) {
- var t = kje(e, "string");
+function jje(e) {
+ var t = Mje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function kje(e, t) {
+function Mje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63336,126 +63432,126 @@ function kje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function Aje(e) {
+function Nje(e) {
if (typeof e == "string" || typeof e == "number") return e;
}
-function jje(e) {
+function Pje(e) {
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
}
-function Mje(e) {
+function Fje(e) {
if (typeof e == "string" || typeof e == "number") return e;
if (typeof e == "function") return (t) => e(t);
}
function RQ(e) {
if (typeof e == "string") return e;
}
-function Nje(e) {
+function Ije(e) {
if (!(typeof e != "object" || !e)) return {
- name: "name" in e ? Aje(e.name) : void 0,
- unit: "unit" in e ? jje(e.unit) : void 0,
- dataKey: "dataKey" in e ? Mje(e.dataKey) : void 0,
+ name: "name" in e ? Nje(e.name) : void 0,
+ unit: "unit" in e ? Pje(e.unit) : void 0,
+ dataKey: "dataKey" in e ? Fje(e.dataKey) : void 0,
payload: "payload" in e ? e.payload : void 0,
color: "color" in e ? RQ(e.color) : void 0,
fill: "fill" in e ? RQ(e.fill) : void 0
};
}
-function Pje(e, t) {
+function Lje(e, t) {
return e ?? t;
}
var zQ = (e, t, n, r, i, a, o) => {
if (t != null && a != null) {
var { chartData: s, computedData: c, dataStartIndex: l, dataEndIndex: u } = n;
return e.reduce((e, n) => {
- var { dataDefinedOnItem: d, settings: f } = n, p = Pje(d, s), m = Array.isArray(p) ? MU(p, l, u) : p, h = f?.dataKey ?? r, g = f?.nameKey, _ = r && Array.isArray(m) && !Array.isArray(m[0]) && o === "axis" ? kB(m, r, i) : a(m, t, c, g);
+ var { dataDefinedOnItem: d, settings: f } = n, p = Lje(d, s), m = Array.isArray(p) ? jU(p, l, u) : p, h = f?.dataKey ?? r, g = f?.nameKey, _ = r && Array.isArray(m) && !Array.isArray(m[0]) && o === "axis" ? OB(m, r, i) : a(m, t, c, g);
return Array.isArray(_) ? _.forEach((t) => {
- var n = Nje(t), r = n?.name, i = n?.dataKey, a = n?.payload, o = LQ(LQ({}, f), {}, {
+ var n = Ije(t), r = n?.name, i = n?.dataKey, a = n?.payload, o = LQ(LQ({}, f), {}, {
name: r,
unit: n?.unit,
color: n?.color ?? f?.color,
fill: n?.fill ?? f?.fill
});
- e.push(YU({
+ e.push(JU({
tooltipEntrySettings: o,
dataKey: i,
payload: a,
- value: LU(a, i),
+ value: IU(a, i),
name: r == null ? void 0 : String(r)
}));
- }) : e.push(YU({
+ }) : e.push(JU({
tooltipEntrySettings: f,
dataKey: h,
payload: _,
- value: LU(_, h),
- name: LU(_, g) ?? f?.name
+ value: IU(_, h),
+ name: IU(_, g) ?? f?.name
})), e;
}, []);
}
}, BQ = $([
CZ,
sZ,
- rq
+ nq
], qX), VQ = $([
$([(e) => e.graphicalItems.cartesianItems, (e) => e.graphicalItems.polarItems], (e, t) => [...e, ...t]),
CZ,
- $([Mq, Nq], cZ)
-], uZ, { memoizeOptions: { resultEqualityCheck: jq } }), Fje = $([VQ], (e) => e.filter(kq)), HQ = $([$([VQ], mZ, { memoizeOptions: { resultEqualityCheck: jq } }), FK], hZ), Ije = $([
- Fje,
- FK,
+ $([jq, Mq], cZ)
+], uZ, { memoizeOptions: { resultEqualityCheck: Aq } }), Rje = $([VQ], (e) => e.filter(Oq)), HQ = $([$([VQ], mZ, { memoizeOptions: { resultEqualityCheck: Aq } }), PK], hZ), zje = $([
+ Rje,
+ PK,
CZ
-], Oq), UQ = $([
+], Dq), UQ = $([
HQ,
CZ,
VQ
-], _Z), WQ = $([CZ], OZ), GQ = $([WQ, $([CZ], (e) => e.allowDataOverflow)], VK), Lje = $([
+], _Z), WQ = $([CZ], OZ), GQ = $([WQ, $([CZ], (e) => e.allowDataOverflow)], BK), Bje = $([
$([
- Ije,
- $([VQ], (e) => e.filter(kq)),
- tq,
- nq
+ zje,
+ $([VQ], (e) => e.filter(Oq)),
+ eq,
+ tq
], TZ),
- FK,
- Mq,
+ PK,
+ jq,
GQ
-], DZ), Rje = $([
+], DZ), Vje = $([
HQ,
CZ,
$([VQ], pZ),
jZ,
- Mq
-], NZ, { memoizeOptions: { resultEqualityCheck: Aq } }), zje = $([$([
+ jq
+], NZ, { memoizeOptions: { resultEqualityCheck: kq } }), Hje = $([$([
PZ,
- Mq,
- Nq
-], FZ), Mq], RZ), Bje = $([$([
+ jq,
+ Mq
+], FZ), jq], RZ), Uje = $([$([
IZ,
- Mq,
- Nq
-], FZ), Mq], zZ), KQ = $([
+ jq,
+ Mq
+], FZ), jq], zZ), KQ = $([
CZ,
- wW,
+ CW,
HQ,
UQ,
- tq,
- Mq,
+ eq,
+ jq,
$([
CZ,
WQ,
GQ,
- Lje,
- Rje,
+ Bje,
+ Vje,
$([
- zje,
+ Hje,
$([$([
LZ,
- Mq,
- Nq
- ], FZ), Mq], BZ),
- Bje
+ jq,
+ Mq
+ ], FZ), jq], BZ),
+ Uje
], MZ),
- wW,
- Mq
+ CW,
+ jq
], VZ)
-], HZ), Vje = $([
+], HZ), Wje = $([
CZ,
KQ,
$([
@@ -63463,59 +63559,59 @@ var zQ = (e, t, n, r, i, a, o) => {
CZ,
BQ
], GZ),
- Mq
-], qZ), qQ = (e) => YZ(e, Mq(e), Nq(e), !1), JQ = $([CZ, qQ], uq), YQ = $([$([
+ jq
+], qZ), qQ = (e) => YZ(e, jq(e), Mq(e), !1), JQ = $([CZ, qQ], lq), YQ = $([$([
CZ,
BQ,
- Vje,
+ Wje,
JQ
-], KX)], Pq), XQ = $([
- wW,
+], KX)], Nq), XQ = $([
+ CW,
CZ,
BQ,
YQ,
qQ,
$([
- wW,
+ CW,
UQ,
CZ,
- Mq
+ jq
], cQ),
$([
- wW,
+ CW,
UQ,
CZ,
- Mq
+ jq
], QZ),
- Mq
+ jq
], (e, t, n, r, i, a, o, s) => {
if (t) {
- var { type: c } = t, l = RU(e, s);
+ var { type: c } = t, l = LU(e, s);
if (r) {
var u = n === "scaleBand" && r.bandwidth ? r.bandwidth() / 2 : 2, d = c === "category" && r.bandwidth ? r.bandwidth() / u : 0;
- return d = s === "angleAxis" && i != null && i?.length >= 2 ? xB(i[0] - i[1]) * 2 * d : d, l && o ? o.map((e, t) => {
+ return d = s === "angleAxis" && i != null && i?.length >= 2 ? bB(i[0] - i[1]) * 2 * d : d, l && o ? o.map((e, t) => {
var n = r.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + d,
value: e,
index: t,
offset: d
} : null;
- }).filter(MB) : r.domain().map((e, t) => {
+ }).filter(jB) : r.domain().map((e, t) => {
var n = r.map(e);
- return NU(n) ? {
+ return MU(n) ? {
coordinate: n + d,
value: a ? a[e] : e,
index: t,
offset: d
} : null;
- }).filter(MB);
+ }).filter(jB);
}
}
}), ZQ = $([
gQ,
_Q,
- uje
+ pje
], (e, t, n) => vQ(n.shared, e, t)), QQ = (e) => e.tooltip.settings.trigger, $Q = (e) => e.tooltip.settings.defaultIndex, e$ = $([
FQ,
ZQ,
@@ -63528,25 +63624,25 @@ var zQ = (e, t, n, r, i, a, o) => {
KQ
], jQ), n$ = $([XQ, t$], bQ), r$ = $([e$], (e) => {
if (e) return e.dataKey;
-}), Hje = $([e$], (e) => {
+}), Gje = $([e$], (e) => {
if (e) return e.graphicalItemId;
}), i$ = $([
FQ,
ZQ,
QQ,
$Q
-], NQ), Uje = $([e$, $([
+], NQ), Kje = $([e$, $([
+ XU,
ZU,
- QU,
- wW,
- iW,
+ CW,
+ rW,
XQ,
$Q,
i$
-], MQ)], (e, t) => e != null && e.coordinate ? e.coordinate : t), Wje = $([e$], (e) => e?.active ?? !1), Gje = $([$([
+], MQ)], (e, t) => e != null && e.coordinate ? e.coordinate : t), qje = $([e$], (e) => e?.active ?? !1), Jje = $([$([
i$,
t$,
- FK,
+ PK,
wZ,
n$,
PQ,
@@ -63573,26 +63669,26 @@ function o$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? a$(Object(n), !0).forEach(function(t) {
- Kje(e, t, n[t]);
+ Yje(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : a$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Kje(e, t, n) {
- return (t = qje(t)) in e ? Object.defineProperty(e, t, {
+function Yje(e, t, n) {
+ return (t = Xje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function qje(e) {
- var t = Jje(e, "string");
+function Xje(e) {
+ var t = Zje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Jje(e, t) {
+function Zje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63602,9 +63698,9 @@ function Jje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var Yje = () => Q(CZ), Xje = () => {
- var e = Yje(), t = Q(XQ), n = Q(YQ);
- return JU(!e || !n ? void 0 : o$(o$({}, e), {}, { scale: n }), t);
+var Qje = () => Q(CZ), $je = () => {
+ var e = Qje(), t = Q(XQ), n = Q(YQ);
+ return qU(!e || !n ? void 0 : o$(o$({}, e), {}, { scale: n }), t);
};
//#endregion
//#region node_modules/recharts/es6/util/getActiveCoordinate.js
@@ -63622,26 +63718,26 @@ function c$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? s$(Object(n), !0).forEach(function(t) {
- Zje(e, t, n[t]);
+ eMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : s$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Zje(e, t, n) {
- return (t = Qje(t)) in e ? Object.defineProperty(e, t, {
+function eMe(e, t, n) {
+ return (t = tMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Qje(e) {
- var t = $je(e, "string");
+function tMe(e) {
+ var t = nMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function $je(e, t) {
+function nMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63651,7 +63747,7 @@ function $je(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var eMe = (e, t, n, r) => {
+var rMe = (e, t, n, r) => {
var i = t.find((e) => e && e.index === n);
if (i) {
if (e === "horizontal") return {
@@ -63667,18 +63763,18 @@ var eMe = (e, t, n, r) => {
x: 0,
y: 0
};
-}, tMe = (e, t, n, r) => {
+}, iMe = (e, t, n, r) => {
var i = t.find((e) => e && e.index === n);
if (i) {
if (e === "centric") {
var a = i.coordinate, { radius: o } = r;
- return c$(c$(c$({}, r), EK(r.cx, r.cy, o, a)), {}, {
+ return c$(c$(c$({}, r), TK(r.cx, r.cy, o, a)), {}, {
angle: a,
radius: o
});
}
var s = i.coordinate, { angle: c } = r;
- return c$(c$(c$({}, r), EK(r.cx, r.cy, s, c)), {}, {
+ return c$(c$(c$({}, r), TK(r.cx, r.cy, s, c)), {}, {
angle: c,
radius: s
});
@@ -63697,7 +63793,7 @@ var eMe = (e, t, n, r) => {
y: 0
};
};
-function nMe(e, t) {
+function aMe(e, t) {
var { relativeX: n, relativeY: r } = e;
return n >= t.left && n <= t.left + t.width && r >= t.top && r <= t.top + t.height;
}
@@ -63707,9 +63803,9 @@ var l$ = (e, t, n, r, i) => {
if (r === "angleAxis" && i != null && Math.abs(Math.abs(i[1] - i[0]) - 360) <= 1e-6) for (var o = 0; o < a; o++) {
var s = o > 0 ? n[o - 1]?.coordinate : n[a - 1]?.coordinate, c = n[o]?.coordinate, l = o >= a - 1 ? n[0]?.coordinate : n[o + 1]?.coordinate, u = void 0;
if (s != null && c != null && l != null) {
- if (xB(c - s) !== xB(l - c)) {
+ if (bB(c - s) !== bB(l - c)) {
var d = [];
- if (xB(l - c) === xB(i[1] - i[0])) {
+ if (bB(l - c) === bB(i[1] - i[0])) {
u = l;
var f = c + i[1] - i[0];
d[0] = Math.min(f, (f + s) / 2), d[1] = Math.max(f, (f + s) / 2);
@@ -63734,7 +63830,7 @@ var l$ = (e, t, n, r, i) => {
}
}
return -1;
-}, u$ = () => Q(rq), d$ = (e, t) => t, f$ = (e, t, n) => n, p$ = (e, t, n, r) => r, rMe = $(XQ, (e) => DV(e, (e) => e.coordinate)), m$ = $([
+}, u$ = () => Q(nq), d$ = (e, t) => t, f$ = (e, t, n) => n, p$ = (e, t, n, r) => r, oMe = $(XQ, (e) => EV(e, (e) => e.coordinate)), m$ = $([
FQ,
d$,
f$,
@@ -63744,7 +63840,7 @@ var l$ = (e, t, n, r, i) => {
HQ,
wZ,
KQ
-], jQ), iMe = (e, t, n) => {
+], jQ), sMe = (e, t, n) => {
if (t != null) {
var r = FQ(e);
return t === "axis" ? n === "hover" ? r.axisInteraction.hover.dataKey : r.axisInteraction.click.dataKey : n === "hover" ? r.itemInteraction.hover.dataKey : r.itemInteraction.click.dataKey;
@@ -63755,54 +63851,54 @@ var l$ = (e, t, n, r, i) => {
f$,
p$
], NQ), _$ = $([
+ XU,
ZU,
- QU,
- wW,
- iW,
+ CW,
+ rW,
XQ,
p$,
g$
-], MQ), aMe = $([m$, _$], (e, t) => e.coordinate ?? t), v$ = $([XQ, h$], bQ), oMe = $([
+], MQ), cMe = $([m$, _$], (e, t) => e.coordinate ?? t), v$ = $([XQ, h$], bQ), lMe = $([
g$,
h$,
- FK,
+ PK,
wZ,
v$,
PQ,
d$
-], zQ), sMe = $([m$, h$], (e, t) => ({
+], zQ), uMe = $([m$, h$], (e, t) => ({
isActive: e.active && t != null,
activeIndex: t
-})), cMe = (e, t, n, r, i, a, o) => {
- if (!(!e || !n || !r || !i) && nMe(e, o)) {
- var s = l$(Nwe(e, t), a, i, n, r), c = eMe(t, i, s, e);
+})), dMe = (e, t, n, r, i, a, o) => {
+ if (!(!e || !n || !r || !i) && aMe(e, o)) {
+ var s = l$(Lwe(e, t), a, i, n, r), c = rMe(t, i, s, e);
return {
activeIndex: String(s),
activeCoordinate: c
};
}
-}, lMe = (e, t, n, r, i, a, o) => {
+}, fMe = (e, t, n, r, i, a, o) => {
if (!(!e || !r || !i || !a || !n)) {
- var s = CDe(e, n);
+ var s = DDe(e, n);
if (s) {
- var c = l$(Pwe(s, t), o, a, r, i), l = tMe(t, a, c, s);
+ var c = l$(Rwe(s, t), o, a, r, i), l = iMe(t, a, c, s);
return {
activeIndex: String(c),
activeCoordinate: l
};
}
}
-}, uMe = (e, t, n, r, i, a, o, s) => {
- if (!(!e || !t || !r || !i || !a)) return t === "horizontal" || t === "vertical" ? cMe(e, t, r, i, a, o, s) : lMe(e, t, n, r, i, a, o);
-}, dMe = $((e) => e.zIndex.zIndexMap, (e, t) => t, (e, t, n) => n, (e, t, n) => {
+}, pMe = (e, t, n, r, i, a, o, s) => {
+ if (!(!e || !t || !r || !i || !a)) return t === "horizontal" || t === "vertical" ? dMe(e, t, r, i, a, o, s) : fMe(e, t, n, r, i, a, o);
+}, mMe = $((e) => e.zIndex.zIndexMap, (e, t) => t, (e, t, n) => n, (e, t, n) => {
if (t != null) {
var r = e[t];
if (r != null) return n ? r.panoramaElement : r.element;
}
-}), fMe = $((e) => e.zIndex.zIndexMap, (e) => {
- var t = Object.keys(e).map((e) => parseInt(e, 10)).concat(Object.values(sq));
+}), hMe = $((e) => e.zIndex.zIndexMap, (e) => {
+ var t = Object.keys(e).map((e) => parseInt(e, 10)).concat(Object.values(oq));
return Array.from(new Set(t)).sort((e, t) => e - t);
-}, { memoizeOptions: { resultEqualityCheck: WDe } });
+}, { memoizeOptions: { resultEqualityCheck: JDe } });
//#endregion
//#region node_modules/recharts/es6/state/zIndexSlice.js
function y$(e, t) {
@@ -63819,26 +63915,26 @@ function b$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? y$(Object(n), !0).forEach(function(t) {
- pMe(e, t, n[t]);
+ gMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : y$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function pMe(e, t, n) {
- return (t = mMe(t)) in e ? Object.defineProperty(e, t, {
+function gMe(e, t, n) {
+ return (t = _Me(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function mMe(e) {
- var t = hMe(e, "string");
+function _Me(e) {
+ var t = vMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function hMe(e, t) {
+function vMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63848,17 +63944,17 @@ function hMe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var gMe = { zIndexMap: Object.values(sq).reduce((e, t) => b$(b$({}, e), {}, { [t]: {
+var yMe = { zIndexMap: Object.values(oq).reduce((e, t) => b$(b$({}, e), {}, { [t]: {
element: void 0,
panoramaElement: void 0,
consumers: 0
-} }), {}) }, _Me = new Set(Object.values(sq));
-function vMe(e) {
- return _Me.has(e);
+} }), {}) }, bMe = new Set(Object.values(oq));
+function xMe(e) {
+ return bMe.has(e);
}
-var x$ = iU({
+var x$ = rU({
name: "zIndex",
- initialState: gMe,
+ initialState: yMe,
reducers: {
registerZIndexPortal: {
reducer: (e, t) => {
@@ -63869,47 +63965,47 @@ var x$ = iU({
panoramaElement: void 0
};
},
- prepare: eU()
+ prepare: $H()
},
unregisterZIndexPortal: {
reducer: (e, t) => {
var { zIndex: n } = t.payload;
- e.zIndexMap[n] && (--e.zIndexMap[n].consumers, e.zIndexMap[n].consumers <= 0 && !vMe(n) && delete e.zIndexMap[n]);
+ e.zIndexMap[n] && (--e.zIndexMap[n].consumers, e.zIndexMap[n].consumers <= 0 && !xMe(n) && delete e.zIndexMap[n]);
},
- prepare: eU()
+ prepare: $H()
},
registerZIndexPortalElement: {
reducer: (e, t) => {
var { zIndex: n, element: r, isPanorama: i } = t.payload;
- e.zIndexMap[n] ? i ? e.zIndexMap[n].panoramaElement = hG(r) : e.zIndexMap[n].element = hG(r) : e.zIndexMap[n] = {
+ e.zIndexMap[n] ? i ? e.zIndexMap[n].panoramaElement = mG(r) : e.zIndexMap[n].element = mG(r) : e.zIndexMap[n] = {
consumers: 0,
- element: i ? void 0 : hG(r),
- panoramaElement: i ? hG(r) : void 0
+ element: i ? void 0 : mG(r),
+ panoramaElement: i ? mG(r) : void 0
};
},
- prepare: eU()
+ prepare: $H()
},
unregisterZIndexPortalElement: {
reducer: (e, t) => {
var { zIndex: n } = t.payload;
e.zIndexMap[n] && (t.payload.isPanorama ? e.zIndexMap[n].panoramaElement = void 0 : e.zIndexMap[n].element = void 0);
},
- prepare: eU()
+ prepare: $H()
}
}
-}), { registerZIndexPortal: yMe, unregisterZIndexPortal: bMe, registerZIndexPortalElement: xMe, unregisterZIndexPortalElement: SMe } = x$.actions, CMe = x$.reducer;
+}), { registerZIndexPortal: SMe, unregisterZIndexPortal: CMe, registerZIndexPortalElement: wMe, unregisterZIndexPortalElement: TMe } = x$.actions, EMe = x$.reducer;
//#endregion
//#region node_modules/recharts/es6/zIndex/ZIndexLayer.js
function S$(e) {
- var { zIndex: t, children: n } = e, r = lTe() && t !== void 0 && t !== 0, i = oW(), a = yV();
- (0, B.useLayoutEffect)(() => r ? (a(yMe({ zIndex: t })), () => {
- a(bMe({ zIndex: t }));
- }) : NB, [
+ var { zIndex: t, children: n } = e, r = pTe() && t !== void 0 && t !== 0, i = aW(), a = vV();
+ (0, B.useLayoutEffect)(() => r ? (a(SMe({ zIndex: t })), () => {
+ a(CMe({ zIndex: t }));
+ }) : MB, [
a,
t,
r
]);
- var o = Q((e) => dMe(e, t, i));
+ var o = Q((e) => mMe(e, t, i));
return r ? o ? /*#__PURE__*/ (0, $f.createPortal)(n, o) : null : n;
}
//#endregion
@@ -63937,26 +64033,26 @@ function T$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? w$(Object(n), !0).forEach(function(t) {
- wMe(e, t, n[t]);
+ DMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : w$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function wMe(e, t, n) {
- return (t = TMe(t)) in e ? Object.defineProperty(e, t, {
+function DMe(e, t, n) {
+ return (t = OMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function TMe(e) {
- var t = EMe(e, "string");
+function OMe(e) {
+ var t = kMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function EMe(e, t) {
+function kMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63966,18 +64062,18 @@ function EMe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function DMe(e) {
+function AMe(e) {
var { cursor: t, cursorComp: n, cursorProps: r } = e;
return /*#__PURE__*/ (0, B.isValidElement)(t) ? /*#__PURE__*/ (0, B.cloneElement)(t, r) : /*#__PURE__*/ (0, B.createElement)(n, r);
}
-function OMe(e) {
+function jMe(e) {
var { coordinate: t, payload: n, index: r, offset: i, tooltipAxisBandSize: a, layout: o, cursor: s, tooltipEventType: c, chartName: l } = e, u = t, d = n, f = r;
if (!s || !u || l !== "ScatterChart" && c !== "axis") return null;
var p, m, h;
- if (l === "ScatterChart") p = u, m = DEe, h = sq.cursorLine;
- else if (l === "BarChart") p = OEe(o, u, i, a), m = xK, h = sq.cursorRectangle;
- else if (o === "radial" && zB(u)) {
- var { cx: g, cy: _, radius: v, startAngle: y, endAngle: b } = DK(u);
+ if (l === "ScatterChart") p = u, m = jEe, h = oq.cursorLine;
+ else if (l === "BarChart") p = MEe(o, u, i, a), m = bK, h = oq.cursorRectangle;
+ else if (o === "radial" && RB(u)) {
+ var { cx: g, cy: _, radius: v, startAngle: y, endAngle: b } = EK(u);
p = {
cx: g,
cy: _,
@@ -63985,25 +64081,25 @@ function OMe(e) {
endAngle: b,
innerRadius: v,
outerRadius: v
- }, m = MK, h = sq.cursorLine;
- } else p = { points: PDe(o, u, i) }, m = JG, h = sq.cursorLine;
+ }, m = jK, h = oq.cursorLine;
+ } else p = { points: RDe(o, u, i) }, m = qG, h = oq.cursorLine;
var x = typeof s == "object" && "className" in s ? s.className : void 0, S = T$(T$(T$(T$({
stroke: "#ccc",
pointerEvents: "none"
- }, i), p), mz(s)), {}, {
+ }, i), p), pz(s)), {}, {
payload: d,
payloadIndex: f,
className: _h("recharts-tooltip-cursor", x)
});
- return /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex ?? h }, /*#__PURE__*/ B.createElement(DMe, {
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex ?? h }, /*#__PURE__*/ B.createElement(AMe, {
cursor: s,
cursorComp: m,
cursorProps: S
}));
}
-function kMe(e) {
- var t = Xje(), n = xW(), r = TW(), i = u$();
- return t == null || n == null || r == null || i == null ? null : /*#__PURE__*/ B.createElement(OMe, C$({}, e, {
+function MMe(e) {
+ var t = $je(), n = bW(), r = wW(), i = u$();
+ return t == null || n == null || r == null || i == null ? null : /*#__PURE__*/ B.createElement(jMe, C$({}, e, {
offset: n,
layout: r,
tooltipAxisBandSize: t,
@@ -64012,7 +64108,7 @@ function kMe(e) {
}
//#endregion
//#region node_modules/recharts/es6/context/tooltipPortalContext.js
-var E$ = /*#__PURE__*/ (0, B.createContext)(null), AMe = () => (0, B.useContext)(E$), jMe = (/* @__PURE__ */ Tt((/* @__PURE__ */ xt(((e, t) => {
+var E$ = /*#__PURE__*/ (0, B.createContext)(null), NMe = () => (0, B.useContext)(E$), PMe = (/* @__PURE__ */ Tt((/* @__PURE__ */ xt(((e, t) => {
var n = Object.prototype.hasOwnProperty, r = "~";
function i() {}
Object.create && (i.prototype = Object.create(null), new i().__proto__ || (r = !1));
@@ -64099,12 +64195,12 @@ var E$ = /*#__PURE__*/ (0, B.createContext)(null), AMe = () => (0, B.useContext)
var t;
return e ? (t = r ? r + e : e, this._events[t] && s(this, t)) : (this._events = new i(), this._eventsCount = 0), this;
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = r, c.EventEmitter = c, t !== void 0 && (t.exports = c);
-})))(), 1)).default, D$ = new jMe(), O$ = "recharts.syncEvent.tooltip", k$ = "recharts.syncEvent.brush", A$ = (e, t) => {
+})))(), 1)).default, D$ = new PMe(), O$ = "recharts.syncEvent.tooltip", k$ = "recharts.syncEvent.brush", A$ = (e, t) => {
if (t && Array.isArray(e)) {
var n = Number.parseInt(t, 10);
- if (!SB(n)) return e[n];
+ if (!xB(n)) return e[n];
}
-}, j$ = iU({
+}, j$ = rU({
name: "options",
initialState: {
chartName: "",
@@ -64115,13 +64211,13 @@ var E$ = /*#__PURE__*/ (0, B.createContext)(null), AMe = () => (0, B.useContext)
reducers: { createEventEmitter: (e) => {
e.eventEmitter ??= Symbol("rechartsEventEmitter");
} }
-}), MMe = j$.reducer, { createEventEmitter: NMe } = j$.actions;
+}), FMe = j$.reducer, { createEventEmitter: IMe } = j$.actions;
//#endregion
//#region node_modules/recharts/es6/synchronisation/syncSelectors.js
-function PMe(e) {
+function LMe(e) {
return e.tooltip.syncInteraction;
}
-var M$ = iU({
+var M$ = rU({
name: "chartData",
initialState: {
chartData: void 0,
@@ -64131,7 +64227,7 @@ var M$ = iU({
},
reducers: {
setChartData(e, t) {
- if (e.chartData = hG(t.payload), t.payload == null) {
+ if (e.chartData = mG(t.payload), t.payload == null) {
e.dataStartIndex = 0, e.dataEndIndex = 0;
return;
}
@@ -64145,7 +64241,7 @@ var M$ = iU({
n != null && (e.dataStartIndex = n), r != null && (e.dataEndIndex = r);
}
}
-}), { setChartData: N$, setDataStartEndIndexes: FMe, setComputedData: IMe } = M$.actions, LMe = M$.reducer, RMe = ["x", "y"];
+}), { setChartData: N$, setDataStartEndIndexes: RMe, setComputedData: zMe } = M$.actions, BMe = M$.reducer, VMe = ["x", "y"];
function P$(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -64160,26 +64256,26 @@ function F$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? P$(Object(n), !0).forEach(function(t) {
- zMe(e, t, n[t]);
+ HMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : P$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function zMe(e, t, n) {
- return (t = BMe(t)) in e ? Object.defineProperty(e, t, {
+function HMe(e, t, n) {
+ return (t = UMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function BMe(e) {
- var t = VMe(e, "string");
+function UMe(e) {
+ var t = WMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function VMe(e, t) {
+function WMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64189,16 +64285,16 @@ function VMe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function HMe(e, t) {
+function GMe(e, t) {
if (e == null) return {};
- var n, r, i = UMe(e, t);
+ var n, r, i = KMe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function UMe(e, t) {
+function KMe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -64207,16 +64303,16 @@ function UMe(e, t) {
}
return n;
}
-function WMe() {
- var e = Q(iq), t = Q(oq), n = yV(), r = Q(aq), i = Q(XQ), a = TW(), o = bW(), s = Q((e) => e.rootProps.className);
+function qMe() {
+ var e = Q(rq), t = Q(aq), n = vV(), r = Q(iq), i = Q(XQ), a = wW(), o = yW(), s = Q((e) => e.rootProps.className);
(0, B.useEffect)(() => {
- if (e == null) return NB;
+ if (e == null) return MB;
var s = (s, c, l) => {
if (t !== l && e === s) {
if (r === "index") {
var u;
if (o && c != null && (u = c.payload) != null && u.coordinate && c.payload.sourceViewBox) {
- var d = c.payload.coordinate, { x: f, y: p } = d, m = HMe(d, RMe), { x: h, y: g, width: _, height: v } = c.payload.sourceViewBox, y = F$(F$({}, m), {}, {
+ var d = c.payload.coordinate, { x: f, y: p } = d, m = GMe(d, VMe), { x: h, y: g, width: _, height: v } = c.payload.sourceViewBox, y = F$(F$({}, m), {}, {
x: o.x + (_ ? (f - h) / _ : 0) * o.width,
y: o.y + (v ? (p - g) / v : 0) * o.height
});
@@ -64277,12 +64373,12 @@ function WMe() {
o
]);
}
-function GMe() {
- var e = Q(iq), t = Q(oq), n = yV();
+function JMe() {
+ var e = Q(rq), t = Q(aq), n = vV();
(0, B.useEffect)(() => {
- if (e == null) return NB;
+ if (e == null) return MB;
var r = (r, i, a) => {
- t !== a && e === r && n(FMe(i));
+ t !== a && e === r && n(RMe(i));
};
return D$.on(k$, r), () => {
D$.off(k$, r);
@@ -64293,14 +64389,14 @@ function GMe() {
e
]);
}
-function KMe() {
- var e = yV();
+function YMe() {
+ var e = vV();
(0, B.useEffect)(() => {
- e(NMe());
- }, [e]), WMe(), GMe();
+ e(IMe());
+ }, [e]), qMe(), JMe();
}
-function qMe(e, t, n, r, i, a) {
- var o = Q((n) => iMe(n, e, t)), s = Q(Hje), c = Q(oq), l = Q(iq), u = Q(aq), d = Q(PMe)?.active, f = bW();
+function XMe(e, t, n, r, i, a) {
+ var o = Q((n) => sMe(n, e, t)), s = Q(Gje), c = Q(aq), l = Q(rq), u = Q(iq), d = Q(LMe)?.active, f = yW();
(0, B.useEffect)(() => {
if (!d && l != null && c != null) {
var e = EQ({
@@ -64344,26 +64440,26 @@ function L$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? I$(Object(n), !0).forEach(function(t) {
- JMe(e, t, n[t]);
+ ZMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : I$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function JMe(e, t, n) {
- return (t = YMe(t)) in e ? Object.defineProperty(e, t, {
+function ZMe(e, t, n) {
+ return (t = QMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function YMe(e) {
- var t = XMe(e, "string");
+function QMe(e) {
+ var t = $Me(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function XMe(e, t) {
+function $Me(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64373,13 +64469,13 @@ function XMe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function ZMe(e) {
+function eNe(e) {
return e.dataKey;
}
-function QMe(e, t) {
- return /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? /*#__PURE__*/ B.createElement(e, t) : /*#__PURE__*/ B.createElement(rEe, t);
+function tNe(e, t) {
+ return /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? /*#__PURE__*/ B.createElement(e, t) : /*#__PURE__*/ B.createElement(sEe, t);
}
-var R$ = [], $Me = {
+var R$ = [], nNe = {
allowEscapeViewBox: {
x: !1,
y: !1
@@ -64405,10 +64501,10 @@ var R$ = [], $Me = {
useTranslate3d: !1,
wrapperStyle: {}
};
-function eNe(e) {
- var t = UB(e, $Me), { active: n, allowEscapeViewBox: r, animationDuration: i, animationEasing: a, content: o, filterNull: s, isAnimationActive: c, offset: l, payloadUniqBy: u, position: d, reverseDirection: f, useTranslate3d: p, wrapperStyle: m, cursor: h, shared: g, trigger: _, defaultIndex: v, portal: y, axisId: b } = t, x = yV(), S = typeof v == "number" ? String(v) : v;
+function rNe(e) {
+ var t = HB(e, nNe), { active: n, allowEscapeViewBox: r, animationDuration: i, animationEasing: a, content: o, filterNull: s, isAnimationActive: c, offset: l, payloadUniqBy: u, position: d, reverseDirection: f, useTranslate3d: p, wrapperStyle: m, cursor: h, shared: g, trigger: _, defaultIndex: v, portal: y, axisId: b } = t, x = vV(), S = typeof v == "number" ? String(v) : v;
(0, B.useEffect)(() => {
- x(mje({
+ x(_je({
shared: g,
trigger: _,
axisId: b,
@@ -64423,12 +64519,12 @@ function eNe(e) {
n,
S
]);
- var C = bW(), w = RG(), T = lje(g), { activeIndex: E, isActive: D } = Q((e) => sMe(e, T, _, S)) ?? {}, O = Q((e) => oMe(e, T, _, S)), k = Q((e) => v$(e, T, _, S)), A = Q((e) => aMe(e, T, _, S)), j = O, M = AMe(), N = n ?? D ?? !1, [P, ee] = AV([j, N]), F = T === "axis" ? k : void 0;
- qMe(T, _, A, F, E, N);
+ var C = yW(), w = LG(), T = fje(g), { activeIndex: E, isActive: D } = Q((e) => uMe(e, T, _, S)) ?? {}, O = Q((e) => lMe(e, T, _, S)), k = Q((e) => v$(e, T, _, S)), A = Q((e) => cMe(e, T, _, S)), j = O, M = NMe(), N = n ?? D ?? !1, [P, ee] = kV([j, N]), F = T === "axis" ? k : void 0;
+ XMe(T, _, A, F, E, N);
var I = y ?? M;
if (I == null || C == null || T == null) return null;
var te = j ?? R$;
- N || (te = R$), s && te.length && (te = _V(te.filter((e) => e.value != null && (e.hide !== !0 || t.includeHidden)), u, ZMe));
+ N || (te = R$), s && te.length && (te = gV(te.filter((e) => e.value != null && (e.hide !== !0 || t.includeHidden)), u, eNe));
var ne = te.length > 0, re = L$(L$({}, t), {}, {
payload: te,
label: F,
@@ -64436,7 +64532,7 @@ function eNe(e) {
activeIndex: E,
coordinate: A,
accessibilityLayer: w
- }), ie = /*#__PURE__*/ B.createElement(pEe, {
+ }), ie = /*#__PURE__*/ B.createElement(_Ee, {
allowEscapeViewBox: r,
animationDuration: i,
animationEasing: a,
@@ -64453,8 +64549,8 @@ function eNe(e) {
lastBoundingBox: P,
innerRef: ee,
hasPortalFromProps: !!y
- }, QMe(o, re));
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ (0, $f.createPortal)(ie, I), N && /*#__PURE__*/ B.createElement(kMe, {
+ }, tNe(o, re));
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ (0, $f.createPortal)(ie, I), N && /*#__PURE__*/ B.createElement(MMe, {
cursor: h,
tooltipEventType: T,
coordinate: A,
@@ -64468,19 +64564,19 @@ var z$ = (e) => null;
z$.displayName = "Cell";
//#endregion
//#region node_modules/recharts/es6/util/LRUCache.js
-function tNe(e, t, n) {
- return (t = nNe(t)) in e ? Object.defineProperty(e, t, {
+function iNe(e, t, n) {
+ return (t = aNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function nNe(e) {
- var t = rNe(e, "string");
+function aNe(e) {
+ var t = oNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function rNe(e, t) {
+function oNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64490,9 +64586,9 @@ function rNe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var iNe = class {
+var sNe = class {
constructor(e) {
- tNe(this, "cache", /* @__PURE__ */ new Map()), this.maxSize = e;
+ iNe(this, "cache", /* @__PURE__ */ new Map()), this.maxSize = e;
}
get(e) {
var t = this.cache.get(e);
@@ -64525,30 +64621,30 @@ function B$(e, t) {
}
return n;
}
-function aNe(e) {
+function cNe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? B$(Object(n), !0).forEach(function(t) {
- oNe(e, t, n[t]);
+ lNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : B$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function oNe(e, t, n) {
- return (t = sNe(t)) in e ? Object.defineProperty(e, t, {
+function lNe(e, t, n) {
+ return (t = uNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function sNe(e) {
- var t = cNe(e, "string");
+function uNe(e) {
+ var t = dNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function cNe(e, t) {
+function dNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64558,10 +64654,10 @@ function cNe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var V$ = aNe({}, {
+var V$ = cNe({}, {
cacheSize: 2e3,
enableCache: !0
-}), H$ = new iNe(V$.cacheSize), lNe = {
+}), H$ = new sNe(V$.cacheSize), fNe = {
position: "absolute",
top: "-20000px",
left: 0,
@@ -64570,13 +64666,13 @@ var V$ = aNe({}, {
border: "none",
whiteSpace: "pre"
}, U$ = "recharts_measurement_span";
-function uNe(e, t) {
+function pNe(e, t) {
return `${e}|${t.fontSize || ""}|${t.fontFamily || ""}|${t.fontWeight || ""}|${t.fontStyle || ""}|${t.letterSpacing || ""}|${t.textTransform || ""}`;
}
var W$ = (e, t) => {
try {
var n = document.getElementById(U$);
- n || (n = document.createElement("span"), n.setAttribute("id", U$), n.setAttribute("aria-hidden", "true"), document.body.appendChild(n)), Object.assign(n.style, lNe, t), n.textContent = `${e}`;
+ n || (n = document.createElement("span"), n.setAttribute("id", U$), n.setAttribute("aria-hidden", "true"), document.body.appendChild(n)), Object.assign(n.style, fNe, t), n.textContent = `${e}`;
var r = n.getBoundingClientRect();
return {
width: r.width,
@@ -64590,29 +64686,29 @@ var W$ = (e, t) => {
}
}, G$ = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- if (e == null || PG.isSsr) return {
+ if (e == null || NG.isSsr) return {
width: 0,
height: 0
};
if (!V$.enableCache) return W$(e, t);
- var n = uNe(e, t), r = H$.get(n);
+ var n = pNe(e, t), r = H$.get(n);
if (r) return r;
var i = W$(e, t);
return H$.set(n, i), i;
}, K$;
-function dNe(e, t, n) {
- return (t = fNe(t)) in e ? Object.defineProperty(e, t, {
+function mNe(e, t, n) {
+ return (t = hNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function fNe(e) {
- var t = pNe(e, "string");
+function hNe(e) {
+ var t = gNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function pNe(e, t) {
+function gNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64622,7 +64718,7 @@ function pNe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var q$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, J$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, mNe = /^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/, hNe = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/, gNe = {
+var q$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, J$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, _Ne = /^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/, vNe = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/, yNe = {
cm: 96 / 2.54,
mm: 96 / 25.4,
pt: 96 / 72,
@@ -64630,7 +64726,7 @@ var q$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, J$ = /(
in: 96,
Q: 96 / 101.6,
px: 1
-}, _Ne = [
+}, bNe = [
"cm",
"mm",
"pt",
@@ -64639,20 +64735,20 @@ var q$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, J$ = /(
"Q",
"px"
];
-function vNe(e) {
- return _Ne.includes(e);
+function xNe(e) {
+ return bNe.includes(e);
}
var Y$ = "NaN";
-function yNe(e, t) {
- return e * gNe[t];
+function SNe(e, t) {
+ return e * yNe[t];
}
var X$ = class e {
static parse(t) {
- var [, n, r] = hNe.exec(t) ?? [];
+ var [, n, r] = vNe.exec(t) ?? [];
return n == null ? e.NaN : new e(parseFloat(n), r ?? "");
}
constructor(e, t) {
- this.num = e, this.unit = t, this.num = e, this.unit = t, SB(e) && (this.unit = ""), t !== "" && !mNe.test(t) && (this.num = NaN, this.unit = ""), vNe(t) && (this.num = yNe(e, t), this.unit = "px");
+ this.num = e, this.unit = t, this.num = e, this.unit = t, xB(e) && (this.unit = ""), t !== "" && !_Ne.test(t) && (this.num = NaN, this.unit = ""), xNe(t) && (this.num = SNe(e, t), this.unit = "px");
}
add(t) {
return this.unit === t.unit ? new e(this.num + t.num, this.unit) : new e(NaN, "");
@@ -64670,10 +64766,10 @@ var X$ = class e {
return `${this.num}${this.unit}`;
}
isNaN() {
- return SB(this.num);
+ return xB(this.num);
}
};
-K$ = X$, dNe(X$, "NaN", new K$(NaN, ""));
+K$ = X$, mNe(X$, "NaN", new K$(NaN, ""));
function Z$(e) {
if (e == null || e.includes(Y$)) return Y$;
for (var t = e; t.includes("*") || t.includes("/");) {
@@ -64689,31 +64785,31 @@ function Z$(e) {
return t;
}
var Q$ = /\(([^()]*)\)/;
-function bNe(e) {
+function CNe(e) {
for (var t = e, n; (n = Q$.exec(t)) != null;) {
var [, r] = n;
t = t.replace(Q$, Z$(r));
}
return t;
}
-function xNe(e) {
+function wNe(e) {
var t = e.replace(/\s+/g, "");
- return t = bNe(t), t = Z$(t), t;
+ return t = CNe(t), t = Z$(t), t;
}
-function SNe(e) {
+function TNe(e) {
try {
- return xNe(e);
+ return wNe(e);
} catch {
return Y$;
}
}
function $$(e) {
- var t = SNe(e.slice(5, -1));
+ var t = TNe(e.slice(5, -1));
return t === Y$ ? "" : t;
}
//#endregion
//#region node_modules/recharts/es6/component/Text.js
-var CNe = [
+var ENe = [
"x",
"y",
"lineHeight",
@@ -64722,7 +64818,7 @@ var CNe = [
"scaleToFit",
"textAnchor",
"verticalAnchor"
-], wNe = [
+], DNe = [
"dx",
"dy",
"angle",
@@ -64740,14 +64836,14 @@ function e1() {
}
function t1(e, t) {
if (e == null) return {};
- var n, r, i = TNe(e, t);
+ var n, r, i = ONe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function TNe(e, t) {
+function ONe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -64760,7 +64856,7 @@ var n1 = /[ \f\n\r\t\v\u2028\u2029]+/, r1 = (e) => {
var { children: t, breakAll: n, style: r } = e;
try {
var i = [];
- return AB(t) || (i = n ? t.toString().split("") : t.toString().split(n1)), {
+ return kB(t) || (i = n ? t.toString().split("") : t.toString().split(n1)), {
wordsWithComputedWidth: i.map((e) => ({
word: e,
width: G$(e, r).width
@@ -64774,8 +64870,8 @@ var n1 = /[ \f\n\r\t\v\u2028\u2029]+/, r1 = (e) => {
function i1(e) {
return e === "start" || e === "middle" || e === "end" || e === "inherit";
}
-function ENe(e) {
- return AB(e) || typeof e == "string" || typeof e == "number" || typeof e == "boolean";
+function kNe(e) {
+ return kB(e) || typeof e == "string" || typeof e == "number" || typeof e == "boolean";
}
var a1 = (e, t, n, r) => e.reduce((e, i) => {
var { word: a, width: o } = i, s = e[e.length - 1];
@@ -64788,16 +64884,16 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
e.push(c);
}
return e;
-}, []), o1 = (e) => e.reduce((e, t) => e.width > t.width ? e : t), DNe = "…", s1 = (e, t, n, r, i, a, o, s) => {
+}, []), o1 = (e) => e.reduce((e, t) => e.width > t.width ? e : t), ANe = "…", s1 = (e, t, n, r, i, a, o, s) => {
var c = r1({
breakAll: n,
style: r,
- children: e.slice(0, t) + DNe
+ children: e.slice(0, t) + ANe
});
if (!c) return [!1, []];
var l = a1(c.wordsWithComputedWidth, a, o, s);
return [l.length > i || o1(l).width > Number(a), l];
-}, ONe = (e, t, n, r, i) => {
+}, jNe = (e, t, n, r, i) => {
var { maxLines: a, children: o, style: s, breakAll: c } = e, l = Z(a), u = String(o), d = a1(t, r, n, i);
if (!l || i || !(d.length > a || o1(d).width > Number(r))) return d;
for (var f = 0, p = u.length - 1, m = 0, h; f <= p && m <= u.length - 1;) {
@@ -64810,11 +64906,11 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
}
return h || d;
}, c1 = (e) => [{
- words: AB(e) ? [] : e.toString().split(n1),
+ words: kB(e) ? [] : e.toString().split(n1),
width: void 0
-}], kNe = (e) => {
+}], MNe = (e) => {
var { width: t, scaleToFit: n, children: r, style: i, breakAll: a, maxLines: o } = e;
- if ((t || n) && !PG.isSsr) {
+ if ((t || n) && !NG.isSsr) {
var s, c, l = r1({
breakAll: a,
children: r,
@@ -64824,7 +64920,7 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
var { wordsWithComputedWidth: u, spaceWidth: d } = l;
s = u, c = d;
} else return c1(r);
- return ONe({
+ return jNe({
breakAll: a,
children: r,
maxLines: o,
@@ -64832,7 +64928,7 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
}, s, c, t, !!n);
}
return c1(r);
-}, l1 = "#808080", ANe = {
+}, l1 = "#808080", NNe = {
angle: 0,
breakAll: !1,
capHeight: "0.71em",
@@ -64844,7 +64940,7 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
x: 0,
y: 0
}, u1 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = UB(e, ANe), { x: r, y: i, lineHeight: a, capHeight: o, fill: s, scaleToFit: c, textAnchor: l, verticalAnchor: u } = n, d = t1(n, CNe), f = (0, B.useMemo)(() => kNe({
+ var n = HB(e, NNe), { x: r, y: i, lineHeight: a, capHeight: o, fill: s, scaleToFit: c, textAnchor: l, verticalAnchor: u } = n, d = t1(n, ENe), f = (0, B.useMemo)(() => MNe({
breakAll: d.breakAll,
children: d.children,
maxLines: d.maxLines,
@@ -64858,10 +64954,10 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
c,
d.style,
d.width
- ]), { dx: p, dy: m, angle: h, className: g, breakAll: _ } = d, v = t1(d, wNe);
- if (!wB(r) || !wB(i) || f.length === 0) return null;
+ ]), { dx: p, dy: m, angle: h, className: g, breakAll: _ } = d, v = t1(d, DNe);
+ if (!CB(r) || !CB(i) || f.length === 0) return null;
var y = Number(r) + (Z(p) ? p : 0), b = Number(i) + (Z(m) ? m : 0);
- if (!NU(y) || !NU(b)) return null;
+ if (!MU(y) || !MU(b)) return null;
var x;
switch (u) {
case "start":
@@ -64877,7 +64973,7 @@ var a1 = (e, t, n, r) => e.reduce((e, i) => {
var w = C.width, { width: T } = d;
S.push(`scale(${Z(T) && Z(w) ? T / w : 1})`);
}
- return h && S.push(`rotate(${h}, ${y}, ${b})`), S.length && (v.transform = S.join(" ")), /*#__PURE__*/ B.createElement("text", e1({}, hz(v), {
+ return h && S.push(`rotate(${h}, ${y}, ${b})`), S.length && (v.transform = S.join(" ")), /*#__PURE__*/ B.createElement("text", e1({}, mz(v), {
ref: t,
x: y,
y: b,
@@ -64910,26 +65006,26 @@ function f1(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? d1(Object(n), !0).forEach(function(t) {
- jNe(e, t, n[t]);
+ PNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : d1(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function jNe(e, t, n) {
- return (t = MNe(t)) in e ? Object.defineProperty(e, t, {
+function PNe(e, t, n) {
+ return (t = FNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function MNe(e) {
- var t = NNe(e, "string");
+function FNe(e) {
+ var t = INe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function NNe(e, t) {
+function INe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64939,8 +65035,8 @@ function NNe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var PNe = (e) => {
- var { viewBox: t, position: n, offset: r = 0, parentViewBox: i, clamp: a } = e, { x: o, y: s, height: c, upperWidth: l, lowerWidth: u } = yW(t), d = o, f = o + (l - u) / 2, p = (d + f) / 2, m = (l + u) / 2, h = d + l / 2, g = c >= 0 ? 1 : -1, _ = g * r, v = g > 0 ? "end" : "start", y = g > 0 ? "start" : "end", b = l >= 0 ? 1 : -1, x = b * r, S = b > 0 ? "end" : "start", C = b > 0 ? "start" : "end", w = i;
+var LNe = (e) => {
+ var { viewBox: t, position: n, offset: r = 0, parentViewBox: i, clamp: a } = e, { x: o, y: s, height: c, upperWidth: l, lowerWidth: u } = vW(t), d = o, f = o + (l - u) / 2, p = (d + f) / 2, m = (l + u) / 2, h = d + l / 2, g = c >= 0 ? 1 : -1, _ = g * r, v = g > 0 ? "end" : "start", y = g > 0 ? "start" : "end", b = l >= 0 ? 1 : -1, x = b * r, S = b > 0 ? "end" : "start", C = b > 0 ? "start" : "end", w = i;
if (n === "top") {
var T = {
x: d + l / 2,
@@ -65021,9 +65117,9 @@ var PNe = (e) => {
y: s + c - _,
horizontalAnchor: S,
verticalAnchor: v
- }, k) : n && typeof n == "object" && (Z(n.x) || CB(n.x)) && (Z(n.y) || CB(n.y)) ? f1({
- x: o + EB(n.x, m),
- y: s + EB(n.y, c),
+ }, k) : n && typeof n == "object" && (Z(n.x) || SB(n.x)) && (Z(n.y) || SB(n.y)) ? f1({
+ x: o + TB(n.x, m),
+ y: s + TB(n.y, c),
horizontalAnchor: "end",
verticalAnchor: "end"
}, k) : f1({
@@ -65032,17 +65128,17 @@ var PNe = (e) => {
horizontalAnchor: "middle",
verticalAnchor: "middle"
}, k);
-}, FNe = ["labelRef"], INe = ["content"];
+}, RNe = ["labelRef"], zNe = ["content"];
function p1(e, t) {
if (e == null) return {};
- var n, r, i = LNe(e, t);
+ var n, r, i = BNe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function LNe(e, t) {
+function BNe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -65065,26 +65161,26 @@ function h1(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? m1(Object(n), !0).forEach(function(t) {
- RNe(e, t, n[t]);
+ VNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : m1(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function RNe(e, t, n) {
- return (t = zNe(t)) in e ? Object.defineProperty(e, t, {
+function VNe(e, t, n) {
+ return (t = HNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function zNe(e) {
- var t = BNe(e, "string");
+function HNe(e) {
+ var t = UNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function BNe(e, t) {
+function UNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65121,9 +65217,9 @@ var _1 = /*#__PURE__*/ (0, B.createContext)(null), v1 = (e) => {
]);
return /*#__PURE__*/ B.createElement(_1.Provider, { value: c }, s);
}, y1 = () => {
- var e = (0, B.useContext)(_1), t = bW();
- return e || (t ? yW(t) : void 0);
-}, b1 = /*#__PURE__*/ (0, B.createContext)(null), VNe = (e) => {
+ var e = (0, B.useContext)(_1), t = yW();
+ return e || (t ? vW(t) : void 0);
+}, b1 = /*#__PURE__*/ (0, B.createContext)(null), WNe = (e) => {
var { cx: t, cy: n, innerRadius: r, outerRadius: i, startAngle: a, endAngle: o, clockWise: s, children: c } = e, l = (0, B.useMemo)(() => ({
cx: t,
cy: n,
@@ -65143,13 +65239,13 @@ var _1 = /*#__PURE__*/ (0, B.createContext)(null), v1 = (e) => {
]);
return /*#__PURE__*/ B.createElement(b1.Provider, { value: l }, c);
}, x1 = () => {
- var e = (0, B.useContext)(b1), t = Q(wq);
+ var e = (0, B.useContext)(b1), t = Q(Cq);
return e || t;
-}, HNe = (e) => {
- var { value: t, formatter: n } = e, r = AB(e.children) ? t : e.children;
+}, GNe = (e) => {
+ var { value: t, formatter: n } = e, r = kB(e.children) ? t : e.children;
return typeof n == "function" ? n(r) : r;
-}, S1 = (e) => e != null && typeof e == "function", UNe = (e, t) => xB(t - e) * Math.min(Math.abs(t - e), 360), WNe = (e, t, n, r, i) => {
- var { offset: a, className: o } = e, { cx: s, cy: c, innerRadius: l, outerRadius: u, startAngle: d, endAngle: f, clockWise: p } = i, m = (l + u) / 2, h = UNe(d, f), g = h >= 0 ? 1 : -1, _, v;
+}, S1 = (e) => e != null && typeof e == "function", KNe = (e, t) => bB(t - e) * Math.min(Math.abs(t - e), 360), qNe = (e, t, n, r, i) => {
+ var { offset: a, className: o } = e, { cx: s, cy: c, innerRadius: l, outerRadius: u, startAngle: d, endAngle: f, clockWise: p } = i, m = (l + u) / 2, h = KNe(d, f), g = h >= 0 ? 1 : -1, _, v;
switch (t) {
case "insideStart":
_ = d + g * a, v = p;
@@ -65163,9 +65259,9 @@ var _1 = /*#__PURE__*/ (0, B.createContext)(null), v1 = (e) => {
default: throw Error(`Unsupported position ${t}`);
}
v = h <= 0 ? v : !v;
- var y = EK(s, c, m, _), b = EK(s, c, m, _ + (v ? 1 : -1) * 359), x = `M${y.x},${y.y}
+ var y = TK(s, c, m, _), b = TK(s, c, m, _ + (v ? 1 : -1) * 359), x = `M${y.x},${y.y}
A${m},${m},0,1,${+!v},
- ${b.x},${b.y}`, S = AB(e.id) ? TB("recharts-radial-line-") : e.id;
+ ${b.x},${b.y}`, S = kB(e.id) ? wB("recharts-radial-line-") : e.id;
return /*#__PURE__*/ B.createElement("text", g1({}, r, {
dominantBaseline: "central",
className: _h("recharts-radial-bar-label", o)
@@ -65173,10 +65269,10 @@ var _1 = /*#__PURE__*/ (0, B.createContext)(null), v1 = (e) => {
id: S,
d: x
})), /*#__PURE__*/ B.createElement("textPath", { xlinkHref: `#${S}` }, n));
-}, GNe = (e, t, n) => {
+}, JNe = (e, t, n) => {
var { cx: r, cy: i, innerRadius: a, outerRadius: o, startAngle: s, endAngle: c } = e, l = (s + c) / 2;
if (n === "outside") {
- var { x: u, y: d } = EK(r, i, o + t, l);
+ var { x: u, y: d } = TK(r, i, o + t, l);
return {
x: u,
y: d,
@@ -65202,21 +65298,21 @@ var _1 = /*#__PURE__*/ (0, B.createContext)(null), v1 = (e) => {
textAnchor: "middle",
verticalAnchor: "end"
};
- var { x: f, y: p } = EK(r, i, (a + o) / 2, l);
+ var { x: f, y: p } = TK(r, i, (a + o) / 2, l);
return {
x: f,
y: p,
textAnchor: "middle",
verticalAnchor: "middle"
};
-}, C1 = (e) => e != null && "cx" in e && Z(e.cx), KNe = {
+}, C1 = (e) => e != null && "cx" in e && Z(e.cx), YNe = {
angle: 0,
offset: 5,
- zIndex: sq.label,
+ zIndex: oq.label,
position: "middle",
textBreakAll: !1
};
-function qNe(e) {
+function XNe(e) {
if (!C1(e)) return e;
var { cx: t, cy: n, outerRadius: r } = e, i = r * 2;
return {
@@ -65229,24 +65325,24 @@ function qNe(e) {
};
}
function w1(e) {
- var t = UB(e, KNe), { viewBox: n, parentViewBox: r, position: i, value: a, children: o, content: s, className: c = "", textBreakAll: l, labelRef: u } = t, d = x1(), f = y1(), p = n == null ? i === "center" ? f : d ?? f : C1(n) ? n : yW(n), m, h, g = qNe(p);
- if (!p || AB(a) && AB(o) && !/*#__PURE__*/ (0, B.isValidElement)(s) && typeof s != "function") return null;
+ var t = HB(e, YNe), { viewBox: n, parentViewBox: r, position: i, value: a, children: o, content: s, className: c = "", textBreakAll: l, labelRef: u } = t, d = x1(), f = y1(), p = n == null ? i === "center" ? f : d ?? f : C1(n) ? n : vW(n), m, h, g = XNe(p);
+ if (!p || kB(a) && kB(o) && !/*#__PURE__*/ (0, B.isValidElement)(s) && typeof s != "function") return null;
var _ = h1(h1({}, t), {}, { viewBox: p });
if (/*#__PURE__*/ (0, B.isValidElement)(s)) {
- var { labelRef: v } = _, y = p1(_, FNe);
+ var { labelRef: v } = _, y = p1(_, RNe);
return /*#__PURE__*/ (0, B.cloneElement)(s, y);
}
if (typeof s == "function") {
- var { content: b } = _, x = p1(_, INe);
+ var { content: b } = _, x = p1(_, zNe);
if (m = /*#__PURE__*/ (0, B.createElement)(s, x), /*#__PURE__*/ (0, B.isValidElement)(m)) return m;
- } else m = HNe(t);
- var S = hz(t);
+ } else m = GNe(t);
+ var S = mz(t);
if (C1(p)) {
- if (i === "insideStart" || i === "insideEnd" || i === "end") return WNe(t, i, m, S, p);
- h = GNe(p, t.offset, t.position);
+ if (i === "insideStart" || i === "insideEnd" || i === "end") return qNe(t, i, m, S, p);
+ h = JNe(p, t.offset, t.position);
} else {
if (!g) return null;
- var C = PNe({
+ var C = LNe({
viewBox: g,
position: i,
offset: t.offset,
@@ -65275,7 +65371,7 @@ var T1 = (e, t, n) => {
viewBox: t,
labelRef: n
};
- return e === !0 ? /*#__PURE__*/ B.createElement(w1, g1({ key: "label-implicit" }, r)) : wB(e) ? /*#__PURE__*/ B.createElement(w1, g1({
+ return e === !0 ? /*#__PURE__*/ B.createElement(w1, g1({ key: "label-implicit" }, r)) : CB(e) ? /*#__PURE__*/ B.createElement(w1, g1({
key: "label-implicit",
value: e
}, r)) : /*#__PURE__*/ (0, B.isValidElement)(e) ? e.type === w1 ? /*#__PURE__*/ (0, B.cloneElement)(e, h1({ key: "label-implicit" }, r)) : /*#__PURE__*/ B.createElement(w1, g1({
@@ -65290,13 +65386,13 @@ function E1(e) {
var { label: t, labelRef: n } = e;
return T1(t, y1(), n) || null;
}
-function JNe(e) {
+function ZNe(e) {
var { label: t } = e;
return T1(t, x1()) || null;
}
//#endregion
//#region node_modules/recharts/es6/component/LabelList.js
-var YNe = ["valueAccessor"], XNe = [
+var QNe = ["valueAccessor"], $Ne = [
"dataKey",
"clockWise",
"id",
@@ -65314,14 +65410,14 @@ function D1() {
}
function O1(e, t) {
if (e == null) return {};
- var n, r, i = ZNe(e, t);
+ var n, r, i = ePe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function ZNe(e, t) {
+function ePe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -65330,21 +65426,21 @@ function ZNe(e, t) {
}
return n;
}
-var QNe = (e) => {
+var tPe = (e) => {
var t = Array.isArray(e.value) ? e.value[e.value.length - 1] : e.value;
- if (ENe(t)) return t;
-}, k1 = /*#__PURE__*/ (0, B.createContext)(void 0), A1 = k1.Provider, j1 = /*#__PURE__*/ (0, B.createContext)(void 0), $Ne = j1.Provider;
-function ePe() {
+ if (kNe(t)) return t;
+}, k1 = /*#__PURE__*/ (0, B.createContext)(void 0), A1 = k1.Provider, j1 = /*#__PURE__*/ (0, B.createContext)(void 0), nPe = j1.Provider;
+function rPe() {
return (0, B.useContext)(k1);
}
-function tPe() {
+function iPe() {
return (0, B.useContext)(j1);
}
function M1(e) {
- var { valueAccessor: t = QNe } = e, n = O1(e, YNe), { dataKey: r, clockWise: i, id: a, textBreakAll: o, zIndex: s } = n, c = O1(n, XNe), l = ePe(), u = tPe(), d = l || u;
- return !d || !d.length ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: s ?? sq.label }, /*#__PURE__*/ B.createElement(yz, { className: "recharts-label-list" }, d.map((e, i) => {
- var s = AB(r) ? t(e, i) : LU(e.payload, r), l = AB(a) ? {} : { id: `${a}-${i}` };
- return /*#__PURE__*/ B.createElement(w1, D1({ key: `label-${i}` }, hz(e), c, l, {
+ var { valueAccessor: t = tPe } = e, n = O1(e, QNe), { dataKey: r, clockWise: i, id: a, textBreakAll: o, zIndex: s } = n, c = O1(n, $Ne), l = rPe(), u = iPe(), d = l || u;
+ return !d || !d.length ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: s ?? oq.label }, /*#__PURE__*/ B.createElement(vz, { className: "recharts-label-list" }, d.map((e, i) => {
+ var s = kB(r) ? t(e, i) : IU(e.payload, r), l = kB(a) ? {} : { id: `${a}-${i}` };
+ return /*#__PURE__*/ B.createElement(w1, D1({ key: `label-${i}` }, mz(e), c, l, {
fill: n.fill ?? e.fill,
parentViewBox: e.parentViewBox,
value: s,
@@ -65365,12 +65461,12 @@ function N1(e) {
}
//#endregion
//#region node_modules/recharts/es6/shape/Polygon.js
-var nPe = [
+var aPe = [
"points",
"className",
"baseLinePoints",
"connectNulls"
-], rPe;
+], oPe;
function P1() {
return P1 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -65380,16 +65476,16 @@ function P1() {
return e;
}, P1.apply(null, arguments);
}
-function iPe(e, t) {
+function sPe(e, t) {
if (e == null) return {};
- var n, r, i = aPe(e, t);
+ var n, r, i = cPe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function aPe(e, t) {
+function cPe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -65398,10 +65494,10 @@ function aPe(e, t) {
}
return n;
}
-function oPe(e, t) {
+function lPe(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
-var F1 = (e) => e != null && e.x === +e.x && e.y === +e.y, sPe = function() {
+var F1 = (e) => e != null && e.x === +e.x && e.y === +e.y, uPe = function() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = [[]];
e.forEach((e) => {
var n = t[t.length - 1];
@@ -65412,9 +65508,9 @@ var F1 = (e) => e != null && e.x === +e.x && e.y === +e.y, sPe = function() {
var i = t[t.length - 1];
return i && i.length <= 0 && (t = t.slice(0, -1)), t;
}, I1 = (e, t) => {
- var n = sPe(e);
+ var n = uPe(e);
t && (n = [n.reduce((e, t) => [...e, ...t], [])]);
- var r = n.map((e) => e.reduce((e, t, n) => bB(rPe ||= oPe([
+ var r = n.map((e) => e.reduce((e, t, n) => yB(oPe ||= lPe([
"",
"",
"",
@@ -65422,29 +65518,29 @@ var F1 = (e) => e != null && e.x === +e.x && e.y === +e.y, sPe = function() {
""
]), e, n === 0 ? "M" : "L", t.x, t.y), "")).join("");
return n.length === 1 ? `${r}Z` : r;
-}, cPe = (e, t, n) => {
+}, dPe = (e, t, n) => {
var r = I1(e, n);
return `${r.slice(-1) === "Z" ? r.slice(0, -1) : r}L${I1(Array.from(t).reverse(), n).slice(1)}`;
}, L1 = (e) => {
- var { points: t, className: n, baseLinePoints: r, connectNulls: i } = e, a = iPe(e, nPe);
+ var { points: t, className: n, baseLinePoints: r, connectNulls: i } = e, a = sPe(e, aPe);
if (!t || !t.length) return null;
var o = _h("recharts-polygon", n);
if (r && r.length) {
- var s = a.stroke && a.stroke !== "none", c = cPe(t, r, i);
- return /*#__PURE__*/ B.createElement("g", { className: o }, /*#__PURE__*/ B.createElement("path", P1({}, hz(a), {
+ var s = a.stroke && a.stroke !== "none", c = dPe(t, r, i);
+ return /*#__PURE__*/ B.createElement("g", { className: o }, /*#__PURE__*/ B.createElement("path", P1({}, mz(a), {
fill: c.slice(-1) === "Z" ? a.fill : "none",
stroke: "none",
d: c
- })), s ? /*#__PURE__*/ B.createElement("path", P1({}, hz(a), {
+ })), s ? /*#__PURE__*/ B.createElement("path", P1({}, mz(a), {
fill: "none",
d: I1(t, i)
- })) : null, s ? /*#__PURE__*/ B.createElement("path", P1({}, hz(a), {
+ })) : null, s ? /*#__PURE__*/ B.createElement("path", P1({}, mz(a), {
fill: "none",
d: I1(r, i)
})) : null);
}
var l = I1(t, i);
- return /*#__PURE__*/ B.createElement("path", P1({}, hz(a), {
+ return /*#__PURE__*/ B.createElement("path", P1({}, mz(a), {
fill: l.slice(-1) === "Z" ? a.fill : "none",
className: o,
d: l
@@ -65463,7 +65559,7 @@ function R1() {
}
var z1 = (e) => {
var { cx: t, cy: n, r, className: i } = e, a = _h("recharts-dot", i);
- return Z(t) && Z(n) && Z(r) ? /*#__PURE__*/ B.createElement("circle", R1({}, pz(e), BB(e), {
+ return Z(t) && Z(n) && Z(r) ? /*#__PURE__*/ B.createElement("circle", R1({}, fz(e), zB(e), {
className: a,
cx: t,
cy: n,
@@ -65472,8 +65568,8 @@ var z1 = (e) => {
}, B1 = (e) => e.graphicalItems.polarItems, V1 = $([
B1,
aZ,
- $([Tq, Eq], cZ)
-], uZ), H1 = $([$([V1], mZ), IK], hZ), U1 = $([
+ $([wq, Tq], cZ)
+], uZ), H1 = $([$([V1], mZ), FK], hZ), U1 = $([
H1,
aZ,
V1
@@ -65483,22 +65579,22 @@ $([
aZ,
V1
], (e, t, n) => n.length > 0 ? e.flatMap((e) => n.flatMap((n) => ({
- value: LU(e, t.dataKey ?? n.dataKey),
+ value: IU(e, t.dataKey ?? n.dataKey),
errorDomain: []
}))).filter(Boolean) : t?.dataKey == null ? e.map((e) => ({
value: e,
errorDomain: []
})) : e.map((e) => ({
- value: LU(e, t.dataKey),
+ value: IU(e, t.dataKey),
errorDomain: []
})));
var W1 = () => void 0, G1 = $([
aZ,
- wW,
+ CW,
H1,
U1,
- tq,
- Tq,
+ eq,
+ wq,
$([
aZ,
kZ,
@@ -65509,45 +65605,45 @@ var W1 = () => void 0, G1 = $([
aZ,
V1,
jZ,
- Tq
+ wq
], NZ),
W1,
- wW,
- Tq
+ CW,
+ wq
], VZ)
], HZ), K1 = $([
G1,
oZ,
WZ
-], GZ), lPe = $([WZ, $([
+], GZ), fPe = $([WZ, $([
aZ,
G1,
K1,
- Tq
-], qZ)], Fq), q1 = (e, t, n) => {
+ wq
+], qZ)], Pq), q1 = (e, t, n) => {
switch (t) {
- case "angleAxis": return gq(e, n);
- case "radiusAxis": return _q(e, n);
+ case "angleAxis": return hq(e, n);
+ case "radiusAxis": return gq(e, n);
default: throw Error(`Unexpected axis type: ${t}`);
}
}, J1 = (e, t, n) => {
switch (t) {
- case "angleAxis": return HDe(e, n);
- case "radiusAxis": return UDe(e, n);
+ case "angleAxis": return KDe(e, n);
+ case "radiusAxis": return qDe(e, n);
default: throw Error(`Unexpected axis type: ${t}`);
}
}, Y1 = $([$([
q1,
WZ,
- lPe,
+ fPe,
J1
-], KX)], Pq), X1 = $([
- wW,
+], KX)], Nq), X1 = $([
+ CW,
U1,
oZ,
- Tq
+ wq
], QZ), Z1 = $([
- wW,
+ CW,
q1,
WZ,
Y1,
@@ -65555,8 +65651,8 @@ var W1 = () => void 0, G1 = $([
J1,
lQ,
X1,
- Tq
-], dQ), uPe = $([Z1], (e) => {
+ wq
+], dQ), pPe = $([Z1], (e) => {
if (e) {
var t = /* @__PURE__ */ new Map();
return e.forEach((e) => {
@@ -65564,19 +65660,19 @@ var W1 = () => void 0, G1 = $([
t.has(n) || t.set(n, e);
}), Array.from(t.values());
}
-}), dPe = $([
- wW,
+}), mPe = $([
+ CW,
q1,
Y1,
J1,
lQ,
X1,
- Tq
-], pQ), fPe = $([(e, t) => Z1(e, "angleAxis", t, !1)], (e) => {
+ wq
+], pQ), hPe = $([(e, t) => Z1(e, "angleAxis", t, !1)], (e) => {
if (e) return e.map((e) => e.coordinate);
-}), pPe = $([(e, t) => Z1(e, "radiusAxis", t, !1)], (e) => {
+}), gPe = $([(e, t) => Z1(e, "radiusAxis", t, !1)], (e) => {
if (e) return e.map((e) => e.coordinate);
-}), mPe = [
+}), _Pe = [
"gridType",
"radialLines",
"angleAxisId",
@@ -65589,16 +65685,16 @@ var W1 = () => void 0, G1 = $([
"polarRadius",
"zIndex"
];
-function hPe(e, t) {
+function vPe(e, t) {
if (e == null) return {};
- var n, r, i = gPe(e, t);
+ var n, r, i = yPe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function gPe(e, t) {
+function yPe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -65630,26 +65726,26 @@ function e0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? $1(Object(n), !0).forEach(function(t) {
- _Pe(e, t, n[t]);
+ bPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $1(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function _Pe(e, t, n) {
- return (t = vPe(t)) in e ? Object.defineProperty(e, t, {
+function bPe(e, t, n) {
+ return (t = xPe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function vPe(e) {
- var t = yPe(e, "string");
+function xPe(e) {
+ var t = SPe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function yPe(e, t) {
+function SPe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65659,18 +65755,18 @@ function yPe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var bPe = (e, t, n, r) => {
+var CPe = (e, t, n, r) => {
var i = "";
return r.forEach((r, a) => {
- var o = EK(t, n, e, r);
+ var o = TK(t, n, e, r);
i += a ? `L ${o.x},${o.y}` : `M ${o.x},${o.y}`;
}), i += "Z", i;
-}, xPe = (e) => {
+}, wPe = (e) => {
var { cx: t, cy: n, innerRadius: r, outerRadius: i, polarAngles: a, radialLines: o } = e;
if (!a || !a.length || !o) return null;
- var s = e0({ stroke: "#ccc" }, pz(e));
+ var s = e0({ stroke: "#ccc" }, fz(e));
return /*#__PURE__*/ B.createElement("g", { className: "recharts-polar-grid-angle" }, a.map((e) => {
- var a = EK(t, n, r, e), o = EK(t, n, i, e);
+ var a = TK(t, n, r, e), o = TK(t, n, i, e);
return /*#__PURE__*/ B.createElement("line", Q1({ key: `line-${e}` }, s, {
x1: a.x,
y1: a.y,
@@ -65682,7 +65778,7 @@ var bPe = (e, t, n, r) => {
var { cx: t, cy: n, radius: r } = e, i = e0({
stroke: "#ccc",
fill: "none"
- }, pz(e));
+ }, fz(e));
return /*#__PURE__*/ B.createElement("circle", Q1({}, i, {
className: _h("recharts-polar-grid-concentric-circle", e.className),
cx: t,
@@ -65693,12 +65789,12 @@ var bPe = (e, t, n, r) => {
var { radius: t } = e, n = e0({
stroke: "#ccc",
fill: "none"
- }, pz(e));
+ }, fz(e));
return /*#__PURE__*/ B.createElement("path", Q1({}, n, {
className: _h("recharts-polar-grid-concentric-polygon", e.className),
- d: bPe(t, e.cx, e.cy, e.polarAngles)
+ d: CPe(t, e.cx, e.cy, e.polarAngles)
}));
-}, SPe = (e) => {
+}, TPe = (e) => {
var { polarRadius: t, gridType: n } = e;
if (!t || !t.length) return null;
var r = Math.max(...t), i = e.fill && e.fill !== "none";
@@ -65712,14 +65808,14 @@ var bPe = (e, t, n, r) => {
radius: t
}));
}));
-}, CPe = {
+}, EPe = {
angleAxisId: 0,
radiusAxisId: 0,
gridType: "polygon",
radialLines: !0,
- zIndex: sq.grid
+ zIndex: oq.grid
}, r0 = (e) => {
- var t = UB(e, CPe), { gridType: n, radialLines: r, angleAxisId: i, radiusAxisId: a, cx: o, cy: s, innerRadius: c, outerRadius: l, polarAngles: u, polarRadius: d, zIndex: f } = t, p = hPe(t, mPe), m = Q(wq), h = Q((e) => fPe(e, i)), g = Q((e) => pPe(e, a)), _ = Array.isArray(u) ? u : h, v = Array.isArray(d) ? d : g;
+ var t = HB(e, EPe), { gridType: n, radialLines: r, angleAxisId: i, radiusAxisId: a, cx: o, cy: s, innerRadius: c, outerRadius: l, polarAngles: u, polarRadius: d, zIndex: f } = t, p = vPe(t, _Pe), m = Q(Cq), h = Q((e) => hPe(e, i)), g = Q((e) => gPe(e, a)), _ = Array.isArray(u) ? u : h, v = Array.isArray(d) ? d : g;
if (_ == null || v == null) return null;
var y = e0({
cx: m?.cx ?? o ?? 0,
@@ -65730,13 +65826,13 @@ var bPe = (e, t, n, r) => {
polarRadius: v,
zIndex: f
}, p), { outerRadius: b } = y;
- return b <= 0 ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: y.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-polar-grid" }, /*#__PURE__*/ B.createElement(SPe, Q1({
+ return b <= 0 ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: y.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-polar-grid" }, /*#__PURE__*/ B.createElement(TPe, Q1({
gridType: n,
radialLines: r
}, y, {
polarAngles: _,
polarRadius: v
- })), /*#__PURE__*/ B.createElement(xPe, Q1({
+ })), /*#__PURE__*/ B.createElement(wPe, Q1({
gridType: n,
radialLines: r
}, y, {
@@ -65752,11 +65848,11 @@ function i0(e) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/math/maxBy.mjs
-function wPe(e, t = JB) {
+function DPe(e, t = qB) {
if (e == null) return;
let n = i0(e);
if (n.length === 0) return;
- let r = hV(t), i, a;
+ let r = mV(t), i, a;
for (let e = 0; e < n.length; e++) {
let t = n[e], o = r(t, e, n);
o == null || Number.isNaN(o) || typeof o == "symbol" || (a === void 0 || o > a) && (a = o, i = t);
@@ -65765,11 +65861,11 @@ function wPe(e, t = JB) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/math/minBy.mjs
-function TPe(e, t = JB) {
+function OPe(e, t = qB) {
if (e == null) return;
let n = i0(e);
if (n.length === 0) return;
- let r = hV(t), i, a;
+ let r = mV(t), i, a;
for (let e = 0; e < n.length; e++) {
let t = n[e], o = r(t, e, n);
o == null || Number.isNaN(o) || typeof o == "symbol" || (a === void 0 || o < a) && (a = o, i = t);
@@ -65778,7 +65874,7 @@ function TPe(e, t = JB) {
}
//#endregion
//#region node_modules/recharts/es6/state/polarAxisSlice.js
-var a0 = iU({
+var a0 = rU({
name: "polarAxis",
initialState: {
radiusAxis: {},
@@ -65786,19 +65882,19 @@ var a0 = iU({
},
reducers: {
addRadiusAxis(e, t) {
- e.radiusAxis[t.payload.id] = hG(t.payload);
+ e.radiusAxis[t.payload.id] = mG(t.payload);
},
removeRadiusAxis(e, t) {
delete e.radiusAxis[t.payload.id];
},
addAngleAxis(e, t) {
- e.angleAxis[t.payload.id] = hG(t.payload);
+ e.angleAxis[t.payload.id] = mG(t.payload);
},
removeAngleAxis(e, t) {
delete e.angleAxis[t.payload.id];
}
}
-}), { addRadiusAxis: EPe, removeRadiusAxis: DPe, addAngleAxis: OPe, removeAngleAxis: kPe } = a0.actions, APe = a0.reducer;
+}), { addRadiusAxis: kPe, removeRadiusAxis: APe, addAngleAxis: jPe, removeAngleAxis: MPe } = a0.actions, NPe = a0.reducer;
//#endregion
//#region node_modules/recharts/es6/util/getClassNameFromUnknown.js
function o0(e) {
@@ -65806,12 +65902,12 @@ function o0(e) {
}
//#endregion
//#region node_modules/recharts/es6/polar/PolarRadiusAxis.js
-var jPe = ["type"], MPe = [
+var PPe = ["type"], FPe = [
"cx",
"cy",
"angle",
"axisLine"
-], NPe = [
+], IPe = [
"angle",
"tickFormatter",
"stroke",
@@ -65840,26 +65936,26 @@ function l0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? c0(Object(n), !0).forEach(function(t) {
- PPe(e, t, n[t]);
+ LPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : c0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function PPe(e, t, n) {
- return (t = FPe(t)) in e ? Object.defineProperty(e, t, {
+function LPe(e, t, n) {
+ return (t = RPe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function FPe(e) {
- var t = IPe(e, "string");
+function RPe(e) {
+ var t = zPe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function IPe(e, t) {
+function zPe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65871,14 +65967,14 @@ function IPe(e, t) {
}
function u0(e, t) {
if (e == null) return {};
- var n, r, i = LPe(e, t);
+ var n, r, i = BPe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function LPe(e, t) {
+function BPe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -65887,20 +65983,20 @@ function LPe(e, t) {
}
return n;
}
-var RPe = "radiusAxis";
-function zPe(e) {
- var t = yV(), n = OW(), r = (0, B.useMemo)(() => {
- var { type: t } = e, r = u0(e, jPe), i = dq(n, "radiusAxis", t);
+var VPe = "radiusAxis";
+function HPe(e) {
+ var t = vV(), n = DW(), r = (0, B.useMemo)(() => {
+ var { type: t } = e, r = u0(e, PPe), i = uq(n, "radiusAxis", t);
if (i != null) return l0(l0({}, r), {}, { type: i });
}, [e, n]);
- return (0, B.useEffect)(() => r == null ? NB : (t(EPe(r)), () => {
- t(DPe(r));
+ return (0, B.useEffect)(() => r == null ? MB : (t(kPe(r)), () => {
+ t(APe(r));
}), [t, r]), null;
}
-var BPe = (e, t, n, r) => {
+var UPe = (e, t, n, r) => {
var { coordinate: i } = e;
- return EK(n, r, i, t);
-}, VPe = (e) => {
+ return TK(n, r, i, t);
+}, WPe = (e) => {
var t;
switch (e) {
case "left":
@@ -65912,49 +66008,49 @@ var BPe = (e, t, n, r) => {
default: t = "middle";
}
return t;
-}, HPe = (e, t, n, r) => {
- var i = wPe(r, (e) => e.coordinate || 0);
+}, GPe = (e, t, n, r) => {
+ var i = DPe(r, (e) => e.coordinate || 0);
return {
cx: t,
cy: n,
startAngle: e,
endAngle: e,
- innerRadius: TPe(r, (e) => e.coordinate || 0)?.coordinate || 0,
+ innerRadius: OPe(r, (e) => e.coordinate || 0)?.coordinate || 0,
outerRadius: i?.coordinate || 0,
clockWise: !1
};
-}, UPe = (e, t) => {
- var { cx: n, cy: r, angle: i, axisLine: a } = e, o = u0(e, MPe), s = t.reduce((e, t) => [Math.min(e[0], t.coordinate), Math.max(e[1], t.coordinate)], [Infinity, -Infinity]), c = EK(n, r, s[0], i), l = EK(n, r, s[1], i), u = l0(l0(l0({}, pz(o)), {}, { fill: "none" }, pz(a)), {}, {
+}, KPe = (e, t) => {
+ var { cx: n, cy: r, angle: i, axisLine: a } = e, o = u0(e, FPe), s = t.reduce((e, t) => [Math.min(e[0], t.coordinate), Math.max(e[1], t.coordinate)], [Infinity, -Infinity]), c = TK(n, r, s[0], i), l = TK(n, r, s[1], i), u = l0(l0(l0({}, fz(o)), {}, { fill: "none" }, fz(a)), {}, {
x1: c.x,
y1: c.y,
x2: l.x,
y2: l.y
});
return /*#__PURE__*/ B.createElement("line", s0({ className: "recharts-polar-radius-axis-line" }, u));
-}, WPe = (e, t, n) => /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? e(t) : /*#__PURE__*/ B.createElement(u1, s0({}, t, { className: "recharts-polar-radius-axis-tick-value" }), n), GPe = (e, t) => {
- var { angle: n, tickFormatter: r, stroke: i, tick: a } = e, o = u0(e, NPe), s = VPe(e.orientation), c = pz(o), l = mz(a), u = t.map((t, o) => {
- var u = BPe(t, e.angle, e.cx, e.cy), d = l0(l0(l0(l0({
+}, qPe = (e, t, n) => /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? e(t) : /*#__PURE__*/ B.createElement(u1, s0({}, t, { className: "recharts-polar-radius-axis-tick-value" }), n), JPe = (e, t) => {
+ var { angle: n, tickFormatter: r, stroke: i, tick: a } = e, o = u0(e, IPe), s = WPe(e.orientation), c = fz(o), l = pz(a), u = t.map((t, o) => {
+ var u = UPe(t, e.angle, e.cx, e.cy), d = l0(l0(l0(l0({
textAnchor: s,
transform: `rotate(${90 - n}, ${u.x}, ${u.y})`
}, c), {}, {
stroke: "none",
fill: i
}, l), {}, { index: o }, u), {}, { payload: t });
- return /*#__PURE__*/ B.createElement(yz, s0({
+ return /*#__PURE__*/ B.createElement(vz, s0({
className: _h("recharts-polar-radius-axis-tick", o0(a)),
key: `tick-${t.coordinate}`
- }, VB(e, t, o)), WPe(a, d, r ? r(t.value, o) : t.value));
+ }, BB(e, t, o)), qPe(a, d, r ? r(t.value, o) : t.value));
});
- return /*#__PURE__*/ B.createElement(yz, { className: "recharts-polar-radius-axis-ticks" }, u);
-}, KPe = (e) => {
- var { radiusAxisId: t } = e, n = Q(wq), r = Q((e) => Y1(e, "radiusAxis", t)), i = Q((e) => Z1(e, "radiusAxis", t, !1));
+ return /*#__PURE__*/ B.createElement(vz, { className: "recharts-polar-radius-axis-ticks" }, u);
+}, YPe = (e) => {
+ var { radiusAxisId: t } = e, n = Q(Cq), r = Q((e) => Y1(e, "radiusAxis", t)), i = Q((e) => Z1(e, "radiusAxis", t, !1));
if (n == null || !i || !i.length || r == null) return null;
var a = l0(l0({}, e), {}, { scale: r }, n), { tick: o, axisLine: s } = a;
- return /*#__PURE__*/ B.createElement(S$, { zIndex: a.zIndex }, /*#__PURE__*/ B.createElement(yz, { className: _h("recharts-polar-radius-axis", RPe, a.className) }, s && UPe(a, i), o && GPe(a, i), /*#__PURE__*/ B.createElement(VNe, HPe(a.angle, a.cx, a.cy, i), /*#__PURE__*/ B.createElement(JNe, { label: a.label }), a.children)));
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: a.zIndex }, /*#__PURE__*/ B.createElement(vz, { className: _h("recharts-polar-radius-axis", VPe, a.className) }, s && KPe(a, i), o && JPe(a, i), /*#__PURE__*/ B.createElement(WNe, GPe(a.angle, a.cx, a.cy, i), /*#__PURE__*/ B.createElement(ZNe, { label: a.label }), a.children)));
};
function d0(e) {
- var t = UB(e, lq);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(zPe, {
+ var t = HB(e, cq);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(HPe, {
domain: t.domain,
id: t.radiusAxisId,
scale: t.scale,
@@ -65971,12 +66067,12 @@ function d0(e) {
ticks: t.ticks,
tickCount: t.tickCount,
tick: t.tick
- }), /*#__PURE__*/ B.createElement(KPe, t));
+ }), /*#__PURE__*/ B.createElement(YPe, t));
}
d0.displayName = "PolarRadiusAxis";
//#endregion
//#region node_modules/recharts/es6/polar/PolarAngleAxis.js
-var qPe = ["children", "type"], JPe = ["ref"];
+var XPe = ["children", "type"], ZPe = ["ref"];
function f0() {
return f0 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -66000,26 +66096,26 @@ function m0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? p0(Object(n), !0).forEach(function(t) {
- YPe(e, t, n[t]);
+ QPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : p0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function YPe(e, t, n) {
- return (t = XPe(t)) in e ? Object.defineProperty(e, t, {
+function QPe(e, t, n) {
+ return (t = $Pe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function XPe(e) {
- var t = ZPe(e, "string");
+function $Pe(e) {
+ var t = eFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function ZPe(e, t) {
+function eFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66031,14 +66127,14 @@ function ZPe(e, t) {
}
function h0(e, t) {
if (e == null) return {};
- var n, r, i = QPe(e, t);
+ var n, r, i = tFe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function QPe(e, t) {
+function tFe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66047,47 +66143,47 @@ function QPe(e, t) {
}
return n;
}
-var g0 = 1e-5, $Pe = Math.cos(TK(45)), eFe = "angleAxis";
-function tFe(e) {
- var t = yV(), n = OW(), r = (0, B.useMemo)(() => {
- var { children: t, type: r } = e, i = h0(e, qPe), a = dq(n, "angleAxis", r);
+var g0 = 1e-5, nFe = Math.cos(wK(45)), rFe = "angleAxis";
+function iFe(e) {
+ var t = vV(), n = DW(), r = (0, B.useMemo)(() => {
+ var { children: t, type: r } = e, i = h0(e, XPe), a = uq(n, "angleAxis", r);
if (a != null) return m0(m0({}, i), {}, { type: a });
- }, [e, n]), i = r === Q((e) => gq(e, r?.id));
- return (0, B.useEffect)(() => r == null ? NB : (t(OPe(r)), () => {
- t(kPe(r));
+ }, [e, n]), i = r === Q((e) => hq(e, r?.id));
+ return (0, B.useEffect)(() => r == null ? MB : (t(jPe(r)), () => {
+ t(MPe(r));
}), [t, r]), i ? e.children : null;
}
-var nFe = (e, t) => {
- var { cx: n, cy: r, radius: i, orientation: a, tickSize: o } = t, s = o || 8, c = EK(n, r, i, e.coordinate), l = EK(n, r, i + (a === "inner" ? -1 : 1) * s, e.coordinate);
+var aFe = (e, t) => {
+ var { cx: n, cy: r, radius: i, orientation: a, tickSize: o } = t, s = o || 8, c = TK(n, r, i, e.coordinate), l = TK(n, r, i + (a === "inner" ? -1 : 1) * s, e.coordinate);
return {
x1: c.x,
y1: c.y,
x2: l.x,
y2: l.y
};
-}, rFe = (e, t) => {
- var n = Math.cos(TK(-e.coordinate));
+}, oFe = (e, t) => {
+ var n = Math.cos(wK(-e.coordinate));
return n > g0 ? t === "outer" ? "start" : "end" : n < -g0 ? t === "outer" ? "end" : "start" : "middle";
-}, iFe = (e) => {
- var t = Math.cos(TK(-e.coordinate)), n = Math.sin(TK(-e.coordinate));
- return Math.abs(t) <= $Pe ? n > 0 ? "start" : "end" : "middle";
-}, aFe = (e) => {
+}, sFe = (e) => {
+ var t = Math.cos(wK(-e.coordinate)), n = Math.sin(wK(-e.coordinate));
+ return Math.abs(t) <= nFe ? n > 0 ? "start" : "end" : "middle";
+}, cFe = (e) => {
var { cx: t, cy: n, radius: r, axisLineType: i, axisLine: a, ticks: o } = e;
if (!a) return null;
- var s = m0(m0({}, pz(e)), {}, { fill: "none" }, pz(a));
+ var s = m0(m0({}, fz(e)), {}, { fill: "none" }, fz(a));
if (i === "circle") return /*#__PURE__*/ B.createElement(z1, f0({ className: "recharts-polar-angle-axis-line" }, s, {
cx: t,
cy: n,
r
}));
- var c = o.map((e) => EK(t, n, r, e.coordinate));
+ var c = o.map((e) => TK(t, n, r, e.coordinate));
return /*#__PURE__*/ B.createElement(L1, f0({ className: "recharts-polar-angle-axis-line" }, s, { points: c }));
-}, oFe = (e) => {
+}, lFe = (e) => {
var { tick: t, tickProps: n, value: r } = e;
return t ? /*#__PURE__*/ B.isValidElement(t) ? /*#__PURE__*/ B.cloneElement(t, n) : typeof t == "function" ? t(n) : /*#__PURE__*/ B.createElement(u1, f0({}, n, { className: "recharts-polar-angle-axis-tick-value" }), r) : null;
-}, sFe = (e) => {
- var { tick: t, tickLine: n, tickFormatter: r, stroke: i, ticks: a } = e, o = pz(e), { ref: s } = o, c = h0(o, JPe), l = mz(t), u = m0(m0({}, c), {}, { fill: "none" }, pz(n)), d = a.map((a, o) => {
- var s = nFe(a, e), d = rFe(a, e.orientation), f = iFe(a), p = m0(m0(m0({}, c), {}, {
+}, uFe = (e) => {
+ var { tick: t, tickLine: n, tickFormatter: r, stroke: i, ticks: a } = e, o = fz(e), { ref: s } = o, c = h0(o, ZPe), l = pz(t), u = m0(m0({}, c), {}, { fill: "none" }, fz(n)), d = a.map((a, o) => {
+ var s = aFe(a, e), d = oFe(a, e.orientation), f = sFe(a), p = m0(m0(m0({}, c), {}, {
textAnchor: d,
verticalAnchor: f,
stroke: "none",
@@ -66098,28 +66194,28 @@ var nFe = (e, t) => {
x: s.x2,
y: s.y2
});
- return /*#__PURE__*/ B.createElement(yz, f0({
+ return /*#__PURE__*/ B.createElement(vz, f0({
className: _h("recharts-polar-angle-axis-tick", o0(t)),
key: `tick-${a.coordinate}`
- }, VB(e, a, o)), n && /*#__PURE__*/ B.createElement("line", f0({ className: "recharts-polar-angle-axis-tick-line" }, u, s)), /*#__PURE__*/ B.createElement(oFe, {
+ }, BB(e, a, o)), n && /*#__PURE__*/ B.createElement("line", f0({ className: "recharts-polar-angle-axis-tick-line" }, u, s)), /*#__PURE__*/ B.createElement(lFe, {
tick: t,
tickProps: p,
value: r ? r(a.value, o) : a.value
}));
});
- return /*#__PURE__*/ B.createElement(yz, { className: "recharts-polar-angle-axis-ticks" }, d);
-}, cFe = (e) => {
- var { angleAxisId: t } = e, n = Q(wq), r = Q((e) => Y1(e, "angleAxis", t)), i = oW(), a = Q((e) => uPe(e, "angleAxis", t, i));
+ return /*#__PURE__*/ B.createElement(vz, { className: "recharts-polar-angle-axis-ticks" }, d);
+}, dFe = (e) => {
+ var { angleAxisId: t } = e, n = Q(Cq), r = Q((e) => Y1(e, "angleAxis", t)), i = aW(), a = Q((e) => pPe(e, "angleAxis", t, i));
if (n == null || !a || !a.length || r == null) return null;
var o = m0(m0(m0({}, e), {}, { scale: r }, n), {}, {
radius: n.outerRadius,
ticks: a
});
- return /*#__PURE__*/ B.createElement(S$, { zIndex: o.zIndex }, /*#__PURE__*/ B.createElement(yz, { className: _h("recharts-polar-angle-axis", eFe, o.className) }, /*#__PURE__*/ B.createElement(aFe, o), /*#__PURE__*/ B.createElement(sFe, o)));
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: o.zIndex }, /*#__PURE__*/ B.createElement(vz, { className: _h("recharts-polar-angle-axis", rFe, o.className) }, /*#__PURE__*/ B.createElement(cFe, o), /*#__PURE__*/ B.createElement(uFe, o)));
};
function _0(e) {
- var t = UB(e, cq);
- return /*#__PURE__*/ B.createElement(tFe, {
+ var t = HB(e, sq);
+ return /*#__PURE__*/ B.createElement(iFe, {
id: t.angleAxisId,
scale: t.scale,
type: t.type,
@@ -66136,12 +66232,12 @@ function _0(e) {
ticks: t.ticks,
tick: t.tick,
domain: t.domain
- }, /*#__PURE__*/ B.createElement(cFe, t));
+ }, /*#__PURE__*/ B.createElement(dFe, t));
}
_0.displayName = "PolarAngleAxis";
//#endregion
//#region node_modules/react-is/cjs/react-is.production.js
-var lFe = /* @__PURE__ */ xt(((e) => {
+var fFe = /* @__PURE__ */ xt(((e) => {
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), p = Symbol.for("react.view_transition");
function m(e) {
if (typeof e == "object" && e) {
@@ -66170,26 +66266,26 @@ var lFe = /* @__PURE__ */ xt(((e) => {
e.isFragment = function(e) {
return m(e) === r;
};
-})), uFe = (/* @__PURE__ */ xt(((e, t) => {
- t.exports = lFe();
+})), pFe = (/* @__PURE__ */ xt(((e, t) => {
+ t.exports = fFe();
})))(), v0 = (e) => typeof e == "string" ? e : e ? e.displayName || e.name || "Component" : "", y0 = null, b0 = null, x0 = (e) => {
if (e === y0 && Array.isArray(b0)) return b0;
var t = [];
return B.Children.forEach(e, (e) => {
- AB(e) || ((0, uFe.isFragment)(e) ? t = t.concat(x0(e.props.children)) : t.push(e));
+ kB(e) || ((0, pFe.isFragment)(e) ? t = t.concat(x0(e.props.children)) : t.push(e));
}), b0 = t, y0 = e, t;
};
function S0(e, t) {
var n = [], r = [];
return r = Array.isArray(t) ? t.map((e) => v0(e)) : [v0(t)], x0(e).forEach((e) => {
- var t = vB(e, "type.displayName") || vB(e, "type.name");
+ var t = _B(e, "type.displayName") || _B(e, "type.name");
t && r.indexOf(t) !== -1 && n.push(e);
}), n;
}
var C0 = (e) => e && typeof e == "object" && "clipDot" in e ? !!e.clipDot : !0;
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
-function dFe(e) {
+function mFe(e) {
if (typeof e != "object" || !e) return !1;
if (Object.getPrototypeOf(e) === null) return !0;
if (Object.prototype.toString.call(e) !== "[object Object]") {
@@ -66202,7 +66298,7 @@ function dFe(e) {
}
//#endregion
//#region node_modules/recharts/es6/shape/Trapezoid.js
-var fFe, pFe, mFe, hFe, gFe;
+var hFe, gFe, _Fe, vFe, yFe;
function w0(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -66217,26 +66313,26 @@ function T0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? w0(Object(n), !0).forEach(function(t) {
- _Fe(e, t, n[t]);
+ bFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : w0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function _Fe(e, t, n) {
- return (t = vFe(t)) in e ? Object.defineProperty(e, t, {
+function bFe(e, t, n) {
+ return (t = xFe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function vFe(e) {
- var t = yFe(e, "string");
+function xFe(e) {
+ var t = SFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function yFe(e, t) {
+function SFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66259,29 +66355,29 @@ function D0(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
var O0 = (e, t, n, r, i) => {
- var a = n - r, o = bB(fFe ||= D0([
+ var a = n - r, o = yB(hFe ||= D0([
"M ",
",",
""
]), e, t);
- return o += bB(pFe ||= D0([
+ return o += yB(gFe ||= D0([
"L ",
",",
""
- ]), e + n, t), o += bB(mFe ||= D0([
+ ]), e + n, t), o += yB(_Fe ||= D0([
"L ",
",",
""
- ]), e + n - a / 2, t + i), o += bB(hFe ||= D0([
+ ]), e + n - a / 2, t + i), o += yB(vFe ||= D0([
"L ",
",",
""
- ]), e + n - a / 2 - r, t + i), o += bB(gFe ||= D0([
+ ]), e + n - a / 2 - r, t + i), o += yB(yFe ||= D0([
"L ",
",",
" Z"
]), e, t), o;
-}, bFe = {
+}, CFe = {
x: 0,
y: 0,
upperWidth: 0,
@@ -66291,8 +66387,8 @@ var O0 = (e, t, n, r, i) => {
animationBegin: 0,
animationDuration: 1500,
animationEasing: "ease"
-}, xFe = (e) => {
- var t = UB(e, bFe), { x: n, y: r, upperWidth: i, lowerWidth: a, height: o, className: s } = t, { animationEasing: c, animationDuration: l, animationBegin: u, isUpdateAnimationActive: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(-1), h = (0, B.useRef)(i), g = (0, B.useRef)(a), _ = (0, B.useRef)(o), v = (0, B.useRef)(n), y = (0, B.useRef)(r), b = pK(e, "trapezoid-");
+}, wFe = (e) => {
+ var t = HB(e, CFe), { x: n, y: r, upperWidth: i, lowerWidth: a, height: o, className: s } = t, { animationEasing: c, animationDuration: l, animationBegin: u, isUpdateAnimationActive: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(-1), h = (0, B.useRef)(i), g = (0, B.useRef)(a), _ = (0, B.useRef)(o), v = (0, B.useRef)(n), y = (0, B.useRef)(r), b = fK(e, "trapezoid-");
if ((0, B.useEffect)(() => {
if (f.current && f.current.getTotalLength) try {
var e = f.current.getTotalLength();
@@ -66300,12 +66396,12 @@ var O0 = (e, t, n, r, i) => {
} catch {}
}, []), n !== +n || r !== +r || i !== +i || a !== +a || o !== +o || i === 0 && a === 0 || o === 0) return null;
var x = _h("recharts-trapezoid", s);
- if (!d) return /*#__PURE__*/ B.createElement("g", null, /*#__PURE__*/ B.createElement("path", E0({}, hz(t), {
+ if (!d) return /*#__PURE__*/ B.createElement("g", null, /*#__PURE__*/ B.createElement("path", E0({}, mz(t), {
className: x,
d: O0(n, r, i, a, o)
})));
- var S = h.current, C = g.current, w = _.current, T = v.current, E = y.current, D = `0px ${p === -1 ? 1 : p}px`, O = `${p}px ${p}px`, k = $G(["strokeDasharray"], l, c);
- return /*#__PURE__*/ B.createElement(fK, {
+ var S = h.current, C = g.current, w = _.current, T = v.current, E = y.current, D = `0px ${p === -1 ? 1 : p}px`, O = `${p}px ${p}px`, k = QG(["strokeDasharray"], l, c);
+ return /*#__PURE__*/ B.createElement(dK, {
animationId: b,
key: b,
canBegin: p > 0,
@@ -66314,35 +66410,35 @@ var O0 = (e, t, n, r, i) => {
isActive: d,
begin: u
}, (e) => {
- var s = OB(S, i, e), c = OB(C, a, e), l = OB(w, o, e), u = OB(T, n, e), d = OB(E, r, e);
+ var s = DB(S, i, e), c = DB(C, a, e), l = DB(w, o, e), u = DB(T, n, e), d = DB(E, r, e);
f.current && (h.current = s, g.current = c, _.current = l, v.current = u, y.current = d);
var p = e > 0 ? {
transition: k,
strokeDasharray: O
} : { strokeDasharray: D };
- return /*#__PURE__*/ B.createElement("path", E0({}, hz(t), {
+ return /*#__PURE__*/ B.createElement("path", E0({}, mz(t), {
className: x,
d: O0(u, d, s, c, l),
ref: f,
style: T0(T0({}, p), t.style)
}));
});
-}, SFe = [
+}, TFe = [
"option",
"shapeType",
"activeClassName",
"inActiveClassName"
];
-function CFe(e, t) {
+function EFe(e, t) {
if (e == null) return {};
- var n, r, i = wFe(e, t);
+ var n, r, i = DFe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function wFe(e, t) {
+function DFe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66365,26 +66461,26 @@ function A0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? k0(Object(n), !0).forEach(function(t) {
- TFe(e, t, n[t]);
+ OFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : k0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function TFe(e, t, n) {
- return (t = EFe(t)) in e ? Object.defineProperty(e, t, {
+function OFe(e, t, n) {
+ return (t = kFe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function EFe(e) {
- var t = DFe(e, "string");
+function kFe(e) {
+ var t = AFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function DFe(e, t) {
+function AFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66394,34 +66490,34 @@ function DFe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function OFe(e, t) {
+function jFe(e, t) {
return A0(A0({}, t), e);
}
-function kFe(e, t) {
+function MFe(e, t) {
return e === "symbols";
}
function j0(e) {
var { shapeType: t, elementProps: n } = e;
switch (t) {
- case "rectangle": return /*#__PURE__*/ B.createElement(xK, n);
- case "trapezoid": return /*#__PURE__*/ B.createElement(xFe, n);
- case "sector": return /*#__PURE__*/ B.createElement(MK, n);
+ case "rectangle": return /*#__PURE__*/ B.createElement(bK, n);
+ case "trapezoid": return /*#__PURE__*/ B.createElement(wFe, n);
+ case "sector": return /*#__PURE__*/ B.createElement(jK, n);
case "symbols":
- if (kFe(t, n)) return /*#__PURE__*/ B.createElement(RB, n);
+ if (MFe(t, n)) return /*#__PURE__*/ B.createElement(LB, n);
break;
- case "curve": return /*#__PURE__*/ B.createElement(JG, n);
+ case "curve": return /*#__PURE__*/ B.createElement(qG, n);
default: return null;
}
}
-function AFe(e) {
+function NFe(e) {
return /*#__PURE__*/ (0, B.isValidElement)(e) ? e.props : e;
}
function M0(e) {
- var { option: t, shapeType: n, activeClassName: r = "recharts-active-shape", inActiveClassName: i = "recharts-shape" } = e, a = CFe(e, SFe), o;
- if (/*#__PURE__*/ (0, B.isValidElement)(t)) o = /*#__PURE__*/ (0, B.cloneElement)(t, A0(A0({}, a), AFe(t)));
+ var { option: t, shapeType: n, activeClassName: r = "recharts-active-shape", inActiveClassName: i = "recharts-shape" } = e, a = EFe(e, TFe), o;
+ if (/*#__PURE__*/ (0, B.isValidElement)(t)) o = /*#__PURE__*/ (0, B.cloneElement)(t, A0(A0({}, a), NFe(t)));
else if (typeof t == "function") o = t(a, a.index);
- else if (dFe(t) && typeof t != "boolean") {
- var s = OFe(t, a);
+ else if (mFe(t) && typeof t != "boolean") {
+ var s = jFe(t, a);
o = /*#__PURE__*/ B.createElement(j0, {
shapeType: n,
elementProps: s
@@ -66433,12 +66529,12 @@ function M0(e) {
elementProps: c
});
}
- return a.isActive ? /*#__PURE__*/ B.createElement(yz, { className: r }, o) : /*#__PURE__*/ B.createElement(yz, { className: i }, o);
+ return a.isActive ? /*#__PURE__*/ B.createElement(vz, { className: r }, o) : /*#__PURE__*/ B.createElement(vz, { className: i }, o);
}
//#endregion
//#region node_modules/recharts/es6/context/tooltipContext.js
var N0 = (e, t, n) => {
- var r = yV();
+ var r = vV();
return (i, a) => (o) => {
e?.(i, a, o), r(CQ({
activeIndex: String(a),
@@ -66448,14 +66544,14 @@ var N0 = (e, t, n) => {
}));
};
}, P0 = (e) => {
- var t = yV();
+ var t = vV();
return (n, r) => (i) => {
- e?.(n, r, i), t(hje());
+ e?.(n, r, i), t(vje());
};
}, F0 = (e, t, n) => {
- var r = yV();
+ var r = vV();
return (i, a) => (o) => {
- e?.(i, a, o), r(gje({
+ e?.(i, a, o), r(yje({
activeIndex: String(a),
activeDataKey: t,
activeCoordinate: i.tooltipPosition,
@@ -66466,9 +66562,9 @@ var N0 = (e, t, n) => {
//#endregion
//#region node_modules/recharts/es6/state/SetTooltipEntrySettings.js
function I0(e) {
- var { tooltipEntrySettings: t } = e, n = yV(), r = oW(), i = (0, B.useRef)(null);
+ var { tooltipEntrySettings: t } = e, n = vV(), r = aW(), i = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- r || (i.current === null ? n(dje(t)) : i.current !== t && n(fje({
+ r || (i.current === null ? n(mje(t)) : i.current !== t && n(hje({
prev: i.current,
next: t
})), i.current = t);
@@ -66477,15 +66573,15 @@ function I0(e) {
n,
r
]), (0, B.useLayoutEffect)(() => () => {
- i.current &&= (n(pje(i.current)), null);
+ i.current &&= (n(gje(i.current)), null);
}, [n]), null;
}
//#endregion
//#region node_modules/recharts/es6/state/SetLegendPayload.js
function L0(e) {
- var { legendPayload: t } = e, n = yV(), r = oW(), i = (0, B.useRef)(null);
+ var { legendPayload: t } = e, n = vV(), r = aW(), i = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- r || (i.current === null ? n(vG(t)) : i.current !== t && n(yG({
+ r || (i.current === null ? n(_G(t)) : i.current !== t && n(vG({
prev: i.current,
next: t
})), i.current = t);
@@ -66494,13 +66590,13 @@ function L0(e) {
r,
t
]), (0, B.useLayoutEffect)(() => () => {
- i.current &&= (n(bG(i.current)), null);
+ i.current &&= (n(yG(i.current)), null);
}, [n]), null;
}
function R0(e) {
- var { legendPayload: t } = e, n = yV(), r = Q(wW), i = (0, B.useRef)(null);
+ var { legendPayload: t } = e, n = vV(), r = Q(CW), i = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- (r === "centric" || r === "radial") && (i.current === null ? n(vG(t)) : i.current !== t && n(yG({
+ (r === "centric" || r === "radial") && (i.current === null ? n(_G(t)) : i.current !== t && n(vG({
prev: i.current,
next: t
})), i.current = t);
@@ -66509,27 +66605,27 @@ function R0(e) {
r,
t
]), (0, B.useLayoutEffect)(() => () => {
- i.current &&= (n(bG(i.current)), null);
+ i.current &&= (n(yG(i.current)), null);
}, [n]), null;
}
//#endregion
//#region node_modules/recharts/es6/util/useId.js
-var jFe = B.useId ?? (() => {
- var [e] = B.useState(() => TB("uid-"));
+var PFe = B.useId ?? (() => {
+ var [e] = B.useState(() => wB("uid-"));
return e;
});
//#endregion
//#region node_modules/recharts/es6/util/useUniqueId.js
-function MFe(e, t) {
- var n = jFe();
+function FFe(e, t) {
+ var n = PFe();
return t || (e ? `${e}-${n}` : n);
}
//#endregion
//#region node_modules/recharts/es6/context/RegisterGraphicalItemId.js
-var NFe = /*#__PURE__*/ (0, B.createContext)(void 0), z0 = (e) => {
- var { id: t, type: n, children: r } = e, i = MFe(`recharts-${n}`, t);
- return /*#__PURE__*/ B.createElement(NFe.Provider, { value: i }, r(i));
-}, B0 = iU({
+var IFe = /*#__PURE__*/ (0, B.createContext)(void 0), z0 = (e) => {
+ var { id: t, type: n, children: r } = e, i = FFe(`recharts-${n}`, t);
+ return /*#__PURE__*/ B.createElement(IFe.Provider, { value: i }, r(i));
+}, B0 = rU({
name: "graphicalItems",
initialState: {
cartesianItems: [],
@@ -66538,79 +66634,79 @@ var NFe = /*#__PURE__*/ (0, B.createContext)(void 0), z0 = (e) => {
reducers: {
addCartesianGraphicalItem: {
reducer(e, t) {
- e.cartesianItems.push(hG(t.payload));
+ e.cartesianItems.push(mG(t.payload));
},
- prepare: eU()
+ prepare: $H()
},
replaceCartesianGraphicalItem: {
reducer(e, t) {
- var { prev: n, next: r } = t.payload, i = GH(e).cartesianItems.indexOf(hG(n));
- i > -1 && (e.cartesianItems[i] = hG(r));
+ var { prev: n, next: r } = t.payload, i = WH(e).cartesianItems.indexOf(mG(n));
+ i > -1 && (e.cartesianItems[i] = mG(r));
},
- prepare: eU()
+ prepare: $H()
},
removeCartesianGraphicalItem: {
reducer(e, t) {
- var n = GH(e).cartesianItems.indexOf(hG(t.payload));
+ var n = WH(e).cartesianItems.indexOf(mG(t.payload));
n > -1 && e.cartesianItems.splice(n, 1);
},
- prepare: eU()
+ prepare: $H()
},
addPolarGraphicalItem: {
reducer(e, t) {
- e.polarItems.push(hG(t.payload));
+ e.polarItems.push(mG(t.payload));
},
- prepare: eU()
+ prepare: $H()
},
removePolarGraphicalItem: {
reducer(e, t) {
- var n = GH(e).polarItems.indexOf(hG(t.payload));
+ var n = WH(e).polarItems.indexOf(mG(t.payload));
n > -1 && e.polarItems.splice(n, 1);
},
- prepare: eU()
+ prepare: $H()
},
replacePolarGraphicalItem: {
reducer(e, t) {
- var { prev: n, next: r } = t.payload, i = GH(e).polarItems.indexOf(hG(n));
- i > -1 && (e.polarItems[i] = hG(r));
+ var { prev: n, next: r } = t.payload, i = WH(e).polarItems.indexOf(mG(n));
+ i > -1 && (e.polarItems[i] = mG(r));
},
- prepare: eU()
+ prepare: $H()
}
}
-}), { addCartesianGraphicalItem: PFe, replaceCartesianGraphicalItem: FFe, removeCartesianGraphicalItem: IFe, addPolarGraphicalItem: LFe, removePolarGraphicalItem: RFe, replacePolarGraphicalItem: zFe } = B0.actions, BFe = B0.reducer, V0 = /*#__PURE__*/ (0, B.memo)((e) => {
- var t = yV(), n = (0, B.useRef)(null);
+}), { addCartesianGraphicalItem: LFe, replaceCartesianGraphicalItem: RFe, removeCartesianGraphicalItem: zFe, addPolarGraphicalItem: BFe, removePolarGraphicalItem: VFe, replacePolarGraphicalItem: HFe } = B0.actions, UFe = B0.reducer, V0 = /*#__PURE__*/ (0, B.memo)((e) => {
+ var t = vV(), n = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- n.current === null ? t(PFe(e)) : n.current !== e && t(FFe({
+ n.current === null ? t(LFe(e)) : n.current !== e && t(RFe({
prev: n.current,
next: e
})), n.current = e;
}, [t, e]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(IFe(n.current)), null);
+ n.current &&= (t(zFe(n.current)), null);
}, [t]), null;
}), H0 = /*#__PURE__*/ (0, B.memo)((e) => {
- var t = yV(), n = (0, B.useRef)(null);
+ var t = vV(), n = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- n.current === null ? t(LFe(e)) : n.current !== e && t(zFe({
+ n.current === null ? t(BFe(e)) : n.current !== e && t(HFe({
prev: n.current,
next: e
})), n.current = e;
}, [t, e]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(RFe(n.current)), null);
+ n.current &&= (t(VFe(n.current)), null);
}, [t]), null;
});
//#endregion
//#region node_modules/es-toolkit/dist/array/last.mjs
-function VFe(e) {
+function WFe(e) {
return e[e.length - 1];
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/last.mjs
-function HFe(e) {
- if (!(!YB(e) || e.length === 0)) return VFe(i0(e));
+function GFe(e) {
+ if (!(!JB(e) || e.length === 0)) return WFe(i0(e));
}
//#endregion
//#region node_modules/recharts/es6/component/Dots.js
-var UFe = ["points"];
+var KFe = ["points"];
function U0(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -66625,26 +66721,26 @@ function W0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? U0(Object(n), !0).forEach(function(t) {
- WFe(e, t, n[t]);
+ qFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : U0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function WFe(e, t, n) {
- return (t = GFe(t)) in e ? Object.defineProperty(e, t, {
+function qFe(e, t, n) {
+ return (t = JFe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function GFe(e) {
- var t = KFe(e, "string");
+function JFe(e) {
+ var t = YFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function KFe(e, t) {
+function YFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66663,16 +66759,16 @@ function G0() {
return e;
}, G0.apply(null, arguments);
}
-function qFe(e, t) {
+function XFe(e, t) {
if (e == null) return {};
- var n, r, i = JFe(e, t);
+ var n, r, i = ZFe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function JFe(e, t) {
+function ZFe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66681,20 +66777,20 @@ function JFe(e, t) {
}
return n;
}
-function YFe(e) {
+function QFe(e) {
var { option: t, dotProps: n, className: r } = e;
if (/*#__PURE__*/ (0, B.isValidElement)(t)) return /*#__PURE__*/ (0, B.cloneElement)(t, n);
if (typeof t == "function") return t(n);
- var i = _h(r, typeof t == "boolean" ? "" : t.className), a = n ?? {}, { points: o } = a, s = qFe(a, UFe);
+ var i = _h(r, typeof t == "boolean" ? "" : t.className), a = n ?? {}, { points: o } = a, s = XFe(a, KFe);
return /*#__PURE__*/ B.createElement(z1, G0({}, s, { className: i }));
}
-function XFe(e, t) {
+function $Fe(e, t) {
return e == null ? !1 : t ? !0 : e.length === 1;
}
function K0(e) {
- var { points: t, dot: n, className: r, dotClassName: i, dataKey: a, baseProps: o, needClip: s, clipPathId: c, zIndex: l = sq.scatter } = e;
- if (!XFe(t, n)) return null;
- var u = C0(n), d = axe(n), f = t.map((e, r) => {
+ var { points: t, dot: n, className: r, dotClassName: i, dataKey: a, baseProps: o, needClip: s, clipPathId: c, zIndex: l = oq.scatter } = e;
+ if (!$Fe(t, n)) return null;
+ var u = C0(n), d = lxe(n), f = t.map((e, r) => {
var s = W0(W0(W0({ r: 3 }, o), d), {}, {
index: r,
cx: e.x ?? void 0,
@@ -66704,14 +66800,14 @@ function K0(e) {
payload: e.payload,
points: t
});
- return /*#__PURE__*/ B.createElement(YFe, {
+ return /*#__PURE__*/ B.createElement(QFe, {
key: `dot-${r}`,
option: n,
dotProps: s,
className: i
});
}), p = {};
- return s && c != null && (p.clipPath = `url(#clipPath-${u ? "" : "dots-"}${c})`), /*#__PURE__*/ B.createElement(S$, { zIndex: l }, /*#__PURE__*/ B.createElement(yz, G0({ className: r }, p), f));
+ return s && c != null && (p.clipPath = `url(#clipPath-${u ? "" : "dots-"}${c})`), /*#__PURE__*/ B.createElement(S$, { zIndex: l }, /*#__PURE__*/ B.createElement(vz, G0({ className: r }, p), f));
}
//#endregion
//#region node_modules/recharts/es6/state/cartesianAxisSlice.js
@@ -66729,26 +66825,26 @@ function J0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? q0(Object(n), !0).forEach(function(t) {
- ZFe(e, t, n[t]);
+ eIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : q0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function ZFe(e, t, n) {
- return (t = QFe(t)) in e ? Object.defineProperty(e, t, {
+function eIe(e, t, n) {
+ return (t = tIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function QFe(e) {
- var t = $Fe(e, "string");
+function tIe(e) {
+ var t = nIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function $Fe(e, t) {
+function nIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66758,7 +66854,7 @@ function $Fe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var Y0 = iU({
+var Y0 = rU({
name: "cartesianAxis",
initialState: {
xAxis: {},
@@ -66768,60 +66864,60 @@ var Y0 = iU({
reducers: {
addXAxis: {
reducer(e, t) {
- e.xAxis[t.payload.id] = hG(t.payload);
+ e.xAxis[t.payload.id] = mG(t.payload);
},
- prepare: eU()
+ prepare: $H()
},
replaceXAxis: {
reducer(e, t) {
var { prev: n, next: r } = t.payload;
- e.xAxis[n.id] !== void 0 && (n.id !== r.id && delete e.xAxis[n.id], e.xAxis[r.id] = hG(r));
+ e.xAxis[n.id] !== void 0 && (n.id !== r.id && delete e.xAxis[n.id], e.xAxis[r.id] = mG(r));
},
- prepare: eU()
+ prepare: $H()
},
removeXAxis: {
reducer(e, t) {
delete e.xAxis[t.payload.id];
},
- prepare: eU()
+ prepare: $H()
},
addYAxis: {
reducer(e, t) {
- e.yAxis[t.payload.id] = hG(t.payload);
+ e.yAxis[t.payload.id] = mG(t.payload);
},
- prepare: eU()
+ prepare: $H()
},
replaceYAxis: {
reducer(e, t) {
var { prev: n, next: r } = t.payload;
- e.yAxis[n.id] !== void 0 && (n.id !== r.id && delete e.yAxis[n.id], e.yAxis[r.id] = hG(r));
+ e.yAxis[n.id] !== void 0 && (n.id !== r.id && delete e.yAxis[n.id], e.yAxis[r.id] = mG(r));
},
- prepare: eU()
+ prepare: $H()
},
removeYAxis: {
reducer(e, t) {
delete e.yAxis[t.payload.id];
},
- prepare: eU()
+ prepare: $H()
},
addZAxis: {
reducer(e, t) {
- e.zAxis[t.payload.id] = hG(t.payload);
+ e.zAxis[t.payload.id] = mG(t.payload);
},
- prepare: eU()
+ prepare: $H()
},
replaceZAxis: {
reducer(e, t) {
var { prev: n, next: r } = t.payload;
- e.zAxis[n.id] !== void 0 && (n.id !== r.id && delete e.zAxis[n.id], e.zAxis[r.id] = hG(r));
+ e.zAxis[n.id] !== void 0 && (n.id !== r.id && delete e.zAxis[n.id], e.zAxis[r.id] = mG(r));
},
- prepare: eU()
+ prepare: $H()
},
removeZAxis: {
reducer(e, t) {
delete e.zAxis[t.payload.id];
},
- prepare: eU()
+ prepare: $H()
},
updateYAxisWidth(e, t) {
var { id: n, width: r } = t.payload, i = e.yAxis[n];
@@ -66836,15 +66932,15 @@ var Y0 = iU({
}
}
}
-}), { addXAxis: eIe, replaceXAxis: tIe, removeXAxis: nIe, addYAxis: rIe, replaceYAxis: iIe, removeYAxis: aIe, addZAxis: oIe, replaceZAxis: sIe, removeZAxis: cIe, updateYAxisWidth: lIe } = Y0.actions, uIe = Y0.reducer, dIe = $([
- $([iW], (e) => ({
+}), { addXAxis: rIe, replaceXAxis: iIe, removeXAxis: aIe, addYAxis: oIe, replaceYAxis: sIe, removeYAxis: cIe, addZAxis: lIe, replaceZAxis: uIe, removeZAxis: dIe, updateYAxisWidth: fIe } = Y0.actions, pIe = Y0.reducer, mIe = $([
+ $([rW], (e) => ({
top: e.top,
bottom: e.bottom,
left: e.left,
right: e.right
})),
- ZU,
- QU
+ XU,
+ ZU
], (e, t, n) => {
if (!(!e || t == null || n == null)) return {
x: e.left,
@@ -66852,7 +66948,7 @@ var Y0 = iU({
width: Math.max(0, t - e.left - e.right),
height: Math.max(0, n - e.top - e.bottom)
};
-}), X0 = () => Q(dIe), fIe = () => Q(Gje);
+}), X0 = () => Q(mIe), hIe = () => Q(Jje);
//#endregion
//#region node_modules/recharts/es6/component/ActivePoints.js
function Z0(e, t) {
@@ -66869,26 +66965,26 @@ function Q0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? Z0(Object(n), !0).forEach(function(t) {
- pIe(e, t, n[t]);
+ gIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Z0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function pIe(e, t, n) {
- return (t = mIe(t)) in e ? Object.defineProperty(e, t, {
+function gIe(e, t, n) {
+ return (t = _Ie(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function mIe(e) {
- var t = hIe(e, "string");
+function _Ie(e) {
+ var t = vIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function hIe(e, t) {
+function vIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66898,7 +66994,7 @@ function hIe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var gIe = (e) => {
+var yIe = (e) => {
var { point: t, childIndex: n, mainColor: r, activeDot: i, dataKey: a, clipPath: o } = e;
if (i === !1 || t.x == null || t.y == null) return null;
var s = Q0(Q0(Q0({}, {
@@ -66912,17 +67008,17 @@ var gIe = (e) => {
stroke: "#fff",
payload: t.payload,
value: t.value
- }), mz(i)), BB(i)), c = /*#__PURE__*/ (0, B.isValidElement)(i) ? /*#__PURE__*/ (0, B.cloneElement)(i, s) : typeof i == "function" ? i(s) : /*#__PURE__*/ B.createElement(z1, s);
- return /*#__PURE__*/ B.createElement(yz, {
+ }), pz(i)), zB(i)), c = /*#__PURE__*/ (0, B.isValidElement)(i) ? /*#__PURE__*/ (0, B.cloneElement)(i, s) : typeof i == "function" ? i(s) : /*#__PURE__*/ B.createElement(z1, s);
+ return /*#__PURE__*/ B.createElement(vz, {
className: "recharts-active-dot",
clipPath: o
}, c);
};
function $0(e) {
- var { points: t, mainColor: n, activeDot: r, itemDataKey: i, clipPath: a, zIndex: o = sq.activeDot } = e, s = Q(t$), c = fIe();
+ var { points: t, mainColor: n, activeDot: r, itemDataKey: i, clipPath: a, zIndex: o = oq.activeDot } = e, s = Q(t$), c = hIe();
if (t == null || c == null) return null;
var l = t.find((e) => c.includes(e.payload));
- return AB(l) ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: o }, /*#__PURE__*/ B.createElement(gIe, {
+ return kB(l) ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: o }, /*#__PURE__*/ B.createElement(yIe, {
point: l,
childIndex: Number(s),
mainColor: n,
@@ -66947,26 +67043,26 @@ function t2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? e2(Object(n), !0).forEach(function(t) {
- _Ie(e, t, n[t]);
+ bIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : e2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function _Ie(e, t, n) {
- return (t = vIe(t)) in e ? Object.defineProperty(e, t, {
+function bIe(e, t, n) {
+ return (t = xIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function vIe(e) {
- var t = yIe(e, "string");
+function xIe(e) {
+ var t = SIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function yIe(e, t) {
+function SIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66976,16 +67072,16 @@ function yIe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var n2 = (e, t) => Y1(e, "radiusAxis", t), bIe = $([n2], (e) => {
+var n2 = (e, t) => Y1(e, "radiusAxis", t), CIe = $([n2], (e) => {
if (e != null) return { scale: e };
-}), xIe = $([_q, n2], (e, t) => {
+}), wIe = $([gq, n2], (e, t) => {
if (e != null && t != null) return t2(t2({}, e), {}, { scale: t });
-}), SIe = (e, t, n, r) => Z1(e, "radiusAxis", t, r), r2 = (e, t, n) => gq(e, n), i2 = (e, t, n) => Y1(e, "angleAxis", n), CIe = $([r2, i2], (e, t) => {
+}), TIe = (e, t, n, r) => Z1(e, "radiusAxis", t, r), r2 = (e, t, n) => hq(e, n), i2 = (e, t, n) => Y1(e, "angleAxis", n), EIe = $([r2, i2], (e, t) => {
if (e != null && t != null) return t2(t2({}, e), {}, { scale: t });
-}), wIe = (e, t, n, r) => Z1(e, "angleAxis", n, r), TIe = $([
+}), DIe = (e, t, n, r) => Z1(e, "angleAxis", n, r), OIe = $([
r2,
i2,
- wq
+ Cq
], (e, t, n) => {
if (n != null && t != null) return {
scale: t,
@@ -66994,30 +67090,30 @@ var n2 = (e, t) => Y1(e, "radiusAxis", t), bIe = $([n2], (e) => {
cx: n.cx,
cy: n.cy
};
-}), EIe = (e, t, n, r, i) => i, DIe = $([
- wW,
- xIe,
- SIe,
- CIe,
- wIe
-], (e, t, n, r, i) => RU(e, "radiusAxis") ? JU(t, n, !1) : JU(r, i, !1)), OIe = $([
- bIe,
+}), kIe = (e, t, n, r, i) => i, AIe = $([
+ CW,
+ wIe,
TIe,
- IK,
- $([B1, EIe], (e, t) => {
+ EIe,
+ DIe
+], (e, t, n, r, i) => LU(e, "radiusAxis") ? qU(t, n, !1) : qU(r, i, !1)), jIe = $([
+ CIe,
+ OIe,
+ FK,
+ $([B1, kIe], (e, t) => {
if (e != null) return e.find((e) => e.type === "radar" && t === e.id)?.dataKey;
}),
- DIe
+ AIe
], (e, t, n, r, i) => {
var { chartData: a, dataStartIndex: o, dataEndIndex: s } = n;
- if (e != null && t != null && a != null && i != null && r != null) return RIe({
+ if (e != null && t != null && a != null && i != null && r != null) return VIe({
radiusAxis: e,
angleAxis: t,
displayedData: a.slice(o, s + 1),
dataKey: r,
bandSize: i
});
-}), kIe = ["id"];
+}), MIe = ["id"];
function a2() {
return a2 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -67041,26 +67137,26 @@ function s2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? o2(Object(n), !0).forEach(function(t) {
- AIe(e, t, n[t]);
+ NIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function AIe(e, t, n) {
- return (t = jIe(t)) in e ? Object.defineProperty(e, t, {
+function NIe(e, t, n) {
+ return (t = PIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function jIe(e) {
- var t = MIe(e, "string");
+function PIe(e) {
+ var t = FIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function MIe(e, t) {
+function FIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -67070,16 +67166,16 @@ function MIe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function NIe(e, t) {
+function IIe(e, t) {
if (e == null) return {};
- var n, r, i = PIe(e, t);
+ var n, r, i = LIe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function PIe(e, t) {
+function LIe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -67091,27 +67187,27 @@ function PIe(e, t) {
function c2(e, t) {
return e && e !== "none" ? e : t;
}
-var FIe = (e) => {
+var RIe = (e) => {
var { dataKey: t, name: n, stroke: r, fill: i, legendType: a, hide: o } = e;
return [{
inactive: o,
dataKey: t,
type: a,
color: c2(r, i),
- value: XU(n, t),
+ value: YU(n, t),
payload: e
}];
-}, IIe = /*#__PURE__*/ B.memo((e) => {
+}, zIe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, stroke: n, strokeWidth: r, fill: i, name: a, hide: o, tooltipType: s, id: c } = e, l = {
dataDefinedOnItem: void 0,
- getPosition: NB,
+ getPosition: MB,
settings: {
stroke: n,
strokeWidth: r,
fill: i,
nameKey: void 0,
dataKey: t,
- name: XU(a, t),
+ name: YU(a, t),
hide: o,
type: s,
color: c2(n, i),
@@ -67121,8 +67217,8 @@ var FIe = (e) => {
};
return /*#__PURE__*/ B.createElement(I0, { tooltipEntrySettings: l });
});
-function LIe(e) {
- var { points: t, props: n } = e, { dot: r, dataKey: i } = n, { id: a } = n, o = pz(NIe(n, kIe));
+function BIe(e) {
+ var { points: t, props: n } = e, { dot: r, dataKey: i } = n, { id: a } = n, o = fz(IIe(n, MIe));
return /*#__PURE__*/ B.createElement(K0, {
points: t,
dot: r,
@@ -67132,11 +67228,11 @@ function LIe(e) {
baseProps: o
});
}
-function RIe(e) {
+function VIe(e) {
var { radiusAxis: t, angleAxis: n, displayedData: r, dataKey: i, bandSize: a } = e, { cx: o, cy: s } = n, c = !1, l = [], u = n.type === "number" ? 0 : a ?? 0;
r.forEach((e, r) => {
- var a = LU(e, n.dataKey, r), d = LU(e, i), f = (n.scale.map(a) ?? 0) + u, p = Array.isArray(d) ? HFe(d) : d, m = AB(p) ? 0 : t.scale.map(p) ?? 0;
- Array.isArray(d) && d.length >= 2 && (c = !0), l.push(s2(s2({}, EK(o, s, m, f)), {}, {
+ var a = IU(e, n.dataKey, r), d = IU(e, i), f = (n.scale.map(a) ?? 0) + u, p = Array.isArray(d) ? GFe(d) : d, m = kB(p) ? 0 : t.scale.map(p) ?? 0;
+ Array.isArray(d) && d.length >= 2 && (c = !0), l.push(s2(s2({}, TK(o, s, m, f)), {}, {
name: a,
value: d,
cx: o,
@@ -67149,8 +67245,8 @@ function RIe(e) {
var d = [];
return c && l.forEach((e) => {
if (Array.isArray(e.value)) {
- var n = e.value[0], r = AB(n) ? 0 : t.scale.map(n) ?? 0;
- d.push(s2(s2({}, e), {}, { radius: r }, EK(o, s, r, e.angle)));
+ var n = e.value[0], r = kB(n) ? 0 : t.scale.map(n) ?? 0;
+ d.push(s2(s2({}, e), {}, { radius: r }, TK(o, s, r, e.angle)));
} else d.push(e);
}), {
points: l,
@@ -67158,7 +67254,7 @@ function RIe(e) {
baseLinePoints: d
};
}
-function zIe(e) {
+function HIe(e) {
var { showLabels: t, points: n, children: r } = e, i = n.map((e) => {
var t = {
x: e.x,
@@ -67178,10 +67274,10 @@ function zIe(e) {
});
return /*#__PURE__*/ B.createElement(A1, { value: t ? i : void 0 }, r);
}
-function BIe(e) {
+function UIe(e) {
var { points: t, baseLinePoints: n, props: r } = e;
if (t == null) return null;
- var { shape: i, isRange: a, connectNulls: o } = r, s = /*#__PURE__*/ B.isValidElement(i) ? /*#__PURE__*/ B.cloneElement(i, s2(s2({}, r), {}, { points: t })) : typeof i == "function" ? i(s2(s2({}, r), {}, { points: t })) : /*#__PURE__*/ B.createElement(L1, a2({}, hz(r), {
+ var { shape: i, isRange: a, connectNulls: o } = r, s = /*#__PURE__*/ B.isValidElement(i) ? /*#__PURE__*/ B.cloneElement(i, s2(s2({}, r), {}, { points: t })) : typeof i == "function" ? i(s2(s2({}, r), {}, { points: t })) : /*#__PURE__*/ B.createElement(L1, a2({}, mz(r), {
onMouseEnter: (e) => {
var { onMouseEnter: t } = r;
t && t(r, e);
@@ -67194,7 +67290,7 @@ function BIe(e) {
baseLinePoints: a ? n : void 0,
connectNulls: o
}));
- return /*#__PURE__*/ B.createElement(yz, { className: "recharts-radar-polygon" }, s, /*#__PURE__*/ B.createElement(LIe, {
+ return /*#__PURE__*/ B.createElement(vz, { className: "recharts-radar-polygon" }, s, /*#__PURE__*/ B.createElement(BIe, {
props: r,
points: t
}));
@@ -67202,23 +67298,23 @@ function BIe(e) {
var l2 = (e, t, n) => (r, i) => {
var a = e && e[Math.floor(i * t)];
return a ? s2(s2({}, r), {}, {
- x: OB(a.x, r.x, n),
- y: OB(a.y, r.y, n)
+ x: DB(a.x, r.x, n),
+ y: DB(a.y, r.y, n)
}) : s2(s2({}, r), {}, {
- x: OB(r.cx, r.x, n),
- y: OB(r.cy, r.y, n)
+ x: DB(r.cx, r.x, n),
+ y: DB(r.cy, r.y, n)
});
};
-function VIe(e) {
- var { props: t, previousPointsRef: n, previousBaseLinePointsRef: r } = e, { points: i, baseLinePoints: a, isAnimationActive: o, animationBegin: s, animationDuration: c, animationEasing: l, onAnimationEnd: u, onAnimationStart: d } = t, f = n.current, p = r.current, m = f ? f.length / i.length : 1, h = p ? p.length / a.length : 1, g = pK(t, "recharts-radar-"), [_, v] = (0, B.useState)(!1), y = !_, b = (0, B.useCallback)(() => {
+function WIe(e) {
+ var { props: t, previousPointsRef: n, previousBaseLinePointsRef: r } = e, { points: i, baseLinePoints: a, isAnimationActive: o, animationBegin: s, animationDuration: c, animationEasing: l, onAnimationEnd: u, onAnimationStart: d } = t, f = n.current, p = r.current, m = f ? f.length / i.length : 1, h = p ? p.length / a.length : 1, g = fK(t, "recharts-radar-"), [_, v] = (0, B.useState)(!1), y = !_, b = (0, B.useCallback)(() => {
typeof u == "function" && u(), v(!1);
}, [u]), x = (0, B.useCallback)(() => {
typeof d == "function" && d(), v(!0);
}, [d]);
- return /*#__PURE__*/ B.createElement(zIe, {
+ return /*#__PURE__*/ B.createElement(HIe, {
showLabels: y,
points: i
- }, /*#__PURE__*/ B.createElement(fK, {
+ }, /*#__PURE__*/ B.createElement(dK, {
animationId: g,
begin: s,
duration: c,
@@ -67229,22 +67325,22 @@ function VIe(e) {
onAnimationStart: x
}, (e) => {
var o = e === 1 ? i : i.map(l2(f, m, e)), s = e === 1 ? a : a?.map(l2(p, h, e));
- return e > 0 && (n.current = o, r.current = s), /*#__PURE__*/ B.createElement(BIe, {
+ return e > 0 && (n.current = o, r.current = s), /*#__PURE__*/ B.createElement(UIe, {
points: o,
baseLinePoints: s,
props: t
});
}), /*#__PURE__*/ B.createElement(N1, { label: t.label }), t.children);
}
-function HIe(e) {
+function GIe(e) {
var t = (0, B.useRef)(void 0), n = (0, B.useRef)(void 0);
- return /*#__PURE__*/ B.createElement(VIe, {
+ return /*#__PURE__*/ B.createElement(WIe, {
props: e,
previousPointsRef: t,
previousBaseLinePointsRef: n
});
}
-var UIe = {
+var KIe = {
activeDot: !0,
angleAxisId: 0,
animationBegin: 0,
@@ -67256,29 +67352,29 @@ var UIe = {
label: !1,
legendType: "rect",
radiusAxisId: 0,
- zIndex: sq.area
+ zIndex: oq.area
};
-function WIe(e) {
+function qIe(e) {
var { hide: t, className: n, points: r } = e;
if (t) return null;
var i = _h("recharts-radar", n);
- return /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(yz, { className: i }, /*#__PURE__*/ B.createElement(HIe, e)), /*#__PURE__*/ B.createElement($0, {
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(vz, { className: i }, /*#__PURE__*/ B.createElement(GIe, e)), /*#__PURE__*/ B.createElement($0, {
points: r,
mainColor: c2(e.stroke, e.fill),
itemDataKey: e.dataKey,
activeDot: e.activeDot
}));
}
-function GIe(e) {
- var t = oW(), n = Q((n) => OIe(n, e.radiusAxisId, e.angleAxisId, t, e.id));
- return n?.points == null ? null : /*#__PURE__*/ B.createElement(WIe, a2({}, e, {
+function JIe(e) {
+ var t = aW(), n = Q((n) => jIe(n, e.radiusAxisId, e.angleAxisId, t, e.id));
+ return n?.points == null ? null : /*#__PURE__*/ B.createElement(qIe, a2({}, e, {
points: n?.points,
baseLinePoints: n?.baseLinePoints,
isRange: n?.isRange
}));
}
function u2(e) {
- var t = UB(e, UIe);
+ var t = HB(e, KIe);
return /*#__PURE__*/ B.createElement(z0, {
id: t.id,
type: "radar"
@@ -67290,7 +67386,7 @@ function u2(e) {
hide: t.hide,
angleAxisId: t.angleAxisId,
radiusAxisId: t.radiusAxisId
- }), /*#__PURE__*/ B.createElement(R0, { legendPayload: FIe(t) }), /*#__PURE__*/ B.createElement(IIe, {
+ }), /*#__PURE__*/ B.createElement(R0, { legendPayload: RIe(t) }), /*#__PURE__*/ B.createElement(zIe, {
dataKey: t.dataKey,
stroke: t.stroke,
strokeWidth: t.strokeWidth,
@@ -67299,7 +67395,7 @@ function u2(e) {
hide: t.hide,
tooltipType: t.tooltipType,
id: e
- }), /*#__PURE__*/ B.createElement(GIe, a2({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(JIe, a2({}, t, { id: e }))));
}
u2.displayName = "Radar";
//#endregion
@@ -67323,9 +67419,9 @@ function p2(e) {
//#region node_modules/recharts/es6/state/selectors/combiners/combineBarSizeList.js
var m2 = (e, t, n) => {
var r = n ?? e;
- if (!AB(r)) return EB(r, t, 0);
+ if (!kB(r)) return TB(r, t, 0);
}, h2 = (e, t, n) => {
- var r = {}, i = e.filter(kq), a = e.filter((e) => e.stackId == null), o = i.reduce((e, t) => {
+ var r = {}, i = e.filter(Oq), a = e.filter((e) => e.stackId == null), o = i.reduce((e, t) => {
var n = e[t.stackId];
return n ??= [], n.push(t), e[t.stackId] = n, e;
}, r), s = Object.entries(o).map((e) => {
@@ -67358,26 +67454,26 @@ function _2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? g2(Object(n), !0).forEach(function(t) {
- KIe(e, t, n[t]);
+ YIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : g2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function KIe(e, t, n) {
- return (t = qIe(t)) in e ? Object.defineProperty(e, t, {
+function YIe(e, t, n) {
+ return (t = XIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function qIe(e) {
- var t = JIe(e, "string");
+function XIe(e) {
+ var t = ZIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function JIe(e, t) {
+function ZIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -67387,11 +67483,11 @@ function JIe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function YIe(e, t, n, r, i) {
+function QIe(e, t, n, r, i) {
var a = r.length;
if (!(a < 1)) {
- var o = EB(e, n, 0, !0), s, c = [];
- if (NU(r[0]?.barSize)) {
+ var o = TB(e, n, 0, !0), s, c = [];
+ if (MU(r[0]?.barSize)) {
var l = !1, u = n / a, d = r.reduce((e, t) => e + (t.barSize || 0), 0);
d += (a - 1) * o, d >= n && (d -= (a - 1) * o, o = 0), d >= n && u > 0 && (l = !0, u *= .9, d = a * u);
var f = {
@@ -67410,11 +67506,11 @@ function YIe(e, t, n, r, i) {
return f = n.position, r;
}, c);
} else {
- var p = EB(t, n, 0, !0);
+ var p = TB(t, n, 0, !0);
n - 2 * p - (a - 1) * o <= 0 && (o = 0);
var m = (n - 2 * p - (a - 1) * o) / a;
m > 1 && (m >>= 0);
- var h = NU(i) ? Math.min(m, i) : m;
+ var h = MU(i) ? Math.min(m, i) : m;
s = r.reduce((e, t, n) => [...e, {
stackId: t.stackId,
dataKeys: t.dataKeys,
@@ -67428,10 +67524,10 @@ function YIe(e, t, n, r, i) {
}
}
var v2 = (e, t, n, r, i, a, o) => {
- var s = AB(o) ? t : o, c = YIe(n, r, i === a ? a : i, e, s);
+ var s = kB(o) ? t : o, c = QIe(n, r, i === a ? a : i, e, s);
return i !== a && c != null && (c = c.map((e) => _2(_2({}, e), {}, { position: _2(_2({}, e.position), {}, { offset: e.position.offset - i / 2 }) }))), c;
}, y2 = (e, t) => {
- var n = Dq(t);
+ var n = Eq(t);
if (!(!e || n == null || t == null)) {
var { stackId: r } = t;
if (r != null) {
@@ -67464,26 +67560,26 @@ function S2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? x2(Object(n), !0).forEach(function(t) {
- XIe(e, t, n[t]);
+ $Ie(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : x2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function XIe(e, t, n) {
- return (t = ZIe(t)) in e ? Object.defineProperty(e, t, {
+function $Ie(e, t, n) {
+ return (t = eLe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function ZIe(e) {
- var t = QIe(e, "string");
+function eLe(e) {
+ var t = tLe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function QIe(e, t) {
+function tLe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -67493,81 +67589,81 @@ function QIe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var C2 = $([(e, t) => _q(e, t), (e, t) => Y1(e, "radiusAxis", t)], (e, t) => {
+var C2 = $([(e, t) => gq(e, t), (e, t) => Y1(e, "radiusAxis", t)], (e, t) => {
if (e != null && t != null) return S2(S2({}, e), {}, { scale: t });
-}), w2 = (e, t) => dPe(e, "radiusAxis", t, !1), T2 = $([(e, t, n) => gq(e, n), (e, t, n) => Y1(e, "angleAxis", n)], (e, t) => {
+}), w2 = (e, t) => mPe(e, "radiusAxis", t, !1), T2 = $([(e, t, n) => hq(e, n), (e, t, n) => Y1(e, "angleAxis", n)], (e, t) => {
if (e != null && t != null) return S2(S2({}, e), {}, { scale: t });
}), E2 = (e, t, n) => Z1(e, "angleAxis", n, !1), D2 = $([B1, (e, t, n, r) => r], (e, t) => {
if (e.some((e) => e.type === "radialBar" && t.dataKey === e.dataKey && t.stackId === e.stackId)) return t;
}), O2 = $([
- wW,
+ CW,
C2,
w2,
T2,
E2
-], (e, t, n, r, i) => RU(e, "radiusAxis") ? JU(t, n, !1) : JU(r, i, !1)), $Ie = $([
+], (e, t, n, r, i) => LU(e, "radiusAxis") ? qU(t, n, !1) : qU(r, i, !1)), nLe = $([
T2,
C2,
- wW
+ CW
], (e, t, n) => {
var r = n === "radial" ? e : t;
- if (r != null && r.scale != null) return GU({ numericAxis: r });
-}), eLe = (e, t, n, r, i) => i, tLe = (e, t, n, r, i) => n, nLe = (e, t, n, r, i) => t, k2 = (e, t, n, r, i) => r.maxBarSize, A2 = (e) => e.type === "radialBar", rLe = $([$([
+ if (r != null && r.scale != null) return WU({ numericAxis: r });
+}), rLe = (e, t, n, r, i) => i, iLe = (e, t, n, r, i) => n, aLe = (e, t, n, r, i) => t, k2 = (e, t, n, r, i) => r.maxBarSize, A2 = (e) => e.type === "radialBar", oLe = $([$([
$([
$([
- wW,
+ CW,
B1,
- tLe,
- nLe
+ iLe,
+ aLe
], (e, t, n, r) => t.filter((t) => e === "centric" ? t.angleAxisId === n : t.radiusAxisId === r).filter((e) => e.hide === !1).filter(A2)),
- eq,
+ $K,
() => void 0
], h2),
+ XK,
ZK,
QK,
- $K,
$([
- wW,
- ZK,
+ CW,
+ XK,
T2,
E2,
C2,
w2,
k2
], (e, t, n, r, i, a, o) => {
- var s = AB(o) ? t : o;
- return e === "centric" ? JU(n, r, !0) ?? s ?? 0 : JU(i, a, !0) ?? s ?? 0;
+ var s = kB(o) ? t : o;
+ return e === "centric" ? qU(n, r, !0) ?? s ?? 0 : qU(i, a, !0) ?? s ?? 0;
}),
O2,
k2
-], v2), D2], b2), j2 = $([V1], (e) => e.filter(A2).filter(kq)), M2 = $([
+], v2), D2], b2), j2 = $([V1], (e) => e.filter(A2).filter(Oq)), M2 = $([
$([
j2,
- IK,
+ FK,
CZ
- ], Oq),
+ ], Dq),
j2,
- tq,
- nq
-], TZ), iLe = $([
+ eq,
+ tq
+], TZ), sLe = $([
T2,
E2,
C2,
w2,
- FK,
+ PK,
D2,
O2,
- wW,
- $Ie,
- wq,
- eLe,
+ CW,
+ nLe,
+ Cq,
rLe,
- $([(e, t, n) => wW(e) === "centric" ? M2(e, "radiusAxis", t) : M2(e, "angleAxis", n), D2], y2)
+ oLe,
+ $([(e, t, n) => CW(e) === "centric" ? M2(e, "radiusAxis", t) : M2(e, "angleAxis", n), D2], y2)
], (e, t, n, r, i, a, o, s, c, l, u, d, f) => {
var { chartData: p, dataStartIndex: m, dataEndIndex: h } = i;
if (a == null || n == null || e == null || p == null || o == null || d == null || s !== "centric" && s !== "radial" || r == null || l == null) return [];
var { dataKey: g, minPointSize: _ } = a, { cx: v, cy: y, startAngle: b, endAngle: x } = l;
- return xLe({
+ return wLe({
angleAxis: e,
angleAxisTicks: t,
bandSize: o,
@@ -67588,7 +67684,7 @@ var C2 = $([(e, t) => _q(e, t), (e, t) => Y1(e, "radiusAxis", t)], (e, t) => {
stackedDomain: f ? (s === "centric" ? n : e).scale.domain() : null,
startAngle: b
});
-}), aLe = $([IK, (e, t) => t], (e, t) => {
+}), cLe = $([FK, (e, t) => t], (e, t) => {
var { chartData: n, dataStartIndex: r, dataEndIndex: i } = e;
if (n == null) return [];
var a = n.slice(r, i + 1);
@@ -67602,20 +67698,20 @@ var C2 = $([(e, t) => _q(e, t), (e, t) => Y1(e, "radiusAxis", t)], (e, t) => {
//#endregion
//#region node_modules/recharts/es6/zIndex/getZIndexFromUnknown.js
function N2(e, t) {
- return e && typeof e == "object" && "zIndex" in e && typeof e.zIndex == "number" && NU(e.zIndex) ? e.zIndex : t;
+ return e && typeof e == "object" && "zIndex" in e && typeof e.zIndex == "number" && MU(e.zIndex) ? e.zIndex : t;
}
//#endregion
//#region node_modules/recharts/es6/polar/RadialBar.js
-var oLe = [
+var lLe = [
"shape",
"activeShape",
"cornerRadius",
"id"
-], sLe = [
+], uLe = [
"onMouseEnter",
"onClick",
"onMouseLeave"
-], cLe = ["value", "background"];
+], dLe = ["value", "background"];
function P2() {
return P2 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -67639,26 +67735,26 @@ function I2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? F2(Object(n), !0).forEach(function(t) {
- lLe(e, t, n[t]);
+ fLe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : F2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function lLe(e, t, n) {
- return (t = uLe(t)) in e ? Object.defineProperty(e, t, {
+function fLe(e, t, n) {
+ return (t = pLe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function uLe(e) {
- var t = dLe(e, "string");
+function pLe(e) {
+ var t = mLe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function dLe(e, t) {
+function mLe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -67670,14 +67766,14 @@ function dLe(e, t) {
}
function L2(e, t) {
if (e == null) return {};
- var n, r, i = fLe(e, t);
+ var n, r, i = hLe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function fLe(e, t) {
+function hLe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -67687,7 +67783,7 @@ function fLe(e, t) {
return n;
}
var R2 = [];
-function pLe(e) {
+function gLe(e) {
var { showLabels: t, sectors: n, children: r } = e, i = n.map((e) => ({
value: e.value,
payload: e.payload,
@@ -67704,15 +67800,15 @@ function pLe(e) {
},
fill: e.fill
}));
- return /*#__PURE__*/ B.createElement($Ne, { value: t ? i : void 0 }, r);
+ return /*#__PURE__*/ B.createElement(nPe, { value: t ? i : void 0 }, r);
}
-function mLe(e) {
- var { sectors: t, allOtherRadialBarProps: n, showLabels: r } = e, { shape: i, activeShape: a, cornerRadius: o, id: s } = n, c = L2(n, oLe), l = pz(c), u = Q(t$), { onMouseEnter: d, onClick: f, onMouseLeave: p } = n, m = L2(n, sLe), h = N0(d, n.dataKey, s), g = P0(p), _ = F0(f, n.dataKey, s);
- return t == null ? null : /*#__PURE__*/ B.createElement(pLe, {
+function _Le(e) {
+ var { sectors: t, allOtherRadialBarProps: n, showLabels: r } = e, { shape: i, activeShape: a, cornerRadius: o, id: s } = n, c = L2(n, lLe), l = fz(c), u = Q(t$), { onMouseEnter: d, onClick: f, onMouseLeave: p } = n, m = L2(n, uLe), h = N0(d, n.dataKey, s), g = P0(p), _ = F0(f, n.dataKey, s);
+ return t == null ? null : /*#__PURE__*/ B.createElement(gLe, {
showLabels: r,
sectors: t
}, t.map((e, t) => {
- var n = !!(a && u === String(t)), r = h(e, t), s = g(e, t), d = _(e, t), f = I2(I2(I2(I2({}, l), {}, { cornerRadius: f2(o) }, e), VB(m, e, t)), {}, {
+ var n = !!(a && u === String(t)), r = h(e, t), s = g(e, t), d = _(e, t), f = I2(I2(I2(I2({}, l), {}, { cornerRadius: f2(o) }, e), BB(m, e, t)), {}, {
onMouseEnter: r,
onMouseLeave: s,
onClick: d,
@@ -67724,18 +67820,18 @@ function mLe(e) {
index: t
});
return n ? /*#__PURE__*/ B.createElement(S$, {
- zIndex: sq.activeBar,
+ zIndex: oq.activeBar,
key: `sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`
}, /*#__PURE__*/ B.createElement(p2, f)) : /*#__PURE__*/ B.createElement(p2, P2({ key: `sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}` }, f));
}), /*#__PURE__*/ B.createElement(N1, { label: n.label }), n.children);
}
-function hLe(e) {
- var { props: t, previousSectorsRef: n } = e, { sectors: r, isAnimationActive: i, animationBegin: a, animationDuration: o, animationEasing: s, onAnimationEnd: c, onAnimationStart: l } = t, u = pK(t, "recharts-radialbar-"), d = n.current, [f, p] = (0, B.useState)(!1), m = (0, B.useCallback)(() => {
+function vLe(e) {
+ var { props: t, previousSectorsRef: n } = e, { sectors: r, isAnimationActive: i, animationBegin: a, animationDuration: o, animationEasing: s, onAnimationEnd: c, onAnimationStart: l } = t, u = fK(t, "recharts-radialbar-"), d = n.current, [f, p] = (0, B.useState)(!1), m = (0, B.useCallback)(() => {
typeof c == "function" && c(), p(!1);
}, [c]), h = (0, B.useCallback)(() => {
typeof l == "function" && l(), p(!0);
}, [l]);
- return /*#__PURE__*/ B.createElement(fK, {
+ return /*#__PURE__*/ B.createElement(dK, {
animationId: u,
begin: a,
duration: o,
@@ -67748,34 +67844,34 @@ function hLe(e) {
var i = e === 1 ? r : (r ?? R2).map((t, n) => {
var r = d && d[n];
if (r) return I2(I2({}, t), {}, {
- startAngle: OB(r.startAngle, t.startAngle, e),
- endAngle: OB(r.endAngle, t.endAngle, e)
+ startAngle: DB(r.startAngle, t.startAngle, e),
+ endAngle: DB(r.endAngle, t.endAngle, e)
});
var { endAngle: i, startAngle: a } = t;
- return I2(I2({}, t), {}, { endAngle: OB(a, i, e) });
+ return I2(I2({}, t), {}, { endAngle: DB(a, i, e) });
});
- return e > 0 && (n.current = i ?? null), /*#__PURE__*/ B.createElement(mLe, {
+ return e > 0 && (n.current = i ?? null), /*#__PURE__*/ B.createElement(_Le, {
sectors: i ?? R2,
allOtherRadialBarProps: t,
showLabels: !f
});
});
}
-function gLe(e) {
+function yLe(e) {
var t = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(hLe, {
+ return /*#__PURE__*/ B.createElement(vLe, {
props: e,
previousSectorsRef: t
});
}
-function _Le(e) {
- var t = Q((t) => aLe(t, e.legendType));
+function bLe(e) {
+ var t = Q((t) => cLe(t, e.legendType));
return /*#__PURE__*/ B.createElement(R0, { legendPayload: t ?? [] });
}
-var vLe = /*#__PURE__*/ B.memo((e) => {
+var xLe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, sectors: n, stroke: r, strokeWidth: i, name: a, hide: o, fill: s, tooltipType: c, id: l } = e, u = {
dataDefinedOnItem: n,
- getPosition: NB,
+ getPosition: MB,
settings: {
graphicalItemId: l,
stroke: r,
@@ -67783,7 +67879,7 @@ var vLe = /*#__PURE__*/ B.memo((e) => {
fill: s,
nameKey: void 0,
dataKey: t,
- name: XU(a, t),
+ name: YU(a, t),
hide: o,
type: c,
color: s,
@@ -67791,14 +67887,14 @@ var vLe = /*#__PURE__*/ B.memo((e) => {
}
};
return /*#__PURE__*/ B.createElement(I0, { tooltipEntrySettings: u });
-}), yLe = class extends B.PureComponent {
+}), SLe = class extends B.PureComponent {
renderBackground(e) {
if (e == null) return null;
- var { cornerRadius: t } = this.props, n = mz(this.props.background);
- return /*#__PURE__*/ B.createElement(S$, { zIndex: N2(this.props.background, sq.barBackground) }, e.map((e, r) => {
- var { value: i, background: a } = e, o = L2(e, cLe);
+ var { cornerRadius: t } = this.props, n = pz(this.props.background);
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: N2(this.props.background, oq.barBackground) }, e.map((e, r) => {
+ var { value: i, background: a } = e, o = L2(e, dLe);
if (!a) return null;
- var s = I2(I2(I2(I2(I2({ cornerRadius: f2(t) }, o), {}, { fill: "#eee" }, a), n), VB(this.props, e, r)), {}, {
+ var s = I2(I2(I2(I2(I2({ cornerRadius: f2(t) }, o), {}, { fill: "#eee" }, a), n), BB(this.props, e, r)), {}, {
index: r,
className: _h("recharts-radial-bar-background-sector", String(n?.className)),
option: a,
@@ -67811,17 +67907,17 @@ var vLe = /*#__PURE__*/ B.memo((e) => {
var { hide: e, sectors: t, className: n, background: r } = this.props;
if (e) return null;
var i = _h("recharts-area", n);
- return /*#__PURE__*/ B.createElement(S$, { zIndex: this.props.zIndex }, /*#__PURE__*/ B.createElement(yz, { className: i }, r && /*#__PURE__*/ B.createElement(yz, { className: "recharts-radial-bar-background" }, this.renderBackground(t)), /*#__PURE__*/ B.createElement(yz, { className: "recharts-radial-bar-sectors" }, /*#__PURE__*/ B.createElement(gLe, this.props))));
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: this.props.zIndex }, /*#__PURE__*/ B.createElement(vz, { className: i }, r && /*#__PURE__*/ B.createElement(vz, { className: "recharts-radial-bar-background" }, this.renderBackground(t)), /*#__PURE__*/ B.createElement(vz, { className: "recharts-radial-bar-sectors" }, /*#__PURE__*/ B.createElement(yLe, this.props))));
}
};
-function bLe(e) {
+function CLe(e) {
var t = B.useMemo(() => S0(e.children, z$), [e.children]), n = B.useMemo(() => ({
data: void 0,
hide: !1,
id: e.id,
dataKey: e.dataKey,
minPointSize: e.minPointSize,
- stackId: HU(e.stackId),
+ stackId: VU(e.stackId),
maxBarSize: e.maxBarSize,
barSize: e.barSize,
type: "radialBar",
@@ -67836,8 +67932,8 @@ function bLe(e) {
e.barSize,
e.angleAxisId,
e.radiusAxisId
- ]), r = Q((r) => iLe(r, e.radiusAxisId, e.angleAxisId, n, t)) ?? R2;
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(vLe, {
+ ]), r = Q((r) => sLe(r, e.radiusAxisId, e.angleAxisId, n, t)) ?? R2;
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(xLe, {
dataKey: e.dataKey,
sectors: r,
stroke: e.stroke,
@@ -67847,7 +67943,7 @@ function bLe(e) {
fill: e.fill,
tooltipType: e.tooltipType,
id: e.id
- }), /*#__PURE__*/ B.createElement(yLe, P2({}, e, { sectors: r })));
+ }), /*#__PURE__*/ B.createElement(SLe, P2({}, e, { sectors: r })));
}
var z2 = {
angleAxisId: 0,
@@ -67864,14 +67960,14 @@ var z2 = {
legendType: "rect",
minPointSize: 0,
radiusAxisId: 0,
- zIndex: sq.bar
+ zIndex: oq.bar
};
-function xLe(e) {
+function wLe(e) {
var { displayedData: t, stackedData: n, dataStartIndex: r, stackedDomain: i, dataKey: a, baseValue: o, layout: s, radiusAxis: c, radiusAxisTicks: l, bandSize: u, pos: d, angleAxis: f, minPointSize: p, cx: m, cy: h, angleAxisTicks: g, cells: _, startAngle: v, endAngle: y } = e;
return g == null || l == null ? R2 : (t ?? []).map((e, t) => {
var b, x, S, C, w, T;
- if (n ? b = VU(n[r + t], i) : (b = LU(e, a), Array.isArray(b) || (b = [o, b])), s === "radial") {
- if (C = f.scale.map(b[0]) ?? v, w = f.scale.map(b[1]) ?? y, x = WU({
+ if (n ? b = BU(n[r + t], i) : (b = IU(e, a), Array.isArray(b) || (b = [o, b])), s === "radial") {
+ if (C = f.scale.map(b[0]) ?? v, w = f.scale.map(b[1]) ?? y, x = UU({
axis: c,
ticks: l,
bandSize: u,
@@ -67882,7 +67978,7 @@ function xLe(e) {
S = x + d.size;
var E = w - C;
if (Math.abs(p) > 0 && Math.abs(E) < Math.abs(p)) {
- var D = xB(E || p) * (Math.abs(p) - Math.abs(E));
+ var D = bB(E || p) * (Math.abs(p) - Math.abs(E));
w += D;
}
T = { background: {
@@ -67894,7 +67990,7 @@ function xLe(e) {
endAngle: y
} };
}
- } else if (x = c.scale.map(b[0]), S = c.scale.map(b[1]), C = WU({
+ } else if (x = c.scale.map(b[0]), S = c.scale.map(b[1]), C = UU({
axis: f,
ticks: g,
bandSize: u,
@@ -67905,7 +68001,7 @@ function xLe(e) {
w = C + d.size;
var O = S - x;
if (Math.abs(p) > 0 && Math.abs(O) < Math.abs(p)) {
- var k = xB(O || p) * (Math.abs(p) - Math.abs(O));
+ var k = bB(O || p) * (Math.abs(p) - Math.abs(O));
S += k;
}
}
@@ -67922,7 +68018,7 @@ function xLe(e) {
});
}
function B2(e) {
- var t = UB(e, z2);
+ var t = HB(e, z2);
return /*#__PURE__*/ B.createElement(z0, {
id: t.id,
type: "radialBar"
@@ -67934,17 +68030,17 @@ function B2(e) {
hide: t.hide ?? z2.hide,
angleAxisId: t.angleAxisId ?? z2.angleAxisId,
radiusAxisId: t.radiusAxisId ?? z2.radiusAxisId,
- stackId: HU(t.stackId),
+ stackId: VU(t.stackId),
barSize: t.barSize,
minPointSize: t.minPointSize,
maxBarSize: t.maxBarSize
- }), /*#__PURE__*/ B.createElement(_Le, t), /*#__PURE__*/ B.createElement(bLe, P2({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(bLe, t), /*#__PURE__*/ B.createElement(CLe, P2({}, t, { id: e }))));
}
B2.displayName = "RadialBar";
//#endregion
//#region node_modules/recharts/es6/context/chartDataContext.js
var V2 = (e) => {
- var { chartData: t } = e, n = yV(), r = oW();
+ var { chartData: t } = e, n = vV(), r = aW();
return (0, B.useEffect)(() => r ? () => {} : (n(N$(t)), () => {
n(N$(void 0));
}), [
@@ -67963,13 +68059,13 @@ var V2 = (e) => {
bottom: 0,
left: 0
}
-}, U2 = iU({
+}, U2 = rU({
name: "brush",
initialState: H2,
reducers: { setBrushSettings(e, t) {
return t.payload == null ? H2 : t.payload;
} }
-}), { setBrushSettings: SLe } = U2.actions, CLe = U2.reducer, wLe = (e, t) => {
+}), { setBrushSettings: TLe } = U2.actions, ELe = U2.reducer, DLe = (e, t) => {
var { x: n, y: r } = e, { x: i, y: a } = t;
return {
x: Math.min(n, i),
@@ -67977,9 +68073,9 @@ var V2 = (e) => {
width: Math.abs(i - n),
height: Math.abs(a - r)
};
-}, TLe = (e) => {
+}, OLe = (e) => {
var { x1: t, y1: n, x2: r, y2: i } = e;
- return wLe({
+ return DLe({
x: t,
y: n
}, {
@@ -67987,13 +68083,13 @@ var V2 = (e) => {
y: i
});
};
-function ELe(e) {
+function kLe(e) {
return (e % 180 + 180) % 180;
}
-var DLe = function(e) {
- var { width: t, height: n } = e, r = ELe(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0) * Math.PI / 180, i = Math.atan(n / t), a = r > i && r < Math.PI - i ? n / Math.sin(r) : t / Math.cos(r);
+var ALe = function(e) {
+ var { width: t, height: n } = e, r = kLe(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0) * Math.PI / 180, i = Math.atan(n / t), a = r > i && r < Math.PI - i ? n / Math.sin(r) : t / Math.cos(r);
return Math.abs(a);
-}, W2 = iU({
+}, W2 = rU({
name: "referenceElements",
initialState: {
dots: [],
@@ -68005,26 +68101,26 @@ var DLe = function(e) {
e.dots.push(t.payload);
},
removeDot: (e, t) => {
- var n = GH(e).dots.findIndex((e) => e === t.payload);
+ var n = WH(e).dots.findIndex((e) => e === t.payload);
n !== -1 && e.dots.splice(n, 1);
},
addArea: (e, t) => {
e.areas.push(t.payload);
},
removeArea: (e, t) => {
- var n = GH(e).areas.findIndex((e) => e === t.payload);
+ var n = WH(e).areas.findIndex((e) => e === t.payload);
n !== -1 && e.areas.splice(n, 1);
},
addLine: (e, t) => {
- e.lines.push(hG(t.payload));
+ e.lines.push(mG(t.payload));
},
removeLine: (e, t) => {
- var n = GH(e).lines.findIndex((e) => e === t.payload);
+ var n = WH(e).lines.findIndex((e) => e === t.payload);
n !== -1 && e.lines.splice(n, 1);
}
}
-}), { addDot: OLe, removeDot: kLe, addArea: ALe, removeArea: jLe, addLine: MLe, removeLine: NLe } = W2.actions, PLe = W2.reducer, G2 = /*#__PURE__*/ (0, B.createContext)(void 0), FLe = (e) => {
- var { children: t } = e, [n] = (0, B.useState)(`${TB("recharts")}-clip`), r = X0();
+}), { addDot: jLe, removeDot: MLe, addArea: NLe, removeArea: PLe, addLine: FLe, removeLine: ILe } = W2.actions, LLe = W2.reducer, G2 = /*#__PURE__*/ (0, B.createContext)(void 0), RLe = (e) => {
+ var { children: t } = e, [n] = (0, B.useState)(`${wB("recharts")}-clip`), r = X0();
if (r == null) return null;
var { x: i, y: a, width: o, height: s } = r;
return /*#__PURE__*/ B.createElement(G2.Provider, { value: n }, /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement("clipPath", { id: n }, /*#__PURE__*/ B.createElement("rect", {
@@ -68033,7 +68129,7 @@ var DLe = function(e) {
height: s,
width: o
}))), t);
-}, ILe = () => (0, B.useContext)(G2), LLe = class {
+}, zLe = () => (0, B.useContext)(G2), BLe = class {
constructor(e) {
var { x: t, y: n } = e;
this.xAxisScale = t, this.yAxisScale = n;
@@ -68073,26 +68169,26 @@ function q2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? K2(Object(n), !0).forEach(function(t) {
- RLe(e, t, n[t]);
+ VLe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : K2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function RLe(e, t, n) {
- return (t = zLe(t)) in e ? Object.defineProperty(e, t, {
+function VLe(e, t, n) {
+ return (t = HLe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function zLe(e) {
- var t = BLe(e, "string");
+function HLe(e) {
+ var t = ULe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function BLe(e, t) {
+function ULe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -68111,18 +68207,18 @@ function J2() {
return e;
}, J2.apply(null, arguments);
}
-var VLe = (e, t) => {
+var WLe = (e, t) => {
var n;
if (/*#__PURE__*/ B.isValidElement(e)) n = /*#__PURE__*/ B.cloneElement(e, t);
else if (typeof e == "function") n = e(t);
else {
- if (!NU(t.x1) || !NU(t.y1) || !NU(t.x2) || !NU(t.y2)) return null;
+ if (!MU(t.x1) || !MU(t.y1) || !MU(t.x2) || !MU(t.y2)) return null;
n = /*#__PURE__*/ B.createElement("line", J2({}, t, { className: "recharts-reference-line-line" }));
}
return n;
-}, HLe = (e, t, n, r, i, a) => {
+}, GLe = (e, t, n, r, i, a) => {
var { x: o, width: s } = a, c = i.map(e, { position: n });
- if (!NU(c) || t === "discard" && !i.isInRange(c)) return null;
+ if (!MU(c) || t === "discard" && !i.isInRange(c)) return null;
var l = [{
x: o + s,
y: c
@@ -68131,9 +68227,9 @@ var VLe = (e, t) => {
y: c
}];
return r === "left" ? l.reverse() : l;
-}, ULe = (e, t, n, r, i, a) => {
+}, KLe = (e, t, n, r, i, a) => {
var { y: o, height: s } = a, c = i.map(e, { position: n });
- if (!NU(c) || t === "discard" && !i.isInRange(c)) return null;
+ if (!MU(c) || t === "discard" && !i.isInRange(c)) return null;
var l = [{
x: c,
y: o + s
@@ -68142,7 +68238,7 @@ var VLe = (e, t) => {
y: o
}];
return r === "top" ? l.reverse() : l;
-}, WLe = (e, t, n, r) => {
+}, qLe = (e, t, n, r) => {
var i = [r.mapWithFallback(e[0], {
position: n,
fallback: "rangeMin"
@@ -68151,43 +68247,43 @@ var VLe = (e, t) => {
fallback: "rangeMax"
})];
return t === "discard" && i.some((e) => !r.isInRange(e)) ? null : i;
-}, GLe = (e, t, n, r, i, a, o) => {
- var { x: s, y: c, segment: l, ifOverflow: u } = o, d = wB(s);
- return wB(c) ? HLe(c, u, r, a, t, n) : d ? ULe(s, u, r, i, e, n) : l != null && l.length === 2 ? WLe(l, u, r, new LLe({
+}, JLe = (e, t, n, r, i, a, o) => {
+ var { x: s, y: c, segment: l, ifOverflow: u } = o, d = CB(s);
+ return CB(c) ? GLe(c, u, r, a, t, n) : d ? KLe(s, u, r, i, e, n) : l != null && l.length === 2 ? qLe(l, u, r, new BLe({
x: e,
y: t
})) : null;
};
-function KLe(e) {
- var t = yV();
- return (0, B.useEffect)(() => (t(MLe(e)), () => {
- t(NLe(e));
+function YLe(e) {
+ var t = vV();
+ return (0, B.useEffect)(() => (t(FLe(e)), () => {
+ t(ILe(e));
})), null;
}
-function qLe(e) {
- var { xAxisId: t, yAxisId: n, shape: r, className: i, ifOverflow: a } = e, o = oW(), s = ILe(), c = Q((e) => eZ(e, t)), l = Q((e) => rZ(e, n)), u = Q((e) => eQ(e, "xAxis", t, o)), d = Q((e) => eQ(e, "yAxis", n, o)), f = bW();
+function XLe(e) {
+ var { xAxisId: t, yAxisId: n, shape: r, className: i, ifOverflow: a } = e, o = aW(), s = zLe(), c = Q((e) => eZ(e, t)), l = Q((e) => rZ(e, n)), u = Q((e) => eQ(e, "xAxis", t, o)), d = Q((e) => eQ(e, "yAxis", n, o)), f = yW();
if (!s || !f || c == null || l == null || u == null || d == null) return null;
- var p = GLe(u, d, f, e.position, c.orientation, l.orientation, e);
+ var p = JLe(u, d, f, e.position, c.orientation, l.orientation, e);
if (!p) return null;
var m = p[0], h = p[1];
if (m == null || h == null) return null;
- var { x: g, y: _ } = m, { x: v, y } = h, b = q2(q2({ clipPath: a === "hidden" ? `url(#${s})` : void 0 }, hz(e)), {}, {
+ var { x: g, y: _ } = m, { x: v, y } = h, b = q2(q2({ clipPath: a === "hidden" ? `url(#${s})` : void 0 }, mz(e)), {}, {
x1: g,
y1: _,
x2: v,
y2: y
- }), x = TLe({
+ }), x = OLe({
x1: g,
y1: _,
x2: v,
y2: y
});
- return /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(yz, { className: _h("recharts-reference-line", i) }, VLe(r, b), /*#__PURE__*/ B.createElement(v1, J2({}, x, {
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(vz, { className: _h("recharts-reference-line", i) }, WLe(r, b), /*#__PURE__*/ B.createElement(v1, J2({}, x, {
lowerWidth: x.width,
upperWidth: x.width
}), /*#__PURE__*/ B.createElement(E1, { label: e.label }), e.children)));
}
-var JLe = {
+var ZLe = {
ifOverflow: "discard",
xAxisId: 0,
yAxisId: 0,
@@ -68197,18 +68293,18 @@ var JLe = {
fillOpacity: 1,
strokeWidth: 1,
position: "middle",
- zIndex: sq.line
+ zIndex: oq.line
};
function Y2(e) {
- var t = UB(e, JLe);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(KLe, {
+ var t = HB(e, ZLe);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(YLe, {
yAxisId: t.yAxisId,
xAxisId: t.xAxisId,
ifOverflow: t.ifOverflow,
x: t.x,
y: t.y,
segment: t.segment
- }), /*#__PURE__*/ B.createElement(qLe, t));
+ }), /*#__PURE__*/ B.createElement(XLe, t));
}
Y2.displayName = "ReferenceLine";
//#endregion
@@ -68224,13 +68320,13 @@ function X2(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/util/TickUtils.js
-function YLe(e, t, n) {
- return DLe({
+function QLe(e, t, n) {
+ return ALe({
width: e.width + t.width,
height: e.height + t.height
}, n);
}
-function XLe(e, t, n) {
+function $Le(e, t, n) {
var r = n === "width", { x: i, y: a, width: o, height: s } = e;
return t === 1 ? {
start: r ? i : a,
@@ -68245,12 +68341,12 @@ function Z2(e, t, n, r, i) {
var a = n();
return e * (t - e * a / 2 - r) >= 0 && e * (t + e * a / 2 - i) <= 0;
}
-function ZLe(e, t) {
+function eRe(e, t) {
return X2(e, t + 1);
}
//#endregion
//#region node_modules/recharts/es6/cartesian/getEquidistantTicks.js
-function QLe(e, t, n, r, i) {
+function tRe(e, t, n, r, i) {
for (var a = (r || []).slice(), { start: o, end: s } = t, c = 0, l = 1, u = o, d = function() {
var t = r?.[c];
if (t === void 0) return { v: X2(r, l) };
@@ -68259,7 +68355,7 @@ function QLe(e, t, n, r, i) {
}, f; l <= a.length;) if (f = d(), f) return f.v;
return [];
}
-function $Le(e, t, n, r, i) {
+function nRe(e, t, n, r, i) {
var a = (r || []).slice().length;
if (a === 0) return [];
for (var { start: o, end: s } = t, c = 1; c <= a; c++) {
@@ -68296,26 +68392,26 @@ function $2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? Q2(Object(n), !0).forEach(function(t) {
- eRe(e, t, n[t]);
+ rRe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Q2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function eRe(e, t, n) {
- return (t = tRe(t)) in e ? Object.defineProperty(e, t, {
+function rRe(e, t, n) {
+ return (t = iRe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function tRe(e) {
- var t = nRe(e, "string");
+function iRe(e) {
+ var t = aRe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function nRe(e, t) {
+function aRe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -68325,7 +68421,7 @@ function nRe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function rRe(e, t, n, r, i) {
+function oRe(e, t, n, r, i) {
for (var a = (r || []).slice(), o = a.length, { start: s } = t, { end: c } = t, l = function(t) {
var r = a[t];
if (r == null) return 1;
@@ -68338,7 +68434,7 @@ function rRe(e, t, n, r, i) {
}, u = o - 1; u >= 0; u--) if (l(u)) continue;
return a;
}
-function iRe(e, t, n, r, i, a) {
+function sRe(e, t, n, r, i, a) {
var o = (r || []).slice(), s = o.length, { start: c, end: l } = t;
if (a) {
var u = r[s - 1];
@@ -68362,7 +68458,7 @@ function iRe(e, t, n, r, i, a) {
function e4(e, t, n) {
var { tick: r, ticks: i, viewBox: a, minTickGap: o, orientation: s, interval: c, tickFormatter: l, unit: u, angle: d } = e;
if (!i || !i.length || !r) return [];
- if (Z(c) || PG.isSsr) return ZLe(i, Z(c) ? c : 0) ?? [];
+ if (Z(c) || NG.isSsr) return eRe(i, Z(c) ? c : 0) ?? [];
var f = [], p = s === "top" || s === "bottom" ? "width" : "height", m = u && p === "width" ? G$(u, {
fontSize: t,
letterSpacing: n
@@ -68371,19 +68467,19 @@ function e4(e, t, n) {
height: 0
}, h = (e, r) => {
var i = typeof l == "function" ? l(e.value, r) : e.value;
- return p === "width" ? YLe(G$(i, {
+ return p === "width" ? QLe(G$(i, {
fontSize: t,
letterSpacing: n
}), m, d) : G$(i, {
fontSize: t,
letterSpacing: n
})[p];
- }, g = i[0], _ = i[1], v = i.length >= 2 && g != null && _ != null ? xB(_.coordinate - g.coordinate) : 1, y = XLe(a, v, p);
- return c === "equidistantPreserveStart" ? QLe(v, y, h, i, o) : c === "equidistantPreserveEnd" ? $Le(v, y, h, i, o) : (f = c === "preserveStart" || c === "preserveStartEnd" ? iRe(v, y, h, i, o, c === "preserveStartEnd") : rRe(v, y, h, i, o), f.filter((e) => e.isShow));
+ }, g = i[0], _ = i[1], v = i.length >= 2 && g != null && _ != null ? bB(_.coordinate - g.coordinate) : 1, y = $Le(a, v, p);
+ return c === "equidistantPreserveStart" ? tRe(v, y, h, i, o) : c === "equidistantPreserveEnd" ? nRe(v, y, h, i, o) : (f = c === "preserveStart" || c === "preserveStartEnd" ? sRe(v, y, h, i, o, c === "preserveStartEnd") : oRe(v, y, h, i, o), f.filter((e) => e.isShow));
}
//#endregion
//#region node_modules/recharts/es6/util/YAxisUtils.js
-var aRe = (e) => {
+var cRe = (e) => {
var { ticks: t, label: n, labelGapWithTick: r = 5, tickSize: i = 0, tickMargin: a = 0 } = e, o = 0;
if (t) {
Array.from(t).forEach((e) => {
@@ -68396,7 +68492,7 @@ var aRe = (e) => {
return Math.round(l);
}
return 0;
-}, t4 = iU({
+}, t4 = rU({
name: "renderedTicks",
initialState: {
xAxis: {},
@@ -68405,14 +68501,14 @@ var aRe = (e) => {
reducers: {
setRenderedTicks: (e, t) => {
var { axisType: n, axisId: r, ticks: i } = t.payload;
- e[n][r] = hG(i);
+ e[n][r] = mG(i);
},
removeRenderedTicks: (e, t) => {
var { axisType: n, axisId: r } = t.payload;
delete e[n][r];
}
}
-}), { setRenderedTicks: oRe, removeRenderedTicks: sRe } = t4.actions, cRe = t4.reducer, lRe = [
+}), { setRenderedTicks: lRe, removeRenderedTicks: uRe } = t4.actions, dRe = t4.reducer, fRe = [
"axisLine",
"width",
"height",
@@ -68422,16 +68518,16 @@ var aRe = (e) => {
"axisType",
"axisId"
];
-function uRe(e, t) {
+function pRe(e, t) {
if (e == null) return {};
- var n, r, i = dRe(e, t);
+ var n, r, i = mRe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function dRe(e, t) {
+function mRe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -68463,26 +68559,26 @@ function i4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? r4(Object(n), !0).forEach(function(t) {
- fRe(e, t, n[t]);
+ hRe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : r4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function fRe(e, t, n) {
- return (t = pRe(t)) in e ? Object.defineProperty(e, t, {
+function hRe(e, t, n) {
+ return (t = gRe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function pRe(e) {
- var t = mRe(e, "string");
+function gRe(e) {
+ var t = _Re(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function mRe(e, t) {
+function _Re(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -68514,12 +68610,12 @@ var a4 = {
tickSize: 6,
tickMargin: 2,
interval: "preserveEnd",
- zIndex: sq.axis
+ zIndex: oq.axis
};
-function hRe(e) {
+function vRe(e) {
var { x: t, y: n, width: r, height: i, orientation: a, mirror: o, axisLine: s, otherSvgProps: c } = e;
if (!s) return null;
- var l = i4(i4(i4({}, c), pz(s)), {}, { fill: "none" });
+ var l = i4(i4(i4({}, c), fz(s)), {}, { fill: "none" });
if (a === "top" || a === "bottom") {
var u = +(a === "top" && !o || a === "bottom" && o);
l = i4(i4({}, l), {}, {
@@ -68537,9 +68633,9 @@ function hRe(e) {
y2: n + i
});
}
- return /*#__PURE__*/ B.createElement("line", n4({}, l, { className: _h("recharts-cartesian-axis-line", vB(s, "className")) }));
+ return /*#__PURE__*/ B.createElement("line", n4({}, l, { className: _h("recharts-cartesian-axis-line", _B(s, "className")) }));
}
-function gRe(e, t, n, r, i, a, o, s, c) {
+function yRe(e, t, n, r, i, a, o, s, c) {
var l, u, d, f, p, m, h = s ? -1 : 1, g = e.tickSize || o, _ = Z(e.tickCoord) ? e.tickCoord : e.coordinate;
switch (a) {
case "top":
@@ -68566,14 +68662,14 @@ function gRe(e, t, n, r, i, a, o, s, c) {
}
};
}
-function _Re(e, t) {
+function bRe(e, t) {
switch (e) {
case "left": return t ? "start" : "end";
case "right": return t ? "end" : "start";
default: return "middle";
}
}
-function vRe(e, t) {
+function xRe(e, t) {
switch (e) {
case "left":
case "right": return "middle";
@@ -68581,7 +68677,7 @@ function vRe(e, t) {
default: return t ? "end" : "start";
}
}
-function yRe(e) {
+function SRe(e) {
var { option: t, tickProps: n, value: r } = e, i, a = _h(n.className, "recharts-cartesian-axis-tick-value");
if (/*#__PURE__*/ B.isValidElement(t)) i = /*#__PURE__*/ B.cloneElement(t, i4(i4({}, n), {}, { className: a }));
else if (typeof t == "function") i = t(i4(i4({}, n), {}, { className: a }));
@@ -68591,9 +68687,9 @@ function yRe(e) {
}
return i;
}
-function bRe(e) {
- var { ticks: t, axisType: n, axisId: r } = e, i = yV();
- return (0, B.useEffect)(() => r == null || n == null ? NB : (i(oRe({
+function CRe(e) {
+ var { ticks: t, axisType: n, axisId: r } = e, i = vV();
+ return (0, B.useEffect)(() => r == null || n == null ? MB : (i(lRe({
ticks: t.map((e) => ({
value: e.value,
coordinate: e.coordinate,
@@ -68603,7 +68699,7 @@ function bRe(e) {
axisId: r,
axisType: n
})), () => {
- i(sRe({
+ i(uRe({
axisId: r,
axisType: n
}));
@@ -68614,15 +68710,15 @@ function bRe(e) {
n
]), null;
}
-var xRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { ticks: n = [], tick: r, tickLine: i, stroke: a, tickFormatter: o, unit: s, padding: c, tickTextProps: l, orientation: u, mirror: d, x: f, y: p, width: m, height: h, tickSize: g, tickMargin: _, fontSize: v, letterSpacing: y, getTicksConfig: b, events: x, axisType: S, axisId: C } = e, w = e4(i4(i4({}, b), {}, { ticks: n }), v, y), T = pz(b), E = mz(r), D = i1(T.textAnchor) ? T.textAnchor : _Re(u, d), O = vRe(u, d), k = {};
+var wRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { ticks: n = [], tick: r, tickLine: i, stroke: a, tickFormatter: o, unit: s, padding: c, tickTextProps: l, orientation: u, mirror: d, x: f, y: p, width: m, height: h, tickSize: g, tickMargin: _, fontSize: v, letterSpacing: y, getTicksConfig: b, events: x, axisType: S, axisId: C } = e, w = e4(i4(i4({}, b), {}, { ticks: n }), v, y), T = fz(b), E = pz(r), D = i1(T.textAnchor) ? T.textAnchor : bRe(u, d), O = xRe(u, d), k = {};
typeof i == "object" && (k = i);
- var A = i4(i4({}, T), {}, { fill: "none" }, k), j = w.map((e) => i4({ entry: e }, gRe(e, f, p, m, h, u, g, d, _))), M = j.map((e) => {
+ var A = i4(i4({}, T), {}, { fill: "none" }, k), j = w.map((e) => i4({ entry: e }, yRe(e, f, p, m, h, u, g, d, _))), M = j.map((e) => {
var { entry: t, line: n } = e;
- return /*#__PURE__*/ B.createElement(yz, {
+ return /*#__PURE__*/ B.createElement(vz, {
className: "recharts-cartesian-axis-tick",
key: `tick-${t.value}-${t.coordinate}-${t.tickCoord}`
- }, i && /*#__PURE__*/ B.createElement("line", n4({}, A, n, { className: _h("recharts-cartesian-axis-tick-line", vB(i, "className")) })));
+ }, i && /*#__PURE__*/ B.createElement("line", n4({}, A, n, { className: _h("recharts-cartesian-axis-tick-line", _B(i, "className")) })));
}), N = j.map((e, t) => {
var { entry: n, tick: i } = e, u = i4(i4({}, i4(i4(i4(i4({ verticalAnchor: O }, T), {}, {
textAnchor: D,
@@ -68635,26 +68731,26 @@ var xRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
tickFormatter: o,
padding: c
}, l), {}, { angle: l?.angle ?? T.angle ?? 0 })), E);
- return /*#__PURE__*/ B.createElement(yz, n4({
+ return /*#__PURE__*/ B.createElement(vz, n4({
className: "recharts-cartesian-axis-tick-label",
key: `tick-label-${n.value}-${n.coordinate}-${n.tickCoord}`
- }, VB(x, n, t)), r && /*#__PURE__*/ B.createElement(yRe, {
+ }, BB(x, n, t)), r && /*#__PURE__*/ B.createElement(SRe, {
option: r,
tickProps: u,
value: `${typeof o == "function" ? o(n.value, t) : n.value}${s || ""}`
}));
});
- return /*#__PURE__*/ B.createElement("g", { className: `recharts-cartesian-axis-ticks recharts-${S}-ticks` }, /*#__PURE__*/ B.createElement(bRe, {
+ return /*#__PURE__*/ B.createElement("g", { className: `recharts-cartesian-axis-ticks recharts-${S}-ticks` }, /*#__PURE__*/ B.createElement(CRe, {
ticks: w,
axisId: C,
axisType: S
- }), N.length > 0 && /*#__PURE__*/ B.createElement(S$, { zIndex: sq.label }, /*#__PURE__*/ B.createElement("g", {
+ }), N.length > 0 && /*#__PURE__*/ B.createElement(S$, { zIndex: oq.label }, /*#__PURE__*/ B.createElement("g", {
className: `recharts-cartesian-axis-tick-labels recharts-${S}-tick-labels`,
ref: t
}, N)), M.length > 0 && /*#__PURE__*/ B.createElement("g", { className: `recharts-cartesian-axis-tick-lines recharts-${S}-tick-lines` }, M));
-}), SRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { axisLine: n, width: r, height: i, className: a, hide: o, ticks: s, axisType: c, axisId: l } = e, u = uRe(e, lRe), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = (0, B.useRef)(null);
- (0, B.useImperativeHandle)(t, () => ({ getCalculatedWidth: () => aRe({
+}), TRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { axisLine: n, width: r, height: i, className: a, hide: o, ticks: s, axisType: c, axisId: l } = e, u = pRe(e, fRe), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = (0, B.useRef)(null);
+ (0, B.useImperativeHandle)(t, () => ({ getCalculatedWidth: () => cRe({
ticks: h.current,
label: e.labelRef?.current,
labelGapWithTick: 5,
@@ -68672,7 +68768,7 @@ var xRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
}
}
}, [d, p]);
- return o || r != null && r <= 0 || i != null && i <= 0 ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(yz, { className: _h("recharts-cartesian-axis", a) }, /*#__PURE__*/ B.createElement(hRe, {
+ return o || r != null && r <= 0 || i != null && i <= 0 ? null : /*#__PURE__*/ B.createElement(S$, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(vz, { className: _h("recharts-cartesian-axis", a) }, /*#__PURE__*/ B.createElement(vRe, {
x: e.x,
y: e.y,
width: r,
@@ -68680,8 +68776,8 @@ var xRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
orientation: e.orientation,
mirror: e.mirror,
axisLine: n,
- otherSvgProps: pz(e)
- }), /*#__PURE__*/ B.createElement(xRe, {
+ otherSvgProps: fz(e)
+ }), /*#__PURE__*/ B.createElement(wRe, {
ref: g,
axisType: c,
events: u,
@@ -68717,19 +68813,19 @@ var xRe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
labelRef: e.labelRef
}), e.children)));
}), o4 = /*#__PURE__*/ B.forwardRef((e, t) => {
- var n = UB(e, a4);
- return /*#__PURE__*/ B.createElement(SRe, n4({}, n, { ref: t }));
+ var n = HB(e, a4);
+ return /*#__PURE__*/ B.createElement(TRe, n4({}, n, { ref: t }));
});
o4.displayName = "CartesianAxis";
//#endregion
//#region node_modules/recharts/es6/cartesian/CartesianGrid.js
-var CRe = [
+var ERe = [
"x1",
"y1",
"x2",
"y2",
"key"
-], wRe = ["offset"], TRe = ["xAxisId", "yAxisId"], ERe = ["xAxisId", "yAxisId"];
+], DRe = ["offset"], ORe = ["xAxisId", "yAxisId"], kRe = ["xAxisId", "yAxisId"];
function s4(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -68744,26 +68840,26 @@ function c4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? s4(Object(n), !0).forEach(function(t) {
- DRe(e, t, n[t]);
+ ARe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : s4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function DRe(e, t, n) {
- return (t = ORe(t)) in e ? Object.defineProperty(e, t, {
+function ARe(e, t, n) {
+ return (t = jRe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function ORe(e) {
- var t = kRe(e, "string");
+function jRe(e) {
+ var t = MRe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function kRe(e, t) {
+function MRe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -68784,14 +68880,14 @@ function l4() {
}
function u4(e, t) {
if (e == null) return {};
- var n, r, i = ARe(e, t);
+ var n, r, i = NRe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function ARe(e, t) {
+function NRe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -68800,7 +68896,7 @@ function ARe(e, t) {
}
return n;
}
-var jRe = (e) => {
+var PRe = (e) => {
var { fill: t } = e;
if (!t || t === "none") return null;
var { fillOpacity: n, x: r, y: i, width: a, height: o, ry: s } = e;
@@ -68821,7 +68917,7 @@ function d4(e) {
if (/*#__PURE__*/ B.isValidElement(t)) r = /*#__PURE__*/ B.cloneElement(t, n);
else if (typeof t == "function") r = t(n);
else {
- var { x1: i, y1: a, x2: o, y2: s, key: c } = n, l = pz(u4(n, CRe)) ?? {}, { offset: u } = l, d = u4(l, wRe);
+ var { x1: i, y1: a, x2: o, y2: s, key: c } = n, l = fz(u4(n, ERe)) ?? {}, { offset: u } = l, d = u4(l, DRe);
r = /*#__PURE__*/ B.createElement("line", l4({}, d, {
x1: i,
y1: a,
@@ -68833,10 +68929,10 @@ function d4(e) {
}
return r;
}
-function MRe(e) {
+function FRe(e) {
var { x: t, width: n, horizontal: r = !0, horizontalPoints: i } = e;
if (!r || !i || !i.length) return null;
- var { xAxisId: a, yAxisId: o } = e, s = u4(e, TRe), c = i.map((e, i) => {
+ var { xAxisId: a, yAxisId: o } = e, s = u4(e, ORe), c = i.map((e, i) => {
var a = c4(c4({}, s), {}, {
x1: t,
y1: e,
@@ -68853,10 +68949,10 @@ function MRe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid-horizontal" }, c);
}
-function NRe(e) {
+function IRe(e) {
var { y: t, height: n, vertical: r = !0, verticalPoints: i } = e;
if (!r || !i || !i.length) return null;
- var { xAxisId: a, yAxisId: o } = e, s = u4(e, ERe), c = i.map((e, i) => {
+ var { xAxisId: a, yAxisId: o } = e, s = u4(e, kRe), c = i.map((e, i) => {
var a = c4(c4({}, s), {}, {
x1: e,
y1: t,
@@ -68873,7 +68969,7 @@ function NRe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid-vertical" }, c);
}
-function PRe(e) {
+function LRe(e) {
var { horizontalFill: t, fillOpacity: n, x: r, y: i, width: a, height: o, horizontalPoints: s, horizontal: c = !0 } = e;
if (!c || !t || !t.length || s == null) return null;
var l = s.map((e) => Math.round(e + i - i)).sort((e, t) => e - t);
@@ -68896,7 +68992,7 @@ function PRe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-gridstripes-horizontal" }, u);
}
-function FRe(e) {
+function RRe(e) {
var { vertical: t = !0, verticalFill: n, fillOpacity: r, x: i, y: a, width: o, height: s, verticalPoints: c } = e;
if (!t || !n || !n.length) return null;
var l = c.map((e) => Math.round(e + i - i)).sort((e, t) => e - t);
@@ -68919,10 +69015,10 @@ function FRe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-gridstripes-vertical" }, u);
}
-var IRe = (e, t) => {
+var zRe = (e, t) => {
var { xAxis: n, width: r, height: i, offset: a } = e;
- return zU(e4(c4(c4(c4({}, a4), n), {}, {
- ticks: BU(n, !0),
+ return RU(e4(c4(c4(c4({}, a4), n), {}, {
+ ticks: zU(n, !0),
viewBox: {
x: 0,
y: 0,
@@ -68930,10 +69026,10 @@ var IRe = (e, t) => {
height: i
}
})), a.left, a.left + a.width, t);
-}, LRe = (e, t) => {
+}, BRe = (e, t) => {
var { yAxis: n, width: r, height: i, offset: a } = e;
- return zU(e4(c4(c4(c4({}, a4), n), {}, {
- ticks: BU(n, !0),
+ return RU(e4(c4(c4(c4({}, a4), n), {}, {
+ ticks: zU(n, !0),
viewBox: {
x: 0,
y: 0,
@@ -68941,7 +69037,7 @@ var IRe = (e, t) => {
height: i
}
})), a.top, a.top + a.height, t);
-}, RRe = {
+}, VRe = {
horizontal: !0,
vertical: !0,
horizontalPoints: [],
@@ -68953,17 +69049,17 @@ var IRe = (e, t) => {
xAxisId: 0,
yAxisId: 0,
syncWithTicks: !1,
- zIndex: sq.grid
+ zIndex: oq.grid
};
function f4(e) {
- var t = SW(), n = CW(), r = xW(), i = c4(c4({}, UB(e, RRe)), {}, {
+ var t = xW(), n = SW(), r = bW(), i = c4(c4({}, HB(e, VRe)), {}, {
x: Z(e.x) ? e.x : r.left,
y: Z(e.y) ? e.y : r.top,
width: Z(e.width) ? e.width : r.width,
height: Z(e.height) ? e.height : r.height
- }), { xAxisId: a, yAxisId: o, x: s, y: c, width: l, height: u, syncWithTicks: d, horizontalValues: f, verticalValues: p } = i, m = oW(), h = Q((e) => uQ(e, "xAxis", a, m)), g = Q((e) => uQ(e, "yAxis", o, m));
- if (!PU(l) || !PU(u) || !Z(s) || !Z(c)) return null;
- var _ = i.verticalCoordinatesGenerator || IRe, v = i.horizontalCoordinatesGenerator || LRe, { horizontalPoints: y, verticalPoints: b } = i;
+ }), { xAxisId: a, yAxisId: o, x: s, y: c, width: l, height: u, syncWithTicks: d, horizontalValues: f, verticalValues: p } = i, m = aW(), h = Q((e) => uQ(e, "xAxis", a, m)), g = Q((e) => uQ(e, "yAxis", o, m));
+ if (!NU(l) || !NU(u) || !Z(s) || !Z(c)) return null;
+ var _ = i.verticalCoordinatesGenerator || zRe, v = i.horizontalCoordinatesGenerator || BRe, { horizontalPoints: y, verticalPoints: b } = i;
if ((!y || !y.length) && typeof v == "function") {
var x = f && f.length, S = v({
yAxis: g ? c4(c4({}, g), {}, { ticks: x ? f : g.ticks }) : void 0,
@@ -68971,7 +69067,7 @@ function f4(e) {
height: n ?? u,
offset: r
}, x ? !0 : d);
- lW(Array.isArray(S), `horizontalCoordinatesGenerator should return Array but instead it returned [${typeof S}]`), Array.isArray(S) && (y = S);
+ cW(Array.isArray(S), `horizontalCoordinatesGenerator should return Array but instead it returned [${typeof S}]`), Array.isArray(S) && (y = S);
}
if ((!b || !b.length) && typeof _ == "function") {
var C = p && p.length, w = _({
@@ -68980,9 +69076,9 @@ function f4(e) {
height: n ?? u,
offset: r
}, C ? !0 : d);
- lW(Array.isArray(w), `verticalCoordinatesGenerator should return Array but instead it returned [${typeof w}]`), Array.isArray(w) && (b = w);
+ cW(Array.isArray(w), `verticalCoordinatesGenerator should return Array but instead it returned [${typeof w}]`), Array.isArray(w) && (b = w);
}
- return /*#__PURE__*/ B.createElement(S$, { zIndex: i.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid" }, /*#__PURE__*/ B.createElement(jRe, {
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: i.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid" }, /*#__PURE__*/ B.createElement(PRe, {
fill: i.fill,
fillOpacity: i.fillOpacity,
x: i.x,
@@ -68990,12 +69086,12 @@ function f4(e) {
width: i.width,
height: i.height,
ry: i.ry
- }), /*#__PURE__*/ B.createElement(PRe, l4({}, i, { horizontalPoints: y })), /*#__PURE__*/ B.createElement(FRe, l4({}, i, { verticalPoints: b })), /*#__PURE__*/ B.createElement(MRe, l4({}, i, {
+ }), /*#__PURE__*/ B.createElement(LRe, l4({}, i, { horizontalPoints: y })), /*#__PURE__*/ B.createElement(RRe, l4({}, i, { verticalPoints: b })), /*#__PURE__*/ B.createElement(FRe, l4({}, i, {
offset: r,
horizontalPoints: y,
xAxis: h,
yAxis: g
- })), /*#__PURE__*/ B.createElement(NRe, l4({}, i, {
+ })), /*#__PURE__*/ B.createElement(IRe, l4({}, i, {
offset: r,
verticalPoints: b,
xAxis: h,
@@ -69005,7 +69101,7 @@ function f4(e) {
f4.displayName = "CartesianGrid";
//#endregion
//#region node_modules/recharts/es6/state/errorBarSlice.js
-var p4 = iU({
+var p4 = rU({
name: "errorBars",
initialState: {},
reducers: {
@@ -69022,17 +69118,17 @@ var p4 = iU({
e[n] && (e[n] = e[n].filter((e) => e.dataKey !== r.dataKey || e.direction !== r.direction));
}
}
-}), { addErrorBar: zRe, replaceErrorBar: BRe, removeErrorBar: VRe } = p4.actions, HRe = p4.reducer, URe = ["children"];
-function WRe(e, t) {
+}), { addErrorBar: HRe, replaceErrorBar: URe, removeErrorBar: WRe } = p4.actions, GRe = p4.reducer, KRe = ["children"];
+function qRe(e, t) {
if (e == null) return {};
- var n, r, i = GRe(e, t);
+ var n, r, i = JRe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function GRe(e, t) {
+function JRe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -69041,7 +69137,7 @@ function GRe(e, t) {
}
return n;
}
-var KRe = /*#__PURE__*/ (0, B.createContext)({
+var YRe = /*#__PURE__*/ (0, B.createContext)({
data: [],
xAxisId: "xAxis-0",
yAxisId: "yAxis-0",
@@ -69053,8 +69149,8 @@ var KRe = /*#__PURE__*/ (0, B.createContext)({
errorBarOffset: 0
});
function m4(e) {
- var { children: t } = e, n = WRe(e, URe);
- return /*#__PURE__*/ B.createElement(KRe.Provider, { value: n }, t);
+ var { children: t } = e, n = qRe(e, KRe);
+ return /*#__PURE__*/ B.createElement(YRe.Provider, { value: n }, t);
}
//#endregion
//#region node_modules/recharts/es6/cartesian/GraphicalItemClipPath.js
@@ -69079,30 +69175,30 @@ function g4(e) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/lineSelectors.js
-var _4 = (e, t, n, r) => hQ(e, "xAxis", t, r), v4 = (e, t, n, r) => mQ(e, "xAxis", t, r), y4 = (e, t, n, r) => hQ(e, "yAxis", n, r), b4 = (e, t, n, r) => mQ(e, "yAxis", n, r), qRe = $([
- wW,
+var _4 = (e, t, n, r) => hQ(e, "xAxis", t, r), v4 = (e, t, n, r) => mQ(e, "xAxis", t, r), y4 = (e, t, n, r) => hQ(e, "yAxis", n, r), b4 = (e, t, n, r) => mQ(e, "yAxis", n, r), XRe = $([
+ CW,
_4,
y4,
v4,
b4
-], (e, t, n, r, i) => RU(e, "xAxis") ? JU(t, r, !1) : JU(n, i, !1)), JRe = (e, t, n, r, i) => i;
-function YRe(e) {
+], (e, t, n, r, i) => LU(e, "xAxis") ? qU(t, r, !1) : qU(n, i, !1)), ZRe = (e, t, n, r, i) => i;
+function QRe(e) {
return e.type === "line";
}
-var XRe = $([
- wW,
+var $Re = $([
+ CW,
_4,
y4,
v4,
b4,
- $([lZ, JRe], (e, t) => e.filter(YRe).find((e) => e.id === t)),
- qRe,
- LK
+ $([lZ, ZRe], (e, t) => e.filter(QRe).find((e) => e.id === t)),
+ XRe,
+ IK
], (e, t, n, r, i, a, o, s) => {
var { chartData: c, dataStartIndex: l, dataEndIndex: u } = s;
if (!(a == null || t == null || n == null || r == null || i == null || r.length === 0 || i.length === 0 || o == null || e !== "horizontal" && e !== "vertical")) {
var { dataKey: d, data: f } = a, p = f != null && f.length > 0 ? f : c?.slice(l, u + 1);
- if (p != null) return gze({
+ if (p != null) return yze({
layout: e,
xAxis: t,
yAxis: n,
@@ -69117,7 +69213,7 @@ var XRe = $([
//#endregion
//#region node_modules/recharts/es6/util/getRadiusAndStrokeWidthFromDot.js
function x4(e) {
- var t = mz(e), n = 3, r = 2;
+ var t = pz(e), n = 3, r = 2;
if (t != null) {
var { r: i, strokeWidth: a } = t, o = Number(i), s = Number(a);
return (Number.isNaN(o) || o < 0) && (o = n), (Number.isNaN(s) || s < 0) && (s = r), {
@@ -69132,13 +69228,13 @@ function x4(e) {
}
//#endregion
//#region node_modules/recharts/es6/cartesian/Line.js
-var ZRe = ["id"], QRe = [
+var eze = ["id"], tze = [
"type",
"layout",
"connectNulls",
"needClip",
"shape"
-], $Re = [
+], nze = [
"activeDot",
"animateNewValues",
"animationBegin",
@@ -69177,26 +69273,26 @@ function w4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? C4(Object(n), !0).forEach(function(t) {
- eze(e, t, n[t]);
+ rze(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : C4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function eze(e, t, n) {
- return (t = tze(t)) in e ? Object.defineProperty(e, t, {
+function rze(e, t, n) {
+ return (t = ize(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function tze(e) {
- var t = nze(e, "string");
+function ize(e) {
+ var t = aze(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function nze(e, t) {
+function aze(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69208,14 +69304,14 @@ function nze(e, t) {
}
function T4(e, t) {
if (e == null) return {};
- var n, r, i = rze(e, t);
+ var n, r, i = oze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function rze(e, t) {
+function oze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -69224,27 +69320,27 @@ function rze(e, t) {
}
return n;
}
-var ize = (e) => {
+var sze = (e) => {
var { dataKey: t, name: n, stroke: r, legendType: i, hide: a } = e;
return [{
inactive: a,
dataKey: t,
type: i,
color: r,
- value: XU(n, t),
+ value: YU(n, t),
payload: e
}];
-}, aze = /*#__PURE__*/ B.memo((e) => {
+}, cze = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, data: n, stroke: r, strokeWidth: i, fill: a, name: o, hide: s, unit: c, tooltipType: l, id: u } = e, d = {
dataDefinedOnItem: n,
- getPosition: NB,
+ getPosition: MB,
settings: {
stroke: r,
strokeWidth: i,
fill: a,
dataKey: t,
nameKey: void 0,
- name: XU(o, t),
+ name: YU(o, t),
hide: s,
type: l,
color: r,
@@ -69254,11 +69350,11 @@ var ize = (e) => {
};
return /*#__PURE__*/ B.createElement(I0, { tooltipEntrySettings: d });
}), E4 = (e, t) => `${t}px ${e}px`;
-function oze(e, t) {
+function lze(e, t) {
for (var n = e.length % 2 == 0 ? e : [...e, 0], r = [], i = 0; i < t; ++i) r.push(...n);
return r;
}
-var sze = (e, t, n) => {
+var uze = (e, t, n) => {
var r = n.reduce((e, t) => e + t, 0);
if (!r) return E4(t, e);
for (var i = Math.floor(e / r), a = e % r, o = [], s = 0, c = 0; s < n.length; c += (l = n[s]) ?? 0, ++s) {
@@ -69270,13 +69366,13 @@ var sze = (e, t, n) => {
}
var d = o.length % 2 == 0 ? [0, t] : [t];
return [
- ...oze(n, i),
+ ...lze(n, i),
...o,
...d
].map((e) => `${e}px`).join(", ");
};
-function cze(e) {
- var { clipPathId: t, points: n, props: r } = e, { dot: i, dataKey: a, needClip: o } = r, { id: s } = r, c = pz(T4(r, ZRe));
+function dze(e) {
+ var { clipPathId: t, points: n, props: r } = e, { dot: i, dataKey: a, needClip: o } = r, { id: s } = r, c = fz(T4(r, eze));
return /*#__PURE__*/ B.createElement(K0, {
points: n,
dot: i,
@@ -69288,7 +69384,7 @@ function cze(e) {
clipPathId: t
});
}
-function lze(e) {
+function fze(e) {
var { showLabels: t, children: n, points: r } = e, i = (0, B.useMemo)(() => r?.map((e) => {
var t = {
x: e.x ?? 0,
@@ -69309,7 +69405,7 @@ function lze(e) {
return /*#__PURE__*/ B.createElement(A1, { value: t ? i : void 0 }, n);
}
function D4(e) {
- var { clipPathId: t, pathRef: n, points: r, strokeDasharray: i, props: a } = e, { type: o, layout: s, connectNulls: c, needClip: l, shape: u } = a, d = w4(w4({}, hz(T4(a, QRe))), {}, {
+ var { clipPathId: t, pathRef: n, points: r, strokeDasharray: i, props: a } = e, { type: o, layout: s, connectNulls: c, needClip: l, shape: u } = a, d = w4(w4({}, mz(T4(a, tze))), {}, {
fill: "none",
className: "recharts-line-curve",
clipPath: l ? `url(#clipPath-${t})` : void 0,
@@ -69322,31 +69418,31 @@ function D4(e) {
return /*#__PURE__*/ B.createElement(B.Fragment, null, r?.length > 1 && /*#__PURE__*/ B.createElement(M0, S4({
shapeType: "curve",
option: u
- }, d, { pathRef: n })), /*#__PURE__*/ B.createElement(cze, {
+ }, d, { pathRef: n })), /*#__PURE__*/ B.createElement(dze, {
points: r,
clipPathId: t,
props: a
}));
}
-function uze(e) {
+function pze(e) {
try {
return e && e.getTotalLength && e.getTotalLength() || 0;
} catch {
return 0;
}
}
-function dze(e) {
- var { clipPathId: t, props: n, pathRef: r, previousPointsRef: i, longestAnimatedLengthRef: a } = e, { points: o, strokeDasharray: s, isAnimationActive: c, animationBegin: l, animationDuration: u, animationEasing: d, animateNewValues: f, width: p, height: m, onAnimationEnd: h, onAnimationStart: g } = n, _ = i.current, v = pK(o, "recharts-line-"), y = (0, B.useRef)(v), [b, x] = (0, B.useState)(!1), S = !b, C = (0, B.useCallback)(() => {
+function mze(e) {
+ var { clipPathId: t, props: n, pathRef: r, previousPointsRef: i, longestAnimatedLengthRef: a } = e, { points: o, strokeDasharray: s, isAnimationActive: c, animationBegin: l, animationDuration: u, animationEasing: d, animateNewValues: f, width: p, height: m, onAnimationEnd: h, onAnimationStart: g } = n, _ = i.current, v = fK(o, "recharts-line-"), y = (0, B.useRef)(v), [b, x] = (0, B.useState)(!1), S = !b, C = (0, B.useCallback)(() => {
typeof h == "function" && h(), x(!1);
}, [h]), w = (0, B.useCallback)(() => {
typeof g == "function" && g(), x(!0);
- }, [g]), T = uze(r.current), E = (0, B.useRef)(0);
+ }, [g]), T = pze(r.current), E = (0, B.useRef)(0);
y.current !== v && (E.current = a.current, y.current = v);
var D = E.current;
- return /*#__PURE__*/ B.createElement(lze, {
+ return /*#__PURE__*/ B.createElement(fze, {
points: o,
showLabels: S
- }, n.children, /*#__PURE__*/ B.createElement(fK, {
+ }, n.children, /*#__PURE__*/ B.createElement(dK, {
animationId: v,
begin: l,
duration: u,
@@ -69356,20 +69452,20 @@ function dze(e) {
onAnimationStart: w,
key: v
}, (e) => {
- var l = OB(D, T + D, e), u = Math.min(l, T), d = c ? s ? sze(u, T, `${s}`.split(/[,\s]+/gim).map((e) => parseFloat(e))) : E4(T, u) : s == null ? void 0 : String(s);
+ var l = DB(D, T + D, e), u = Math.min(l, T), d = c ? s ? uze(u, T, `${s}`.split(/[,\s]+/gim).map((e) => parseFloat(e))) : E4(T, u) : s == null ? void 0 : String(s);
if (e > 0 && T > 0 && (i.current = o, a.current = Math.max(a.current, u)), _) {
var h = _.length / o.length, g = e === 1 ? o : o.map((t, n) => {
var r = Math.floor(n * h);
if (_[r]) {
var i = _[r];
return w4(w4({}, t), {}, {
- x: OB(i.x, t.x, e),
- y: OB(i.y, t.y, e)
+ x: DB(i.x, t.x, e),
+ y: DB(i.y, t.y, e)
});
}
return f ? w4(w4({}, t), {}, {
- x: OB(p * 2, t.x, e),
- y: OB(m / 2, t.y, e)
+ x: DB(p * 2, t.x, e),
+ y: DB(m / 2, t.y, e)
}) : w4(w4({}, t), {}, {
x: t.x,
y: t.y
@@ -69392,9 +69488,9 @@ function dze(e) {
});
}), /*#__PURE__*/ B.createElement(N1, { label: n.label }));
}
-function fze(e) {
+function hze(e) {
var { clipPathId: t, props: n } = e, r = (0, B.useRef)(null), i = (0, B.useRef)(0), a = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(dze, {
+ return /*#__PURE__*/ B.createElement(mze, {
props: n,
clipPathId: t,
previousPointsRef: r,
@@ -69402,17 +69498,17 @@ function fze(e) {
pathRef: a
});
}
-var pze = (e, t) => ({
+var gze = (e, t) => ({
x: e.x ?? void 0,
y: e.y ?? void 0,
value: e.value,
- errorVal: LU(e.payload, t)
-}), mze = class extends B.Component {
+ errorVal: IU(e.payload, t)
+}), _ze = class extends B.Component {
render() {
var { hide: e, dot: t, points: n, className: r, xAxisId: i, yAxisId: a, top: o, left: s, width: c, height: l, id: u, needClip: d, zIndex: f } = this.props;
if (e) return null;
var p = _h("recharts-line", r), m = u, { r: h, strokeWidth: g } = x4(t), _ = C0(t), v = h * 2 + g, y = d ? `url(#clipPath-${_ ? "" : "dots-"}${m})` : void 0;
- return /*#__PURE__*/ B.createElement(S$, { zIndex: f }, /*#__PURE__*/ B.createElement(yz, { className: p }, d && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(g4, {
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: f }, /*#__PURE__*/ B.createElement(vz, { className: p }, d && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(g4, {
clipPathId: m,
xAxisId: i,
yAxisId: a
@@ -69425,9 +69521,9 @@ var pze = (e, t) => ({
xAxisId: i,
yAxisId: a,
data: n,
- dataPointFormatter: pze,
+ dataPointFormatter: gze,
errorBarOffset: 0
- }, /*#__PURE__*/ B.createElement(fze, {
+ }, /*#__PURE__*/ B.createElement(hze, {
props: this.props,
clipPathId: m
}))), /*#__PURE__*/ B.createElement($0, {
@@ -69455,14 +69551,14 @@ var pze = (e, t) => ({
strokeWidth: 1,
xAxisId: 0,
yAxisId: 0,
- zIndex: sq.line,
+ zIndex: oq.line,
type: "linear"
};
-function hze(e) {
- var t = UB(e, O4), { activeDot: n, animateNewValues: r, animationBegin: i, animationDuration: a, animationEasing: o, connectNulls: s, dot: c, hide: l, isAnimationActive: u, label: d, legendType: f, xAxisId: p, yAxisId: m, id: h } = t, g = T4(t, $Re), { needClip: _ } = h4(p, m), v = X0(), y = TW(), b = oW(), x = Q((e) => XRe(e, p, m, b, h));
+function vze(e) {
+ var t = HB(e, O4), { activeDot: n, animateNewValues: r, animationBegin: i, animationDuration: a, animationEasing: o, connectNulls: s, dot: c, hide: l, isAnimationActive: u, label: d, legendType: f, xAxisId: p, yAxisId: m, id: h } = t, g = T4(t, nze), { needClip: _ } = h4(p, m), v = X0(), y = wW(), b = aW(), x = Q((e) => $Re(e, p, m, b, h));
if (y !== "horizontal" && y !== "vertical" || x == null || v == null) return null;
var { height: S, width: C, x: w, y: T } = v;
- return /*#__PURE__*/ B.createElement(mze, S4({}, g, {
+ return /*#__PURE__*/ B.createElement(_ze, S4({}, g, {
id: h,
connectNulls: s,
dot: c,
@@ -69486,23 +69582,23 @@ function hze(e) {
needClip: _
}));
}
-function gze(e) {
+function yze(e) {
var { layout: t, xAxis: n, yAxis: r, xAxisTicks: i, yAxisTicks: a, dataKey: o, bandSize: s, displayedData: c } = e;
return c.map((e, c) => {
- var l = LU(e, o);
+ var l = IU(e, o);
if (t === "horizontal") return {
- x: UU({
+ x: HU({
axis: n,
ticks: i,
bandSize: s,
entry: e,
index: c
}),
- y: (AB(l) ? null : r.scale.map(l)) ?? null,
+ y: (kB(l) ? null : r.scale.map(l)) ?? null,
value: l,
payload: e
};
- var u = AB(l) ? null : n.scale.map(l), d = UU({
+ var u = kB(l) ? null : n.scale.map(l), d = HU({
axis: r,
ticks: a,
bandSize: s,
@@ -69517,12 +69613,12 @@ function gze(e) {
};
}).filter(Boolean);
}
-function _ze(e) {
- var t = UB(e, O4), n = oW();
+function bze(e) {
+ var t = HB(e, O4), n = aW();
return /*#__PURE__*/ B.createElement(z0, {
id: t.id,
type: "line"
- }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(L0, { legendPayload: ize(t) }), /*#__PURE__*/ B.createElement(aze, {
+ }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(L0, { legendPayload: sze(t) }), /*#__PURE__*/ B.createElement(cze, {
dataKey: t.dataKey,
data: t.data,
stroke: t.stroke,
@@ -69543,9 +69639,9 @@ function _ze(e) {
dataKey: t.dataKey,
hide: t.hide,
isPanorama: n
- }), /*#__PURE__*/ B.createElement(hze, S4({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(vze, S4({}, t, { id: e }))));
}
-var k4 = /*#__PURE__*/ B.memo(_ze, CG);
+var k4 = /*#__PURE__*/ B.memo(bze, SG);
k4.displayName = "Line";
//#endregion
//#region node_modules/recharts/es6/state/selectors/graphicalItemSelectors.js
@@ -69557,36 +69653,36 @@ function j4(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/areaSelectors.js
-var M4 = (e, t, n) => hQ(e, "xAxis", A4(e, t), n), N4 = (e, t, n) => mQ(e, "xAxis", A4(e, t), n), P4 = (e, t, n) => hQ(e, "yAxis", j4(e, t), n), F4 = (e, t, n) => mQ(e, "yAxis", j4(e, t), n), vze = $([
- wW,
+var M4 = (e, t, n) => hQ(e, "xAxis", A4(e, t), n), N4 = (e, t, n) => mQ(e, "xAxis", A4(e, t), n), P4 = (e, t, n) => hQ(e, "yAxis", j4(e, t), n), F4 = (e, t, n) => mQ(e, "yAxis", j4(e, t), n), xze = $([
+ CW,
M4,
P4,
N4,
F4
-], (e, t, n, r, i) => RU(e, "xAxis") ? JU(t, r, !1) : JU(n, i, !1)), I4 = $([lZ, (e, t) => t], (e, t) => e.filter((e) => e.type === "area").find((e) => e.id === t)), L4 = (e) => RU(wW(e), "xAxis") ? "yAxis" : "xAxis", yze = (e, t) => L4(e) === "yAxis" ? j4(e, t) : A4(e, t), bze = $([
- wW,
+], (e, t, n, r, i) => LU(e, "xAxis") ? qU(t, r, !1) : qU(n, i, !1)), I4 = $([lZ, (e, t) => t], (e, t) => e.filter((e) => e.type === "area").find((e) => e.id === t)), L4 = (e) => LU(CW(e), "xAxis") ? "yAxis" : "xAxis", Sze = (e, t) => L4(e) === "yAxis" ? j4(e, t) : A4(e, t), Cze = $([
+ CW,
M4,
P4,
N4,
F4,
- $([I4, (e, t, n) => EZ(e, L4(e), yze(e, t), n)], (e, t) => {
+ $([I4, (e, t, n) => EZ(e, L4(e), Sze(e, t), n)], (e, t) => {
if (e != null && t != null) {
- var { stackId: n } = e, r = Dq(e);
+ var { stackId: n } = e, r = Eq(e);
if (n != null && r != null) {
var i = (t[n]?.stackedData)?.find((e) => e.key === r);
if (i != null) return i.map((e) => [e[0], e[1]]);
}
}
}),
- RK,
- vze,
+ LK,
+ xze,
I4,
- RDe
+ HDe
], (e, t, n, r, i, a, o, s, c, l) => {
var { chartData: u, dataStartIndex: d, dataEndIndex: f } = o;
if (!(c == null || e !== "horizontal" && e !== "vertical" || t == null || n == null || r == null || i == null || r.length === 0 || i.length === 0 || s == null)) {
var { data: p } = c, m = p && p.length > 0 ? p : u?.slice(d, f + 1);
- if (m != null) return Bze({
+ if (m != null) return Uze({
layout: e,
xAxis: t,
yAxis: n,
@@ -69600,7 +69696,7 @@ var M4 = (e, t, n) => hQ(e, "xAxis", A4(e, t), n), N4 = (e, t, n) => mQ(e, "xAxi
bandSize: s
});
}
-}), xze = ["id"], Sze = [
+}), wze = ["id"], Tze = [
"activeDot",
"animationBegin",
"animationDuration",
@@ -69627,14 +69723,14 @@ function R4() {
}
function z4(e, t) {
if (e == null) return {};
- var n, r, i = Cze(e, t);
+ var n, r, i = Eze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function Cze(e, t) {
+function Eze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -69657,26 +69753,26 @@ function V4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? B4(Object(n), !0).forEach(function(t) {
- wze(e, t, n[t]);
+ Dze(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : B4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function wze(e, t, n) {
- return (t = Tze(t)) in e ? Object.defineProperty(e, t, {
+function Dze(e, t, n) {
+ return (t = Oze(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Tze(e) {
- var t = Eze(e, "string");
+function Oze(e) {
+ var t = kze(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Eze(e, t) {
+function kze(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69689,27 +69785,27 @@ function Eze(e, t) {
function H4(e, t) {
return e && e !== "none" ? e : t;
}
-var Dze = (e) => {
+var Aze = (e) => {
var { dataKey: t, name: n, stroke: r, fill: i, legendType: a, hide: o } = e;
return [{
inactive: o,
dataKey: t,
type: a,
color: H4(r, i),
- value: XU(n, t),
+ value: YU(n, t),
payload: e
}];
-}, Oze = /*#__PURE__*/ B.memo((e) => {
+}, jze = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, data: n, stroke: r, strokeWidth: i, fill: a, name: o, hide: s, unit: c, tooltipType: l, id: u } = e, d = {
dataDefinedOnItem: n,
- getPosition: NB,
+ getPosition: MB,
settings: {
stroke: r,
strokeWidth: i,
fill: a,
dataKey: t,
nameKey: void 0,
- name: XU(o, t),
+ name: YU(o, t),
hide: s,
type: l,
color: H4(r, a),
@@ -69719,8 +69815,8 @@ var Dze = (e) => {
};
return /*#__PURE__*/ B.createElement(I0, { tooltipEntrySettings: d });
});
-function kze(e) {
- var { clipPathId: t, points: n, props: r } = e, { needClip: i, dot: a, dataKey: o } = r, s = pz(r);
+function Mze(e) {
+ var { clipPathId: t, points: n, props: r } = e, { needClip: i, dot: a, dataKey: o } = r, s = fz(r);
return /*#__PURE__*/ B.createElement(K0, {
points: n,
dot: a,
@@ -69732,7 +69828,7 @@ function kze(e) {
clipPathId: t
});
}
-function Aze(e) {
+function Nze(e) {
var { showLabels: t, children: n, points: r } = e, i = r.map((e) => {
var t = {
x: e.x ?? 0,
@@ -69753,8 +69849,8 @@ function Aze(e) {
return /*#__PURE__*/ B.createElement(A1, { value: t ? i : void 0 }, n);
}
function U4(e) {
- var { points: t, baseLine: n, needClip: r, clipPathId: i, props: a } = e, { layout: o, type: s, stroke: c, connectNulls: l, isRange: u } = a, { id: d } = a, f = z4(a, xze), p = pz(f), m = hz(f);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, t?.length > 1 && /*#__PURE__*/ B.createElement(yz, { clipPath: r ? `url(#clipPath-${i})` : void 0 }, /*#__PURE__*/ B.createElement(JG, R4({}, m, {
+ var { points: t, baseLine: n, needClip: r, clipPathId: i, props: a } = e, { layout: o, type: s, stroke: c, connectNulls: l, isRange: u } = a, { id: d } = a, f = z4(a, wze), p = fz(f), m = mz(f);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, t?.length > 1 && /*#__PURE__*/ B.createElement(vz, { clipPath: r ? `url(#clipPath-${i})` : void 0 }, /*#__PURE__*/ B.createElement(qG, R4({}, m, {
id: d,
points: t,
connectNulls: l,
@@ -69763,29 +69859,29 @@ function U4(e) {
layout: o,
stroke: "none",
className: "recharts-area-area"
- })), c !== "none" && /*#__PURE__*/ B.createElement(JG, R4({}, p, {
+ })), c !== "none" && /*#__PURE__*/ B.createElement(qG, R4({}, p, {
className: "recharts-area-curve",
layout: o,
type: s,
connectNulls: l,
fill: "none",
points: t
- })), c !== "none" && u && Array.isArray(n) && /*#__PURE__*/ B.createElement(JG, R4({}, p, {
+ })), c !== "none" && u && Array.isArray(n) && /*#__PURE__*/ B.createElement(qG, R4({}, p, {
className: "recharts-area-curve",
layout: o,
type: s,
connectNulls: l,
fill: "none",
points: n
- }))), /*#__PURE__*/ B.createElement(kze, {
+ }))), /*#__PURE__*/ B.createElement(Mze, {
points: t,
props: f,
clipPathId: i
}));
}
-function jze(e) {
+function Pze(e) {
var { alpha: t, baseLine: n, points: r, strokeWidth: i } = e, a = r[0]?.y, o = r[r.length - 1]?.y;
- if (!NU(a) || !NU(o)) return null;
+ if (!MU(a) || !MU(o)) return null;
var s = t * Math.abs(a - o), c = Math.max(...r.map((e) => e.x || 0));
return Z(n) ? c = Math.max(n, c) : n && Array.isArray(n) && n.length && (c = Math.max(...n.map((e) => e.x || 0), c)), Z(c) ? /*#__PURE__*/ B.createElement("rect", {
x: 0,
@@ -69794,9 +69890,9 @@ function jze(e) {
height: Math.floor(s)
}) : null;
}
-function Mze(e) {
+function Fze(e) {
var { alpha: t, baseLine: n, points: r, strokeWidth: i } = e, a = r[0]?.x, o = r[r.length - 1]?.x;
- if (!NU(a) || !NU(o)) return null;
+ if (!MU(a) || !MU(o)) return null;
var s = t * Math.abs(a - o), c = Math.max(...r.map((e) => e.y || 0));
return Z(n) ? c = Math.max(n, c) : n && Array.isArray(n) && n.length && (c = Math.max(...n.map((e) => e.y || 0), c)), Z(c) ? /*#__PURE__*/ B.createElement("rect", {
x: a < o ? a : a - s,
@@ -69805,35 +69901,35 @@ function Mze(e) {
height: Math.floor(c + (i ? parseInt(`${i}`, 10) : 1))
}) : null;
}
-function Nze(e) {
+function Ize(e) {
var { alpha: t, layout: n, points: r, baseLine: i, strokeWidth: a } = e;
- return n === "vertical" ? /*#__PURE__*/ B.createElement(jze, {
+ return n === "vertical" ? /*#__PURE__*/ B.createElement(Pze, {
alpha: t,
points: r,
baseLine: i,
strokeWidth: a
- }) : /*#__PURE__*/ B.createElement(Mze, {
+ }) : /*#__PURE__*/ B.createElement(Fze, {
alpha: t,
points: r,
baseLine: i,
strokeWidth: a
});
}
-function Pze(e) {
- var { needClip: t, clipPathId: n, props: r, previousPointsRef: i, previousBaselineRef: a } = e, { points: o, baseLine: s, isAnimationActive: c, animationBegin: l, animationDuration: u, animationEasing: d, onAnimationStart: f, onAnimationEnd: p } = r, m = pK((0, B.useMemo)(() => ({
+function Lze(e) {
+ var { needClip: t, clipPathId: n, props: r, previousPointsRef: i, previousBaselineRef: a } = e, { points: o, baseLine: s, isAnimationActive: c, animationBegin: l, animationDuration: u, animationEasing: d, onAnimationStart: f, onAnimationEnd: p } = r, m = fK((0, B.useMemo)(() => ({
points: o,
baseLine: s
- }), [o, s]), "recharts-area-"), h = EW(), [g, _] = (0, B.useState)(!1), v = !g, y = (0, B.useCallback)(() => {
+ }), [o, s]), "recharts-area-"), h = TW(), [g, _] = (0, B.useState)(!1), v = !g, y = (0, B.useCallback)(() => {
typeof p == "function" && p(), _(!1);
}, [p]), b = (0, B.useCallback)(() => {
typeof f == "function" && f(), _(!0);
}, [f]);
if (h == null) return null;
var x = i.current, S = a.current;
- return /*#__PURE__*/ B.createElement(Aze, {
+ return /*#__PURE__*/ B.createElement(Nze, {
showLabels: v,
points: o
- }, r.children, /*#__PURE__*/ B.createElement(fK, {
+ }, r.children, /*#__PURE__*/ B.createElement(dK, {
animationId: m,
begin: l,
duration: u,
@@ -69849,18 +69945,18 @@ function Pze(e) {
if (x[r]) {
var i = x[r];
return V4(V4({}, t), {}, {
- x: OB(i.x, t.x, e),
- y: OB(i.y, t.y, e)
+ x: DB(i.x, t.x, e),
+ y: DB(i.y, t.y, e)
});
}
return t;
- }), d = Z(s) ? OB(S, s, e) : AB(s) || SB(s) ? OB(S, 0, e) : s.map((t, n) => {
+ }), d = Z(s) ? DB(S, s, e) : kB(s) || xB(s) ? DB(S, 0, e) : s.map((t, n) => {
var r = Math.floor(n * l);
if (Array.isArray(S) && S[r]) {
var i = S[r];
return V4(V4({}, t), {}, {
- x: OB(i.x, t.x, e),
- y: OB(i.y, t.y, e)
+ x: DB(i.x, t.x, e),
+ y: DB(i.y, t.y, e)
});
}
return t;
@@ -69873,13 +69969,13 @@ function Pze(e) {
props: r
});
}
- return e > 0 && (i.current = o, a.current = s), /*#__PURE__*/ B.createElement(yz, null, c && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement("clipPath", { id: `animationClipPath-${n}` }, /*#__PURE__*/ B.createElement(Nze, {
+ return e > 0 && (i.current = o, a.current = s), /*#__PURE__*/ B.createElement(vz, null, c && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement("clipPath", { id: `animationClipPath-${n}` }, /*#__PURE__*/ B.createElement(Ize, {
alpha: e,
points: o,
baseLine: s,
layout: h,
strokeWidth: r.strokeWidth
- }))), /*#__PURE__*/ B.createElement(yz, { clipPath: `url(#animationClipPath-${n})` }, /*#__PURE__*/ B.createElement(U4, {
+ }))), /*#__PURE__*/ B.createElement(vz, { clipPath: `url(#animationClipPath-${n})` }, /*#__PURE__*/ B.createElement(U4, {
points: o,
baseLine: s,
needClip: t,
@@ -69888,9 +69984,9 @@ function Pze(e) {
})));
}), /*#__PURE__*/ B.createElement(N1, { label: r.label }));
}
-function Fze(e) {
+function Rze(e) {
var { needClip: t, clipPathId: n, props: r } = e, i = (0, B.useRef)(null), a = (0, B.useRef)();
- return /*#__PURE__*/ B.createElement(Pze, {
+ return /*#__PURE__*/ B.createElement(Lze, {
needClip: t,
clipPathId: n,
props: r,
@@ -69898,12 +69994,12 @@ function Fze(e) {
previousBaselineRef: a
});
}
-var Ize = class extends B.PureComponent {
+var zze = class extends B.PureComponent {
render() {
var { hide: e, dot: t, points: n, className: r, top: i, left: a, needClip: o, xAxisId: s, yAxisId: c, width: l, height: u, id: d, baseLine: f, zIndex: p } = this.props;
if (e) return null;
var m = _h("recharts-area", r), h = d, { r: g, strokeWidth: _ } = x4(t), v = C0(t), y = g * 2 + _, b = o ? `url(#clipPath-${v ? "" : "dots-"}${h})` : void 0;
- return /*#__PURE__*/ B.createElement(S$, { zIndex: p }, /*#__PURE__*/ B.createElement(yz, { className: m }, o && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(g4, {
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: p }, /*#__PURE__*/ B.createElement(vz, { className: m }, o && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(g4, {
clipPathId: h,
xAxisId: s,
yAxisId: c
@@ -69912,7 +70008,7 @@ var Ize = class extends B.PureComponent {
y: i - y / 2,
width: l + y,
height: u + y
- }))), /*#__PURE__*/ B.createElement(Fze, {
+ }))), /*#__PURE__*/ B.createElement(Rze, {
needClip: o,
clipPathId: h,
props: this.props
@@ -69930,7 +70026,7 @@ var Ize = class extends B.PureComponent {
clipPath: b
}));
}
-}, Lze = {
+}, Bze = {
activeDot: !0,
animationBegin: 0,
animationDuration: 1500,
@@ -69948,13 +70044,13 @@ var Ize = class extends B.PureComponent {
label: !1,
xAxisId: 0,
yAxisId: 0,
- zIndex: sq.area
+ zIndex: oq.area
};
-function Rze(e) {
- var { activeDot: t, animationBegin: n, animationDuration: r, animationEasing: i, connectNulls: a, dot: o, fill: s, fillOpacity: c, hide: l, isAnimationActive: u, legendType: d, stroke: f, xAxisId: p, yAxisId: m } = e, h = z4(e, Sze), g = TW(), _ = u$(), { needClip: v } = h4(p, m), y = oW(), { points: b, isRange: x, baseLine: S } = Q((t) => bze(t, e.id, y)) ?? {}, C = X0();
+function Vze(e) {
+ var { activeDot: t, animationBegin: n, animationDuration: r, animationEasing: i, connectNulls: a, dot: o, fill: s, fillOpacity: c, hide: l, isAnimationActive: u, legendType: d, stroke: f, xAxisId: p, yAxisId: m } = e, h = z4(e, Tze), g = wW(), _ = u$(), { needClip: v } = h4(p, m), y = aW(), { points: b, isRange: x, baseLine: S } = Q((t) => Cze(t, e.id, y)) ?? {}, C = X0();
if (g !== "horizontal" && g !== "vertical" || C == null || _ !== "AreaChart" && _ !== "ComposedChart") return null;
var { height: w, width: T, x: E, y: D } = C;
- return !b || !b.length ? null : /*#__PURE__*/ B.createElement(Ize, R4({}, h, {
+ return !b || !b.length ? null : /*#__PURE__*/ B.createElement(zze, R4({}, h, {
activeDot: t,
animationBegin: n,
animationDuration: r,
@@ -69980,7 +70076,7 @@ function Rze(e) {
yAxisId: m
}));
}
-var zze = (e, t, n, r, i) => {
+var Hze = (e, t, n, r, i) => {
var a = n ?? t;
if (Z(a)) return a;
var o = e === "horizontal" ? i : r, s = o.scale.domain();
@@ -69990,17 +70086,17 @@ var zze = (e, t, n, r, i) => {
}
return a === "dataMin" ? s[0] : a === "dataMax" ? s[1] : s[0];
};
-function Bze(e) {
- var { areaSettings: { connectNulls: t, baseValue: n, dataKey: r }, stackedData: i, layout: a, chartBaseValue: o, xAxis: s, yAxis: c, displayedData: l, dataStartIndex: u, xAxisTicks: d, yAxisTicks: f, bandSize: p } = e, m = i && i.length, h = zze(a, o, n, s, c), g = a === "horizontal", _ = !1, v = l.map((e, n) => {
+function Uze(e) {
+ var { areaSettings: { connectNulls: t, baseValue: n, dataKey: r }, stackedData: i, layout: a, chartBaseValue: o, xAxis: s, yAxis: c, displayedData: l, dataStartIndex: u, xAxisTicks: d, yAxisTicks: f, bandSize: p } = e, m = i && i.length, h = Hze(a, o, n, s, c), g = a === "horizontal", _ = !1, v = l.map((e, n) => {
var a;
if (m) a = i[u + n];
else {
- var o = LU(e, r);
+ var o = IU(e, r);
Array.isArray(o) ? (a = o, _ = !0) : a = [h, o];
}
- var l = a?.[1] ?? null, v = l == null || m && !t && LU(e, r) == null;
+ var l = a?.[1] ?? null, v = l == null || m && !t && IU(e, r) == null;
return g ? {
- x: UU({
+ x: HU({
axis: s,
ticks: d,
bandSize: p,
@@ -70012,7 +70108,7 @@ function Bze(e) {
payload: e
} : {
x: v ? null : s.scale.map(l) ?? null,
- y: UU({
+ y: HU({
axis: c,
ticks: f,
bandSize: p,
@@ -70040,12 +70136,12 @@ function Bze(e) {
isRange: _
};
}
-function Vze(e) {
- var t = UB(e, Lze), n = oW();
+function Wze(e) {
+ var t = HB(e, Bze), n = aW();
return /*#__PURE__*/ B.createElement(z0, {
id: t.id,
type: "area"
- }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(L0, { legendPayload: Dze(t) }), /*#__PURE__*/ B.createElement(Oze, {
+ }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(L0, { legendPayload: Aze(t) }), /*#__PURE__*/ B.createElement(jze, {
dataKey: t.dataKey,
data: t.data,
stroke: t.stroke,
@@ -70064,21 +70160,21 @@ function Vze(e) {
xAxisId: t.xAxisId,
yAxisId: t.yAxisId,
zAxisId: 0,
- stackId: HU(t.stackId),
+ stackId: VU(t.stackId),
hide: t.hide,
barSize: void 0,
baseValue: t.baseValue,
isPanorama: n,
connectNulls: t.connectNulls
- }), /*#__PURE__*/ B.createElement(Rze, R4({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(Vze, R4({}, t, { id: e }))));
}
-var W4 = /*#__PURE__*/ B.memo(Vze, CG);
+var W4 = /*#__PURE__*/ B.memo(Wze, SG);
W4.displayName = "Area";
//#endregion
//#region node_modules/tiny-invariant/dist/esm/tiny-invariant.js
-var Hze = "Invariant failed";
-function Uze(e, t) {
- if (!e) throw Error(Hze);
+var Gze = "Invariant failed";
+function Kze(e, t) {
+ if (!e) throw Error(Gze);
}
//#endregion
//#region node_modules/recharts/es6/util/BarUtils.js
@@ -70098,45 +70194,45 @@ function K4(e) {
inActiveClassName: "recharts-inactive-bar"
}, e));
}
-var Wze = function(e) {
+var qze = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
return (n, r) => {
if (Z(e)) return e;
- var i = Z(n) || AB(n);
- return i ? e(n, r) : (!i && Uze(!1, `minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`), t);
+ var i = Z(n) || kB(n);
+ return i ? e(n, r) : (!i && Kze(!1, `minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`), t);
};
-}, Gze = (e, t, n) => n, q4 = $([lZ, (e, t) => t], (e, t) => e.filter((e) => e.type === "bar").find((e) => e.id === t)), Kze = $([q4], (e) => e?.maxBarSize), qze = (e, t, n, r) => r, Jze = $([
- wW,
+}, Jze = (e, t, n) => n, q4 = $([lZ, (e, t) => t], (e, t) => e.filter((e) => e.type === "bar").find((e) => e.id === t)), Yze = $([q4], (e) => e?.maxBarSize), Xze = (e, t, n, r) => r, Zze = $([
+ CW,
lZ,
A4,
j4,
- Gze
-], (e, t, n, r, i) => t.filter((t) => e === "horizontal" ? t.xAxisId === n : t.yAxisId === r).filter((e) => e.isPanorama === i).filter((e) => e.hide === !1).filter((e) => e.type === "bar")), Yze = (e, t, n) => {
- var r = wW(e), i = A4(e, t), a = j4(e, t);
+ Jze
+], (e, t, n, r, i) => t.filter((t) => e === "horizontal" ? t.xAxisId === n : t.yAxisId === r).filter((e) => e.isPanorama === i).filter((e) => e.hide === !1).filter((e) => e.type === "bar")), Qze = (e, t, n) => {
+ var r = CW(e), i = A4(e, t), a = j4(e, t);
if (i != null && a != null) return r === "horizontal" ? EZ(e, "yAxis", a, n) : EZ(e, "xAxis", i, n);
-}, Xze = $([
- Jze,
- eq,
+}, $ze = $([
+ Zze,
+ $K,
(e, t) => {
- var n = wW(e), r = A4(e, t), i = j4(e, t);
+ var n = CW(e), r = A4(e, t), i = j4(e, t);
if (r != null && i != null) return n === "horizontal" ? sQ(e, "xAxis", r) : sQ(e, "yAxis", i);
}
-], h2), Zze = (e, t, n) => {
+], h2), eBe = (e, t, n) => {
var r = q4(e, t);
if (r == null) return 0;
var i = A4(e, t), a = j4(e, t);
if (i == null || a == null) return 0;
- var o = wW(e), s = ZK(e), { maxBarSize: c } = r, l = AB(c) ? s : c, u, d;
- return o === "horizontal" ? (u = hQ(e, "xAxis", i, n), d = mQ(e, "xAxis", i, n)) : (u = hQ(e, "yAxis", a, n), d = mQ(e, "yAxis", a, n)), JU(u, d, !0) ?? l ?? 0;
+ var o = CW(e), s = XK(e), { maxBarSize: c } = r, l = kB(c) ? s : c, u, d;
+ return o === "horizontal" ? (u = hQ(e, "xAxis", i, n), d = mQ(e, "xAxis", i, n)) : (u = hQ(e, "yAxis", a, n), d = mQ(e, "yAxis", a, n)), qU(u, d, !0) ?? l ?? 0;
}, J4 = (e, t, n) => {
- var r = wW(e), i = A4(e, t), a = j4(e, t);
+ var r = CW(e), i = A4(e, t), a = j4(e, t);
if (i != null && a != null) {
var o, s;
- return r === "horizontal" ? (o = hQ(e, "xAxis", i, n), s = mQ(e, "xAxis", i, n)) : (o = hQ(e, "yAxis", a, n), s = mQ(e, "yAxis", a, n)), JU(o, s);
+ return r === "horizontal" ? (o = hQ(e, "xAxis", i, n), s = mQ(e, "xAxis", i, n)) : (o = hQ(e, "yAxis", a, n), s = mQ(e, "yAxis", a, n)), qU(o, s);
}
-}, Qze = $([
+}, tBe = $([
+ rW,
iW,
- aW,
(e, t, n) => {
var r = A4(e, t);
if (r != null) return hQ(e, "xAxis", r, n);
@@ -70154,25 +70250,25 @@ var Wze = function(e) {
if (r != null) return mQ(e, "yAxis", r, n);
},
$([$([
- Xze,
+ $ze,
+ XK,
ZK,
QK,
- $K,
- Zze,
+ eBe,
J4,
- Kze
+ Yze
], v2), q4], b2),
- wW,
- RK,
+ CW,
+ LK,
J4,
- $([Yze, q4], y2),
+ $([Qze, q4], y2),
q4,
- qze
+ Xze
], (e, t, n, r, i, a, o, s, c, l, u, d, f) => {
var { chartData: p, dataStartIndex: m, dataEndIndex: h } = c;
if (!(d == null || o == null || t == null || s !== "horizontal" && s !== "vertical" || n == null || r == null || i == null || a == null || l == null)) {
var { data: g } = d, _ = g != null && g.length > 0 ? g : p?.slice(m, h + 1);
- if (_ != null) return EBe({
+ if (_ != null) return kBe({
layout: s,
barSettings: d,
pos: o,
@@ -70189,7 +70285,7 @@ var Wze = function(e) {
dataStartIndex: m
});
}
-}), $ze = ["index"];
+}), nBe = ["index"];
function Y4() {
return Y4 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -70199,16 +70295,16 @@ function Y4() {
return e;
}, Y4.apply(null, arguments);
}
-function eBe(e, t) {
+function rBe(e, t) {
if (e == null) return {};
- var n, r, i = tBe(e, t);
+ var n, r, i = iBe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function tBe(e, t) {
+function iBe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -70217,31 +70313,31 @@ function tBe(e, t) {
}
return n;
}
-var X4 = /*#__PURE__*/ (0, B.createContext)(void 0), nBe = (e) => {
+var X4 = /*#__PURE__*/ (0, B.createContext)(void 0), aBe = (e) => {
var t = (0, B.useContext)(X4);
if (t != null) return t.stackId;
- if (e != null) return HU(e);
-}, rBe = (e, t) => `recharts-bar-stack-clip-path-${e}-${t}`, iBe = (e) => {
+ if (e != null) return VU(e);
+}, oBe = (e, t) => `recharts-bar-stack-clip-path-${e}-${t}`, sBe = (e) => {
var t = (0, B.useContext)(X4);
if (t != null) {
var { stackId: n } = t;
- return `url(#${rBe(n, e)})`;
+ return `url(#${oBe(n, e)})`;
}
}, Z4 = (e) => {
- var { index: t } = e, n = eBe(e, $ze), r = iBe(t);
- return /*#__PURE__*/ B.createElement(yz, Y4({
+ var { index: t } = e, n = rBe(e, nBe), r = sBe(t);
+ return /*#__PURE__*/ B.createElement(vz, Y4({
className: "recharts-bar-stack-layer",
clipPath: r
}, n));
-}, aBe = [
+}, cBe = [
"onMouseEnter",
"onMouseLeave",
"onClick"
-], oBe = [
+], lBe = [
"value",
"background",
"tooltipPosition"
-], sBe = ["id"], cBe = [
+], uBe = ["id"], dBe = [
"onMouseEnter",
"onClick",
"onMouseLeave"
@@ -70269,26 +70365,26 @@ function e3(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? $4(Object(n), !0).forEach(function(t) {
- lBe(e, t, n[t]);
+ fBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function lBe(e, t, n) {
- return (t = uBe(t)) in e ? Object.defineProperty(e, t, {
+function fBe(e, t, n) {
+ return (t = pBe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function uBe(e) {
- var t = dBe(e, "string");
+function pBe(e) {
+ var t = mBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function dBe(e, t) {
+function mBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -70300,14 +70396,14 @@ function dBe(e, t) {
}
function t3(e, t) {
if (e == null) return {};
- var n, r, i = fBe(e, t);
+ var n, r, i = hBe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function fBe(e, t) {
+function hBe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -70316,27 +70412,27 @@ function fBe(e, t) {
}
return n;
}
-var pBe = (e) => {
+var gBe = (e) => {
var { dataKey: t, name: n, fill: r, legendType: i, hide: a } = e;
return [{
inactive: a,
dataKey: t,
type: i,
color: r,
- value: XU(n, t),
+ value: YU(n, t),
payload: e
}];
-}, mBe = /*#__PURE__*/ B.memo((e) => {
+}, _Be = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, stroke: n, strokeWidth: r, fill: i, name: a, hide: o, unit: s, tooltipType: c, id: l } = e, u = {
dataDefinedOnItem: void 0,
- getPosition: NB,
+ getPosition: MB,
settings: {
stroke: n,
strokeWidth: r,
fill: i,
dataKey: t,
nameKey: void 0,
- name: XU(a, t),
+ name: YU(a, t),
hide: o,
type: c,
color: i,
@@ -70346,17 +70442,17 @@ var pBe = (e) => {
};
return /*#__PURE__*/ B.createElement(I0, { tooltipEntrySettings: u });
});
-function hBe(e) {
- var t = Q(t$), { data: n, dataKey: r, background: i, allOtherBarProps: a } = e, { onMouseEnter: o, onMouseLeave: s, onClick: c } = a, l = t3(a, aBe), u = N0(o, r, a.id), d = P0(s), f = F0(c, r, a.id);
+function vBe(e) {
+ var t = Q(t$), { data: n, dataKey: r, background: i, allOtherBarProps: a } = e, { onMouseEnter: o, onMouseLeave: s, onClick: c } = a, l = t3(a, cBe), u = N0(o, r, a.id), d = P0(s), f = F0(c, r, a.id);
if (!i || n == null) return null;
- var p = mz(i);
- return /*#__PURE__*/ B.createElement(S$, { zIndex: N2(i, sq.barBackground) }, n.map((e, n) => {
- var { value: a, background: o, tooltipPosition: s } = e, c = t3(e, oBe);
+ var p = pz(i);
+ return /*#__PURE__*/ B.createElement(S$, { zIndex: N2(i, oq.barBackground) }, n.map((e, n) => {
+ var { value: a, background: o, tooltipPosition: s } = e, c = t3(e, lBe);
if (!o) return null;
var m = u(e, n), h = d(e, n), g = f(e, n), _ = e3(e3(e3(e3(e3({
option: i,
isActive: String(n) === t
- }, c), {}, { fill: "#eee" }, o), p), VB(l, e, n)), {}, {
+ }, c), {}, { fill: "#eee" }, o), p), BB(l, e, n)), {}, {
onMouseEnter: m,
onMouseLeave: h,
onClick: g,
@@ -70367,7 +70463,7 @@ function hBe(e) {
return /*#__PURE__*/ B.createElement(K4, Q4({ key: `background-bar-${n}` }, _));
}));
}
-function gBe(e) {
+function yBe(e) {
var { showLabels: t, children: n, rects: r } = e, i = r?.map((e) => {
var t = {
x: e.x,
@@ -70387,7 +70483,7 @@ function gBe(e) {
});
return /*#__PURE__*/ B.createElement(A1, { value: t ? i : void 0 }, n);
}
-function _Be(e) {
+function bBe(e) {
var { shape: t, activeBar: n, baseProps: r, entry: i, index: a, dataKey: o } = e, s = Q(t$), c = Q(r$), l = n && String(i.originalDataIndex) === s && (c == null || o === c), [u, d] = (0, B.useState)(!1), [f, p] = (0, B.useState)(!1);
(0, B.useEffect)(() => {
var e;
@@ -70406,9 +70502,9 @@ function _Be(e) {
dataKey: o,
onTransitionEnd: m
}));
- return g ? /*#__PURE__*/ B.createElement(S$, { zIndex: sq.activeBar }, /*#__PURE__*/ B.createElement(Z4, { index: i.originalDataIndex }, v)) : v;
+ return g ? /*#__PURE__*/ B.createElement(S$, { zIndex: oq.activeBar }, /*#__PURE__*/ B.createElement(Z4, { index: i.originalDataIndex }, v)) : v;
}
-function vBe(e) {
+function xBe(e) {
var { shape: t, baseProps: n, entry: r, index: i, dataKey: a } = e;
return /*#__PURE__*/ B.createElement(K4, Q4({}, n, { name: String(n.name) }, r, {
isActive: !1,
@@ -70417,24 +70513,24 @@ function vBe(e) {
dataKey: a
}));
}
-function yBe(e) {
- var { data: t, props: n } = e, r = pz(n) ?? {}, { id: i } = r, a = t3(r, sBe), { shape: o, dataKey: s, activeBar: c } = n, { onMouseEnter: l, onClick: u, onMouseLeave: d } = n, f = t3(n, cBe), p = N0(l, s, i), m = P0(d), h = F0(u, s, i);
+function SBe(e) {
+ var { data: t, props: n } = e, r = fz(n) ?? {}, { id: i } = r, a = t3(r, uBe), { shape: o, dataKey: s, activeBar: c } = n, { onMouseEnter: l, onClick: u, onMouseLeave: d } = n, f = t3(n, dBe), p = N0(l, s, i), m = P0(d), h = F0(u, s, i);
return t ? /*#__PURE__*/ B.createElement(B.Fragment, null, t.map((e, t) => /*#__PURE__*/ B.createElement(Z4, Q4({
index: e.originalDataIndex,
key: `rectangle-${e?.x}-${e?.y}-${e?.value}-${t}`,
className: "recharts-bar-rectangle"
- }, VB(f, e, t), {
+ }, BB(f, e, t), {
onMouseEnter: p(e, t),
onMouseLeave: m(e, t),
onClick: h(e, t)
- }), c ? /*#__PURE__*/ B.createElement(_Be, {
+ }), c ? /*#__PURE__*/ B.createElement(bBe, {
shape: o,
activeBar: c,
baseProps: a,
entry: e,
index: t,
dataKey: s
- }) : /*#__PURE__*/ B.createElement(vBe, {
+ }) : /*#__PURE__*/ B.createElement(xBe, {
shape: o,
baseProps: a,
entry: e,
@@ -70442,16 +70538,16 @@ function yBe(e) {
dataKey: s
})))) : null;
}
-function bBe(e) {
- var { props: t, previousRectanglesRef: n } = e, { data: r, layout: i, isAnimationActive: a, animationBegin: o, animationDuration: s, animationEasing: c, onAnimationEnd: l, onAnimationStart: u } = t, d = n.current, f = pK(t, "recharts-bar-"), [p, m] = (0, B.useState)(!1), h = !p, g = (0, B.useCallback)(() => {
+function CBe(e) {
+ var { props: t, previousRectanglesRef: n } = e, { data: r, layout: i, isAnimationActive: a, animationBegin: o, animationDuration: s, animationEasing: c, onAnimationEnd: l, onAnimationStart: u } = t, d = n.current, f = fK(t, "recharts-bar-"), [p, m] = (0, B.useState)(!1), h = !p, g = (0, B.useCallback)(() => {
typeof l == "function" && l(), m(!1);
}, [l]), _ = (0, B.useCallback)(() => {
typeof u == "function" && u(), m(!0);
}, [u]);
- return /*#__PURE__*/ B.createElement(gBe, {
+ return /*#__PURE__*/ B.createElement(yBe, {
showLabels: h,
rects: r
- }, /*#__PURE__*/ B.createElement(fK, {
+ }, /*#__PURE__*/ B.createElement(dK, {
animationId: f,
begin: o,
duration: s,
@@ -70464,68 +70560,68 @@ function bBe(e) {
var a = e === 1 ? r : r?.map((t, n) => {
var r = d && d[n];
if (r) return e3(e3({}, t), {}, {
- x: OB(r.x, t.x, e),
- y: OB(r.y, t.y, e),
- width: OB(r.width, t.width, e),
- height: OB(r.height, t.height, e)
+ x: DB(r.x, t.x, e),
+ y: DB(r.y, t.y, e),
+ width: DB(r.width, t.width, e),
+ height: DB(r.height, t.height, e)
});
if (i === "horizontal") {
- var a = OB(0, t.height, e), o = OB(t.stackedBarStart, t.y, e);
+ var a = DB(0, t.height, e), o = DB(t.stackedBarStart, t.y, e);
return e3(e3({}, t), {}, {
y: o,
height: a
});
}
- var s = OB(0, t.width, e), c = OB(t.stackedBarStart, t.x, e);
+ var s = DB(0, t.width, e), c = DB(t.stackedBarStart, t.x, e);
return e3(e3({}, t), {}, {
width: s,
x: c
});
});
- return e > 0 && (n.current = a ?? null), a == null ? null : /*#__PURE__*/ B.createElement(yz, null, /*#__PURE__*/ B.createElement(yBe, {
+ return e > 0 && (n.current = a ?? null), a == null ? null : /*#__PURE__*/ B.createElement(vz, null, /*#__PURE__*/ B.createElement(SBe, {
props: t,
data: a
}));
}), /*#__PURE__*/ B.createElement(N1, { label: t.label }), t.children);
}
-function xBe(e) {
+function wBe(e) {
var t = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(bBe, {
+ return /*#__PURE__*/ B.createElement(CBe, {
previousRectanglesRef: t,
props: e
});
}
-var n3 = 0, SBe = (e, t) => {
+var n3 = 0, TBe = (e, t) => {
var n = Array.isArray(e.value) ? e.value[1] : e.value;
return {
x: e.x,
y: e.y,
value: n,
- errorVal: LU(e, t)
+ errorVal: IU(e, t)
};
-}, CBe = class extends B.PureComponent {
+}, EBe = class extends B.PureComponent {
render() {
var { hide: e, data: t, dataKey: n, className: r, xAxisId: i, yAxisId: a, needClip: o, background: s, id: c } = this.props;
if (e || t == null) return null;
var l = _h("recharts-bar", r), u = c;
- return /*#__PURE__*/ B.createElement(yz, {
+ return /*#__PURE__*/ B.createElement(vz, {
className: l,
id: c
}, o && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(g4, {
clipPathId: u,
xAxisId: i,
yAxisId: a
- })), /*#__PURE__*/ B.createElement(yz, {
+ })), /*#__PURE__*/ B.createElement(vz, {
className: "recharts-bar-rectangles",
clipPath: o ? `url(#clipPath-${u})` : void 0
- }, /*#__PURE__*/ B.createElement(hBe, {
+ }, /*#__PURE__*/ B.createElement(vBe, {
data: t,
dataKey: n,
background: s,
allOtherBarProps: this.props
- }), /*#__PURE__*/ B.createElement(xBe, this.props)));
+ }), /*#__PURE__*/ B.createElement(wBe, this.props)));
}
-}, wBe = {
+}, DBe = {
activeBar: !1,
animationBegin: 0,
animationDuration: 400,
@@ -70538,19 +70634,19 @@ var n3 = 0, SBe = (e, t) => {
minPointSize: n3,
xAxisId: 0,
yAxisId: 0,
- zIndex: sq.bar
+ zIndex: oq.bar
};
-function TBe(e) {
- var { xAxisId: t, yAxisId: n, hide: r, legendType: i, minPointSize: a, activeBar: o, animationBegin: s, animationDuration: c, animationEasing: l, isAnimationActive: u } = e, { needClip: d } = h4(t, n), f = TW(), p = oW(), m = S0(e.children, z$), h = Q((t) => Qze(t, e.id, p, m));
+function OBe(e) {
+ var { xAxisId: t, yAxisId: n, hide: r, legendType: i, minPointSize: a, activeBar: o, animationBegin: s, animationDuration: c, animationEasing: l, isAnimationActive: u } = e, { needClip: d } = h4(t, n), f = wW(), p = aW(), m = S0(e.children, z$), h = Q((t) => tBe(t, e.id, p, m));
if (f !== "vertical" && f !== "horizontal") return null;
var g, _ = h?.[0];
return g = _ == null || _.height == null || _.width == null ? 0 : f === "vertical" ? _.height / 2 : _.width / 2, /*#__PURE__*/ B.createElement(m4, {
xAxisId: t,
yAxisId: n,
data: h,
- dataPointFormatter: SBe,
+ dataPointFormatter: TBe,
errorBarOffset: g
- }, /*#__PURE__*/ B.createElement(CBe, Q4({}, e, {
+ }, /*#__PURE__*/ B.createElement(EBe, Q4({}, e, {
layout: f,
needClip: d,
data: h,
@@ -70566,20 +70662,20 @@ function TBe(e) {
isAnimationActive: u
})));
}
-function EBe(e) {
- var { layout: t, barSettings: { dataKey: n, minPointSize: r, hasCustomShape: i }, pos: a, bandSize: o, xAxis: s, yAxis: c, xAxisTicks: l, yAxisTicks: u, stackedData: d, displayedData: f, offset: p, cells: m, parentViewBox: h, dataStartIndex: g } = e, _ = t === "horizontal" ? c : s, v = d ? _.scale.domain() : null, y = GU({ numericAxis: _ }), b = _.scale.map(y);
+function kBe(e) {
+ var { layout: t, barSettings: { dataKey: n, minPointSize: r, hasCustomShape: i }, pos: a, bandSize: o, xAxis: s, yAxis: c, xAxisTicks: l, yAxisTicks: u, stackedData: d, displayedData: f, offset: p, cells: m, parentViewBox: h, dataStartIndex: g } = e, _ = t === "horizontal" ? c : s, v = d ? _.scale.domain() : null, y = WU({ numericAxis: _ }), b = _.scale.map(y);
return f.map((e, f) => {
var _, x, S, C, w, T;
if (d) {
var E = d[f + g];
if (E == null) return null;
- _ = VU(E, v);
- } else _ = LU(e, n), Array.isArray(_) || (_ = [y, _]);
- var D = Wze(r, n3)(_[1], f);
+ _ = BU(E, v);
+ } else _ = IU(e, n), Array.isArray(_) || (_ = [y, _]);
+ var D = qze(r, n3)(_[1], f);
if (t === "horizontal") {
var O = c.scale.map(_[0]), k = c.scale.map(_[1]);
if (O == null || k == null) return null;
- x = WU({
+ x = UU({
axis: s,
ticks: l,
bandSize: o,
@@ -70588,19 +70684,19 @@ function EBe(e) {
index: f
}), S = k ?? O ?? void 0, C = a.size;
var A = O - k;
- if (w = SB(A) ? 0 : A, T = {
+ if (w = xB(A) ? 0 : A, T = {
x,
y: p.top,
width: C,
height: p.height
}, Math.abs(D) > 0 && Math.abs(w) < Math.abs(D)) {
- var j = xB(w || D) * (Math.abs(D) - Math.abs(w));
+ var j = bB(w || D) * (Math.abs(D) - Math.abs(w));
S -= j, w += j;
}
} else {
var M = s.scale.map(_[0]), N = s.scale.map(_[1]);
if (M == null || N == null) return null;
- if (x = M, S = WU({
+ if (x = M, S = UU({
axis: c,
ticks: u,
bandSize: o,
@@ -70613,7 +70709,7 @@ function EBe(e) {
width: p.width,
height: w
}, Math.abs(D) > 0 && Math.abs(C) < Math.abs(D)) {
- var P = xB(C || D) * (Math.abs(D) - Math.abs(C));
+ var P = bB(C || D) * (Math.abs(D) - Math.abs(C));
C += P;
}
}
@@ -70635,12 +70731,12 @@ function EBe(e) {
}, m && m[f] && m[f].props);
}).filter(Boolean);
}
-function DBe(e) {
- var t = UB(e, wBe), n = nBe(t.stackId), r = oW();
+function ABe(e) {
+ var t = HB(e, DBe), n = aBe(t.stackId), r = aW();
return /*#__PURE__*/ B.createElement(z0, {
id: t.id,
type: "bar"
- }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(L0, { legendPayload: pBe(t) }), /*#__PURE__*/ B.createElement(mBe, {
+ }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(L0, { legendPayload: gBe(t) }), /*#__PURE__*/ B.createElement(_Be, {
dataKey: t.dataKey,
stroke: t.stroke,
strokeWidth: t.strokeWidth,
@@ -70665,23 +70761,23 @@ function DBe(e) {
maxBarSize: t.maxBarSize,
isPanorama: r,
hasCustomShape: t.shape != null
- }), /*#__PURE__*/ B.createElement(S$, { zIndex: t.zIndex }, /*#__PURE__*/ B.createElement(TBe, Q4({}, t, { id: e })))));
+ }), /*#__PURE__*/ B.createElement(S$, { zIndex: t.zIndex }, /*#__PURE__*/ B.createElement(OBe, Q4({}, t, { id: e })))));
}
-var r3 = /*#__PURE__*/ B.memo(DBe, CG);
+var r3 = /*#__PURE__*/ B.memo(ABe, SG);
r3.displayName = "Bar";
//#endregion
//#region node_modules/recharts/es6/util/axisPropsAreEqual.js
-var OBe = ["domain", "range"], kBe = ["domain", "range"];
+var jBe = ["domain", "range"], MBe = ["domain", "range"];
function i3(e, t) {
if (e == null) return {};
- var n, r, i = ABe(e, t);
+ var n, r, i = NBe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function ABe(e, t) {
+function NBe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -70695,16 +70791,16 @@ function a3(e, t) {
}
function o3(e, t) {
if (e === t) return !0;
- var { domain: n, range: r } = e, i = i3(e, OBe), { domain: a, range: o } = t, s = i3(t, kBe);
- return !a3(n, a) || !a3(r, o) ? !1 : CG(i, s);
+ var { domain: n, range: r } = e, i = i3(e, jBe), { domain: a, range: o } = t, s = i3(t, MBe);
+ return !a3(n, a) || !a3(r, o) ? !1 : SG(i, s);
}
//#endregion
//#region node_modules/recharts/es6/cartesian/XAxis.js
-var jBe = ["type"], MBe = [
+var PBe = ["type"], FBe = [
"dangerouslySetInnerHTML",
"ticks",
"scale"
-], NBe = ["id", "scale"];
+], IBe = ["id", "scale"];
function s3() {
return s3 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -70728,26 +70824,26 @@ function l3(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? c3(Object(n), !0).forEach(function(t) {
- PBe(e, t, n[t]);
+ LBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : c3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function PBe(e, t, n) {
- return (t = FBe(t)) in e ? Object.defineProperty(e, t, {
+function LBe(e, t, n) {
+ return (t = RBe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function FBe(e) {
- var t = IBe(e, "string");
+function RBe(e) {
+ var t = zBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function IBe(e, t) {
+function zBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -70759,14 +70855,14 @@ function IBe(e, t) {
}
function u3(e, t) {
if (e == null) return {};
- var n, r, i = LBe(e, t);
+ var n, r, i = BBe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function LBe(e, t) {
+function BBe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -70775,23 +70871,23 @@ function LBe(e, t) {
}
return n;
}
-function RBe(e) {
- var t = yV(), n = (0, B.useRef)(null), r = EW(), { type: i } = e, a = u3(e, jBe), o = dq(r, "xAxis", i), s = (0, B.useMemo)(() => {
+function VBe(e) {
+ var t = vV(), n = (0, B.useRef)(null), r = TW(), { type: i } = e, a = u3(e, PBe), o = uq(r, "xAxis", i), s = (0, B.useMemo)(() => {
if (o != null) return l3(l3({}, a), {}, { type: o });
}, [a, o]);
return (0, B.useLayoutEffect)(() => {
- s != null && (n.current === null ? t(eIe(s)) : n.current !== s && t(tIe({
+ s != null && (n.current === null ? t(rIe(s)) : n.current !== s && t(iIe({
prev: n.current,
next: s
})), n.current = s);
}, [s, t]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(nIe(n.current)), null);
+ n.current &&= (t(aIe(n.current)), null);
}, [t]), null;
}
-var zBe = (e) => {
- var { xAxisId: t, className: n } = e, r = Q(aW), i = oW(), a = "xAxis", o = Q((e) => fQ(e, a, t, i)), s = Q((e) => aQ(e, t)), c = Q((e) => oje(e, t)), l = Q((e) => $X(e, t));
+var HBe = (e) => {
+ var { xAxisId: t, className: n } = e, r = Q(iW), i = aW(), a = "xAxis", o = Q((e) => fQ(e, a, t, i)), s = Q((e) => aQ(e, t)), c = Q((e) => lje(e, t)), l = Q((e) => $X(e, t));
if (s == null || c == null || l == null) return null;
- var { dangerouslySetInnerHTML: u, ticks: d, scale: f } = e, p = u3(e, MBe), { id: m, scale: h } = l, g = u3(l, NBe);
+ var { dangerouslySetInnerHTML: u, ticks: d, scale: f } = e, p = u3(e, FBe), { id: m, scale: h } = l, g = u3(l, IBe);
return /*#__PURE__*/ B.createElement(o4, s3({}, p, g, {
x: c.x,
y: c.y,
@@ -70803,7 +70899,7 @@ var zBe = (e) => {
axisType: a,
axisId: t
}));
-}, BBe = {
+}, UBe = {
allowDataOverflow: QX.allowDataOverflow,
allowDecimals: QX.allowDecimals,
allowDuplicatedCategory: QX.allowDuplicatedCategory,
@@ -70828,8 +70924,8 @@ var zBe = (e) => {
niceTicks: QX.niceTicks,
xAxisId: 0
}, d3 = /*#__PURE__*/ B.memo((e) => {
- var t = UB(e, BBe);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(RBe, {
+ var t = HB(e, UBe);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(VBe, {
allowDataOverflow: t.allowDataOverflow,
allowDecimals: t.allowDecimals,
allowDuplicatedCategory: t.allowDuplicatedCategory,
@@ -70855,16 +70951,16 @@ var zBe = (e) => {
type: t.type,
unit: t.unit,
niceTicks: t.niceTicks
- }), /*#__PURE__*/ B.createElement(zBe, t));
+ }), /*#__PURE__*/ B.createElement(HBe, t));
}, o3);
d3.displayName = "XAxis";
//#endregion
//#region node_modules/recharts/es6/cartesian/YAxis.js
-var VBe = ["type"], HBe = [
+var WBe = ["type"], GBe = [
"dangerouslySetInnerHTML",
"ticks",
"scale"
-], UBe = ["id", "scale"];
+], KBe = ["id", "scale"];
function f3() {
return f3 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -70888,26 +70984,26 @@ function m3(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? p3(Object(n), !0).forEach(function(t) {
- WBe(e, t, n[t]);
+ qBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : p3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function WBe(e, t, n) {
- return (t = GBe(t)) in e ? Object.defineProperty(e, t, {
+function qBe(e, t, n) {
+ return (t = JBe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function GBe(e) {
- var t = KBe(e, "string");
+function JBe(e) {
+ var t = YBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function KBe(e, t) {
+function YBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -70919,14 +71015,14 @@ function KBe(e, t) {
}
function h3(e, t) {
if (e == null) return {};
- var n, r, i = qBe(e, t);
+ var n, r, i = XBe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function qBe(e, t) {
+function XBe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -70935,27 +71031,27 @@ function qBe(e, t) {
}
return n;
}
-function JBe(e) {
- var t = yV(), n = (0, B.useRef)(null), r = EW(), { type: i } = e, a = h3(e, VBe), o = dq(r, "yAxis", i), s = (0, B.useMemo)(() => {
+function ZBe(e) {
+ var t = vV(), n = (0, B.useRef)(null), r = TW(), { type: i } = e, a = h3(e, WBe), o = uq(r, "yAxis", i), s = (0, B.useMemo)(() => {
if (o != null) return m3(m3({}, a), {}, { type: o });
}, [o, a]);
return (0, B.useLayoutEffect)(() => {
- s != null && (n.current === null ? t(rIe(s)) : n.current !== s && t(iIe({
+ s != null && (n.current === null ? t(oIe(s)) : n.current !== s && t(sIe({
prev: n.current,
next: s
})), n.current = s);
}, [s, t]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(aIe(n.current)), null);
+ n.current &&= (t(cIe(n.current)), null);
}, [t]), null;
}
-function YBe(e) {
- var { yAxisId: t, className: n, width: r, label: i } = e, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = Q(aW), c = oW(), l = yV(), u = "yAxis", d = Q((e) => oQ(e, t)), f = Q((e) => sje(e, t)), p = Q((e) => fQ(e, u, t, c)), m = Q((e) => nZ(e, t));
+function QBe(e) {
+ var { yAxisId: t, className: n, width: r, label: i } = e, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = Q(iW), c = aW(), l = vV(), u = "yAxis", d = Q((e) => oQ(e, t)), f = Q((e) => uje(e, t)), p = Q((e) => fQ(e, u, t, c)), m = Q((e) => nZ(e, t));
if ((0, B.useLayoutEffect)(() => {
if (!(r !== "auto" || !d || S1(i) || /*#__PURE__*/ (0, B.isValidElement)(i) || m == null)) {
var e = a.current;
if (e) {
var n = e.getCalculatedWidth();
- Math.round(d.width) !== Math.round(n) && l(lIe({
+ Math.round(d.width) !== Math.round(n) && l(fIe({
id: t,
width: n
}));
@@ -70970,7 +71066,7 @@ function YBe(e) {
r,
m
]), d == null || f == null || m == null) return null;
- var { dangerouslySetInnerHTML: h, ticks: g, scale: _ } = e, v = h3(e, HBe), { id: y, scale: b } = m, x = h3(m, UBe);
+ var { dangerouslySetInnerHTML: h, ticks: g, scale: _ } = e, v = h3(e, GBe), { id: y, scale: b } = m, x = h3(m, KBe);
return /*#__PURE__*/ B.createElement(o4, f3({}, v, x, {
ref: a,
labelRef: o,
@@ -70986,7 +71082,7 @@ function YBe(e) {
axisId: t
}));
}
-var XBe = {
+var $Be = {
allowDataOverflow: tZ.allowDataOverflow,
allowDecimals: tZ.allowDecimals,
allowDuplicatedCategory: tZ.allowDuplicatedCategory,
@@ -71011,8 +71107,8 @@ var XBe = {
width: tZ.width,
yAxisId: 0
}, g3 = /*#__PURE__*/ B.memo((e) => {
- var t = UB(e, XBe);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(JBe, {
+ var t = HB(e, $Be);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(ZBe, {
interval: t.interval,
id: t.yAxisId,
scale: t.scale,
@@ -71038,27 +71134,27 @@ var XBe = {
tick: t.tick,
tickFormatter: t.tickFormatter,
niceTicks: t.niceTicks
- }), /*#__PURE__*/ B.createElement(YBe, t));
+ }), /*#__PURE__*/ B.createElement(QBe, t));
}, o3);
g3.displayName = "YAxis";
var _3 = $([
(e, t) => t,
- wW,
- wq,
- Mq,
+ CW,
+ Cq,
+ jq,
JQ,
XQ,
- rMe,
- iW
-], uMe);
+ oMe,
+ rW
+], pMe);
//#endregion
//#region node_modules/recharts/es6/util/getRelativeCoordinate.js
-function ZBe(e) {
+function eVe(e) {
return "getBBox" in e.currentTarget && typeof e.currentTarget.getBBox == "function";
}
function v3(e) {
var t = e.currentTarget.getBoundingClientRect(), n, r;
- if (ZBe(e)) {
+ if (eVe(e)) {
var i = e.currentTarget.getBBox();
n = i.width > 0 ? t.width / i.width : 1, r = i.height > 0 ? t.height / i.height : 1;
} else {
@@ -71073,19 +71169,19 @@ function v3(e) {
}
//#endregion
//#region node_modules/recharts/es6/state/mouseEventsMiddleware.js
-var y3 = YH("mouseClick"), b3 = kU();
+var y3 = JH("mouseClick"), b3 = OU();
b3.startListening({
actionCreator: y3,
effect: (e, t) => {
var n = e.payload, r = _3(t.getState(), v3(n));
- r?.activeIndex != null && t.dispatch(_je({
+ r?.activeIndex != null && t.dispatch(bje({
activeIndex: r.activeIndex,
activeDataKey: void 0,
activeCoordinate: r.activeCoordinate
}));
}
});
-var x3 = YH("mouseMove"), S3 = kU(), C3 = null, w3 = null, T3 = null;
+var x3 = JH("mouseMove"), S3 = OU(), C3 = null, w3 = null, T3 = null;
S3.startListening({
actionCreator: x3,
effect: (e, t) => {
@@ -71116,7 +71212,7 @@ S3.startListening({
});
//#endregion
//#region node_modules/recharts/es6/state/reduxDevtoolsJsonStringifyReplacer.js
-function QBe(e, t) {
+function tVe(e, t) {
return t instanceof HTMLElement ? `HTMLElement <${t.tagName} class="${t.className}">` : t === window ? "global.window" : e === "children" && typeof t == "object" && t ? "<<CHILDREN>>" : t;
}
//#endregion
@@ -71133,17 +71229,17 @@ var E3 = {
syncMethod: "index",
baseValue: void 0,
reverseStackOrder: !1
-}, D3 = iU({
+}, D3 = rU({
name: "rootProps",
initialState: E3,
reducers: { updateOptions: (e, t) => {
e.accessibilityLayer = t.payload.accessibilityLayer, e.barCategoryGap = t.payload.barCategoryGap, e.barGap = t.payload.barGap ?? E3.barGap, e.barSize = t.payload.barSize, e.maxBarSize = t.payload.maxBarSize, e.stackOffset = t.payload.stackOffset, e.syncId = t.payload.syncId, e.syncMethod = t.payload.syncMethod, e.className = t.payload.className, e.baseValue = t.payload.baseValue, e.reverseStackOrder = t.payload.reverseStackOrder;
} }
-}), $Be = D3.reducer, { updateOptions: eVe } = D3.actions, O3 = iU({
+}), nVe = D3.reducer, { updateOptions: rVe } = D3.actions, O3 = rU({
name: "polarOptions",
initialState: null,
reducers: { updatePolarOptions: (e, t) => e === null ? t.payload : (e.startAngle = t.payload.startAngle, e.endAngle = t.payload.endAngle, e.cx = t.payload.cx, e.cy = t.payload.cy, e.innerRadius = t.payload.innerRadius, e.outerRadius = t.payload.outerRadius, e) }
-}), { updatePolarOptions: tVe } = O3.actions, nVe = O3.reducer, k3 = YH("keyDown"), A3 = YH("focus"), j3 = YH("blur"), M3 = kU(), N3 = null, P3 = null, F3 = null;
+}), { updatePolarOptions: iVe } = O3.actions, aVe = O3.reducer, k3 = JH("keyDown"), A3 = JH("focus"), j3 = JH("blur"), M3 = OU(), N3 = null, P3 = null, F3 = null;
M3.startListening({
actionCreator: k3,
effect: (e, t) => {
@@ -71168,7 +71264,7 @@ M3.startListening({
}));
return;
}
- var c = cje(e) === "left-to-right" ? 1 : -1, l = a + (r === "ArrowRight" ? 1 : -1) * c;
+ var c = dje(e) === "left-to-right" ? 1 : -1, l = a + (r === "ArrowRight" ? 1 : -1) * c;
if (o == null || l >= o.length || l < 0) return;
var u = _$(e, "axis", "hover", String(l));
t.dispatch(DQ({
@@ -71231,7 +71327,7 @@ function I3(e) {
}
//#endregion
//#region node_modules/recharts/es6/state/externalEventsMiddleware.js
-var L3 = YH("externalEvent"), R3 = kU(), z3 = /* @__PURE__ */ new Map(), B3 = /* @__PURE__ */ new Map(), V3 = /* @__PURE__ */ new Map();
+var L3 = JH("externalEvent"), R3 = OU(), z3 = /* @__PURE__ */ new Map(), B3 = /* @__PURE__ */ new Map(), V3 = /* @__PURE__ */ new Map();
R3.startListening({
actionCreator: L3,
effect: (e, t) => {
@@ -71251,12 +71347,12 @@ R3.startListening({
try {
if (!e) return;
var { handler: n, reactEvent: r } = e, a = t.getState(), o = {
- activeCoordinate: Uje(a),
+ activeCoordinate: Kje(a),
activeDataKey: r$(a),
activeIndex: t$(a),
activeLabel: n$(a),
activeTooltipIndex: t$(a),
- isTooltipActive: Wje(a)
+ isTooltipActive: qje(a)
};
n && n(o, r);
} finally {
@@ -71280,7 +71376,7 @@ R3.startListening({
}
}
});
-var rVe = $([
+var oVe = $([
$([FQ], (e) => e.tooltipItemPayloads),
(e, t) => t,
(e, t, n) => n
@@ -71292,7 +71388,7 @@ var rVe = $([
if (i != null) return i(t);
}
}
-}), H3 = YH("touchMove"), U3 = kU(), W3 = null, G3 = null, K3 = null, q3 = null;
+}), H3 = JH("touchMove"), U3 = OU(), W3 = null, G3 = null, K3 = null, q3 = null;
U3.startListening({
actionCreator: H3,
effect: (e, t) => {
@@ -71325,9 +71421,9 @@ U3.startListening({
if (document.elementFromPoint == null || a == null) return;
var o = document.elementFromPoint(a.clientX, a.clientY);
if (!o || !o.getAttribute) return;
- var s = o.getAttribute(Iwe), c = o.getAttribute("data-recharts-item-id") ?? void 0, l = VQ(e).find((e) => e.id === c);
+ var s = o.getAttribute(Bwe), c = o.getAttribute("data-recharts-item-id") ?? void 0, l = VQ(e).find((e) => e.id === c);
if (s == null || l == null || c == null) return;
- var { dataKey: u } = l, d = rVe(e, s, c);
+ var { dataKey: u } = l, d = oVe(e, s, c);
t.dispatch(CQ({
activeDataKey: u,
activeIndex: s,
@@ -71359,33 +71455,33 @@ var J3 = {
"scroll",
"wheel"
]
-}, Y3 = iU({
+}, Y3 = rU({
name: "eventSettings",
initialState: J3,
reducers: { setEventSettings: (e, t) => {
- t.payload.throttleDelay != null && (e.throttleDelay = t.payload.throttleDelay), t.payload.throttledEvents != null && (e.throttledEvents = hG(t.payload.throttledEvents));
+ t.payload.throttleDelay != null && (e.throttleDelay = t.payload.throttleDelay), t.payload.throttledEvents != null && (e.throttledEvents = mG(t.payload.throttledEvents));
} }
-}), { setEventSettings: iVe } = Y3.actions, aVe = Y3.reducer, oVe = LV({
- brush: CLe,
- cartesianAxis: uIe,
- chartData: LMe,
- errorBars: HRe,
- eventSettings: aVe,
- graphicalItems: BFe,
- layout: Cwe,
- legend: xTe,
- options: MMe,
- polarAxis: APe,
- polarOptions: nVe,
- referenceElements: PLe,
- renderedTicks: cRe,
- rootProps: $Be,
- tooltip: vje,
- zIndex: CMe
-}), sVe = function(e) {
+}), { setEventSettings: sVe } = Y3.actions, cVe = Y3.reducer, lVe = IV({
+ brush: ELe,
+ cartesianAxis: pIe,
+ chartData: BMe,
+ errorBars: GRe,
+ eventSettings: cVe,
+ graphicalItems: UFe,
+ layout: Dwe,
+ legend: TTe,
+ options: FMe,
+ polarAxis: NPe,
+ polarOptions: aVe,
+ referenceElements: LLe,
+ renderedTicks: dRe,
+ rootProps: nVe,
+ tooltip: xje,
+ zIndex: EMe
+}), uVe = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Chart";
- return YCe({
- reducer: oVe,
+ return $Ce({
+ reducer: lVe,
preloadedState: e,
middleware: (e) => e({
serializableCheck: !1,
@@ -71403,10 +71499,10 @@ var J3 = {
]),
enhancers: (e) => {
var t = e;
- return typeof e == "function" && (t = e()), t.concat(nU({ type: "raf" }));
+ return typeof e == "function" && (t = e()), t.concat(tU({ type: "raf" }));
},
- devTools: PG.devToolsEnabled && {
- serialize: { replacer: QBe },
+ devTools: NG.devToolsEnabled && {
+ serialize: { replacer: tVe },
name: `recharts-${t}`
}
});
@@ -71414,21 +71510,21 @@ var J3 = {
//#endregion
//#region node_modules/recharts/es6/state/RechartsStoreProvider.js
function X3(e) {
- var { preloadedState: t, children: n, reduxStoreName: r } = e, i = oW(), a = (0, B.useRef)(null);
+ var { preloadedState: t, children: n, reduxStoreName: r } = e, i = aW(), a = (0, B.useRef)(null);
if (i) return n;
- a.current ??= sVe(t, r);
- var o = vV;
- return /*#__PURE__*/ B.createElement(FTe, {
+ a.current ??= uVe(t, r);
+ var o = _V;
+ return /*#__PURE__*/ B.createElement(zTe, {
context: o,
store: a.current
}, n);
}
//#endregion
//#region node_modules/recharts/es6/state/ReportMainChartProps.js
-function cVe(e) {
- var { layout: t, margin: n } = e, r = yV(), i = oW();
+function dVe(e) {
+ var { layout: t, margin: n } = e, r = vV(), i = aW();
return (0, B.useEffect)(() => {
- i || (r(bwe(t)), r(ywe(n)));
+ i || (r(wwe(t)), r(Cwe(n)));
}, [
r,
i,
@@ -71436,31 +71532,31 @@ function cVe(e) {
n
]), null;
}
-var Z3 = /*#__PURE__*/ (0, B.memo)(cVe, CG);
+var Z3 = /*#__PURE__*/ (0, B.memo)(dVe, SG);
//#endregion
//#region node_modules/recharts/es6/state/ReportChartProps.js
function Q3(e) {
- var t = yV();
+ var t = vV();
return (0, B.useEffect)(() => {
- t(eVe(e));
+ t(rVe(e));
}, [t, e]), null;
}
var $3 = /*#__PURE__*/ (0, B.memo)((e) => {
- var t = yV();
+ var t = vV();
return (0, B.useEffect)(() => {
- t(iVe(e));
+ t(sVe(e));
}, [t, e]), null;
-}, CG);
+}, SG);
//#endregion
//#region node_modules/recharts/es6/zIndex/ZIndexPortal.js
function e6(e) {
- var { zIndex: t, isPanorama: n } = e, r = (0, B.useRef)(null), i = yV();
- return (0, B.useLayoutEffect)(() => (r.current && i(xMe({
+ var { zIndex: t, isPanorama: n } = e, r = (0, B.useRef)(null), i = vV();
+ return (0, B.useLayoutEffect)(() => (r.current && i(wMe({
zIndex: t,
element: r.current,
isPanorama: n
})), () => {
- i(SMe({
+ i(TMe({
zIndex: t,
isPanorama: n
}));
@@ -71475,7 +71571,7 @@ function e6(e) {
});
}
function t6(e) {
- var { children: t, isPanorama: n } = e, r = Q(fMe);
+ var { children: t, isPanorama: n } = e, r = Q(hMe);
if (!r || r.length === 0) return t;
var i = r.filter((e) => e < 0), a = r.filter((e) => e > 0);
return /*#__PURE__*/ B.createElement(B.Fragment, null, i.map((e) => /*#__PURE__*/ B.createElement(e6, {
@@ -71490,17 +71586,17 @@ function t6(e) {
}
//#endregion
//#region node_modules/recharts/es6/container/RootSurface.js
-var lVe = ["children"];
-function uVe(e, t) {
+var fVe = ["children"];
+function pVe(e, t) {
if (e == null) return {};
- var n, r, i = dVe(e, t);
+ var n, r, i = mVe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function dVe(e, t) {
+function mVe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -71518,46 +71614,46 @@ function n6() {
return e;
}, n6.apply(null, arguments);
}
-var fVe = {
+var hVe = {
width: "100%",
height: "100%",
display: "block"
-}, pVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = SW(), r = CW(), i = RG();
- if (!PU(n) || !PU(r)) return null;
+}, gVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var n = xW(), r = SW(), i = LG();
+ if (!NU(n) || !NU(r)) return null;
var { children: a, otherAttributes: o, title: s, desc: c } = e, l, u;
- return o != null && (l = typeof o.tabIndex == "number" ? o.tabIndex : i ? 0 : void 0, u = typeof o.role == "string" ? o.role : i ? "application" : void 0), /*#__PURE__*/ B.createElement(_z, n6({}, o, {
+ return o != null && (l = typeof o.tabIndex == "number" ? o.tabIndex : i ? 0 : void 0, u = typeof o.role == "string" ? o.role : i ? "application" : void 0), /*#__PURE__*/ B.createElement(gz, n6({}, o, {
title: s,
desc: c,
role: u,
tabIndex: l,
width: n,
height: r,
- style: fVe,
+ style: hVe,
ref: t
}), a);
-}), mVe = (e) => {
- var { children: t } = e, n = Q(cW);
+}), _Ve = (e) => {
+ var { children: t } = e, n = Q(sW);
if (!n) return null;
var { width: r, height: i, y: a, x: o } = n;
- return /*#__PURE__*/ B.createElement(_z, {
+ return /*#__PURE__*/ B.createElement(gz, {
width: r,
height: i,
x: o,
y: a
}, t);
}, r6 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { children: n } = e, r = uVe(e, lVe);
- return oW() ? /*#__PURE__*/ B.createElement(mVe, null, /*#__PURE__*/ B.createElement(t6, { isPanorama: !0 }, n)) : /*#__PURE__*/ B.createElement(pVe, n6({ ref: t }, r), /*#__PURE__*/ B.createElement(t6, { isPanorama: !1 }, n));
+ var { children: n } = e, r = pVe(e, fVe);
+ return aW() ? /*#__PURE__*/ B.createElement(_Ve, null, /*#__PURE__*/ B.createElement(t6, { isPanorama: !0 }, n)) : /*#__PURE__*/ B.createElement(gVe, n6({ ref: t }, r), /*#__PURE__*/ B.createElement(t6, { isPanorama: !1 }, n));
});
//#endregion
//#region node_modules/recharts/es6/util/useReportScale.js
-function hVe() {
- var e = yV(), [t, n] = (0, B.useState)(null), r = Q(Fwe);
+function vVe() {
+ var e = vV(), [t, n] = (0, B.useState)(null), r = Q(zwe);
return (0, B.useEffect)(() => {
if (t != null) {
var n = t.getBoundingClientRect().width / t.offsetWidth;
- NU(n) && n !== r && e(Swe(n));
+ MU(n) && n !== r && e(Ewe(n));
}
}, [
t,
@@ -71577,30 +71673,30 @@ function i6(e, t) {
}
return n;
}
-function gVe(e) {
+function yVe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? i6(Object(n), !0).forEach(function(t) {
- _Ve(e, t, n[t]);
+ bVe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : i6(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function _Ve(e, t, n) {
- return (t = vVe(t)) in e ? Object.defineProperty(e, t, {
+function bVe(e, t, n) {
+ return (t = xVe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function vVe(e) {
- var t = yVe(e, "string");
+function xVe(e) {
+ var t = SVe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function yVe(e, t) {
+function SVe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -71619,7 +71715,7 @@ function a6() {
return e;
}, a6.apply(null, arguments);
}
-var bVe = () => (KMe(), null);
+var CVe = () => (YMe(), null);
function o6(e) {
if (typeof e == "number") return e;
if (typeof e == "string") {
@@ -71628,7 +71724,7 @@ function o6(e) {
}
return 0;
}
-var xVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+var wVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var n = (0, B.useRef)(null), [r, i] = (0, B.useState)({
containerWidth: o6(e.style?.width),
containerHeight: o6(e.style?.height)
@@ -71656,11 +71752,11 @@ var xVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
}, [t, a]);
return (0, B.useEffect)(() => () => {
n.current?.disconnect();
- }, [a]), /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(kW, {
+ }, [a]), /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(OW, {
width: r.containerWidth,
height: r.containerHeight
}), /*#__PURE__*/ B.createElement("div", a6({ ref: o }, e)));
-}), SVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}), TVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { width: n, height: r } = e, [i, a] = (0, B.useState)({
containerWidth: o6(n),
containerHeight: o6(r)
@@ -71678,32 +71774,32 @@ var xVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
o(n, r);
}
}, [t, o]);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(kW, {
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(OW, {
width: i.containerWidth,
height: i.containerHeight
}), /*#__PURE__*/ B.createElement("div", a6({ ref: s }, e)));
-}), CVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}), EVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { width: n, height: r } = e;
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(kW, {
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(OW, {
width: n,
height: r
}), /*#__PURE__*/ B.createElement("div", a6({ ref: t }, e)));
-}), wVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}), DVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { width: n, height: r } = e;
- return typeof n == "string" || typeof r == "string" ? /*#__PURE__*/ B.createElement(SVe, a6({}, e, { ref: t })) : typeof n == "number" && typeof r == "number" ? /*#__PURE__*/ B.createElement(CVe, a6({}, e, {
+ return typeof n == "string" || typeof r == "string" ? /*#__PURE__*/ B.createElement(TVe, a6({}, e, { ref: t })) : typeof n == "number" && typeof r == "number" ? /*#__PURE__*/ B.createElement(EVe, a6({}, e, {
width: n,
height: r,
ref: t
- })) : /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(kW, {
+ })) : /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(OW, {
width: n,
height: r
}), /*#__PURE__*/ B.createElement("div", a6({ ref: t }, e)));
});
-function TVe(e) {
- return e ? xVe : wVe;
+function OVe(e) {
+ return e ? wVe : DVe;
}
-var EVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { children: n, className: r, height: i, onClick: a, onContextMenu: o, onDoubleClick: s, onMouseDown: c, onMouseEnter: l, onMouseLeave: u, onMouseMove: d, onMouseUp: f, onTouchEnd: p, onTouchMove: m, onTouchStart: h, style: g, width: _, responsive: v, dispatchTouchEvents: y = !0 } = e, b = (0, B.useRef)(null), x = yV(), [S, C] = (0, B.useState)(null), [w, T] = (0, B.useState)(null), E = hVe(), D = _W(), O = D?.width > 0 ? D.width : _, k = D?.height > 0 ? D.height : i, A = (0, B.useCallback)((e) => {
+var kVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { children: n, className: r, height: i, onClick: a, onContextMenu: o, onDoubleClick: s, onMouseDown: c, onMouseEnter: l, onMouseLeave: u, onMouseMove: d, onMouseUp: f, onTouchEnd: p, onTouchMove: m, onTouchStart: h, style: g, width: _, responsive: v, dispatchTouchEvents: y = !0 } = e, b = (0, B.useRef)(null), x = vV(), [S, C] = (0, B.useState)(null), [w, T] = (0, B.useState)(null), E = vVe(), D = gW(), O = D?.width > 0 ? D.width : _, k = D?.height > 0 ? D.height : i, A = (0, B.useCallback)((e) => {
E(e), typeof t == "function" && t(e), C(e), T(e), e != null && (b.current = e);
}, [
E,
@@ -71775,12 +71871,12 @@ var EVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
handler: p,
reactEvent: e
}));
- }, [x, p]), ce = TVe(v);
- return /*#__PURE__*/ B.createElement(E$.Provider, { value: S }, /*#__PURE__*/ B.createElement(bz.Provider, { value: w }, /*#__PURE__*/ B.createElement(ce, {
+ }, [x, p]), ce = OVe(v);
+ return /*#__PURE__*/ B.createElement(E$.Provider, { value: S }, /*#__PURE__*/ B.createElement(yz.Provider, { value: w }, /*#__PURE__*/ B.createElement(ce, {
width: O ?? g?.width,
height: k ?? g?.height,
className: _h("recharts-wrapper", r),
- style: gVe({
+ style: yVe({
position: "relative",
cursor: "default",
width: O,
@@ -71801,8 +71897,8 @@ var EVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
onTouchMove: oe,
onTouchStart: ae,
ref: A
- }, /*#__PURE__*/ B.createElement(bVe, null), n)));
-}), DVe = [
+ }, /*#__PURE__*/ B.createElement(CVe, null), n)));
+}), AVe = [
"width",
"height",
"responsive",
@@ -71813,16 +71909,16 @@ var EVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
"title",
"desc"
];
-function OVe(e, t) {
+function jVe(e, t) {
if (e == null) return {};
- var n, r, i = kVe(e, t);
+ var n, r, i = MVe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function kVe(e, t) {
+function MVe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -71832,15 +71928,15 @@ function kVe(e, t) {
return n;
}
var s6 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { width: n, height: r, responsive: i, children: a, className: o, style: s, compact: c, title: l, desc: u } = e, d = pz(OVe(e, DVe));
- return c ? /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(kW, {
+ var { width: n, height: r, responsive: i, children: a, className: o, style: s, compact: c, title: l, desc: u } = e, d = fz(jVe(e, AVe));
+ return c ? /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(OW, {
width: n,
height: r
}), /*#__PURE__*/ B.createElement(r6, {
otherAttributes: d,
title: l,
desc: u
- }, a)) : /*#__PURE__*/ B.createElement(EVe, {
+ }, a)) : /*#__PURE__*/ B.createElement(kVe, {
className: o,
style: s,
width: n,
@@ -71862,7 +71958,7 @@ var s6 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
title: l,
desc: u,
ref: t
- }, /*#__PURE__*/ B.createElement(FLe, null, a)));
+ }, /*#__PURE__*/ B.createElement(RLe, null, a)));
});
//#endregion
//#region node_modules/recharts/es6/chart/CartesianChart.js
@@ -71885,30 +71981,30 @@ function l6(e, t) {
}
return n;
}
-function AVe(e) {
+function NVe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? l6(Object(n), !0).forEach(function(t) {
- jVe(e, t, n[t]);
+ PVe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : l6(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function jVe(e, t, n) {
- return (t = MVe(t)) in e ? Object.defineProperty(e, t, {
+function PVe(e, t, n) {
+ return (t = FVe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function MVe(e) {
- var t = NVe(e, "string");
+function FVe(e) {
+ var t = IVe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function NVe(e, t) {
+function IVe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -71918,7 +72014,7 @@ function NVe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var PVe = AVe({
+var LVe = NVe({
accessibilityLayer: !0,
barCategoryGap: "10%",
barGap: 4,
@@ -71934,7 +72030,7 @@ var PVe = AVe({
stackOffset: "none",
syncMethod: "index"
}, J3), u6 = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- var n = UB(e.categoricalChartProps, PVe), { chartName: r, defaultTooltipEventType: i, validateTooltipEventTypes: a, tooltipPayloadSearcher: o, categoricalChartProps: s } = e, c = {
+ var n = HB(e.categoricalChartProps, LVe), { chartName: r, defaultTooltipEventType: i, validateTooltipEventTypes: a, tooltipPayloadSearcher: o, categoricalChartProps: s } = e, c = {
chartName: r,
defaultTooltipEventType: i,
validateTooltipEventTypes: a,
@@ -71963,32 +72059,32 @@ var PVe = AVe({
className: n.className,
reverseStackOrder: n.reverseStackOrder
}), /*#__PURE__*/ B.createElement(s6, c6({}, n, { ref: t })));
-}), FVe = ["axis"], IVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(u6, {
+}), RVe = ["axis"], zVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(u6, {
chartName: "LineChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: FVe,
+ validateTooltipEventTypes: RVe,
tooltipPayloadSearcher: A$,
categoricalChartProps: e,
ref: t
-})), LVe = ["axis", "item"], d6 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(u6, {
+})), BVe = ["axis", "item"], d6 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(u6, {
chartName: "BarChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: LVe,
+ validateTooltipEventTypes: BVe,
tooltipPayloadSearcher: A$,
categoricalChartProps: e,
ref: t
}));
//#endregion
//#region node_modules/recharts/es6/state/ReportPolarOptions.js
-function RVe(e) {
- var t = yV();
+function VVe(e) {
+ var t = vV();
return (0, B.useEffect)(() => {
- t(tVe(e));
+ t(iVe(e));
}, [t, e]), null;
}
//#endregion
//#region node_modules/recharts/es6/chart/PolarChart.js
-var zVe = ["layout"];
+var HVe = ["layout"];
function f6() {
return f6 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -71998,16 +72094,16 @@ function f6() {
return e;
}, f6.apply(null, arguments);
}
-function BVe(e, t) {
+function UVe(e, t) {
if (e == null) return {};
- var n, r, i = VVe(e, t);
+ var n, r, i = WVe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function VVe(e, t) {
+function WVe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -72026,30 +72122,30 @@ function p6(e, t) {
}
return n;
}
-function HVe(e) {
+function GVe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? p6(Object(n), !0).forEach(function(t) {
- UVe(e, t, n[t]);
+ KVe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : p6(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function UVe(e, t, n) {
- return (t = WVe(t)) in e ? Object.defineProperty(e, t, {
+function KVe(e, t, n) {
+ return (t = qVe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function WVe(e) {
- var t = GVe(e, "string");
+function qVe(e) {
+ var t = JVe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function GVe(e, t) {
+function JVe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -72059,7 +72155,7 @@ function GVe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var m6 = HVe({
+var m6 = GVe({
accessibilityLayer: !0,
stackOffset: "none",
barCategoryGap: "10%",
@@ -72079,7 +72175,7 @@ var m6 = HVe({
innerRadius: 0,
outerRadius: "80%"
}, J3), h6 = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- var n = UB(e.categoricalChartProps, m6), { layout: r } = n, i = BVe(n, zVe), { chartName: a, defaultTooltipEventType: o, validateTooltipEventTypes: s, tooltipPayloadSearcher: c } = e, l = {
+ var n = HB(e.categoricalChartProps, m6), { layout: r } = n, i = UVe(n, HVe), { chartName: a, defaultTooltipEventType: o, validateTooltipEventTypes: s, tooltipPayloadSearcher: c } = e, l = {
chartName: a,
defaultTooltipEventType: o,
validateTooltipEventTypes: s,
@@ -72107,7 +72203,7 @@ var m6 = HVe({
syncMethod: n.syncMethod,
className: n.className,
reverseStackOrder: n.reverseStackOrder
- }), /*#__PURE__*/ B.createElement(RVe, {
+ }), /*#__PURE__*/ B.createElement(VVe, {
cx: n.cx,
cy: n.cy,
startAngle: n.startAngle,
@@ -72132,26 +72228,26 @@ function _6(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? g6(Object(n), !0).forEach(function(t) {
- KVe(e, t, n[t]);
+ YVe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : g6(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function KVe(e, t, n) {
- return (t = qVe(t)) in e ? Object.defineProperty(e, t, {
+function YVe(e, t, n) {
+ return (t = XVe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function qVe(e) {
- var t = JVe(e, "string");
+function XVe(e) {
+ var t = ZVe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function JVe(e, t) {
+function ZVe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -72161,24 +72257,24 @@ function JVe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var YVe = ["axis"], XVe = _6(_6({}, m6), {}, {
+var QVe = ["axis"], $Ve = _6(_6({}, m6), {}, {
layout: "centric",
startAngle: 90,
endAngle: -270
-}), ZVe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = UB(e, XVe);
+}), eHe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var n = HB(e, $Ve);
return /*#__PURE__*/ B.createElement(h6, {
chartName: "RadarChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: YVe,
+ validateTooltipEventTypes: QVe,
tooltipPayloadSearcher: A$,
categoricalChartProps: n,
ref: t
});
-}), QVe = ["axis"], $Ve = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(u6, {
+}), tHe = ["axis"], nHe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(u6, {
chartName: "AreaChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: QVe,
+ validateTooltipEventTypes: tHe,
tooltipPayloadSearcher: A$,
categoricalChartProps: e,
ref: t
@@ -72199,26 +72295,26 @@ function y6(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? v6(Object(n), !0).forEach(function(t) {
- eHe(e, t, n[t]);
+ rHe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : v6(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function eHe(e, t, n) {
- return (t = tHe(t)) in e ? Object.defineProperty(e, t, {
+function rHe(e, t, n) {
+ return (t = iHe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function tHe(e) {
- var t = nHe(e, "string");
+function iHe(e) {
+ var t = aHe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function nHe(e, t) {
+function aHe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -72228,16 +72324,16 @@ function nHe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var rHe = ["axis", "item"], iHe = y6(y6({}, m6), {}, {
+var oHe = ["axis", "item"], sHe = y6(y6({}, m6), {}, {
layout: "radial",
startAngle: 0,
endAngle: 360
-}), aHe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = UB(e, iHe);
+}), cHe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var n = HB(e, sHe);
return /*#__PURE__*/ B.createElement(h6, {
chartName: "RadialBarChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: rHe,
+ validateTooltipEventTypes: oHe,
tooltipPayloadSearcher: A$,
categoricalChartProps: n,
ref: t
@@ -72254,7 +72350,7 @@ var x6 = {
light: "",
dark: ".dark"
}, S6 = Object.keys(x6);
-function oHe(e) {
+function lHe(e) {
for (let [t, n] of Object.entries(e)) if (n.colors && !S6.some((e) => n.colors?.[e] !== void 0)) throw Error(`[EvilCharts] Invalid chart config for "${t}": colors object must have at least one theme key (${S6.join(", ")}). Received empty object or invalid keys.`);
}
var C6 = B.createContext(null);
@@ -72268,7 +72364,7 @@ function T6({ id: e, config: t, initialDimension: n = {
height: 200
}, className: r, children: i, footer: a, ...o }) {
let s = B.useId(), c = `chart-${e ?? s.replace(/:/g, "")}`;
- return oHe(t), /* @__PURE__ */ (0, V.jsx)(C6.Provider, {
+ return lHe(t), /* @__PURE__ */ (0, V.jsx)(C6.Provider, {
value: { config: t },
children: /* @__PURE__ */ (0, V.jsxs)("div", {
"data-slot": "chart",
@@ -72280,7 +72376,7 @@ function T6({ id: e, config: t, initialDimension: n = {
id: c,
config: t
}),
- /* @__PURE__ */ (0, V.jsx)(vW, {
+ /* @__PURE__ */ (0, V.jsx)(_W, {
className: "min-h-0 w-full flex-1",
initialDimension: n,
children: i
@@ -72299,7 +72395,7 @@ function E6({ isLoading: e }) {
})
}) : null;
}
-function sHe(e, t) {
+function uHe(e, t) {
let n = e.length;
if (n >= t) return e.slice(0, t);
let r = [], i = Math.floor(t / n), a = t % n;
@@ -72314,7 +72410,7 @@ var D6 = ({ id: e, config: t }) => {
if (!n.length) return null;
let r = (e) => n.flatMap(([t, n]) => {
let r = n.colors?.[e];
- return !r || !Array.isArray(r) || r.length === 0 ? [] : sHe(r, k6(n)).map((e, n) => ` --color-${t}-${n}: ${e};`);
+ return !r || !Array.isArray(r) || r.length === 0 ? [] : uHe(r, k6(n)).map((e, n) => ` --color-${t}-${n}: ${e};`);
}).filter(Boolean).join("\n"), i = Object.entries(x6).map(([t, n]) => `${n} [data-chart=${e}] {\n${r(t)}\n}`).join("\n");
return /* @__PURE__ */ (0, V.jsx)("style", { dangerouslySetInnerHTML: { __html: i } });
};
@@ -72328,15 +72424,15 @@ function k6(e) {
let t = S6.map((t) => e.colors?.[t]?.length ?? 0);
return Math.max(...t, 1);
}
-var cHe = (e = 10, t = 0, n = 70) => {
+var dHe = (e = 10, t = 0, n = 70) => {
let r = n - t;
return Array.from({ length: e }, () => ({ loading: Math.floor(Math.random() * r) + t }));
-}, lHe = {
+}, fHe = {
sm: "rounded-sm",
md: "rounded-md",
lg: "rounded-lg",
xl: "rounded-xl"
-}, uHe = {
+}, pHe = {
default: "bg-background",
"frosted-glass": "bg-background/70 backdrop-blur-sm"
};
@@ -72363,7 +72459,7 @@ function A6({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
if (!e || !t?.length) return /* @__PURE__ */ (0, V.jsx)("span", { className: "p-4" });
let _ = t.length === 1 && r !== "dot";
return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: b6("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs shadow-xl", lHe[p], uHe[m], n),
+ className: b6("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs shadow-xl", fHe[p], pHe[m], n),
children: [_ ? null : g, /* @__PURE__ */ (0, V.jsx)("div", {
className: "grid gap-1.5",
children: t.filter((e) => e.type !== "none").map((e, t) => {
@@ -72377,7 +72473,7 @@ function A6({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
"w-0 border-[1.5px] border-dashed bg-transparent!": r === "dashed",
"my-0.5": _ && r === "dashed"
}),
- style: dHe(n, o)
+ style: mHe(n, o)
}), /* @__PURE__ */ (0, V.jsxs)("div", {
className: b6("flex flex-1 justify-between gap-4 leading-none", _ ? "items-end" : "items-center"),
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -72396,10 +72492,10 @@ function A6({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
})]
});
}
-function dHe(e, t) {
+function mHe(e, t) {
return t <= 1 ? { background: `var(--color-${e}-0)` } : { background: `linear-gradient(to right, ${Array.from({ length: t }, (n, r) => `var(--color-${e}-${r}) ${r / (t - 1) * 100}%`).join(", ")})` };
}
-var j6 = ({ animationDuration: e = 200, ...t }) => /* @__PURE__ */ (0, V.jsx)(eNe, {
+var j6 = ({ animationDuration: e = 200, ...t }) => /* @__PURE__ */ (0, V.jsx)(rNe, {
animationDuration: e,
...t
});
@@ -72416,7 +72512,7 @@ function M6({ className: e, hideIcon: t = !1, nameKey: n, payload: r, verticalAl
onClick: () => {
c && s?.(o === r ? null : r);
},
- children: [i?.icon && !t ? /* @__PURE__ */ (0, V.jsx)(i.icon, {}) : /* @__PURE__ */ (0, V.jsx)(fHe, {
+ children: [i?.icon && !t ? /* @__PURE__ */ (0, V.jsx)(i.icon, {}) : /* @__PURE__ */ (0, V.jsx)(hHe, {
variant: l,
dataKey: r,
colorsCount: d
@@ -72425,8 +72521,8 @@ function M6({ className: e, hideIcon: t = !1, nameKey: n, payload: r, verticalAl
})
}) : null;
}
-function fHe({ variant: e, dataKey: t, colorsCount: n }) {
- let r = pHe(t, n), i = mHe(t, n);
+function hHe({ variant: e, dataKey: t, colorsCount: n }) {
+ let r = gHe(t, n), i = _He(t, n);
switch (e) {
case "square": return /* @__PURE__ */ (0, V.jsx)("div", {
className: "h-2 w-2 shrink-0",
@@ -72458,10 +72554,10 @@ function fHe({ variant: e, dataKey: t, colorsCount: n }) {
});
}
}
-function pHe(e, t) {
+function gHe(e, t) {
return t <= 1 ? { backgroundColor: `var(--color-${e}-0)` } : { background: `linear-gradient(to right, ${Array.from({ length: t }, (n, r) => `var(--color-${e}-${r}) ${r / (t - 1) * 100}%`).join(", ")})` };
}
-function mHe(e, t) {
+function _He(e, t) {
let n = {
WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
WebkitMaskComposite: "xor",
@@ -72476,12 +72572,12 @@ function mHe(e, t) {
...n
};
}
-var N6 = DG, P6 = () => null, F6 = {
+var N6 = EG, P6 = () => null, F6 = {
stiffness: 300,
damping: 35,
mass: .8
};
-function hHe({ range: e, totalPoints: t, containerRef: n, commit: r }) {
+function vHe({ range: e, totalPoints: t, containerRef: n, commit: r }) {
let i = B.useRef(null), [a, o] = B.useState(!1), s = (0, B.useCallback)((e) => !n.current || t <= 1 ? 0 : Math.round(e / n.current.getBoundingClientRect().width * (t - 1)), [t, n]), c = (0, B.useCallback)((t, n) => {
t.preventDefault(), t.target.setPointerCapture(t.pointerId), i.current = {
type: n,
@@ -72527,7 +72623,7 @@ function hHe({ range: e, totalPoints: t, containerRef: n, commit: r }) {
])
};
}
-function gHe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "area", height: a = 56, className: o, stacked: s = !1, strokeVariant: c = "solid", connectNulls: l = !1, barRadius: u, startIndex: d, endIndex: f, defaultStartIndex: p = 0, defaultEndIndex: m, onChange: h, formatLabel: g, curveType: _ = "monotone", minSpan: v = 2, showLabels: y = !0, skipStyle: b = !1 }) {
+function yHe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "area", height: a = 56, className: o, stacked: s = !1, strokeVariant: c = "solid", connectNulls: l = !1, barRadius: u, startIndex: d, endIndex: f, defaultStartIndex: p = 0, defaultEndIndex: m, onChange: h, formatLabel: g, curveType: _ = "monotone", minSpan: v = 2, showLabels: y = !0, skipStyle: b = !1 }) {
let x = B.useRef(null), S = B.useMemo(() => n ?? Object.keys(t), [n, t]), C = e.length, w = B.useId().replace(/:/g, ""), T = d !== void 0 && f !== void 0, [E, D] = B.useState(() => ({
startIndex: Math.max(0, Math.min(p, C - 1)),
endIndex: Math.max(0, Math.min(m ?? C - 1, C - 1))
@@ -72561,7 +72657,7 @@ function gHe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
startIndex: n,
endIndex: r
};
- }, [C, v]), { isDragging: A, bind: j } = hHe({
+ }, [C, v]), { isDragging: A, bind: j } = vHe({
range: E,
totalPoints: C,
containerRef: x,
@@ -72617,7 +72713,7 @@ function gHe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
}),
/* @__PURE__ */ (0, V.jsx)("div", {
className: "absolute inset-0 overflow-hidden rounded-md",
- children: /* @__PURE__ */ (0, V.jsx)(_He, {
+ children: /* @__PURE__ */ (0, V.jsx)(bHe, {
data: e,
keys: S,
chartConfig: t,
@@ -72686,7 +72782,7 @@ function I6({ side: e, position: t, label: n, bind: r }) {
})]
});
}
-function _He({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chartId: a, stacked: o, strokeVariant: s = "solid", connectNulls: c = !1, barRadius: l }) {
+function bHe({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chartId: a, stacked: o, strokeVariant: s = "solid", connectNulls: c = !1, barRadius: l }) {
let u = B.useMemo(() => Object.entries(n).filter(([e]) => t.includes(e)).map(([e, t]) => ({
dataKey: e,
colorsCount: k6(t)
@@ -72743,10 +72839,10 @@ function _He({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
})
})] })] }, e);
})] });
- if (r === "line") return /* @__PURE__ */ (0, V.jsx)(vW, {
+ if (r === "line") return /* @__PURE__ */ (0, V.jsx)(_W, {
width: "100%",
height: "100%",
- children: /* @__PURE__ */ (0, V.jsxs)(IVe, {
+ children: /* @__PURE__ */ (0, V.jsxs)(zVe, {
data: e,
margin: {
top: 4,
@@ -72770,7 +72866,7 @@ function _He({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
});
if (r === "bar") {
let n = l ?? 3;
- return /* @__PURE__ */ (0, V.jsx)(vW, {
+ return /* @__PURE__ */ (0, V.jsx)(_W, {
width: "100%",
height: "100%",
children: /* @__PURE__ */ (0, V.jsxs)(d6, {
@@ -72799,10 +72895,10 @@ function _He({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
})
});
}
- return /* @__PURE__ */ (0, V.jsx)(vW, {
+ return /* @__PURE__ */ (0, V.jsx)(_W, {
width: "100%",
height: "100%",
- children: /* @__PURE__ */ (0, V.jsxs)($Ve, {
+ children: /* @__PURE__ */ (0, V.jsxs)(nHe, {
data: e,
margin: {
top: 4,
@@ -72828,7 +72924,7 @@ function _He({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
})
});
}
-function vHe({ data: e, defaultStartIndex: t = 0, defaultEndIndex: n }) {
+function xHe({ data: e, defaultStartIndex: t = 0, defaultEndIndex: n }) {
let [r, i] = B.useState({
startIndex: t,
endIndex: n ?? Math.max(0, e.length - 1)
@@ -72852,7 +72948,7 @@ function vHe({ data: e, defaultStartIndex: t = 0, defaultEndIndex: n }) {
}
};
}
-var yHe = {
+var SHe = {
dots: ({ id: e }) => /* @__PURE__ */ (0, V.jsx)("pattern", {
id: e,
x: "0",
@@ -73025,7 +73121,7 @@ var yHe = {
})
};
function L6({ variant: e }) {
- let t = (0, B.useId)().replace(/:/g, ""), n = `${t}-bg-${e}`, r = `${t}-bg-edge-fade`, i = `${t}-bg-blur`, a = yHe[e];
+ let t = (0, B.useId)().replace(/:/g, ""), n = `${t}-bg-${e}`, r = `${t}-bg-edge-fade`, i = `${t}-bg-blur`, a = SHe[e];
return /* @__PURE__ */ (0, V.jsxs)(S$, {
zIndex: -1,
children: [/* @__PURE__ */ (0, V.jsxs)("defs", { children: [
@@ -73056,7 +73152,7 @@ function L6({ variant: e }) {
}
//#endregion
//#region src/react/evilcharts/registry/charts/recharts-bar-chart.tsx
-var R6 = 2, bHe = "loading", xHe = 2e3, SHe = "evil-stacked", CHe = .5, wHe = .05, THe = [
+var R6 = 2, CHe = "loading", wHe = 2e3, THe = "evil-stacked", EHe = .5, DHe = .05, OHe = [
0,
.7,
.5,
@@ -73068,7 +73164,7 @@ function B6() {
return e;
}
function V6({ config: e, data: t, children: n, className: r, chartProps: i, stackType: a = "default", layout: o = "vertical", barRadius: s = R6, animationType: c = "left-to-right", barGap: l, barCategoryGap: u, backgroundVariant: d, defaultSelectedDataKey: f = null, onSelectionChange: p, isLoading: m = !1, loadingBars: h, xDataKey: g }) {
- let _ = (0, B.useId)().replace(/:/g, ""), [v] = (0, B.useState)(() => Date.now()), [y, b] = (0, B.useState)(f), [x, S] = (0, B.useState)(!1), { loadingData: C, onShimmerExit: w } = WHe(m, h), { visibleData: T, brushProps: E } = vHe({ data: t }), D = (0, B.useMemo)(() => {
+ let _ = (0, B.useId)().replace(/:/g, ""), [v] = (0, B.useState)(() => Date.now()), [y, b] = (0, B.useState)(f), [x, S] = (0, B.useState)(!1), { loadingData: C, onShimmerExit: w } = qHe(m, h), { visibleData: T, brushProps: E } = xHe({ data: t }), D = (0, B.useMemo)(() => {
let e = B.Children.toArray(n), t = e.find((e) => (0, B.isValidElement)(e) && e.type === P6), r = (0, B.isValidElement)(t) ? t.props : {};
return {
slot: {
@@ -73111,7 +73207,7 @@ function V6({ config: e, data: t, children: n, className: r, chartProps: i, stac
children: /* @__PURE__ */ (0, V.jsxs)(T6, {
className: r,
config: e,
- footer: O && !m && /* @__PURE__ */ (0, V.jsx)(gHe, {
+ footer: O && !m && /* @__PURE__ */ (0, V.jsx)(yHe, {
data: t,
chartConfig: e,
xDataKey: g,
@@ -73142,7 +73238,7 @@ function V6({ config: e, data: t, children: n, className: r, chartProps: i, stac
d && /* @__PURE__ */ (0, V.jsx)(L6, { variant: d }),
/* @__PURE__ */ (0, V.jsx)(Y2, { color: "white" }),
D.chartChildren,
- m && /* @__PURE__ */ (0, V.jsx)(GHe, {
+ m && /* @__PURE__ */ (0, V.jsx)(JHe, {
chartId: _,
onShimmerExit: w
})
@@ -73151,7 +73247,7 @@ function V6({ config: e, data: t, children: n, className: r, chartProps: i, stac
})
});
}
-function EHe({ dataKey: e, variant: t = "default", radius: n, animationType: r, isClickable: i = !1, enableHoverHighlight: a = !1, glowing: o = !1, bufferBar: s = !1, barProps: c }) {
+function kHe({ dataKey: e, variant: t = "default", radius: n, animationType: r, isClickable: i = !1, enableHoverHighlight: a = !1, glowing: o = !1, bufferBar: s = !1, barProps: c }) {
let { config: l, isStacked: u, isHorizontal: d, isLoading: f, barRadius: p, animationType: m, introStartedAt: h, dataLength: g, selectedDataKey: _, selectDataKey: v, isMouseInChart: y } = B6(), b = (0, B.useId)().replace(/:/g, ""), x = Xf();
if (f) return null;
let S = n ?? p, C = _ === e, w = x ? "none" : r ?? m, T = {
@@ -73174,7 +73270,7 @@ function EHe({ dataKey: e, variant: t = "default", radius: n, animationType: r,
};
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(r3, {
dataKey: e,
- stackId: u ? SHe : void 0,
+ stackId: u ? THe : void 0,
fill: `url(#${b}-colors-${e})`,
radius: S,
isAnimationActive: !1,
@@ -73191,44 +73287,44 @@ function EHe({ dataKey: e, variant: t = "default", radius: n, animationType: r,
}),
...c
}), /* @__PURE__ */ (0, V.jsxs)("defs", { children: [
- /* @__PURE__ */ (0, V.jsx)(FHe, {
+ /* @__PURE__ */ (0, V.jsx)(RHe, {
id: b,
dataKey: e,
config: l
}),
- t === "hatched" && /* @__PURE__ */ (0, V.jsx)(IHe, {
+ t === "hatched" && /* @__PURE__ */ (0, V.jsx)(zHe, {
id: b,
dataKey: e
}),
- t === "duotone" && /* @__PURE__ */ (0, V.jsx)(RHe, {
+ t === "duotone" && /* @__PURE__ */ (0, V.jsx)(VHe, {
id: b,
dataKey: e,
config: l
}),
- t === "duotone-reverse" && /* @__PURE__ */ (0, V.jsx)(zHe, {
+ t === "duotone-reverse" && /* @__PURE__ */ (0, V.jsx)(HHe, {
id: b,
dataKey: e,
config: l
}),
- t === "gradient" && /* @__PURE__ */ (0, V.jsx)(BHe, {
+ t === "gradient" && /* @__PURE__ */ (0, V.jsx)(UHe, {
id: b,
dataKey: e
}),
- t === "stripped" && /* @__PURE__ */ (0, V.jsx)(VHe, {
+ t === "stripped" && /* @__PURE__ */ (0, V.jsx)(WHe, {
id: b,
dataKey: e
}),
- s && /* @__PURE__ */ (0, V.jsx)(LHe, {
+ s && /* @__PURE__ */ (0, V.jsx)(BHe, {
id: b,
dataKey: e
}),
- o && /* @__PURE__ */ (0, V.jsx)(HHe, {
+ o && /* @__PURE__ */ (0, V.jsx)(GHe, {
id: b,
dataKey: e
})
] })] });
}
-function DHe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, type: i, ...a }) {
+function AHe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, type: i, ...a }) {
let { isLoading: o, isHorizontal: s } = B6();
return o ? null : /* @__PURE__ */ (0, V.jsx)(d3, {
tickLine: e,
@@ -73239,7 +73335,7 @@ function DHe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap
...a
});
}
-function OHe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, width: i = "auto", type: a, ...o }) {
+function jHe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, width: i = "auto", type: a, ...o }) {
let { isLoading: s, isHorizontal: c } = B6();
return s ? null : /* @__PURE__ */ (0, V.jsx)(g3, {
tickLine: e,
@@ -73251,7 +73347,7 @@ function OHe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap
...o
});
}
-function kHe({ strokeDasharray: e = "3 3", vertical: t, horizontal: n, ...r }) {
+function MHe({ strokeDasharray: e = "3 3", vertical: t, horizontal: n, ...r }) {
let { isHorizontal: i } = B6();
return /* @__PURE__ */ (0, V.jsx)(f4, {
strokeDasharray: e,
@@ -73260,7 +73356,7 @@ function kHe({ strokeDasharray: e = "3 3", vertical: t, horizontal: n, ...r }) {
...r
});
}
-function AHe({ variant: e, roundness: t, defaultIndex: n }) {
+function NHe({ variant: e, roundness: t, defaultIndex: n }) {
let { isLoading: r, selectedDataKey: i } = B6();
return r ? null : /* @__PURE__ */ (0, V.jsx)(j6, {
cursor: !1,
@@ -73272,7 +73368,7 @@ function AHe({ variant: e, roundness: t, defaultIndex: n }) {
})
});
}
-function jHe({ variant: e, align: t = "right", verticalAlign: n = "top", isClickable: r = !1 }) {
+function PHe({ variant: e, align: t = "right", verticalAlign: n = "top", isClickable: r = !1 }) {
let { selectedDataKey: i, selectDataKey: a } = B6();
return /* @__PURE__ */ (0, V.jsx)(N6, {
verticalAlign: n,
@@ -73286,7 +73382,7 @@ function jHe({ variant: e, align: t = "right", verticalAlign: n = "top", isClick
});
}
var H6 = (e) => {
- let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, id: a, dataKey: o, variant: s, barRadius: c, glowing: l, bufferBar: u, isClickable: d, enableHoverHighlight: f, isMouseInChart: p, isHorizontal: m = !1, animationType: h = "none", introStartedAt: g = 0, selectedDataKey: _, isActive: v, dataLength: y = 0, onClick: b } = e, x = typeof e.index == "number" ? e.index : -1, S = u && y > 0 && x === y - 1, C = s === "stripped", w = MHe(h, x, y, m, g), T = S ? `url(#${a}-buffer-hatched-${o})` : NHe(s, a, o), E = l ? `url(#${a}-bar-glow-${o})` : void 0, D = PHe({
+ let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, id: a, dataKey: o, variant: s, barRadius: c, glowing: l, bufferBar: u, isClickable: d, enableHoverHighlight: f, isMouseInChart: p, isHorizontal: m = !1, animationType: h = "none", introStartedAt: g = 0, selectedDataKey: _, isActive: v, dataLength: y = 0, onClick: b } = e, x = typeof e.index == "number" ? e.index : -1, S = u && y > 0 && x === y - 1, C = s === "stripped", w = FHe(h, x, y, m, g), T = S ? `url(#${a}-buffer-hatched-${o})` : IHe(s, a, o), E = l ? `url(#${a}-bar-glow-${o})` : void 0, D = LHe({
isClickable: d,
selectedDataKey: _,
dataKey: o,
@@ -73298,7 +73394,7 @@ var H6 = (e) => {
c,
0,
0
- ] : c, A = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(xK, {
+ ] : c, A = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(bK, {
x: t,
y: n,
width: r,
@@ -73309,7 +73405,7 @@ var H6 = (e) => {
filter: E,
stroke: S ? `url(#${a}-colors-${o})` : void 0,
strokeWidth: S ? 1 : void 0
- }), C && /* @__PURE__ */ (0, V.jsx)(xK, {
+ }), C && /* @__PURE__ */ (0, V.jsx)(bK, {
x: t,
y: n - 4,
width: r,
@@ -73320,7 +73416,7 @@ var H6 = (e) => {
return /* @__PURE__ */ (0, V.jsxs)("g", {
style: O,
onClick: b,
- children: [/* @__PURE__ */ (0, V.jsx)(xK, {
+ children: [/* @__PURE__ */ (0, V.jsx)(bK, {
...e,
fill: "transparent"
}), w ? /* @__PURE__ */ (0, V.jsx)(ep.g, {
@@ -73331,7 +73427,7 @@ var H6 = (e) => {
children: A
}) : A]
});
-}, MHe = (e, t, n, r, i) => {
+}, FHe = (e, t, n, r, i) => {
if (e === "none" || t < 0 || n <= 0) return null;
let a = n - 1, o = a / 2, s;
switch (e) {
@@ -73346,11 +73442,11 @@ var H6 = (e) => {
break;
default: s = t;
}
- let c = s * wHe * 1e3, l = CHe * 1e3, u = c + l, d = Date.now() - i;
+ let c = s * DHe * 1e3, l = EHe * 1e3, u = c + l, d = Date.now() - i;
if (d >= u) return null;
let f = d <= c ? 0 : (d - c) / l, p = {
duration: (u - Math.max(d, c)) / 1e3,
- ease: THe,
+ ease: OHe,
delay: Math.max(0, c - d) / 1e3
};
return r ? {
@@ -73364,7 +73460,7 @@ var H6 = (e) => {
transition: p,
style: { originY: 1 }
};
-}, NHe = (e, t, n) => {
+}, IHe = (e, t, n) => {
switch (e) {
case "hatched": return `url(#${t}-hatched-${n})`;
case "duotone": return `url(#${t}-duotone-${n})`;
@@ -73373,10 +73469,10 @@ var H6 = (e) => {
case "stripped": return `url(#${t}-stripped-${n})`;
default: return `url(#${t}-colors-${n})`;
}
-}, PHe = ({ isClickable: e, selectedDataKey: t, dataKey: n, enableHoverHighlight: r, isMouseInChart: i, isActive: a }) => {
+}, LHe = ({ isClickable: e, selectedDataKey: t, dataKey: n, enableHoverHighlight: r, isMouseInChart: i, isActive: a }) => {
let o = e && t !== null ? t === null || t === n ? 1 : .15 : 1;
return r && i ? a ? o : o * .3 : o;
-}, FHe = ({ id: e, dataKey: t, config: n }) => {
+}, RHe = ({ id: e, dataKey: t, config: n }) => {
let r = k6(n[t] ?? {});
return /* @__PURE__ */ (0, V.jsx)("linearGradient", {
id: `${e}-colors-${t}`,
@@ -73398,7 +73494,7 @@ var H6 = (e) => {
}, i);
})
});
-}, IHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+}, zHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("pattern", {
id: `${e}-hatched-mask-pattern`,
x: "0",
@@ -73439,7 +73535,7 @@ var H6 = (e) => {
mask: `url(#${e}-hatched-mask-${t})`
})
})
-] }), LHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+] }), BHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("pattern", {
id: `${e}-buffer-hatched-mask-pattern`,
x: "0",
@@ -73480,7 +73576,7 @@ var H6 = (e) => {
mask: `url(#${e}-buffer-hatched-mask-${t})`
})
})
-] }), RHe = ({ id: e, dataKey: t, config: n }) => {
+] }), VHe = ({ id: e, dataKey: t, config: n }) => {
let r = k6(n[t] ?? {});
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("linearGradient", {
@@ -73548,7 +73644,7 @@ var H6 = (e) => {
})
})
] });
-}, zHe = ({ id: e, dataKey: t, config: n }) => {
+}, HHe = ({ id: e, dataKey: t, config: n }) => {
let r = k6(n[t] ?? {});
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("linearGradient", {
@@ -73616,7 +73712,7 @@ var H6 = (e) => {
})
})
] });
-}, BHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+}, UHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("linearGradient", {
id: `${e}-gradient-mask-gradient`,
x1: "0",
@@ -73653,7 +73749,7 @@ var H6 = (e) => {
mask: `url(#${e}-gradient-mask-${t})`
})
})
-] }), VHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
+] }), WHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("linearGradient", {
id: `${e}-stripped-mask-gradient`,
x1: "0",
@@ -73690,7 +73786,7 @@ var H6 = (e) => {
mask: `url(#${e}-stripped-mask-${t})`
})
})
-] }), HHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)("filter", {
+] }), GHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)("filter", {
id: `${e}-bar-glow-${t}`,
x: "-100%",
y: "-100%",
@@ -73710,35 +73806,35 @@ var H6 = (e) => {
}),
/* @__PURE__ */ (0, V.jsxs)("feMerge", { children: [/* @__PURE__ */ (0, V.jsx)("feMergeNode", { in: "glow" }), /* @__PURE__ */ (0, V.jsx)("feMergeNode", { in: "SourceGraphic" })] })
]
-}), UHe = (e = 17, t = .05, n = .9) => Array.from({ length: e }, (r, i) => {
+}), KHe = (e = 17, t = .05, n = .9) => Array.from({ length: e }, (r, i) => {
let a = i / (e - 1), o = t + Math.sin(a * Math.PI) ** 2 * (n - t);
return {
offset: `${(a * 100).toFixed(0)}%`,
opacity: Number(o.toFixed(3))
};
});
-function WHe(e, t = 12) {
+function qHe(e, t = 12) {
let [n, r] = (0, B.useState)(!1), i = (0, B.useCallback)(() => {
e && r((e) => !e);
}, [e]);
return {
- loadingData: (0, B.useMemo)(() => cHe(t, 20, 80), [t, n]),
+ loadingData: (0, B.useMemo)(() => dHe(t, 20, 80), [t, n]),
onShimmerExit: i
};
}
-var GHe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(r3, {
- dataKey: bHe,
+var JHe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(r3, {
+ dataKey: CHe,
fill: "currentColor",
fillOpacity: .15,
radius: R6,
isAnimationActive: !1,
legendType: "none",
style: { mask: `url(#${e}-loading-mask)` }
-}), /* @__PURE__ */ (0, V.jsx)("defs", { children: /* @__PURE__ */ (0, V.jsx)(KHe, {
+}), /* @__PURE__ */ (0, V.jsx)("defs", { children: /* @__PURE__ */ (0, V.jsx)(YHe, {
chartId: e,
onShimmerExit: t
-}) })] }), KHe = ({ chartId: e, onShimmerExit: t }) => {
- let n = UHe(), r = (0, B.useRef)(-1);
+}) })] }), YHe = ({ chartId: e, onShimmerExit: t }) => {
+ let n = KHe(), r = (0, B.useRef)(-1);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsx)("linearGradient", {
id: `${e}-loading-mask-gradient`,
@@ -73769,7 +73865,7 @@ var GHe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fr
initial: { x: -1 },
animate: { x: 2 },
transition: {
- duration: xHe / 1e3,
+ duration: wHe / 1e3,
ease: "linear",
repeat: Infinity,
repeatType: "loop"
@@ -73791,7 +73887,7 @@ var GHe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, V.jsxs)(V.Fr
})
] });
};
-V6.Bar = EHe, V6.XAxis = DHe, V6.YAxis = OHe, V6.Grid = kHe, V6.Tooltip = AHe, V6.Legend = jHe, V6.Brush = P6;
+V6.Bar = kHe, V6.XAxis = AHe, V6.YAxis = jHe, V6.Grid = MHe, V6.Tooltip = NHe, V6.Legend = PHe, V6.Brush = P6;
//#endregion
//#region src/react/charts/chart-card.tsx
var U6 = `${wE({ radius: "chart" })} flex flex-col gap-4 max-sm:p-4`;
@@ -73821,7 +73917,7 @@ var G6 = [
"var(--color-chart-5)",
"var(--color-chart-6)"
], K6 = (e) => ({ light: [e] }), q6 = (e) => `s${e}`;
-function qHe(e) {
+function XHe(e) {
return Object.fromEntries(e.map((e, t) => [q6(t), {
label: e,
colors: K6(G6[t % G6.length])
@@ -73846,7 +73942,7 @@ function Y6({ swatch: e, name: t, value: n }) {
});
}
var X6 = "size-2.5 shrink-0 rounded-xs";
-function JHe({ active: e, payload: t, label: n, nameKey: r, valueKey: i, hideLabel: a }) {
+function ZHe({ active: e, payload: t, label: n, nameKey: r, valueKey: i, hideLabel: a }) {
let { config: o } = w6(), s = (t ?? []).filter((e) => e.type !== "none");
if (!e || !s.length) return /* @__PURE__ */ (0, V.jsx)("span", { className: "p-4" });
let c = a || typeof n != "string" ? null : o[n]?.label ?? n;
@@ -73871,7 +73967,7 @@ function JHe({ active: e, payload: t, label: n, nameKey: r, valueKey: i, hideLab
function Z6({ nameKey: e, valueKey: t, hideLabel: n }) {
return /* @__PURE__ */ (0, V.jsx)(j6, {
cursor: !1,
- content: /* @__PURE__ */ (0, V.jsx)(JHe, {
+ content: /* @__PURE__ */ (0, V.jsx)(ZHe, {
nameKey: e,
valueKey: t,
hideLabel: n
@@ -73948,7 +74044,7 @@ var t8 = [
"周六",
"周日"
], n8 = (e, t) => e ? Math.max(.12, e / t) : 0;
-function YHe(e) {
+function QHe(e) {
let t = Array.from({ length: 7 }, () => Array(24).fill(0));
for (let n of e?.hours || []) {
let { weekday: e, hour: r, count: i } = n;
@@ -73965,7 +74061,7 @@ function YHe(e) {
total: n.reduce((e, t) => e + t, 0)
};
}
-function XHe(e) {
+function $He(e) {
let t = (e?.days || []).filter((e) => /^\d{4}-\d{2}-\d{2}$/.test(e.date) && Number.isFinite(e.count) && e.count >= 0).slice().sort((e, t) => e.date.localeCompare(t.date)), n = {
cells: [],
total: 0,
@@ -74004,19 +74100,19 @@ var r8 = 14, i8 = 17, a8 = {
fill: "fill-chart-5",
dot: "bg-chart-5"
}
-}, ZHe = {
+}, eUe = {
start: "translate-x-0",
center: "-translate-x-1/2",
end: "-translate-x-full"
};
-function QHe({ cell: e, series: t, tone: n, left: r, top: i, anchor: a }) {
+function tUe({ cell: e, series: t, tone: n, left: r, top: i, anchor: a }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
"aria-hidden": !0,
style: {
left: `${r}%`,
top: `${i}%`
},
- className: `pointer-events-none absolute z-10 -mt-2 -translate-y-full ${J6} ${ZHe[a]}`,
+ className: `pointer-events-none absolute z-10 -mt-2 -translate-y-full ${J6} ${eUe[a]}`,
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "font-medium text-foreground",
children: e.label
@@ -74074,7 +74170,7 @@ function o8({ title: e, words: t, cells: n, total: r, columns: i, rows: a, axis:
}, e.key);
})]
})
- }), g && _ ? /* @__PURE__ */ (0, V.jsx)(QHe, {
+ }), g && _ ? /* @__PURE__ */ (0, V.jsx)(tUe, {
cell: g,
series: t.series,
tone: c,
@@ -74090,7 +74186,7 @@ function o8({ title: e, words: t, cells: n, total: r, columns: i, rows: a, axis:
]
});
}
-var $He = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [t8.map((e, t) => /* @__PURE__ */ (0, V.jsx)("text", {
+var nUe = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [t8.map((e, t) => /* @__PURE__ */ (0, V.jsx)("text", {
x: 0,
y: 18 + t * i8 + 7,
dominantBaseline: "middle",
@@ -74104,7 +74200,7 @@ var $He = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [t8.map((e, t) =>
children: t
}, t))] });
function s8({ activity: e, title: t, dailyTitle: n, words: r, tone: i, empty: a }) {
- let o = YHe(e), s = XHe(e);
+ let o = QHe(e), s = $He(e);
return s.cells.length ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "inline-grid w-full items-start gap-5 lg:grid-cols-2",
children: [/* @__PURE__ */ (0, V.jsx)(o8, {
@@ -74115,7 +74211,7 @@ function s8({ activity: e, title: t, dailyTitle: n, words: r, tone: i, empty: a
total: o.total,
columns: 24,
rows: 7,
- axis: $He,
+ axis: nUe,
footer: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("span", { children: "星期 × 小时" }), /* @__PURE__ */ (0, V.jsx)("span", { children: e?.timezone || "UTC+08:00" })] })
}), /* @__PURE__ */ (0, V.jsx)(o8, {
title: n,
@@ -74187,14 +74283,14 @@ function c8({ children: e, className: t = "", previewCount: n = 10 }) {
}
//#endregion
//#region src/react/evilcharts/registry/charts/recharts-radial-chart.tsx
-var eUe = "30%", tUe = "100%", l8 = 5, u8 = 14, nUe = 5, d8 = 1500, f8 = (0, B.createContext)(null);
+var rUe = "30%", iUe = "100%", l8 = 5, u8 = 14, aUe = 5, d8 = 1500, f8 = (0, B.createContext)(null);
function p8() {
let e = (0, B.use)(f8);
if (!e) throw Error("Radial chart parts (<RadialBar />, <Tooltip />, …) must be used within <EvilRadialChart />");
return e;
}
-function m8({ config: e, data: t, nameKey: n, children: r, className: i, chartProps: a, variant: o = "full", max: s, innerRadius: c = eUe, outerRadius: l = tUe, defaultSelectedDataKey: u = null, onSelectionChange: d, isLoading: f = !1, backgroundVariant: p }) {
- let m = (0, B.useId)().replace(/:/g, ""), [h, g] = (0, B.useState)(u), _ = lUe(f), v = oUe(o), y = (0, B.useCallback)((e, t) => {
+function m8({ config: e, data: t, nameKey: n, children: r, className: i, chartProps: a, variant: o = "full", max: s, innerRadius: c = rUe, outerRadius: l = iUe, defaultSelectedDataKey: u = null, onSelectionChange: d, isLoading: f = !1, backgroundVariant: p }) {
+ let m = (0, B.useId)().replace(/:/g, ""), [h, g] = (0, B.useState)(u), _ = fUe(f), v = lUe(o), y = (0, B.useCallback)((e, t) => {
g(e), d?.(e === null ? null : {
dataKey: e,
value: t ?? 0
@@ -74226,7 +74322,7 @@ function m8({ config: e, data: t, nameKey: n, children: r, className: i, chartPr
children: /* @__PURE__ */ (0, V.jsxs)(T6, {
className: i,
config: e,
- children: [/* @__PURE__ */ (0, V.jsx)(E6, { isLoading: f }), /* @__PURE__ */ (0, V.jsxs)(aHe, {
+ children: [/* @__PURE__ */ (0, V.jsx)(E6, { isLoading: f }), /* @__PURE__ */ (0, V.jsxs)(cHe, {
id: m,
data: f ? _ : b,
innerRadius: c,
@@ -74245,8 +74341,8 @@ function m8({ config: e, data: t, nameKey: n, children: r, className: i, chartPr
}),
p && /* @__PURE__ */ (0, V.jsx)(L6, { variant: p }),
r,
- f && /* @__PURE__ */ (0, V.jsx)(uUe, {}),
- /* @__PURE__ */ (0, V.jsx)("defs", { children: /* @__PURE__ */ (0, V.jsx)(sUe, {
+ f && /* @__PURE__ */ (0, V.jsx)(pUe, {}),
+ /* @__PURE__ */ (0, V.jsx)("defs", { children: /* @__PURE__ */ (0, V.jsx)(uUe, {
config: e,
chartId: m
}) })
@@ -74255,7 +74351,7 @@ function m8({ config: e, data: t, nameKey: n, children: r, className: i, chartPr
})
});
}
-function rUe({ dataKey: e, cornerRadius: t = l8, barSize: n = u8, showBackground: r = !0, isClickable: i = !1, radialBarProps: a }) {
+function oUe({ dataKey: e, cornerRadius: t = l8, barSize: n = u8, showBackground: r = !0, isClickable: i = !1, radialBarProps: a }) {
let { nameKey: o, isLoading: s, selectedBar: c, selectBar: l } = p8();
return s ? null : /* @__PURE__ */ (0, V.jsx)(B2, {
dataKey: e,
@@ -74271,7 +74367,7 @@ function rUe({ dataKey: e, cornerRadius: t = l8, barSize: n = u8, showBackground
},
shape: (e) => {
let t = e[o], n = c === null || c === t;
- return /* @__PURE__ */ (0, V.jsx)(MK, {
+ return /* @__PURE__ */ (0, V.jsx)(jK, {
...e,
opacity: i && !n ? .15 : 1,
className: "transition-opacity duration-200"
@@ -74280,7 +74376,7 @@ function rUe({ dataKey: e, cornerRadius: t = l8, barSize: n = u8, showBackground
...a
});
}
-function iUe({ variant: e, roundness: t, defaultIndex: n }) {
+function sUe({ variant: e, roundness: t, defaultIndex: n }) {
let { nameKey: r, isLoading: i } = p8();
return i ? null : /* @__PURE__ */ (0, V.jsx)(j6, {
defaultIndex: n,
@@ -74293,7 +74389,7 @@ function iUe({ variant: e, roundness: t, defaultIndex: n }) {
})
});
}
-function aUe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
+function cUe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
let { nameKey: i, isLoading: a, selectedBar: o, selectBar: s } = p8();
return a ? null : /* @__PURE__ */ (0, V.jsx)(N6, {
verticalAlign: n,
@@ -74307,7 +74403,7 @@ function aUe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isC
})
});
}
-function oUe(e) {
+function lUe(e) {
switch (e) {
case "semi": return {
startAngle: 180,
@@ -74323,7 +74419,7 @@ function oUe(e) {
};
}
}
-var sUe = ({ config: e, chartId: t }) => /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: Object.entries(e).map(([e, n]) => {
+var uUe = ({ config: e, chartId: t }) => /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: Object.entries(e).map(([e, n]) => {
let r = k6(n);
return /* @__PURE__ */ (0, V.jsx)("linearGradient", {
id: `${t}-radial-colors-${e}`,
@@ -74346,13 +74442,13 @@ var sUe = ({ config: e, chartId: t }) => /* @__PURE__ */ (0, V.jsx)(V.Fragment,
})
}, `${t}-radial-colors-${e}`);
}) });
-function cUe() {
- return Array.from({ length: nUe }, (e, t) => ({
+function dUe() {
+ return Array.from({ length: aUe }, (e, t) => ({
name: `loading${t}`,
value: 40 + Math.random() * 60
}));
}
-function lUe(e) {
+function fUe(e) {
let [t, n] = (0, B.useState)(0);
return (0, B.useEffect)(() => {
if (!e) return;
@@ -74360,9 +74456,9 @@ function lUe(e) {
n((e) => e + 1);
}, d8);
return () => clearInterval(t);
- }, [e]), (0, B.useMemo)(() => cUe(), [t]);
+ }, [e]), (0, B.useMemo)(() => dUe(), [t]);
}
-var uUe = () => /* @__PURE__ */ (0, V.jsx)(B2, {
+var pUe = () => /* @__PURE__ */ (0, V.jsx)(B2, {
dataKey: "value",
cornerRadius: l8,
barSize: u8,
@@ -74370,23 +74466,23 @@ var uUe = () => /* @__PURE__ */ (0, V.jsx)(B2, {
isAnimationActive: !0,
animationDuration: d8,
animationEasing: "ease-in-out",
- shape: (e) => /* @__PURE__ */ (0, V.jsx)(MK, {
+ shape: (e) => /* @__PURE__ */ (0, V.jsx)(jK, {
...e,
fill: "currentColor",
fillOpacity: .25
})
});
-m8.RadialBar = rUe, m8.Tooltip = iUe, m8.Legend = aUe;
+m8.RadialBar = oUe, m8.Tooltip = sUe, m8.Legend = cUe;
//#endregion
//#region src/react/stats/radial-card.tsx
-var dUe = [
+var mUe = [
"bg-chart-1",
"bg-chart-2",
"bg-chart-3",
"bg-chart-4",
"bg-chart-5",
"bg-chart-6"
-], fUe = [
+], hUe = [
"aria-pressed:bg-chart-1/10 aria-pressed:ring-chart-1",
"aria-pressed:bg-chart-2/10 aria-pressed:ring-chart-2",
"aria-pressed:bg-chart-3/10 aria-pressed:ring-chart-3",
@@ -74427,15 +74523,15 @@ function h8({ title: e, rows: t, unit: n = "个视频" }) {
children: /* @__PURE__ */ (0, V.jsxs)(m8, {
data: f,
nameKey: "slice",
- config: qHe(s.map((e) => e.name)),
- max: Ybe(s.map((e) => e.value)),
+ config: XHe(s.map((e) => e.name)),
+ max: $be(s.map((e) => e.value)),
innerRadius: "22%",
className: "aspect-auto h-75 max-sm:h-65",
children: [/* @__PURE__ */ (0, V.jsx)(m8.RadialBar, {
dataKey: "value",
- barSize: Xbe(s.length),
+ barSize: exe(s.length),
radialBarProps: {
- shape: (e) => /* @__PURE__ */ (0, V.jsx)(MK, {
+ shape: (e) => /* @__PURE__ */ (0, V.jsx)(jK, {
...e,
opacity: c >= 0 && c !== e.index ? .3 : 1,
className: "cursor-pointer transition-opacity duration-200"
@@ -74459,13 +74555,13 @@ function h8({ title: e, rows: t, unit: n = "个视频" }) {
onPointerLeave: () => o(-1),
onFocus: () => o(t),
onBlur: () => o(-1),
- className: `flex min-w-0 cursor-pointer flex-col items-start gap-1 rounded-xl bg-background-tertiary-default p-2.5 text-left outline-none aria-pressed:ring-1 aria-pressed:ring-inset focus-visible:ring-2 focus-visible:ring-border-focus-ring ${fUe[t % 6]}`,
+ className: `flex min-w-0 cursor-pointer flex-col items-start gap-1 rounded-xl bg-background-tertiary-default p-2.5 text-left outline-none aria-pressed:ring-1 aria-pressed:ring-inset focus-visible:ring-2 focus-visible:ring-border-focus-ring ${hUe[t % 6]}`,
children: [
/* @__PURE__ */ (0, V.jsxs)("span", {
className: "flex min-w-0 items-center gap-1.5 text-caption-1-regular text-text-secondary",
children: [/* @__PURE__ */ (0, V.jsx)("i", {
"aria-hidden": !0,
- className: `size-3 shrink-0 rounded-sm ${dUe[t % 6]}`
+ className: `size-3 shrink-0 rounded-sm ${mUe[t % 6]}`
}), e.name]
}),
/* @__PURE__ */ (0, V.jsx)("b", {
@@ -74484,7 +74580,7 @@ function h8({ title: e, rows: t, unit: n = "个视频" }) {
}
//#endregion
//#region src/react/stats/stats-page.tsx
-var pUe = 10, g8 = G6[5], mUe = G6[4], hUe = `${wE()} flex flex-col gap-4`, gUe = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", _Ue = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", vUe = "开始播放后,这里会显示最近的真实观看证据。", yUe = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", bUe = "添加媒体文件夹后,这里会显示存储空间。";
+var gUe = 10, g8 = G6[5], _Ue = G6[4], vUe = `${wE()} flex flex-col gap-4`, yUe = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", bUe = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", xUe = "开始播放后,这里会显示最近的真实观看证据。", SUe = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", CUe = "添加媒体文件夹后,这里会显示存储空间。";
function _8({ term: e, value: t }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-h-16 min-w-0 flex-col gap-1.5 rounded-2lg bg-background-primary-default p-3",
@@ -74506,7 +74602,7 @@ function v8({ term: e, value: t, total: n }) {
className: "tabular-nums",
children: [t.toLocaleString(), /* @__PURE__ */ (0, V.jsxs)("span", {
className: "ml-1.5 text-caption-1-regular text-text-secondary",
- children: [oz(t, n), "%"]
+ children: [az(t, n), "%"]
})]
})]
}), /* @__PURE__ */ (0, V.jsx)(kE, {
@@ -74537,14 +74633,14 @@ function y8({ term: e, figure: t, unit: n }) {
}
function b8({ headline: e, children: t }) {
return /* @__PURE__ */ (0, V.jsxs)("div", {
- className: `${hUe} md:flex-row md:gap-6`,
+ className: `${vUe} md:flex-row md:gap-6`,
children: [e, /* @__PURE__ */ (0, V.jsx)("div", {
className: "min-w-0 grow",
children: t
})]
});
}
-function xUe({ data: e, configurable: t, openMediaSettings: n }) {
+function wUe({ data: e, configurable: t, openMediaSettings: n }) {
return e.by_loc.reduce((e, t) => e + t.videos, 0) ? /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col gap-5",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -74572,14 +74668,14 @@ function xUe({ data: e, configurable: t, openMediaSettings: n }) {
unit: "个视频",
series: "视频",
color: g8,
- rows: exe(e.by_length)
+ rows: ixe(e.by_length)
}),
/* @__PURE__ */ (0, V.jsx)(e8, {
title: "画质",
unit: "个视频",
series: "视频",
color: g8,
- rows: lz(e.by_quality)
+ rows: cz(e.by_quality)
}),
/* @__PURE__ */ (0, V.jsx)(e8, {
title: "文件类型",
@@ -74587,13 +74683,13 @@ function xUe({ data: e, configurable: t, openMediaSettings: n }) {
series: "条目",
color: g8,
layout: "horizontal",
- rows: Qbe(e.by_medium)
+ rows: nxe(e.by_medium)
})
]
})]
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: yae,
+ icon: bae,
title: "还没有视频",
actions: /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [t ? /* @__PURE__ */ (0, V.jsx)(J, {
size: "small",
@@ -74605,10 +74701,10 @@ function xUe({ data: e, configurable: t, openMediaSettings: n }) {
size: "small",
children: "添加关注"
})] }),
- children: gUe
+ children: yUe
});
}
-function SUe({ data: e }) {
+function TUe({ data: e }) {
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(s8, {
activity: e.play_activity,
title: "播放时间",
@@ -74623,11 +74719,11 @@ function SUe({ data: e }) {
title: "播放次数",
unit: "个作品",
series: "作品",
- color: mUe,
- rows: nxe(e.replays)
+ color: _Ue,
+ rows: oxe(e.replays)
})] });
}
-function CUe({ attribution: e }) {
+function EUe({ attribution: e }) {
let t = e.videos;
return /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-col",
@@ -74660,7 +74756,7 @@ function CUe({ attribution: e }) {
]
});
}
-function wUe({ volume: e }) {
+function DUe({ volume: e }) {
let t = e.total, n = e.used ?? 0;
return /* @__PURE__ */ (0, V.jsxs)("article", {
className: "flex min-w-0 flex-col gap-1.5 border-b border-separator-border py-3 last:border-b-0",
@@ -74677,7 +74773,7 @@ function wUe({ volume: e }) {
className: "whitespace-nowrap tabular-nums",
children: [pe(n), /* @__PURE__ */ (0, V.jsxs)("span", {
className: "ml-1.5 text-caption-1-regular text-text-secondary",
- children: [oz(n, t), "%"]
+ children: [az(n, t), "%"]
})]
})]
}),
@@ -74699,25 +74795,25 @@ function wUe({ volume: e }) {
]
});
}
-function TUe({ volumes: e, configurable: t, openMediaSettings: n }) {
+function OUe({ volumes: e, configurable: t, openMediaSettings: n }) {
return e.length ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex flex-col",
- children: e.map((e) => /* @__PURE__ */ (0, V.jsx)(wUe, { volume: e }, `${e.kind}:${e.label}`))
+ children: e.map((e) => /* @__PURE__ */ (0, V.jsx)(DUe, { volume: e }, `${e.kind}:${e.label}`))
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: bT,
+ icon: yT,
title: "还没有存储来源",
actions: t ? /* @__PURE__ */ (0, V.jsx)(J, {
size: "small",
onClick: n,
children: "添加媒体文件夹"
}) : void 0,
- children: bUe
+ children: CUe
});
}
-function EUe({ tags: e, tagLabel: t, onTag: n }) {
+function kUe({ tags: e, tagLabel: t, onTag: n }) {
return e.length ? /* @__PURE__ */ (0, V.jsx)(c8, {
- previewCount: pUe,
+ previewCount: gUe,
className: "inline-grid w-full gap-x-6 gap-y-1 sm:grid-cols-2",
children: e.map((e, r) => /* @__PURE__ */ (0, V.jsx)("li", {
className: "min-w-0",
@@ -74743,7 +74839,7 @@ function EUe({ tags: e, tagLabel: t, onTag: n }) {
}, e.k))
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: CT,
+ icon: ST,
title: "还没有内容标签",
actions: /* @__PURE__ */ (0, V.jsx)(CE, {
variant: "secondary",
@@ -74751,14 +74847,14 @@ function EUe({ tags: e, tagLabel: t, onTag: n }) {
size: "small",
children: "补全资料"
}),
- children: _Ue
+ children: bUe
});
}
-function DUe({ rows: e }) {
+function AUe({ rows: e }) {
return e.length ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex flex-col gap-5",
children: e.map((e) => {
- let t = sz(e);
+ let t = oz(e);
return /* @__PURE__ */ (0, V.jsxs)("article", {
className: "flex flex-wrap items-center gap-x-6 gap-y-2",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -74766,14 +74862,14 @@ function DUe({ rows: e }) {
children: [/* @__PURE__ */ (0, V.jsx)("h3", {
className: "min-w-0 text-body-2-medium text-text-primary",
children: /* @__PURE__ */ (0, V.jsx)("a", {
- href: Jbe(e),
+ href: Qbe(e),
"data-middle-truncate": !0,
className: "block max-w-full overflow-hidden whitespace-nowrap hover:underline",
children: e.name
})
}), /* @__PURE__ */ (0, V.jsxs)("p", {
className: "flex flex-wrap gap-3 text-caption-1-regular text-text-secondary",
- children: [/* @__PURE__ */ (0, V.jsx)("span", { children: e.creator ?? "" }), /* @__PURE__ */ (0, V.jsx)("span", { children: qbe(e) })]
+ children: [/* @__PURE__ */ (0, V.jsx)("span", { children: e.creator ?? "" }), /* @__PURE__ */ (0, V.jsx)("span", { children: Zbe(e) })]
})]
}), /* @__PURE__ */ (0, V.jsxs)("div", {
className: "min-w-0 basis-40",
@@ -74782,14 +74878,14 @@ function DUe({ rows: e }) {
value: t
}), /* @__PURE__ */ (0, V.jsx)("small", {
className: "mt-1.5 block text-caption-1-regular text-text-secondary",
- children: `真实 ${t.toFixed(0)}% · 到达 ${cz(e).toFixed(0)}%`
+ children: `真实 ${t.toFixed(0)}% · 到达 ${sz(e).toFixed(0)}%`
})]
})]
}, `${e.kind}:${e.id}`);
})
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: xT,
+ icon: bT,
title: "还没有观看记录",
actions: /* @__PURE__ */ (0, V.jsx)(CE, {
variant: "secondary",
@@ -74797,10 +74893,10 @@ function DUe({ rows: e }) {
size: "small",
children: "浏览馆藏"
}),
- children: vUe
+ children: xUe
});
}
-function OUe({ sources: e, videos: t }) {
+function jUe({ sources: e, videos: t }) {
return e.length ? /* @__PURE__ */ (0, V.jsx)("div", {
className: "inline-grid w-full gap-x-8 gap-y-6 sm:grid-cols-2",
children: e.map((e) => /* @__PURE__ */ (0, V.jsxs)("article", {
@@ -74832,7 +74928,7 @@ function OUe({ sources: e, videos: t }) {
}, e.k))
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: CT,
+ icon: ST,
title: "还没有标签来源",
actions: /* @__PURE__ */ (0, V.jsx)(CE, {
variant: "secondary",
@@ -74840,17 +74936,17 @@ function OUe({ sources: e, videos: t }) {
size: "small",
children: "补全资料"
}),
- children: yUe
+ children: SUe
});
}
function x8({ id: e, label: t, figure: n, detail: r, icon: i, accent: a }) {
- return /* @__PURE__ */ (0, V.jsx)(dk, {
+ return /* @__PURE__ */ (0, V.jsx)(Xk, {
id: e,
- className: _M({
+ className: iM({
interactive: !0,
selectable: !0
}),
- children: /* @__PURE__ */ (0, V.jsx)(xM, {
+ children: /* @__PURE__ */ (0, V.jsx)(cM, {
label: t,
icon: i,
accent: a,
@@ -74859,34 +74955,34 @@ function x8({ id: e, label: t, figure: n, detail: r, icon: i, accent: a }) {
})
});
}
-function kUe(e) {
+function MUe(e) {
let t = TS({
- queryKey: iz,
- queryFn: ({ signal: e }) => az(e)
+ queryKey: rz,
+ queryFn: ({ signal: e }) => iz(e)
}), n = t.data;
if (!n) return /* @__PURE__ */ (0, V.jsx)(DE, { children: /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
title: "馆藏统计读取失败",
children: t.error ? W(t.error) : "未取得统计数据,请刷新页面重试。"
}) });
- let r = n.consumption, i = n.storage_summary, a = n.by_loc.reduce((e, t) => e + t.videos, 0), o = n.by_loc.reduce((e, t) => e + t.bytes, 0), s = oz(n.tag_cov, n.attribution.videos);
+ let r = n.consumption, i = n.storage_summary, a = n.by_loc.reduce((e, t) => e + t.videos, 0), o = n.by_loc.reduce((e, t) => e + t.bytes, 0), s = az(n.tag_cov, n.attribution.videos);
return /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
children: `账本当前快照 · ${a.toLocaleString()} 个视频 · ${pe(o)}`
}),
- /* @__PURE__ */ (0, V.jsxs)(lk, {
+ /* @__PURE__ */ (0, V.jsxs)(Jk, {
defaultSelectedKey: "inventory",
className: "flex flex-col gap-4",
children: [
- /* @__PURE__ */ (0, V.jsxs)(uk, {
+ /* @__PURE__ */ (0, V.jsxs)(Yk, {
"aria-label": "统计视图",
- className: vM,
+ className: aM,
children: [
/* @__PURE__ */ (0, V.jsx)(x8, {
id: "inventory",
label: "馆藏视频",
- icon: gT,
+ icon: hT,
accent: 0,
figure: a.toLocaleString(),
detail: pe(o)
@@ -74894,15 +74990,15 @@ function kUe(e) {
/* @__PURE__ */ (0, V.jsx)(x8, {
id: "viewing",
label: "看过",
- icon: yT,
+ icon: vT,
accent: 1,
figure: r.played.toLocaleString(),
- detail: Kbe(r.play_seconds)
+ detail: Xbe(r.play_seconds)
}),
/* @__PURE__ */ (0, V.jsx)(x8, {
id: "coverage",
label: "内容标签",
- icon: CT,
+ icon: ST,
accent: 2,
figure: `${s}%`,
detail: `${n.tag_cov.toLocaleString()} / ${n.attribution.videos.toLocaleString()}`
@@ -74910,21 +75006,21 @@ function kUe(e) {
/* @__PURE__ */ (0, V.jsx)(x8, {
id: "storage",
label: "使用空间",
- icon: bT,
+ icon: yT,
accent: 3,
figure: `${i.online} 个卷`,
detail: i.measured ? `已用 ${pe(i.used)}` : "容量未取得"
})
]
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "inventory",
- children: /* @__PURE__ */ (0, V.jsx)(xUe, {
+ children: /* @__PURE__ */ (0, V.jsx)(wUe, {
data: n,
...e
})
}),
- /* @__PURE__ */ (0, V.jsxs)(fk, {
+ /* @__PURE__ */ (0, V.jsxs)(Zk, {
id: "viewing",
className: "flex flex-col gap-5",
children: [/* @__PURE__ */ (0, V.jsx)(b8, {
@@ -74970,9 +75066,9 @@ function kUe(e) {
})
]
})
- }), /* @__PURE__ */ (0, V.jsx)(SUe, { data: n })]
+ }), /* @__PURE__ */ (0, V.jsx)(TUe, { data: n })]
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "coverage",
children: /* @__PURE__ */ (0, V.jsx)(b8, {
headline: /* @__PURE__ */ (0, V.jsx)(y8, {
@@ -74980,10 +75076,10 @@ function kUe(e) {
figure: `${s}%`,
unit: `${n.tag_cov.toLocaleString()} / ${n.attribution.videos.toLocaleString()}`
}),
- children: /* @__PURE__ */ (0, V.jsx)(CUe, { attribution: n.attribution })
+ children: /* @__PURE__ */ (0, V.jsx)(EUe, { attribution: n.attribution })
})
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "storage",
children: /* @__PURE__ */ (0, V.jsx)(b8, {
headline: /* @__PURE__ */ (0, V.jsx)(y8, {
@@ -74991,7 +75087,7 @@ function kUe(e) {
figure: String(i.measured),
unit: "个卷已取得容量"
}),
- children: /* @__PURE__ */ (0, V.jsx)(TUe, {
+ children: /* @__PURE__ */ (0, V.jsx)(OUe, {
volumes: n.storage_volumes,
...e
})
@@ -74999,51 +75095,51 @@ function kUe(e) {
})
]
}),
- /* @__PURE__ */ (0, V.jsxs)(lk, {
+ /* @__PURE__ */ (0, V.jsxs)(Jk, {
defaultSelectedKey: "tags",
className: `${wE({ padding: "none" })} flex flex-col`,
children: [
/* @__PURE__ */ (0, V.jsx)("div", {
className: "px-4 pt-3",
- children: /* @__PURE__ */ (0, V.jsxs)(dA, {
+ children: /* @__PURE__ */ (0, V.jsxs)($k, {
"aria-label": "统计维度",
- className: pA,
+ className: tA,
children: [
- /* @__PURE__ */ (0, V.jsx)(dk, {
+ /* @__PURE__ */ (0, V.jsx)(Xk, {
id: "tags",
- className: mA,
+ className: nA,
children: "内容标签"
}),
- /* @__PURE__ */ (0, V.jsx)(dk, {
+ /* @__PURE__ */ (0, V.jsx)(Xk, {
id: "recent",
- className: mA,
+ className: nA,
children: "最近看过"
}),
- /* @__PURE__ */ (0, V.jsx)(dk, {
+ /* @__PURE__ */ (0, V.jsx)(Xk, {
id: "sources",
- className: mA,
+ className: nA,
children: "标签来源"
})
]
})
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "tags",
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, V.jsx)(EUe, {
+ children: /* @__PURE__ */ (0, V.jsx)(kUe, {
tags: n.top_tags,
...e
})
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "recent",
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, V.jsx)(DUe, { rows: n.recent })
+ children: /* @__PURE__ */ (0, V.jsx)(AUe, { rows: n.recent })
}),
- /* @__PURE__ */ (0, V.jsx)(fk, {
+ /* @__PURE__ */ (0, V.jsx)(Zk, {
id: "sources",
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, V.jsx)(OUe, {
+ children: /* @__PURE__ */ (0, V.jsx)(jUe, {
sources: n.tag_source,
videos: n.attribution.videos
})
@@ -75054,7 +75150,7 @@ function kUe(e) {
}
//#endregion
//#region node_modules/d3-sankey/src/align.js
-function AUe(e, t) {
+function NUe(e, t) {
return e.sourceLinks.length ? e.depth : t - 1;
}
//#endregion
@@ -75078,13 +75174,13 @@ function T8(e, t) {
function E8(e) {
return e.value;
}
-function jUe(e) {
+function PUe(e) {
return e.index;
}
-function MUe(e) {
+function FUe(e) {
return e.nodes;
}
-function NUe(e) {
+function IUe(e) {
return e.links;
}
function D8(e, t) {
@@ -75099,8 +75195,8 @@ function O8({ nodes: e }) {
for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
}
}
-function PUe() {
- let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = jUe, c = AUe, l, u, d = MUe, f = NUe, p = 6;
+function LUe() {
+ let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = PUe, c = NUe, l, u, d = FUe, f = IUe, p = 6;
function m() {
let e = {
nodes: d.apply(null, arguments),
@@ -75144,7 +75240,7 @@ function PUe() {
if (u != null) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(u), n.sort(u);
}
function g({ nodes: e }) {
- for (let t of e) t.value = t.fixedValue === void 0 ? Math.max($q(t.sourceLinks, E8), $q(t.targetLinks, E8)) : t.fixedValue;
+ for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(Qq(t.sourceLinks, E8), Qq(t.targetLinks, E8)) : t.fixedValue;
}
function _({ nodes: e }) {
let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
@@ -75169,7 +75265,7 @@ function PUe() {
}
}
function y({ nodes: t }) {
- let r = Yq(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
+ let r = Jq(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
for (let n of t) {
let t = Math.max(0, Math.min(r - 1, Math.floor(c.call(null, n, r))));
n.layer = t, n.x0 = e + t * a, n.x1 = n.x0 + i, o[t] ? o[t].push(n) : o[t] = [n];
@@ -75178,7 +75274,7 @@ function PUe() {
return o;
}
function b(e) {
- let n = Xq(e, (e) => (r - t - (e.length - 1) * o) / $q(e, E8));
+ let n = Yq(e, (e) => (r - t - (e.length - 1) * o) / Qq(e, E8));
for (let i of e) {
let e = t;
for (let t of i) {
@@ -75195,7 +75291,7 @@ function PUe() {
}
function x(e) {
let n = y(e);
- o = Math.min(a, (r - t) / (Yq(n, (e) => e.length) - 1)), b(n);
+ o = Math.min(a, (r - t) / (Jq(n, (e) => e.length) - 1)), b(n);
for (let e = 0; e < p; ++e) {
let t = .99 ** e, r = Math.max(1 - t, (e + 1) / p);
C(n, t, r), S(n, t, r);
@@ -75286,7 +75382,7 @@ function PUe() {
}
//#endregion
//#region node_modules/d3-path/src/path.js
-var k8 = Math.PI, A8 = 2 * k8, j8 = 1e-6, FUe = A8 - j8;
+var k8 = Math.PI, A8 = 2 * k8, j8 = 1e-6, RUe = A8 - j8;
function M8() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
@@ -75327,7 +75423,7 @@ M8.prototype = N8.prototype = {
e = +e, t = +t, n = +n, a = !!a;
var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
if (n < 0) throw Error("negative radius: " + n);
- this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > j8 || Math.abs(this._y1 - l) > j8) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % A8 + A8), d > FUe ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > j8 && (this._ += "A" + n + "," + n + ",0," + +(d >= k8) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
+ this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > j8 || Math.abs(this._y1 - l) > j8) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % A8 + A8), d > RUe ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > j8 && (this._ += "A" + n + "," + n + ",0," + +(d >= k8) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
},
rect: function(e, t, n, r) {
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
@@ -75345,27 +75441,27 @@ function P8(e) {
}
//#endregion
//#region node_modules/d3-shape/src/point.js
-function IUe(e) {
+function zUe(e) {
return e[0];
}
-function LUe(e) {
+function BUe(e) {
return e[1];
}
//#endregion
//#region node_modules/d3-shape/src/array.js
-var RUe = Array.prototype.slice;
+var VUe = Array.prototype.slice;
//#endregion
//#region node_modules/d3-shape/src/link/index.js
-function zUe(e) {
+function HUe(e) {
return e.source;
}
-function BUe(e) {
+function UUe(e) {
return e.target;
}
-function VUe(e) {
- var t = zUe, n = BUe, r = IUe, i = LUe, a = null;
+function WUe(e) {
+ var t = HUe, n = UUe, r = zUe, i = BUe, a = null;
function o() {
- var o, s = RUe.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
+ var o, s = VUe.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
if (a ||= o = N8(), e(a, +r.apply(this, (s[0] = c, s)), +i.apply(this, s), +r.apply(this, (s[0] = l, s)), +i.apply(this, s)), o) return a = null, o + "" || null;
}
return o.source = function(e) {
@@ -75380,48 +75476,48 @@ function VUe(e) {
return arguments.length ? (a = e ?? null, o) : a;
}, o;
}
-function HUe(e, t, n, r, i) {
+function GUe(e, t, n, r, i) {
e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
}
-function UUe() {
- return VUe(HUe);
+function KUe() {
+ return WUe(GUe);
}
//#endregion
//#region node_modules/d3-sankey/src/sankeyLinkHorizontal.js
-function WUe(e) {
+function qUe(e) {
return [e.source.x1, e.y0];
}
-function GUe(e) {
+function JUe(e) {
return [e.target.x0, e.y1];
}
-function KUe() {
- return UUe().source(WUe).target(GUe);
+function YUe() {
+ return KUe().source(qUe).target(JUe);
}
//#endregion
//#region src/react/taste/taste.ts
-var qUe = "/api/taste", F8 = "/api/taste/refresh", JUe = "/api/taste/import", YUe = "/api/taste/source", I8 = (e) => ["taste", e], XUe = ["taste", "refresh"], ZUe = [
+var XUe = "/api/taste", F8 = "/api/taste/refresh", ZUe = "/api/taste/import", QUe = "/api/taste/source", I8 = (e) => ["taste", e], $Ue = ["taste", "refresh"], eWe = [
["7d", "最近 7 天"],
["30d", "最近 30 天"],
["90d", "最近 90 天"],
["365d", "最近一年"],
["all", "全部时间"]
-], L8 = (e, t) => G(`${qUe}?window=${e}`, t), QUe = (e) => G(F8, e);
-async function $Ue(e, t) {
+], L8 = (e, t) => G(`${XUe}?window=${e}`, t), tWe = (e) => G(F8, e);
+async function nWe(e, t) {
await z.fetchQuery({
queryKey: I8(e),
queryFn: () => L8(e, t)
});
}
-var eWe = (e) => K(F8, {
+var rWe = (e) => K(F8, {
window: e,
background: !0
-}), tWe = (e, t) => K(YUe, {
+}), iWe = (e, t) => K(QUe, {
operation: "remove",
source_key: e,
window: t
});
-async function nWe(e) {
- let t = await fetch(JUe, {
+async function aWe(e) {
+ let t = await fetch(ZUe, {
method: "POST",
credentials: "same-origin",
headers: {
@@ -75439,21 +75535,21 @@ async function nWe(e) {
}
return n;
}
-var rWe = 1e4, R8 = (e) => e ? new Date(e).toLocaleDateString("zh-CN") : "—", iWe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, aWe = (e) => Number(e.web_visits ?? e.score ?? e.visits ?? e.peach_items ?? 0);
-function oWe(e) {
+var oWe = 1e4, R8 = (e) => e ? new Date(e).toLocaleDateString("zh-CN") : "—", sWe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, cWe = (e) => Number(e.web_visits ?? e.score ?? e.visits ?? e.peach_items ?? 0);
+function lWe(e) {
if (e.web_visits == null) return Number(e.score || e.visits || 0).toLocaleString();
let t = [];
return e.web_visits && t.push(`浏览 ${e.web_visits}`), e.peach_items && t.push(`Peach ${e.peach_items}`), t.join(" · ");
}
-function sWe(e) {
- let t = e.map(aWe), n = Math.max(1, ...t);
+function uWe(e) {
+ let t = e.map(cWe), n = Math.max(1, ...t);
return t.map((e) => Math.max(0, Math.min(100, e / n * 100)));
}
var z8 = (e, t) => e.filter((e) => Number.isFinite(Number(e.score)) && Number(e.score) > 0).map((e) => ({
name: e.name,
value: Number(e.score)
})).sort((e, t) => t.value - e.value).slice(0, t);
-function cWe(e) {
+function dWe(e) {
let t = z8(e, 6);
return t.length < 3 ? [] : t;
}
@@ -75464,10 +75560,10 @@ var B8 = {
source: 145,
target: 545
};
-function lWe(e = []) {
+function fWe(e = []) {
let t = e.filter((e) => e.source && e.target && Number.isFinite(e.value) && e.value > 0);
if (!t.length) return null;
- let n = [...new Set(t.map((e) => e.source))], r = [...new Set(t.map((e) => e.target))], i = PUe().nodeId((e) => e.id).nodeWidth(10).nodePadding(22).extent([[155, 16], [535, 404]])({
+ let n = [...new Set(t.map((e) => e.source))], r = [...new Set(t.map((e) => e.target))], i = LUe().nodeId((e) => e.id).nodeWidth(10).nodePadding(22).extent([[155, 16], [535, 404]])({
nodes: [...n.map((e) => ({
id: `source:${e}`,
name: e,
@@ -75482,7 +75578,7 @@ function lWe(e = []) {
target: `target:${e.target}`,
value: e.value
}))
- }), a = t.reduce((e, t) => e + t.value, 0), o = KUe();
+ }), a = t.reduce((e, t) => e + t.value, 0), o = YUe();
return {
nodes: i.nodes.map((e) => ({
id: e.id,
@@ -75512,7 +75608,7 @@ function lWe(e = []) {
total: a
};
}
-var uWe = (e) => e.length > 18 ? `${e.slice(0, 16)}…` : e, H8 = B.memo(function({ cx: e, cy: t, dataKey: n, chartId: r, className: i, fillOpacity: a = 1, type: o = "default", maskId: s }) {
+var pWe = (e) => e.length > 18 ? `${e.slice(0, 16)}…` : e, H8 = B.memo(function({ cx: e, cy: t, dataKey: n, chartId: r, className: i, fillOpacity: a = 1, type: o = "default", maskId: s }) {
let c = B.useId().replace(/:/g, ""), l = `url(#${r}-colors-${String(n)})`;
if (e === void 0 || t === void 0) return null;
switch (o) {
@@ -75635,14 +75731,14 @@ var G8 = B.memo(({ cx: e, cy: t, dotId: n, fillOpacity: r, gradientUrl: i, class
G8.displayName = "ColoredBorderDot";
//#endregion
//#region src/react/evilcharts/registry/charts/recharts-radar-chart.tsx
-var dWe = 1, fWe = .3, pWe = 6, K8 = 1500, q8 = "value", J8 = (0, B.createContext)(null);
+var mWe = 1, hWe = .3, gWe = 6, K8 = 1500, q8 = "value", J8 = (0, B.createContext)(null);
function Y8() {
let e = (0, B.use)(J8);
if (!e) throw Error("Radar chart parts (<Radar />, <PolarAngleAxis />, …) must be used within <EvilRadarChart />");
return e;
}
function X8({ config: e, data: t, children: n, className: r, chartProps: i, backgroundVariant: a, defaultSelectedDataKey: o = null, onSelectionChange: s, isLoading: c = !1, loadingPoints: l }) {
- let u = (0, B.useId)().replace(/:/g, ""), [d, f] = (0, B.useState)(o), p = EWe(c, l), m = (0, B.useCallback)((e) => {
+ let u = (0, B.useId)().replace(/:/g, ""), [d, f] = (0, B.useState)(o), p = kWe(c, l), m = (0, B.useCallback)((e) => {
f(e), s?.(e);
}, [s]), h = (0, B.useMemo)(() => ({
config: e,
@@ -75660,32 +75756,32 @@ function X8({ config: e, data: t, children: n, className: r, chartProps: i, back
children: /* @__PURE__ */ (0, V.jsxs)(T6, {
className: r,
config: e,
- children: [/* @__PURE__ */ (0, V.jsx)(E6, { isLoading: c }), /* @__PURE__ */ (0, V.jsxs)(ZVe, {
+ children: [/* @__PURE__ */ (0, V.jsx)(E6, { isLoading: c }), /* @__PURE__ */ (0, V.jsxs)(eHe, {
id: u,
data: c ? p : t,
...i,
children: [
a && /* @__PURE__ */ (0, V.jsx)(L6, { variant: a }),
n,
- c && /* @__PURE__ */ (0, V.jsx)(DWe, {})
+ c && /* @__PURE__ */ (0, V.jsx)(AWe, {})
]
})]
})
});
}
-function mWe({ dataKey: e, variant: t = "filled", fillOpacity: n = fWe, isGlowing: r = !1, isClickable: i = !1, children: a, radarProps: o }) {
+function _We({ dataKey: e, variant: t = "filled", fillOpacity: n = hWe, isGlowing: r = !1, isClickable: i = !1, children: a, radarProps: o }) {
let { config: s, isLoading: c, selectedDataKey: l, selectDataKey: u } = Y8(), d = (0, B.useId)().replace(/:/g, "");
if (c) return null;
let f = i && l !== null && l !== e, p = {
stroke: f ? .2 : 1,
fill: f ? .1 : 1,
dot: f ? .2 : 1
- }, m = t === "filled", { dot: h, activeDot: g } = bWe(a, d, e, p.dot);
+ }, m = t === "filled", { dot: h, activeDot: g } = CWe(a, d, e, p.dot);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(u2, {
dataKey: e,
stroke: `url(#${d}-radar-stroke-${e})`,
strokeOpacity: p.stroke,
- strokeWidth: dWe,
+ strokeWidth: mWe,
fill: m ? `url(#${d}-radar-fill-${e})` : "none",
fillOpacity: m ? n * p.fill : 0,
dot: h,
@@ -75698,29 +75794,29 @@ function mWe({ dataKey: e, variant: t = "filled", fillOpacity: n = fWe, isGlowin
},
...o
}), /* @__PURE__ */ (0, V.jsxs)("defs", { children: [
- /* @__PURE__ */ (0, V.jsx)(xWe, {
+ /* @__PURE__ */ (0, V.jsx)(wWe, {
id: d,
dataKey: e,
config: s
}),
- /* @__PURE__ */ (0, V.jsx)(SWe, {
+ /* @__PURE__ */ (0, V.jsx)(TWe, {
id: d,
dataKey: e,
config: s
}),
- m && /* @__PURE__ */ (0, V.jsx)(CWe, {
+ m && /* @__PURE__ */ (0, V.jsx)(EWe, {
id: d,
dataKey: e,
config: s
}),
- r && /* @__PURE__ */ (0, V.jsx)(wWe, {
+ r && /* @__PURE__ */ (0, V.jsx)(DWe, {
id: d,
dataKey: e
})
] })] });
}
var Z8 = () => null, Q8 = () => null;
-function hWe({ gridType: e = "polygon", stroke: t = "currentColor", strokeOpacity: n = .2, strokeDasharray: r = "3 4", ...i }) {
+function vWe({ gridType: e = "polygon", stroke: t = "currentColor", strokeOpacity: n = .2, strokeDasharray: r = "3 4", ...i }) {
return /* @__PURE__ */ (0, V.jsx)(r0, {
gridType: e,
stroke: t,
@@ -75729,7 +75825,7 @@ function hWe({ gridType: e = "polygon", stroke: t = "currentColor", strokeOpacit
...i
});
}
-function gWe({ tick: e = {
+function yWe({ tick: e = {
fill: "currentColor",
fontSize: 12
}, tickLine: t = !1, ...n }) {
@@ -75740,7 +75836,7 @@ function gWe({ tick: e = {
...n
});
}
-function _We({ tick: e = {
+function bWe({ tick: e = {
fill: "currentColor",
fontSize: 10
}, tickLine: t = !1, axisLine: n = !1, ...r }) {
@@ -75752,7 +75848,7 @@ function _We({ tick: e = {
...r
});
}
-function vWe({ variant: e, roundness: t, defaultIndex: n }) {
+function xWe({ variant: e, roundness: t, defaultIndex: n }) {
let { isLoading: r, selectedDataKey: i } = Y8();
return r ? null : /* @__PURE__ */ (0, V.jsx)(j6, {
defaultIndex: n,
@@ -75764,7 +75860,7 @@ function vWe({ variant: e, roundness: t, defaultIndex: n }) {
})
});
}
-function yWe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
+function SWe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
let { isLoading: i, selectedDataKey: a, selectDataKey: o } = Y8();
return i ? null : /* @__PURE__ */ (0, V.jsx)(N6, {
verticalAlign: n,
@@ -75777,7 +75873,7 @@ function yWe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isC
})
});
}
-var bWe = (e, t, n, r) => {
+var CWe = (e, t, n, r) => {
let i = !1, a = !1;
return B.Children.forEach(e, (e) => {
if ((0, B.isValidElement)(e)) {
@@ -75819,7 +75915,7 @@ var bWe = (e, t, n, r) => {
stopColor: `var(--color-${e}-${i}, var(--color-${e}-0))`,
stopOpacity: n?.[i]
}, a);
-}) }), xWe = ({ id: e, dataKey: t, config: n }) => {
+}) }), wWe = ({ id: e, dataKey: t, config: n }) => {
let r = k6(n[t] ?? {});
return /* @__PURE__ */ (0, V.jsx)("linearGradient", {
id: `${e}-colors-${t}`,
@@ -75832,7 +75928,7 @@ var bWe = (e, t, n, r) => {
colorsCount: r
})
});
-}, SWe = ({ id: e, dataKey: t, config: n }) => {
+}, TWe = ({ id: e, dataKey: t, config: n }) => {
let r = k6(n[t] ?? {});
return /* @__PURE__ */ (0, V.jsx)("linearGradient", {
id: `${e}-radar-stroke-${t}`,
@@ -75845,7 +75941,7 @@ var bWe = (e, t, n, r) => {
colorsCount: r
})
});
-}, CWe = ({ id: e, dataKey: t, config: n }) => {
+}, EWe = ({ id: e, dataKey: t, config: n }) => {
let r = k6(n[t] ?? {}), i = r === 1 ? [.8, .3] : Array.from({ length: r }, (e, t) => t === 0 ? .8 : .3);
return /* @__PURE__ */ (0, V.jsx)("radialGradient", {
id: `${e}-radar-fill-${t}`,
@@ -75858,7 +75954,7 @@ var bWe = (e, t, n, r) => {
opacities: i
})
});
-}, wWe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)("filter", {
+}, DWe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, V.jsxs)("filter", {
id: `${e}-radar-glow-${t}`,
x: "-50%",
y: "-50%",
@@ -75878,7 +75974,7 @@ var bWe = (e, t, n, r) => {
}),
/* @__PURE__ */ (0, V.jsxs)("feMerge", { children: [/* @__PURE__ */ (0, V.jsx)("feMergeNode", { in: "glow" }), /* @__PURE__ */ (0, V.jsx)("feMergeNode", { in: "SourceGraphic" })] })
]
-}), TWe = (e) => [
+}), OWe = (e) => [
"A",
"B",
"C",
@@ -75889,7 +75985,7 @@ var bWe = (e, t, n, r) => {
skill: e,
[q8]: 30 + Math.random() * 70
}));
-function EWe(e, t = pWe) {
+function kWe(e, t = gWe) {
let [n, r] = (0, B.useState)(0);
return (0, B.useEffect)(() => {
if (!e) return;
@@ -75897,9 +75993,9 @@ function EWe(e, t = pWe) {
r((e) => e + 1);
}, K8);
return () => clearInterval(t);
- }, [e]), (0, B.useMemo)(() => TWe(t), [t, n]);
+ }, [e]), (0, B.useMemo)(() => OWe(t), [t, n]);
}
-var DWe = () => /* @__PURE__ */ (0, V.jsx)(u2, {
+var AWe = () => /* @__PURE__ */ (0, V.jsx)(u2, {
dataKey: q8,
stroke: "currentColor",
strokeOpacity: .3,
@@ -75911,17 +76007,17 @@ var DWe = () => /* @__PURE__ */ (0, V.jsx)(u2, {
animationDuration: K8,
animationEasing: "ease-in-out"
});
-X8.Radar = mWe, X8.Dot = Z8, X8.ActiveDot = Q8, X8.PolarGrid = hWe, X8.PolarAngleAxis = gWe, X8.PolarRadiusAxis = _We, X8.Tooltip = vWe, X8.Legend = yWe;
+X8.Radar = _We, X8.Dot = Z8, X8.ActiveDot = Q8, X8.PolarGrid = vWe, X8.PolarAngleAxis = yWe, X8.PolarRadiusAxis = bWe, X8.Tooltip = xWe, X8.Legend = SWe;
//#endregion
//#region src/react/taste/charts.tsx
-var OWe = [
+var jWe = [
"stroke-chart-1",
"stroke-chart-2",
"stroke-chart-3",
"stroke-chart-4",
"stroke-chart-5",
"stroke-chart-6"
-], kWe = [
+], MWe = [
"fill-chart-1",
"fill-chart-2",
"fill-chart-3",
@@ -75931,7 +76027,7 @@ var OWe = [
], e5 = { value: {
label: "标签命中",
colors: K6(G6[3])
-} }, AWe = [
+} }, NWe = [
"min-h-24",
"min-h-24",
"min-h-24",
@@ -75941,20 +76037,20 @@ var OWe = [
"min-h-52",
"min-h-60",
"min-h-64"
-], jWe = 26, MWe = { radius: e5.value }, NWe = (e, t) => Math.sqrt(e / t);
-function PWe({ rows: e, label: t }) {
- let n = cWe(e);
+], PWe = 26, FWe = { radius: e5.value }, IWe = (e, t) => Math.sqrt(e / t);
+function LWe({ rows: e, label: t }) {
+ let n = dWe(e);
if (!n.length) return null;
let r = n[0].value, i = n.map((e) => ({
...e,
- radius: NWe(e.value, r)
+ radius: IWe(e.value, r)
}));
return /* @__PURE__ */ (0, V.jsx)("div", {
role: "img",
"aria-label": `${t}:${i.map((e) => e.name).join(",")}`,
children: /* @__PURE__ */ (0, V.jsxs)(X8, {
data: i,
- config: MWe,
+ config: FWe,
chartProps: { outerRadius: "58%" },
className: "aspect-auto h-70 text-text-secondary",
children: [
@@ -75971,17 +76067,17 @@ function PWe({ rows: e, label: t }) {
})
});
}
-function FWe({ rows: e, label: t }) {
+function RWe({ rows: e, label: t }) {
let n = z8(e, 8);
return n.length ? /* @__PURE__ */ (0, V.jsx)("section", {
"aria-label": t,
- className: `flex grow flex-col ${AWe[n.length]}`,
+ className: `flex grow flex-col ${NWe[n.length]}`,
children: /* @__PURE__ */ (0, V.jsxs)(V6, {
data: n,
config: e5,
layout: "horizontal",
barRadius: 4,
- chartProps: { maxBarSize: jWe },
+ chartProps: { maxBarSize: PWe },
className: "aspect-auto text-text-secondary",
children: [
/* @__PURE__ */ (0, V.jsx)(V6.YAxis, {
@@ -76005,8 +76101,8 @@ function FWe({ rows: e, label: t }) {
})
}) : null;
}
-function IWe({ flows: e }) {
- let [t, n] = (0, B.useState)(null), r = lWe(e);
+function zWe({ flows: e }) {
+ let [t, n] = (0, B.useState)(null), r = fWe(e);
if (!r) return null;
let i = t?.node ?? null, a = (e, n) => t ? i === null ? t.label === n : e.source === i || e.target === i : !0;
return /* @__PURE__ */ (0, V.jsxs)("section", {
@@ -76034,7 +76130,7 @@ function IWe({ flows: e }) {
"aria-label": `${e.label}:${e.value} 条线索`,
fillOpacity: 0,
strokeOpacity: a(e, e.label) ? .55 : .08,
- className: `outline-none transition-opacity ${OWe[e.color]}`,
+ className: `outline-none transition-opacity ${jWe[e.color]}`,
onPointerEnter: () => n({
value: e.value,
label: e.label,
@@ -76068,14 +76164,14 @@ function IWe({ flows: e }) {
width: 10,
height: e.height,
rx: 5,
- className: e.side === "source" ? kWe[e.color] : "fill-text-secondary"
+ className: e.side === "source" ? MWe[e.color] : "fill-text-secondary"
}), /* @__PURE__ */ (0, V.jsxs)("text", {
x: V8[e.side],
y: e.y + e.height / 2,
textAnchor: e.side === "source" ? "end" : "start",
dominantBaseline: "middle",
className: "fill-text-secondary text-caption-1-regular",
- children: [uWe(e.name), /* @__PURE__ */ (0, V.jsx)("tspan", {
+ children: [pWe(e.name), /* @__PURE__ */ (0, V.jsx)("tspan", {
x: V8[e.side],
dy: 15,
children: e.side === "source" ? e.value.toLocaleString() : `${e.share.toFixed(1)}%`
@@ -76093,11 +76189,11 @@ function IWe({ flows: e }) {
}
//#endregion
//#region src/react/taste/taste-page.tsx
-var LWe = 10, t5 = vE(bk, xk, "text-body-2-medium"), n5 = `${wE()} flex flex-col gap-4`, r5 = "rounded-xl bg-background-primary-default p-3", RWe = "读取运行 Peach 的这台电脑上的浏览记录", zWe = "导入或读取浏览记录后,这里会列出已采集设备。", BWe = "馆藏里暂时没有对得上浏览信号的标签。", VWe = "采集浏览记录后,这里会显示聚合后的口味证据。", HWe = "这些词在浏览记录中出现,但 Peach 观看记录还没有对应证据", UWe = "在运行 Peach 的电脑上使用浏览器:点上面的「读取浏览器历史」。", WWe = "记录在其他设备上:导出文件后,点上面的「导入历史文件」。多台设备的文件分别导入。", GWe = "需要刷新时再次读取或导入;数据源可在页面底部移除。", KWe = "这个数据源将不再用于口味分析。原始导出文件保留。", i5 = "peach-taste-guide-dismissed";
+var BWe = 10, t5 = vE(dM, fM, "text-body-2-medium"), n5 = `${wE()} flex flex-col gap-4`, r5 = "rounded-xl bg-background-primary-default p-3", VWe = "读取运行 Peach 的这台电脑上的浏览记录", HWe = "导入或读取浏览记录后,这里会列出已采集设备。", UWe = "馆藏里暂时没有对得上浏览信号的标签。", WWe = "采集浏览记录后,这里会显示聚合后的口味证据。", GWe = "这些词在浏览记录中出现,但 Peach 观看记录还没有对应证据", KWe = "在运行 Peach 的电脑上使用浏览器:点上面的「读取浏览器历史」。", qWe = "记录在其他设备上:导出文件后,点上面的「导入历史文件」。多台设备的文件分别导入。", JWe = "需要刷新时再次读取或导入;数据源可在页面底部移除。", YWe = "这个数据源将不再用于口味分析。原始导出文件保留。", i5 = "peach-taste-guide-dismissed";
function a5({ icon: e, term: t, figure: n, detail: r, accent: i }) {
return /* @__PURE__ */ (0, V.jsx)("div", {
- className: _M(),
- children: /* @__PURE__ */ (0, V.jsx)(xM, {
+ className: iM(),
+ children: /* @__PURE__ */ (0, V.jsx)(cM, {
label: t,
icon: e,
accent: i,
@@ -76120,22 +76216,22 @@ function o5({ name: e, domain: t }) {
})]
});
}
-function qWe({ html: e }) {
+function XWe({ html: e }) {
return /* @__PURE__ */ (0, V.jsx)("span", {
- className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-medium text-text-secondary ${rL}`,
+ className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-medium text-text-secondary ${eL}`,
dangerouslySetInnerHTML: { __html: e }
});
}
-function JWe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
+function ZWe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
if (!e.length) return /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: ET,
+ icon: TT,
title: "暂无足够证据",
children: r
});
- let a = sWe(e);
+ let a = uWe(e);
return /* @__PURE__ */ (0, V.jsx)(c8, {
- previewCount: LWe,
+ previewCount: BWe,
className: "inline-grid w-full gap-x-7 gap-y-2 sm:grid-cols-2",
children: e.map((e, r) => {
let o = !!t && !!e.peach_items, s = String(e.source_domain || ""), c = /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
@@ -76162,7 +76258,7 @@ function JWe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
name: e.name,
domain: s
}) : null,
- n !== "none" && n !== "domain" && (e.entity_id || e.has_avatar || !s) ? /* @__PURE__ */ (0, V.jsx)(qWe, { html: w(e.name, e.entity_id ? {
+ n !== "none" && n !== "domain" && (e.entity_id || e.has_avatar || !s) ? /* @__PURE__ */ (0, V.jsx)(XWe, { html: w(e.name, e.entity_id ? {
id: e.entity_id,
has_image: !!e.has_image,
image_version: e.image_version,
@@ -76175,7 +76271,7 @@ function JWe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
children: e.name
}), /* @__PURE__ */ (0, V.jsx)("small", {
className: "text-caption-1-regular text-text-secondary",
- children: oWe(e)
+ children: lWe(e)
})]
}),
o ? /* @__PURE__ */ (0, V.jsx)(uT, {
@@ -76199,30 +76295,30 @@ function JWe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
});
}
function s5({ label: e, panels: t, onSignal: n }) {
- return /* @__PURE__ */ (0, V.jsxs)(lk, {
+ return /* @__PURE__ */ (0, V.jsxs)(Jk, {
className: `${wE({ padding: "none" })} flex flex-col`,
children: [/* @__PURE__ */ (0, V.jsx)("div", {
className: "px-4 pt-3",
- children: /* @__PURE__ */ (0, V.jsx)(dA, {
+ children: /* @__PURE__ */ (0, V.jsx)($k, {
"aria-label": e,
- className: pA,
- children: t.map((e) => /* @__PURE__ */ (0, V.jsx)(dk, {
+ className: tA,
+ children: t.map((e) => /* @__PURE__ */ (0, V.jsx)(Xk, {
id: e.id,
- className: mA,
+ className: nA,
children: e.name
}, e.id))
})
- }), t.map((e) => /* @__PURE__ */ (0, V.jsx)(fk, {
+ }), t.map((e) => /* @__PURE__ */ (0, V.jsx)(Zk, {
id: e.id,
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, V.jsx)(JWe, {
+ children: /* @__PURE__ */ (0, V.jsx)(ZWe, {
...e.props,
onSignal: n
})
}, e.id))]
});
}
-function YWe({ data: e, onSignal: t, navigate: n }) {
+function QWe({ data: e, onSignal: t, navigate: n }) {
let r = e.analysis;
if (!r?.headline) return null;
let i = r.confidence || {}, a = [...(r.explore || []).map((e) => ({
@@ -76295,14 +76391,14 @@ function YWe({ data: e, onSignal: t, navigate: n }) {
}, e.key))
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: ET,
+ icon: TT,
title: "还没有可探索的入口",
- children: BWe
+ children: UWe
})
]
});
}
-function XWe({ onboarding: e, done: t }) {
+function $We({ onboarding: e, done: t }) {
let [n, r] = (0, B.useState)(() => {
try {
return localStorage.getItem(i5) === "1";
@@ -76315,17 +76411,17 @@ function XWe({ onboarding: e, done: t }) {
padding: "none",
className: "p-4"
}),
- children: /* @__PURE__ */ (0, V.jsxs)(Bk, {
+ children: /* @__PURE__ */ (0, V.jsxs)(GE, {
summary: "浏览器历史记录导入指南",
defaultOpen: e,
children: [
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: UWe
+ children: KWe
}),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: WWe
+ children: qWe
}),
/* @__PURE__ */ (0, V.jsxs)("ul", {
className: "flex list-disc flex-col gap-1 pl-5 text-body-2-regular text-text-secondary",
@@ -76355,7 +76451,7 @@ function XWe({ onboarding: e, done: t }) {
}),
/* @__PURE__ */ (0, V.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: GWe
+ children: JWe
}),
/* @__PURE__ */ (0, V.jsx)("span", {
className: "self-start",
@@ -76375,7 +76471,7 @@ function XWe({ onboarding: e, done: t }) {
})
});
}
-function ZWe({ busy: e, onRefresh: t, onImport: n }) {
+function eGe({ busy: e, onRefresh: t, onImport: n }) {
let r = (0, B.useRef)(null), [i, a] = (0, B.useState)(!1), o = (e) => {
a(!1), e();
};
@@ -76384,8 +76480,8 @@ function ZWe({ busy: e, onRefresh: t, onImport: n }) {
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, V.jsx)(J, {
- leadingIcon: hT,
- title: RWe,
+ leadingIcon: mT,
+ title: VWe,
onClick: t,
...X(e),
children: "读取浏览器历史"
@@ -76401,21 +76497,21 @@ function ZWe({ busy: e, onRefresh: t, onImport: n }) {
e || a(!0);
}
})]
- }), /* @__PURE__ */ (0, V.jsx)(gO, {
+ }), /* @__PURE__ */ (0, V.jsx)(tk, {
triggerRef: r,
isOpen: i,
onOpenChange: a,
placement: "bottom end",
offset: 4,
- className: yk,
- children: /* @__PURE__ */ (0, V.jsxs)(SM, {
+ className: uM,
+ children: /* @__PURE__ */ (0, V.jsxs)(lM, {
"aria-label": "更多取得浏览记录的方式",
className: "flex w-52 flex-col gap-1 outline-none",
children: [/* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
className: t5,
onClick: () => o(t),
- children: [/* @__PURE__ */ (0, V.jsx)(hT, {
+ children: [/* @__PURE__ */ (0, V.jsx)(mT, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "读取浏览器历史"]
@@ -76423,7 +76519,7 @@ function ZWe({ busy: e, onRefresh: t, onImport: n }) {
type: "button",
className: t5,
onClick: () => o(n),
- children: [/* @__PURE__ */ (0, V.jsx)(DT, {
+ children: [/* @__PURE__ */ (0, V.jsx)(ET, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "导入历史文件"]
@@ -76431,9 +76527,9 @@ function ZWe({ busy: e, onRefresh: t, onImport: n }) {
})
})] });
}
-function QWe({ sources: e, window: t, toast: n }) {
+function tGe({ sources: e, window: t, toast: n }) {
let r = OS({
- mutationFn: (e) => tWe(e, t),
+ mutationFn: (e) => iWe(e, t),
onSuccess: (e) => {
z.setQueryData(I8(t), e.dashboard), n("已移除口味数据源");
}
@@ -76457,10 +76553,10 @@ function QWe({ sources: e, window: t, toast: n }) {
children: [
/* @__PURE__ */ (0, V.jsx)("span", {
className: "inline-grid size-8 shrink-0 place-items-center rounded-lg text-text-secondary",
- children: e.browser === "browserexport" ? /* @__PURE__ */ (0, V.jsx)(DT, {
+ children: e.browser === "browserexport" ? /* @__PURE__ */ (0, V.jsx)(ET, {
"aria-hidden": !0,
className: "size-4"
- }) : /* @__PURE__ */ (0, V.jsx)(gT, {
+ }) : /* @__PURE__ */ (0, V.jsx)(hT, {
"aria-hidden": !0,
className: "size-4"
})
@@ -76480,12 +76576,12 @@ function QWe({ sources: e, window: t, toast: n }) {
size: "small",
"aria-label": `移除 ${e.profile}`,
iconOnly: !0,
- leadingIcon: _T,
+ leadingIcon: gT,
...X(r.isPending),
onClick: () => {
r.isPending || Te({
title: "移除口味数据源",
- body: KWe,
+ body: YWe,
confirmLabel: "移除口味数据源",
onConfirm: () => r.mutateAsync(e.source_key)
});
@@ -76495,28 +76591,28 @@ function QWe({ sources: e, window: t, toast: n }) {
}, e.source_key))
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: gT,
+ icon: hT,
title: "还没有数据源",
- children: zWe
+ children: HWe
})
]
});
}
-function $We(e) {
+function nGe(e) {
let { onSignal: t, navigate: n, toast: r, onboarding: i } = e, [a, o] = (0, B.useState)("all"), [s, c] = (0, B.useState)("browser"), l = (0, B.useRef)(null), u = TS({
queryKey: I8(a),
queryFn: ({ signal: e }) => L8(a, e),
placeholderData: AS.keepPreviousData
- }), { job: d, running: f, outcome: p, start: m } = IM({
- queryKey: XUe,
- queryFn: ({ signal: e }) => QUe(e),
- start: () => eWe(a),
- idlePollMs: rWe,
+ }), { job: d, running: f, outcome: p, start: m } = kM({
+ queryKey: $Ue,
+ queryFn: ({ signal: e }) => tWe(e),
+ start: () => rWe(a),
+ idlePollMs: oWe,
onFinish: (e) => {
e.status !== "failed" && (z.invalidateQueries({ queryKey: ["taste"] }), r("已更新口味分析"));
}
}), h = OS({
- mutationFn: (e) => nWe(e),
+ mutationFn: (e) => aWe(e),
onSuccess: (e) => {
z.setQueryData(I8("all"), e.dashboard), o("all"), r("已导入口味数据");
}
@@ -76533,40 +76629,40 @@ function $We(e) {
}) });
let y = v.summary || {}, b = v.coverage || {}, x = v.rankings || {}, S = v.storage || {}, C = x.browser_categories || [], w = v.gaps || [], T = b.tagged || 0, E = b.identified || 0, D = m.error ? W(m.error) : h.error ? W(h.error) : p?.status === "failed" ? p.error || "读取未取得" : "";
return /* @__PURE__ */ (0, V.jsxs)(DE, { children: [
- /* @__PURE__ */ (0, V.jsxs)(lk, {
+ /* @__PURE__ */ (0, V.jsxs)(Jk, {
selectedKey: s,
onSelectionChange: (e) => c(String(e)),
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center justify-between gap-3",
- children: [/* @__PURE__ */ (0, V.jsxs)(dA, {
+ children: [/* @__PURE__ */ (0, V.jsxs)($k, {
"aria-label": "口味证据来源",
- className: pA,
- children: [/* @__PURE__ */ (0, V.jsx)(dk, {
+ className: tA,
+ children: [/* @__PURE__ */ (0, V.jsx)(Xk, {
id: "browser",
- className: mA,
+ className: nA,
children: "浏览器记录"
- }), /* @__PURE__ */ (0, V.jsx)(dk, {
+ }), /* @__PURE__ */ (0, V.jsx)(Xk, {
id: "peach",
- className: mA,
+ className: nA,
children: "Peach 内部"
})]
}), /* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(Ck, {
+ /* @__PURE__ */ (0, V.jsx)(EM, {
"aria-label": "分析范围",
selectedKey: a,
onSelectionChange: (e) => {
e !== null && o(String(e));
},
- children: ZUe.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(wk, {
+ children: eWe.map(([e, t]) => /* @__PURE__ */ (0, V.jsx)(DM, {
id: e,
children: t
}, e))
}),
- /* @__PURE__ */ (0, V.jsx)(ZWe, {
+ /* @__PURE__ */ (0, V.jsx)(eGe, {
busy: f || m.isPending || h.isPending,
onRefresh: _,
onImport: () => l.current?.click()
@@ -76582,7 +76678,7 @@ function $We(e) {
]
})]
}),
- /* @__PURE__ */ (0, V.jsx)(XWe, {
+ /* @__PURE__ */ (0, V.jsx)($We, {
onboarding: i,
done: !!(y.history_sources || v.updated_at)
}),
@@ -76590,48 +76686,48 @@ function $We(e) {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
children: [
- f ? /* @__PURE__ */ (0, V.jsx)(MM, {
+ f ? /* @__PURE__ */ (0, V.jsx)(SM, {
label: d?.message || "正在读取浏览记录并更新口味分析",
value: d?.checked,
total: d?.total
}) : null,
- h.isPending ? /* @__PURE__ */ (0, V.jsx)(MM, { label: "正在导入历史文件" }) : null,
+ h.isPending ? /* @__PURE__ */ (0, V.jsx)(SM, { label: "正在导入历史文件" }) : null,
D ? /* @__PURE__ */ (0, V.jsx)(Y, {
tone: "error",
children: D
}) : null
]
}),
- /* @__PURE__ */ (0, V.jsxs)(fk, {
+ /* @__PURE__ */ (0, V.jsxs)(Zk, {
id: "browser",
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
- className: vM,
+ className: aM,
children: [
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 0,
- icon: xT,
+ icon: bT,
term: "浏览记录",
figure: Number(y.history_visits || 0).toLocaleString(),
detail: `${y.history_sources || 0} 个数据源 · ${R8(y.range_start)}—${R8(y.range_end)}`
}),
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 1,
- icon: CT,
+ icon: ST,
term: "口味维度",
figure: C.length.toLocaleString(),
detail: C[0]?.name || "尚无主维度"
}),
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 2,
- icon: ET,
+ icon: TT,
term: "浏览候选",
figure: w.length.toLocaleString()
}),
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 3,
- icon: gT,
+ icon: hT,
term: "私有导出",
figure: Number(S.exports || 0).toLocaleString(),
detail: pe(S.bytes || 0)
@@ -76648,7 +76744,7 @@ function $We(e) {
className: "text-caption-1-regular text-text-secondary",
children: "浏览器画像"
}),
- /* @__PURE__ */ (0, V.jsx)(PWe, {
+ /* @__PURE__ */ (0, V.jsx)(LWe, {
rows: C,
label: "主要口味维度"
}),
@@ -76659,14 +76755,14 @@ function $We(e) {
]
}), /* @__PURE__ */ (0, V.jsx)("div", {
className: "flex min-w-0 grow flex-col",
- children: C.length ? /* @__PURE__ */ (0, V.jsx)(FWe, {
+ children: C.length ? /* @__PURE__ */ (0, V.jsx)(RWe, {
rows: C,
label: "口味维度排名"
}) : /* @__PURE__ */ (0, V.jsx)(TE, {
shell: "plain",
- icon: ET,
+ icon: TT,
title: "暂无口味维度",
- children: VWe
+ children: WWe
})
})]
}),
@@ -76682,7 +76778,7 @@ function $We(e) {
tone: 4,
empty: "还没有可用于分析的口味网站访问记录。"
}),
- /* @__PURE__ */ (0, V.jsx)(IWe, { flows: v.creator_flows }),
+ /* @__PURE__ */ (0, V.jsx)(zWe, { flows: v.creator_flows }),
/* @__PURE__ */ (0, V.jsx)(s5, {
label: "浏览器口味维度",
onSignal: t,
@@ -76724,42 +76820,42 @@ function $We(e) {
rows: w,
kind: "",
visual: "none",
- empty: HWe
+ empty: GWe
}
}
]
})
]
}),
- /* @__PURE__ */ (0, V.jsxs)(fk, {
+ /* @__PURE__ */ (0, V.jsxs)(Zk, {
id: "peach",
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
- className: vM,
+ className: aM,
children: [
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 0,
- icon: yT,
+ icon: vT,
term: "Peach 看过",
figure: Number(y.peach_items || 0).toLocaleString(),
- detail: iWe(y.peach_seconds || 0)
+ detail: sWe(y.peach_seconds || 0)
}),
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 1,
- icon: vae,
+ icon: yae,
term: "喜欢",
figure: Number(y.liked || 0).toLocaleString()
}),
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 2,
- icon: _ae,
+ icon: vae,
term: "不合口味",
figure: Number(y.disliked || 0).toLocaleString()
}),
/* @__PURE__ */ (0, V.jsx)(a5, {
accent: 3,
- icon: CT,
+ icon: ST,
term: "有标签",
figure: T.toLocaleString()
})
@@ -76837,12 +76933,12 @@ function $We(e) {
})
]
}),
- /* @__PURE__ */ (0, V.jsx)(YWe, {
+ /* @__PURE__ */ (0, V.jsx)(QWe, {
data: v,
onSignal: t,
navigate: n
}),
- /* @__PURE__ */ (0, V.jsx)(QWe, {
+ /* @__PURE__ */ (0, V.jsx)(tGe, {
sources: v.sources || [],
window: a,
toast: r
@@ -76871,7 +76967,7 @@ function c5({ term: e, value: t, rest: n }) {
}
//#endregion
//#region src/react/router/managed-routes.tsx
-function eGe(e, t, n) {
+function rGe(e, t, n) {
if (e === "duplicates") {
n("/duplicates");
return;
@@ -76881,8 +76977,8 @@ function eGe(e, t, n) {
}
var l5 = {
"/stats": {
- prefetch: (e, t) => Gbe(t),
- page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(kUe, {
+ prefetch: (e, t) => Ybe(t),
+ page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(MUe, {
tagLabel: ot,
onTag: t.openTag,
configurable: e.configurable,
@@ -76892,8 +76988,8 @@ var l5 = {
})
},
"/taste": {
- prefetch: (e, t) => $Ue("all", t),
- page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)($We, {
+ prefetch: (e, t) => nWe("all", t),
+ page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(nGe, {
onSignal: t.openTasteSignal,
navigate: n,
toast: (e) => t.receipt(e),
@@ -76901,8 +76997,8 @@ var l5 = {
})
},
"/review": {
- prefetch: (e, t) => Tue(t),
- page: (e, t) => /* @__PURE__ */ (0, V.jsx)(Ive, {
+ prefetch: (e, t) => pue(t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(Bve, {
...e,
route: t.routeReview,
openItem: t.openItem,
@@ -76912,47 +77008,45 @@ var l5 = {
})
},
"/data-cleanup": {
- prefetch: (e, t) => fde(t),
- page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(yfe, {
+ prefetch: (e, t) => ede(t),
+ page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(hfe, {
failure: t.failure,
- open: (e) => eGe(e, t, n),
+ open: (e) => rGe(e, t, n),
toast: (e, { warning: n = !1 } = {}) => n ? t.toast({ text: e }, { sound: "warning" }) : t.receipt(e)
})
},
"/duplicates": {
- prefetch: (e, t) => Ble(t),
- page: (e, t) => /* @__PURE__ */ (0, V.jsx)(mme, {
+ prefetch: (e, t) => Ole(t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(dme, {
openItem: t.openItem,
failure: t.failure,
toast: (e, { undo: n } = {}) => t.receipt(e, n ? { undo: n } : {})
})
},
"/quality-goals": {
- prefetch: (e, t) => iue(t),
- page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(bve, {
+ prefetch: (e, t) => Kle(t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(wve, {
openItem: t.openItem,
javTitleHtml: at,
javDisplayName: it,
- searchResources: (e) => {
- t.requestCloudDownload(e), n("/activity");
- },
+ toast: (e) => t.receipt(e),
srcBadge: t.srcBadge
})
},
"/scraping": {
- prefetch: (e, t) => Uve(t),
- page: (e, t) => /* @__PURE__ */ (0, V.jsx)(Xve, { toast: (e) => t.toast(e) })
+ prefetch: (e, t) => qve(t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(eye, { toast: (e) => t.toast(e) })
},
"/configuration": {
- prefetch: (e, t) => vR(t),
- page: (e, t) => /* @__PURE__ */ (0, V.jsx)(cbe, {
+ prefetch: (e, t) => _R(t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(fbe, {
receipt: (e) => t.receipt(e),
reopenTutorial: t.reopenTutorial
})
},
"/diagnostics": {
- prefetch: (e, t) => hme(t),
- page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(yme, {
+ prefetch: (e, t) => fme(t),
+ page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(gme, {
navigate: n,
openItem: t.openItem,
receipt: (e) => t.receipt(e),
@@ -76962,26 +77056,23 @@ var l5 = {
})
},
"/activity": {
- prefetch: (e, t) => Tce(t),
- page: (e) => /* @__PURE__ */ (0, V.jsx)(Yce, { ...e.prefill ? { prefill: e.prefill } : {} })
+ prefetch: (e, t) => koe(t),
+ page: () => /* @__PURE__ */ (0, V.jsx)(Koe, {})
},
"/follow-manage": {
- prefetch: (e, t) => Zme(t, e.tab),
- page: (e, t, n) => /* @__PURE__ */ (0, V.jsx)(x_e, {
+ prefetch: (e, t) => Jme(t, e.tab),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(T_e, {
...e,
route: t.routeFollowManage,
savePreference: t.saveFollowPreference,
toast: (e) => t.receipt(e),
- openFollow: t.openFollow,
- cloudDownload: (e) => {
- t.requestCloudDownload(e), n("/activity");
- }
+ openFollow: t.openFollow
})
}
}, u5 = (e) => Object.hasOwn(l5, e), d5 = {
"/playlists": {
- prefetch: (e, t) => ove(t),
- page: (e, t) => /* @__PURE__ */ (0, V.jsx)(vve, {
+ prefetch: (e, t) => uve(t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(Sve, {
revision: e.revision,
openPlaylist: t.openPlaylist,
openEntity: t.openEntity,
@@ -76990,12 +77081,12 @@ var l5 = {
})
},
"/follow": {
- prefetch: (e, t) => ahe(e, t),
- page: (e) => /* @__PURE__ */ (0, V.jsx)(khe, { ...e })
+ prefetch: (e, t) => nhe(e, t),
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(Ehe, { ...e })
}
}, f5 = (e) => Object.hasOwn(d5, e), p5 = {
- prefetch: (e, t) => Bfe(e, t),
- page: (e, t) => /* @__PURE__ */ (0, V.jsx)(L_e, {
+ prefetch: (e, t) => Ife(e, t),
+ page: (e, t) => /* @__PURE__ */ (0, V.jsx)(V_e, {
...e,
route: t.routeIndex,
savePreference: t.savePeopleLayout,
@@ -77015,8 +77106,8 @@ var l5 = {
"/agencies": p5,
"/tags": p5
}, h5 = {
- prefetch: (e) => kfe(e),
- page: (e) => /* @__PURE__ */ (0, V.jsx)(ame, { ...e })
+ prefetch: (e) => Tfe(e),
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(nme, { ...e })
}, g5 = {
"/performers/*": h5,
"/studios/*": h5,
@@ -77025,29 +77116,29 @@ var l5 = {
"/agencies/*": h5
}, _5 = {
"/": {
- prefetch: (e, t) => kre(e, t),
- page: (e) => /* @__PURE__ */ (0, V.jsx)(zA, { ...e })
+ prefetch: (e, t) => jre(e, t),
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(EA, { ...e })
},
"/junk-files": {
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, V.jsx)(Q_e, { ...e })
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(nve, { ...e })
}
-}, v5 = (e) => Object.hasOwn(_5, e), tGe = (e) => e.mode === "notice" ? /* @__PURE__ */ (0, V.jsx)(ive, { ...e }) : /* @__PURE__ */ (0, V.jsx)(PM, { ...e }), y5 = {
+}, v5 = (e) => Object.hasOwn(_5, e), iGe = (e) => e.mode === "notice" ? /* @__PURE__ */ (0, V.jsx)(cve, { ...e }) : /* @__PURE__ */ (0, V.jsx)(wM, { ...e }), y5 = {
"catalog-filter": {
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, V.jsx)(ule, { ...e })
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(Zce, { ...e })
},
"feed-new": {
- prefetch: (e) => wfe(e),
- page: (e) => /* @__PURE__ */ (0, V.jsx)(bme, { ...e })
+ prefetch: (e) => bfe(e),
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(_me, { ...e })
},
"library-processing": {
- prefetch: (e, t) => QA(t),
- page: (e) => /* @__PURE__ */ (0, V.jsx)(tGe, { ...e })
+ prefetch: (e, t) => zA(t),
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(iGe, { ...e })
},
search: {
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, V.jsx)(tye, { ...e })
+ page: (e) => /* @__PURE__ */ (0, V.jsx)(aye, { ...e })
}
}, b5 = (e) => Object.hasOwn(y5, e), x5 = {
"batch-dock": {
@@ -77068,35 +77159,35 @@ var l5 = {
},
"settings-panel": {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, V.jsx)(jbe, {})
+ page: () => /* @__PURE__ */ (0, V.jsx)(Fbe, {})
}
-}, S5 = (e) => Object.hasOwn(x5, e), nGe = [
+}, S5 = (e) => Object.hasOwn(x5, e), aGe = [
"/",
"/unseen",
"/watch-later",
"/flagged",
"/trash",
"/junk-files"
-], rGe = [
+], oGe = [
...Object.keys(l5),
...Object.keys(d5),
...Object.keys(m5),
...Object.keys(g5),
- ...nGe
+ ...aGe
], C5 = (e) => u5(e) || f5(e) || Object.hasOwn(m5, e) || Object.hasOwn(g5, e) || v5(e) || b5(e) || S5(e);
function w5(e) {
return u5(e) ? l5[e] : f5(e) ? d5[e] : v5(e) ? _5[e] : b5(e) ? y5[e] : S5(e) ? x5[e] : Object.hasOwn(m5, e) ? m5[e] : g5[e];
}
-function iGe(e, t, n) {
+function sGe(e, t, n) {
return C5(e) ? w5(e).prefetch(t, n) : Promise.reject(/* @__PURE__ */ Error(`路由树里没有这一页:${e}`));
}
-function aGe(e, t, n, r) {
+function cGe(e, t, n, r) {
return w5(e).page(t, n, r);
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/url.js
-var oGe = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, sGe = /^[\\/]{2}/;
-function cGe(e, t) {
+var lGe = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, uGe = /^[\\/]{2}/;
+function dGe(e, t) {
return t + e.replace(/\\/g, "/");
}
//#endregion
@@ -77112,7 +77203,7 @@ function E5(e, t) {
} catch {}
}
}
-function lGe({ pathname: e = "/", search: t = "", hash: n = "" }) {
+function fGe({ pathname: e = "/", search: t = "", hash: n = "" }) {
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
}
function D5(e) {
@@ -77127,19 +77218,19 @@ function D5(e) {
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/utils.js
-function uGe(e, t, n = "/") {
- return dGe(e, t, n, !1);
+function pGe(e, t, n = "/") {
+ return mGe(e, t, n, !1);
}
-function dGe(e, t, n, r, i) {
+function mGe(e, t, n, r, i) {
let a = P5((typeof t == "string" ? D5(t) : t).pathname || "/", n);
if (a == null) return null;
- let o = i ?? fGe(e), s = null, c = TGe(a);
- for (let e = 0; s == null && e < o.length; ++e) s = wGe(o[e], c, r);
+ let o = i ?? hGe(e), s = null, c = OGe(a);
+ for (let e = 0; s == null && e < o.length; ++e) s = DGe(o[e], c, r);
return s;
}
-function fGe(e) {
+function hGe(e) {
let t = O5(e);
- return pGe(t), t;
+ return gGe(t), t;
}
function O5(e, t = [], n = [], r = "", i = !1) {
let a = (e, a, o = i, s) => {
@@ -77156,7 +77247,7 @@ function O5(e, t = [], n = [], r = "", i = !1) {
let l = R5([r, c.relativePath]), u = n.concat(c);
e.children && e.children.length > 0 && (T5(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), O5(e.children, t, u, l, o)), !(e.path == null && !e.index) && t.push({
path: l,
- score: SGe(l, e.index),
+ score: TGe(l, e.index),
routesMeta: u.map((e, t) => {
let [n, r] = N5(e.relativePath, e.caseSensitive, t === u.length - 1);
return {
@@ -77180,18 +77271,18 @@ function k5(e) {
let o = k5(r.join("/")), s = [];
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
}
-function pGe(e) {
- e.sort((e, t) => e.score === t.score ? CGe(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
+function gGe(e) {
+ e.sort((e, t) => e.score === t.score ? EGe(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
}
-var mGe = /^:[\w-]+$/, hGe = /^:[\w-]+/, gGe = 3.5, _Ge = 3, vGe = 2, yGe = 1, bGe = 10, xGe = -2, A5 = (e) => e === "*";
-function SGe(e, t) {
+var _Ge = /^:[\w-]+$/, vGe = /^:[\w-]+/, yGe = 3.5, bGe = 3, xGe = 2, SGe = 1, CGe = 10, wGe = -2, A5 = (e) => e === "*";
+function TGe(e, t) {
let n = e.split("/"), r = n.length;
- return n.some(A5) && (r += xGe), t && (r += vGe), n.filter((e) => !A5(e)).reduce((e, t) => e + (mGe.test(t) ? _Ge : hGe.test(t) ? gGe : t === "" ? yGe : bGe), r);
+ return n.some(A5) && (r += wGe), t && (r += xGe), n.filter((e) => !A5(e)).reduce((e, t) => e + (_Ge.test(t) ? bGe : vGe.test(t) ? yGe : t === "" ? SGe : CGe), r);
}
-function CGe(e, t) {
+function EGe(e, t) {
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
}
-function wGe(e, t, n = !1) {
+function DGe(e, t, n = !1) {
let { routesMeta: r } = e, i = {}, a = "/", o = [];
for (let e = 0; e < r.length; ++e) {
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
@@ -77207,7 +77298,7 @@ function wGe(e, t, n = !1) {
Object.assign(i, d.params), o.push({
params: i,
pathname: R5([a, d.pathname]),
- pathnameBase: AGe(R5([a, d.pathnameBase])),
+ pathnameBase: NGe(R5([a, d.pathnameBase])),
route: f
}), d.pathnameBase !== "/" && (a = R5([a, d.pathnameBase]));
}
@@ -77254,7 +77345,7 @@ function N5(e, t = !1, n = !0) {
}).replace(/\/([\w-]+)\?(?=\/|$|\()/g, "(?:/$1)?");
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
}
-function TGe(e) {
+function OGe(e) {
try {
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
} catch (t) {
@@ -77267,12 +77358,12 @@ function P5(e, t) {
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
return r && r !== "/" ? null : e.slice(n) || "/";
}
-function EGe(e, t = "/") {
+function kGe(e, t = "/") {
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? D5(e) : e, a;
return n ? (n = L5(n), a = n.startsWith("/") || n.startsWith("\\") ? F5(n.substring(1), "/") : F5(n, t)) : a = t, {
pathname: a,
- search: jGe(r),
- hash: MGe(i)
+ search: PGe(r),
+ hash: FGe(i)
};
}
function F5(e, t) {
@@ -77284,14 +77375,14 @@ function F5(e, t) {
function I5(e, t, n, r) {
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
}
-function DGe(e) {
+function AGe(e) {
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
}
-function OGe(e) {
- let t = DGe(e);
+function jGe(e) {
+ let t = AGe(e);
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
}
-function kGe(e, t, n, r = !1) {
+function MGe(e, t, n, r = !1) {
let i;
typeof e == "string" ? i = D5(e) : (i = { ...e }, T5(!i.pathname || !i.pathname.includes("?"), I5("?", "pathname", "search", i)), T5(!i.pathname || !i.pathname.includes("#"), I5("#", "pathname", "hash", i)), T5(!i.search || !i.search.includes("#"), I5("#", "search", "hash", i)));
let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
@@ -77305,7 +77396,7 @@ function kGe(e, t, n, r = !1) {
}
s = e >= 0 ? t[e] : "/";
}
- let c = EGe(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
+ let c = kGe(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
}
var L5 = (e) => e.replace(/[\\/]{2,}/g, "/"), R5 = (e) => L5(e.join("/"));
@@ -77314,7 +77405,7 @@ function z5(e, t = 0) {
for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
return n === e.length ? e : e.slice(0, n);
}
-var AGe = (e) => z5(e).replace(/^\/*/, "/"), jGe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, MGe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, NGe = class {
+var NGe = (e) => z5(e).replace(/^\/*/, "/"), PGe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, FGe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, IGe = class {
status;
statusText;
data;
@@ -77324,23 +77415,23 @@ var AGe = (e) => z5(e).replace(/^\/*/, "/"), jGe = (e) => !e || e === "?" ? "" :
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
}
};
-function PGe(e) {
+function LGe(e) {
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
}
-function FGe(e) {
+function RGe(e) {
return R5(e.map((e) => e.route.path).filter(Boolean)) || "/";
}
var B5 = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
-function IGe(e, t) {
+function zGe(e, t) {
let n = e;
- if (typeof n != "string" || !oGe.test(n)) return {
+ if (typeof n != "string" || !lGe.test(n)) return {
absoluteURL: void 0,
isExternal: !1,
to: n
};
let r = n, i = !1;
if (B5) try {
- let e = new URL(window.location.href), r = sGe.test(n) ? new URL(cGe(n, e.protocol)) : new URL(n), a = P5(r.pathname, t);
+ let e = new URL(window.location.href), r = uGe.test(n) ? new URL(dGe(n, e.protocol)) : new URL(n), a = P5(r.pathname, t);
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
} catch {
E5(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
@@ -77365,7 +77456,7 @@ function H5(e) {
function U5(e, t) {
return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
}
-function LGe(e, t) {
+function BGe(e, t) {
if (e.startsWith("//")) return !0;
let n = t.protocol.toLowerCase();
return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
@@ -77378,7 +77469,7 @@ function W5(e, t, n, r) {
let a = new URL(t, n), o = i != null && !U5(i, n), s = !U5(a, n);
if (r === "reject") {
if (o || s) throw Error("External navigation is not allowed");
- } else if (s && (i == null || !LGe(e, i) || !U5(i, a))) throw Error("External navigation is not allowed");
+ } else if (s && (i == null || !BGe(e, i) || !U5(i, a))) throw Error("External navigation is not allowed");
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/router.js
@@ -77389,9 +77480,9 @@ var G5 = [
"DELETE"
];
new Set(G5);
-var RGe = ["GET", ...G5];
-new Set(RGe);
-var zGe = [
+var VGe = ["GET", ...G5];
+new Set(VGe);
+var HGe = [
"about:",
"blob:",
"chrome:",
@@ -77403,9 +77494,9 @@ var zGe = [
"filesystem:",
"javascript:"
];
-function BGe(e) {
+function UGe(e) {
try {
- return zGe.includes(new URL(e).protocol);
+ return HGe.includes(new URL(e).protocol);
} catch {
return !1;
}
@@ -77414,18 +77505,18 @@ function BGe(e) {
//#region node_modules/react-router/dist/production/lib/context.js
var K5 = B.createContext(null);
K5.displayName = "DataRouter";
-var VGe = B.createContext(null);
-VGe.displayName = "DataRouterState";
+var WGe = B.createContext(null);
+WGe.displayName = "DataRouterState";
var q5 = B.createContext(null);
q5.displayName = "DataRouterData";
-var HGe = B.createContext(null);
-HGe.displayName = "DataRouterNavigation";
-var UGe = B.createContext(!1), WGe = B.createContext({ isTransitioning: !1 });
-WGe.displayName = "ViewTransition";
var GGe = B.createContext(null);
-GGe.displayName = "Fetchers";
-var KGe = B.createContext(null);
-KGe.displayName = "Await";
+GGe.displayName = "DataRouterNavigation";
+var KGe = B.createContext(!1), qGe = B.createContext({ isTransitioning: !1 });
+qGe.displayName = "ViewTransition";
+var JGe = B.createContext(null);
+JGe.displayName = "Fetchers";
+var YGe = B.createContext(null);
+YGe.displayName = "Await";
var J5 = B.createContext(null);
J5.displayName = "Navigation";
var Y5 = B.createContext(null);
@@ -77444,17 +77535,17 @@ var $5 = B.createContext(null);
$5.displayName = "RouteError";
//#endregion
//#region node_modules/react-router/dist/production/lib/errors.js
-var e7 = "REACT_ROUTER_ERROR", qGe = "REDIRECT", JGe = "ROUTE_ERROR_RESPONSE";
-function YGe(e) {
- if (e.startsWith(`${e7}:${qGe}:{`)) try {
+var e7 = "REACT_ROUTER_ERROR", XGe = "REDIRECT", ZGe = "ROUTE_ERROR_RESPONSE";
+function QGe(e) {
+ if (e.startsWith(`${e7}:${XGe}:{`)) try {
let t = JSON.parse(e.slice(28));
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
} catch {}
}
-function XGe(e) {
- if (e.startsWith(`${e7}:${JGe}:{`)) try {
+function $Ge(e) {
+ if (e.startsWith(`${e7}:${ZGe}:{`)) try {
let t = JSON.parse(e.slice(40));
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new NGe(t.status, t.statusText, t.data);
+ if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new IGe(t.status, t.statusText, t.data);
} catch {}
}
//#endregion
@@ -77466,12 +77557,12 @@ function n7() {
return T5(t7(), "useLocation() may be used only in the context of a <Router> component."), B.useContext(Y5).location;
}
var r7 = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
-function ZGe() {
- return B.useContext(Z5) ? lKe() : QGe();
+function eKe() {
+ return B.useContext(Z5) ? fKe() : tKe();
}
-function QGe() {
+function tKe() {
T5(t7(), "useNavigate() may be used only in the context of a <Router> component.");
- let e = B.useContext(K5), { basename: t, navigator: n } = B.useContext(J5), { matches: r } = B.useContext(X5), { pathname: i } = n7(), a = JSON.stringify(OGe(r)), o = B.useRef(!1);
+ let e = B.useContext(K5), { basename: t, navigator: n } = B.useContext(J5), { matches: r } = B.useContext(X5), { pathname: i } = n7(), a = JSON.stringify(jGe(r)), o = B.useRef(!1);
return B.useLayoutEffect(() => {
o.current = !0;
}), B.useCallback((r, s = {}) => {
@@ -77480,8 +77571,8 @@ function QGe() {
n.go(r);
return;
}
- let c = kGe(r, JSON.parse(a), i, s.relative === "path");
- e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : R5([t, c.pathname])), W5(typeof r == "string" ? r : lGe(r), n.createHref(c), H5(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
+ let c = MGe(r, JSON.parse(a), i, s.relative === "path");
+ e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : R5([t, c.pathname])), W5(typeof r == "string" ? r : fGe(r), n.createHref(c), H5(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
}, [
t,
n,
@@ -77491,7 +77582,7 @@ function QGe() {
]);
}
B.createContext(null);
-function $Ge(e, t) {
+function nKe(e, t) {
return i7(e, t);
}
function i7(e, t, n) {
@@ -77511,8 +77602,8 @@ function i7(e, t, n) {
d = "/" + u.replace(/^\//, "").split("/").slice(e.length).join("/");
}
let f;
- f = n ? n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : n.router.match(n.state.location) : uGe(e, { pathname: d });
- let p = aKe(f && f.map((e) => Object.assign({}, e, {
+ f = n ? n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : n.router.match(n.state.location) : pGe(e, { pathname: d });
+ let p = cKe(f && f.map((e) => Object.assign({}, e, {
params: Object.assign({}, o, e.params),
pathname: R5([s, r.encodeLocation ? r.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
pathnameBase: e.pathnameBase === "/" ? s : R5([s, r.encodeLocation ? r.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
@@ -77530,14 +77621,14 @@ function i7(e, t, n) {
navigationType: "POP"
} }, p) : p;
}
-function eKe() {
- let e = cKe(), t = PGe(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
+function rKe() {
+ let e = dKe(), t = LGe(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
return /* @__PURE__ */ B.createElement(B.Fragment, null, /* @__PURE__ */ B.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ B.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ B.createElement("pre", { style: {
padding: "0.5rem",
backgroundColor: "rgba(200,200,200, 0.5)"
} }, n) : null, null);
}
-var tKe = /* @__PURE__ */ B.createElement(eKe, null), nKe = class extends B.Component {
+var iKe = /* @__PURE__ */ B.createElement(rKe, null), aKe = class extends B.Component {
constructor(e) {
super(e), this.state = {
location: e.location,
@@ -77545,7 +77636,7 @@ var tKe = /* @__PURE__ */ B.createElement(eKe, null), nKe = class extends B.Comp
error: e.error
};
}
- static contextType = UGe;
+ static contextType = KGe;
static getDerivedStateFromError(e) {
return { error: e };
}
@@ -77566,25 +77657,25 @@ var tKe = /* @__PURE__ */ B.createElement(eKe, null), nKe = class extends B.Comp
render() {
let e = this.state.error;
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
- let t = XGe(e.digest);
+ let t = $Ge(e.digest);
t && (e = t);
}
let t = e === void 0 ? this.props.children : /* @__PURE__ */ B.createElement(X5.Provider, { value: this.props.routeContext }, /* @__PURE__ */ B.createElement(Z5.Provider, { value: this.props.routeContext.isDataRoute }, /* @__PURE__ */ B.createElement(Q5.Provider, { value: this.props.routeContext.matches[this.props.routeContext.matches.length - 1]?.route.id }, /* @__PURE__ */ B.createElement($5.Provider, {
value: e,
children: this.props.component
}))));
- return this.context ? /* @__PURE__ */ B.createElement(rKe, { error: e }, t) : t;
+ return this.context ? /* @__PURE__ */ B.createElement(oKe, { error: e }, t) : t;
}
}, a7 = /* @__PURE__ */ new WeakMap();
-function rKe({ children: e, error: t }) {
+function oKe({ children: e, error: t }) {
let { basename: n, navigator: r } = B.useContext(J5);
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
- let e = YGe(t.digest);
+ let e = QGe(t.digest);
if (e) {
let i = a7.get(t);
if (i) throw i;
- let a = IGe(e.location, n), o = a.absoluteURL || a.to;
- if (W5(e.location, o, H5(r), "allow-explicit"), BGe(o)) throw Error("Invalid redirect location");
+ let a = zGe(e.location, n), o = a.absoluteURL || a.to;
+ if (W5(e.location, o, H5(r), "allow-explicit"), UGe(o)) throw Error("Invalid redirect location");
if (B5 && !a7.get(t)) {
if (a.isExternal || e.reloadDocument) window.location.href = o;
else {
@@ -77600,11 +77691,11 @@ function rKe({ children: e, error: t }) {
}
return e;
}
-function iKe({ routeContext: e, match: t, children: n }) {
+function sKe({ routeContext: e, match: t, children: n }) {
let r = B.useContext(K5);
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ B.createElement(X5.Provider, { value: e }, /* @__PURE__ */ B.createElement(Z5.Provider, { value: e.isDataRoute }, /* @__PURE__ */ B.createElement(Q5.Provider, { value: t.route.id }, n)));
}
-function aKe(e, t = [], n) {
+function cKe(e, t = [], n) {
let r = n?.state;
if (e == null) {
if (!r) return null;
@@ -77635,16 +77726,16 @@ function aKe(e, t = [], n) {
c(e, {
location: r.location,
params: r.matches?.[0]?.params ?? {},
- pattern: FGe(r.matches),
+ pattern: RGe(r.matches),
errorInfo: t
});
} : void 0;
return i.reduceRight((e, n, c) => {
let u, d = !1, f = null, p = null;
- r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || tKe, o && (s < 0 && c === 0 ? (uKe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
+ r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || iKe, o && (s < 0 && c === 0 ? (pKe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
let m = t.concat(i.slice(0, c + 1)), h = () => {
let t;
- return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ B.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ B.createElement(iKe, {
+ return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ B.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ B.createElement(sKe, {
match: n,
routeContext: {
outlet: e,
@@ -77654,7 +77745,7 @@ function aKe(e, t = [], n) {
children: t
});
};
- return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ B.createElement(nKe, {
+ return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ B.createElement(aKe, {
location: r.location,
revalidation: r.revalidation,
component: f,
@@ -77672,11 +77763,11 @@ function aKe(e, t = [], n) {
function o7(e) {
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
}
-function oKe(e) {
+function lKe(e) {
let t = B.useContext(K5);
return T5(t, o7(e)), t;
}
-function sKe(e) {
+function uKe(e) {
let t = B.useContext(q5);
return T5(t, o7(e)), t;
}
@@ -77684,12 +77775,12 @@ function s7(e) {
let t = B.useContext(Q5);
return T5(t, `${e} can only be used on routes that contain a unique "id"`), t;
}
-function cKe() {
- let e = B.useContext($5), t = sKe("useRouteError"), n = s7("useRouteError");
+function dKe() {
+ let e = B.useContext($5), t = uKe("useRouteError"), n = s7("useRouteError");
return e === void 0 ? t.errors?.[n] : e;
}
-function lKe() {
- let { router: e } = oKe("useNavigate"), t = s7("useNavigate"), n = B.useRef(!1);
+function fKe() {
+ let { router: e } = lKe("useNavigate"), t = s7("useNavigate"), n = B.useRef(!1);
return B.useLayoutEffect(() => {
n.current = !0;
}), B.useCallback(async (r, i = {}) => {
@@ -77700,11 +77791,11 @@ function lKe() {
}, [e, t]);
}
var c7 = {};
-function uKe(e, t, n) {
+function pKe(e, t, n) {
!t && !c7[e] && (c7[e] = !0, E5(!1, n));
}
-B.memo(dKe);
-function dKe({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
+B.memo(mKe);
+function mKe({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
let a = B.useContext(K5);
return T5(a, "You must render this element inside a <DataRouterContext.Provider> element"), i7(e, void 0, {
router: a.router,
@@ -77717,7 +77808,7 @@ function dKe({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
function l7(e) {
T5(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.");
}
-function fKe({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, useTransitions: o }) {
+function hKe({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, useTransitions: o }) {
T5(!t7(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
let s = e.replace(/^\/*/, "/"), c = B.useMemo(() => ({
basename: s,
@@ -77761,7 +77852,7 @@ function fKe({ basename: e = "/", children: t = null, location: n, navigationTyp
}));
}
function u7({ children: e, location: t }) {
- return $Ge(d7(e), t);
+ return nKe(d7(e), t);
}
B.Component;
function d7(e, t = []) {
@@ -77800,7 +77891,7 @@ function d7(e, t = []) {
//#endregion
//#region src/react/providers.tsx
var f7 = null;
-function pKe() {
+function gKe() {
return f7?.isConnected || (f7 = document.createElement("div"), f7.className = "peach-react", f7.dataset.reactOverlays = "", document.body.append(f7)), f7;
}
function p7({ children: e }) {
@@ -77808,8 +77899,8 @@ function p7({ children: e }) {
client: z,
children: /* @__PURE__ */ (0, V.jsx)(rd, {
reducedMotion: "user",
- children: /* @__PURE__ */ (0, V.jsx)(Qv, {
- getContainer: pKe,
+ children: /* @__PURE__ */ (0, V.jsx)($v, {
+ getContainer: gKe,
children: e
})
})
@@ -77818,11 +77909,11 @@ function p7({ children: e }) {
//#endregion
//#region src/react/router/router.tsx
var m7 = (0, B.createContext)(0), h7 = (0, B.createContext)(null);
-function mKe({ children: e }) {
+function _Ke({ children: e }) {
let [t, n] = (0, B.useState)(() => ft.navigation);
return (0, B.useLayoutEffect)(() => (n(ft.navigation), ft.listen(n)), []), /* @__PURE__ */ (0, V.jsx)(m7.Provider, {
value: t.seq,
- children: /* @__PURE__ */ (0, V.jsx)(fKe, {
+ children: /* @__PURE__ */ (0, V.jsx)(hKe, {
location: t.location,
navigationType: t.action,
navigator: ft,
@@ -77830,19 +77921,19 @@ function mKe({ children: e }) {
})
});
}
-function hKe() {
+function vKe() {
let e = (0, B.useContext)(m7);
return (0, B.useLayoutEffect)(() => {
queueMicrotask(() => pt(e));
}, [e]), null;
}
-function gKe({ target: e }) {
- let t = ZGe();
+function yKe({ target: e }) {
+ let t = eKe();
return (0, B.useLayoutEffect)(() => {
e.current = t;
}), null;
}
-function _Ke(e, t, n) {
+function bKe(e, t, n) {
let r = new URL(e, window.location.href);
if (!u5(r.pathname)) {
t.navigate(e);
@@ -77850,24 +77941,24 @@ function _Ke(e, t, n) {
}
n(`${r.pathname}${r.search}${r.hash}`);
}
-function vKe() {
+function xKe() {
let e = (0, B.useContext)(h7), [t, n] = (0, B.useState)(dt), r = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => (n(dt()), ut((e, t) => {
t ? (0, $f.flushSync)(() => n(e)) : n(e);
})), []);
let i = (0, B.useMemo)(() => (t) => {
- e && r.current && _Ke(t, e, r.current);
+ e && r.current && bKe(t, e, r.current);
}, [e]);
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(gKe, { target: r }), e ? t.map((t) => /* @__PURE__ */ (0, V.jsx)(yKe, {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)(yKe, { target: r }), e ? t.map((t) => /* @__PURE__ */ (0, V.jsx)(SKe, {
entry: t,
- children: /* @__PURE__ */ (0, V.jsx)(bKe, {
+ children: /* @__PURE__ */ (0, V.jsx)(CKe, {
entry: t,
actions: e,
go: i
})
}, t.revision)) : null] });
}
-var yKe = class extends B.Component {
+var SKe = class extends B.Component {
state = { failed: !1 };
static getDerivedStateFromError() {
return { failed: !0 };
@@ -77878,15 +77969,15 @@ var yKe = class extends B.Component {
render() {
return this.state.failed ? null : this.props.children;
}
-}, bKe = (0, B.memo)(function({ entry: e, actions: t, go: n }) {
- return C5(e.path) ? (0, $f.createPortal)(aGe(e.path, e.props, t, n), e.host, String(e.revision)) : null;
+}, CKe = (0, B.memo)(function({ entry: e, actions: t, go: n }) {
+ return C5(e.path) ? (0, $f.createPortal)(cGe(e.path, e.props, t, n), e.host, String(e.revision)) : null;
});
-function xKe({ children: e }) {
+function wKe({ children: e }) {
let t = n7(), n = ct(t.state);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)(u7, {
location: n ?? t,
children: [
- rGe.map((e) => /* @__PURE__ */ (0, V.jsx)(l7, {
+ oGe.map((e) => /* @__PURE__ */ (0, V.jsx)(l7, {
path: e,
element: null
}, e)),
@@ -77907,28 +77998,28 @@ function xKe({ children: e }) {
element: null
})] })] });
}
-function SKe({ children: e, actions: t = null }) {
+function TKe({ children: e, actions: t = null }) {
return /* @__PURE__ */ (0, V.jsx)(p7, { children: /* @__PURE__ */ (0, V.jsx)(h7.Provider, {
value: t,
- children: /* @__PURE__ */ (0, V.jsxs)(mKe, { children: [
- /* @__PURE__ */ (0, V.jsx)(hKe, {}),
+ children: /* @__PURE__ */ (0, V.jsxs)(_Ke, { children: [
/* @__PURE__ */ (0, V.jsx)(vKe, {}),
- /* @__PURE__ */ (0, V.jsx)(xKe, { children: e })
+ /* @__PURE__ */ (0, V.jsx)(xKe, {}),
+ /* @__PURE__ */ (0, V.jsx)(wKe, { children: e })
] })
}) });
}
-var CKe = { onCaughtError: (e) => {
+var EKe = { onCaughtError: (e) => {
globalThis.reportError?.(e);
} }, g7 = null;
-function wKe(e) {
+function DKe(e) {
if (g7) return;
- g7 = (0, MN.createRoot)(document.createElement("div"), CKe);
+ g7 = (0, AN.createRoot)(document.createElement("div"), EKe);
let t = g7;
- (0, $f.flushSync)(() => t.render(/* @__PURE__ */ (0, V.jsx)(SKe, { actions: e })));
+ (0, $f.flushSync)(() => t.render(/* @__PURE__ */ (0, V.jsx)(TKe, { actions: e })));
}
//#endregion
//#region src/react/sidebar/sidebar-island.tsx
-var _7 = "__home__", TKe = {
+var _7 = "__home__", OKe = {
creator: 26,
tag: 30,
tech: 16
@@ -77941,13 +78032,13 @@ function C7() {
let e = y7;
if (!e || !b7) return;
let t = x7, n = S7;
- (0, $f.flushSync)(() => b7.render(/* @__PURE__ */ (0, V.jsx)(p7, { children: /* @__PURE__ */ (0, V.jsx)(OKe, {
+ (0, $f.flushSync)(() => b7.render(/* @__PURE__ */ (0, V.jsx)(p7, { children: /* @__PURE__ */ (0, V.jsx)(jKe, {
host: e,
props: t,
epoch: n
}) })));
}
-var EKe = {
+var kKe = {
render(e) {
x7 = e, C7();
},
@@ -77955,23 +78046,23 @@ var EKe = {
S7 += 1, C7();
}
};
-function DKe(e) {
+function AKe(e) {
return y7 = e, x7 = {
content: null,
filters: {},
latest: null
- }, e.scroll.replaceChildren(), b7 = (0, MN.createRoot)(e.scroll), C7(), e.attached(), EKe;
+ }, e.scroll.replaceChildren(), b7 = (0, AN.createRoot)(e.scroll), C7(), e.attached(), kKe;
}
-function OKe({ host: e, props: t, epoch: n }) {
+function jKe({ host: e, props: t, epoch: n }) {
let r = (0, B.useSyncExternalStore)(e.store.subscribe, e.store.version);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsx)("div", { "data-sidebar-head": "" }),
- /* @__PURE__ */ (0, V.jsx)(kKe, {
+ /* @__PURE__ */ (0, V.jsx)(MKe, {
host: e,
epoch: n,
version: r
}),
- t.content ? /* @__PURE__ */ (0, V.jsx)(jKe, {
+ t.content ? /* @__PURE__ */ (0, V.jsx)(PKe, {
host: e,
content: t.content,
filters: t.filters,
@@ -77979,8 +78070,8 @@ function OKe({ host: e, props: t, epoch: n }) {
}) : null
] });
}
-function kKe({ host: e, epoch: t, version: n }) {
- let r = RR(e.store), i = e.store.value.sidebarOrder, a = new Map(e.navCatalog.map((e) => [e[0], e])), o = i.map((e) => a.get(e)).filter((e) => e !== void 0), s = o.map(([t]) => e.navOn(t)), c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = lA(l, c, "[data-nav][aria-pressed=\"true\"]", `${t}:${n}:${o.map(([e], t) => s[t] ? e || _7 : "").join(",")}`, { axis: "y" }), { sync: d } = u;
+function MKe({ host: e, epoch: t, version: n }) {
+ let r = LR(e.store), i = e.store.value.sidebarOrder, a = new Map(e.navCatalog.map((e) => [e[0], e])), o = i.map((e) => a.get(e)).filter((e) => e !== void 0), s = o.map(([t]) => e.navOn(t)), c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = hD(l, c, "[data-nav][aria-pressed=\"true\"]", `${t}:${n}:${o.map(([e], t) => s[t] ? e || _7 : "").join(",")}`, { axis: "y" }), { sync: d } = u;
(0, B.useEffect)(() => {
let t = e.scroll, n = t.parentElement, r = t.querySelector(":scope > [data-sidebar-head]"), i = new ResizeObserver(() => d());
return [
@@ -78013,7 +78104,7 @@ function kKe({ host: e, epoch: t, version: n }) {
t.preventDefault();
let n = f, a = m?.key === e && m.after;
g();
- let o = n === null ? null : zR(i, n, e, a);
+ let o = n === null ? null : RR(i, n, e, a);
o && r(o);
},
onDragEnd: g
@@ -78045,7 +78136,7 @@ function kKe({ host: e, epoch: t, version: n }) {
}), v) : null] });
}
var w7 = (e, t) => String(e[t] ?? "").split(",").filter(Boolean);
-function AKe(e) {
+function NKe(e) {
if (!e) return null;
let t = /* @__PURE__ */ new Map(), n = [
["loc", e.locations],
@@ -78058,7 +78149,7 @@ function AKe(e) {
for (let [e, r] of n) for (let n of r) t.set(`${e}\n${n.value}`, n.n ?? 0);
return t;
}
-function jKe({ host: e, content: t, filters: n, latest: r }) {
+function PKe({ host: e, content: t, filters: n, latest: r }) {
let i = t.kind === "catalog" ? t.key : `follow:${t.selected.join(",")}:${t.tags.map((e) => e.value).join(",")}`;
(0, B.useLayoutEffect)(() => {
t.kind === "catalog" && Le(e.scroll, "drawer");
@@ -78067,8 +78158,8 @@ function jKe({ host: e, content: t, filters: n, latest: r }) {
i,
t.kind
]);
- let a = t.kind === "catalog" ? MKe(e, t.facets, n, r, i) : [NKe(e, t.tags, new Set(t.selected))], o = 0;
- return a.map((e) => e && /* @__PURE__ */ (0, V.jsx)(PKe, {
+ let a = t.kind === "catalog" ? FKe(e, t.facets, n, r, i) : [IKe(e, t.tags, new Set(t.selected))], o = 0;
+ return a.map((e) => e && /* @__PURE__ */ (0, V.jsx)(LKe, {
title: e.title,
kind: e.kind,
active: e.active,
@@ -78077,8 +78168,8 @@ function jKe({ host: e, content: t, filters: n, latest: r }) {
children: e.body
}, e.title));
}
-function MKe(e, t, n, r, i) {
- let a = AKe(r), o = (t, r, i) => {
+function FKe(e, t, n, r, i) {
+ let a = NKe(r), o = (t, r, i) => {
if (!t.length) return null;
let o = w7(n, r);
return /* @__PURE__ */ (0, V.jsx)(D7, {
@@ -78103,12 +78194,12 @@ function MKe(e, t, n, r, i) {
title: t,
kind: s,
active: p,
- body: /* @__PURE__ */ (0, V.jsx)(IKe, {
+ body: /* @__PURE__ */ (0, V.jsx)(zKe, {
epoch: i,
title: t,
rows: c,
latest: m ?? null,
- limit: TKe[d],
+ limit: OKe[d],
filterKey: l,
selected: f,
counts: a,
@@ -78123,7 +78214,7 @@ function MKe(e, t, n, r, i) {
title: "时长",
kind: "meta",
active: !1,
- body: /* @__PURE__ */ (0, V.jsx)(LKe, {
+ body: /* @__PURE__ */ (0, V.jsx)(BKe, {
host: e,
filters: n
})
@@ -78146,7 +78237,7 @@ function MKe(e, t, n, r, i) {
} : null
];
}
-function NKe(e, t, n) {
+function IKe(e, t, n) {
return t.length ? {
title: "内容标签",
kind: "online",
@@ -78166,7 +78257,7 @@ function T7(e, t) {
} catch {}
return n === null ? t : n === "open";
}
-function PKe({ title: e, kind: t, active: n, index: r, epoch: i, children: a }) {
+function LKe({ title: e, kind: t, active: n, index: r, epoch: i, children: a }) {
let o = (0, B.useRef)(null), s = (0, B.useRef)(null), [c, l] = (0, B.useState)(() => T7(e, n)), u = (0, B.useRef)(!1);
(0, B.useLayoutEffect)(() => {
let t = o.current, r = s.current;
@@ -78213,7 +78304,7 @@ function PKe({ title: e, kind: t, active: n, index: r, epoch: i, children: a })
});
}
var E7 = (0, B.createContext)(() => {});
-function FKe({ dot: e }) {
+function RKe({ dot: e }) {
return e ? e.kind === "glyph" ? /* @__PURE__ */ (0, V.jsx)(nT, { name: e.name }) : e.kind === "image" ? /* @__PURE__ */ (0, V.jsx)("img", {
"data-sidebar-source-icon": "",
src: e.src,
@@ -78237,7 +78328,7 @@ function D7({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a }
title: e.offline,
onClick: () => a.toggleChip(t, e.value, n),
children: [
- /* @__PURE__ */ (0, V.jsx)(FKe, { dot: e.dot }),
+ /* @__PURE__ */ (0, V.jsx)(RKe, { dot: e.dot }),
/* @__PURE__ */ (0, V.jsx)("span", {
"data-sidebar-chip-label": "",
children: e.label
@@ -78252,7 +78343,7 @@ function D7({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a }
})
});
}
-function IKe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, selected: o, counts: s, host: c, expandable: l }) {
+function zKe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, selected: o, counts: s, host: c, expandable: l }) {
let u = (0, B.useContext)(E7), [d, f] = (0, B.useState)(null), [p, m] = (0, B.useState)(e);
p !== e && (m(e), f(null));
let h = (0, B.useRef)(null), g = (0, B.useRef)(null), _ = !!d?.all, v = d ? d.rows : n;
@@ -78318,7 +78409,7 @@ function O7({ rows: e, host: t, selected: n, badges: r }) {
});
}
var k7 = (e, t) => e ? Math.min(v7, Number(e) / 60) : t;
-function LKe({ host: e, filters: t }) {
+function BKe({ host: e, filters: t }) {
let n = `${t.dur_min ?? ""}:${t.dur_max ?? ""}`, [r, i] = (0, B.useState)(n), [a, o] = (0, B.useState)(() => [k7(t.dur_min, 0), k7(t.dur_max, v7)]), [s, c] = (0, B.useState)("max");
r !== n && (i(n), o([k7(t.dur_min, 0), k7(t.dur_max, v7)]));
let [l, u] = a, d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(a);
@@ -78388,17 +78479,17 @@ function LKe({ host: e, filters: t }) {
}
//#endregion
//#region src/board-skeleton.ts
-var A7 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, RKe = () => `${A7("80%")}${A7("48%")}`, zKe = (e, t) => e.repeat(t);
-function BKe() {
- return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="skeleton-lines">${A7("85%")}${A7("65%")}${zKe(RKe(), 4)}</div></aside></div>`;
+var A7 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, VKe = () => `${A7("80%")}${A7("48%")}`, HKe = (e, t) => e.repeat(t);
+function UKe() {
+ return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="skeleton-lines">${A7("85%")}${A7("65%")}${HKe(VKe(), 4)}</div></aside></div>`;
}
//#endregion
//#region src/react/follow-detail/follow-detail.ts
-var j7 = (e) => ["follow-item", e], VKe = (e) => `/api/follow?item=${encodeURIComponent(e)}`, HKe = "/api/follow/save", UKe = "/api/follow/media/hide";
+var j7 = (e) => ["follow-item", e], WKe = (e) => `/api/follow?item=${encodeURIComponent(e)}`, GKe = "/api/follow/save", KKe = "/api/follow/media/hide";
async function M7(e, t) {
- let n = await G(VKe(e), t);
+ let n = await G(WKe(e), t);
for (let t of n.groups || []) {
- let r = MF(t).find((t) => t.id === e);
+ let r = kF(t).find((t) => t.id === e);
if (r) return {
item: r,
group: t,
@@ -78408,10 +78499,10 @@ async function M7(e, t) {
}
throw Error("这条关注内容已不存在");
}
-async function WKe(e, t) {
- let n = j7(e.id), r = ohe(e.id), i = z.getQueryData(OF) ? null : z.fetchQuery({
- queryKey: OF,
- queryFn: () => kF(t)
+async function qKe(e, t) {
+ let n = j7(e.id), r = rhe(e.id), i = z.getQueryData(TF) ? null : z.fetchQuery({
+ queryKey: TF,
+ queryFn: () => EF(t)
});
r ? z.setQueryData(n, {
...r,
@@ -78421,8 +78512,8 @@ async function WKe(e, t) {
queryFn: () => M7(e.id, t)
}), await i;
}
-function GKe(e, t, n, r) {
- let i = e.media_items || [], a = r === "images" ? "image" : "video", o = i.find((e) => e.media_kind === a) || i[0], s = i.length ? i.find((e) => e.index === (n ?? o.index)) || o : null, c = i.filter((e) => e.media_kind === "image"), l = c.findIndex((e) => e.index === s?.index), u = c.length > 1 && l >= 0, d = i.length > 1 && !u, f = !i.length && t && LF(t).length > 1 ? t : null, p = s?.media_kind || e.media_kind || "", m = (u ? [...c, e] : [s, e]).filter((e) => !!e && (e.width || 0) > 0 && (e.height || 0) > 0);
+function JKe(e, t, n, r) {
+ let i = e.media_items || [], a = r === "images" ? "image" : "video", o = i.find((e) => e.media_kind === a) || i[0], s = i.length ? i.find((e) => e.index === (n ?? o.index)) || o : null, c = i.filter((e) => e.media_kind === "image"), l = c.findIndex((e) => e.index === s?.index), u = c.length > 1 && l >= 0, d = i.length > 1 && !u, f = !i.length && t && PF(t).length > 1 ? t : null, p = s?.media_kind || e.media_kind || "", m = (u ? [...c, e] : [s, e]).filter((e) => !!e && (e.width || 0) > 0 && (e.height || 0) > 0);
return {
embedded: i,
selected: s,
@@ -78436,32 +78527,32 @@ function GKe(e, t, n, r) {
src: e.playable ? `/follow-stream?id=${e.id}${s ? `&media=${s.index}` : ""}` : ""
};
}
-var KKe = (e) => MF(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), qKe = {
+var YKe = (e) => kF(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), XKe = {
"gofile.io": "Gofile",
"pixeldrain.com": "Pixeldrain",
"mega.nz": "MEGA",
"mega.io": "MEGA",
"mediafire.com": "MediaFire",
"drive.google.com": "Google Drive"
-}, JKe = {
+}, ZKe = {
gofile: "Gofile",
pixeldrain: "Pixeldrain",
mega: "MEGA",
mediafire: "MediaFire",
google_drive: "Google Drive"
};
-function YKe(e) {
+function QKe(e) {
try {
let t = new URL(e).hostname.replace(/^www\./, "");
- return qKe[t] || t;
+ return XKe[t] || t;
} catch {
return "外部文件页";
}
}
function N7(e, t) {
- return JKe[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
+ return ZKe[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
}
-function XKe(e, t, n = "") {
+function $Ke(e, t, n = "") {
let r = n;
!r && e.is_release && (r = t.variant_label || t.variant_kind || ""), r ||= t.variant_kind === "wip" ? "WIP" : t.variant_label || t.variant_kind || "视频";
let i = e.is_release ? t.summary || (t.has_media ? "(仅附件)" : "(无正文)") : t.title;
@@ -78470,16 +78561,16 @@ function XKe(e, t, n = "") {
title: e.is_release && t.author ? `${t.author}:${i}` : i
};
}
-var ZKe = (e) => String(e.name || "").trim(), P7 = (e, t) => e.tag_types?.[t] || "unknown", QKe = /* @__PURE__ */ new Set([
+var eqe = (e) => String(e.name || "").trim(), P7 = (e, t) => e.tag_types?.[t] || "unknown", tqe = /* @__PURE__ */ new Set([
"artist",
"character",
"copyright",
"metadata",
"unknown"
]);
-function $Ke(e, t) {
+function nqe(e, t) {
let n = P7(e, t);
- return `r34-${QKe.has(n) ? n : "general"}`;
+ return `r34-${tqe.has(n) ? n : "general"}`;
}
var F7 = [
"copyright",
@@ -78488,23 +78579,23 @@ var F7 = [
"general",
"metadata"
];
-function eqe(e, t) {
+function rqe(e, t) {
let n = e.detail_tags || e.tags || [], r = (t) => {
let n = F7.indexOf(P7(e, t));
return n < 0 ? F7.length : n;
};
return [...n].sort((e, n) => r(e) - r(n) || t(e).localeCompare(t(n)));
}
-function tqe(e, t) {
+function iqe(e, t) {
let n = t.find((t) => t.id === e.source_id), r = t.filter((e) => n?.author_key && e.author_key === n.author_key);
return !r.length && n && r.push(n), r;
}
-var nqe = (e, t) => ({
+var aqe = (e, t) => ({
sources: e.sources,
aliases: e.aliases,
credentials: t
}), I7 = (e) => e?.size ? { size: e.size } : {};
-function rqe(e, t) {
+function oqe(e, t) {
let { images: n, kind: r, src: i, selected: a } = t;
return n.length ? n.map((t, r) => ({
src: `/follow-stream?id=${e.id}&media=${t.index}`,
@@ -78531,7 +78622,7 @@ function rqe(e, t) {
total: 1
}] : [];
}
-var iqe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态";
+var sqe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态";
//#endregion
//#region src/react/components/mix-queue.tsx
function L7({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a, children: o, ...s }) {
@@ -78585,29 +78676,29 @@ function R7({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }
}), r]
});
}
-var aqe = ({ label: e, count: t }) => /* @__PURE__ */ (0, V.jsxs)("h3", {
+var cqe = ({ label: e, count: t }) => /* @__PURE__ */ (0, V.jsxs)("h3", {
"data-mix-group-label": "",
children: [
e,
" ",
/* @__PURE__ */ (0, V.jsx)("span", { children: t })
]
-}), z7 = (e) => Number(e) > 0, oqe = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("span", {
+}), z7 = (e) => Number(e) > 0, lqe = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: R(e) }
}), B7 = R("external-link", "externalmark");
-function sqe(e) {
+function uqe(e) {
let { id: t, actions: n } = e, r = TS({
queryKey: j7(t),
queryFn: ({ signal: e }) => M7(t, e)
}), i = TS({
- queryKey: OF,
- queryFn: ({ signal: e }) => kF(e)
+ queryKey: TF,
+ queryFn: ({ signal: e }) => EF(e)
}), a = (0, B.useMemo)(() => new Set((i.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [i.data]), [o, s] = (0, B.useState)(e.mediaIndex);
- return r.data ? /* @__PURE__ */ (0, V.jsx)(cqe, {
+ return r.data ? /* @__PURE__ */ (0, V.jsx)(dqe, {
...e,
data: r.data,
- context: nqe(r.data, a),
+ context: aqe(r.data, a),
mediaIndex: o,
onMedia: s
}) : /* @__PURE__ */ (0, V.jsx)("div", {
@@ -78618,7 +78709,7 @@ function sqe(e) {
"data-follow-detail-media": "none",
children: [/* @__PURE__ */ (0, V.jsx)(V7, { onClose: n.close }), /* @__PURE__ */ (0, V.jsx)("div", {
"data-follow-detail-placeholder": "",
- children: r.isError ? /* @__PURE__ */ (0, V.jsx)(kA, {
+ children: r.isError ? /* @__PURE__ */ (0, V.jsx)(gA, {
message: ye(r.error),
onRetry: () => void r.refetch()
}) : null
@@ -78635,8 +78726,8 @@ var V7 = ({ onClose: e }) => /* @__PURE__ */ (0, V.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: R("x") }
});
-function cqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, helpers: a, actions: o }) {
- let { item: s, group: c } = e, l = GKe(s, c, n, i), u = fqe(s, o, r), d = `${s.id}:${l.selected?.index ?? ""}`, [f, p] = (0, B.useState)({
+function dqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, helpers: a, actions: o }) {
+ let { item: s, group: c } = e, l = JKe(s, c, n, i), u = hqe(s, o, r), d = `${s.id}:${l.selected?.index ?? ""}`, [f, p] = (0, B.useState)({
key: "",
kind: ""
}), m = {
@@ -78656,7 +78747,7 @@ function cqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
s,
l.kind
]);
- let h = !l.embedded.length && l.collection ? KKe(l.collection) : void 0, g = l.embeddedQueue ? /* @__PURE__ */ (0, V.jsx)(G7, {
+ let h = !l.embedded.length && l.collection ? YKe(l.collection) : void 0, g = l.embeddedQueue ? /* @__PURE__ */ (0, V.jsx)(G7, {
item: s,
current: l.selected.index,
helpers: a,
@@ -78669,7 +78760,7 @@ function cqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
actions: o,
onMedia: r,
currentId: s.id
- }) : /* @__PURE__ */ (0, V.jsx)(uqe, {
+ }) : /* @__PURE__ */ (0, V.jsx)(pqe, {
group: l.collection,
itemId: s.id,
helpers: a,
@@ -78680,7 +78771,7 @@ function cqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
"data-with-queue": g ? "" : void 0,
"data-follow-detail": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(lqe, {
+ /* @__PURE__ */ (0, V.jsx)(fqe, {
item: s,
media: l,
helpers: a,
@@ -78689,7 +78780,7 @@ function cqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
issues: m
}, d),
g,
- /* @__PURE__ */ (0, V.jsx)(dqe, {
+ /* @__PURE__ */ (0, V.jsx)(mqe, {
item: s,
data: e,
context: t,
@@ -78702,8 +78793,8 @@ function cqe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
]
});
}
-function lqe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
- let { kind: a, selected: o, src: s, images: c, position: l, carousel: u, frameRatio: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(null), h = rqe(e, t), g = o?.thumb_url || e.thumb_url || "", _ = e.playable && a === "video", v = e.playable && a === "image" ? s : e.thumb_url || "", y = e.playable && a === "image" && g && g !== s ? g : "", [b, x] = (0, B.useState)(v), S = (0, B.useRef)({
+function fqe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
+ let { kind: a, selected: o, src: s, images: c, position: l, carousel: u, frameRatio: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(null), h = oqe(e, t), g = o?.thumb_url || e.thumb_url || "", _ = e.playable && a === "video", v = e.playable && a === "image" ? s : e.thumb_url || "", y = e.playable && a === "image" && g && g !== s ? g : "", [b, x] = (0, B.useState)(v), S = (0, B.useRef)({
item: e,
selected: o
}), C = (0, B.useRef)(i.failed);
@@ -78740,7 +78831,7 @@ function lqe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
src: b,
alt: e.title,
referrerPolicy: "no-referrer",
- onClick: h.length ? () => void RN(Math.max(0, l), h) : void 0,
+ onClick: h.length ? () => void IN(Math.max(0, l), h) : void 0,
onError: () => {
if (y && b !== y) {
x(y), i.thumbFallback();
@@ -78752,7 +78843,7 @@ function lqe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
"data-follow-detail-placeholder": "",
children: [/* @__PURE__ */ (0, V.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: UF(e.resource_provider || e.provider) }
+ dangerouslySetInnerHTML: { __html: BF(e.resource_provider || e.provider) }
}), /* @__PURE__ */ (0, V.jsx)("span", { children: "没有可用预览" })]
}),
u ? /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
@@ -78810,8 +78901,8 @@ function W7(e) {
t && e.wireDrag(t);
}, [e]);
}
-function uqe({ group: e, itemId: t, helpers: n, actions: r }) {
- let i = LF(e), a = W7(n);
+function pqe({ group: e, itemId: t, helpers: n, actions: r }) {
+ let i = PF(e), a = W7(n);
return /* @__PURE__ */ (0, V.jsx)(L7, {
kind: "collection",
"data-follow-queue": "",
@@ -78820,7 +78911,7 @@ function uqe({ group: e, itemId: t, helpers: n, actions: r }) {
listRef: a,
summary: `${e.primary.title || "未命名合集"} · ${i.length} 个视频`,
children: i.map((n) => {
- let i = e.duplicates.includes(n), a = XKe(e, n, i ? n.provider_label : ""), o = i ? UF(n.provider, n.provider_label) : "";
+ let i = e.duplicates.includes(n), a = $Ke(e, n, i ? n.provider_label : ""), o = i ? BF(n.provider, n.provider_label) : "";
return /* @__PURE__ */ (0, V.jsxs)(R7, {
current: n.id === t,
"data-follow-queue-item": n.id,
@@ -78843,7 +78934,7 @@ function uqe({ group: e, itemId: t, helpers: n, actions: r }) {
children: a.label
}), /* @__PURE__ */ (0, V.jsx)("time", {
dateTime: n.published_at || "",
- children: XF(n)
+ children: qF(n)
})]
})]
}, n.id);
@@ -78868,7 +78959,7 @@ function G7({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
onClose: i.close,
listRef: s,
summary: `${e.title || "未命名内容"} · ${o.length} 个媒体`,
- children: c.map((n) => [n.label ? /* @__PURE__ */ (0, V.jsx)(aqe, {
+ children: c.map((n) => [n.label ? /* @__PURE__ */ (0, V.jsx)(cqe, {
label: n.label,
count: n.items.length
}, `label:${n.key}`) : null, ...n.items.map((n) => /* @__PURE__ */ (0, V.jsxs)(R7, {
@@ -78880,7 +78971,7 @@ function G7({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
pic: n.thumb_url ? /* @__PURE__ */ (0, V.jsx)(U7, { src: n.thumb_url }) : /* @__PURE__ */ (0, V.jsx)(H7, { kind: n.media_kind || "" }),
children: [/* @__PURE__ */ (0, V.jsx)("b", {
"data-middle-truncate": "",
- children: ZKe(n)
+ children: eqe(n)
}), /* @__PURE__ */ (0, V.jsx)("span", {
"data-truncate-end": "",
children: n.media_kind === "image" ? "图片" : "视频"
@@ -78888,16 +78979,16 @@ function G7({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
}, n.index))])
});
}
-function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpers: o, actions: s }) {
+function mqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpers: o, actions: s }) {
let { kind: c, selected: l, src: u } = r, d = {
primary: e,
variants: [],
duplicates: [],
has_wip: e.variant_kind === "wip"
- }, f = JF(d, e), p = KF(e, tqe(e, t.sources), n), m = p.credited ? "" : e.author && me(e.author) !== me(p.author) ? e.author : "", h = YF(e, n), g = eqe(e, o.tagLabel), _ = e.status === "saved", { busy: v } = i, y = (e) => v.has(e) ? {
+ }, f = GF(d, e), p = UF(e, iqe(e, t.sources), n), m = p.credited ? "" : e.author && me(e.author) !== me(p.author) ? e.author : "", h = KF(e, n), g = rqe(e, o.tagLabel), _ = e.status === "saved", { busy: v } = i, y = (e) => v.has(e) ? {
"aria-busy": !0,
"aria-disabled": !0
- } : {};
+ } : {}, b = (0, B.useRef)(null), [x, S] = (0, B.useState)(null);
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-stage-side": "",
"data-follow-detail-side": "",
@@ -78910,7 +79001,7 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-stage-title": "",
"data-follow-detail-name": "",
"data-reveal-line": "",
- dangerouslySetInnerHTML: { __html: qF(d, e) + L(e.title) }
+ dangerouslySetInnerHTML: { __html: WF(d, e) + L(e.title) }
}), e.url ? /* @__PURE__ */ (0, V.jsx)("a", {
"data-follow-origin": "",
href: e.url,
@@ -78937,7 +79028,7 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-stage-meta": "",
"data-reveal-line": "",
children: [
- /* @__PURE__ */ (0, V.jsx)("span", { children: XF(e) }),
+ /* @__PURE__ */ (0, V.jsx)("span", { children: qF(e) }),
z7(e.duration) ? /* @__PURE__ */ (0, V.jsx)("span", { children: fe(e.duration) }) : null,
f ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-follow-badges": "",
@@ -78971,7 +79062,7 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
href: e,
target: "_blank",
rel: "noreferrer noopener",
- children: [YKe(e), /* @__PURE__ */ (0, V.jsx)("span", {
+ children: [QKe(e), /* @__PURE__ */ (0, V.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: B7 }
})]
@@ -79045,11 +79136,16 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
dangerouslySetInnerHTML: { __html: R("image-off") }
}) : null,
/* @__PURE__ */ (0, V.jsx)("button", {
+ ref: b,
type: "button",
"data-follow-cloud-download": "",
"aria-label": "云下载",
- title: "云下载 · 贴磁力交给 115 或 PikPak 离线下载",
- onClick: () => s.cloudDownload(e),
+ title: "云下载",
+ "aria-haspopup": "dialog",
+ onClick: () => S({
+ title: e.title || "",
+ origin: `follow:${e.id}`
+ }),
dangerouslySetInnerHTML: { __html: R("cloud-download") }
}),
u ? /* @__PURE__ */ (0, V.jsx)("a", {
@@ -79080,7 +79176,7 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"aria-label": `恢复显示 ${e.name || ""}`,
...y(`restore:${e.index}`),
onClick: () => i.restore(e.index),
- children: [e.thumb_url ? /* @__PURE__ */ (0, V.jsx)(U7, { src: e.thumb_url }) : /* @__PURE__ */ (0, V.jsx)(oqe, { name: "image-off" }), /* @__PURE__ */ (0, V.jsx)("i", { dangerouslySetInnerHTML: { __html: R("rotate-ccw") } })]
+ children: [e.thumb_url ? /* @__PURE__ */ (0, V.jsx)(U7, { src: e.thumb_url }) : /* @__PURE__ */ (0, V.jsx)(lqe, { name: "image-off" }), /* @__PURE__ */ (0, V.jsx)("i", { dangerouslySetInnerHTML: { __html: R("rotate-ccw") } })]
}, e.index))
})]
}) : null,
@@ -79089,12 +79185,18 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"aria-live": "polite",
children: i.failure
}),
+ /* @__PURE__ */ (0, V.jsx)(sL, {
+ prefill: x,
+ close: () => S(null),
+ anchor: b,
+ receipt: (e) => s.toast(e)
+ }),
g.length ? /* @__PURE__ */ (0, V.jsx)("div", {
"data-stage-tags": "",
"data-follow-detail-tags": "",
children: g.map((t) => /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
- "data-tag-cat": $Ke(e, t),
+ "data-tag-cat": nqe(e, t),
"data-follow-tag": t,
onClick: () => s.openTag(t),
children: o.tagLabel(t)
@@ -79104,7 +79206,7 @@ function dqe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
})
});
}
-function fqe(e, t, n) {
+function hqe(e, t, n) {
let r = e.id, i = j7(r), [a, o] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), l = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
@@ -79115,17 +79217,17 @@ function fqe(e, t, n) {
...t.item,
status: e
}
- }), che(r, e);
+ }), ahe(r, e);
}, d = (e) => {
c(ye(e) || "操作失败"), t.failure("更新关注状态", e);
}, f = OS({
- mutationFn: ({ to: e }) => K(HP, {
+ mutationFn: ({ to: e }) => K(zP, {
item: r,
to: e
}),
onSuccess: (e, { to: n, was: i }) => {
- u(n), c(""), n === "ignored" && vL(), t.toast(iqe(n), { undo: i === "saved" ? void 0 : async () => {
- await K(HP, {
+ u(n), c(""), n === "ignored" && _L(), t.toast(sqe(n), { undo: i === "saved" ? void 0 : async () => {
+ await K(zP, {
item: r,
to: i
}), u(i);
@@ -79134,7 +79236,7 @@ function fqe(e, t, n) {
onError: d,
onSettled: (e, t, { to: n }) => l(n, !1)
}), p = OS({
- mutationFn: () => K(HKe, { item: r }),
+ mutationFn: () => K(GKe, { item: r }),
onSuccess: () => {
u("saved"), c(""), t.toast("已保存到账本");
},
@@ -79142,7 +79244,7 @@ function fqe(e, t, n) {
onSettled: () => l("save", !1)
}), m = OS({
mutationFn: async ({ index: e, hidden: t }) => {
- await K(UKe, {
+ await K(KKe, {
item: r,
media: e,
hidden: t
@@ -79153,17 +79255,17 @@ function fqe(e, t, n) {
},
onSuccess: (e, { hidden: r, next: a }) => {
let o = z.getQueryData(i);
- o && she(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
+ o && ihe(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
},
onError: d,
onSettled: (e, t, { index: n, hidden: r }) => l(`${r ? "hide" : "restore"}:${n}`, !1)
}), h = TS({
- queryKey: d_e(r),
- queryFn: ({ signal: e }) => m_e(r, e)
+ queryKey: h_e(r),
+ queryFn: ({ signal: e }) => v_e(r, e)
}).data?.want ?? null, g = OS({
- mutationFn: async (e) => (e ? await _L([e.id]) : await gL({ follow: r }), !e),
+ mutationFn: async (e) => (e ? await gL([e.id]) : await hL({ follow: r }), !e),
onSuccess: (e) => {
- c(""), t.toast(e ? "已加入想要" : "已取消想要"), vL();
+ c(""), t.toast(e ? "已加入想要" : "已取消想要"), _L();
},
onError: d,
onSettled: () => l("want", !1)
@@ -79202,20 +79304,8 @@ function fqe(e, t, n) {
};
}
//#endregion
-//#region src/react/components/overlay-host.ts
-function pqe(e) {
- let t = e.querySelector(":scope > [data-react-overlays]");
- if (t) return t;
- let n = e.ownerDocument.createElement("div");
- return n.className = "peach-react", n.dataset.reactOverlays = "", e.append(n), n;
-}
-function mqe(e) {
- let t = e?.ownerDocument ?? globalThis.document, n = e?.closest("dialog[open]");
- return pqe(n ?? t.body);
-}
-//#endregion
//#region src/react/cover-crop/cover-crop.ts
-var hqe = "/api/cover-crop", gqe = (e, t) => K(hqe, {
+var gqe = "/api/cover-crop", _qe = (e, t) => K(gqe, {
code: e,
box: t
});
@@ -79234,7 +79324,7 @@ function K7({ className: e }) {
children: /* @__PURE__ */ (0, V.jsx)("use", { href: "#i-crop" })
});
}
-function _qe({ code: e, coverUrl: t, box: n, onSaved: r }) {
+function vqe({ code: e, coverUrl: t, box: n, onSaved: r }) {
let [i, a] = (0, B.useState)(!1), o = (0, B.useRef)(null);
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsx)("button", {
ref: o,
@@ -79246,14 +79336,14 @@ function _qe({ code: e, coverUrl: t, box: n, onSaved: r }) {
onClick: () => a(!0),
className: "flex size-7 cursor-pointer items-center justify-center rounded-lg text-foreground-icon-secondary outline-none transition-colors hover:bg-background-primary-hover hover:text-foreground-icon-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: /* @__PURE__ */ (0, V.jsx)(K7, { className: "size-3.75" })
- }), /* @__PURE__ */ (0, V.jsx)(Qv, {
- getContainer: () => mqe(o.current),
- children: /* @__PURE__ */ (0, V.jsx)($N, {
+ }), /* @__PURE__ */ (0, V.jsx)($v, {
+ getContainer: () => oL(o.current),
+ children: /* @__PURE__ */ (0, V.jsx)(XN, {
isOpen: i,
onOpenChange: a,
width: "cover-crop",
label: "裁剪封面",
- children: /* @__PURE__ */ (0, V.jsx)(vqe, {
+ children: /* @__PURE__ */ (0, V.jsx)(yqe, {
code: e,
coverUrl: t,
box: n,
@@ -79263,9 +79353,9 @@ function _qe({ code: e, coverUrl: t, box: n, onSaved: r }) {
})
})] });
}
-function vqe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
- let [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(null), [l, u] = (0, B.useState)(!0), d = OM(), f = OS({
- mutationFn: (t) => gqe(e, t),
+function yqe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
+ let [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(null), [l, u] = (0, B.useState)(!0), d = vM(), f = OS({
+ mutationFn: (t) => _qe(e, t),
onSuccess: (e) => {
i(), r(e.poster_box);
}
@@ -79277,19 +79367,19 @@ function vqe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
y0: n.y0,
x1: n.x1,
y1: n.y1
- } : fpe(e, jC);
- c(JN(t, e, null));
+ } : cpe(e, kC);
+ c(KN(t, e, null));
}
let m = f.isPending;
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, V.jsx)(eP, { children: /* @__PURE__ */ (0, V.jsx)(K7, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, V.jsx)(ZN, { children: /* @__PURE__ */ (0, V.jsx)(K7, { className: "size-6" }) }),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
- /* @__PURE__ */ (0, V.jsx)(ZE, {
+ /* @__PURE__ */ (0, V.jsx)(ID, {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: "裁剪封面"
@@ -79304,7 +79394,7 @@ function vqe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, V.jsx)(AM, {
+ /* @__PURE__ */ (0, V.jsx)(bM, {
icon: pT,
size: "small",
"aria-label": "关闭",
@@ -79315,24 +79405,24 @@ function vqe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
/* @__PURE__ */ (0, V.jsx)("div", {
ref: d,
className: "flex min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto border-t border-separator-border px-5 py-4",
- children: /* @__PURE__ */ (0, V.jsx)(nP, {
+ children: /* @__PURE__ */ (0, V.jsx)($N, {
src: t,
- aspect: l ? jC : null,
+ aspect: l ? kC : null,
box: s,
size: a,
label: `${e} 的正封取景框`,
onSize: (e) => {
- KN(e) && p(e);
+ WN(e) && p(e);
},
onBox: c
})
}),
/* @__PURE__ */ (0, V.jsxs)("div", {
className: "flex shrink-0 flex-wrap items-center gap-3 border-t border-separator-border p-5",
- children: [/* @__PURE__ */ (0, V.jsx)(nL, {
+ children: [/* @__PURE__ */ (0, V.jsx)($I, {
isSelected: l,
onChange: (e) => {
- u(e), e && s && a && c(JN(s, a, jC));
+ u(e), e && s && a && c(KN(s, a, kC));
},
children: /* @__PURE__ */ (0, V.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
@@ -79368,14 +79458,14 @@ var q7 = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: e }
});
-function yqe(e) {
+function bqe(e) {
let { queue: t, actions: n } = e, r = TS({
- queryKey: t ? RC(t) : ["item-queue", "none"],
- queryFn: ({ signal: n }) => qC(t, e.helpers, n),
+ queryKey: t ? IC(t) : ["item-queue", "none"],
+ queryFn: ({ signal: n }) => GC(t, e.helpers, n),
enabled: !!t
- }), i = t && r.data || null, a = i ? XC(i, e.id) : t ? null : e.id, o = TS({
- queryKey: LC(a ?? 0),
- queryFn: ({ signal: e }) => KC(a, e),
+ }), i = t && r.data || null, a = i ? JC(i, e.id) : t ? null : e.id, o = TS({
+ queryKey: FC(a ?? 0),
+ queryFn: ({ signal: e }) => WC(a, e),
enabled: a != null
});
if (!o.data || t && !i) {
@@ -79388,7 +79478,7 @@ function yqe(e) {
"data-item-media": "none",
children: [/* @__PURE__ */ (0, V.jsx)(Y7, { onClose: n.close }), /* @__PURE__ */ (0, V.jsx)("div", {
"data-item-placeholder": "",
- children: e ? /* @__PURE__ */ (0, V.jsx)(kA, {
+ children: e ? /* @__PURE__ */ (0, V.jsx)(gA, {
message: ye(e),
onRetry: () => {
r.error && r.refetch(), o.error && o.refetch();
@@ -79398,9 +79488,9 @@ function yqe(e) {
})
});
}
- return /* @__PURE__ */ (0, V.jsx)(bqe, {
+ return /* @__PURE__ */ (0, V.jsx)(xqe, {
...e,
- item: zre(o.data, i),
+ item: Vre(o.data, i),
queue: i
}, o.data.id);
}
@@ -79413,36 +79503,36 @@ var Y7 = ({ onClose: e }) => /* @__PURE__ */ (0, V.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: R("x") }
});
-function bqe(e) {
- let { item: t, queue: n, actions: r, helpers: i } = e, a = Iqe(t, r, i.tagLabel), o = (0, B.useRef)(t);
+function xqe(e) {
+ let { item: t, queue: n, actions: r, helpers: i } = e, a = Lqe(t, r, i.tagLabel), o = (0, B.useRef)(t);
(0, B.useLayoutEffect)(() => {
r.present(o.current, n);
}, [r]), (0, B.useEffect)(() => {
- n?.kind === "playlist" && K(zC, {
+ n?.kind === "playlist" && K(LC, {
action: "progress",
id: n.playlistId,
asset_id: t.id
}).catch(() => {});
}, []);
- let s = $re(t, i.sourceOffline(t.location || ""));
+ let s = tie(t, i.sourceOffline(t.location || ""));
return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [/* @__PURE__ */ (0, V.jsxs)("div", {
"data-stage-grid": "",
"data-with-queue": n ? "" : void 0,
"data-item-detail": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(xqe, {
+ /* @__PURE__ */ (0, V.jsx)(Sqe, {
item: t,
gate: s,
helpers: i,
actions: r
}),
- n ? /* @__PURE__ */ (0, V.jsx)(Cqe, {
+ n ? /* @__PURE__ */ (0, V.jsx)(wqe, {
queue: n,
itemId: t.id,
helpers: i,
actions: r
}) : null,
- /* @__PURE__ */ (0, V.jsx)(Eqe, {
+ /* @__PURE__ */ (0, V.jsx)(Dqe, {
item: t,
queue: n,
write: a,
@@ -79450,9 +79540,9 @@ function bqe(e) {
actions: r
})
]
- }), !n && e.relatedLimit > 0 ? /* @__PURE__ */ (0, V.jsx)(Fqe, { ...e }) : null] });
+ }), !n && e.relatedLimit > 0 ? /* @__PURE__ */ (0, V.jsx)(Iqe, { ...e }) : null] });
}
-function xqe({ item: e, gate: t, helpers: n, actions: r }) {
+function Sqe({ item: e, gate: t, helpers: n, actions: r }) {
let [i, a] = (0, B.useState)(t ? "" : "auto"), o = (0, B.useRef)(null), s = (0, B.useRef)(e);
(0, B.useLayoutEffect)(() => {
let e = o.current;
@@ -79463,7 +79553,7 @@ function xqe({ item: e, gate: t, helpers: n, actions: r }) {
ref: o,
"data-stage-media": "",
"data-item-media": t || "video",
- children: [/* @__PURE__ */ (0, V.jsx)(Y7, { onClose: r.close }), t === "offline" ? /* @__PURE__ */ (0, V.jsx)(Sqe, {
+ children: [/* @__PURE__ */ (0, V.jsx)(Y7, { onClose: r.close }), t === "offline" ? /* @__PURE__ */ (0, V.jsx)(Cqe, {
item: e,
badge: c,
helpers: n,
@@ -79492,7 +79582,7 @@ function xqe({ item: e, gate: t, helpers: n, actions: r }) {
}) : null]
});
}
-function Sqe({ item: e, badge: t, helpers: n, actions: r }) {
+function Cqe({ item: e, badge: t, helpers: n, actions: r }) {
let [i, a] = (0, B.useState)(!1), [o, s] = (0, B.useState)(!1), c = async () => {
a(!0);
let t = await r.checkSource(e.location || "").catch(() => !1);
@@ -79517,8 +79607,8 @@ function Sqe({ item: e, badge: t, helpers: n, actions: r }) {
]
});
}
-function Cqe({ queue: e, itemId: t, helpers: n, actions: r }) {
- let i = Yre(e), a = (0, B.useRef)(null), o = Tqe(e, t, r), s = (0, B.useRef)(o);
+function wqe({ queue: e, itemId: t, helpers: n, actions: r }) {
+ let i = Zre(e), a = (0, B.useRef)(null), o = Eqe(e, t, r), s = (0, B.useRef)(o);
s.current = o;
let c = (0, B.useCallback)((t) => {
a.current = t, t && (n.wireDrag(t), e.kind === "playlist" && n.wireDragReorder(t, {
@@ -79526,7 +79616,7 @@ function Cqe({ queue: e, itemId: t, helpers: n, actions: r }) {
attribute: "data-queue-row",
onMove: (e, t, n) => s.current.move(+e, +t, n)
}));
- }, [n, e.kind]), l = wqe(e, r), u = e.kind === "mix" ? /* @__PURE__ */ (0, V.jsx)("button", {
+ }, [n, e.kind]), l = Tqe(e, r), u = e.kind === "mix" ? /* @__PURE__ */ (0, V.jsx)("button", {
type: "button",
"data-save-mix": "",
title: "保存为播放列表",
@@ -79554,10 +79644,10 @@ function Cqe({ queue: e, itemId: t, helpers: n, actions: r }) {
listRef: c,
children: e.items.map((i) => {
let a = e.kind === "editions" && i.edition_label ? /* @__PURE__ */ (0, V.jsx)("i", {
- className: `javedition ${qre[i.edition_label] || "censored"}`,
+ className: `javedition ${Yre[i.edition_label] || "censored"}`,
"data-queue-edition": "",
children: i.edition_label
- }) : null, s = e.kind === "playlist" && YC(i);
+ }) : null, s = e.kind === "playlist" && qC(i);
return /* @__PURE__ */ (0, V.jsxs)(R7, {
current: i.id === t,
"data-queue-item": i.id,
@@ -79597,14 +79687,14 @@ function Cqe({ queue: e, itemId: t, helpers: n, actions: r }) {
})]
}), /* @__PURE__ */ (0, V.jsx)("span", {
"data-truncate-end": "",
- children: s ? "已消失 · 文件已不在盘上" : e.kind === "parts" ? iw(i.part_label) : P(i, n.tagLabel)
+ children: s ? "已消失 · 文件已不在盘上" : e.kind === "parts" ? nw(i.part_label) : P(i, n.tagLabel)
})]
}, i.id);
})
});
}
-function wqe(e, t) {
- let n = OS({ mutationFn: (t) => K(zC, {
+function Tqe(e, t) {
+ let n = OS({ mutationFn: (t) => K(LC, {
action: "create",
name: t,
asset_ids: e.items.map((e) => e.id),
@@ -79617,11 +79707,11 @@ function wqe(e, t) {
save: (e) => n.mutateAsync(e)
});
}
-function Tqe(e, t, n) {
- let r = RC({
+function Eqe(e, t, n) {
+ let r = IC({
kind: "playlist",
playlistId: e.playlistId
- }), i = (e) => (z.setQueryData(r, JC(e)), e), a = (t) => K(zC, {
+ }), i = (e) => (z.setQueryData(r, KC(e)), e), a = (t) => K(LC, {
id: e.playlistId,
...t
}).then((e) => e.playlist), o = OS({
@@ -79637,8 +79727,8 @@ function Tqe(e, t, n) {
return {
move: async (t, r, c) => {
if (e.kind !== "playlist") return;
- let l = Zre(s, t, r, c);
- if (Qre(l, s)) return;
+ let l = $re(s, t, r, c);
+ if (eie(l, s)) return;
let u = s;
await o.mutateAsync(l), n.toast("已调整播放顺序", { undo: async () => {
i(await a({
@@ -79684,7 +79774,7 @@ function Tqe(e, t, n) {
}
};
}
-function Eqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
+function Dqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
let a = e.location === "online", o = n.busyAttrs, [s, c] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-stage-side": "",
@@ -79692,7 +79782,7 @@ function Eqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
children: /* @__PURE__ */ (0, V.jsxs)("div", {
"data-stage-side-content": "",
children: [
- /* @__PURE__ */ (0, V.jsx)(Dqe, {
+ /* @__PURE__ */ (0, V.jsx)(Oqe, {
item: e,
queue: t,
helpers: r,
@@ -79704,7 +79794,7 @@ function Eqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-live": "polite",
children: n.sourceState
}),
- /* @__PURE__ */ (0, V.jsx)(kqe, {
+ /* @__PURE__ */ (0, V.jsx)(Aqe, {
item: e,
write: n
}),
@@ -79739,18 +79829,18 @@ function Eqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, V.jsx)(Aqe, {
+ /* @__PURE__ */ (0, V.jsx)(jqe, {
item: e,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, V.jsx)(jqe, {
+ /* @__PURE__ */ (0, V.jsx)(Mqe, {
item: e,
write: n,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, V.jsx)(Nqe, { item: e }),
+ /* @__PURE__ */ (0, V.jsx)(Pqe, { item: e }),
/* @__PURE__ */ (0, V.jsxs)("div", {
"data-stage-actions": "",
"data-item-feedback": "",
@@ -79844,7 +79934,7 @@ function Eqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
]
}),
- /* @__PURE__ */ (0, V.jsx)(Pqe, {
+ /* @__PURE__ */ (0, V.jsx)(Fqe, {
item: e,
open: s,
write: n
@@ -79868,7 +79958,7 @@ function Eqe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
});
}
-function Dqe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
+function Oqe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
let a = (0, B.useRef)(null), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)(!1);
(0, B.useLayoutEffect)(() => {
let e = a.current;
@@ -79878,7 +79968,7 @@ function Dqe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
}, n = new ResizeObserver(t);
return n.observe(e), t(), () => n.disconnect();
}, []);
- let u = () => s((e) => !e), d = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + Xre(e, t);
+ let u = () => s((e) => !e), d = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + Qre(e, t);
return /* @__PURE__ */ (0, V.jsx)("div", {
"data-item-title": "",
children: /* @__PURE__ */ (0, V.jsxs)("div", {
@@ -79909,19 +79999,19 @@ function Dqe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
}),
e.has_cover && (e.cover_key || e.code) ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-cover-crop-host": "",
- children: /* @__PURE__ */ (0, V.jsx)(_qe, {
+ children: /* @__PURE__ */ (0, V.jsx)(vqe, {
code: e.cover_key || e.code || "",
coverUrl: D(e),
box: e.poster_box || null,
onSaved: (t) => {
z.invalidateQueries({
- queryKey: LC(e.id),
+ queryKey: FC(e.id),
exact: !0
- }), IC((t) => (t.cover_key || t.code) === (e.cover_key || e.code), { poster_box: t });
+ }), PC((t) => (t.cover_key || t.code) === (e.cover_key || e.code), { poster_box: t });
}
})
}) : null,
- e.location === "online" ? null : /* @__PURE__ */ (0, V.jsx)(Oqe, {
+ e.location === "online" ? null : /* @__PURE__ */ (0, V.jsx)(kqe, {
id: e.id,
actions: r,
onStatus: i
@@ -79931,7 +80021,7 @@ function Dqe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
})
});
}
-function Oqe({ id: e, actions: t, onStatus: n }) {
+function kqe({ id: e, actions: t, onStatus: n }) {
let [r, i] = (0, B.useState)(""), a = async () => {
r || (i("reveal"), n(""), n(await t.reveal(e)), i(""));
}, o = async () => {
@@ -79964,14 +80054,14 @@ function Oqe({ id: e, actions: t, onStatus: n }) {
children: /* @__PURE__ */ (0, V.jsx)(q7, { name: "folder-sync" })
})] });
}
-function kqe({ item: e, write: t }) {
- let n = QC(e.rating);
+function Aqe({ item: e, write: t }) {
+ let n = XC(e.rating);
return /* @__PURE__ */ (0, V.jsxs)("div", {
id: "detailRating",
role: "group",
"data-item-rating": "",
"aria-label": "评分",
- "data-value": ZC(e.rating),
+ "data-value": YC(e.rating),
children: [/* @__PURE__ */ (0, V.jsx)("div", {
"data-rating-stars": "",
children: [
@@ -79993,12 +80083,12 @@ function kqe({ item: e, write: t }) {
}), /* @__PURE__ */ (0, V.jsx)("span", {
"data-rating-value": "",
"aria-live": "polite",
- children: Hre(e.rating)
+ children: Wre(e.rating)
})]
});
}
-function Aqe({ item: e, actions: t }) {
- let n = (0, B.useMemo)(() => Vre(e), [e]), [r, i] = (0, B.useState)(!1), a = Math.max(0, n.cast.length - 8), o = (e, n, i) => {
+function jqe({ item: e, actions: t }) {
+ let n = (0, B.useMemo)(() => Ure(e), [e]), [r, i] = (0, B.useState)(!1), a = Math.max(0, n.cast.length - 8), o = (e, n, i) => {
let a = e === "performer" && i >= 8 && !r, o = e === "performer" ? /* @__PURE__ */ (0, V.jsx)("span", {
"data-id-face": "",
dangerouslySetInnerHTML: { __html: `<span>${L(n.name.slice(0, 1))}</span>` + A({
@@ -80118,8 +80208,8 @@ function Aqe({ item: e, actions: t }) {
]
});
}
-function jqe({ item: e, write: t, helpers: n, actions: r }) {
- let i = Wre(e, n);
+function Mqe({ item: e, write: t, helpers: n, actions: r }) {
+ let i = Kre(e, n);
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-stage-tags": "",
id: "detailTags",
@@ -80140,14 +80230,14 @@ function jqe({ item: e, write: t, helpers: n, actions: r }) {
onClick: () => t.removeTag(e),
children: /* @__PURE__ */ (0, V.jsx)(q7, { name: "x" })
})]
- }, e.k)), /* @__PURE__ */ (0, V.jsx)(Mqe, {
+ }, e.k)), /* @__PURE__ */ (0, V.jsx)(Nqe, {
item: e,
write: t,
helpers: n
})]
});
}
-function Mqe({ item: e, write: t, helpers: n }) {
+function Nqe({ item: e, write: t, helpers: n }) {
let r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(!1), [s, c] = (0, B.useState)(!1), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(-1), h = (0, B.useCallback)(() => {
i.current && De(i.current), c(!1);
}, []);
@@ -80161,7 +80251,7 @@ function Mqe({ item: e, write: t, helpers: n }) {
clearTimeout(t), document.removeEventListener("pointerdown", e, !0);
};
}, [s, h]);
- let g = s ? Kre(d, n.tagCandidates(), rw()) : {
+ let g = s ? Jre(d, n.tagCandidates(), tw()) : {
recent: [],
results: [],
create: ""
@@ -80189,12 +80279,12 @@ function Mqe({ item: e, write: t, helpers: n }) {
if (n.key === "Enter") {
n.preventDefault();
let r = p >= 0 ? _[p] : null;
- r ? v(r, r.n !== -1 && $C(e, r.k)) : l.trim() && (h(), t.addTag(l.trim()));
+ r ? v(r, r.n !== -1 && ZC(e, r.k)) : l.trim() && (h(), t.addTag(l.trim()));
}
}
}, b = -1, x = (t) => {
b += 1;
- let r = b, i = $C(e, t.k);
+ let r = b, i = ZC(e, t.k);
return /* @__PURE__ */ (0, V.jsxs)("button", {
type: "button",
"data-pick": t.k,
@@ -80291,8 +80381,8 @@ function Mqe({ item: e, write: t, helpers: n }) {
})]
})] });
}
-function Nqe({ item: e }) {
- let t = eie(e);
+function Pqe({ item: e }) {
+ let t = nie(e);
return /* @__PURE__ */ (0, V.jsxs)("div", {
"data-item-trace": "",
children: [/* @__PURE__ */ (0, V.jsxs)("div", {
@@ -80326,7 +80416,7 @@ function Nqe({ item: e }) {
})]
});
}
-function Pqe({ item: e, open: t, write: n }) {
+function Fqe({ item: e, open: t, write: n }) {
let [r, i] = (0, B.useState)(e.like_reason || ""), a = (0, B.useRef)(null);
(0, B.useEffect)(() => {
t && a.current?.focus();
@@ -80365,10 +80455,10 @@ function Pqe({ item: e, open: t, write: n }) {
})]
});
}
-function Fqe(e) {
+function Iqe(e) {
let { item: t, relatedLimit: n, helpers: r, grid: i } = e, a = TS({
- queryKey: Ire(t.id, n),
- queryFn: async ({ signal: e }) => (await G(Rre(t.id, n), e)).items || []
+ queryKey: Rre(t.id, n),
+ queryFn: async ({ signal: e }) => (await G(Bre(t.id, n), e)).items || []
}), [o] = (0, B.useState)(() => r.relatedSkeletonHtml()), s = (0, B.useCallback)((e) => {
e && (ke(e), r.wireDrag(e));
}, [r]);
@@ -80381,7 +80471,7 @@ function Fqe(e) {
ref: s,
id: "nrow",
"data-related-row": "",
- children: a.data ? /* @__PURE__ */ (0, V.jsx)(zA, {
+ children: a.data ? /* @__PURE__ */ (0, V.jsx)(EA, {
mode: "items",
variant: "next",
items: a.data,
@@ -80398,8 +80488,8 @@ function Fqe(e) {
})]
});
}
-function Iqe(e, t, n) {
- let r = e.id, i = LC(r), [a, o] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = (e, t) => o((n) => {
+function Lqe(e, t, n) {
+ let r = e.id, i = FC(r), [a, o] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
}), f = () => z.getQueryData(i) || e, p = (e) => {
@@ -80415,7 +80505,7 @@ function Iqe(e, t, n) {
rating: t.rating,
o_count: t.o_count
};
- return FC(r, n), t;
+ return NC(r, n), t;
}, m = (e, t) => K(e, {
id: r,
...t
@@ -80430,7 +80520,7 @@ function Iqe(e, t, n) {
run: n
}));
}, _ = async (e, t) => {
- let n = await m(BC, t === void 0 ? { kind: e } : {
+ let n = await m(RC, t === void 0 ? { kind: e } : {
kind: e,
value: t
});
@@ -80450,21 +80540,21 @@ function Iqe(e, t, n) {
"aria-disabled": !0
} : {},
rate: (e) => g(`rate:${e}`, "评分", async () => {
- let n = f().rating || 0, r = Ure(n, e);
- await _("rate", r), t.toast(r ? `已评 ${QC(r)} 星` : "已取消评分", { undo: async () => {
+ let n = f().rating || 0, r = Gre(n, e);
+ await _("rate", r), t.toast(r ? `已评 ${XC(r)} 星` : "已取消评分", { undo: async () => {
await _("rate", n);
} });
}),
feedback: (e) => g(e, "操作", async () => {
let n = { feedback: f().feedback || null }, r = await _(e);
- t.toast(aw(e, r), { undo: async () => {
+ t.toast(rw(e, r), { undo: async () => {
e === "o" ? await _("o-undo") : e === "dispose" ? await _("dispose") : (r.feedback && await _(r.feedback), n.feedback && await _(n.feedback)), await t.trashChanged(f().disposal || null, !0);
} }), e === "dispose" && await t.trashChanged(r.disposal || null, !1);
}),
later: () => g("later", "更新稍后看", async () => {
- let e = await m(HC, {});
+ let e = await m(BC, {});
p({ watch_later: e.watch_later }), t.toast(e.watch_later ? "已加入稍后看" : "已移出稍后看", { undo: async () => {
- p({ watch_later: (await m(HC, {})).watch_later });
+ p({ watch_later: (await m(BC, {})).watch_later });
} });
}),
quality: () => g("quality", "更新版本需求", async () => {
@@ -80474,9 +80564,9 @@ function Iqe(e, t, n) {
}, n = (e) => p({
better_version: e.better_version,
better_version_reason: e.better_version_reason || ""
- }), r = await m(UC, { wanted: !e.wanted });
+ }), r = await m(VC, { wanted: !e.wanted });
n(r), t.toast(r.better_version ? "已标记寻找更好版本" : "已取消寻找更好版本", { undo: async () => {
- n(await m(UC, e));
+ n(await m(VC, e));
} });
}),
preference: ({ liked: e, reason: n }) => {
@@ -80490,7 +80580,7 @@ function Iqe(e, t, n) {
});
u("保存中…");
try {
- o(await m(WC, {
+ o(await m(HC, {
liked: a,
reason: i
}));
@@ -80500,7 +80590,7 @@ function Iqe(e, t, n) {
u("已保存"), setTimeout(() => u((e) => e === "已保存" ? "" : e), 1400);
let s = f();
t.toast(s.liked ? "已保存喜欢偏好" : "已取消喜欢", { undo: async () => {
- o(await m(WC, r));
+ o(await m(HC, r));
} });
});
},
@@ -80509,11 +80599,11 @@ function Iqe(e, t, n) {
operation: "remove",
tag: e.k
})).ok) throw Error("标签未删除");
- p((t) => ew(t, e.k)), t.toast(`已删除标签「${n(e.k)}」`, { undo: async () => {
- await m(VC, {
+ p((t) => QC(t, e.k)), t.toast(`已删除标签「${n(e.k)}」`, { undo: async () => {
+ await m(zC, {
operation: "add",
tag: e.k
- }), p((t) => tw(t, e));
+ }), p((t) => $C(t, e));
} });
}),
addTag: (e) => {
@@ -80522,14 +80612,14 @@ function Iqe(e, t, n) {
(await m("/api/item-tag", {
operation: "add",
tag: r
- })).ok && (p((e) => tw(e, {
+ })).ok && (p((e) => $C(e, {
k: r,
cat: "general"
- })), Gre(r), t.toast(`已添加标签「${n(r)}」`, { undo: async () => {
- await m(VC, {
+ })), qre(r), t.toast(`已添加标签「${n(r)}」`, { undo: async () => {
+ await m(zC, {
operation: "remove",
tag: r
- }), p((e) => ew(e, r));
+ }), p((e) => QC(e, r));
} }));
});
}
@@ -80538,7 +80628,7 @@ function Iqe(e, t, n) {
//#endregion
//#region src/react/stage/stage-player.ts
var X7 = null, Z7 = null, Q7 = null, $7 = null, e9 = null, t9 = !1, n9 = 0, r9 = null, i9 = () => !1, a9 = (e, t, n) => `${e}:${t}:${n ?? ""}`;
-function Lqe(e, t) {
+function Rqe(e, t) {
X7 = e, i9 = () => t.isOpen(), r9 = () => t.requestClose(), Yne({
...e.player,
stage: () => document.getElementById("stage")
@@ -80547,7 +80637,7 @@ function Lqe(e, t) {
kind: (e) => Z7?.player === e ? Z7.kind : Q7?.kind ?? $7?.kind ?? "item",
expand: () => C9(),
toMiniplayer: () => w9()
- }), o9 || (o9 = !0, addEventListener("pagehide", () => mC()));
+ }), o9 || (o9 = !0, addEventListener("pagehide", () => fC()));
}
var o9 = !1;
function s9() {
@@ -80557,10 +80647,10 @@ function s9() {
function c9(e) {
$7 = e;
}
-var Rqe = () => $7;
+var zqe = () => $7;
function l9(e, t) {
let { kind: n, item: r, media: i = null } = t, a = a9(n, r.id, i?.index ?? null);
- if (Z7 && Z7.key === a) return zqe(e, Z7);
+ if (Z7 && Z7.key === a) return Bqe(e, Z7);
Z7 && S9();
let o = {
player: null,
@@ -80572,7 +80662,7 @@ function l9(e, t) {
Q7 = o;
let s = document.createElement("video");
t.id && (s.id = t.id), s.className = "video-js vjs-big-play-centered", s.controls = !0, s.setAttribute("playsinline", ""), s.preload = "metadata", t.poster && (s.poster = t.poster), t.onError && s.addEventListener("error", t.onError), e.append(s);
- let c = OC(s, {
+ let c = EC(s, {
kind: n,
item: r,
media: i,
@@ -80585,12 +80675,12 @@ function l9(e, t) {
});
return () => {
let e = !!o.player && Z7?.player === o.player;
- Q7 === o && (Q7 = null), c(), !e && (o.player || (s.pause(), s.removeAttribute("src"), s.load()), mC());
+ Q7 === o && (Q7 = null), c(), !e && (o.player || (s.pause(), s.removeAttribute("src"), s.load()), fC());
};
}
-function zqe(e, t) {
+function Bqe(e, t) {
let { player: n } = t;
- b9(t), Z7 = null, x9(), n.el().classList.remove("vjs-peach-mini"), EC(e), e.append(n.el()), VS(n);
+ b9(t), Z7 = null, x9(), n.el().classList.remove("vjs-peach-mini"), wC(e), e.append(n.el()), VS(n);
let r = {
player: n,
kind: t.kind,
@@ -80599,22 +80689,22 @@ function zqe(e, t) {
key: t.key
};
Q7 = r;
- let i = DC(n, e);
+ let i = TC(n, e);
return HS(n), () => {
- Q7 === r && (Q7 = null), i(), Z7?.player !== n && (BS() === n && VS(null), iC(n), mC());
+ Q7 === r && (Q7 = null), i(), Z7?.player !== n && (BS() === n && VS(null), iC(n), fC());
};
}
var u9 = () => {
let e = Q7?.player;
return e && !e.isDisposed() ? e : null;
};
-function Bqe(e) {
+function Vqe(e) {
let t = t9;
t9 = !1, Z7?.pending && S9();
let n = Q7, r = n?.player, i = $7;
if (!n || !r || r.isDisposed() || !i || !e9) return;
let a = s9().player.settings();
- (t || e && a.miniplayer && !r.paused() && !r.ended() && !r.error()) && Gqe({
+ (t || e && a.miniplayer && !r.paused() && !r.ended() && !r.error()) && Kqe({
player: r,
kind: n.kind,
item: n.item,
@@ -80622,7 +80712,7 @@ function Bqe(e) {
key: n.key
}, i);
}
-function Vqe(e, t) {
+function Hqe(e, t) {
if (t9 = !1, Z7) {
if (Z7.kind === e && Z7.item.id === t) {
Z7.pending = !0, x9();
@@ -80635,11 +80725,11 @@ function d9(e) {
e9 = e, e9 && v9();
}
var f9 = () => !!Z7 && !Z7.pending && !Z7.player.isDisposed();
-function Hqe() {
+function Uqe() {
return f9() ? e9?.frame.querySelector("video") ?? null : null;
}
-function Uqe() {
- return i9() ? document.getElementById("stage")?.querySelector("video") ?? null : Hqe();
+function Wqe() {
+ return i9() ? document.getElementById("stage")?.querySelector("video") ?? null : Uqe();
}
function p9(e) {
e9 && (e9.title.textContent = e.title || "", e9.sub.textContent = e.sub || "", e9.info.setAttribute("aria-label", e.title ? `展开到详情:${e.title}` : "展开到详情"));
@@ -80688,7 +80778,7 @@ function y9(e) {
function b9(e) {
e.off.forEach((e) => e()), e.off = [];
}
-function Wqe() {
+function Gqe() {
let e = e9?.root;
if (!e) return;
let t = e.hidden;
@@ -80709,7 +80799,7 @@ function x9() {
e.style.transform = "";
}
}
-function Gqe(e, t) {
+function Kqe(e, t) {
if (!e9) return;
let n = {
...e,
@@ -80717,13 +80807,13 @@ function Gqe(e, t) {
off: [],
pending: !1
};
- Z7 = n, n9++, e.player.el().classList.add("vjs-peach-mini"), e9.frame.prepend(e.player.el()), p9(t), y9(n), Wqe(), HS(e.player);
+ Z7 = n, n9++, e.player.el().classList.add("vjs-peach-mini"), e9.frame.prepend(e.player.el()), p9(t), y9(n), Gqe(), HS(e.player);
}
function S9() {
let e = Z7;
e && b9(e), Z7 = null, n9++;
let t = e?.player ?? null;
- t && BS() === t && VS(null), iC(t), t && mC(), e9?.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove()), RS(), x9();
+ t && BS() === t && VS(null), iC(t), t && fC(), e9?.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove()), RS(), x9();
}
function C9() {
if (!f9() || !Z7) return;
@@ -80737,7 +80827,7 @@ function w9() {
}
i9() && u9() && r9 && (t9 = !0, r9());
}
-function Kqe() {
+function qqe() {
let e = Z7?.player;
!e || e.isDisposed() || (e.paused() ? e.play()?.catch(() => {}) : e.pause());
}
@@ -80750,7 +80840,7 @@ function T9(e) {
function E9(e) {
return !(!f9() || !e || e.part_group || e.edition_group || e.medium && e.medium !== "video" || e.cost === "metered" && e.location !== "online" || e.location === "online" && !e.follow_item_id || s9().sourceOffline(String(e.location ?? "")));
}
-async function qqe(e) {
+async function Jqe(e) {
if (!f9() || !Z7 || !e9) return;
let t = ++n9, n = await ce(`/api/item?id=${e}`).catch(() => null);
if (t !== n9 || !f9() || !Z7 || !e9 || !n || n.error) return;
@@ -80759,7 +80849,7 @@ async function qqe(e) {
return;
}
let r = Z7;
- b9(r), BS() === r.player && VS(null), iC(r.player), mC(), e9.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove());
+ b9(r), BS() === r.player && VS(null), iC(r.player), fC(), e9.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove());
let i = document.createElement("video");
i.className = "video-js", i.setAttribute("playsinline", ""), i.preload = "metadata", e9.frame.prepend(i);
let a = {
@@ -80768,7 +80858,7 @@ async function qqe(e) {
title: String(n.title || n.name || ""),
sub: String(n.performers?.[0] || n.creator || "未归属")
};
- p9(a), OC(i, {
+ p9(a), EC(i, {
kind: "item",
item: n,
autoplay: !0,
@@ -80803,9 +80893,9 @@ var D9 = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, V.jsx)("use", { href: `#i-${e}` })
-}), Jqe = { __html: "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-player-pause\"/></svg>" }, O9 = (e) => (t) => {
+}), Yqe = { __html: "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-player-pause\"/></svg>" }, O9 = (e) => (t) => {
t.stopPropagation(), e();
-}, Yqe = (0, B.memo)(function() {
+}, Xqe = (0, B.memo)(function() {
let e = (0, B.useRef)(null), t = (0, B.useRef)(null), n = (0, B.useRef)(null), r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(null), l = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => (d9({
root: e.current,
@@ -80817,7 +80907,7 @@ var D9 = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("svg", {
title: s.current,
sub: c.current,
info: l.current
- }), () => d9(null)), []), (0, B.useEffect)(() => Zqe(e.current, t.current), []), /* @__PURE__ */ (0, V.jsx)("aside", {
+ }), () => d9(null)), []), (0, B.useEffect)(() => Qqe(e.current, t.current), []), /* @__PURE__ */ (0, V.jsx)("aside", {
ref: e,
"data-miniplayer": "",
id: "miniplayer",
@@ -80867,8 +80957,8 @@ var D9 = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("svg", {
id: "miniplayerPlay",
"aria-label": "暂停",
"aria-keyshortcuts": "k",
- onClick: O9(Kqe),
- dangerouslySetInnerHTML: Jqe
+ onClick: O9(qqe),
+ dangerouslySetInnerHTML: Yqe
}),
/* @__PURE__ */ (0, V.jsx)("button", {
ref: o,
@@ -80907,7 +80997,7 @@ var D9 = ({ name: e }) => /* @__PURE__ */ (0, V.jsx)("svg", {
})
});
});
-function Xqe(e, t, n) {
+function Zqe(e, t, n) {
let r = e.getBoundingClientRect(), i = (r.top + r.height / 2 < innerHeight / 2 ? "t" : "b") + (r.left + r.width / 2 < innerWidth / 2 ? "l" : "r"), a = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--topH")) || 56, o = {
left: r.left - t,
top: r.top - n
@@ -80929,7 +81019,7 @@ function Xqe(e, t, n) {
};
e.addEventListener("transitionend", u), setTimeout(u, 600);
}
-function Zqe(e, t) {
+function Qqe(e, t) {
let n = null, r = (e) => {
if (!(e.button !== 0 || e.target.closest("[data-miniplayer-button],[data-miniplayer-play],[data-miniplayer-seek],.vjs-control-bar"))) {
n = {
@@ -80955,7 +81045,7 @@ function Zqe(e, t) {
} catch {}
i.moved && (e.dataset.dragged = "1", setTimeout(() => {
delete e.dataset.dragged;
- }, 0), Xqe(e, i.dx, i.dy));
+ }, 0), Zqe(e, i.dx, i.dy));
}, o = (t) => {
e.dataset.dragged && (t.stopPropagation(), t.preventDefault());
}, s = (e) => {
@@ -80975,21 +81065,21 @@ function R9() {
if (!k9) throw Error("舞台还没有接上宿主(configureStage)");
return k9;
}
-function Qqe() {
- return (!A9 || !j9?.isConnected) && (A9?.unmount(), j9 = document.createElement("div"), j9.dataset.stageHost = "", document.body.append(j9), A9 = (0, MN.createRoot)(j9)), A9;
+function $qe() {
+ return (!A9 || !j9?.isConnected) && (A9?.unmount(), j9 = document.createElement("div"), j9.dataset.stageHost = "", document.body.append(j9), A9 = (0, AN.createRoot)(j9)), A9;
}
function z9() {
- let e = Qqe();
- (0, $f.flushSync)(() => e.render(/* @__PURE__ */ (0, V.jsx)(p7, { children: /* @__PURE__ */ (0, V.jsx)($qe, { view: M9 }) })));
+ let e = $qe();
+ (0, $f.flushSync)(() => e.render(/* @__PURE__ */ (0, V.jsx)(p7, { children: /* @__PURE__ */ (0, V.jsx)(eJe, { view: M9 }) })));
}
-function $qe({ view: e }) {
- return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [e ? /* @__PURE__ */ (0, V.jsx)(eJe, { view: e }, e.generation) : null, /* @__PURE__ */ (0, V.jsx)(Yqe, {})] });
+function eJe({ view: e }) {
+ return /* @__PURE__ */ (0, V.jsxs)(V.Fragment, { children: [e ? /* @__PURE__ */ (0, V.jsx)(tJe, { view: e }, e.generation) : null, /* @__PURE__ */ (0, V.jsx)(Xqe, {})] });
}
var B9 = () => /* @__PURE__ */ (0, V.jsx)("div", {
"data-skeleton": "detail",
role: "status",
"aria-label": "正在读取作品详情",
- dangerouslySetInnerHTML: { __html: BKe() }
+ dangerouslySetInnerHTML: { __html: UKe() }
});
function V9(e) {
let t = e.currentTarget;
@@ -80997,7 +81087,7 @@ function V9(e) {
let n = t.getBoundingClientRect();
return e.clientX < n.left || e.clientX > n.right || e.clientY < n.top || e.clientY > n.bottom;
}
-function eJe({ view: e }) {
+function tJe({ view: e }) {
let t = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => {
let e = t.current, n = (e) => {
@@ -81005,7 +81095,7 @@ function eJe({ view: e }) {
};
return e.addEventListener("cancel", n), () => e.removeEventListener("cancel", n);
}, []);
- let { phase: n, content: r } = e, i = r.kind === "item" ? /* @__PURE__ */ (0, V.jsx)(yqe, { ...r.props }) : /* @__PURE__ */ (0, V.jsx)(sqe, { ...r.props });
+ let { phase: n, content: r } = e, i = r.kind === "item" ? /* @__PURE__ */ (0, V.jsx)(bqe, { ...r.props }) : /* @__PURE__ */ (0, V.jsx)(uqe, { ...r.props });
return /* @__PURE__ */ (0, V.jsxs)("dialog", {
ref: t,
id: "stage",
@@ -81044,7 +81134,7 @@ function U9(e, t) {
let n = L9();
n?.toggleAttribute("data-ambient", e), n?.toggleAttribute("data-theater", t);
}
-function tJe(e) {
+function nJe(e) {
let t = e.resume ?? null, n = (n) => {
let r = t && (e.id == null || e.id === n) ? t : null;
return t = null, r;
@@ -81106,7 +81196,7 @@ function tJe(e) {
}
};
}
-function nJe(e, t) {
+function rJe(e, t) {
let n = e.querySelector(":scope > [data-stage-fade]");
e.setAttribute("data-stage-reveal", ""), e.getBoundingClientRect(), e.setAttribute("data-stage-revealing", "");
let r = 0, i = () => {
@@ -81119,13 +81209,13 @@ function nJe(e, t) {
};
n?.addEventListener("transitionend", a), r = window.setTimeout(i, 1e3);
}
-async function rJe(e) {
+async function iJe(e) {
M9 && W9({ miniplayer: !1 });
let t = ++N9, n = new AbortController();
- P9 = n, F9 = !1, I9 = !1, Vqe(e.kind, e.id ?? NaN), M9 = {
+ P9 = n, F9 = !1, I9 = !1, Hqe(e.kind, e.id ?? NaN), M9 = {
generation: t,
request: e,
- content: tJe(e),
+ content: nJe(e),
phase: "skeleton"
}, z9();
let r = L9();
@@ -81133,7 +81223,7 @@ async function rJe(e) {
ke(r), document.body.setAttribute("data-detail-open", ""), r.open || r.showModal();
let i = M9.content;
try {
- i.kind === "item" ? await Bre(i.props, n.signal) : await WKe(i.props, n.signal);
+ i.kind === "item" ? await Hre(i.props, n.signal) : await qKe(i.props, n.signal);
} catch {
if (n.signal.aborted) return;
}
@@ -81142,11 +81232,11 @@ async function rJe(e) {
M9 = {
...M9,
phase: a ? "content" : "reveal"
- }, z9(), a || nJe(r, t), Be(r, ":scope>:not([data-stage-fade]) [data-reveal-line]");
+ }, z9(), a || rJe(r, t), Be(r, ":scope>:not([data-stage-fade]) [data-reveal-line]");
let o = document.activeElement;
(o === r || !r.contains(o)) && r.querySelector("#closeStage")?.focus();
}
-function iJe() {
+function aJe() {
let e = L9();
return !e?.open || e.hasAttribute("data-closing") || matchMedia("(prefers-reduced-motion: reduce)").matches ? Promise.resolve() : (e.setAttribute("data-closing", ""), new Promise((t) => {
let n = 0, r = () => {
@@ -81158,11 +81248,11 @@ function iJe() {
}));
}
function W9({ miniplayer: e = !0 } = {}) {
- if (N9++, P9?.abort(), P9 = null, Bqe(e), !M9) return;
+ if (N9++, P9?.abort(), P9 = null, Vqe(e), !M9) return;
let t = L9();
t && ie(t), RS(), t?.open && t.close(), M9 = null, F9 = !1, I9 = !1, z9(), c9(null), document.body.removeAttribute("data-detail-open");
}
-function aJe(e) {
+function oJe(e) {
!M9 || M9.content.kind !== "item" || (M9 = {
...M9,
content: {
@@ -81174,21 +81264,21 @@ function aJe(e) {
}
}, z9());
}
-function oJe() {
- let e = Rqe(), t = e?.kind === "item" ? e.item : null, n = t ? O(t, R9().player.settings().javImage) : "";
+function sJe() {
+ let e = zqe(), t = e?.kind === "item" ? e.item : null, n = t ? O(t, R9().player.settings().javImage) : "";
if (!n) return;
let r = u9();
r ? r.poster(n) : document.getElementById("vid")?.setAttribute("poster", n);
}
-var sJe = {
- open: rJe,
- update: aJe,
- exit: iJe,
+var cJe = {
+ open: iJe,
+ update: oJe,
+ exit: aJe,
dispose: W9,
requestClose: H9,
- repaintPoster: oJe,
+ repaintPoster: sJe,
isOpen: () => !!M9,
- activeVideo: () => Uqe(),
+ activeVideo: () => Wqe(),
toggleTheater: () => {
M9 && rC(!R9().player.settings().theaterMode);
},
@@ -81197,37 +81287,37 @@ var sJe = {
miniplayerActive: () => f9(),
miniplayerTakesCard: (e) => E9(e),
miniplayerPlay: (e) => {
- qqe(e);
+ Jqe(e);
}
};
-function cJe(e) {
- return k9 = e, Lqe(e, {
+function lJe(e) {
+ return k9 = e, Rqe(e, {
isOpen: () => !!M9,
requestClose: H9
- }), z9(), sJe;
+ }), z9(), cJe;
}
//#endregion
//#region node_modules/sonner/dist/index.mjs
-function lJe(e) {
+function uJe(e) {
if (!e || typeof document > "u") return;
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
}
-var uJe = (e) => {
+var dJe = (e) => {
switch (e) {
- case "success": return pJe;
- case "info": return hJe;
- case "warning": return mJe;
- case "error": return gJe;
+ case "success": return mJe;
+ case "info": return gJe;
+ case "warning": return hJe;
+ case "error": return _Je;
default: return null;
}
-}, dJe = Array(12).fill(0), fJe = ({ visible: e, className: t }) => /*#__PURE__*/ B.createElement("div", {
+}, fJe = Array(12).fill(0), pJe = ({ visible: e, className: t }) => /*#__PURE__*/ B.createElement("div", {
className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
"data-visible": e
-}, /*#__PURE__*/ B.createElement("div", { className: "sonner-spinner" }, dJe.map((e, t) => /*#__PURE__*/ B.createElement("div", {
+}, /*#__PURE__*/ B.createElement("div", { className: "sonner-spinner" }, fJe.map((e, t) => /*#__PURE__*/ B.createElement("div", {
className: "sonner-loading-bar",
key: `spinner-bar-${t}`
-})))), pJe = /*#__PURE__*/ B.createElement("svg", {
+})))), mJe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -81238,7 +81328,7 @@ var uJe = (e) => {
fillRule: "evenodd",
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
clipRule: "evenodd"
-})), mJe = /*#__PURE__*/ B.createElement("svg", {
+})), hJe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "currentColor",
@@ -81249,7 +81339,7 @@ var uJe = (e) => {
fillRule: "evenodd",
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
clipRule: "evenodd"
-})), hJe = /*#__PURE__*/ B.createElement("svg", {
+})), gJe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -81260,7 +81350,7 @@ var uJe = (e) => {
fillRule: "evenodd",
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
clipRule: "evenodd"
-})), gJe = /*#__PURE__*/ B.createElement("svg", {
+})), _Je = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -81271,7 +81361,7 @@ var uJe = (e) => {
fillRule: "evenodd",
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
clipRule: "evenodd"
-})), _Je = /*#__PURE__*/ B.createElement("svg", {
+})), vJe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "12",
height: "12",
@@ -81292,7 +81382,7 @@ var uJe = (e) => {
y1: "6",
x2: "18",
y2: "18"
-})), vJe = () => {
+})), yJe = () => {
let [e, t] = B.useState(document.hidden);
return B.useEffect(() => {
let e = () => {
@@ -81300,7 +81390,7 @@ var uJe = (e) => {
};
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
}, []), e;
-}, yJe = 1, bJe = 100, G9 = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : yJe++, K9 = new class {
+}, bJe = 1, xJe = 100, G9 = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : bJe++, K9 = new class {
constructor() {
this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
let t = this.subscribers.indexOf(e);
@@ -81310,7 +81400,7 @@ var uJe = (e) => {
}, this.addToast = (e) => {
this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
}, this.trimHistory = () => {
- let e = this.toasts.length - bJe;
+ let e = this.toasts.length - xJe;
e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
}, this.create = (e) => {
let { message: t, ...n } = e, r = G9(e), i = this.pendingDismissals.get(r);
@@ -81388,7 +81478,7 @@ var uJe = (e) => {
type: "default",
message: e
});
- else if (SJe(e) && !e.ok) {
+ else if (CJe(e) && !e.ok) {
i = !1;
let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !B.isValidElement(r) ? r : { message: r };
this.create({
@@ -81441,7 +81531,7 @@ var uJe = (e) => {
}), n;
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(), this.pendingDismissals = /* @__PURE__ */ new Map();
}
-}(), xJe = (e, t) => K9.message(e, t), SJe = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", q9 = Object.assign(xJe, {
+}(), SJe = (e, t) => K9.message(e, t), CJe = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", q9 = Object.assign(SJe, {
success: K9.success,
info: K9.info,
warning: K9.warning,
@@ -81455,20 +81545,20 @@ var uJe = (e) => {
getHistory: () => K9.toasts,
getToasts: () => K9.getActiveToasts()
});
-lJe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
+uJe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
function J9(e) {
return e.label !== void 0;
}
-var CJe = 3, wJe = "24px", TJe = "16px", Y9 = 4e3, EJe = 356, DJe = 14, OJe = 45, kJe = 200;
+var wJe = 3, TJe = "24px", EJe = "16px", Y9 = 4e3, DJe = 356, OJe = 14, kJe = 45, AJe = 200;
function X9(...e) {
return e.filter(Boolean).join(" ");
}
-function AJe(e) {
+function jJe(e) {
let [t, n] = e.split("-"), r = [];
return t && r.push(t), n && r.push(n), r;
}
-var jJe = (e) => {
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = B.useState(null), [O, k] = B.useState(null), [A, j] = B.useState(!1), [M, N] = B.useState(!1), [P, ee] = B.useState(!1), [F, I] = B.useState(!1), [te, ne] = B.useState(!1), [re, ie] = B.useState(0), [ae, oe] = B.useState(0), se = B.useRef(n.duration || y || Y9), ce = B.useRef(null), le = B.useRef(null), ue = c === 0, L = c + 1 <= o, de = n.type, fe = de ?? "default", pe = n.dismissible !== !1, me = n.className || "", R = n.descriptionClassName || "", he = B.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = B.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), _e = B.useMemo(() => n.duration || y || Y9, [n.duration, y]), ve = B.useRef(0), ye = B.useRef(0), be = B.useRef(0), xe = B.useRef(null), [Se, Ce] = b.split("-"), we = B.useMemo(() => s.reduce((e, t, n) => n >= he ? e : e + t.height, 0), [s, he]), Te = vJe(), Ee = B.useMemo(() => e.swipeDirections ?? AJe(b), [e.swipeDirections, b]), De = n.invert || t, Oe = de === "loading";
+var MJe = (e) => {
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = B.useState(null), [O, k] = B.useState(null), [A, j] = B.useState(!1), [M, N] = B.useState(!1), [P, ee] = B.useState(!1), [F, I] = B.useState(!1), [te, ne] = B.useState(!1), [re, ie] = B.useState(0), [ae, oe] = B.useState(0), se = B.useRef(n.duration || y || Y9), ce = B.useRef(null), le = B.useRef(null), ue = c === 0, L = c + 1 <= o, de = n.type, fe = de ?? "default", pe = n.dismissible !== !1, me = n.className || "", R = n.descriptionClassName || "", he = B.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = B.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), _e = B.useMemo(() => n.duration || y || Y9, [n.duration, y]), ve = B.useRef(0), ye = B.useRef(0), be = B.useRef(0), xe = B.useRef(null), [Se, Ce] = b.split("-"), we = B.useMemo(() => s.reduce((e, t, n) => n >= he ? e : e + t.height, 0), [s, he]), Te = yJe(), Ee = B.useMemo(() => e.swipeDirections ?? jJe(b), [e.swipeDirections, b]), De = n.invert || t, Oe = de === "loading";
ye.current = B.useMemo(() => he * x + we, [he, we]), B.useEffect(() => {
se.current = _e;
}, [_e]), B.useEffect(() => {
@@ -81509,7 +81599,7 @@ var jJe = (e) => {
let ke = B.useCallback(() => {
N(!0), ie(ye.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
d(n);
- }, kJe);
+ }, AJe);
}, [
n,
d,
@@ -81542,12 +81632,12 @@ var jJe = (e) => {
return w?.loading ? /*#__PURE__*/ B.createElement("div", {
className: X9(C?.loader, n?.classNames?.loader, "sonner-loader"),
"data-visible": de === "loading"
- }, w.loading) : /*#__PURE__*/ B.createElement(fJe, {
+ }, w.loading) : /*#__PURE__*/ B.createElement(pJe, {
className: X9(C?.loader, n?.classNames?.loader),
visible: de === "loading"
});
}
- let je = n.icon || w?.[de] || uJe(de);
+ let je = n.icon || w?.[de] || dJe(de);
return /*#__PURE__*/ B.createElement("li", {
tabIndex: 0,
ref: le,
@@ -81594,7 +81684,7 @@ var jJe = (e) => {
if (F || !pe) return;
xe.current = null;
let e = Number(le.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(le.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - ce.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
- if ((E === "x" ? Ee.includes(e > 0 ? "right" : "left") : Ee.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= OJe || a > .11)) {
+ if ((E === "x" ? Ee.includes(e > 0 ? "right" : "left") : Ee.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= kJe || a > .11)) {
ie(ye.current), n.onDismiss == null || n.onDismiss.call(n, n), k(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), ke(), I(!0);
return;
}
@@ -81635,7 +81725,7 @@ var jJe = (e) => {
ke(), n.onDismiss == null || n.onDismiss.call(n, n);
},
className: X9(C?.closeButton, n?.classNames?.closeButton)
- }, w?.close ?? _Je) : null, (de || n.icon || n.promise) && n.icon !== null && (w?.[de] !== null || n.icon) ? /*#__PURE__*/ B.createElement("div", {
+ }, w?.close ?? vJe) : null, (de || n.icon || n.promise) && n.icon !== null && (w?.[de] !== null || n.icon) ? /*#__PURE__*/ B.createElement("div", {
"data-icon": "",
className: X9(C?.icon, n?.classNames?.icon)
}, de === "loading" ? n.icon || Ae() : n.promise ? Ae() : null, de === "loading" ? null : je) : null, /*#__PURE__*/ B.createElement("div", {
@@ -81670,10 +81760,10 @@ function Z9() {
let e = document.documentElement.getAttribute("dir");
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
}
-function MJe(e, t) {
+function NJe(e, t) {
let n = {};
return [e, t].forEach((e, t) => {
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? TJe : wJe;
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? EJe : TJe;
function o(e) {
[
"top",
@@ -81694,8 +81784,8 @@ function MJe(e, t) {
}) : o(a);
}), n;
}
-var NJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = CJe, toastOptions: g, dir: _ = Z9(), gap: v = DJe, icons: y, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = B.useState([]), w = B.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), T = B.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, D] = B.useState([]), [O, k] = B.useState(!1), [A, j] = B.useState(!1), [M, N] = B.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), P = B.useRef(null), ee = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), F = B.useRef(null), I = B.useRef(!1), te = B.useCallback((e) => {
+var PJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = wJe, toastOptions: g, dir: _ = Z9(), gap: v = OJe, icons: y, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = B.useState([]), w = B.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), T = B.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, D] = B.useState([]), [O, k] = B.useState(!1), [A, j] = B.useState(!1), [M, N] = B.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), P = B.useRef(null), ee = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), F = B.useRef(null), I = B.useRef(!1), te = B.useCallback((e) => {
C((t) => (t.find((t) => t.id === e.id)?.delete || K9.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
}, []);
return B.useEffect(() => K9.subscribe((e) => {
@@ -81781,10 +81871,10 @@ var NJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
"data-x-position": a,
style: {
"--front-toast-height": `${E[0]?.height || 0}px`,
- "--width": `${EJe}px`,
+ "--width": `${DJe}px`,
"--gap": `${v}px`,
...m,
- ...MJe(l, u)
+ ...NJe(l, u)
},
onBlur: (e) => {
I.current && !e.currentTarget.contains(e.relatedTarget) && (I.current = !1, F.current &&= (F.current.focus({ preventScroll: !0 }), null));
@@ -81802,7 +81892,7 @@ var NJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || j(!0);
},
onPointerUp: () => j(!1)
- }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ B.createElement(jJe, {
+ }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ B.createElement(MJe, {
key: n.id,
icons: y,
index: i,
@@ -81836,8 +81926,8 @@ var NJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
"data-toast-glyph": t ? "draw" : "still",
"aria-hidden": "true",
dangerouslySetInnerHTML: { __html: e }
-}), $9 = !1, PJe = (e, t) => {
- $9 || ($9 = !0, (0, MN.createRoot)(e).render(/* @__PURE__ */ (0, V.jsx)(NJe, {
+}), $9 = !1, FJe = (e, t) => {
+ $9 || ($9 = !0, (0, AN.createRoot)(e).render(/* @__PURE__ */ (0, V.jsx)(PJe, {
position: "bottom-right",
closeButton: !0,
gap: 8,
@@ -81858,7 +81948,7 @@ var NJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
error: Q9(t.error, !1)
}
})));
-}, FJe = (e, t) => {
+}, IJe = (e, t) => {
let n = t.alert ? q9.error : q9.success, r = t.action;
n(/* @__PURE__ */ (0, V.jsx)("span", { dangerouslySetInnerHTML: { __html: t.html } }), {
id: e,
@@ -81872,4 +81962,4 @@ var NJe = /*#__PURE__*/ B.forwardRef(function(e, t) {
});
};
//#endregion
-export { kne as configureBatchDock, Mne as configureGlowPicker, Nie as configureImmerse, Wie as configureManageHeader, wKe as configureRouter, Abe as configureSettingsPanel, DKe as configureSidebar, cJe as configureStage, PJe as mountToaster, iGe as prefetchManagedRoute, FJe as showToast };
+export { kne as configureBatchDock, Mne as configureGlowPicker, Nie as configureImmerse, Wie as configureManageHeader, DKe as configureRouter, Pbe as configureSettingsPanel, AKe as configureSidebar, lJe as configureStage, FJe as mountToaster, sGe as prefetchManagedRoute, IJe as showToast };
diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.js
index 32d90fcca..22d313a18 100644
--- a/web/dist/peach-ui.js
+++ b/web/dist/peach-ui.js
@@ -157,15 +157,15 @@ function ge(e) {
}
//#endregion
//#region src/appearance/home-glow.ts
-var S = [
+var _e = [
"spot1",
"spot2",
"spot3"
-], _e = [
+], ve = [
"光晕一",
"光晕二",
"光晕三"
-], ve = "native", C = [
+], ye = "native", S = [
[
"ash",
"灰雾",
@@ -471,7 +471,7 @@ var S = [
"rose"
],
[
- ve,
+ ye,
"玻璃原色",
{
spot1: {
@@ -489,7 +489,7 @@ var S = [
},
"blue"
]
-], w = (e) => e === ve, ye = [...C.map(([e, t]) => [e, t]), ["custom", "自定义"]], be = (e) => (ye.find(([t]) => t === e) || ye[0])[1], xe = (e) => structuredClone((C.find(([t]) => t === e) || C[0])[2]), Se = [
+], C = (e) => e === ye, be = [...S.map(([e, t]) => [e, t]), ["custom", "自定义"]], xe = (e) => (be.find(([t]) => t === e) || be[0])[1], Se = (e) => structuredClone((S.find(([t]) => t === e) || S[0])[2]), Ce = [
["red", "红"],
["orange", "橙"],
["amber", "琥珀"],
@@ -502,7 +502,7 @@ var S = [
["violet", "紫罗兰"],
["fuchsia", "品红"],
["rose", "玫红"]
-], Ce = "blue", we = (e) => Se.some(([t]) => t === e) ? e : Ce, Te = (e) => (C.find(([t]) => t === e) || [])[3] || "blue", Ee = [
+], we = "blue", Te = (e) => Ce.some(([t]) => t === e) ? e : we, Ee = (e) => (S.find(([t]) => t === e) || [])[3] || "blue", De = [
["all", "全部"],
["gray", "灰"],
["red", "红"],
@@ -512,7 +512,7 @@ var S = [
["blue", "蓝"],
["purple", "紫"],
["brown", "棕"]
-], De = [
+], Oe = [
[
"gray",
"云灰",
@@ -908,11 +908,11 @@ var S = [
"霁蓝",
"#6686b8"
]
-], Oe = (e, t, n, r) => Number.isInteger(e) && e >= t && e <= n ? e : r, ke = (e, t) => /^#[0-9a-f]{6}$/i.test(String(e)) ? String(e).toLowerCase() : t, Ae = (e, t) => `rgba(${[
+], ke = (e, t, n, r) => Number.isInteger(e) && e >= t && e <= n ? e : r, Ae = (e, t) => /^#[0-9a-f]{6}$/i.test(String(e)) ? String(e).toLowerCase() : t, je = (e, t) => `rgba(${[
1,
3,
5
-].map((t) => parseInt(e.slice(t, t + 2), 16)).join(",")},${(t / 100).toFixed(2)})`, je = {
+].map((t) => parseInt(e.slice(t, t + 2), 16)).join(",")},${(t / 100).toFixed(2)})`, Me = {
strength: [
0,
100,
@@ -938,7 +938,7 @@ var S = [
100,
50
]
-}, Me = {
+}, Ne = {
on: !0,
preset: "ash",
strength: 100,
@@ -946,39 +946,39 @@ var S = [
speed: 100,
soften: 50,
size: 50,
- ...xe("ash")
+ ...Se("ash")
};
-function Ne(e) {
- let t = e && typeof e == "object" ? e : {}, n = ye.some(([e]) => e === t.preset), r = n ? t.preset : "ash", i = xe(r === "custom" ? "ash" : r), a = {
+function Pe(e) {
+ let t = e && typeof e == "object" ? e : {}, n = be.some(([e]) => e === t.preset), r = n ? t.preset : "ash", i = Se(r === "custom" ? "ash" : r), a = {
on: t.on !== !1,
preset: r
};
- for (let [e, [n, r, i]] of Object.entries(je)) a[e] = Oe(+t[e], n, r, i);
- for (let e of S) {
+ for (let [e, [n, r, i]] of Object.entries(Me)) a[e] = ke(+t[e], n, r, i);
+ for (let e of _e) {
let r = n && t[e] && typeof t[e] == "object" ? t[e] : {}, o = i[e];
a[e] = {
- color: ke(r.color, o.color),
- alpha: Oe(+r.alpha, 0, 100, o.alpha)
+ color: Ae(r.color, o.color),
+ alpha: ke(+r.alpha, 0, 100, o.alpha)
};
}
return a;
}
-var Pe = (e) => `conic-gradient(from -90deg,${e.map((t, n) => `${t} ${(n * 100 / e.length).toFixed(3)}% ${((n + 1) * 100 / e.length).toFixed(3)}%`).join(",")})`, Fe = /* @__PURE__ */ new WeakMap();
-function Ie(e, t) {
+var Fe = (e) => `conic-gradient(from -90deg,${e.map((t, n) => `${t} ${(n * 100 / e.length).toFixed(3)}% ${((n + 1) * 100 / e.length).toFixed(3)}%`).join(",")})`, Ie = /* @__PURE__ */ new WeakMap();
+function Le(e, t) {
if (!e) return;
- let n = Fe.get(e);
- n || (n = /* @__PURE__ */ new Map(), Fe.set(e, n));
- let r = t.on && !w(t.preset), i = (t, r) => {
+ let n = Ie.get(e);
+ n || (n = /* @__PURE__ */ new Map(), Ie.set(e, n));
+ let r = t.on && !C(t.preset), i = (t, r) => {
n.get(t) !== r && (n.set(t, r), e.style.setProperty(t, r));
};
- i("--glow-strength", String(r ? t.strength / 100 : 0)), i("--glow-noise", String(r ? t.noise / 100 : 0)), i("--glow-soften", (.7 + t.soften / 100 * .6).toFixed(3)), i("--glow-size", (.5 + t.size / 100).toFixed(3)), i("--glow-drift-scale", t.speed ? (100 / t.speed).toFixed(3) : "1"), i("--glow-drift-play", t.speed ? "running" : "paused"), S.forEach((e, n) => {
+ i("--glow-strength", String(r ? t.strength / 100 : 0)), i("--glow-noise", String(r ? t.noise / 100 : 0)), i("--glow-soften", (.7 + t.soften / 100 * .6).toFixed(3)), i("--glow-size", (.5 + t.size / 100).toFixed(3)), i("--glow-drift-scale", t.speed ? (100 / t.speed).toFixed(3) : "1"), i("--glow-drift-play", t.speed ? "running" : "paused"), _e.forEach((e, n) => {
let r = t[e];
- i(`--glow-spot-${n + 1}-color`, Ae(r.color, r.alpha));
+ i(`--glow-spot-${n + 1}-color`, je(r.color, r.alpha));
});
}
-function Le(e, t) {
+function Re(e, t) {
if (!e) return;
- let n = !t.on || w(t.preset);
+ let n = !t.on || C(t.preset);
if (e.toggleAttribute("data-glow-native", n), e.style.setProperty("--glow-drift-scale", t.speed ? (100 / t.speed).toFixed(3) : "1"), e.style.setProperty("--glow-drift-play", t.speed ? "running" : "paused"), n) {
e.style.removeProperty("--glass-tint-a"), e.style.removeProperty("--glass-tint-b");
return;
@@ -987,25 +987,25 @@ function Le(e, t) {
}
//#endregion
//#region src/appearance/settings.ts
-var Re = "peach.settings.v1", ze = [
+var ze = "peach.settings.v1", Be = [
"system",
"light",
"dark"
-], Be = [
+], Ve = [
0,
7,
30,
90
-], Ve = [
+], He = [
0,
7,
30,
90
-], He = [
+], Ue = [
"feedHideGroupCompilations",
"feedHideSoloCompilations",
"feedHideExcerpts"
-], Ue = {
+], We = {
batchSize: 60,
defaultSort: "seed",
sortDefaultsVersion: 3,
@@ -1025,48 +1025,48 @@ var Re = "peach.settings.v1", ze = [
theme: "system",
groupCollapse: !0,
sidebarOrder: [...ue],
- homeGlow: Me,
- accent: Ce
-}, T = (e, t, n) => t.includes(e) ? e : n;
-function We(e) {
+ homeGlow: Ne,
+ accent: we
+}, w = (e, t, n) => t.includes(e) ? e : n;
+function Ge(e) {
let t = e && typeof e == "object" ? e : {}, n = {
- ...Ue,
+ ...We,
...t
};
- n.followInitialDays = Be.includes(+n.followInitialDays) ? +n.followInitialDays : 30, delete n.rotateMinutes;
+ n.followInitialDays = Ve.includes(+n.followInitialDays) ? +n.followInitialDays : 30, delete n.rotateMinutes;
let r = !1, i = +n.sortDefaultsVersion || 0;
i < 2 && n.defaultSort === "new" && (n.defaultSort = "seed", r = !0);
let a = _[n.defaultSort];
- return i < 3 && a && (n.defaultSort = a[0], r = !0), n.sortDefaultsVersion = 3, n.batchSize = x(+n.batchSize, 1, 200, 60), n.defaultSort = T(n.defaultSort, h, "seed"), n.hoverDelaySeconds = x(+n.hoverDelaySeconds, 0, 60, 5), n.seekSeconds = x(+n.seekSeconds, 1, 300, 10), delete n.loginDays, n.ambientMode = n.ambientMode !== !1, n.theaterMode = n.theaterMode === !0, n.groupCollapse = n.groupCollapse !== !1, n.detailAutoplay = n.detailAutoplay !== !1, n.miniplayer = n.miniplayer !== !1, n.uiSounds = n.uiSounds !== !1, n.feedAutoScroll = n.feedAutoScroll !== !1, n.feedHideGroupCompilations = n.feedHideGroupCompilations !== !1, n.feedHideSoloCompilations = n.feedHideSoloCompilations === !0, n.feedHideExcerpts = n.feedHideExcerpts !== !1, n.searchHistoryLimit = x(+n.searchHistoryLimit, 0, 50, 10), n.relatedLimit = x(+n.relatedLimit, 0, 60, 20), n.metadataRefreshDays = T(+n.metadataRefreshDays, Ve, 30), Object.assign(n, ne(n)), n.theme = T(n.theme, ze, "system"), n.homeGlow = Ne(n.homeGlow), n.accent = we(n.accent), n.sidebarOrder = me(n.sidebarOrder), {
+ return i < 3 && a && (n.defaultSort = a[0], r = !0), n.sortDefaultsVersion = 3, n.batchSize = x(+n.batchSize, 1, 200, 60), n.defaultSort = w(n.defaultSort, h, "seed"), n.hoverDelaySeconds = x(+n.hoverDelaySeconds, 0, 60, 5), n.seekSeconds = x(+n.seekSeconds, 1, 300, 10), delete n.loginDays, n.ambientMode = n.ambientMode !== !1, n.theaterMode = n.theaterMode === !0, n.groupCollapse = n.groupCollapse !== !1, n.detailAutoplay = n.detailAutoplay !== !1, n.miniplayer = n.miniplayer !== !1, n.uiSounds = n.uiSounds !== !1, n.feedAutoScroll = n.feedAutoScroll !== !1, n.feedHideGroupCompilations = n.feedHideGroupCompilations !== !1, n.feedHideSoloCompilations = n.feedHideSoloCompilations === !0, n.feedHideExcerpts = n.feedHideExcerpts !== !1, n.searchHistoryLimit = x(+n.searchHistoryLimit, 0, 50, 10), n.relatedLimit = x(+n.relatedLimit, 0, 60, 20), n.metadataRefreshDays = w(+n.metadataRefreshDays, He, 30), Object.assign(n, ne(n)), n.theme = w(n.theme, Be, "system"), n.homeGlow = Pe(n.homeGlow), n.accent = Te(n.accent), n.sidebarOrder = me(n.sidebarOrder), {
settings: n,
migrated: r
};
}
-function Ge(e) {
+function Ke(e) {
let t = {};
try {
t = JSON.parse(e.getItem("peach.settings.v1") || "{}");
} catch {}
- return We(t);
+ return Ge(t);
}
-var Ke = null;
-function E() {
- if (Ke) return Ke;
- let { settings: e, migrated: t } = Ge(localStorage);
- return Ke = le(Re, e), t && Ke.save(), Ke;
+var qe = null;
+function T() {
+ if (qe) return qe;
+ let { settings: e, migrated: t } = Ke(localStorage);
+ return qe = le(ze, e), t && qe.save(), qe;
}
-function qe(e, t, n = E()) {
+function Je(e, t, n = T()) {
let r = n.value, i = e && e.followInitialDays;
- Be.includes(i) && (r.followInitialDays = i, n.save());
+ Ve.includes(i) && (r.followInitialDays = i, n.save());
let a = e && e.metadataRefreshDays;
- Ve.includes(a) && a !== r.metadataRefreshDays && (r.metadataRefreshDays = a, n.save());
- for (let t of He) typeof e?.[t] == "boolean" && e[t] !== r[t] && (r[t] = e[t], n.save());
+ He.includes(a) && a !== r.metadataRefreshDays && (r.metadataRefreshDays = a, n.save());
+ for (let t of Ue) typeof e?.[t] == "boolean" && e[t] !== r[t] && (r[t] = e[t], n.save());
let o = e && e.searchHistoryLimit;
- Number.isInteger(o) && o >= 0 && o <= 50 ? o !== r.searchHistoryLimit && (r.searchHistoryLimit = x(o, 0, 50, 10), n.save(), t("searchHistoryLimit")) : e && e.searchHistoryLimit === null && r.searchHistoryLimit !== Ue.searchHistoryLimit && Je(n);
+ Number.isInteger(o) && o >= 0 && o <= 50 ? o !== r.searchHistoryLimit && (r.searchHistoryLimit = x(o, 0, 50, 10), n.save(), t("searchHistoryLimit")) : e && e.searchHistoryLimit === null && r.searchHistoryLimit !== We.searchHistoryLimit && Ye(n);
let s = Array.isArray(e && e.sidebarOrder) ? e.sidebarOrder : null;
!s || !s.length || s.join(",") === r.sidebarOrder.join(",") || (r.sidebarOrder = s, n.save());
}
-function Je(t = E()) {
+function Ye(t = T()) {
return e("/api/settings", {
method: "POST",
body: JSON.stringify({ searchHistoryLimit: t.value.searchHistoryLimit })
@@ -1074,7 +1074,7 @@ function Je(t = E()) {
}
//#endregion
//#region src/appearance/theme.ts
-var Ye = [
+var Xe = [
[
"system",
"跟随系统",
@@ -1090,24 +1090,24 @@ var Ye = [
"深色",
"moon"
]
-], Xe = null, Ze = () => Xe ??= matchMedia("(prefers-color-scheme: dark)");
-function Qe(e = E().value.theme) {
+], Ze = null, Qe = () => Ze ??= matchMedia("(prefers-color-scheme: dark)");
+function $e(e = T().value.theme) {
let t = document.documentElement;
e === "system" ? delete t.dataset.theme : t.dataset.theme = e;
- let n = e === "dark" || e === "system" && Ze().matches;
+ let n = e === "dark" || e === "system" && Qe().matches;
t.classList.toggle("dark", n), document.querySelectorAll("[data-board-theme]").forEach((e) => e.setAttribute("aria-pressed", String(e.dataset.boardTheme === "dark" === n))), document.querySelector(".board-theme-toggle")?.classList.toggle("is-dark", n), document.querySelectorAll("meta[data-theme-color]").forEach((e) => {
e.media = e.dataset.themeColor === "dark" === n ? "all" : "not all";
});
}
-var $e = !1;
-function et() {
- $e || ($e = !0, Ze().addEventListener("change", () => {
- E().value.theme === "system" && Qe();
+var et = !1;
+function tt() {
+ et || (et = !0, Qe().addEventListener("change", () => {
+ T().value.theme === "system" && $e();
}));
}
//#endregion
//#region src/appearance/layout.ts
-var tt = [[
+var nt = [[
"big",
"大图",
"maximize"
@@ -1115,7 +1115,7 @@ var tt = [[
"small",
"小图",
"layout-grid"
-]], nt = [[
+]], rt = [[
"big",
"大图",
"maximize"
@@ -1123,7 +1123,7 @@ var tt = [[
"small",
"小图",
"layout-grid"
-]], rt = [[
+]], it = [[
"fixed",
"固定比例",
"layout-grid"
@@ -1131,113 +1131,113 @@ var tt = [[
"masonry",
"瀑布流",
"columns-2"
-]], it = .75, D = () => E().value, at = (e = D()) => b(e.javLayout), ot = (e = D()) => b(e.homeLayout), st = (e, t = D()) => e ? ot(t) : at(t), ct = nt.map(([e]) => e), lt = rt.map(([e]) => e), ut = (e = D()) => T(e.photoSize, ct, "small"), dt = (e = D()) => T(e.photoLayout, lt, "masonry"), ft = null;
-function pt(e, t = D()) {
+]], at = .75, E = () => T().value, ot = (e = E()) => b(e.javLayout), st = (e = E()) => b(e.homeLayout), ct = (e, t = E()) => e ? st(t) : ot(t), lt = rt.map(([e]) => e), ut = it.map(([e]) => e), dt = (e = E()) => w(e.photoSize, lt, "small"), ft = (e = E()) => w(e.photoLayout, ut, "masonry"), pt = null;
+function mt(e, t = E()) {
let n = {
active: e.active,
- size: st(e.home, t),
+ size: ct(e.home, t),
portrait: e.portrait,
javImage: t.javImage
- }, r = ft;
- return (!r || Object.keys(n).some((e) => n[e] !== r[e])) && (ft = n), ft;
+ }, r = pt;
+ return (!r || Object.keys(n).some((e) => n[e] !== r[e])) && (pt = n), pt;
}
-function mt(e) {
- return e.portrait ? 9 / 16 : e.active && e.size === "big" ? it : 16 / 9;
+function ht(e) {
+ return e.portrait ? 9 / 16 : e.active && e.size === "big" ? at : 16 / 9;
}
-function ht(e, t = E()) {
+function gt(e, t = T()) {
t.value.homeLayout = b(e), t.save();
}
-function gt(e, t = E()) {
+function _t(e, t = T()) {
t.value.javLayout = b(e), t.save();
}
-function _t(e, t = E()) {
+function vt(e, t = T()) {
t.value.homeLayout = t.value.javLayout = b(e), t.save();
}
-function vt(e, t = E()) {
- t.value.photoSize = T(e, ct, "small"), t.save();
+function yt(e, t = T()) {
+ t.value.photoSize = w(e, lt, "small"), t.save();
}
-function yt(e, t = E()) {
- t.value.photoLayout = T(e, lt, "masonry"), t.save();
+function bt(e, t = T()) {
+ t.value.photoLayout = w(e, ut, "masonry"), t.save();
}
//#endregion
//#region src/appearance/density.ts
-var bt = "density", xt = {
+var xt = "density", St = {
big: "336px",
dense: "168px"
-}, St = () => localStorage.getItem(bt) === "dense" ? "dense" : "big";
-function Ct(e, t) {
- let [n, r] = nt;
+}, Ct = () => localStorage.getItem(xt) === "dense" ? "dense" : "big";
+function wt(e, t) {
+ let [n, r] = rt;
e.querySelector("[data-icon-swap]") ? d(e, t === r[0] ? "b" : "a") : e.innerHTML = o(n[2], r[2], t === r[0] ? "b" : "a"), e.setAttribute("aria-label", t === "big" ? "切换为小图" : "切换为大图");
}
-var wt = () => document.querySelector("#density");
-function Tt(e = St()) {
- document.documentElement.style.setProperty("--tile", xt[e]), document.body.dataset.density = e;
- let t = wt();
- t && (t.setAttribute("aria-pressed", String(e === "dense")), t.title = "当前:" + (e === "big" ? "大图" : "密集"), Ct(t, e === "big" ? "big" : "small"));
+var Tt = () => document.querySelector("#density");
+function Et(e = Ct()) {
+ document.documentElement.style.setProperty("--tile", St[e]), document.body.dataset.density = e;
+ let t = Tt();
+ t && (t.setAttribute("aria-pressed", String(e === "dense")), t.title = "当前:" + (e === "big" ? "大图" : "密集"), wt(t, e === "big" ? "big" : "small"));
}
-function Et() {
- let e = St() === "big" ? "dense" : "big";
- localStorage.setItem(bt, e), Tt(e);
+function Dt() {
+ let e = Ct() === "big" ? "dense" : "big";
+ localStorage.setItem(xt, e), Et(e);
}
-function Dt(e) {
- let t = wt();
- t && (t.setAttribute("aria-pressed", String(e === "small")), t.title = "当前:" + (e === "big" ? "大图" : "小图"), Ct(t, e));
+function Ot(e) {
+ let t = Tt();
+ t && (t.setAttribute("aria-pressed", String(e === "small")), t.title = "当前:" + (e === "big" ? "大图" : "小图"), wt(t, e));
}
//#endregion
//#region src/appearance/glow.ts
-function Ot(e = E()) {
- Ie(document.querySelector(".glowlayer"), e.value.homeGlow);
+function kt(e = T()) {
+ Le(document.querySelector(".glowlayer"), e.value.homeGlow);
}
-var kt = 0;
-function At(e = E()) {
- kt ||= requestAnimationFrame(() => {
- kt = 0, Ot(e);
+var At = 0;
+function jt(e = T()) {
+ At ||= requestAnimationFrame(() => {
+ At = 0, kt(e);
});
}
-function jt(e = E()) {
- Le(document.documentElement, e.value.homeGlow);
+function Mt(e = T()) {
+ Re(document.documentElement, e.value.homeGlow);
}
-function Mt(e = E()) {
+function Nt(e = T()) {
document.documentElement.dataset.accent = e.value.accent;
}
-var Nt = (e, t, n) => ({
+var Pt = (e, t, n) => ({
key: e,
label: t,
- native: w(e),
- fill: w(e) ? "" : Pe(n)
+ native: C(e),
+ fill: C(e) ? "" : Fe(n)
});
-function Pt(e) {
- let t = C.map(([e, t, n]) => Nt(e, t, S.map((e) => n[e].color)));
- return e.preset === "custom" && t.push(Nt("custom", "自定义", S.map((t) => e[t].color))), t;
+function Ft(e) {
+ let t = S.map(([e, t, n]) => Pt(e, t, _e.map((e) => n[e].color)));
+ return e.preset === "custom" && t.push(Pt("custom", "自定义", _e.map((t) => e[t].color))), t;
}
-var Ft = Se;
-function It(e, t = E()) {
+var It = Ce;
+function Lt(e, t = T()) {
if (e === "custom") return;
let n = t.value.homeGlow;
- n.preset = e, Object.assign(n, xe(e)), t.value.accent = Te(e), t.save(), At(t), jt(t), Mt(t);
+ n.preset = e, Object.assign(n, Se(e)), t.value.accent = Ee(e), t.save(), jt(t), Mt(t), Nt(t);
}
-function Lt(e, t = E()) {
- t.value.accent = we(e), t.save(), Mt(t);
+function Rt(e, t = T()) {
+ t.value.accent = Te(e), t.save(), Nt(t);
}
-function Rt(e = E()) {
+function zt(e = T()) {
let t = e.value.homeGlow;
- t.preset = Me.preset, Object.assign(t, xe(t.preset)), e.value.accent = Ce, e.save(), At(e), jt(e), Mt(e);
+ t.preset = Ne.preset, Object.assign(t, Se(t.preset)), e.value.accent = we, e.save(), jt(e), Mt(e), Nt(e);
}
-function zt(e, t) {
- e.style.setProperty("--glow-swatch", t.on ? t.spot1.color : "var(--color-accent-500)"), e.toggleAttribute("data-glow-native", t.on && w(t.preset)), e.toggleAttribute("data-glow-off", !t.on);
+function Bt(e, t) {
+ e.style.setProperty("--glow-swatch", t.on ? t.spot1.color : "var(--color-accent-500)"), e.toggleAttribute("data-glow-native", t.on && C(t.preset)), e.toggleAttribute("data-glow-off", !t.on);
}
-function Bt(e, t = E()) {
- return zt(e, t.value.homeGlow), t.subscribe(() => zt(e, t.value.homeGlow));
+function Vt(e, t = T()) {
+ return Bt(e, t.value.homeGlow), t.subscribe(() => Bt(e, t.value.homeGlow));
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/timeoutManager.js
-var Vt = {
+var Ht = {
setTimeout: (e, t) => setTimeout(e, t),
clearTimeout: (e) => clearTimeout(e),
setInterval: (e, t) => setInterval(e, t),
clearInterval: (e) => clearInterval(e)
-}, O = new class {
- #e = Vt;
+}, D = new class {
+ #e = Ht;
setTimeoutProvider(e) {
this.#e = e;
}
@@ -1254,31 +1254,31 @@ var Vt = {
this.#e.clearInterval(e);
}
}();
-function Ht(e) {
+function Ut(e) {
setTimeout(e, 0);
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/utils.js
-var Ut = typeof window > "u" || "Deno" in globalThis;
-function k() {}
-function Wt(e, t) {
+var Wt = typeof window > "u" || "Deno" in globalThis;
+function O() {}
+function Gt(e, t) {
return typeof e == "function" ? e(t) : e;
}
-function Gt(e) {
+function Kt(e) {
return typeof e == "number" && e >= 0 && e !== Infinity;
}
-function Kt(e, t) {
+function qt(e, t) {
return Math.max(e + (t || 0) - Date.now(), 0);
}
-function A(e, t) {
+function k(e, t) {
return typeof e == "function" ? e(t) : e;
}
-function qt(e, t) {
+function Jt(e, t) {
let { type: n = "all", exact: r, fetchStatus: i, predicate: a, queryKey: o, stale: s } = e;
if (o) {
if (r) {
- if (t.queryHash !== Yt(o, t.options)) return !1;
- } else if (!M(t.queryKey, o)) return !1;
+ if (t.queryHash !== Xt(o, t.options)) return !1;
+ } else if (!j(t.queryKey, o)) return !1;
}
if (n !== "all") {
let e = t.isActive();
@@ -1286,105 +1286,105 @@ function qt(e, t) {
}
return !(typeof s == "boolean" && t.isStale() !== s || i && i !== t.state.fetchStatus || a && !a(t));
}
-function Jt(e, t) {
+function Yt(e, t) {
let { exact: n, status: r, predicate: i, mutationKey: a } = e;
if (a) {
if (!t.options.mutationKey) return !1;
if (n) {
- if (j(t.options.mutationKey) !== j(a)) return !1;
- } else if (!M(t.options.mutationKey, a)) return !1;
+ if (A(t.options.mutationKey) !== A(a)) return !1;
+ } else if (!j(t.options.mutationKey, a)) return !1;
}
return !(r && t.state.status !== r || i && !i(t));
}
-function Yt(e, t) {
- return (t?.queryKeyHashFn || j)(e);
+function Xt(e, t) {
+ return (t?.queryKeyHashFn || A)(e);
}
-function j(e) {
- return JSON.stringify(e, (e, t) => $t(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
+function A(e) {
+ return JSON.stringify(e, (e, t) => tn(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
}
-function M(e, t) {
+function j(e, t) {
if (e === t) return !0;
if (typeof e != typeof t) return !1;
if (e && t && typeof e == "object" && typeof t == "object") {
if (Array.isArray(e) && Array.isArray(t)) {
if (t.length > e.length) return !1;
- for (let n = 0; n < t.length; n++) if (!M(e[n], t[n])) return !1;
+ for (let n = 0; n < t.length; n++) if (!j(e[n], t[n])) return !1;
return !0;
}
let n = Object.keys(t);
- for (let r of n) if (!M(e[r], t[r])) return !1;
+ for (let r of n) if (!j(e[r], t[r])) return !1;
return !0;
}
return !1;
}
-var Xt = Object.prototype.hasOwnProperty;
-function Zt(e, t, n = 0) {
+var Zt = Object.prototype.hasOwnProperty;
+function Qt(e, t, n = 0) {
if (e === t) return e;
if (n > 500) return t;
- let r = Qt(e) && Qt(t);
- if (!r && !($t(e) && $t(t))) return t;
+ let r = en(e) && en(t);
+ if (!r && !(tn(e) && tn(t))) return t;
let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
for (let l = 0; l < o; l++) {
let o = r ? l : a[l], u = e[o], d = t[o];
if (u === d) {
- s[o] = u, (r ? l < i : Xt.call(e, o)) && c++;
+ s[o] = u, (r ? l < i : Zt.call(e, o)) && c++;
continue;
}
if (u === null || d === null || typeof u != "object" || typeof d != "object") {
s[o] = d;
continue;
}
- let f = Zt(u, d, n + 1);
+ let f = Qt(u, d, n + 1);
s[o] = f, f === u && c++;
}
return i === o && c === i ? e : s;
}
-function N(e, t) {
+function $t(e, t) {
if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
for (let n in e) if (e[n] !== t[n]) return !1;
return !0;
}
-function Qt(e) {
+function en(e) {
return Array.isArray(e) && e.length === Object.keys(e).length;
}
-function $t(e) {
- if (!en(e)) return !1;
+function tn(e) {
+ if (!nn(e)) return !1;
let t = Object.getPrototypeOf(e), n = t?.constructor;
if (n === void 0) return !0;
if (typeof n != "function") return !1;
let r = n.prototype;
- return !(!en(r) || !r.hasOwnProperty("isPrototypeOf") || t !== Object.prototype);
+ return !(!nn(r) || !r.hasOwnProperty("isPrototypeOf") || t !== Object.prototype);
}
-function en(e) {
+function nn(e) {
return Object.prototype.toString.call(e) === "[object Object]";
}
-function tn(e) {
+function rn(e) {
return new Promise((t) => {
- O.setTimeout(t, e);
+ D.setTimeout(t, e);
});
}
-function nn(e, t, n) {
- return typeof n.structuralSharing == "function" ? n.structuralSharing(e, t) : n.structuralSharing === !1 ? t : Zt(e, t);
+function an(e, t, n) {
+ return typeof n.structuralSharing == "function" ? n.structuralSharing(e, t) : n.structuralSharing === !1 ? t : Qt(e, t);
}
-function rn(e) {
+function on(e) {
return e;
}
-function an(e, t, n = 0) {
+function sn(e, t, n = 0) {
let r = [...e, t];
return n && r.length > n ? r.slice(1) : r;
}
-function on(e, t, n = 0) {
+function cn(e, t, n = 0) {
let r = [t, ...e];
return n && r.length > n ? r.slice(0, -1) : r;
}
-var sn = Symbol();
-function cn(e, t) {
- return !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === sn ? () => Promise.reject(/* @__PURE__ */ Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
+var ln = Symbol();
+function un(e, t) {
+ return !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === ln ? () => Promise.reject(/* @__PURE__ */ Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
}
-function ln(e, t) {
+function dn(e, t) {
return typeof e == "function" ? e(...t) : !!e;
}
-function un(e, t, n) {
+function fn(e, t, n) {
let r = !1, i;
return Object.defineProperty(e, "signal", {
enumerable: !0,
@@ -1393,12 +1393,12 @@ function un(e, t, n) {
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
-var dn = () => Ut, fn = () => dn(), pn = {
- isServer: fn,
+var pn = () => Wt, mn = () => pn(), hn = {
+ isServer: mn,
setIsServer(e) {
- dn = e;
+ pn = e;
}
-}, P = class {
+}, M = class {
constructor() {
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
}
@@ -1412,7 +1412,7 @@ var dn = () => Ut, fn = () => dn(), pn = {
}
onSubscribe() {}
onUnsubscribe() {}
-}, mn = new class extends P {
+}, gn = new class extends M {
#e;
#t;
#n;
@@ -1452,11 +1452,11 @@ var dn = () => Ut, fn = () => dn(), pn = {
}();
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/hydration.js
-function hn(e) {
+function _n(e) {
let t;
- if (e.then((e) => (t = e, e), k)?.catch?.(k), t !== void 0) return { data: t };
+ if (e.then((e) => (t = e, e), O)?.catch?.(O), t !== void 0) return { data: t };
}
-function gn(e) {
+function vn(e) {
return {
mutationKey: e.options.mutationKey,
state: e.state,
@@ -1464,11 +1464,11 @@ function gn(e) {
...e.meta && { meta: e.meta }
};
}
-function _n(e, t, n) {
+function yn(e, t, n) {
let r = e.promise?.then(t).catch((e) => n?.(e) === !1 ? Promise.reject(e) : Promise.reject(/* @__PURE__ */ Error("redacted")));
- return r?.catch(k), r;
+ return r?.catch(O), r;
}
-function vn(e, t, n) {
+function bn(e, t, n) {
return {
dehydratedAt: Date.now(),
state: {
@@ -1477,25 +1477,25 @@ function vn(e, t, n) {
},
queryKey: e.queryKey,
queryHash: e.queryHash,
- ...e.state.status === "pending" && { promise: _n(e, t, n) },
+ ...e.state.status === "pending" && { promise: yn(e, t, n) },
...e.meta && { meta: e.meta },
...e.queryType && { queryType: e.queryType }
};
}
-function yn(e) {
+function xn(e) {
return e.state.isPaused;
}
-function bn(e) {
+function Sn(e) {
return e.state.status === "success";
}
-function xn(e, t = {}) {
- let n = t.shouldDehydrateMutation ?? e.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? yn, r = e.getMutationCache().getAll().flatMap((e) => n(e) ? [gn(e)] : []), i = t.shouldDehydrateQuery ?? e.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? bn, a = t.shouldRedactErrors ?? e.getDefaultOptions().dehydrate?.shouldRedactErrors, o = t.serializeData ?? e.getDefaultOptions().dehydrate?.serializeData;
+function Cn(e, t = {}) {
+ let n = t.shouldDehydrateMutation ?? e.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? xn, r = e.getMutationCache().getAll().flatMap((e) => n(e) ? [vn(e)] : []), i = t.shouldDehydrateQuery ?? e.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? Sn, a = t.shouldRedactErrors ?? e.getDefaultOptions().dehydrate?.shouldRedactErrors, o = t.serializeData ?? e.getDefaultOptions().dehydrate?.serializeData;
return {
mutations: r,
- queries: e.getQueryCache().getAll().flatMap((e) => i(e) ? [vn(e, o, a)] : [])
+ queries: e.getQueryCache().getAll().flatMap((e) => i(e) ? [bn(e, o, a)] : [])
};
}
-function Sn(e, t, n) {
+function wn(e, t, n) {
let r = e.getMutationCache(), i = e.getQueryCache(), a = n?.defaultOptions?.deserializeData ?? e.getDefaultOptions().hydrate?.deserializeData;
t.mutations?.forEach(({ state: t, ...i }) => {
r.build(e, {
@@ -1504,7 +1504,7 @@ function Sn(e, t, n) {
...i
}, t);
}), t.queries?.forEach(({ queryKey: t, state: r, queryHash: o, meta: s, promise: c, dehydratedAt: l, queryType: u }) => {
- let d = c ? hn(c) : void 0, f = r.data === void 0 ? d?.data : r.data, p = f === void 0 ? f : a ? a(f) : f, m = i.get(o), h = m?.state.status === "pending", g = m?.state.fetchStatus === "fetching";
+ let d = c ? _n(c) : void 0, f = r.data === void 0 ? d?.data : r.data, p = f === void 0 ? f : a ? a(f) : f, m = i.get(o), h = m?.state.status === "pending", g = m?.state.fetchStatus === "fetching";
if (m) {
let e = d && l > m.state.dataUpdatedAt;
if (r.dataUpdatedAt > m.state.dataUpdatedAt || e) {
@@ -1533,18 +1533,18 @@ function Sn(e, t, n) {
status: r.status === "pending" && p !== void 0 ? "success" : r.status,
...r.status === "pending" && p !== void 0 && { dataUpdatedAt: l }
});
- c && !d && !h && !g && l > m.state.dataUpdatedAt && m.fetch(void 0, { initialPromise: Promise.resolve(c).then(a) }).catch(k);
+ c && !d && !h && !g && l > m.state.dataUpdatedAt && m.fetch(void 0, { initialPromise: Promise.resolve(c).then(a) }).catch(O);
});
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
-var Cn = Ht;
-function wn() {
+var Tn = Ut;
+function En() {
let e = [], t = 0, n = (e) => {
e();
}, r = (e) => {
e();
- }, i = Cn, a = (r) => {
+ }, i = Tn, a = (r) => {
t ? e.push(r) : i(() => {
n(r);
});
@@ -1586,7 +1586,7 @@ function wn() {
}
};
}
-var F = wn(), I = new class extends P {
+var N = En(), P = new class extends M {
#e = !0;
#t;
#n;
@@ -1620,35 +1620,35 @@ var F = wn(), I = new class extends P {
}();
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/retryer.js
-function Tn(e) {
+function Dn(e) {
return Math.min(1e3 * 2 ** e, 3e4);
}
-function En(e) {
- return (e ?? "online") !== "online" || I.isOnline();
+function On(e) {
+ return (e ?? "online") !== "online" || P.isOnline();
}
-var Dn = class extends Error {
+var F = class extends Error {
constructor(e) {
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
}
};
-function On(e) {
- return e instanceof Dn;
-}
function kn(e) {
+ return e instanceof F;
+}
+function An(e) {
let t = !1, n = 0, r, i = "pending", a, o, s = new Promise((e, t) => {
a = e, o = t;
});
- s.catch(k);
+ s.catch(O);
let c = () => i !== "pending", l = (t) => {
if (!c()) {
- let n = new Dn(t);
+ let n = new F(t);
h(n), e.onCancel?.(n);
}
}, u = () => {
t = !0;
}, d = () => {
t = !1;
- }, f = () => mn.isFocused() && (e.networkMode === "always" || I.isOnline()) && e.canRun(), p = () => En(e.networkMode) && e.canRun(), m = (e) => {
+ }, f = () => gn.isFocused() && (e.networkMode === "always" || P.isOnline()) && e.canRun(), p = () => On(e.networkMode) && e.canRun(), m = (e) => {
c() || (r?.(), i = "resolved", a(e));
}, h = (e) => {
c() || (r?.(), i = "rejected", o(e));
@@ -1668,12 +1668,12 @@ function kn(e) {
}
Promise.resolve(r).then(m).catch((r) => {
if (c()) return;
- let i = e.retry ?? (fn() ? 0 : 3), a = e.retryDelay ?? Tn, o = typeof a == "function" ? a(n, r) : a, s = i === !0 || typeof i == "number" && n < i || typeof i == "function" && i(n, r);
+ let i = e.retry ?? (mn() ? 0 : 3), a = e.retryDelay ?? Dn, o = typeof a == "function" ? a(n, r) : a, s = i === !0 || typeof i == "number" && n < i || typeof i == "function" && i(n, r);
if (t || !s) {
h(r);
return;
}
- n++, e.onFail?.(n, r), tn(o).then(() => f() ? void 0 : g()).then(() => {
+ n++, e.onFail?.(n, r), rn(o).then(() => f() ? void 0 : g()).then(() => {
t ? h(r) : _();
});
});
@@ -1691,34 +1691,34 @@ function kn(e) {
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/removable.js
-var An = class {
+var jn = class {
#e;
destroy() {
this.clearGcTimeout();
}
scheduleGc() {
- this.clearGcTimeout(), Gt(this.gcTime) && (this.#e = O.setTimeout(() => {
+ this.clearGcTimeout(), Kt(this.gcTime) && (this.#e = D.setTimeout(() => {
this.optionalRemove();
}, this.gcTime));
}
updateGcTime(e) {
- this.gcTime = Math.max(this.gcTime || 0, e ?? (fn() ? Infinity : 3e5));
+ this.gcTime = Math.max(this.gcTime || 0, e ?? (mn() ? Infinity : 3e5));
}
clearGcTimeout() {
- this.#e !== void 0 && (O.clearTimeout(this.#e), this.#e = void 0);
+ this.#e !== void 0 && (D.clearTimeout(this.#e), this.#e = void 0);
}
};
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
-function jn(e) {
+function Mn(e) {
return { onFetch: (t, n) => {
let r = t.options, i = t.fetchOptions?.meta?.fetchMore?.direction, a = t.state.data?.pages || [], o = t.state.data?.pageParams || [], s = {
pages: [],
pageParams: []
}, c = 0, l = async () => {
let n = !1, l = (e) => {
- un(e, () => t.signal, () => n = !0);
- }, u = cn(t.options, t.fetchOptions), d = async (e, r, i) => {
+ fn(e, () => t.signal, () => n = !0);
+ }, u = un(t.options, t.fetchOptions), d = async (e, r, i) => {
if (n) return Promise.reject(t.signal.reason);
if (r == null && e.pages.length) return Promise.resolve(e);
let a = (() => {
@@ -1730,14 +1730,14 @@ function jn(e) {
meta: t.options.meta
};
return l(e), e;
- })(), o = await u(a), { maxPages: s } = t.options, c = i ? on : an;
+ })(), o = await u(a), { maxPages: s } = t.options, c = i ? cn : sn;
return {
pages: c(e.pages, o, s),
pageParams: c(e.pageParams, r, s)
};
};
if (i && a.length) {
- let e = i === "backward", t = e ? Nn : Mn, n = {
+ let e = i === "backward", t = e ? Pn : Nn, n = {
pages: a,
pageParams: o
};
@@ -1745,7 +1745,7 @@ function jn(e) {
} else {
let t = e ?? a.length;
do {
- let e = c === 0 ? o[0] ?? r.initialPageParam : Mn(r, s);
+ let e = c === 0 ? o[0] ?? r.initialPageParam : Nn(r, s);
if (c > 0 && e == null) break;
s = await d(s, e), c++;
} while (c < t);
@@ -1760,22 +1760,22 @@ function jn(e) {
}, n) : l;
} };
}
-function Mn(e, { pages: t, pageParams: n }) {
+function Nn(e, { pages: t, pageParams: n }) {
let r = t.length - 1;
return t.length > 0 ? e.getNextPageParam(t[r], t, n[r], n) : void 0;
}
-function Nn(e, { pages: t, pageParams: n }) {
+function Pn(e, { pages: t, pageParams: n }) {
return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, n[0], n) : void 0;
}
-function Pn(e, t) {
- return t ? Mn(e, t) != null : !1;
-}
function Fn(e, t) {
- return !t || !e.getPreviousPageParam ? !1 : Nn(e, t) != null;
+ return t ? Nn(e, t) != null : !1;
+}
+function In(e, t) {
+ return !t || !e.getPreviousPageParam ? !1 : Pn(e, t) != null;
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/query.js
-var In = class extends An {
+var Ln = class extends jn {
#e;
#t;
#n;
@@ -1785,7 +1785,7 @@ var In = class extends An {
#o;
#s;
constructor(e) {
- super(), this.#s = !1, this.#o = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#i = e.client, this.#r = this.#i.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = zn(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
+ super(), this.#s = !1, this.#o = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#i = e.client, this.#r = this.#i.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = Bn(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
}
get meta() {
return this.options.meta;
@@ -1801,15 +1801,15 @@ var In = class extends An {
...this.#o,
...e
}, e?._type && (this.#e = e._type), this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
- let e = zn(this.options);
- e.data !== void 0 && (this.setState(Rn(e.data, e.dataUpdatedAt)), this.#t = e);
+ let e = Bn(this.options);
+ e.data !== void 0 && (this.setState(zn(e.data, e.dataUpdatedAt)), this.#t = e);
}
}
optionalRemove() {
!this.observers.length && this.state.fetchStatus === "idle" && this.#r.remove(this);
}
setData(e, t) {
- let n = nn(this.state.data, e, this.options);
+ let n = an(this.state.data, e, this.options);
return this.#c({
data: n,
type: "success",
@@ -1825,7 +1825,7 @@ var In = class extends An {
}
cancel(e) {
let t = this.#a?.promise;
- return this.#a?.cancel(e), t ? t.then(k).catch(k) : Promise.resolve();
+ return this.#a?.cancel(e), t ? t.then(O).catch(O) : Promise.resolve();
}
destroy() {
super.destroy(), this.cancel({ silent: !0 });
@@ -1837,22 +1837,22 @@ var In = class extends An {
this.destroy(), this.setState(this.resetState);
}
isActive() {
- return this.observers.some((e) => A(e.options.enabled, this) !== !1);
+ return this.observers.some((e) => k(e.options.enabled, this) !== !1);
}
isDisabled() {
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === sn || !this.isFetched();
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ln || !this.isFetched();
}
isFetched() {
return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
}
isStatic() {
- return this.getObserversCount() > 0 && this.observers.some((e) => A(e.options.staleTime, this) === "static");
+ return this.getObserversCount() > 0 && this.observers.some((e) => k(e.options.staleTime, this) === "static");
}
isStale() {
return this.getObserversCount() > 0 ? this.observers.some((e) => e.getCurrentResult().isStale) : this.state.data === void 0 || this.state.isInvalidated;
}
isStaleByTime(e = 0) {
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !Kt(this.state.dataUpdatedAt, e);
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !qt(this.state.dataUpdatedAt, e);
}
onFocus() {
this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#a?.continue();
@@ -1896,7 +1896,7 @@ var In = class extends An {
get: () => (this.#s = !0, n.signal)
});
}, i = () => {
- let e = cn(this.options, t), n = (() => {
+ let e = un(this.options, t), n = (() => {
let e = {
client: this.#i,
queryKey: this.queryKey,
@@ -1916,15 +1916,15 @@ var In = class extends An {
};
return r(e), e;
})();
- (this.#e === "infinite" ? jn(this.options.pages) : this.options.behavior)?.onFetch(a, this), this.#n = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#c({
+ (this.#e === "infinite" ? Mn(this.options.pages) : this.options.behavior)?.onFetch(a, this), this.#n = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#c({
type: "fetch",
meta: a.fetchOptions?.meta
});
- let o = this.#a = kn({
+ let o = this.#a = An({
initialPromise: t?.initialPromise,
fn: a.fetchFn,
onCancel: (e) => {
- e instanceof Dn && e.revert && this.setState({
+ e instanceof F && e.revert && this.setState({
...this.#n,
fetchStatus: "idle"
}), n.abort();
@@ -1952,7 +1952,7 @@ var In = class extends An {
if (e === void 0) throw Error(`${this.queryHash} data is undefined`);
return this.setData(e), this.#r.config.onSuccess?.(e, this), this.#r.config.onSettled?.(e, this.state.error, this), e;
} catch (e) {
- if (e instanceof Dn) {
+ if (e instanceof F) {
if (e.silent) return this.#a.promise;
if (e.revert) {
if (this.state.data === void 0) throw e;
@@ -1985,13 +1985,13 @@ var In = class extends An {
};
case "fetch": return {
...t,
- ...Ln(t.data, this.options),
+ ...Rn(t.data, this.options),
fetchMeta: e.meta ?? null
};
case "success":
let n = {
...t,
- ...Rn(e.data, e.dataUpdatedAt),
+ ...zn(e.data, e.dataUpdatedAt),
dataUpdateCount: t.dataUpdateCount + 1,
...!e.manual && {
fetchStatus: "idle",
@@ -2023,7 +2023,7 @@ var In = class extends An {
};
}
};
- this.state = t(this.state), F.batch(() => {
+ this.state = t(this.state), N.batch(() => {
this.observers.slice().forEach((e) => {
e.onQueryUpdate();
}), this.#r.notify({
@@ -2034,18 +2034,18 @@ var In = class extends An {
});
}
};
-function Ln(e, t) {
+function Rn(e, t) {
return {
fetchFailureCount: 0,
fetchFailureReason: null,
- fetchStatus: En(t.networkMode) ? "fetching" : "paused",
+ fetchStatus: On(t.networkMode) ? "fetching" : "paused",
...e === void 0 && {
error: null,
status: "pending"
}
};
}
-function Rn(e, t) {
+function zn(e, t) {
return {
data: e,
dataUpdatedAt: t ?? Date.now(),
@@ -2054,7 +2054,7 @@ function Rn(e, t) {
status: "success"
};
}
-function zn(e) {
+function Bn(e) {
let t = typeof e.initialData == "function" ? e.initialData() : e.initialData, n = t !== void 0, r = n ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
return {
data: t,
@@ -2073,7 +2073,7 @@ function zn(e) {
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
-var Bn = class extends P {
+var Vn = class extends M {
#e;
#t = void 0;
#n = void 0;
@@ -2095,36 +2095,36 @@ var Bn = class extends P {
this.refetch = this.refetch.bind(this);
}
onSubscribe() {
- this.listeners.size === 1 && (this.#t.addObserver(this), Hn(this.#t, this.options) ? this.#m() : this.updateResult(), this.#y());
+ this.listeners.size === 1 && (this.#t.addObserver(this), Un(this.#t, this.options) ? this.#m() : this.updateResult(), this.#y());
}
onUnsubscribe() {
this.hasListeners() || this.destroy();
}
shouldFetchOnReconnect() {
- return Un(this.#t, this.options, this.options.refetchOnReconnect);
+ return Wn(this.#t, this.options, this.options.refetchOnReconnect);
}
shouldFetchOnWindowFocus() {
- return Un(this.#t, this.options, this.options.refetchOnWindowFocus);
+ return Wn(this.#t, this.options, this.options.refetchOnWindowFocus);
}
destroy() {
this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
}
setOptions(e) {
let t = this.options, n = this.#t;
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof A(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
- this.#S(), this.#t.setOptions(this.options), t._defaulted && !N(this.options, t) && this.#e.getQueryCache().notify({
+ if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof k(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
+ this.#S(), this.#t.setOptions(this.options), t._defaulted && !$t(this.options, t) && this.#e.getQueryCache().notify({
type: "observerOptionsUpdated",
query: this.#t,
observer: this
});
let r = this.hasListeners();
- r && Wn(this.#t, n, this.options, t) && this.#m(), this.updateResult(), r && (this.#t !== n || A(this.options.enabled, this.#t) !== A(t.enabled, this.#t) || A(this.options.staleTime, this.#t) !== A(t.staleTime, this.#t)) && this.#g();
+ r && Gn(this.#t, n, this.options, t) && this.#m(), this.updateResult(), r && (this.#t !== n || k(this.options.enabled, this.#t) !== k(t.enabled, this.#t) || k(this.options.staleTime, this.#t) !== k(t.staleTime, this.#t)) && this.#g();
let i = this.#_();
- r && (this.#t !== n || A(this.options.enabled, this.#t) !== A(t.enabled, this.#t) || i !== this.#f) && this.#v(i);
+ r && (this.#t !== n || k(this.options.enabled, this.#t) !== k(t.enabled, this.#t) || i !== this.#f) && this.#v(i);
}
getOptimisticResult(e) {
let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
- return N(this.getCurrentResult(), n) || (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
+ return $t(this.getCurrentResult(), n) || (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
}
getCurrentResult() {
return this.#r;
@@ -2163,44 +2163,44 @@ var Bn = class extends P {
#m(e) {
this.#S();
let t = this.#t.fetch(this.options, e);
- return e?.throwOnError || (t = t.catch(k)), t;
+ return e?.throwOnError || (t = t.catch(O)), t;
}
#h(e) {
- return !fn() && A(this.options.enabled, this.#t) !== !1 && Gt(e);
+ return !mn() && k(this.options.enabled, this.#t) !== !1 && Kt(e);
}
#g() {
this.#b();
- let e = A(this.options.staleTime, this.#t);
+ let e = k(this.options.staleTime, this.#t);
if (this.#r.isStale || !this.#h(e)) return;
- let t = Kt(this.#r.dataUpdatedAt, e) + 1;
- this.#u = O.setTimeout(() => {
+ let t = qt(this.#r.dataUpdatedAt, e) + 1;
+ this.#u = D.setTimeout(() => {
this.#r.isStale || this.updateResult();
}, t);
}
#_() {
- return A(this.options.refetchInterval, this.#t) ?? !1;
+ return k(this.options.refetchInterval, this.#t) ?? !1;
}
#v(e) {
- this.#x(), this.#f = e, !(this.#f === 0 || !this.#h(this.#f)) && (this.#d = O.setInterval(() => {
- (this.options.refetchIntervalInBackground || mn.isFocused()) && this.#m();
+ this.#x(), this.#f = e, !(this.#f === 0 || !this.#h(this.#f)) && (this.#d = D.setInterval(() => {
+ (this.options.refetchIntervalInBackground || gn.isFocused()) && this.#m();
}, this.#f));
}
#y() {
this.#g(), this.#v(this.#_());
}
#b() {
- this.#u !== void 0 && (O.clearTimeout(this.#u), this.#u = void 0);
+ this.#u !== void 0 && (D.clearTimeout(this.#u), this.#u = void 0);
}
#x() {
- this.#d !== void 0 && (O.clearInterval(this.#d), this.#d = void 0);
+ this.#d !== void 0 && (D.clearInterval(this.#d), this.#d = void 0);
}
createResult(e, t) {
let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
if (t._optimisticResults) {
- let i = this.hasListeners(), a = !i && Hn(e, t), o = i && Wn(e, n, t, r);
+ let i = this.hasListeners(), a = !i && Un(e, t), o = i && Gn(e, n, t, r);
(a || o) && (l = {
...l,
- ...Ln(c.data, e.options)
+ ...Rn(c.data, e.options)
}), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
}
let { error: f, errorUpdatedAt: p, status: m } = l;
@@ -2208,12 +2208,12 @@ var Bn = class extends P {
let h = !1;
if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
let e;
- i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#l?.state.data, this.#l) : t.placeholderData, e !== void 0 && (m = "success", d = nn(i?.data, e, t), u = !0);
+ i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#l?.state.data, this.#l) : t.placeholderData, e !== void 0 && (m = "success", d = an(i?.data, e, t), u = !0);
}
if (t.select && d !== void 0 && !h) {
if (i && d === a?.data && t.select === this.#s) d = this.#c;
else try {
- this.#s = t.select, d = t.select(d), d = nn(i?.data, d, t), this.#c = d, this.#o = null;
+ this.#s = t.select, d = t.select(d), d = an(i?.data, d, t), this.#c = d, this.#o = null;
} catch (e) {
this.#o = e;
}
@@ -2243,14 +2243,14 @@ var Bn = class extends P {
isPaused: l.fetchStatus === "paused",
isPlaceholderData: u,
isRefetchError: v && ee,
- isStale: Gn(e, t),
+ isStale: Kn(e, t),
refetch: this.refetch,
- isEnabled: A(t.enabled, e) !== !1
+ isEnabled: k(t.enabled, e) !== !1
};
}
updateResult() {
let e = this.#r, t = this.createResult(this.#t, this.options);
- if (this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#l = this.#t), N(t, e)) return;
+ if (this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#l = this.#t), $t(t, e)) return;
this.#r = t;
let n = (() => {
if (!e) return !0;
@@ -2262,7 +2262,7 @@ var Bn = class extends P {
return this.#r[n] !== e[n] && r.has(n);
});
})();
- F.batch(() => {
+ N.batch(() => {
n && this.listeners.forEach((e) => {
e(this.#r);
}), this.#e.getQueryCache().notify({
@@ -2281,28 +2281,28 @@ var Bn = class extends P {
this.updateResult(), this.hasListeners() && this.#y();
}
};
-function Vn(e, t) {
- return A(t.enabled, e) !== !1 && e.state.data === void 0 && (e.state.status !== "error" || A(t.retryOnMount, e) !== !1);
-}
function Hn(e, t) {
- return Vn(e, t) || e.state.data !== void 0 && Un(e, t, t.refetchOnMount);
+ return k(t.enabled, e) !== !1 && e.state.data === void 0 && (e.state.status !== "error" || k(t.retryOnMount, e) !== !1);
+}
+function Un(e, t) {
+ return Hn(e, t) || e.state.data !== void 0 && Wn(e, t, t.refetchOnMount);
}
-function Un(e, t, n) {
- if (A(t.enabled, e) !== !1 && A(t.staleTime, e) !== "static") {
- let r = A(n, e);
- return r === "always" || r !== !1 && Gn(e, t);
+function Wn(e, t, n) {
+ if (k(t.enabled, e) !== !1 && k(t.staleTime, e) !== "static") {
+ let r = k(n, e);
+ return r === "always" || r !== !1 && Kn(e, t);
}
return !1;
}
-function Wn(e, t, n, r) {
- return (e !== t || A(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && Gn(e, n);
+function Gn(e, t, n, r) {
+ return (e !== t || k(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && Kn(e, n);
}
-function Gn(e, t) {
- return A(t.enabled, e) !== !1 && e.isStaleByTime(A(t.staleTime, e));
+function Kn(e, t) {
+ return k(t.enabled, e) !== !1 && e.isStaleByTime(k(t.staleTime, e));
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
-var Kn = class extends Bn {
+var qn = class extends Vn {
constructor(e, t) {
super(e, t);
}
@@ -2333,8 +2333,8 @@ var Kn = class extends Bn {
...r,
fetchNextPage: this.fetchNextPage,
fetchPreviousPage: this.fetchPreviousPage,
- hasNextPage: Pn(t, n.data),
- hasPreviousPage: Fn(t, n.data),
+ hasNextPage: Fn(t, n.data),
+ hasPreviousPage: In(t, n.data),
isFetchNextPageError: l,
isFetchingNextPage: u,
isFetchPreviousPageError: d,
@@ -2343,13 +2343,13 @@ var Kn = class extends Bn {
isRefetching: a && !u && !f
};
}
-}, qn = class extends An {
+}, Jn = class extends jn {
#e;
#t;
#n;
#r;
constructor(e) {
- super(), this.#e = e.client, this.mutationId = e.mutationId, this.#n = e.mutationCache, this.#t = [], this.state = e.state || Jn(), this.setOptions(e.options), this.scheduleGc();
+ super(), this.#e = e.client, this.mutationId = e.mutationId, this.#n = e.mutationCache, this.#t = [], this.state = e.state || Yn(), this.setOptions(e.options), this.scheduleGc();
}
setOptions(e) {
this.options = e, this.updateGcTime(this.options.gcTime);
@@ -2384,7 +2384,7 @@ var Kn = class extends Bn {
client: this.#e,
meta: this.options.meta,
mutationKey: this.options.mutationKey
- }, r = this.#r = kn({
+ }, r = this.#r = An({
fn: () => this.options.mutationFn ? this.options.mutationFn(e, n) : Promise.reject(/* @__PURE__ */ Error("No mutationFn found")),
onFail: (e, t) => {
this.#i({
@@ -2500,7 +2500,7 @@ var Kn = class extends Bn {
};
}
};
- this.state = t(this.state), F.batch(() => {
+ this.state = t(this.state), N.batch(() => {
this.#t.forEach((t) => {
t.onMutationUpdate(e);
}), this.#n.notify({
@@ -2511,7 +2511,7 @@ var Kn = class extends Bn {
});
}
};
-function Jn() {
+function Yn() {
return {
context: void 0,
data: void 0,
@@ -2526,7 +2526,7 @@ function Jn() {
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/mutationCache.js
-var Yn = class extends P {
+var Xn = class extends M {
#e;
#t;
#n;
@@ -2534,7 +2534,7 @@ var Yn = class extends P {
super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#n = 0;
}
build(e, t, n) {
- let r = new qn({
+ let r = new Jn({
client: e,
mutationCache: this,
mutationId: ++this.#n,
@@ -2545,7 +2545,7 @@ var Yn = class extends P {
}
add(e) {
this.#e.add(e);
- let t = Xn(e);
+ let t = Zn(e);
if (typeof t == "string") {
let n = this.#t.get(t);
n ? n.push(e) : this.#t.set(t, [e]);
@@ -2557,7 +2557,7 @@ var Yn = class extends P {
}
remove(e) {
if (this.#e.delete(e)) {
- let t = Xn(e);
+ let t = Zn(e);
if (typeof t == "string") {
let n = this.#t.get(t);
if (n) {
@@ -2574,7 +2574,7 @@ var Yn = class extends P {
});
}
canRun(e) {
- let t = Xn(e);
+ let t = Zn(e);
if (typeof t == "string") {
let n = this.#t.get(t)?.find((e) => e.state.status === "pending");
return !n || n === e;
@@ -2582,11 +2582,11 @@ var Yn = class extends P {
return !0;
}
runNext(e) {
- let t = Xn(e);
+ let t = Zn(e);
return typeof t == "string" ? (this.#t.get(t)?.find((t) => t !== e && t.state.isPaused))?.continue() ?? Promise.resolve() : Promise.resolve();
}
clear() {
- F.batch(() => {
+ N.batch(() => {
this.#e.forEach((e) => {
this.notify({
type: "removed",
@@ -2603,13 +2603,13 @@ var Yn = class extends P {
exact: !0,
...e
};
- return this.getAll().find((e) => Jt(t, e));
+ return this.getAll().find((e) => Yt(t, e));
}
findAll(e = {}) {
- return this.getAll().filter((t) => Jt(e, t));
+ return this.getAll().filter((t) => Yt(e, t));
}
notify(e) {
- F.batch(() => {
+ N.batch(() => {
this.listeners.forEach((t) => {
t(e);
});
@@ -2617,15 +2617,15 @@ var Yn = class extends P {
}
resumePausedMutations() {
let e = this.getAll().filter((e) => e.state.isPaused);
- return F.batch(() => Promise.all(e.map((e) => e.continue().catch(k))));
+ return N.batch(() => Promise.all(e.map((e) => e.continue().catch(O))));
}
};
-function Xn(e) {
+function Zn(e) {
return e.options.scope?.id;
}
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
-var Zn = class extends P {
+var Qn = class extends M {
#e;
#t = void 0;
#n;
@@ -2638,11 +2638,11 @@ var Zn = class extends P {
}
setOptions(e) {
let t = this.options;
- this.options = this.#e.defaultMutationOptions(e), N(this.options, t) || this.#e.getMutationCache().notify({
+ this.options = this.#e.defaultMutationOptions(e), $t(this.options, t) || this.#e.getMutationCache().notify({
type: "observerOptionsUpdated",
mutation: this.#n,
observer: this
- }), t?.mutationKey && this.options.mutationKey && j(t.mutationKey) !== j(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
+ }), t?.mutationKey && this.options.mutationKey && A(t.mutationKey) !== A(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
}
onSubscribe() {
this.listeners.size === 1 && this.#n && (this.#n.addObserver(this), this.#i());
@@ -2663,7 +2663,7 @@ var Zn = class extends P {
return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
}
#i() {
- let e = this.#n?.state ?? Jn();
+ let e = this.#n?.state ?? Yn();
this.#t = {
...e,
isPending: e.status === "pending",
@@ -2675,7 +2675,7 @@ var Zn = class extends P {
};
}
#a(e) {
- F.batch(() => {
+ N.batch(() => {
if (this.#r && this.hasListeners()) {
let t = this.#t.variables, n = this.#t.context, r = {
client: this.#e,
@@ -2714,11 +2714,11 @@ var Zn = class extends P {
};
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/queriesObserver.js
-function Qn(e, t) {
+function $n(e, t) {
let n = new Set(t);
return e.filter((e) => !n.has(e));
}
-var $n = class extends P {
+var er = class extends M {
#e;
#t;
#n;
@@ -2748,16 +2748,16 @@ var $n = class extends P {
});
}
setQueries(e, t) {
- this.#n = e, this.#r = t, F.batch(() => {
+ this.#n = e, this.#r = t, N.batch(() => {
let e = this.#i, t = this.#p(this.#n);
t.forEach((e) => e.observer.setOptions(e.defaultedQueryOptions));
let n = t.map((e) => e.observer), r = n.map((e) => e.getCurrentResult()), i = e.length !== n.length, a = n.some((t, n) => t !== e[n]), o = i || a, s = o ? !0 : r.some((e, t) => {
let n = this.#t[t];
- return !n || !N(e, n);
+ return !n || !$t(e, n);
});
- !o && !s || (o && (this.#l = t, this.#i = n), this.#t = r, this.hasListeners() && (o && (Qn(e, n).forEach((e) => {
+ !o && !s || (o && (this.#l = t, this.#i = n), this.#t = r, this.hasListeners() && (o && ($n(e, n).forEach((e) => {
e.destroy();
- }), Qn(n, e).forEach((e) => {
+ }), $n(n, e).forEach((e) => {
e.subscribe((t) => {
this.#m(e, t);
});
@@ -2795,7 +2795,7 @@ var $n = class extends P {
#d(e, t, n) {
if (t) {
let r = this.#c, i = n !== void 0 && r !== void 0 && (r.length !== n.length || n.some((e, t) => e !== r[t]));
- return (this.#t !== this.#s || i || t !== this.#o) && (this.#o = t, this.#s = this.#t, n !== void 0 && (this.#c = n), this.#a = Zt(this.#a, t(e))), this.#a;
+ return (this.#t !== this.#s || i || t !== this.#o) && (this.#o = t, this.#s = this.#t, n !== void 0 && (this.#c = n), this.#a = Qt(this.#a, t(e))), this.#a;
}
return e;
}
@@ -2812,7 +2812,7 @@ var $n = class extends P {
});
let n = [];
return e.forEach((e) => {
- let r = this.#e.defaultQueryOptions(e), i = t.get(r.queryHash)?.shift() ?? new Bn(this.#e, r);
+ let r = this.#e.defaultQueryOptions(e), i = t.get(r.queryHash)?.shift() ?? new Vn(this.#e, r);
n.push({
defaultedQueryOptions: r,
observer: i
@@ -2826,21 +2826,21 @@ var $n = class extends P {
#h() {
if (this.hasListeners()) {
let e = this.#f(), t = this.#a, n = e ? t : this.#d(this.#u(this.#t, this.#l), this.#r?.combine);
- (e || t !== n) && F.batch(() => {
+ (e || t !== n) && N.batch(() => {
this.listeners.forEach((e) => {
e(this.#t);
});
});
}
}
-}, er = class extends P {
+}, tr = class extends M {
#e;
constructor(e = {}) {
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
}
build(e, t, n) {
- let r = t.queryKey, i = t.queryHash ?? Yt(r, t), a = this.get(i);
- return a || (a = new In({
+ let r = t.queryKey, i = t.queryHash ?? Xt(r, t), a = this.get(i);
+ return a || (a = new Ln({
client: e,
queryKey: r,
queryHash: i,
@@ -2862,7 +2862,7 @@ var $n = class extends P {
}));
}
clear() {
- F.batch(() => {
+ N.batch(() => {
this.getAll().forEach((e) => {
this.remove(e);
});
@@ -2879,34 +2879,34 @@ var $n = class extends P {
exact: !0,
...e
};
- return this.getAll().find((e) => qt(t, e));
+ return this.getAll().find((e) => Jt(t, e));
}
findAll(e = {}) {
let t = this.getAll();
- return Object.keys(e).length > 0 ? t.filter((t) => qt(e, t)) : t;
+ return Object.keys(e).length > 0 ? t.filter((t) => Jt(e, t)) : t;
}
notify(e) {
- F.batch(() => {
+ N.batch(() => {
this.listeners.forEach((t) => {
t(e);
});
});
}
onFocus() {
- F.batch(() => {
+ N.batch(() => {
this.getAll().forEach((e) => {
e.onFocus();
});
});
}
onOnline() {
- F.batch(() => {
+ N.batch(() => {
this.getAll().forEach((e) => {
e.onOnline();
});
});
}
-}, tr = class {
+}, nr = class {
#e;
#t;
#n;
@@ -2916,12 +2916,12 @@ var $n = class extends P {
#o;
#s;
constructor(e = {}) {
- this.#e = e.queryCache || new er(), this.#t = e.mutationCache || new Yn(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#a = 0;
+ this.#e = e.queryCache || new tr(), this.#t = e.mutationCache || new Xn(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#a = 0;
}
mount() {
- this.#a++, this.#a === 1 && (this.#o = mn.subscribe(async (e) => {
+ this.#a++, this.#a === 1 && (this.#o = gn.subscribe(async (e) => {
e && (await this.resumePausedMutations(), this.#e.onFocus());
- }), this.#s = I.subscribe(async (e) => {
+ }), this.#s = P.subscribe(async (e) => {
e && (await this.resumePausedMutations(), this.#e.onOnline());
}));
}
@@ -2946,20 +2946,20 @@ var $n = class extends P {
}
ensureQueryData(e) {
let t = this.defaultQueryOptions(e), n = this.#e.build(this, t), r = n.state.data;
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(A(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
+ return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(k(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
}
getQueriesData(e) {
return this.#e.findAll(e).map(({ queryKey: e, state: t }) => [e, t.data]);
}
setQueryData(e, t, n) {
- let r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(r.queryHash)?.state.data, a = Wt(t, i);
+ let r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(r.queryHash)?.state.data, a = Gt(t, i);
if (a !== void 0) return this.#e.build(this, r).setData(a, {
...n,
manual: !0
});
}
setQueriesData(e, t, n) {
- return F.batch(() => this.#e.findAll(e).map(({ queryKey: e }) => [e, this.setQueryData(e, t, n)]));
+ return N.batch(() => this.#e.findAll(e).map(({ queryKey: e }) => [e, this.setQueryData(e, t, n)]));
}
getQueryState(e) {
let t = this.defaultQueryOptions({ queryKey: e });
@@ -2967,7 +2967,7 @@ var $n = class extends P {
}
removeQueries(e) {
let t = this.#e;
- F.batch(() => {
+ N.batch(() => {
t.findAll(e).forEach((e) => {
t.remove(e);
});
@@ -2975,7 +2975,7 @@ var $n = class extends P {
}
resetQueries(e, t) {
let n = this.#e;
- return F.batch(() => {
+ return N.batch(() => {
let r = n.findAll(e), i = new Set(r);
return r.forEach((e) => {
e.reset();
@@ -2989,11 +2989,11 @@ var $n = class extends P {
let n = {
revert: !0,
...t
- }, r = F.batch(() => this.#e.findAll(e).map((e) => e.cancel(n)));
- return Promise.all(r).then(k).catch(k);
+ }, r = N.batch(() => this.#e.findAll(e).map((e) => e.cancel(n)));
+ return Promise.all(r).then(O).catch(O);
}
invalidateQueries(e, t = {}) {
- return F.batch(() => (this.#e.findAll(e).forEach((e) => {
+ return N.batch(() => (this.#e.findAll(e).forEach((e) => {
e.invalidate();
}), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries({
...e,
@@ -3004,26 +3004,26 @@ var $n = class extends P {
let n = {
...t,
cancelRefetch: t.cancelRefetch ?? !0
- }, r = F.batch(() => this.#e.findAll(e).filter((e) => !e.isDisabled() && !e.isStatic()).map((e) => {
+ }, r = N.batch(() => this.#e.findAll(e).filter((e) => !e.isDisabled() && !e.isStatic()).map((e) => {
let t = e.fetch(void 0, n);
- return n.throwOnError || (t = t.catch(k)), e.state.fetchStatus === "paused" ? Promise.resolve() : t;
+ return n.throwOnError || (t = t.catch(O)), e.state.fetchStatus === "paused" ? Promise.resolve() : t;
}));
- return Promise.all(r).then(k);
+ return Promise.all(r).then(O);
}
async query(e) {
let t = this.defaultQueryOptions(e);
t.retry === void 0 && (t.retry = !1);
- let n = this.#e.build(this, t), r = n.isStaleByTime(A(t.staleTime, n)) ? await n.fetch(t) : n.state.data, i = t.select;
+ let n = this.#e.build(this, t), r = n.isStaleByTime(k(t.staleTime, n)) ? await n.fetch(t) : n.state.data, i = t.select;
return i ? i(r) : r;
}
fetchQuery(e) {
let t = this.defaultQueryOptions(e);
t.retry === void 0 && (t.retry = !1);
let n = this.#e.build(this, t);
- return n.isStaleByTime(A(t.staleTime, n)) ? n.fetch(t) : Promise.resolve(n.state.data);
+ return n.isStaleByTime(k(t.staleTime, n)) ? n.fetch(t) : Promise.resolve(n.state.data);
}
prefetchQuery(e) {
- return this.fetchQuery(e).then(k).catch(k);
+ return this.fetchQuery(e).then(O).catch(O);
}
infiniteQuery(e) {
return e._type = "infinite", this.query(e);
@@ -3032,13 +3032,13 @@ var $n = class extends P {
return e._type = "infinite", this.fetchQuery(e);
}
prefetchInfiniteQuery(e) {
- return this.fetchInfiniteQuery(e).then(k).catch(k);
+ return this.fetchInfiniteQuery(e).then(O).catch(O);
}
ensureInfiniteQueryData(e) {
return e._type = "infinite", this.ensureQueryData(e);
}
resumePausedMutations() {
- return I.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
+ return P.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
}
getQueryCache() {
return this.#e;
@@ -3053,7 +3053,7 @@ var $n = class extends P {
this.#n = e;
}
setQueryDefaults(e, t) {
- this.#r.set(j(e), {
+ this.#r.set(A(e), {
queryKey: e,
defaultOptions: t
});
@@ -3061,11 +3061,11 @@ var $n = class extends P {
getQueryDefaults(e) {
let t = [...this.#r.values()], n = {};
return t.forEach((t) => {
- M(e, t.queryKey) && Object.assign(n, t.defaultOptions);
+ j(e, t.queryKey) && Object.assign(n, t.defaultOptions);
}), n;
}
setMutationDefaults(e, t) {
- this.#i.set(j(e), {
+ this.#i.set(A(e), {
mutationKey: e,
defaultOptions: t
});
@@ -3073,7 +3073,7 @@ var $n = class extends P {
getMutationDefaults(e) {
let t = [...this.#i.values()], n = {};
return t.forEach((t) => {
- M(e, t.mutationKey) && Object.assign(n, t.defaultOptions);
+ j(e, t.mutationKey) && Object.assign(n, t.defaultOptions);
}), n;
}
defaultQueryOptions(e) {
@@ -3084,7 +3084,7 @@ var $n = class extends P {
...e,
_defaulted: !0
};
- return t.queryHash ||= Yt(t.queryKey, t), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === sn && (t.enabled = !1), t;
+ return t.queryHash ||= Xt(t.queryKey, t), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === ln && (t.enabled = !1), t;
}
defaultMutationOptions(e) {
return e?._defaulted ? e : {
@@ -3100,7 +3100,7 @@ var $n = class extends P {
};
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/streamedQuery.js
-function nr({ streamFn: e, refetchMode: t = "reset", reducer: n = (e, t) => an(e, t), initialValue: r = [] }) {
+function rr({ streamFn: e, refetchMode: t = "reset", reducer: n = (e, t) => sn(e, t), initialValue: r = [] }) {
return async (i) => {
let a = i.client.getQueryCache().find({
queryKey: i.queryKey,
@@ -3110,7 +3110,7 @@ function nr({ streamFn: e, refetchMode: t = "reset", reducer: n = (e, t) => an(e
...a.resetState,
fetchStatus: "fetching"
});
- let s = r, c = !1, l = await e(un({
+ let s = r, c = !1, l = await e(fn({
client: i.client,
meta: i.meta,
queryKey: i.queryKey,
@@ -3129,19 +3129,19 @@ function nr({ streamFn: e, refetchMode: t = "reset", reducer: n = (e, t) => an(e
//#endregion
//#region node_modules/@tanstack/query-core/build/modern/types.js
/* istanbul ignore file */
-var rr = Symbol(), ir = Symbol(), ar = Symbol(), L = new tr({ defaultOptions: { queries: {
+var ir = Symbol(), ar = Symbol(), or = Symbol(), I = new nr({ defaultOptions: { queries: {
networkMode: "always",
retry: 0,
refetchOnWindowFocus: !1,
refetchOnMount: !1,
retryOnMount: !1
-} } }), or = class extends Error {
+} } }), sr = class extends Error {
status;
body;
constructor(e, t, n = null) {
super(r(e, t)), this.name = "ApiError", this.status = t, this.body = n;
}
-}, sr = (e) => {
+}, cr = (e) => {
if (!e || typeof e != "object") return "";
let t = e;
for (let e of [
@@ -3154,7 +3154,7 @@ var rr = Symbol(), ir = Symbol(), ar = Symbol(), L = new tr({ defaultOptions: {
}
return "";
};
-async function cr(e, t) {
+async function lr(e, t) {
let n = await fetch(e, {
headers: { Accept: "application/json" },
credentials: "same-origin",
@@ -3163,34 +3163,34 @@ async function cr(e, t) {
try {
r = await n.json();
} catch {}
- if (!n.ok) throw new or(sr(r) || `请求失败(${n.status})`, n.status);
+ if (!n.ok) throw new sr(cr(r) || `请求失败(${n.status})`, n.status);
return r;
}
//#endregion
//#region src/query/media-sources.ts
-var lr = "/api/sources", ur = ["media-sources"], dr = (e) => cr(lr, e), fr = (e) => e?.name === "AbortError" || On(e);
-async function pr() {
- let e = () => L.fetchQuery({
- queryKey: ur,
- queryFn: () => dr()
+var ur = "/api/sources", dr = ["media-sources"], fr = (e) => lr(ur, e), pr = (e) => e?.name === "AbortError" || kn(e);
+async function mr() {
+ let e = () => I.fetchQuery({
+ queryKey: dr,
+ queryFn: () => fr()
});
try {
return await e();
} catch (t) {
- if (!fr(t)) throw t;
+ if (!pr(t)) throw t;
return await e();
}
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/url.js
-var mr = /^[\\/]{2}/, hr = "popstate";
-function gr(e) {
+var hr = /^[\\/]{2}/, gr = "popstate";
+function _r(e) {
return typeof e == "object" && !!e && "pathname" in e && "search" in e && "hash" in e && "state" in e && "key" in e;
}
-function _r(e = {}) {
+function vr(e = {}) {
function t(e, t) {
let n = t.state?.masked, { pathname: r, search: i, hash: a } = n || e.location;
- return Sr("", {
+ return Cr("", {
pathname: r,
search: i,
hash: a
@@ -3201,14 +3201,14 @@ function _r(e = {}) {
} : void 0);
}
function n(e, t) {
- return typeof t == "string" ? t : Cr(t);
+ return typeof t == "string" ? t : wr(t);
}
- return Tr(t, n, null, e);
+ return Er(t, n, null, e);
}
-function vr(e, t) {
+function yr(e, t) {
if (e === !1 || e == null) throw Error(t);
}
-function yr(e, t) {
+function br(e, t) {
if (!e) {
typeof console < "u" && console.warn(t);
try {
@@ -3216,10 +3216,10 @@ function yr(e, t) {
} catch {}
}
}
-function br() {
+function xr() {
return Math.random().toString(36).substring(2, 10);
}
-function xr(e, t) {
+function Sr(e, t) {
return {
usr: e.state,
key: e.key,
@@ -3231,21 +3231,21 @@ function xr(e, t) {
} : void 0
};
}
-function Sr(e, t, n = null, r, i) {
+function Cr(e, t, n = null, r, i) {
return {
pathname: typeof e == "string" ? e : e.pathname,
search: "",
hash: "",
- ...typeof t == "string" ? wr(t) : t,
+ ...typeof t == "string" ? Tr(t) : t,
state: n,
- key: t && t.key || r || br(),
+ key: t && t.key || r || xr(),
mask: i
};
}
-function Cr({ pathname: e = "/", search: t = "", hash: n = "" }) {
+function wr({ pathname: e = "/", search: t = "", hash: n = "" }) {
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
}
-function wr(e) {
+function Tr(e) {
let t = {};
if (e) {
let n = e.indexOf("#");
@@ -3255,7 +3255,7 @@ function wr(e) {
}
return t;
}
-function Tr(e, t, n, r = {}) {
+function Er(e, t, n, r = {}) {
let { window: i = document.defaultView, v5Compat: a = !1 } = r, o = i.history, s = "POP", c = null, l = u();
l ?? (l = 0, o.replaceState({
...o.state,
@@ -3275,9 +3275,9 @@ function Tr(e, t, n, r = {}) {
}
function f(e, t) {
s = "PUSH";
- let r = gr(e) ? e : Sr(h.location, e, t);
+ let r = _r(e) ? e : Cr(h.location, e, t);
n && n(r, e), l = u() + 1;
- let d = xr(r, l), f = h.createHref(r.mask || r);
+ let d = Sr(r, l), f = h.createHref(r.mask || r);
try {
o.pushState(d, "", f);
} catch (e) {
@@ -3292,9 +3292,9 @@ function Tr(e, t, n, r = {}) {
}
function p(e, t) {
s = "REPLACE";
- let r = gr(e) ? e : Sr(h.location, e, t);
+ let r = _r(e) ? e : Cr(h.location, e, t);
n && n(r, e), l = u();
- let i = xr(r, l), d = h.createHref(r.mask || r);
+ let i = Sr(r, l), d = h.createHref(r.mask || r);
o.replaceState(i, "", d), a && c && c({
action: s,
location: h.location,
@@ -3302,7 +3302,7 @@ function Tr(e, t, n, r = {}) {
});
}
function m(e) {
- return Er(i, e);
+ return Dr(i, e);
}
let h = {
get action() {
@@ -3313,8 +3313,8 @@ function Tr(e, t, n, r = {}) {
},
listen(e) {
if (c) throw Error("A history only accepts one active listener");
- return i.addEventListener(hr, d), c = e, () => {
- i.removeEventListener(hr, d), c = null;
+ return i.addEventListener(gr, d), c = e, () => {
+ i.removeEventListener(gr, d), c = null;
};
},
createHref(e) {
@@ -3337,15 +3337,15 @@ function Tr(e, t, n, r = {}) {
};
return h;
}
-function Er(e, t, n = !1) {
+function Dr(e, t, n = !1) {
let r = "http://localhost";
- e && (r = e.location.origin === "null" ? e.location.href : e.location.origin), vr(r, "No window.location.(origin|href) available to create URL");
- let i = typeof t == "string" ? t : Cr(t);
- return i = i.replace(/ $/, "%20"), !n && mr.test(i) && (i = r + i), new URL(i, r);
+ e && (r = e.location.origin === "null" ? e.location.href : e.location.origin), yr(r, "No window.location.(origin|href) available to create URL");
+ let i = typeof t == "string" ? t : wr(t);
+ return i = i.replace(/ $/, "%20"), !n && hr.test(i) && (i = r + i), new URL(i, r);
}
//#endregion
//#region node_modules/react/cjs/react.production.js
-var Dr = /* @__PURE__ */ f(((e) => {
+var Or = /* @__PURE__ */ f(((e) => {
var t = {
isMounted: function() {
return !1;
@@ -3372,26 +3372,26 @@ var Dr = /* @__PURE__ */ f(((e) => {
s.constructor = o, n(s, i.prototype), s.isPureReactComponent = !0, Array.isArray;
}));
(/* @__PURE__ */ f(((e, t) => {
- t.exports = Dr();
+ t.exports = Or();
})))();
-function Or(e, t) {
+function kr(e, t) {
typeof e == "string" && (e = {
path: e,
caseSensitive: !1,
end: !0
});
- let [n, r] = Ar(e.path, e.caseSensitive, e.end);
- return kr(e, t, n, r);
+ let [n, r] = jr(e.path, e.caseSensitive, e.end);
+ return Ar(e, t, n, r);
}
-function kr(e, t, n, r) {
+function Ar(e, t, n, r) {
let i = t.match(n);
if (!i) return null;
- let a = i[0], o = jr(a, 1), s = i.slice(1);
+ let a = i[0], o = Mr(a, 1), s = i.slice(1);
return {
params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
if (t === "*") {
let e = s[r] || "";
- o = jr(a.slice(0, a.length - e.length), 1);
+ o = Mr(a.slice(0, a.length - e.length), 1);
}
let i = s[r];
return e[t] = n && !i ? void 0 : (i || "").replace(/%2F/g, "/"), e;
@@ -3401,8 +3401,8 @@ function kr(e, t, n, r) {
pattern: e
};
}
-function Ar(e, t = !1, n = !0) {
- yr(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
+function jr(e, t = !1, n = !0) {
+ br(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
if (r.push({
paramName: t,
@@ -3415,7 +3415,7 @@ function Ar(e, t = !1, n = !0) {
}).replace(/\/([\w-]+)\?(?=\/|$|\()/g, "(?:/$1)?");
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
}
-function jr(e, t = 0) {
+function Mr(e, t = 0) {
let n = e.length;
for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
return n === e.length ? e : e.slice(0, n);
@@ -3423,43 +3423,43 @@ function jr(e, t = 0) {
typeof window < "u" && window.document !== void 0 && window.document.createElement;
//#endregion
//#region src/history/overlay.ts
-var Mr = [
+var Nr = [
"/item/:id",
"/mix/:seed/:item",
"/parts/:seed/:item",
"/editions/:seed/:item",
"/playlists/:playlist/:item",
"/follow/item/:id"
-], Nr = (e) => Mr.some((t) => Or(t, e) !== null);
-function Pr(e) {
+], Pr = (e) => Nr.some((t) => kr(t, e) !== null);
+function Fr(e) {
let t = e?.backgroundLocation;
return typeof t?.pathname == "string" ? {
pathname: t.pathname,
search: typeof t.search == "string" ? t.search : ""
} : null;
}
-var Fr = null, Ir = null;
+var L = null, Ir = null;
function Lr() {
let { pathname: e, search: t } = window.location;
- Nr(e) || (Fr = {
+ Pr(e) || (L = {
pathname: e,
search: t
});
}
function Rr() {
- Fr = null, Ir = null;
+ L = null, Ir = null;
}
function zr(e) {
- let t = Pr(e);
- t && (Fr = t, Ir = t.pathname + t.search);
+ let t = Fr(e);
+ t && (L = t, Ir = t.pathname + t.search);
}
function Br() {
let e = Ir;
return Ir = null, e;
}
function Vr(e) {
- return Fr ? {
- backgroundLocation: { ...Fr },
+ return L ? {
+ backgroundLocation: { ...L },
overlay: e
} : void 0;
}
@@ -3565,7 +3565,7 @@ function ii(e, t) {
}
//#endregion
//#region src/history/index.ts
-var V = _r({ v5Compat: !0 }), ai = 0, oi = {
+var V = vr({ v5Compat: !0 }), ai = 0, oi = {
action: V.action,
location: V.location,
seq: ai
@@ -3611,31 +3611,31 @@ function mi(e) {
}
function hi(e) {
let t = Vr(e);
- !t || !Nr(window.location.pathname) || fi(window.location.href, {
+ !t || !Pr(window.location.pathname) || fi(window.location.href, {
replace: !0,
state: t
});
}
//#endregion
//#region src/shell/index.ts
-var gi, _i, vi = null, yi = /* @__PURE__ */ new Set(), bi = /* @__PURE__ */ new Set(), xi = !1, Si = null, Ci = null, wi = "", Ti = "/", Ei = null, Di = !1, Oi = !1, ki = null, Ai = null, ji = null, Mi = "/follow", Ni = "", Pi = null, Fi = /* @__PURE__ */ new Set(), Ii = 0;
-function Li(e) {
+var gi, _i, vi = null, yi = /* @__PURE__ */ new Set(), bi = /* @__PURE__ */ new Set(), xi = !1, Si = null, Ci = null, wi = "", Ti = "/", Ei = null, Di = !1, Oi = !1, ki = null, Ai = null, ji = null, Mi = "/follow", Ni = "", Pi = /* @__PURE__ */ new Set(), Fi = 0;
+function Ii(e) {
let t = (t) => Object.prototype.hasOwnProperty.call(e, t);
- t("state") && (gi = e.state), t("barsContext") && (_i = e.barsContext), t("detailReturnBarsContext") && (vi = e.detailReturnBarsContext), t("selectMode") && (xi = e.selectMode), t("lastSelectedId") && (Si = e.lastSelectedId), t("followLastSelectedId") && (Ci = e.followLastSelectedId), t("selectSurface") && (wi = e.selectSurface), t("detailReturnPath") && (Ti = e.detailReturnPath), t("detailOriginAnchor") && (Ei = e.detailOriginAnchor), t("detailOriginAbove") && (Di = e.detailOriginAbove), t("detailReturnNeedsRestore") && (Oi = e.detailReturnNeedsRestore), t("activeQueue") && (ki = e.activeQueue), t("pendingQueueRoute") && (Ai = e.pendingQueueRoute), t("presentedItem") && (ji = e.presentedItem), t("followDetailReturnPath") && (Mi = e.followDetailReturnPath), t("configurationRequestedSection") && (Ni = e.configurationRequestedSection), t("activityPrefill") && (Pi = e.activityPrefill), Ri();
+ t("state") && (gi = e.state), t("barsContext") && (_i = e.barsContext), t("detailReturnBarsContext") && (vi = e.detailReturnBarsContext), t("selectMode") && (xi = e.selectMode), t("lastSelectedId") && (Si = e.lastSelectedId), t("followLastSelectedId") && (Ci = e.followLastSelectedId), t("selectSurface") && (wi = e.selectSurface), t("detailReturnPath") && (Ti = e.detailReturnPath), t("detailOriginAnchor") && (Ei = e.detailOriginAnchor), t("detailOriginAbove") && (Di = e.detailOriginAbove), t("detailReturnNeedsRestore") && (Oi = e.detailReturnNeedsRestore), t("activeQueue") && (ki = e.activeQueue), t("pendingQueueRoute") && (Ai = e.pendingQueueRoute), t("presentedItem") && (ji = e.presentedItem), t("followDetailReturnPath") && (Mi = e.followDetailReturnPath), t("configurationRequestedSection") && (Ni = e.configurationRequestedSection), Li();
}
-function Ri() {
- Ii += 1;
- for (let e of [...Fi]) e();
+function Li() {
+ Fi += 1;
+ for (let e of [...Pi]) e();
}
-function zi(e) {
- return Fi.add(e), () => {
- Fi.delete(e);
+function Ri(e) {
+ return Pi.add(e), () => {
+ Pi.delete(e);
};
}
-var Bi = () => Ii;
+var zi = () => Fi;
//#endregion
//#region src/diagnostics-route.ts
-function Vi(e) {
+function Bi(e) {
window.peachRegisterRoute({
match: "/diagnostics",
section: "configuration",
@@ -3646,21 +3646,21 @@ function Vi(e) {
}
//#endregion
//#region src/board-controls.ts
-function Hi(e) {
+function Vi(e) {
let t = Number(e.min) || 0, n = Number(e.max) || 100, r = Number(e.value), i = n > t ? Math.max(0, Math.min(100, (r - t) / (n - t) * 100)) : 0;
e.style.setProperty("--board-range-value", `${i}%`);
}
-function Ui() {
+function Hi() {
let e = (e) => {
- e.querySelectorAll("input[type=range]").forEach(Hi), qi(e), Gi(e);
+ e.querySelectorAll("input[type=range]").forEach(Vi), Ki(e), Wi(e);
};
e(document), new MutationObserver((t) => {
- for (let n of t) for (let t of n.addedNodes) t instanceof Element && (t.matches("input[type=range]") && Hi(t), e(t));
+ for (let n of t) for (let t of n.addedNodes) t instanceof Element && (t.matches("input[type=range]") && Vi(t), e(t));
}).observe(document.body, {
subtree: !0,
childList: !0
}), document.addEventListener("input", (e) => {
- e.target instanceof HTMLInputElement && e.target.type === "range" && Hi(e.target);
+ e.target instanceof HTMLInputElement && e.target.type === "range" && Vi(e.target);
});
let t = document.createElement("div");
t.className = "board-tooltip", t.id = "board-control-tooltip", t.role = "tooltip", t.popover = "manual", t.hidden = !0, document.body.append(t);
@@ -3683,8 +3683,8 @@ function Ui() {
n && u(e, n) && o();
}, !0), window.addEventListener("resize", o);
}
-var Wi = /* @__PURE__ */ new Map();
-function Gi(e) {
+var Ui = /* @__PURE__ */ new Map();
+function Wi(e) {
let t = ".board-local-nav:not([data-section-nav])", n = [...e.querySelectorAll(t)];
e instanceof HTMLElement && e.matches(t) && n.push(e), n.forEach((e) => {
if (e.hasAttribute("data-board-tabs")) return;
@@ -3698,8 +3698,8 @@ function Gi(e) {
left: r.offsetLeft,
width: r.offsetWidth
};
- n(i), Wi.set(t, i);
- }, i = Wi.get(t);
+ n(i), Ui.set(t, i);
+ }, i = Ui.get(t);
i ? n(i) : r(), requestAnimationFrame(() => {
e.classList.add("board-tabs-ready"), requestAnimationFrame(r);
});
@@ -3719,15 +3719,15 @@ function Gi(e) {
o.observe(e);
});
}
-var Ki = /* @__PURE__ */ new Map();
-function qi(e) {
+var Gi = /* @__PURE__ */ new Map();
+function Ki(e) {
let t = ".iconswitch,.insightswitch,.follow-workspace-switch", n = [...e.querySelectorAll(t)];
e instanceof HTMLElement && e.matches(t) && n.push(e), n.forEach((e) => {
if (e.hasAttribute("data-board-segments") || e.closest("[data-skeleton]")) return;
e.dataset.boardSegments = "true";
let t = document.createElement("span");
t.className = "board-segment-thumb", t.setAttribute("aria-hidden", "true"), e.prepend(t);
- let n = e.className + (e.getAttribute("aria-label") ?? ""), r = Ki.get(n) ?? null, i = () => {
+ let n = e.className + (e.getAttribute("aria-label") ?? ""), r = Gi.get(n) ?? null, i = () => {
let i = e.querySelector("label:has(input:checked),button[aria-selected=true]");
if (!i || !i.offsetWidth) return;
let a = {
@@ -3736,7 +3736,7 @@ function qi(e) {
w: i.offsetWidth,
h: i.offsetHeight
};
- c(t, r, a, "x"), r = a, Ki.set(n, a);
+ c(t, r, a, "x"), r = a, Gi.set(n, a);
};
e.addEventListener("change", i);
let a = new MutationObserver(i);
@@ -3757,15 +3757,15 @@ function qi(e) {
}
//#endregion
//#region src/theme-transition.ts
-var Ji = !1;
-async function Yi(e, t) {
- if (Ji) return;
+var qi = !1;
+async function Ji(e, t) {
+ if (qi) return;
if (!document.startViewTransition || matchMedia("(prefers-reduced-motion: reduce)").matches) {
t();
return;
}
let n = e.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2, a = Math.hypot(Math.max(r, innerWidth - r), Math.max(i, innerHeight - i)) * 2.5, o = document.createElement("style");
- o.textContent = `::view-transition-old(root){animation:none}::view-transition-new(root){mix-blend-mode:normal;mask-image:radial-gradient(circle closest-side,#000 78%,#0006 88%,transparent);mask-repeat:no-repeat;will-change:mask-position,mask-size;animation:peach-theme-reveal 560ms cubic-bezier(.16,1,.3,1) both}@keyframes peach-theme-reveal{from{mask-position:${r}px ${i}px;mask-size:0px 0px}to{mask-position:${r - a / 2}px ${i - a / 2}px;mask-size:${a}px ${a}px}}`, Ji = !0, document.head.append(o);
+ o.textContent = `::view-transition-old(root){animation:none}::view-transition-new(root){mix-blend-mode:normal;mask-image:radial-gradient(circle closest-side,#000 78%,#0006 88%,transparent);mask-repeat:no-repeat;will-change:mask-position,mask-size;animation:peach-theme-reveal 560ms cubic-bezier(.16,1,.3,1) both}@keyframes peach-theme-reveal{from{mask-position:${r}px ${i}px;mask-size:0px 0px}to{mask-position:${r - a / 2}px ${i - a / 2}px;mask-size:${a}px ${a}px}}`, qi = !0, document.head.append(o);
let s = document.documentElement;
s.dataset.themeSnapshot = "true";
let c = !1, l = () => {
@@ -3776,46 +3776,46 @@ async function Yi(e, t) {
} catch {
l();
} finally {
- delete s.dataset.themeSnapshot, o.remove(), Ji = !1;
+ delete s.dataset.themeSnapshot, o.remove(), qi = !1;
}
}
//#endregion
//#region src/sidebar-skeleton.ts
-var Xi = (e) => e.replace(/[&<>"']/g, (e) => ({
+var Yi = (e) => e.replace(/[&<>"']/g, (e) => ({
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
"\"": "&quot;",
"'": "&#39;"
})[e]);
-function Zi(e, t, n) {
+function Xi(e, t, n) {
let r = new Map(t.map((e) => [e[0], e]));
return `<div data-sidebar-head=""></div><div data-sidebar-nav="">${e.map((e) => r.get(e)).filter((e) => e !== void 0).map(([e, t, r]) => {
- let i = e === "" ? "<img data-sidebar-home-logo=\"\" src=\"/peach-logo.png\" alt=\"\">" : `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${Xi(r)}"/></svg>`;
- return `<button type="button" data-nav="${Xi(e)}" aria-pressed="${n(e)}" aria-label="${Xi(t)}">${i}<span>${Xi(t)}</span></button>`;
+ let i = e === "" ? "<img data-sidebar-home-logo=\"\" src=\"/peach-logo.png\" alt=\"\">" : `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${Yi(r)}"/></svg>`;
+ return `<button type="button" data-nav="${Yi(e)}" aria-pressed="${n(e)}" aria-label="${Yi(t)}">${i}<span>${Yi(t)}</span></button>`;
}).join("")}</div>`;
}
//#endregion
//#region src/manage-header.ts
-var Qi = {
+var Zi = {
"/junk-files": "垃圾文件",
"/duplicates": "重复文件",
"/review": "人工复核",
"/trash": "回收站",
"/quality-goals": "高清版",
"/scraping": "来源和凭证"
-}, $i = /* @__PURE__ */ new Set(["/data-cleanup", "/scraping"]), ea = ({ total: e, shown: t }) => `${e.toLocaleString()} 个符合 · 显示 ${t}`;
-function ta(e) {
+}, Qi = /* @__PURE__ */ new Set(["/data-cleanup", "/scraping"]), $i = ({ total: e, shown: t }) => `${e.toLocaleString()} 个符合 · 显示 ${t}`;
+function ea(e) {
let t = e.sections.find(([t]) => t === e.section);
if (!t) return null;
- let n = Qi[e.path] ?? "";
+ let n = Zi[e.path] ?? "";
return {
title: e.path === "/diagnostics" ? "系统诊断" : e.section === "cleanup" && n || t[1],
crumb: n,
- compact: $i.has(e.path) || e.section === "configuration",
+ compact: Qi.has(e.path) || e.section === "configuration",
lede: e.section === "trash" ? e.trash ? {
kind: "count",
- text: ea(e.trash),
+ text: $i(e.trash),
total: e.trash.total
} : { kind: "skeleton" } : { kind: "none" }
};
@@ -3826,28 +3826,28 @@ var H = (e) => e.replace(/[&<>"']/g, (e) => ({
">": "&gt;",
"\"": "&quot;",
"'": "&#39;"
-})[e]), na = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${H(e)}"/></svg>`, ra = "<span class=\"skeleton\" data-trash-lede-skeleton=\"text\" aria-hidden=\"true\"></span><span class=\"skeleton\" data-trash-lede-skeleton=\"action\" aria-hidden=\"true\"></span>";
-function ia(e) {
- let t = ta(e);
+})[e]), ta = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${H(e)}"/></svg>`, na = "<span class=\"skeleton\" data-trash-lede-skeleton=\"text\" aria-hidden=\"true\"></span><span class=\"skeleton\" data-trash-lede-skeleton=\"action\" aria-hidden=\"true\"></span>";
+function ra(e) {
+ let t = ea(e);
if (!t) return "";
let n = e.menu.map(([t, n, r]) => {
let i = t === e.section;
- return `<button type="button" data-manage="${H(t)}" aria-pressed="${i}"${i ? " aria-current=\"page\"" : ""}>${na(r)}<span>${H(n)}</span></button>`;
- }).join(""), r = t.crumb ? `<nav data-manage-crumb="" aria-label="Breadcrumb"><ol><li><a href="/data-cleanup">数据管理</a>${na("chevron-right")}</li><li aria-current="true"><span>${H(t.crumb)}</span></li></ol></nav>` : "", i = t.lede.kind === "none" ? "" : `<p class="mono" data-manage-lede="">${t.lede.kind === "skeleton" ? ra : `<span data-lede-text="">${H(t.lede.text)}</span>${t.lede.total ? aa : ""}`}</p>`;
+ return `<button type="button" data-manage="${H(t)}" aria-pressed="${i}"${i ? " aria-current=\"page\"" : ""}>${ta(r)}<span>${H(n)}</span></button>`;
+ }).join(""), r = t.crumb ? `<nav data-manage-crumb="" aria-label="Breadcrumb"><ol><li><a href="/data-cleanup">数据管理</a>${ta("chevron-right")}</li><li aria-current="true"><span>${H(t.crumb)}</span></li></ol></nav>` : "", i = t.lede.kind === "none" ? "" : `<p class="mono" data-manage-lede="">${t.lede.kind === "skeleton" ? na : `<span data-lede-text="">${H(t.lede.text)}</span>${t.lede.total ? ia : ""}`}</p>`;
return `<nav data-manage-bar="" aria-label="管理"><div data-manage-menu="">${n}<span data-manage-indicator="" aria-hidden="true"></span></div></nav>` + r + `<h2 data-manage-title=""${t.compact ? " data-compact=\"\"" : ""}>${H(t.title)}</h2>` + i;
}
-var aa = "<button type=\"button\" data-empty-trash=\"\" title=\"永久删除回收站内容\">清空回收站</button>";
+var ia = "<button type=\"button\" data-empty-trash=\"\" title=\"永久删除回收站内容\">清空回收站</button>";
//#endregion
//#region src/jobs.ts
-function oa(e, n, r) {
+function aa(e, n, r) {
if (!Number.isFinite(r) || r <= 0) return "";
let i = Math.max(0, Math.min(r, Number.isFinite(n) ? n : 0)), a = i / r * 100;
return `<div class="board-job-progress" role="progressbar" aria-label="${t(e)}" aria-valuemin="0" aria-valuemax="${r}" aria-valuenow="${i}"><svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true"><circle class="board-job-track" cx="18" cy="18" r="15"/><circle class="board-job-fill" cx="18" cy="18" r="15" pathLength="100" stroke-dasharray="${a} ${100 - a}" transform="rotate(-90 18 18)"/></svg><span>${t(e)}<small>${Math.round(a)}%</small></span></div>`;
}
-function sa(e, t = 0, n = 0) {
- return n > 0 ? oa(e, t, n) : s(e);
+function oa(e, t = 0, n = 0) {
+ return n > 0 ? aa(e, t, n) : s(e);
}
-async function ca(e) {
+async function sa(e) {
let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;
for (; e.active();) {
let r;
@@ -3862,14 +3862,14 @@ async function ca(e) {
await t(2e3);
}
}
-function la(e) {
+function ca(e) {
let t = e.note || ((e) => l(e, {
label: "任务状态",
variant: "error"
- })), n = e.loading || s, r = e.progress || ((e, t, n) => sa(n || `已处理 ${e} / ${t}`, e, t)), i = e.container || ((e) => `<section class="followtask" data-geist-fieldset aria-label="任务进度"><div class="geist-fieldset-content">${e}</div></section>`), a = document.createElement("div");
+ })), n = e.loading || s, r = e.progress || ((e, t, n) => oa(n || `已处理 ${e} / ${t}`, e, t)), i = e.container || ((e) => `<section class="followtask" data-geist-fieldset aria-label="任务进度"><div class="geist-fieldset-content">${e}</div></section>`), a = document.createElement("div");
e.host.hidden = !0, a.dataset.followJob = "", a.setAttribute("aria-live", "polite"), e.host.prepend(a);
let o = e.storageKey || "peach-follow-job", c = sessionStorage.getItem(o) || void 0, u = !1;
- ca({
+ sa({
read: e.read,
active: () => !u && e.active() && a.isConnected,
keepWatching: e.watchIdle !== !1,
@@ -3895,11 +3895,11 @@ function la(e) {
}
//#endregion
//#region src/selection.ts
-function ua(e, t, n, r, i, a = i || !e.has(r)) {
+function la(e, t, n, r, i, a = i || !e.has(r)) {
let o = n === null ? -1 : t.indexOf(n), s = t.indexOf(r);
return i && o >= 0 && s >= 0 ? t.slice(Math.min(o, s), Math.max(o, s) + 1).forEach((t) => e.add(t)) : a ? e.add(r) : e.delete(r), r;
}
-function da(e, t) {
+function ua(e, t) {
let n = t.filter((t) => e.has(t)).length;
return {
count: n,
@@ -3907,14 +3907,14 @@ function da(e, t) {
mixed: n > 0 && n < t.length
};
}
-function fa(e, t, n) {
+function da(e, t, n) {
t.forEach((t) => n ? e.add(t) : e.delete(t));
}
-function pa({ count: e, label: t, all: n, summary: r, actions: i, locked: a = !1 }) {
+function fa({ count: e, label: t, all: n, summary: r, actions: i, locked: a = !1 }) {
e && (e.textContent = t), n && (n.checked = r.all, n.indeterminate = r.mixed);
for (let e of i) e.disabled = !r.count || a;
}
-function ma(e, t, n = 1) {
+function pa(e, t, n = 1) {
let r = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
if (n * 2 + 5 >= t) return r(1, t);
let i = Math.max(e - n, 1), a = Math.min(e + n, t), o = i > 2, s = a < t - 2;
@@ -3934,15 +3934,15 @@ function ma(e, t, n = 1) {
t
];
}
-function ha(e, t) {
+function ma(e, t) {
return Math.max(1, Math.ceil(e / t));
}
-function ga(e, t) {
+function ha(e, t) {
return Math.min(Math.max(1, Math.floor(e) || 1), t);
}
-function _a(e, t, n) {
+function ga(e, t, n) {
if (t <= 1) return "";
- let r = ma(e, t).map((t) => t === "…" ? "<li class=\"board-page-dots\" aria-hidden=\"true\">…</li>" : `<li><button type="button" class="board-page" data-page="${t}" aria-label="第 ${t} 页"${t === e ? " aria-current=\"page\"" : ""}>${t}</button></li>`).join("");
+ let r = pa(e, t).map((t) => t === "…" ? "<li class=\"board-page-dots\" aria-hidden=\"true\">…</li>" : `<li><button type="button" class="board-page" data-page="${t}" aria-label="第 ${t} 页"${t === e ? " aria-current=\"page\"" : ""}>${t}</button></li>`).join("");
return `<nav class="board-pagination" aria-label="${n}">
<button type="button" class="geist-button" data-page="${e - 1}"${e <= 1 ? " disabled" : ""}><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-chevron-left"></use></svg>上一页</button>
<ul>${r}</ul>
@@ -3951,20 +3951,20 @@ function _a(e, t, n) {
}
//#endregion
//#region src/card-art/face-frame.ts
-var va = .32, ya = 13, ba = .6;
-function xa(e) {
+var _a = .32, va = 13, ya = .6;
+function ba(e) {
return e ? Number.isFinite(e.cx) && Number.isFinite(e.cy) && Number(e.faceW) > 0 && Number(e.imgW) > 0 && Number(e.imgH) > 0 : !1;
}
-function Sa(e, t, n = 1, r = va, i = ba) {
- if (!xa(e) || !(t && t.w > 0 && t.h > 0)) return 1;
+function xa(e, t, n = 1, r = _a, i = ya) {
+ if (!ba(e) || !(t && t.w > 0 && t.h > 0)) return 1;
let a = n > 0 ? n : 1, o = Math.max(t.w / e.imgW, t.h / e.imgH), s = e.faceW * o;
if (!(s > 0)) return 1;
let c = Math.min(t.w, t.h), l = Math.max(r, 13 / c) * c / s, u = Math.max(t.w / (2 * Math.min(e.cx, 1 - e.cx) * e.imgW * o), t.h / (2 * Math.min(e.cy, 1 - e.cy) * e.imgH * o)), d = e.faceW / (s * a);
return Math.max(1, Math.min(Math.max(l, Math.min(u, i * c / s)), d));
}
-function Ca(e, t, n = 1, r = va, i = ba) {
- let a = Sa(e, t, n, r, i);
- if (a <= 1 || !xa(e) || !t) return null;
+function Sa(e, t, n = 1, r = _a, i = ya) {
+ let a = xa(e, t, n, r, i);
+ if (a <= 1 || !ba(e) || !t) return null;
let o = Math.max(t.w / e.imgW, t.h / e.imgH) * a, s = e.imgW * o, c = e.imgH * o, l = Math.min(0, Math.max(t.w - s, t.w / 2 - e.cx * s)), u = Math.min(0, Math.max(t.h - c, t.h / 2 - e.cy * c)), d = (e, t) => Math.round(e / t * 1e4) / 100;
return {
zoom: Math.round(a * 1e3) / 1e3,
@@ -3976,48 +3976,48 @@ function Ca(e, t, n = 1, r = va, i = ba) {
}
//#endregion
//#region src/card-art/image-fallback.ts
-var wa = "|", Ta = "closest:";
-function Ea(e) {
- return String(e ?? "").split(wa).map((e) => e.trim()).filter(Boolean);
+var Ca = "|", wa = "closest:";
+function Ta(e) {
+ return String(e ?? "").split(Ca).map((e) => e.trim()).filter(Boolean);
}
-function Da({ drop: e = "self", fallbacks: n = [], initial: r = "", dropClass: i = "", dropStyle: a = !1 } = {}) {
+function Ea({ drop: e = "self", fallbacks: n = [], initial: r = "", dropClass: i = "", dropStyle: a = !1 } = {}) {
let o = (Array.isArray(n) ? n : [n]).filter(Boolean);
return [
`data-drop="${t(e)}"`,
- o.length ? `data-fallbacks="${t(o.join(wa))}"` : "",
+ o.length ? `data-fallbacks="${t(o.join(Ca))}"` : "",
r ? `data-initial="${t(r)}"` : "",
i ? `data-drop-class="${t(i)}"` : "",
a ? "data-drop-style" : ""
].filter(Boolean).join(" ");
}
-function Oa(e) {
+function Da(e) {
if (!e || !e.dataset || !e.dataset.drop) return "";
- let t = Ea(e.dataset.fallbacks);
+ let t = Ta(e.dataset.fallbacks);
if (t.length) {
let [n = "", ...r] = t;
- return "dropStyle" in e.dataset && e.removeAttribute("style"), delete e.dataset.facebox, r.length ? e.dataset.fallbacks = r.join(wa) : delete e.dataset.fallbacks, e.src = n, "retry";
+ return "dropStyle" in e.dataset && e.removeAttribute("style"), delete e.dataset.facebox, r.length ? e.dataset.fallbacks = r.join(Ca) : delete e.dataset.fallbacks, e.src = n, "retry";
}
let n = e.dataset.drop;
- if (n.startsWith(Ta)) return (e.closest(n.slice(8)) || e).remove(), "drop";
+ if (n.startsWith(wa)) return (e.closest(n.slice(8)) || e).remove(), "drop";
if (n === "initial") {
let t = document.createElement("span");
return t.className = e.dataset.dropClass || "", t.textContent = e.dataset.initial || "", e.replaceWith(t), "drop";
}
return e.remove(), "drop";
}
-function ka(e) {
+function Oa(e) {
e.addEventListener("error", (e) => {
- e.target instanceof HTMLImageElement && Oa(e.target);
+ e.target instanceof HTMLImageElement && Da(e.target);
}, !0);
}
//#endregion
//#region src/card-art/native-image.ts
-function Aa(e, t, n, r) {
+function ka(e, t, n, r) {
if (!(e > 0 && t > 0 && n > 0 && r > 0)) return 0;
let i = e / n, a = t / r;
return i > 1.001 || a > 1.001 || Math.abs(i - a) > Math.max(i, a) * .01 ? 0 : i;
}
-function ja(e, t, n, r, i = 1) {
+function Aa(e, t, n, r, i = 1) {
let a = Number.isFinite(i) && i > 0 ? i : 1;
e /= a, t /= a;
let o = [
@@ -4034,33 +4034,33 @@ function ja(e, t, n, r, i = 1) {
}
//#endregion
//#region src/card-art/representatives.ts
-var Ma = /* @__PURE__ */ new Map();
-function Na(e) {
+var ja = /* @__PURE__ */ new Map();
+function Ma(e) {
(e || []).forEach((e) => {
- e.rep && e.has_avatar && Ma.set(e.k, e.rep);
+ e.rep && e.has_avatar && ja.set(e.k, e.rep);
});
}
-function Pa(e) {
- return Ma.get(e);
+function Na(e) {
+ return ja.get(e);
}
//#endregion
//#region src/card-art/markup.ts
-var Fa = (e, t) => t ? `${e}&v=${encodeURIComponent(t)}` : e, Ia = (e, t = !1) => Fa(`/cover?code=${encodeURIComponent(e.cover_key || e.code || "")}${t ? "&thumb=1" : ""}`, e.cover_version), La = (e, t, n) => Fa(`/logo?studio=${encodeURIComponent(e)}&variant=${t}`, n), Ra = (e) => e && typeof e == "object" ? e : null;
-function za(e) {
+var Pa = (e, t) => t ? `${e}&v=${encodeURIComponent(t)}` : e, Fa = (e, t = !1) => Pa(`/cover?code=${encodeURIComponent(e.cover_key || e.code || "")}${t ? "&thumb=1" : ""}`, e.cover_version), Ia = (e, t, n) => Pa(`/logo?studio=${encodeURIComponent(e)}&variant=${t}`, n), La = (e) => e && typeof e == "object" ? e : null;
+function Ra(e) {
return e && e.is_jav ? "女优" : "艺人";
}
-function Ba({ kind: e = "performer", id: t = null, hasImage: n = !1, version: r = "", rep: i = null, mark: a = null, logo: o = "", logoVersion: s = "", logoVariant: c = "logo", alt: l = "", lazy: u = !0, style: d = "", dropStyle: f = !1, focus: p = null, thumb: m = !1 } = {}) {
- let h = !!(t && n), g = h ? Fa(`/entity-image?kind=${e}&id=${t}${m ? "&thumb=1" : ""}`, r) : "", _ = i ? `/avatar?id=${i}` : "", v = !!o, y = v ? La(o, c, s) : g || _ || (a ? `/link-mark?id=${a}` : "");
+function za({ kind: e = "performer", id: t = null, hasImage: n = !1, version: r = "", rep: i = null, mark: a = null, logo: o = "", logoVersion: s = "", logoVariant: c = "logo", alt: l = "", lazy: u = !0, style: d = "", dropStyle: f = !1, focus: p = null, thumb: m = !1 } = {}) {
+ let h = !!(t && n), g = h ? Pa(`/entity-image?kind=${e}&id=${t}${m ? "&thumb=1" : ""}`, r) : "", _ = i ? `/avatar?id=${i}` : "", v = !!o, y = v ? Ia(o, c, s) : g || _ || (a ? `/link-mark?id=${a}` : "");
if (!y) return "";
- let ee = v ? [g, _].filter(Boolean) : h && _ ? [_] : [], te = h && !v, b = te ? Ga(p) : "", ne = d || Wa(p);
- return `<img src="${y}" width="128" height="128" alt="${l}"${u ? " loading=\"lazy\"" : ""} decoding="async"${te ? ne : ""} ${b}${Da({
+ let ee = v ? [g, _].filter(Boolean) : h && _ ? [_] : [], te = h && !v, b = te ? Wa(p) : "", ne = d || Ua(p);
+ return `<img src="${y}" width="128" height="128" alt="${l}"${u ? " loading=\"lazy\"" : ""} decoding="async"${te ? ne : ""} ${b}${Ea({
dropStyle: (f || !!b || !!ne) && te,
fallbacks: ee
})}>`;
}
-function Va(e, n, r, i = "performer", a = null, o = "", s = "icon", c = void 0, l = !1) {
+function Ba(e, n, r, i = "performer", a = null, o = "", s = "icon", c = void 0, l = !1) {
let u = c === void 0 ? n && n.avatar_focus || null : c;
- return `<span class="ini">${t((e || "?").slice(0, 1))}</span>` + Ba({
+ return `<span class="ini">${t((e || "?").slice(0, 1))}</span>` + za({
kind: i,
id: n && n.id,
hasImage: !!(n && n.has_image),
@@ -4074,19 +4074,19 @@ function Va(e, n, r, i = "performer", a = null, o = "", s = "icon", c = void 0,
thumb: l
});
}
-function Ha(e, t, n) {
- return Va(e, t, n ? Pa(e) : null, n || "performer");
+function Va(e, t, n) {
+ return Ba(e, t, n ? Na(e) : null, n || "performer");
}
-function Ua(e) {
- let t = Ra(e);
+function Ha(e) {
+ let t = La(e);
return t && t.axis === "x" ? `${t.pct}% 50%` : t && t.axis === "y" ? `50% ${t.pct}%` : "";
}
-function Wa(e) {
- let t = Ua(e);
+function Ua(e) {
+ let t = Ha(e);
return t ? ` style="object-position:${t}"` : "";
}
-function Ga(e) {
- let t = Ra(e)?.box;
+function Wa(e) {
+ let t = La(e)?.box;
return t ? ` data-facebox="${[
t.cx,
t.cy,
@@ -4095,8 +4095,8 @@ function Ga(e) {
t.imgH
].map(Number).join(" ")}"` : "";
}
-function Ka(e, t, n = !1) {
- let r = Ia(e, !0), i = e.cover_frame || {}, a = [i.cx == null ? "" : ` data-cx="${i.cx}"`, i.cy == null ? "" : ` data-cy="${Math.min(.6, Math.max(.05, i.cy))}"`].join(""), o = e.poster_box, s = o ? ` data-posterbox="${[
+function Ga(e, t, n = !1) {
+ let r = Fa(e, !0), i = e.cover_frame || {}, a = [i.cx == null ? "" : ` data-cx="${i.cx}"`, i.cy == null ? "" : ` data-cy="${Math.min(.6, Math.max(.05, i.cy))}"`].join(""), o = e.poster_box, s = o ? ` data-posterbox="${[
o.x0,
(o.px || [])[0],
(o.px || [])[1],
@@ -4107,42 +4107,42 @@ function Ka(e, t, n = !1) {
return `<img class="poster cover ${t === "small" ? "whole" : "front"}" src="${r}"
width="640" height="360" alt="" loading="${n ? "eager" : "lazy"}"${a}${s} data-drop="self">`;
}
-var qa = {
+var Ka = {
kind: "",
html: ""
};
-function Ja(e, n, r, i) {
+function qa(e, n, r, i) {
let a = ie(e, i);
- if (!a) return qa;
- let o = e.has_cover && e.code ? Ia(e, !0) : "", s = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "", c = Ka(e, n, r), l = (c.match(/ data-(?:c[xy]|posterbox)="[^"]*"/g) || []).join(""), u = a === "cover" ? c : `<img class="poster" src="${s}" width="640" height="360" alt="" loading="${r ? "eager" : "lazy"}"${l}>`;
+ if (!a) return Ka;
+ let o = e.has_cover && e.code ? Fa(e, !0) : "", s = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "", c = Ga(e, n, r), l = (c.match(/ data-(?:c[xy]|posterbox)="[^"]*"/g) || []).join(""), u = a === "cover" ? c : `<img class="poster" src="${s}" width="640" height="360" alt="" loading="${r ? "eager" : "lazy"}"${l}>`;
return {
kind: a === "cover" ? "cover" : "thumb",
html: u.replace("<img ", `<img data-jav-image="${e.id}" data-jav-cover="${t(o)}" data-jav-thumb="${t(s)}" data-jav-image-layout="${n}" `)
};
}
-function Ya(e, n, r, i) {
- return e.is_jav ? Ja(e, n, r, i) : e.follow_thumb_url ? {
+function Ja(e, n, r, i) {
+ return e.is_jav ? qa(e, n, r, i) : e.follow_thumb_url ? {
kind: "thumb",
html: `<img class="poster" src="${t(e.follow_thumb_url)}" width="640" height="360" alt="" loading="${r ? "eager" : "lazy"}" referrerpolicy="no-referrer">`
- } : Xa(e, n, r, i);
+ } : Ya(e, n, r, i);
}
-function Xa(e, t, n, r) {
- return e.is_jav ? Ja(e, t, n, r) : e.has_cover && e.cover_key ? {
+function Ya(e, t, n, r) {
+ return e.is_jav ? qa(e, t, n, r) : e.has_cover && e.cover_key ? {
kind: "cover",
- html: Ka(e, t, n)
- } : !e.has_thumb && !e.has_local_poster ? qa : {
+ html: Ga(e, t, n)
+ } : !e.has_thumb && !e.has_local_poster ? Ka : {
kind: "thumb",
html: `<img class="poster" src="/poster?id=${e.id}&c=4" width="640" height="360" alt="" loading="${n ? "eager" : "lazy"}">`
};
}
-function Za(e, t) {
- return Xa(e, "small", !1, t).html || "<span class=\"nopic\">无预览</span>";
+function Xa(e, t) {
+ return Ya(e, "small", !1, t).html || "<span class=\"nopic\">无预览</span>";
}
-function Qa(e, t) {
+function Za(e, t) {
let n = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "";
- return e.is_jav ? ie(e, t) === "cover" ? Ia(e) : n : e.has_cover && e.cover_key ? Ia(e) : n;
+ return e.is_jav ? ie(e, t) === "cover" ? Fa(e) : n : e.has_cover && e.cover_key ? Fa(e) : n;
}
-function $a(e) {
+function Qa(e) {
let t = e.performers || [], n = e.performer_entities || [], r = t[0] || "", i = e.is_jav && r ? "" : e.creator || "";
return {
kind: i ? "creator" : r ? "performer" : "",
@@ -4153,18 +4153,18 @@ function $a(e) {
total: e.performer_total || t.length
};
}
-function eo(e) {
- let { kind: t, name: n, coStarred: r, performers: i, refs: a } = $a(e);
- return r ? `<div class="mavstack">${i.slice(0, 5).map((e, t) => `<span class="mav">${Va(e, a[t], Pa(e))}</span>`).join("")}</div>` : `<span class="mav">${Va(n, t === "performer" ? a[0] : e.creator_entity, t ? Pa(n) : null, t || "performer")}</span>`;
+function $a(e) {
+ let { kind: t, name: n, coStarred: r, performers: i, refs: a } = Qa(e);
+ return r ? `<div class="mavstack">${i.slice(0, 5).map((e, t) => `<span class="mav">${Ba(e, a[t], Na(e))}</span>`).join("")}</div>` : `<span class="mav">${Ba(n, t === "performer" ? a[0] : e.creator_entity, t ? Na(n) : null, t || "performer")}</span>`;
}
-function to(e, t) {
+function eo(e, t) {
let n = (e.performers || [])[0];
return (e.is_jav && n ? n : e.creator) || n || e.studio || e.code || t((e.tags || [])[0] || "") || "为你推荐";
}
//#endregion
//#region src/card-art/framing.ts
-var no = () => window.devicePixelRatio || 1;
-function ro(e) {
+var to = () => window.devicePixelRatio || 1;
+function no(e) {
let t = e.parentElement;
if (!t || ([
"position",
@@ -4183,17 +4183,17 @@ function ro(e) {
delete e.dataset.faceFramed;
let n = new ResizeObserver(() => {
let r = t.getBoundingClientRect();
- r.width > 0 && r.height > 0 && (n.disconnect(), ro(e));
+ r.width > 0 && r.height > 0 && (n.disconnect(), no(e));
});
n.observe(t);
return;
}
- let [r = NaN, i = NaN, a = NaN, o = NaN, s = NaN] = String(e.dataset.facebox).split(" ").map(Number), c = Aa(e.naturalWidth, e.naturalHeight, o, s);
+ let [r = NaN, i = NaN, a = NaN, o = NaN, s = NaN] = String(e.dataset.facebox).split(" ").map(Number), c = ka(e.naturalWidth, e.naturalHeight, o, s);
if (!c) {
e.style.objectPosition = "50% 50%";
return;
}
- let l = Ca({
+ let l = Sa({
cx: r,
cy: i,
faceW: a * c,
@@ -4202,27 +4202,27 @@ function ro(e) {
}, {
w: n.width,
h: n.height
- }, no());
+ }, to());
if (!l) return;
let u = e.style;
u.position = "absolute", u.right = "auto", u.bottom = "auto", u.left = `${l.left}%`, u.top = `${l.top}%`, u.width = `${l.width}%`, u.height = `${l.height}%`, u.maxWidth = "none", u.maxHeight = "none";
}
-function io(e) {
+function ro(e) {
let t = e.naturalWidth / e.naturalHeight;
if (!t) return;
let n = new URL(e.currentSrc || e.src, location.href).searchParams.get("code") || "";
e.dataset.frame = /^FC2(?:-PPV)?-/i.test(n) || t >= 1.65 ? "still" : t > 1.2 ? "sleeve" : "front";
- let r = co(e), i = (t, n, r) => {
+ let r = so(e), i = (t, n, r) => {
if (n == null || !(r > 0 && r < 1)) return;
let i = Math.min(1, Math.max(0, (n - r / 2) / (1 - r)));
e.style.setProperty(t, `${Math.round(i * 100)}%`);
};
- i("--cover-x", lo(e, "cx"), r / t), i("--cover-y", lo(e, "cy"), t / r), ao(e, r), (e.classList.contains("whole") || e.dataset.frame === "front") && Math.abs(t / r - 1) > .02 && oo(e);
+ i("--cover-x", co(e, "cx"), r / t), i("--cover-y", co(e, "cy"), t / r), io(e, r), (e.classList.contains("whole") || e.dataset.frame === "front") && Math.abs(t / r - 1) > .02 && ao(e);
}
-function ao(e, t) {
+function io(e, t) {
if (e.dataset.frame === "front") return;
let [n = NaN, r = NaN, i = NaN, a = NaN, o = NaN, s = NaN] = String(e.dataset.posterbox || "").split(" ").map(Number);
- if (!e.dataset.posterbox && e.dataset.frame === "sleeve" && (r = e.naturalWidth, i = e.naturalHeight, n = Math.round(r - ae * i), a = 0, o = r, s = i), !Aa(e.naturalWidth, e.naturalHeight, r, i)) return;
+ if (!e.dataset.posterbox && e.dataset.frame === "sleeve" && (r = e.naturalWidth, i = e.naturalHeight, n = Math.round(r - ae * i), a = 0, o = r, s = i), !ka(e.naturalWidth, e.naturalHeight, r, i)) return;
let c = oe({
x0: n,
y0: a,
@@ -4230,33 +4230,33 @@ function ao(e, t) {
y1: s,
px: [r, i]
}, t);
- c && (e.style.setProperty("--panel-aspect", `${e.naturalWidth} / ${e.naturalHeight}`), e.classList.add("panel"), e.style.setProperty("--panel-clip", `${c.clip.top}% ${c.clip.right}% ${c.clip.bottom}% ${c.clip.left}%`), e.style.setProperty("--panel-left", `${c.left}%`), e.style.setProperty("--panel-top", `${c.top}%`), e.style.setProperty("--panel-height", `${c.height}%`), oo(e));
+ c && (e.style.setProperty("--panel-aspect", `${e.naturalWidth} / ${e.naturalHeight}`), e.classList.add("panel"), e.style.setProperty("--panel-clip", `${c.clip.top}% ${c.clip.right}% ${c.clip.bottom}% ${c.clip.left}%`), e.style.setProperty("--panel-left", `${c.left}%`), e.style.setProperty("--panel-top", `${c.top}%`), e.style.setProperty("--panel-height", `${c.height}%`), ao(e));
}
-function oo(e) {
+function ao(e) {
e.closest(".pic,[data-media-pic]")?.style.setProperty("--cover-blur", `url("${e.dataset.thumbSrc || e.currentSrc || e.src}")`);
}
-function so(e) {
+function oo(e) {
if (!/[?&]thumb=1(&|$)/.test(e.src) || !e.naturalWidth) return;
let { width: t, height: n } = e.getBoundingClientRect();
- (getComputedStyle(e).objectFit === "contain" ? Math.min : Math.max)(t / e.naturalWidth, n / e.naturalHeight) * no() > 1.01 && (e.dataset.thumbSrc = e.src, e.src = e.src.replace(/[?&]thumb=1(?=&|$)/, ""));
+ (getComputedStyle(e).objectFit === "contain" ? Math.min : Math.max)(t / e.naturalWidth, n / e.naturalHeight) * to() > 1.01 && (e.dataset.thumbSrc = e.src, e.src = e.src.replace(/[?&]thumb=1(?=&|$)/, ""));
}
-function co(e) {
+function so(e) {
let t = getComputedStyle(e).getPropertyValue("--card-ratio").trim().split("/").map(Number), n = t.length === 2 ? Number(t[0]) / Number(t[1]) : Number(t[0]);
return Number.isFinite(n) && n > 0 ? n : 16 / 9;
}
-function lo(e, t) {
+function co(e, t) {
let n = parseFloat(e.dataset[t] ?? "");
return Number.isFinite(n) ? n : null;
}
-var uo = ".pic>img.poster,[data-media-art]>img,.ring>img,[data-tier-ring]>img,[data-person-ring]>img,[data-entity-portrait]>img,[data-hero-ring]>img", fo = /* @__PURE__ */ new WeakMap();
-function po(e) {
- let t = e.matches(uo) ? [e] : e.querySelectorAll(uo);
- for (let e of t) !e.complete && e.parentElement && (e.parentElement.classList.add("imgwait"), fo.set(e.parentElement, performance.now()));
+var lo = ".pic>img.poster,[data-media-art]>img,.ring>img,[data-tier-ring]>img,[data-person-ring]>img,[data-entity-portrait]>img,[data-hero-ring]>img", uo = /* @__PURE__ */ new WeakMap();
+function fo(e) {
+ let t = e.matches(lo) ? [e] : e.querySelectorAll(lo);
+ for (let e of t) !e.complete && e.parentElement && (e.parentElement.classList.add("imgwait"), uo.set(e.parentElement, performance.now()));
}
-function mo(e) {
+function po(e) {
let t = e.parentElement;
if (!t?.classList.contains("imgwait")) return;
- if (performance.now() - (fo.get(t) ?? NaN) < i) {
+ if (performance.now() - (uo.get(t) ?? NaN) < i) {
t.classList.remove("imgwait");
return;
}
@@ -4266,80 +4266,80 @@ function mo(e) {
};
t.addEventListener("transitionend", r), n = setTimeout(r, 1e3);
}
-function ho(e) {
+function mo(e) {
let t = "img.cover,img[data-facebox]", n = e.matches(t) ? [e] : e.querySelectorAll(t);
for (let e of n) {
let t = e;
- t.complete && t.naturalWidth && (t.classList.contains("cover") ? io(t) : (go(t), ro(t)));
+ t.complete && t.naturalWidth && (t.classList.contains("cover") ? ro(t) : (ho(t), no(t)));
}
}
-function go(e) {
+function ho(e) {
let t = e.closest("[data-fit-native]");
if (!t || !e.naturalWidth) return;
- let { small: n, width: r, height: i } = ja(e.naturalWidth, e.naturalHeight, t.clientWidth, t.clientHeight, no());
+ let { small: n, width: r, height: i } = Aa(e.naturalWidth, e.naturalHeight, t.clientWidth, t.clientHeight, to());
t.dataset.nativeSmall = String(n), t.style.setProperty("--markw", n ? r + "px" : "100%"), t.style.setProperty("--markh", n ? i + "px" : "100%");
let a = (e.currentSrc || e.src).replace(/"/g, "%22");
t.style.setProperty("--markbg", n ? `url("${a}")` : "none");
}
-function _o(e) {
+function go(e) {
(e || document).querySelectorAll("[data-fit-native] img").forEach((e) => {
- go(e), e.dataset.facebox && ro(e);
+ ho(e), e.dataset.facebox && no(e);
});
}
-function vo(e, t) {
- for (let n of ce(e, t)) io(n), so(n);
+function _o(e, t) {
+ for (let n of ce(e, t)) ro(n), oo(n);
}
-var yo = !1;
-function bo() {
- yo || (yo = !0, document.addEventListener("load", (e) => {
+var vo = !1;
+function yo() {
+ vo || (vo = !0, document.addEventListener("load", (e) => {
let t = e.target;
- t instanceof HTMLImageElement && (mo(t), go(t), t.classList.contains("cover") ? (io(t), so(t)) : t.dataset.facebox && ro(t));
+ t instanceof HTMLImageElement && (po(t), ho(t), t.classList.contains("cover") ? (ro(t), oo(t)) : t.dataset.facebox && no(t));
}, !0), new MutationObserver((e) => {
- for (let t of e) for (let e of t.addedNodes) e.nodeType === Node.ELEMENT_NODE && (po(e), ho(e));
+ for (let t of e) for (let e of t.addedNodes) e.nodeType === Node.ELEMENT_NODE && (fo(e), mo(e));
}).observe(document.body, {
childList: !0,
subtree: !0
}), document.addEventListener("error", (e) => {
let t = e.target;
- t instanceof HTMLImageElement && !t.dataset.fallbacks && mo(t);
+ t instanceof HTMLImageElement && !t.dataset.fallbacks && po(t);
}, !0));
}
//#endregion
//#region src/card-art/hover.ts
-var xo = ".card,[data-media-card],[data-mix-card]", U = {
+var bo = ".card,[data-media-card],[data-mix-card]", U = {
selecting: () => !1,
censored: () => !1,
delaySeconds: () => 0
};
-function So(e) {
+function xo(e) {
U = e;
}
-var Co = () => !!window.__scrolling;
-function wo(e = document, t = null) {
- !e || !e.querySelectorAll || (e.querySelectorAll(xo).forEach((e) => {
+var So = () => !!window.__scrolling;
+function Co(e = document, t = null) {
+ !e || !e.querySelectorAll || (e.querySelectorAll(bo).forEach((e) => {
e !== t && e._stopHover && e._stopHover();
}), e.querySelectorAll("video.hv").forEach((e) => {
- e.closest(xo) !== t && (e._hop && clearInterval(e._hop), e.pause(), e.removeAttribute("src"), e.load(), e.remove());
+ e.closest(bo) !== t && (e._hop && clearInterval(e._hop), e.pause(), e.removeAttribute("src"), e.load(), e.remove());
}), e.querySelectorAll("img.hvframes").forEach((e) => {
- e.closest(xo) !== t && (e.removeAttribute("src"), e.remove());
+ e.closest(bo) !== t && (e.removeAttribute("src"), e.remove());
}));
}
-function To(e) {
- e._stopHover?.(), wo(e);
+function wo(e) {
+ e._stopHover?.(), Co(e);
}
-function Eo(e, t, n) {
+function To(e, t, n) {
n ? e.dataset[t] = "" : delete e.dataset[t];
}
-function Do(e, t) {
+function Eo(e, t) {
let n = e, r = e.querySelector("[data-media-pic]");
if (!r) return;
e.dataset.hoverMode = t.location === "local" ? "video" : "frames";
let i, a = () => {
- clearTimeout(i), U.delaySeconds() && (Eo(e, "previewing", !0), i = setTimeout(() => {
- U.delaySeconds() && Eo(e, "longhover", !0);
+ clearTimeout(i), U.delaySeconds() && (To(e, "previewing", !0), i = setTimeout(() => {
+ U.delaySeconds() && To(e, "longhover", !0);
}, U.delaySeconds() * 1e3));
}, o = () => {
- clearTimeout(i), Eo(e, "previewing", !1), Eo(e, "longhover", !1);
+ clearTimeout(i), To(e, "previewing", !1), To(e, "longhover", !1);
};
if (t.location !== "local") {
if (!t.has_thumb) return;
@@ -4363,9 +4363,9 @@ function Do(e, t) {
}
let s, c = null;
e.addEventListener("mouseenter", () => {
- U.selecting() || U.censored() || Co() || (s = setTimeout(() => {
- if (Co() || U.censored()) return;
- wo(document, e);
+ U.selecting() || U.censored() || So() || (s = setTimeout(() => {
+ if (So() || U.censored()) return;
+ Co(document, e);
let n = document.createElement("video");
c = n, n.className = "hv", n.muted = !0, n.playsInline = !0, n.loop = !0, n.preload = "metadata", n.src = "/stream?id=" + t.id;
let i = [
@@ -4395,7 +4395,7 @@ function Do(e, t) {
}
//#endregion
//#region src/entity-skeleton.ts
-function Oo(e, t, n) {
+function Do(e, t, n) {
return `<section data-skeleton="entity/${e}" role="status" aria-label="正在读取资料">
<span class="sr-only">正在读取资料</span><div aria-hidden="true">
<section class="entityhero"><div class="entityprofile"><div class="entityportrait ${e === "studio" || e === "agency" ? "square " : ""}skeleton"></div>
@@ -4409,7 +4409,7 @@ function Oo(e, t, n) {
}
//#endregion
//#region src/follow-sort.ts
-var ko = [
+var Oo = [
["checked", "检查时间"],
["added", "添加时间"],
["name", "创作者名称"],
@@ -4417,7 +4417,7 @@ var ko = [
["source", "来源名称"],
["provider", "站点"],
["status", "状态"]
-], Ao = "checked", jo = {
+], ko = "checked", Ao = {
checked: "desc",
added: "desc",
name: "asc",
@@ -4425,38 +4425,38 @@ var ko = [
source: "asc",
provider: "asc",
status: "asc"
-}, Mo = (e) => ko.some(([t]) => t === e);
-function No(e, t) {
- let n = Mo(e) ? e : Ao;
+}, jo = (e) => Oo.some(([t]) => t === e);
+function Mo(e, t) {
+ let n = jo(e) ? e : ko;
return {
sort: n,
- dir: t === "asc" || t === "desc" ? t : jo[n]
+ dir: t === "asc" || t === "desc" ? t : Ao[n]
};
}
//#endregion
//#region src/island-skeleton.ts
-var Po = "inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden font-sans", Fo = {
+var No = "inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden font-sans", Po = {
medium: "h-9 rounded-2lg p-2 text-body-medium",
small: "h-8 rounded-lg px-2 py-1.5 text-body-medium"
-}, Io = {
- medium: Fo.medium,
+}, Fo = {
+ medium: Po.medium,
small: "size-8 rounded-lg p-0 text-body-medium"
-}, Lo = {
+}, Io = {
medium: "size-5 shrink-0",
small: "size-[18px] shrink-0"
-}, Ro = {
+}, Lo = {
medium: "inline-flex items-center justify-center px-1 shrink-0",
small: "inline-flex items-center justify-center px-0.5 shrink-0"
-}, zo = {
+}, Ro = {
primary: "bg-button-primary text-text-white shadow-xs",
secondary: "bg-background-primary-default text-text-primary border border-border-button-default shadow-xs",
ghost: "bg-button-ghost-background text-button-ghost-foreground"
-}, Bo = (e, t) => `<svg class="${t}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><use href="#i-${e}"/></svg>`;
+}, zo = (e, t) => `<svg class="${t}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><use href="#i-${e}"/></svg>`;
function W({ variant: e = "primary", size: t = "medium", glyph: n, label: r, attrs: i = "", compact: a = !1 }) {
- let o = r ? Fo[t] : Io[t], s = n ? Bo(n, Lo[t]) : "", c = r ? `<span class="${Ro[t]}"${a ? " data-compact-label" : ""}>${r}</span>` : "";
- return `<button type="button" class="${Po} ${o} ${zo[e]}"${i ? ` ${i}` : ""}>${s}${c}</button>`;
+ let o = r ? Po[t] : Fo[t], s = n ? zo(n, Io[t]) : "", c = r ? `<span class="${Lo[t]}"${a ? " data-compact-label" : ""}>${r}</span>` : "";
+ return `<button type="button" class="${No} ${o} ${Ro[e]}"${i ? ` ${i}` : ""}>${s}${c}</button>`;
}
-var Vo = {
+var Bo = {
md: {
box: "gap-1.5 px-2.5 py-2 text-body-medium",
value: "gap-[5px]",
@@ -4468,33 +4468,33 @@ var Vo = {
chevron: "size-3.5"
}
};
-function Ho(e, { size: t = "md", className: n = "", attrs: r = "" } = {}) {
- let i = Vo[t];
- return `<div class="group flex flex-col${n ? ` ${n}` : ""}"><button type="button" aria-haspopup="listbox"${r ? ` ${r}` : ""} class="flex w-full items-center justify-between rounded-2lg border border-border-button-default bg-background-primary-default shadow-xs text-text-primary ${i.box}"><span class="flex min-w-0 items-center truncate ${i.value}">${e}</span>${Bo("chevron-down", `shrink-0 text-text-secondary ${i.chevron}`)}</button></div>`;
+function Vo(e, { size: t = "md", className: n = "", attrs: r = "" } = {}) {
+ let i = Bo[t];
+ return `<div class="group flex flex-col${n ? ` ${n}` : ""}"><button type="button" aria-haspopup="listbox"${r ? ` ${r}` : ""} class="flex w-full items-center justify-between rounded-2lg border border-border-button-default bg-background-primary-default shadow-xs text-text-primary ${i.box}"><span class="flex min-w-0 items-center truncate ${i.value}">${e}</span>${zo("chevron-down", `shrink-0 text-text-secondary ${i.chevron}`)}</button></div>`;
}
-var Uo = "flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5 max-compact:flex-col max-compact:items-start max-compact:gap-3 max-compact:p-4 dark:bg-background-primary-default", Wo = "flex min-w-0 flex-col gap-2", Go = "text-body-regular text-text-secondary", Ko = "text-display-4-medium tabular-nums text-text-primary", qo = "relative inline-block h-8 w-24 rounded-2lg align-middle skeleton-sheen";
-function Jo(e) {
- return `<div data-collection-summary="" class="${Uo}"><div class="${Wo}"><span class="${Go}">${e}</span><strong class="${Ko}"><span data-skeleton="count" aria-hidden="true" class="${qo}"></span></strong></div></div>`;
+var Ho = "flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5 max-compact:flex-col max-compact:items-start max-compact:gap-3 max-compact:p-4 dark:bg-background-primary-default", Uo = "flex min-w-0 flex-col gap-2", Wo = "text-body-regular text-text-secondary", Go = "text-display-4-medium tabular-nums text-text-primary", Ko = "relative inline-block h-8 w-24 rounded-2lg align-middle skeleton-sheen";
+function qo(e) {
+ return `<div data-collection-summary="" class="${Ho}"><div class="${Uo}"><span class="${Wo}">${e}</span><strong class="${Go}"><span data-skeleton="count" aria-hidden="true" class="${Ko}"></span></strong></div></div>`;
}
//#endregion
//#region src/configuration-skeleton.ts
-var Yo = (e, t) => `<section aria-label="${e}" class="flex w-full flex-col gap-2"><p class="w-full px-3 text-body-2-medium text-text-secondary">${e}</p><div class="flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3">${t}<div class="-ml-3 flex flex-wrap items-center justify-end gap-3 rounded-b-2xl border-t border-separator-border bg-card-footer px-3 py-3">${W({
+var Jo = (e, t) => `<section aria-label="${e}" class="flex w-full flex-col gap-2"><p class="w-full px-3 text-body-2-medium text-text-secondary">${e}</p><div class="flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3">${t}<div class="-ml-3 flex flex-wrap items-center justify-end gap-3 rounded-b-2xl border-t border-separator-border bg-card-footer px-3 py-3">${W({
label: "保存配置",
attrs: "disabled data-skeleton-action"
})}</div></div></section>`, G = (e, t = "", n = "configuration-skeleton-toggle") => `<div class="flex min-h-[52px] w-full items-center justify-between gap-4 py-2.5 pr-2.5 border-b border-separator-border last:border-b-0"><div class="flex min-w-0 flex-col"><p class="text-body-regular text-text-primary">${e}</p>${t ? `<p class="text-body-2-regular text-text-secondary">${t}</p>` : ""}</div><span class="skeleton ${n}"></span></div>`;
-function Xo() {
+function Yo() {
return `<div class="peach-react"><div class="configpage">${`<div class="board-local-nav" data-section-nav data-section-items>${[
"通用",
"媒体",
"下载",
"网络与访问",
"维护"
- ].map((e, t) => `<button type="button" tabindex="-1" aria-selected="${t === 0}">${e}</button>`).join("")}</div>`}<div class="flex flex-col gap-6">${Yo("开机自启", `<div class="flex flex-col">${G("开机后启动 Peach")}${G("静默启动", "开机后只显示托盘图标,不打开网页。")}${G("在桌面创建快捷方式", "双击图标打开 Peach 网页。")}</div>`)}${Yo("自动更新", `<div class="flex flex-col">${G("自动检查新版本")}${G("自动下载更新")}${G("检查频率", "", "configuration-skeleton-select")}</div>`)}</div></div></div>`;
+ ].map((e, t) => `<button type="button" tabindex="-1" aria-selected="${t === 0}">${e}</button>`).join("")}</div>`}<div class="flex flex-col gap-6">${Jo("开机自启", `<div class="flex flex-col">${G("开机后启动 Peach")}${G("静默启动", "开机后只显示托盘图标,不打开网页。")}${G("在桌面创建快捷方式", "双击图标打开 Peach 网页。")}</div>`)}${Jo("自动更新", `<div class="flex flex-col">${G("自动检查新版本")}${G("自动下载更新")}${G("检查频率", "", "configuration-skeleton-select")}</div>`)}</div></div></div>`;
}
//#endregion
//#region src/management-skeletons.ts
-var K = "relative overflow-hidden skeleton-sheen bg-background-tertiary-default rounded-lg", q = (e = "60%") => `<span class="${K} inline-block max-w-full align-middle" style="width:${e};height:1em"></span>`, Zo = "disabled data-skeleton-action", Qo = "min-w-0 rounded-2-5xl bg-background-secondary-default p-5 flex flex-col gap-4 max-sm:p-4";
-function $o() {
+var K = "relative overflow-hidden skeleton-sheen bg-background-tertiary-default rounded-lg", q = (e = "60%") => `<span class="${K} inline-block max-w-full align-middle" style="width:${e};height:1em"></span>`, Xo = "disabled data-skeleton-action", Zo = "min-w-0 rounded-2-5xl bg-background-secondary-default p-5 flex flex-col gap-4 max-sm:p-4";
+function Qo() {
let e = [
"馆藏视频",
"看过",
@@ -4505,7 +4505,7 @@ function $o() {
<span class="flex min-w-0 items-center gap-2 px-4 text-body-regular text-text-secondary max-sm:gap-1.5 max-sm:px-3"><i class="${K} size-7 max-sm:size-6"></i>${e}</span>
<b class="px-4 pt-3 pb-4 text-title-1-medium max-sm:px-3 max-sm:pb-3">${q("4em")}</b>
<small class="mt-auto block min-h-9.5 bg-card-footer px-4 py-2.5 text-caption-1-regular max-sm:px-3 max-sm:py-2">${q("6em")}</small>
- </div>`).join(""), t = (e) => `<section class="${Qo}" data-stats-chart>
+ </div>`).join(""), t = (e) => `<section class="${Zo}" data-stats-chart>
<header class="flex flex-wrap items-end justify-between gap-x-4 gap-y-1"><span class="flex min-w-0 flex-col gap-1"><h3 class="text-title-2-medium text-text-primary">${e}</h3><b class="text-display-4-medium">${q("4em")}</b></span><small class="text-caption-1-regular text-text-secondary">个视频</small></header>
<svg class="h-75 w-full max-sm:h-65 text-background-tertiary-default" viewBox="0 0 200 200" fill="none" stroke="currentColor" stroke-width="12">${[
76,
@@ -4522,7 +4522,7 @@ function $o() {
"时长",
"画质",
"文件类型"
- ].map((e) => `<section class="${Qo}"><h3 class="text-title-2-medium">${e}</h3><div class="${K} h-64"></div></section>`).join("")}</div>
+ ].map((e) => `<section class="${Zo}"><h3 class="text-title-2-medium">${e}</h3><div class="${K} h-64"></div></section>`).join("")}</div>
</div>
</div>
<section class="rounded-surface bg-background-secondary-default dark:bg-background-primary-default">
@@ -4535,7 +4535,7 @@ function $o() {
</section>
</div></div>`;
}
-function es() {
+function $o() {
let e = `<div class="duplicate-row items-center gap-3 border-t border-separator-border px-5 py-4 max-compact:p-4">
<span class="${K} row-span-2 inline-grid aspect-16/10 w-full rounded-2lg"></span>
<span class="text-body-regular max-duplicate-narrow:col-start-2 max-duplicate-narrow:-col-end-1">${q("70%")}</span>
@@ -4552,18 +4552,18 @@ function es() {
variant: "secondary",
size: "small",
label: e,
- attrs: Zo
+ attrs: Xo
})).join("")}</span>
</div>${e.repeat(2)}</section>`;
return `<div class="peach-react"><div class="mx-auto w-full max-w-board pb-10.5">
<div data-collection-summary class="mb-5 flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5 max-compact:flex-col max-compact:items-start max-compact:gap-3 max-compact:p-4 dark:bg-background-primary-default">
<div class="flex min-w-0 flex-col gap-2"><span class="text-body-regular text-text-secondary">重复内容</span><strong class="text-display-4-medium">${q("4em")}</strong></div><p class="text-body-regular text-text-secondary">${q("12em")}</p>
</div>
- <div data-filter-glass data-glass-pane class="mb-5.5 flex flex-wrap items-center gap-x-2.5 gap-y-2 px-4 py-2.5"><h3 class="mr-1 text-body-medium">批量保留</h3>${["全部保留最大", "全部保留最长"].map((e) => `<button ${Zo} class="h-7.5 rounded-full border border-separator-border px-3 text-body-2-medium">${e}</button>`).join("")}</div>
+ <div data-filter-glass data-glass-pane class="mb-5.5 flex flex-wrap items-center gap-x-2.5 gap-y-2 px-4 py-2.5"><h3 class="mr-1 text-body-medium">批量保留</h3>${["全部保留最大", "全部保留最长"].map((e) => `<button ${Xo} class="h-7.5 rounded-full border border-separator-border px-3 text-body-2-medium">${e}</button>`).join("")}</div>
${t.repeat(2)}
</div></div>`;
}
-function ts() {
+function es() {
let e = `<li class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card border border-separator-border flex flex-col gap-3 p-3">
<div class="flex min-w-0 gap-4"><span class="${K} inline-grid w-card-cover shrink-0 aspect-card-cover rounded-2lg"></span>
<div class="flex min-w-0 flex-1 flex-col gap-1.5"><h3 class="text-headline-medium">${q("80%")}</h3><p class="text-body-2-regular">${q("60%")}</p></div>
@@ -4572,31 +4572,31 @@ function ts() {
variant: "secondary",
size: "small",
label: "查看版本",
- attrs: Zo
+ attrs: Xo
})}</footer>
</li>`;
return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">
- ${Jo("待升级")}
+ ${qo("待升级")}
<ul class="card-grid-cover gap-5">${e.repeat(6)}</ul>
</div></div>`;
}
//#endregion
//#region src/board-skeleton.ts
-var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ns = () => `${J("80%")}${J("48%")}`, Y = (e, t) => e.repeat(t), rs = (e, t = "metricstrip") => `<div class="${t}">${e.map((e) => `<div class="tastesummary"><span class="board-stat-label">${e}</span><b class="board-stat-value">${J("45%")}</b><small class="board-stat-footer">${J("60%")}</small></div>`).join("")}</div>`, is = (e, t) => `<div class="${t} skeleton-segments" data-board-segments="true">${e.map((e, t) => `<span${t === 0 ? " class=\"skeleton-segment-selected\"" : ""}>${e}</span>`).join("")}</div>`, as = (e) => `<section class="insightpanel"><header>${e}</header><div class="insightpanelbody skeleton-lines">${Y(ns(), 3)}</div></section>`, X = "disabled data-skeleton-action", Z = (e) => `<span class="skeleton skeleton-text" style="width:${e}"></span>`, Q = (e, t, n = !1) => `<span class="skeleton" style="width:${e}px;height:${t}px;flex:none${n ? ";border-radius:50%" : ""}"></span>`, os = "min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-3 px-6 py-5 max-sm:gap-2 max-sm:p-4", ss = () => `<div class="inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6">${[
+var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ts = () => `${J("80%")}${J("48%")}`, Y = (e, t) => e.repeat(t), ns = (e, t = "metricstrip") => `<div class="${t}">${e.map((e) => `<div class="tastesummary"><span class="board-stat-label">${e}</span><b class="board-stat-value">${J("45%")}</b><small class="board-stat-footer">${J("60%")}</small></div>`).join("")}</div>`, rs = (e, t) => `<div class="${t} skeleton-segments" data-board-segments="true">${e.map((e, t) => `<span${t === 0 ? " class=\"skeleton-segment-selected\"" : ""}>${e}</span>`).join("")}</div>`, is = (e) => `<section class="insightpanel"><header>${e}</header><div class="insightpanelbody skeleton-lines">${Y(ts(), 3)}</div></section>`, X = "disabled data-skeleton-action", Z = (e) => `<span class="skeleton skeleton-text" style="width:${e}"></span>`, Q = (e, t, n = !1) => `<span class="skeleton" style="width:${e}px;height:${t}px;flex:none${n ? ";border-radius:50%" : ""}"></span>`, as = "min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-3 px-6 py-5 max-sm:gap-2 max-sm:p-4", os = () => `<div class="inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6">${[
"关注创作者",
"启用来源",
"检查失败",
"未看更新",
"JAV 订阅",
"未看新作"
-].map((e) => `<div class="${os}"><span class="text-body-medium text-text-secondary">${e}</span><b class="text-title-1-medium tabular-nums text-text-primary">${Z("3em")}</b></div>`).join("")}</div>`, cs = () => `<div data-section-nav data-section-items class="flex max-w-full flex-nowrap overflow-x-auto">${[
+].map((e) => `<div class="${as}"><span class="text-body-medium text-text-secondary">${e}</span><b class="text-title-1-medium tabular-nums text-text-primary">${Z("3em")}</b></div>`).join("")}</div>`, ss = () => `<div data-section-nav data-section-items class="flex max-w-full flex-nowrap overflow-x-auto">${[
"关注列表",
"添加关注",
"JAV 订阅源",
"想要",
"来源和凭证"
-].map((e, t) => `<span class="whitespace-nowrap" aria-selected="${t === 0}">${e}</span>`).join("")}</div>`, ls = (e = "") => `<span class="group inline-flex items-center select-none gap-2"><span class="flex shrink-0 items-center justify-center rounded-sm size-4 border bg-background-primary-default shadow-xs border-border-checkbox-default"></span>${e ? `<span class="text-body-medium text-text-primary">${e}</span>` : ""}</span>`, us = ({ table: e, sort: t, dir: n }) => {
- let r = ko.find(([e]) => e === t)[1];
+].map((e, t) => `<span class="whitespace-nowrap" aria-selected="${t === 0}">${e}</span>`).join("")}</div>`, cs = (e = "") => `<span class="group inline-flex items-center select-none gap-2"><span class="flex shrink-0 items-center justify-center rounded-sm size-4 border bg-background-primary-default shadow-xs border-border-checkbox-default"></span>${e ? `<span class="text-body-medium text-text-primary">${e}</span>` : ""}</span>`, ls = ({ table: e, sort: t, dir: n }) => {
+ let r = Oo.find(([e]) => e === t)[1];
return `<div class="flex flex-wrap items-center gap-2 follow-skeleton-toolbar"><h3 class="mr-auto text-title-2-medium text-text-primary">关注列表</h3><span class="text-body-2-regular text-text-secondary">${Z("132px")}</span>${W({
glyph: "refresh-cw",
label: "检查全部",
@@ -4610,7 +4610,7 @@ var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ns =
variant: "ghost",
glyph: "table",
attrs: `aria-pressed="${e}"`
- })}</span>${Ho(r)}${W({
+ })}</span>${Vo(r)}${W({
variant: "secondary",
glyph: n === "asc" ? "arrow-up" : "arrow-down"
})}${e ? "" : W({
@@ -4620,7 +4620,7 @@ var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ns =
compact: !0,
attrs: X
})}</div>`;
-}, ds = () => `<span class="flex shrink-0 items-center gap-1">${W({
+}, us = () => `<span class="flex shrink-0 items-center gap-1">${W({
variant: "secondary",
size: "small",
glyph: "refresh-cw",
@@ -4630,7 +4630,7 @@ var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ns =
size: "small",
glyph: "trash",
attrs: X
-})}</span>`, fs = () => `<div class="flex min-h-16 flex-wrap items-center gap-3 px-2 py-3 follow-skeleton-source">${ls()}<span class="flex min-w-0 grow flex-col gap-0.5"><span class="text-body-medium">${Z("8em")}</span></span><span class="flex shrink-0 items-center gap-1.5">${Q(14, 14)}</span>${Q(48, 24)}<span class="shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary">${Z("113px")}</span>${ds()}</div>`, ps = (e) => `<section class="min-w-0 bg-background-primary-default rounded-2xl shadow-card flex flex-col overflow-hidden p-2 follow-skeleton-author"><div class="flex flex-wrap items-center gap-3 px-2 py-2.5" data-follow-author-header data-open>${Q(32, 32, !0)}<b class="min-w-0 grow text-body-medium break-words text-text-primary">${Z("92px")}</b>${W({
+})}</span>`, ds = () => `<div class="flex min-h-16 flex-wrap items-center gap-3 px-2 py-3 follow-skeleton-source">${cs()}<span class="flex min-w-0 grow flex-col gap-0.5"><span class="text-body-medium">${Z("8em")}</span></span><span class="flex shrink-0 items-center gap-1.5">${Q(14, 14)}</span>${Q(48, 24)}<span class="shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary">${Z("113px")}</span>${us()}</div>`, fs = (e) => `<section class="min-w-0 bg-background-primary-default rounded-2xl shadow-card flex flex-col overflow-hidden p-2 follow-skeleton-author"><div class="flex flex-wrap items-center gap-3 px-2 py-2.5" data-follow-author-header data-open>${Q(32, 32, !0)}<b class="min-w-0 grow text-body-medium break-words text-text-primary">${Z("92px")}</b>${W({
variant: "secondary",
size: "small",
glyph: "refresh-cw",
@@ -4647,13 +4647,13 @@ var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ns =
glyph: "chevron-up",
label: "收起",
attrs: X
-})}</div><div data-source-divider>${Y(fs(), e)}</div></section>`, ms = () => {
+})}</div><div data-source-divider>${Y(ds(), e)}</div></section>`, ps = () => {
try {
return Number(JSON.parse(localStorage.getItem("peach.settings.v1") || "{}").followPageSize) || 20;
} catch {
return 20;
}
-}, hs = [
+}, ms = [
["select", ""],
["author", "创作者"],
["source", "来源"],
@@ -4661,58 +4661,58 @@ var J = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, ns =
["status", "状态"],
["checked", "上次检查"],
["actions", ""]
-], gs = {
+], hs = {
name: "author",
source: "source",
provider: "provider",
status: "status",
checked: "checked"
-}, _s = "<svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z\" fill=\"currentColor\"/></svg>", vs = (e, { sort: t, dir: n }) => `<div data-board-data-table data-follow-table class="follow-skeleton-table"><div class="w-full overflow-x-auto"><table class="bui-table bui-table-sm"><thead><tr>${hs.map(([e, r]) => r ? `<th><span class="flex items-center gap-0.5">${r}<span data-sort-indicator${gs[t] === e ? ` data-direction="${n === "asc" ? "ascending" : "descending"}"` : ""}>${_s}</span></span></th>` : "<th></th>").join("")}</tr></thead><tbody>${Y(`<tr>${[
- ls(),
+}, gs = "<svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z\" fill=\"currentColor\"/></svg>", _s = (e, { sort: t, dir: n }) => `<div data-board-data-table data-follow-table class="follow-skeleton-table"><div class="w-full overflow-x-auto"><table class="bui-table bui-table-sm"><thead><tr>${ms.map(([e, r]) => r ? `<th><span class="flex items-center gap-0.5">${r}<span data-sort-indicator${hs[t] === e ? ` data-direction="${n === "asc" ? "ascending" : "descending"}"` : ""}>${gs}</span></span></th>` : "<th></th>").join("")}</tr></thead><tbody>${Y(`<tr>${[
+ cs(),
`<span class="flex min-w-0 items-center gap-2">${Q(32, 32, !0)}${Z("5em")}</span>`,
Z("10em"),
`<span class="flex items-center gap-1.5">${Q(14, 14)}${Z("4em")}</span>`,
Q(48, 24),
Z("113px"),
- ds()
-].map((e) => `<td>${e}</td>`).join("")}</tr>`, e)}</tbody></table></div></div>`, ys = (e, t) => `<div class="flex flex-wrap items-center justify-between gap-3"><span class="text-body-2-regular text-text-secondary">${Z("111px")}</span>${Ho(`每页 ${t} ${e ? "条" : "位"}`, { size: "sm" })}${Q(204, 32)}</div>`, bs = (e) => {
- let t = e.followLayout === "table", n = No(e.followSort, e.followDir), r = e.followPageSize || ms(), i = t ? vs(r, n) : `${ls("全选本页")}<div class="flex flex-col gap-3">${ps(3)}${ps(4)}${ps(3)}</div>`;
- return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${ss()}<div class="flex flex-col gap-6">${cs()}<div class="flex flex-col gap-4"><div class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-4 px-6 py-5 max-sm:px-4 follow-skeleton-surface" data-layout="${t ? "table" : "default"}">${us({
+ us()
+].map((e) => `<td>${e}</td>`).join("")}</tr>`, e)}</tbody></table></div></div>`, vs = (e, t) => `<div class="flex flex-wrap items-center justify-between gap-3"><span class="text-body-2-regular text-text-secondary">${Z("111px")}</span>${Vo(`每页 ${t} ${e ? "条" : "位"}`, { size: "sm" })}${Q(204, 32)}</div>`, ys = (e) => {
+ let t = e.followLayout === "table", n = Mo(e.followSort, e.followDir), r = e.followPageSize || ps(), i = t ? _s(r, n) : `${cs("全选本页")}<div class="flex flex-col gap-3">${fs(3)}${fs(4)}${fs(3)}</div>`;
+ return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${os()}<div class="flex flex-col gap-6">${ss()}<div class="flex flex-col gap-4"><div class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-4 px-6 py-5 max-sm:px-4 follow-skeleton-surface" data-layout="${t ? "table" : "default"}">${ls({
table: t,
...n
- })}${i}${ys(t, r)}</div></div></div></div></div>`;
+ })}${i}${vs(t, r)}</div></div></div></div></div>`;
};
-function xs() {
- return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="skeleton-lines">${J("85%")}${J("65%")}${Y(ns(), 4)}</div></aside></div>`;
+function bs() {
+ return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="skeleton-lines">${J("85%")}${J("65%")}${Y(ts(), 4)}</div></aside></div>`;
}
-function Ss() {
- return `<div data-skeleton="detail" role="status" aria-label="正在读取作品详情">${xs()}</div>`;
+function xs() {
+ return `<div data-skeleton="detail" role="status" aria-label="正在读取作品详情">${bs()}</div>`;
}
-function Cs(e, t = {}) {
+function Ss(e, t = {}) {
let n = "";
- if (e === "/stats") n = $o();
- else if (e === "/taste") n = `<div class="tastepage"><header class="tastehead">${is(["浏览器记录", "Peach 内部"], "insightswitch")}${J("24%")}</header><div class="tastestate"></div>${rs([
+ if (e === "/stats") n = Qo();
+ else if (e === "/taste") n = `<div class="tastepage"><header class="tastehead">${rs(["浏览器记录", "Peach 内部"], "insightswitch")}${J("24%")}</header><div class="tastestate"></div>${ns([
"浏览记录",
"口味维度",
"浏览候选",
"私有导出"
- ], "tastesummaries")}<section class="tastehero"><div class="insightcopy"><span>浏览器画像</span><div class="skeleton skeleton-radar"></div></div><div class="tastebars skeleton-lines">${Y(ns(), 4)}</div></section>${as("口味分析")}<div class="board-activity-charts">${as("浏览活动")}${as("时间分布")}</div>${as("标签")}</div>`;
- else if (e === "/follow-manage") n = bs(t);
- else if (e === "/configuration") n = Xo();
+ ], "tastesummaries")}<section class="tastehero"><div class="insightcopy"><span>浏览器画像</span><div class="skeleton skeleton-radar"></div></div><div class="tastebars skeleton-lines">${Y(ts(), 4)}</div></section>${is("口味分析")}<div class="board-activity-charts">${is("浏览活动")}${is("时间分布")}</div>${is("标签")}</div>`;
+ else if (e === "/follow-manage") n = ys(t);
+ else if (e === "/configuration") n = Yo();
else if (e === "/activity") n = `<div class="activitypage">${[
"正在进行",
"被挡下的",
"最近完成"
- ].map((e) => `<section class="activitysection"><h3 class="geist-fieldset-title">${e}</h3><div class="activity-runs"><article class="cleanupfieldset activity-run"><div class="geist-fieldset-content skeleton-lines">${J("35%")}${ns()}</div></article></div></section>`).join("")}</div>`;
- else if (e === "/duplicates") n = es();
- else if (e === "/quality-goals") n = ts();
- else if (e === "/playlists") n = `<section class="playlistpage"><header><div><h2>播放列表</h2><p>保存 Mix,按自己的顺序继续播放。</p></div><div class="playlistcreate skeleton-lines"><span>新播放列表</span>${J("200px")}</div></header><div class="playlistcards">${Y(`<article class="card playlistcard"><div class="mixstack"><div class="pic skeleton"></div></div><div class="mixmeta"><span class="mav skeleton"></span><div class="mixcopy skeleton-lines">${ns()}</div></div></article>`, 6)}</div></section>`;
+ ].map((e) => `<section class="activitysection"><h3 class="geist-fieldset-title">${e}</h3><div class="activity-runs"><article class="cleanupfieldset activity-run"><div class="geist-fieldset-content skeleton-lines">${J("35%")}${ts()}</div></article></div></section>`).join("")}</div>`;
+ else if (e === "/duplicates") n = $o();
+ else if (e === "/quality-goals") n = es();
+ else if (e === "/playlists") n = `<section class="playlistpage"><header><div><h2>播放列表</h2><p>保存 Mix,按自己的顺序继续播放。</p></div><div class="playlistcreate skeleton-lines"><span>新播放列表</span>${J("200px")}</div></header><div class="playlistcards">${Y(`<article class="card playlistcard"><div class="mixstack"><div class="pic skeleton"></div></div><div class="mixmeta"><span class="mav skeleton"></span><div class="mixcopy skeleton-lines">${ts()}</div></div></article>`, 6)}</div></section>`;
else return "";
return `<div class="board-page-skeleton" data-skeleton="board${e}" role="status" aria-label="正在读取页面"><div aria-hidden="true" inert>${n}</div></div>`;
}
//#endregion
//#region src/catalog-onboarding.ts
-var ws = [
+var Cs = [
"loc",
"creator",
"performer",
@@ -4730,9 +4730,9 @@ var ws = [
"jav",
"thumb"
];
-async function Ts(e, t) {
+async function ws(e, t) {
let n = new URLSearchParams();
- for (let t of ws) e[t] && n.set(t, e[t]);
+ for (let t of Cs) e[t] && n.set(t, e[t]);
let [r, i] = await Promise.all([t("/api/facets?" + n), t("/api/items?" + n + "&limit=5")]), a = [...new Set([
...r.creators || [],
...r.tagperformers || [],
@@ -4743,7 +4743,7 @@ async function Ts(e, t) {
return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";
}))).filter(Boolean);
}
-function Es({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {
+function Ts({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {
let o = r ? "<button class=\"geist-button primary\" data-empty-settings>添加内容</button>" : "", s = "<a class=\"geist-button" + (!r || i ? " primary" : "") + "\" href=\"/follow-manage?tab=add\">添加关注</a>";
if (t || n) return a("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" });
if (e !== "catalog") {
@@ -4764,96 +4764,96 @@ function Es({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable:
}
//#endregion
//#region src/catalog-filter-skeleton.ts
-var Ds = 64, Os = (e) => e.replace(/[&<>"]/g, (e) => ({
+var Es = 64, Ds = (e) => e.replace(/[&<>"]/g, (e) => ({
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
"\"": "&quot;"
-})[e]), ks = (e) => e.repeat(Ds);
-function As(e, t) {
- let n = e.map((e) => `<a href="${Os(e.href)}" data-catalog-view="${Os(e.k)}" data-entity-press="" aria-pressed="${t === e.k}">${Os(e.label)}</a>`).join("");
- return "<div class=\"peach-react\"><div class=\"contents\" data-catalog-root=\"\" data-loading=\"\"><div data-catalog-tiers=\"\" aria-busy=\"true\"><div data-catalog-tier=\"performers\" data-skeleton=\"tiers\">" + ks("<span data-catalog-placeholder=\"performer\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + "</div><div data-catalog-tier=\"studios\">" + ks("<span data-catalog-placeholder=\"studio\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + `</div></div><div role="group" aria-label="筛选与排序" data-filter-glass="" data-glass-pane="" data-filter-frame="" data-catalog-frame="" class="sticky top-topbar z-10 mb-5.5 flex flex-col mx-4"><div role="group" aria-label="视图与标签" data-filter-row="top" class="flex h-12 min-w-0 items-center overscroll-x-contain px-3 py-2 gap-1.5 overflow-visible"><div data-catalog-scroll=""><div role="group" aria-label="视图" data-catalog-views="">${n}<span data-entity-sep="" aria-hidden="true"></span></div><div data-catalog-tags=""><span data-catalog-placeholder="tag" aria-hidden="true">` + "<span></span>".repeat(Ds) + "</span></div></div></div><div data-filter-row=\"bottom\" aria-busy=\"true\" class=\"flex min-w-0 items-center gap-3 px-3 py-2 min-h-12\"><span data-catalog-readout=\"\"><span data-skeleton=\"count\" aria-hidden=\"true\" class=\"relative inline-block h-3.5 w-37.5 rounded-md align-middle skeleton-sheen\"></span></span></div></div></div></div>";
+})[e]), Os = (e) => e.repeat(Es);
+function ks(e, t) {
+ let n = e.map((e) => `<a href="${Ds(e.href)}" data-catalog-view="${Ds(e.k)}" data-entity-press="" aria-pressed="${t === e.k}">${Ds(e.label)}</a>`).join("");
+ return "<div class=\"peach-react\"><div class=\"contents\" data-catalog-root=\"\" data-loading=\"\"><div data-catalog-tiers=\"\" aria-busy=\"true\"><div data-catalog-tier=\"performers\" data-skeleton=\"tiers\">" + Os("<span data-catalog-placeholder=\"performer\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + "</div><div data-catalog-tier=\"studios\">" + Os("<span data-catalog-placeholder=\"studio\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + `</div></div><div role="group" aria-label="筛选与排序" data-filter-glass="" data-glass-pane="" data-filter-frame="" data-catalog-frame="" class="sticky top-topbar z-10 mb-5.5 flex flex-col mx-4"><div role="group" aria-label="视图与标签" data-filter-row="top" class="flex h-12 min-w-0 items-center overscroll-x-contain px-3 py-2 gap-1.5 overflow-visible"><div data-catalog-scroll=""><div role="group" aria-label="视图" data-catalog-views="">${n}<span data-entity-sep="" aria-hidden="true"></span></div><div data-catalog-tags=""><span data-catalog-placeholder="tag" aria-hidden="true">` + "<span></span>".repeat(Es) + "</span></div></div></div><div data-filter-row=\"bottom\" aria-busy=\"true\" class=\"flex min-w-0 items-center gap-3 px-3 py-2 min-h-12\"><span data-catalog-readout=\"\"><span data-skeleton=\"count\" aria-hidden=\"true\" class=\"relative inline-block h-3.5 w-37.5 rounded-md align-middle skeleton-sheen\"></span></span></div></div></div></div>";
}
//#endregion
//#region src/catalog-bars.ts
-var js = 3e4, Ms = 0, Ns = (e, t = Ms) => [
+var As = 3e4, js = 0, Ms = (e, t = js) => [
"facets",
e,
t
-], Ps = (e, t, n = Ms) => [
+], Ns = (e, t, n = js) => [
"tops",
e,
t,
n
-], Fs = (e, t = Ms) => [
+], Ps = (e, t = js) => [
"tops",
e,
t
];
-async function Is(t) {
+async function Fs(t) {
let n = String(t), r = await e(`/api/tops?${n}`), i = new URLSearchParams(n);
return r.performers.length || r.studios.length || !i.has("state") ? r : (i.delete("state"), await e(`/api/tops?${i}`));
}
-function Ls(t, n) {
- return Promise.all([L.fetchQuery({
- queryKey: Ns(t),
+function Is(t, n) {
+ return Promise.all([I.fetchQuery({
+ queryKey: Ms(t),
queryFn: () => e(`/api/facets${t ? `?${t}` : ""}`),
- staleTime: js
- }), L.fetchQuery({
- queryKey: Ps(n, t),
- queryFn: () => Is(n),
- staleTime: js
+ staleTime: As
+ }), I.fetchQuery({
+ queryKey: Ns(n, t),
+ queryFn: () => Fs(n),
+ staleTime: As
})]);
}
-function Rs(e) {
- return L.fetchQuery({
- queryKey: Fs(e),
- queryFn: () => Is(e),
- staleTime: js
+function Ls(e) {
+ return I.fetchQuery({
+ queryKey: Ps(e),
+ queryFn: () => Fs(e),
+ staleTime: As
});
}
-function zs() {
- Ms += 1;
+function Rs() {
+ js += 1;
let e = (e) => e.state.fetchStatus === "idle";
- L.removeQueries({
+ I.removeQueries({
queryKey: ["facets"],
predicate: e
- }), L.removeQueries({
+ }), I.removeQueries({
queryKey: ["tops"],
predicate: e
});
}
//#endregion
//#region src/management.ts
-var Bs = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", Vs = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", $ = "<span class=\"skeleton skeleton-text\" aria-hidden=\"true\"></span>", Hs = "type=\"button\" disabled data-skeleton-action", Us = "disabled data-skeleton-action", Ws = "aria-disabled=\"true\"", Gs = (e) => `<div class="peach-react"><div class="flex flex-col gap-4">${e}</div></div>`, Ks = (e, t) => `<div data-geist-fieldset-content>
+var zs = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", Bs = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", $ = "<span class=\"skeleton skeleton-text\" aria-hidden=\"true\"></span>", Vs = "type=\"button\" disabled data-skeleton-action", Hs = "disabled data-skeleton-action", Us = "aria-disabled=\"true\"", Ws = (e) => `<div class="peach-react"><div class="flex flex-col gap-4">${e}</div></div>`, Gs = (e, t) => `<div data-geist-fieldset-content>
<h3 class="text-title-2-medium text-text-primary">${e}</h3>
<p class="text-body-2-regular text-text-secondary">${t}</p></div>`;
-function qs() {
- return Gs(`<section aria-label="扫描与采集" data-geist-fieldset data-cleanup-task data-cleanup-processing data-fieldset-stack>
- ${Ks("扫描与采集", Bs)}
- <footer data-geist-fieldset-footer><a href="/scraping" class="inline-flex items-center justify-center gap-1 whitespace-nowrap font-sans rounded-sm text-body-medium text-accent-600"><span>来源和凭证</span>${Bo("arrow-up", "size-[18px] shrink-0 rotate-90")}</a><span data-button-group data-split-button data-variant="primary">${W({
+function Ks() {
+ return Ws(`<section aria-label="扫描与采集" data-geist-fieldset data-cleanup-task data-cleanup-processing data-fieldset-stack>
+ ${Gs("扫描与采集", zs)}
+ <footer data-geist-fieldset-footer><a href="/scraping" class="inline-flex items-center justify-center gap-1 whitespace-nowrap font-sans rounded-sm text-body-medium text-accent-600"><span>来源和凭证</span>${zo("arrow-up", "size-[18px] shrink-0 rotate-90")}</a><span data-button-group data-split-button data-variant="primary">${W({
glyph: "database",
label: "扫描并补全资料",
- attrs: Us
+ attrs: Hs
})}${W({
glyph: "chevron-down",
- attrs: `${Us} aria-label="更多扫描与采集方式"`
+ attrs: `${Hs} aria-label="更多扫描与采集方式"`
})}</span></footer>
</section>`);
}
-function Js() {
- return Gs(`<section aria-label="媒体修复" data-geist-fieldset data-cleanup-task data-cleanup-processing>
- ${Ks("媒体修复", Vs)}
- <footer data-geist-fieldset-footer>${Ho($, {
+function qs() {
+ return Ws(`<section aria-label="媒体修复" data-geist-fieldset data-cleanup-task data-cleanup-processing>
+ ${Gs("媒体修复", Bs)}
+ <footer data-geist-fieldset-footer>${Vo($, {
className: "w-48",
- attrs: Ws
+ attrs: Us
})}${W({
label: "开始修复",
- attrs: Us
+ attrs: Hs
})}</footer>
</section>`);
}
-function Ys() {
+function Js() {
let e = [
["人工复核", "square-check-big"],
["高清版", "sparkles"],
@@ -4868,8 +4868,8 @@ function Ys() {
<span class="board-plain-stat-head"><span class="board-stat-tile">${n(t)}</span>${e}</span>
<strong>${$}</strong><span class="cleanupmeta">${$}</span></button>`).join("")}</div>
<div class="cleanupgrid">
- <div class="cleanupscraping">${qs()}</div>
- <div class="cleanupmediarepair">${Js()}</div>
+ <div class="cleanupscraping">${Ks()}</div>
+ <div class="cleanupmediarepair">${qs()}</div>
<section class="cleanupfieldset cleanuporganize" data-geist-fieldset data-cleanup-task aria-labelledby="cleanup-loading-organize">
<div class="geist-fieldset-content"><h3 class="geist-fieldset-title" id="cleanup-loading-organize">整理</h3>
<p>按模板给文件改名并归入目录。先预览,确认后执行;执行过的一批可以整批退回。</p>
@@ -4880,7 +4880,7 @@ function Ys() {
<div class="organizepresets">${t}</div>
<p class="cleanupmeta">${$}</p>
</div></div>
- <footer class="geist-fieldset-footer" data-geist-fieldset-footer><button class="geist-button primary" ${Hs}>预览</button></footer>
+ <footer class="geist-fieldset-footer" data-geist-fieldset-footer><button class="geist-button primary" ${Vs}>预览</button></footer>
</section></div>
<section class="resourcesync" aria-labelledby="cleanup-loading-links">
<h2 id="cleanup-loading-links">链接管理</h2>
@@ -4892,19 +4892,19 @@ function Ys() {
"作品资料站"
].map((e) => `<div><span>${e}</span><b>${$}</b></div>`).join("")}</div>
<div class="linkhosts"><span>主要站点</span><b>${$}</b></div></div></div>
- <div class="resourcesyncfooter geist-fieldset-footer" data-geist-fieldset-footer><button class="resourceaction primary" ${Hs}>${n("unlink")}<span>检查死链</span></button></div>
+ <div class="resourcesyncfooter geist-fieldset-footer" data-geist-fieldset-footer><button class="resourceaction primary" ${Vs}>${n("unlink")}<span>检查死链</span></button></div>
</div></section>
<section class="resourcesync" aria-labelledby="cleanup-loading-sync">
<h2 id="cleanup-loading-sync">资源同步</h2>
<div class="resourcesyncbox" data-geist-fieldset data-cleanup-task>
<div class="resourcesyncbody geist-fieldset-content"><h3 class="geist-fieldset-title">文件与记录核对</h3>
<p>按馆藏记录逐条查找本地磁盘与网盘上的文件,列出文件已不存在的记录、空文件夹,以及不再被引用的缓存。</p></div>
- <div class="resourcesyncfooter geist-fieldset-footer" data-geist-fieldset-footer><button class="resourceaction primary" ${Hs}>${n("git-compare")}<span>检查文件</span></button></div>
+ <div class="resourcesyncfooter geist-fieldset-footer" data-geist-fieldset-footer><button class="resourceaction primary" ${Vs}>${n("git-compare")}<span>检查文件</span></button></div>
</div></section></div>`;
}
//#endregion
//#region src/junk-queue.ts
-var Xs = [
+var Ys = [
[
"",
"全部",
@@ -4940,110 +4940,110 @@ var Xs = [
"其它",
"hard-drive"
]
-], Zs = (e) => Xs.find(([t]) => t === e)?.[0] ?? "";
-function Qs(e) {
+], Xs = (e) => Ys.find(([t]) => t === e)?.[0] ?? "";
+function Zs(e) {
let t = new URLSearchParams(e);
return {
- kind: Zs(t.get("type")),
+ kind: Xs(t.get("type")),
view: t.get("view") === "dismissed" ? "dismissed" : "pending"
};
}
-function $s(e = "", t = "pending") {
+function Qs(e = "", t = "pending") {
let n = new URLSearchParams();
e && n.set("type", e), t === "dismissed" && n.set("view", "dismissed");
let r = n.toString();
return `/junk-files${r ? `?${r}` : ""}`;
}
-function ec(e) {
+function $s(e) {
return e === "dismissed" ? {
view: "pending",
label: "返回待判断",
glyph: "rotate-ccw",
- href: $s("", "pending")
+ href: Qs("", "pending")
} : {
view: "dismissed",
label: "已排除",
glyph: "eye-off",
- href: $s("", "dismissed")
+ href: Qs("", "dismissed")
};
}
-var tc = (e) => e === "dismissed" ? "已排除" : "待判断", nc = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${e}"></use></svg>`;
-function rc({ kind: e, view: n }) {
- let r = Xs.map(([r, i, a]) => `<a href="${$s(r, n)}" data-junk-kind-link="${r}"${r === e ? " aria-current=\"page\"" : ""}>${nc(a)}${t(i)}</a>`).join(""), i = ec(n);
- return `<div class="peach-react" data-junk-count-skeleton=""><div data-junk-count=""><div data-junk-summary="" aria-live="polite">${Jo(tc(n))}</div><div data-junk-filters-frame="" data-filter-glass="" data-glass-pane=""><span data-view-glide="" aria-hidden="true" hidden></span><nav data-junk-filters="" aria-label="垃圾文件分类">${r}<i data-junk-divider="" aria-hidden="true"></i><a href="${i.href}" data-junk-view-link="${i.view}"${n === "dismissed" ? " aria-current=\"page\"" : ""}>${nc(i.glyph)}${i.label}</a></nav></div></div></div>`;
+var ec = (e) => e === "dismissed" ? "已排除" : "待判断", tc = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${e}"></use></svg>`;
+function nc({ kind: e, view: n }) {
+ let r = Ys.map(([r, i, a]) => `<a href="${Qs(r, n)}" data-junk-kind-link="${r}"${r === e ? " aria-current=\"page\"" : ""}>${tc(a)}${t(i)}</a>`).join(""), i = $s(n);
+ return `<div class="peach-react" data-junk-count-skeleton=""><div data-junk-count=""><div data-junk-summary="" aria-live="polite">${qo(ec(n))}</div><div data-junk-filters-frame="" data-filter-glass="" data-glass-pane=""><span data-view-glide="" aria-hidden="true" hidden></span><nav data-junk-filters="" aria-label="垃圾文件分类">${r}<i data-junk-divider="" aria-hidden="true"></i><a href="${i.href}" data-junk-view-link="${i.view}"${n === "dismissed" ? " aria-current=\"page\"" : ""}>${tc(i.glyph)}${i.label}</a></nav></div></div></div>`;
}
//#endregion
//#region src/player/controls.ts
-function ic(e, t) {
+function rc(e, t) {
e?.closest(".video-js")?.querySelector(`.vjs-control-bar ${t}`)?.click();
}
//#endregion
//#region src/player/playback.ts
-function ac(e) {
+function ic(e) {
e && (e.paused ? e.play()?.catch(() => {}) : e.pause());
}
-function oc(e, t) {
+function ac(e, t) {
let n = e.duration, r = (e.currentTime || 0) + t;
e.currentTime = Number.isFinite(n) ? Math.max(0, Math.min(n, r)) : Math.max(0, r);
}
//#endregion
//#region src/islands.ts
-var sc = null;
-function cc(e, t, n, r) {
- sc ??= import("/dist/peach-react.js").then((n) => (n.mountToaster(e, t), n)), sc.then((e) => e.showToast(n, r));
+var oc = null;
+function sc(e, t, n, r) {
+ oc ??= import("/dist/peach-react.js").then((n) => (n.mountToaster(e, t), n)), oc.then((e) => e.showToast(n, r));
}
-var lc = null, uc = null;
-function dc(e) {
- return lc ??= import("/dist/peach-react.js").then((t) => (uc = t.configureStage(e), uc)), lc;
+var cc = null, lc = null;
+function uc(e) {
+ return cc ??= import("/dist/peach-react.js").then((t) => (lc = t.configureStage(e), lc)), cc;
}
-var fc = () => uc, pc = null, mc = null;
-function hc(e) {
- return pc ??= import("/dist/peach-react.js").then(async (t) => {
+var dc = () => lc, fc = null, pc = null;
+function mc(e) {
+ return fc ??= import("/dist/peach-react.js").then(async (t) => {
let n = t.configureSettingsPanel(e), r = document.createElement("div");
- return r.dataset.settingsHost = "", await B("settings-panel", r, (e) => (document.body.append(e), e)), mc = n, n;
- }), pc;
+ return r.dataset.settingsHost = "", await B("settings-panel", r, (e) => (document.body.append(e), e)), pc = n, n;
+ }), fc;
}
-var gc = () => mc, _c = null, vc = null;
-function yc(e) {
- return _c ??= import("/dist/peach-react.js").then(async (t) => {
+var hc = () => pc, gc = null, _c = null;
+function vc(e) {
+ return gc ??= import("/dist/peach-react.js").then(async (t) => {
let n = t.configureImmerse(e), r = document.createElement("div");
- return r.dataset.immerseHost = "", await B("immerse", r, (e) => (document.body.append(e), e)), vc = n, n;
- }), _c;
+ return r.dataset.immerseHost = "", await B("immerse", r, (e) => (document.body.append(e), e)), _c = n, n;
+ }), gc;
}
-var bc = () => vc, xc = null, Sc = null;
-function Cc(e) {
- return xc ??= import("/dist/peach-react.js").then((t) => (Sc = t.configureSidebar(e), Sc)), xc;
+var yc = () => _c, bc = null, xc = null;
+function Sc(e) {
+ return bc ??= import("/dist/peach-react.js").then((t) => (xc = t.configureSidebar(e), xc)), bc;
}
-var wc = () => Sc, Tc = null, Ec = null;
-function Dc(e) {
- return Tc ??= import("/dist/peach-react.js").then(async (t) => {
+var Cc = () => xc, wc = null, Tc = null;
+function Ec(e) {
+ return wc ??= import("/dist/peach-react.js").then(async (t) => {
let n = t.configureManageHeader(e);
- return await B("manage-header", e.root, (e) => (e.replaceChildren(), e)), Ec = n, n;
- }), Tc;
+ return await B("manage-header", e.root, (e) => (e.replaceChildren(), e)), Tc = n, n;
+ }), wc;
}
-var Oc = () => Ec, kc = null, Ac = null;
-function jc(e) {
- return kc ??= import("/dist/peach-react.js").then(async (t) => {
+var Dc = () => Tc, Oc = null, kc = null;
+function Ac(e) {
+ return Oc ??= import("/dist/peach-react.js").then(async (t) => {
let n = t.configureBatchDock(e);
- return await B("batch-dock", e.root), Ac = n, n;
- }), kc;
+ return await B("batch-dock", e.root), kc = n, n;
+ }), Oc;
}
-var Mc = () => Ac, Nc = null;
-function Pc(e) {
- return Nc ??= import("/dist/peach-react.js").then(async (t) => {
+var jc = () => kc, Mc = null;
+function Nc(e) {
+ return Mc ??= import("/dist/peach-react.js").then(async (t) => {
t.configureGlowPicker(e), await B("glow-picker", e.root);
- }), Nc;
+ }), Mc;
}
-var Fc = null;
+var Pc = null;
Gr(() => {
import("/dist/peach-react.js").catch(() => {});
});
-function Ic(e) {
- if (!Fc) {
+function Fc(e) {
+ if (!Pc) {
let t = import("/dist/peach-react.js").then((t) => (t.configureRouter(e), t));
- Jr(t.then((e) => e.prefetchManagedRoute)), Fc = t.then(() => void 0);
+ Jr(t.then((e) => e.prefetchManagedRoute)), Pc = t.then(() => void 0);
}
- return Fc;
+ return Pc;
}
//#endregion
-export { Se as ACCENTS, Ft as ACCENT_CHOICES, it as COVER_FRONT_RATIO, Dn as CancelledError, Ce as DEFAULT_ACCENT, Me as DEFAULT_HOME_GLOW, Ue as DEFAULT_SETTINGS, ue as DEFAULT_SIDEBAR_ORDER, ba as FACE_CEILING, va as FACE_TARGET, He as FEED_COMPILATION_KEYS, Be as FOLLOW_INITIAL_DAYS, ve as GLASS_NATIVE_PRESET, _e as GLOW_SPOT_LABELS, De as GLOW_SWATCHES, Ee as GLOW_SWATCH_FAMILIES, ye as HOME_GLOW_CHOICES, C as HOME_GLOW_PRESETS, S as HOME_GLOW_SPOTS, Kn as InfiniteQueryObserver, tt as JAV_LAYOUTS, m as JAV_RELEASE_SORT, ur as MEDIA_SOURCES_KEY, lr as MEDIA_SOURCES_URL, Ve as METADATA_REFRESH_DAYS, ya as MIN_FACE_PX, qn as Mutation, Yn as MutationCache, Zn as MutationObserver, Mr as OVERLAY_PATHS, rt as PHOTO_LAYOUTS, nt as PHOTO_SIZES, $n as QueriesObserver, In as Query, er as QueryCache, tr as QueryClient, Bn as QueryObserver, Re as SETTINGS_KEY, p as SORTS, _ as SORT_ALIASES, g as SORT_DIR_WORDS, h as SORT_KEYS, ze as THEME_CHOICES, Ye as THEME_OPTIONS, xt as TILES, ki as activeQueue, Pi as activityPrefill, zr as adoptOverlayState, Oa as advanceImageFallback, T as allowedSetting, E as appSettingsStore, Mt as applyAccent, Tt as applyDensity, jt as applyGlassFaces, At as applyHomeGlow, qe as applySyncedSettings, Qe as applyTheme, ro as avatarFrame, Va as avatarInner, Pr as backgroundOf, _i as barsContext, Mc as batchDockApi, Cs as boardPageSkeleton, Ya as cardArtwork, $a as cardIdentity, st as cardLayoutFor, mt as cardRatio, Es as catalogEmptyHtml, As as catalogFilterSkeletonHtml, Ts as catalogSuggestions, Lt as chooseAccent, It as chooseGlowPreset, ga as clampPage, Ys as cleanupSkeletonHtml, Rr as clearOverlayBackground, ic as clickPlayerControl, Ni as configurationRequestedSection, So as configureHoverPreview, Jr as connectManagedRoutes, io as coverAnchor, oo as coverBackdrop, lo as coverFace, Ka as coverImage, co as coverRatio, Ia as coverUrl, St as currentDensity, ir as dataTagErrorSymbol, rr as dataTagSymbol, Cn as defaultScheduler, yn as defaultShouldDehydrateMutation, bn as defaultShouldDehydrateQuery, y as defaultSortDir, xn as dehydrate, vn as dehydrateQuery, Di as detailOriginAbove, Ei as detailOriginAnchor, Qa as detailPosterUrl, vi as detailReturnBarsContext, Oi as detailReturnNeedsRestore, Ti as detailReturnPath, Ss as detailSkeletonHtml, zs as dropBars, Ha as entityAvatar, Ba as entityFaceImg, Oo as entitySkeletonHtml, pn as environmentManager, nr as experimental_streamedQuery, Ga as faceBoxAttrs, Ca as faceFrame, Ua as faceOrigin, Wa as facePos, Aa as faceSourceScale, Sa as faceZoom, ii as failManagedRoute, Ls as fetchBars, dr as fetchMediaSources, Rs as fetchTopsPage, go as fitNativeImage, mn as focusManager, Mi as followDetailReturnPath, la as followJobProgress, Ci as followLastSelectedId, bi as followSelected, ho as frameCachedImages, Te as glowAccent, Pe as glowChipFill, Pt as glowChips, ke as glowColor, xe as glowPalette, be as glowPresetName, pt as gridLayout, xa as hasFaceBox, j as hashKey, Lr as holdOverlayBackground, ot as homeLayout, Sn as hydrate, Da as imageFallbackAttrs, bc as immerseApi, Ui as initBoardControls, bo as installCardArt, On as isCancelledError, w as isNativeGlass, Nr as isOverlayPath, Ut as isServer, Ja as javArtwork, ie as javImageKind, at as javLayout, sa as jobActivityHtml, rc as junkCountSkeletonHtml, $s as junkPath, Qs as junkRoute, rn as keepPreviousData, Si as lastSelectedId, Qr as listenManagedEntry, jc as loadBatchDock, Pc as loadGlowPicker, yc as loadImmerse, Dc as loadManageHeader, pr as loadMediaSources, Ic as loadRouter, hc as loadSettingsPanel, Cc as loadSidebar, dc as loadStage, La as logoUrl, Oc as manageHeaderApi, ia as manageHeaderSkeletonHtml, ta as manageHeaderView, Zr as managedEntries, Yr as managedEntry, Xr as managedTaken, Jt as matchMutation, qt as matchQuery, Xa as mixFace, to as mixLabel, ja as nativeImageFit, ee as nextSortState, k as noop, we as normalizeAccent, We as normalizeAppSettings, Ne as normalizeHomeGlow, re as normalizeJavImage, b as normalizeJavLayout, ne as normalizeJavPreferences, me as normalizeSidebarOrder, F as notifyManager, Ri as notifyShell, I as onlineManager, ei as openManagedRoute, B as openResidentSurface, Vr as overlayState, ha as pageCount, _a as paginationHtml, Le as paintGlassFaces, zt as paintGlowButton, Ie as paintHomeGlow, Ot as paintHomeGlowNow, Dt as paintPhotoSizeButton, oe as panelFrame, Ea as parseFallbacks, M as partialMatchKey, di as peachHistory, Ai as pendingQueueRoute, za as performerLabel, dt as photoLayout, ut as photoSize, Je as postSearchHistoryLimit, ao as posterPanel, te as preferredDirection, Gr as preloadManagedRoutes, ji as presentedItem, L as queryClient, eo as queueAvatarHtml, Za as queueThumbHtml, Ge as readAppSettings, _o as refitNativeImages, Vi as registerDiagnosticsRoute, vo as relayoutCovers, ce as relayoutJavImages, To as releaseHover, wo as releaseHoverPreviews, ri as releaseManagedRoute, Na as rememberRepresentatives, Zt as replaceEqualDeep, Pa as representativeOf, Rt as resetGlowColors, hi as retagOverlay, mi as routeSeen, oc as seekVideoBy, fa as selectGroup, xi as selectMode, ua as selectRange, wi as selectSurface, yi as selected, da as selectionSummary, Eo as setHoverState, gc as settingsPanelApi, mo as settleImage, fi as shellNavigate, Bi as shellVersion, ln as shouldThrowError, cc as showToast, wc as sidebarApi, he as sidebarHasCatalogContent, Zi as sidebarSkeletonHtml, ge as sidebarTagCounts, sn as skipToken, v as sortDirWord, fc as stageApi, pi as startRouting, gi as state, ht as storeHomeLayout, gt as storeJavLayout, yt as storePhotoLayout, vt as storePhotoSize, _t as storeVideoLayout, zi as subscribeShell, Hi as syncBoardRange, se as syncJavImages, pa as syncSelectionToolbar, Br as takeOverlayReturn, O as timeoutManager, Et as toggleDensity, ac as toggleVideoPlayback, Yi as transitionTheme, ar as unsetMarker, ni as updateManagedRoute, so as upgradeCover, ca as watchJob, po as watchPendingImages, et as watchSystemTheme, Bt as wireGlowButton, Do as wireHover, ka as wireImageFallbacks, Fa as withVersion, Li as writeShell };
+export { Ce as ACCENTS, It as ACCENT_CHOICES, at as COVER_FRONT_RATIO, F as CancelledError, we as DEFAULT_ACCENT, Ne as DEFAULT_HOME_GLOW, We as DEFAULT_SETTINGS, ue as DEFAULT_SIDEBAR_ORDER, ya as FACE_CEILING, _a as FACE_TARGET, Ue as FEED_COMPILATION_KEYS, Ve as FOLLOW_INITIAL_DAYS, ye as GLASS_NATIVE_PRESET, ve as GLOW_SPOT_LABELS, Oe as GLOW_SWATCHES, De as GLOW_SWATCH_FAMILIES, be as HOME_GLOW_CHOICES, S as HOME_GLOW_PRESETS, _e as HOME_GLOW_SPOTS, qn as InfiniteQueryObserver, nt as JAV_LAYOUTS, m as JAV_RELEASE_SORT, dr as MEDIA_SOURCES_KEY, ur as MEDIA_SOURCES_URL, He as METADATA_REFRESH_DAYS, va as MIN_FACE_PX, Jn as Mutation, Xn as MutationCache, Qn as MutationObserver, Nr as OVERLAY_PATHS, it as PHOTO_LAYOUTS, rt as PHOTO_SIZES, er as QueriesObserver, Ln as Query, tr as QueryCache, nr as QueryClient, Vn as QueryObserver, ze as SETTINGS_KEY, p as SORTS, _ as SORT_ALIASES, g as SORT_DIR_WORDS, h as SORT_KEYS, Be as THEME_CHOICES, Xe as THEME_OPTIONS, St as TILES, ki as activeQueue, zr as adoptOverlayState, Da as advanceImageFallback, w as allowedSetting, T as appSettingsStore, Nt as applyAccent, Et as applyDensity, Mt as applyGlassFaces, jt as applyHomeGlow, Je as applySyncedSettings, $e as applyTheme, no as avatarFrame, Ba as avatarInner, Fr as backgroundOf, _i as barsContext, jc as batchDockApi, Ss as boardPageSkeleton, Ja as cardArtwork, Qa as cardIdentity, ct as cardLayoutFor, ht as cardRatio, Ts as catalogEmptyHtml, ks as catalogFilterSkeletonHtml, ws as catalogSuggestions, Rt as chooseAccent, Lt as chooseGlowPreset, ha as clampPage, Js as cleanupSkeletonHtml, Rr as clearOverlayBackground, rc as clickPlayerControl, Ni as configurationRequestedSection, xo as configureHoverPreview, Jr as connectManagedRoutes, ro as coverAnchor, ao as coverBackdrop, co as coverFace, Ga as coverImage, so as coverRatio, Fa as coverUrl, Ct as currentDensity, ar as dataTagErrorSymbol, ir as dataTagSymbol, Tn as defaultScheduler, xn as defaultShouldDehydrateMutation, Sn as defaultShouldDehydrateQuery, y as defaultSortDir, Cn as dehydrate, bn as dehydrateQuery, Di as detailOriginAbove, Ei as detailOriginAnchor, Za as detailPosterUrl, vi as detailReturnBarsContext, Oi as detailReturnNeedsRestore, Ti as detailReturnPath, xs as detailSkeletonHtml, Rs as dropBars, Va as entityAvatar, za as entityFaceImg, Do as entitySkeletonHtml, hn as environmentManager, rr as experimental_streamedQuery, Wa as faceBoxAttrs, Sa as faceFrame, Ha as faceOrigin, Ua as facePos, ka as faceSourceScale, xa as faceZoom, ii as failManagedRoute, Is as fetchBars, fr as fetchMediaSources, Ls as fetchTopsPage, ho as fitNativeImage, gn as focusManager, Mi as followDetailReturnPath, ca as followJobProgress, Ci as followLastSelectedId, bi as followSelected, mo as frameCachedImages, Ee as glowAccent, Fe as glowChipFill, Ft as glowChips, Ae as glowColor, Se as glowPalette, xe as glowPresetName, mt as gridLayout, ba as hasFaceBox, A as hashKey, Lr as holdOverlayBackground, st as homeLayout, wn as hydrate, Ea as imageFallbackAttrs, yc as immerseApi, Hi as initBoardControls, yo as installCardArt, kn as isCancelledError, C as isNativeGlass, Pr as isOverlayPath, Wt as isServer, qa as javArtwork, ie as javImageKind, ot as javLayout, oa as jobActivityHtml, nc as junkCountSkeletonHtml, Qs as junkPath, Zs as junkRoute, on as keepPreviousData, Si as lastSelectedId, Qr as listenManagedEntry, Ac as loadBatchDock, Nc as loadGlowPicker, vc as loadImmerse, Ec as loadManageHeader, mr as loadMediaSources, Fc as loadRouter, mc as loadSettingsPanel, Sc as loadSidebar, uc as loadStage, Ia as logoUrl, Dc as manageHeaderApi, ra as manageHeaderSkeletonHtml, ea as manageHeaderView, Zr as managedEntries, Yr as managedEntry, Xr as managedTaken, Yt as matchMutation, Jt as matchQuery, Ya as mixFace, eo as mixLabel, Aa as nativeImageFit, ee as nextSortState, O as noop, Te as normalizeAccent, Ge as normalizeAppSettings, Pe as normalizeHomeGlow, re as normalizeJavImage, b as normalizeJavLayout, ne as normalizeJavPreferences, me as normalizeSidebarOrder, N as notifyManager, Li as notifyShell, P as onlineManager, ei as openManagedRoute, B as openResidentSurface, Vr as overlayState, ma as pageCount, ga as paginationHtml, Re as paintGlassFaces, Bt as paintGlowButton, Le as paintHomeGlow, kt as paintHomeGlowNow, Ot as paintPhotoSizeButton, oe as panelFrame, Ta as parseFallbacks, j as partialMatchKey, di as peachHistory, Ai as pendingQueueRoute, Ra as performerLabel, ft as photoLayout, dt as photoSize, Ye as postSearchHistoryLimit, io as posterPanel, te as preferredDirection, Gr as preloadManagedRoutes, ji as presentedItem, I as queryClient, $a as queueAvatarHtml, Xa as queueThumbHtml, Ke as readAppSettings, go as refitNativeImages, Bi as registerDiagnosticsRoute, _o as relayoutCovers, ce as relayoutJavImages, wo as releaseHover, Co as releaseHoverPreviews, ri as releaseManagedRoute, Ma as rememberRepresentatives, Qt as replaceEqualDeep, Na as representativeOf, zt as resetGlowColors, hi as retagOverlay, mi as routeSeen, ac as seekVideoBy, da as selectGroup, xi as selectMode, la as selectRange, wi as selectSurface, yi as selected, ua as selectionSummary, To as setHoverState, hc as settingsPanelApi, po as settleImage, fi as shellNavigate, zi as shellVersion, dn as shouldThrowError, sc as showToast, Cc as sidebarApi, he as sidebarHasCatalogContent, Xi as sidebarSkeletonHtml, ge as sidebarTagCounts, ln as skipToken, v as sortDirWord, dc as stageApi, pi as startRouting, gi as state, gt as storeHomeLayout, _t as storeJavLayout, bt as storePhotoLayout, yt as storePhotoSize, vt as storeVideoLayout, Ri as subscribeShell, Vi as syncBoardRange, se as syncJavImages, fa as syncSelectionToolbar, Br as takeOverlayReturn, D as timeoutManager, Dt as toggleDensity, ic as toggleVideoPlayback, Ji as transitionTheme, or as unsetMarker, ni as updateManagedRoute, oo as upgradeCover, sa as watchJob, fo as watchPendingImages, tt as watchSystemTheme, Vt as wireGlowButton, Eo as wireHover, Oa as wireImageFallbacks, Pa as withVersion, Ii as writeShell };