book-index-ui 0.48.4 → 0.48.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var ip=Object.create;var Qr=Object.defineProperty;var op=Object.getOwnPropertyDescriptor;var rp=Object.getOwnPropertyNames;var sp=Object.getPrototypeOf,ap=Object.prototype.hasOwnProperty;var lp=(e,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of rp(n))!ap.call(e,s)&&s!==o&&Qr(e,s,{get:()=>n[s],enumerable:!(r=op(n,s))||r.enumerable});return e};var Jn=(e,n,o)=>(o=e!=null?ip(sp(e)):{},lp(n||!e||!e.__esModule?Qr(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("./storage-entry-BNx9e7zn.cjs"),t=require("react/jsx-runtime"),h=require("react"),cp=require("opencc-js/t2cn"),dp=require("react-markdown"),pp=require("remark-gfm"),up=e=>`/book-index?id=${e}`,Na=h.createContext(up);function mp({buildUrl:e,children:n}){const o=h.useMemo(()=>e,[e]);return t.jsx(Na.Provider,{value:o,children:n})}function tt(){return h.useContext(Na)}const Ra="",Ea="";function Mo(e){const n=[];let o=!1,r=e;for(;r.length;){const s=o?Ea:Ra,a=r.indexOf(s);if(a===-1){n.push({text:r,marked:o});break}a>0&&n.push({text:r.slice(0,a),marked:o}),r=r.slice(a+1),o=!o}return n}function lt(e,n){return{title:e,tokens:n}}const es='"Songti SC", "Songti TC", STSong, "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif',gp=[lt("基础(VS Code 环境下跟随 --vscode-*)",{bg:{value:"#ffffff",vscode:"--vscode-editor-background"},fg:{value:"#333333",vscode:"--vscode-foreground"},"input-bg":{value:"#ffffff",vscode:"--vscode-input-background"},"input-fg":{value:"#333333",vscode:"--vscode-input-foreground"},"input-border":{value:"#cccccc",vscode:"--vscode-input-border"},"widget-border":{value:"#e0e0e0",vscode:"--vscode-widget-border"},"link-fg":{value:"#0066cc",vscode:"--vscode-textLink-foreground"},"desc-fg":{value:"#717171",vscode:"--vscode-descriptionForeground"},primary:{value:"#0078d4",vscode:"--vscode-button-background"},"primary-fg":{value:"#ffffff",vscode:"--vscode-button-foreground"},"primary-soft":{value:"rgba(0, 120, 212, 0.15)",css:"color-mix(in srgb, var(--bim-primary) 15%, transparent)"},danger:{value:"#f44336"},warning:{value:"#ff9800"},success:{value:"#4caf50"},"sidebar-bg":{value:"#f3f3f3",vscode:"--vscode-sideBar-background"},"list-hover-bg":{value:"rgba(0, 0, 0, 0.04)",vscode:"--vscode-list-hoverBackground"},"list-active-bg":{value:"rgba(0, 120, 212, 0.1)",vscode:"--vscode-list-activeSelectionBackground"},"focus-border":{value:"#0078d4",vscode:"--vscode-focusBorder"}}),lt("底色层次 / 文字与描边 / 链接",{"bg-subtle":{value:"#fafafa"},"widget-bg":{value:"#f8f8f8"},muted:{value:"#888888"},border:{value:"#e5e5e5"},"primary-bg":{value:"#fdf4f4"},link:{value:"#1976d2"},"tag-bg":{value:"#f0f0f0"},"accent-bg":{value:"#1976d2"},"on-color-fg":{value:"#ffffff",note:"彩色底(徽章、选中态按钮)上的文字"}}),lt("提示与警告",{"info-fg":{value:"#0c5380"},"info-bg":{value:"#e7f3ff"},"info-border":{value:"#b3dbff"},"warn-fg":{value:"#856404"},"warn-bg":{value:"#fff3cd"},"warn-border":{value:"#ffc107"},"danger-bg":{value:"rgba(244, 67, 54, 0.08)",note:"错误提示条底色"},"danger-soft-bg":{value:"rgba(244, 67, 54, 0.03)",note:"编辑器危险区块"},"danger-soft-border":{value:"rgba(244, 67, 54, 0.13)"}}),lt("遮罩与阴影",{backdrop:{value:"rgba(0, 0, 0, 0.5)",note:"对话框遮罩"},"overlay-bg":{value:"#00000010",note:"轻量遮罩底(图片占位等)"},"shadow-dialog":{value:"0 4px 20px rgba(0, 0, 0, 0.3)"},"shadow-dropdown":{value:"0 4px 12px rgba(0, 0, 0, 0.1)"},"shadow-tooltip":{value:"0 2px 8px rgba(0, 0, 0, 0.08)"},"shadow-fab":{value:"0 2px 8px rgba(0, 0, 0, 0.25)",note:"悬浮按钮(反馈)"},"shadow-card":{value:"0 1px 4px rgba(0, 0, 0, 0.06)",note:"展开的卡片"},"shadow-node":{value:"0 1px 3px rgba(0, 0, 0, 0.1)",note:"谱系图节点"},"shadow-node-selected":{value:"0 0 0 3px rgba(0, 120, 212, 0.2), 0 2px 8px rgba(0, 120, 212, 0.3)"}}),lt("条目类型 / 状态徽章",{"type-book":{value:"#c0392b"},"type-work":{value:"#8e6f3e"},"type-collection":{value:"#2471a3"},"type-entity":{value:"#5b3e8e"},"status-draft":{value:"#e67e22"},"status-official":{value:"#27ae60"}}),lt("资源",{"restype-text":{value:"#2196f3"},"restype-image":{value:"#ff9800"},"restype-text-image":{value:"#9c27b0"},"restype-physical":{value:"#795548"},"missing-fg":{value:"#e67e22",note:"资源缺册提示"},"colormode-bw-bg":{value:"#f5f5f5",note:"影印件色彩模式标记(黑白 / 彩色)"},"colormode-bw-fg":{value:"#757575"},"colormode-color-bg":{value:"#fff8e1"},"colormode-color-fg":{value:"#f57f17"},"progress-active":{value:"#f59e0b",note:"资源导入进度"},"progress-done":{value:"#10b981"},"progress-todo":{value:"#9ca3af"},"check-fine-bg":{value:"#e8f5e9",note:"文字资源校对程度徽章(精校 / 粗校 / AI整理)"},"check-fine-fg":{value:"#2e7d32"},"check-rough-bg":{value:"#fff3e0"},"check-rough-fg":{value:"#e65100"},"check-ai-bg":{value:"#e3f2fd"},"check-ai-fg":{value:"#1565c0"}}),lt("整理本(CollatedEdition)",{"highlight-bg":{value:"#fff59d",note:"搜索命中高亮底"},"highlight-fg":{value:"inherit",root:!1},"section-lei":{value:"#8e6f3e",note:"章节类型标记:类 / 书 / 序 / 结语 / 考证 / 注释"},"section-shu":{value:"#c0392b"},"section-xu":{value:"#1a5276"},"section-jieyu":{value:"#7d6608"},"section-kaozhen":{value:"#5d6d7e"},"section-zhushi":{value:"#6c5b7b"},"section-tag-fg":{value:"#e74c3c",note:"章节标记(△ 等)"},"matchstate-fg":{value:"#b78900",note:"与底本匹配状态提示"},"quality-published":{value:"#1b5e20",note:"文本质量等级(出版 / 精校 / 粗校 / OCR)"},"quality-fine":{value:"#2e7d32"},"quality-rough":{value:"#1565c0"},"quality-ocr":{value:"#e65100"}}),lt("版本传承(VersionLineageGraph / List) / 关系方向(RelationPanel)",{"lost-fg":{value:"#c62828",note:"佚失标记"},"confidence-certain":{value:"#2e7d32",note:"关系置信度"},"confidence-consensus":{value:"#1976d2"},"confidence-probable":{value:"#ed6c02"},"confidence-disputed":{value:"#c62828"},"lineage-edge-consensus":{value:"#555555",note:"⚠️ 同为 consensus,List 徽章用 --bim-confidence-consensus(蓝),Graph 连线用这个(灰)。若要统一,覆盖成 var(--bim-confidence-consensus)"},"relation-up":{value:"#2196f3"},"relation-down":{value:"#4caf50"},"relation-flat":{value:"#ff9800"}}),lt("编辑器视图(主要在 guji-platform 插件中可见)",{"editor-type-work":{value:"#4caf50",note:"⚠️ 与展示视图的 --bim-type-* 是两套配色(历史如此)。若要统一,覆盖成对应的 var(--bim-type-*)"},"editor-type-collection":{value:"#2196f3"},"editor-type-book":{value:"#ff9800"},"editor-type-entity":{value:"#9c27b0"},"source-url":{value:"#2196f3",note:"来源类型(SourceEditor)"},"source-bookid":{value:"#4caf50"},"mode-active-bg":{value:"#2196f3",note:"模式指示器当前态(ModeIndicator)"},"cover-accent":{value:"#8e6f3e",note:'书目卡片「封面」点缀(IndexBrowser resultVariant="card")'}}),lt("详情页(作品 / 版本 / 丛编):宣纸 + 朱砂一套独立暖色,不继承 --bim-primary 等控件色",{"page-bg":{value:"#fbf9f3",note:"纸"},"row-hover-bg":{value:"#f5f1e5"},"selection-bg":{value:"#ecdcbc",note:"选区"},"band-bg":{value:"#f0e4cb",note:"全文入口横幅(暖沙)"},"band-bg-hover":{value:"#e6d5b4"},ink:{value:"#2a231c",note:"文字层次:墨 → 正文 → 提要 → meta → 标签 → 提示"},"body-fg":{value:"#3b3228"},"quiet-fg":{value:"#5b4f40"},"meta-fg":{value:"#7b6a54"},"label-fg":{value:"#6f6457",note:"标签 / 提示:2026-09 N3a 调深,纸底与斑马底上对比度均 ≥4.5(原 #a3937b 2.8、#b3a385 2.3)"},"hint-fg":{value:"#756a5e"},accent:{value:"#9c3a2c",note:"朱"},"accent-deep":{value:"#6f2a20",note:"链接 hover"},"rule-strong":{value:"#2a231c",note:"分隔线:强 → 常规 → 虚线 → 提要左线"},rule:{value:"#e4dbc9"},"rule-dashed":{value:"#d6c9ae"},"rule-accent-soft":{value:"#e0d3b6"},"aux-fg":{value:"#6f6457",note:"辅助字(元数据、注记、「·」分隔的浅色小字)。须在 page-bg / zebra-bg 上对比度 ≥4.5(Q5 巡检)"},"card-bg":{value:"#fffdf9",note:"提要卡:抬起的面"},"zebra-bg":{value:"#f6f2eb",note:"表格斑马纹 / 左栏分组底(不画格线,靠这一阶底色分行)"},"tint-bg":{value:"#f3eee6",note:"检索框、悬停"},"shadow-summary":{value:"0 10px 32px rgba(60, 50, 40, 0.07)",note:"提要卡投影"},"flag-bg":{value:"rgba(158, 42, 43, 0.08)",note:"唯一的状态色块「有影印」"},"theme-dot-zhusha":{value:"#9c3a2c",note:"主题切换控件的色点:朱砂(不随主题变,两套主题下都要认得出)"},"theme-dot-indigo":{value:"#2e5266",note:"主题切换控件的色点:靛青"},"theme-dot-ink":{value:"#3b4a58",note:"主题切换控件的色点:墨"},"sect-jing":{value:"#2e5266",note:"四部分布条:經部(人物页提要卡;无别处使用)"},"sect-shi":{value:"#9a7a3b",note:"四部分布条:史部"},"sect-zi":{value:"#4f7a5c",note:"四部分布条:子部"},"sect-ji":{value:"#9fb3bc",note:"四部分布条:集部"},"table-border":{value:"color-mix(in srgb, currentColor 28%, transparent)",root:!1,note:"古籍表格(跟随当前文字色)"},"table-head-bg":{value:"color-mix(in srgb, currentColor 8%, transparent)",root:!1}}),lt('版式(v4 外观系统,overview#291):疏朗=留白分区(默认,下列值即疏朗);界栏=框线分区(`<html data-layout="boxed">`)',{"fr-bd":{value:"0 solid transparent",note:"区块外框(border 简写)。疏朗无框;界栏 1px 实线"},"fr-bg":{value:"transparent",note:"区块底。界栏=卡面色"},"fr-hd-pad":{value:"14px 18px",note:"区块标题栏内边距。10-01 起疏朗也有淡染底的标题栏(--bim-fr-hd-bg),故疏朗 14px 18px,界栏 12px 18px"},"fr-hd-bd":{value:"0 solid transparent",note:"区块标题栏下沿线(border 简写)"},"fr-bd-pad":{value:"0",note:"区块正文内边距"},"fr-gap":{value:"56px",note:"区块之间的间距。界栏收紧到 24px(框线本身已分隔)"},"fr-side-gap":{value:"34px",note:"侧栏各块之间的间距;界栏 20px"},"fr-shadow":{value:"0 1px 0 var(--bim-rule), 0 12px 32px -18px rgba(40, 36, 31, 0.25)",note:"抬起的面(提要卡)的投影;界栏不用投影,靠框线"},"fr-tab-bd":{value:"transparent",note:"页签行下沿线颜色(疏朗不画,界栏画)"},"fr-hd-size":{value:"24px",note:"分区标题字号。界栏标题在框顶标题栏里,小一档 19px"},"fr-hd-bg":{value:"color-mix(in srgb, var(--bim-accent) 7%, var(--bim-page-bg))",note:"分区标题栏底色(淡染主色)。疏朗混进页面底,界栏 6% 混进卡面底。主色取 accent(primary 是 VS Code 按钮蓝,不随配色)"},"fr-card-bd":{value:"1px solid transparent",note:"卡片边框。疏朗不画(靠卡面底与淡投影);界栏 1px"},"fr-card-bg":{value:"var(--bim-card-bg)",note:"卡片底"},"fr-row-bd":{value:"1px solid transparent",note:"列表行线、块内小分割线。疏朗不画(靠行距);界栏 1px"},"fr-row-pad":{value:"10px 2px",note:"列表行内边距。界栏收紧 7px 2px"},"fr-chrome-bd":{value:"1px solid transparent",note:"顶栏、分区导航(吸顶锚点条)的线"},"fr-tag-bd":{value:"1px solid transparent",note:"标签、版本签、计数签、工具按钮的边框。疏朗浅底无框;界栏透明底加框"},"fr-tag-bg":{value:"var(--bim-tint-bg)",note:"标签底"},"fr-tbl-cell-bd":{value:"0 solid transparent",note:"表格格线。疏朗不画(靠斑马纹);界栏全格线"},"fr-tbl-zebra":{value:"var(--bim-tint-bg)",note:"表格斑马纹(只在疏朗下有)"},"fr-rail-bd":{value:"1px solid transparent",note:"侧栏里的块、提示块的边框"},"fr-rail-bg":{value:"var(--bim-tint-bg)",note:"侧栏块底。疏朗浅底;界栏卡面底"},"fr-spine-bd":{value:"1px solid transparent",note:"题签、书脊(竖排书名)的边框。界栏是强调色浅线"},"fr-spine-bg":{value:"var(--bim-flag-bg)",note:"题签、书脊底。疏朗浅色实底;界栏卡面底(正史原志两种版式都是强调色实底)"},"fr-plank":{value:"0 solid transparent",note:"书架架板(border 简写)。只在界栏下画 3px"},"fr-axis-bd":{value:"0 solid transparent",note:"时间轴轴线。界栏 1px"},"fr-axis-band":{value:"6px",note:"时间轴底带高度。疏朗用 6px 浅色带代替轴线;界栏 0"},"fr-tick":{value:"0",note:"时间轴刻度短线长度。界栏 5px"},"fr-band-gap":{value:"3px",note:"年代带各段之间的空隙。疏朗 3px;界栏紧贴"},"fr-band-bd":{value:"0 solid transparent",note:"年代带外框与段间分隔。界栏 1px"}}),lt("阅读器(整理本 / 全文)",{"reader-top":{value:"0px",note:"宿主吸顶导航的高度:阅读器工具条、目录与书影侧栏在它下面吸顶(如 60px)"},"reader-warm":{value:"#c9a24a",note:"阅读设置侧栏的暖黄:只做底色(8%)与选中态(24%),与朱/靛/墨三套主色都不冲"},"warp-bg":{value:"#faf8f5",note:"古籍矫正底本书影画布底色"},"warp-box-shadow":{value:"0 2px 12px rgba(0, 0, 0, 0.08)",note:"古籍底本书影浮雕阴影"},"warp-sel-bg":{value:"rgba(196, 148, 76, 0.45)",note:"古籍对读字框选中高亮底色"},"warp-sel-stroke":{value:"#a06e1c",note:"古籍对读字框选中描边"},"warp-hover-bg":{value:"rgba(217, 185, 106, 0.25)",note:"古籍对读字框悬停高亮底色"},"warp-hover-stroke":{value:"#c4944c",note:"古籍对读字框悬停描边"},"warp-badge-bg":{value:"rgba(184, 134, 54, 0.12)",note:"图文对读徽章背景"},"warp-badge-fg":{value:"#8c6820",note:"图文对读徽章文字颜色"},"warp-badge-bd":{value:"rgba(184, 134, 54, 0.3)",note:"图文对读徽章边框"},"warp-banxin-border":{value:"#8a8070",note:"版心分界线"},"warp-banxin-fold":{value:"rgba(160, 110, 28, 0.65)",note:"版心中缝对折线"},"warp-banxin-outer":{value:"#c9c3b4",note:"版心外边线"}}),lt("反馈浮钮(2026-09-28 Q5)",{"feedback-fab-z":{value:"40",note:"层级:低于页面抽屉、弹层(本包对话框为 1000)"},"feedback-fab-offset":{value:"0px",root:!1}}),lt("字体(全站无衬线,2026-09-05 定)",{"font-ui":{value:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif'},"font-body":{value:"system-ui, sans-serif",css:"var(--bim-font-ui)"},"font-serif":{value:es,note:"著录原文(提要、按语)用宋体"},"font-reading":{value:es,css:"var(--bim-font-serif)",note:"阅读器正文(整理本 / 全文);默认接 font-serif,只需覆盖那一个就同时换掉"}})],hp=Object.assign({},...gp.map(e=>e.tokens)),Ia={};for(const[e,n]of Object.entries(hp))Ia[e]=`var(--bim-${e}, ${n.value})`;function i(e){const n=Ia[e];if(n===void 0)throw new Error(`book-index-ui: 未定义的设计变量 --bim-${e}`);return n}function Qt(e){return e.types&&e.types.length>0?e.types:e.type?e.type==="text+image"?["text","image"]:[e.type]:[]}function fp(e,n){return Qt(e).includes(n)}const xp={published:"出版",fine:"精校",rough:"粗校",ocr:"機器識別"};i("quality-published"),i("quality-fine"),i("quality-rough"),i("quality-ocr");const en=h.createContext(null),La=["曹霑"];function bp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yp(e,n=La){const o=[...new Set(n.filter(Boolean))].sort((a,l)=>l.length-a.length);if(!o.length)return e;const r=new RegExp(`(${o.map(bp).join("|")})`,"g"),s=new Set(o);return a=>{if(!a)return e(a);const l=a.split(r);return l.length===1?e(a):l.map((d,c)=>c%2===1&&s.has(d)?d:d&&e(d)).join("")}}let wn=null;function jp(){if(wn)return wn;try{const e=cp.Converter({from:"t",to:"cn"});wn=yp(n=>e(_e.normalizeVariants(n)))}catch{wn=e=>e}return wn}const vp={indexType:{work:"作品",book:"書籍",collection:"叢編",entity:"人物"},resourceType:{text:"文字資源",image:"圖片資源",textImage:"文字+圖片資源",physical:"館藏"},resourceTypeShort:{text:"文字",image:"圖片",textImage:"文字+圖片",physical:"館藏"},rootType:{catalog:"目錄式",search:"搜索式"},status:{draft:"草稿",official:"正式"},checkType:{精校:{label:"精校",bg:i("check-fine-bg"),fg:i("check-fine-fg")},粗校:{label:"粗校",bg:i("check-rough-bg"),fg:i("check-rough-fg")},AI整理:{label:"AI整理",bg:i("check-ai-bg"),fg:i("check-ai-fg")}},action:{save:"保存",delete:"刪除",newEntry:"+ 新建",viewAll:"查看全部 →",visit:"訪問 →",view:"查看 →",viewEntity:"查看",copy:"複製 ID",copied:"已複製",linkExisting:"+ 關聯現有",createAndLink:"+ 創建並關聯",remove:"刪除",clearAll:"清除全部",reselect:"重選",changeType:"更換類型",expand:"展開",collapse:"收起",expandMore:"展開更多",addSubWork:"添加子作品",addVersion:"添加新版本",addBook:"添加書籍",addSubCollection:"添加子叢編",addCollectionImpl:"添加叢編實現",addSource:"添加來源",addResource:"添加資源",addIndexedBy:"+ 添加收錄來源",addEmendatedBy:"+ 添加考證來源",addAdditionalWork:"+ 添加附屬作品",selectBookOrWork:"選擇書籍/作品",clickToSelectBookOrWork:"點擊選擇書籍/作品",unlink:"解除關聯"},label:{id:"ID:",author:"作者 (Author)",dynasty:"朝代/年份 (Dynasty/Year)",edition:"版本",juanCount:"卷數",pageCount:"頁數 (Pages)",volumeCount:"冊數 (Volumes)",holder:"現藏於 (Holder)",firstImage:"首頁圖片 (First Image URL)",year:"年代",currentLocation:"現藏",parentWork:"上級作品",relatedWorks:"相關作品",type:"類型",rootType:"根類型",coverageLevel:"覆蓋層級",coverageRange:"覆蓋範圍",metadata:"元數據",optionalInfo:"可選信息",details:"詳細說明",detailsOptional:"詳細說明 (可選)",positionOptional:"位置/頁碼 (可選)",dataVersionOptional:"數據版本 (可選)",processorVersionOptional:"處理器版本 (可選)",sourceName:"來源名稱",sourceBid:"來源 BID",titleInfo:"題名",authorInfo:"著者",urlAddress:"URL 地址"},section:{basicInfo:"📊 基本信息",description:"📝 介紹 (Description)",additionalWorks:"📑 附屬作品 (Additional Works)",indexedBy:"📖 著錄於",emendatedBy:"📝 考證",resources:"資源",textResources:"📝 文字資源 (Text Resources)",imageResources:"🖼️ 圖片資源 (Image Resources)",sources:"📚 資料來源 (Sources)",provenance:"📜 收藏歷史 (Provenance)",relatedVersions:"相關版本",otherEditions:"📚 其他版本 (Other Editions)",dangerZone:"危險區域 (Danger Zone)",aliases:"別名",attachedTexts:"附載篇目",appendix:"附錄",containedIn:"收入叢編",collectedIn:"收入叢編",belongsToWork:"所屬作品",locationHistory:"流轉歷史",historyOverview:"歷史沿革",containedBooks:"收錄書籍",relations:"關聯關係",summary:"提要",comment:"按語",additionalComment:"附按",indexed:"收錄於",emendated:"考證",relatedWorks:"相關作品",containedWorks:"包含作品",adaptations:"改編作品",derivativeWorks:"續書與評註",studies:"所考典籍"},relation:{belongsToWork:"所屬作品 (Work)",containedInCollection:"收入叢編",siblingVersions:"同作品其他版本",addVersionForWork:"為此作品添加新版本",parentWork:"父作品 (Parent Work)",childWorks:"子作品",collectionImpl:"叢編實現",allVersions:"所有版本",correspondingWork:"對應作品 (Work)",parentCollection:"父叢編 (Parent Collection)",childCollections:"子叢編",containedBooks:"包含書籍",notLinked:"(未關聯)",none:"(暫無)"},search:{placeholder:"搜索作品、書籍、叢編...",searching:"搜索中...",loading:"加載中...",noResults:"無匹配結果",noResultsFor:"未找到與「{query}」相關的結果",tryOther:"試試其他關鍵詞、別名或作者名",recentBrowse:"最近瀏覽",history:"搜索歷史",clearAll:"清除全部",clearRecent:"清除最近瀏覽",itemNotFound:"無法找到,可能已刪除",removeFromRecent:"移除",searchTitle:"搜索古籍索引",allTab:"全部",resultTabs:"結果分類",searchSubtitle:"輸入關鍵詞搜索作品、書籍或叢編",searchBookName:"搜索書名...",alias:"別名"},searchV4:{filterTitle:"篩選",dynasty:"朝代",classification:"部類",resources:"資源",extant:"存佚",clearAllFilters:"清除全部篩選",hasImage:"有影印",hasText:"有文本",hasCollated:"有文本",filterButton:"篩選",filterSelected:"{n} 項已選",expand:"展開",collapse:"收起",filteredCount:"篩出 {n} 條",removeFilter:"取消篩選:{name}",viewLabel:"結果視圖",viewTable:"表格",viewCard:"卡片",colTitle:"題名",colType:"類型",colAuthor:"責任者",colEra:"年代",colClass:"部類",colResource:"資源",tagImage:"影印",tagText:"文本",tagCollated:"文本",tagLost:"佚",pageInfo:"共 {total} 條 · 每頁 {size} 條 · 第 {page} / {pages} 頁",pagerLabel:"翻頁",prevPage:"上一頁",nextPage:"下一頁",emptyFiltered:"沒有找到匹配的條目。試試更短的書名、減少篩選,或切換繁 / 簡。",limitedNote:"各類只列前幾條,點上方分類頁籤看全部。",sortLabel:"排序",sortRelevance:"相關度",sortEra:"年代",sortTitle:"書名",sortEraAsc:"由早到晚",sortEraDesc:"由晚到早",sortTitleAsc:"拼音 A→Z",sortTitleDesc:"拼音 Z→A"},home:{title:"古籍索引",subtitle:"從左側搜索框輸入關鍵詞,查找作品、書籍或叢編",recommendedBrowse:"推薦瀏覽",catalogTab:"目錄",collectionTab:"叢編",siteTab:"在線資源",recommendTab:"推薦",feedbackTab:"反饋",statusInProgress:"進行中",statusDone:"已完成",statusTodo:"未開始",typeCatalog:"目錄",typeCollection:"資源集合",totalPending:"待統計",progressFormat:"{imported} / {total}",siteCoverage:"資源覆蓋"},browser:{title:"古籍資源索引",subtitle:""},detailTab:{basicInfo:"概覽",catalog:"目錄",collectionCatalog:"叢編目錄",collatedEdition:"文本",catalogSuffix:"·目錄",fullText:"文本",lineage:"版本傳承",feedback:"勘誤反饋",dataSource:"數據源",backToIndex:"典籍版本索引",submitVersion:"提交新版本",dataLicense:"數據源與授權"},metadata:{edition:"版本",version:"修訂版本",quality:"資源質量",check_type:"校對",image_source:"影像來源",team:"所屬團隊",publisher:"出版社",year:"出版年份",format:"格式",note:"備註",total_page:"頁數",total_pages:"總頁數",page_range:"頁碼範圍",page_count:"頁數",file_page_range:"文件頁碼",file_page_count:"文件頁數",content_page_range:"影印頁碼",volume:"冊",color_mode:"色彩",paragraph_count:"段落數",has_translation:"翻譯"},editor:{untitled:"未命名",workTitle:"作品名 (Work Title)",collectionTitle:"叢書名 (Collection Title)",bookTitle:"書名 (Book Title)",belongsToWork:"所屬作品 (Work)",authorLabel:"作者 (Author)",publicationYearLabel:"出版年 (Publication year)",containedIn:"收入叢編",holderLabel:"現藏於 (Holder)",pageLabel:"頁數 (Pages)",volumeLabel:"冊數 (Volumes)",firstImageLabel:"首頁圖片 (First Image URL)",descriptionPlaceholder:"簡要介紹...",provenancePlaceholder:"該資源的流轉與收藏記錄...",otherEditionsPlaceholder:"相關版本的 ID...",dangerZoneDesc:"從索引庫中永久刪除該實體的所有元數據文件。",deleteEntity:"刪除該實體 (Delete Entity)",selectToLink:"選擇要關聯的",unnamedSource:"(未命名來源)",selectSourceType:"選擇來源類型",fromExistingBook:"從現有書籍選擇",enterUrl:"輸入網址鏈接",sourceNamePlaceholder:"如: 維基文庫、中國基本古籍庫",deleteThisSource:"刪除此來源",deleteThisResource:"刪除此資源",resourcePlaceholder:"資源",idAutoExtract:"ID (自動從URL提取)",resourceName:"資源名稱",resourceUrl:"資源鏈接 (URL)",structurePlaceholder:"層級結構 (如: 冊、卷)",coverageRangePlaceholder:"如: 2,3,5-8",detailsPlaceholder:"詳細說明",summaryPlaceholder:"提要...",commentPlaceholder:"按語...",additionalCommentPlaceholder:"附按...",imageResourceLink:"圖片資源鏈接",bookNameLabel:"書名",sourcePlaceholder:"來源"},download:{completed:"下載完成",downloading:"下載中",downloadThis:"下載此資源"},mode:{localMode:"本地模式",syncMode:"同步模式:",githubSync:"GitHub 同步",switchToSync:"點擊切換到同步模式",switchToLocal:"點擊切換到本地模式",switchToGithub:"點擊切換到 GitHub 同步模式",switchToDraft:"點擊切換到 draft 倉庫",switchToOfficial:"點擊切換到 official 倉庫",selectFolder:"選擇本地文件夾",configurePath:"配置同步路徑"},catalog:{totalVolumes:"共",processed:"已處理",contains:"收錄",matched:"已匹配",unmatched:"待匹配",source:"來源:",all:"全部",loading:"加載叢編目錄...",notFound:"未找到叢編目錄數據",loadFailed:"加載失敗",noMatch:"無匹配結果",unmatched_label:"未匹配",volume:"第 {n} 冊"},unit:{juan:"卷",volume:"冊",bu:"部",items:"條"},workSubtype:{book:"書",article:"篇",poem:"詩",chapter:"篇章"},colorMode:{bw:"黑白",color:"彩色"},misc:{noResources:"暫無資源信息",hasTranslation:"有",noTranslation:"無",structure:"層級",coverage:"覆蓋",notFoundEntry:"未找到該條目",loadFailed:"加載失敗",textResource:"文字資源",imageResource:"圖片資源"}},kp={indexType:{work:"作品",book:"书籍",collection:"丛编",entity:"人物"},resourceType:{text:"文字资源",image:"图片资源",textImage:"文字+图片资源",physical:"馆藏"},resourceTypeShort:{text:"文字",image:"图片",textImage:"文字+图片",physical:"馆藏"},rootType:{catalog:"目录式",search:"搜索式"},status:{draft:"草稿",official:"正式"},checkType:{精校:{label:"精校",bg:i("check-fine-bg"),fg:i("check-fine-fg")},粗校:{label:"粗校",bg:i("check-rough-bg"),fg:i("check-rough-fg")},AI整理:{label:"AI整理",bg:i("check-ai-bg"),fg:i("check-ai-fg")}},action:{save:"保存",delete:"删除",newEntry:"+ 新建",viewAll:"查看全部 →",visit:"访问 →",view:"查看 →",viewEntity:"查看",copy:"复制 ID",copied:"已复制",linkExisting:"+ 关联现有",createAndLink:"+ 创建并关联",remove:"删除",clearAll:"清除全部",reselect:"重选",changeType:"更换类型",expand:"展开",collapse:"收起",expandMore:"展开更多",addSubWork:"添加子作品",addVersion:"添加新版本",addBook:"添加书籍",addSubCollection:"添加子丛编",addCollectionImpl:"添加丛编实现",addSource:"添加来源",addResource:"添加资源",addIndexedBy:"+ 添加收录来源",addEmendatedBy:"+ 添加考证来源",addAdditionalWork:"+ 添加附属作品",selectBookOrWork:"选择书籍/作品",clickToSelectBookOrWork:"点击选择书籍/作品",unlink:"解除关联"},label:{id:"ID:",author:"作者 (Author)",dynasty:"朝代/年份 (Dynasty/Year)",edition:"版本",juanCount:"卷数",pageCount:"页数 (Pages)",volumeCount:"册数 (Volumes)",holder:"现藏于 (Holder)",firstImage:"首页图片 (First Image URL)",year:"年代",currentLocation:"现藏",parentWork:"上级作品",relatedWorks:"相关作品",type:"类型",rootType:"根类型",coverageLevel:"覆盖层级",coverageRange:"覆盖范围",metadata:"元数据",optionalInfo:"可选信息",details:"详细说明",detailsOptional:"详细说明 (可选)",positionOptional:"位置/页码 (可选)",dataVersionOptional:"数据版本 (可选)",processorVersionOptional:"处理器版本 (可选)",sourceName:"来源名称",sourceBid:"来源 BID",titleInfo:"题名",authorInfo:"著者",urlAddress:"URL 地址"},section:{basicInfo:"📊 基本信息",description:"📝 介绍 (Description)",additionalWorks:"📑 附属作品 (Additional Works)",indexedBy:"📖 著录于",emendatedBy:"📝 考证",resources:"资源",textResources:"📝 文字资源 (Text Resources)",imageResources:"🖼️ 图片资源 (Image Resources)",sources:"📚 资料来源 (Sources)",provenance:"📜 收藏历史 (Provenance)",relatedVersions:"相关版本",otherEditions:"📚 其他版本 (Other Editions)",dangerZone:"危险区域 (Danger Zone)",aliases:"别名",attachedTexts:"附载篇目",appendix:"附录",containedIn:"收入丛编",collectedIn:"收入丛编",belongsToWork:"所属作品",locationHistory:"流转历史",historyOverview:"历史沿革",containedBooks:"收录书籍",relations:"关联关系",summary:"提要",comment:"按语",additionalComment:"附按",indexed:"收录于",emendated:"考证",relatedWorks:"相关作品",containedWorks:"包含作品",adaptations:"改编作品",derivativeWorks:"续书与评注",studies:"所考典籍"},relation:{belongsToWork:"所属作品 (Work)",containedInCollection:"收入丛编",siblingVersions:"同作品其他版本",addVersionForWork:"为此作品添加新版本",parentWork:"父作品 (Parent Work)",childWorks:"子作品",collectionImpl:"丛编实现",allVersions:"所有版本",correspondingWork:"对应作品 (Work)",parentCollection:"父丛编 (Parent Collection)",childCollections:"子丛编",containedBooks:"包含书籍",notLinked:"(未关联)",none:"(暂无)"},search:{placeholder:"搜索作品、书籍、丛编...",searching:"搜索中...",loading:"加载中...",noResults:"无匹配结果",noResultsFor:"未找到与「{query}」相关的结果",tryOther:"试试其他关键词、别名或作者名",recentBrowse:"最近浏览",history:"搜索历史",clearAll:"清除全部",clearRecent:"清除最近浏览",itemNotFound:"无法找到,可能已删除",removeFromRecent:"移除",searchTitle:"搜索古籍索引",allTab:"全部",resultTabs:"结果分类",searchSubtitle:"输入关键词搜索作品、书籍或丛编",searchBookName:"搜索书名...",alias:"别名"},searchV4:{filterTitle:"筛选",dynasty:"朝代",classification:"部类",resources:"资源",extant:"存佚",clearAllFilters:"清除全部筛选",hasImage:"有影印",hasText:"有文本",hasCollated:"有文本",filterButton:"筛选",filterSelected:"{n} 项已选",expand:"展开",collapse:"收起",filteredCount:"筛出 {n} 条",removeFilter:"取消筛选:{name}",viewLabel:"结果视图",viewTable:"表格",viewCard:"卡片",colTitle:"题名",colType:"类型",colAuthor:"责任者",colEra:"年代",colClass:"部类",colResource:"资源",tagImage:"影印",tagText:"文本",tagCollated:"文本",tagLost:"佚",pageInfo:"共 {total} 条 · 每页 {size} 条 · 第 {page} / {pages} 页",pagerLabel:"翻页",prevPage:"上一页",nextPage:"下一页",emptyFiltered:"没有找到匹配的条目。试试更短的书名、减少筛选,或切换繁 / 简。",limitedNote:"各类只列前几条,点上方分类页签看全部。",sortLabel:"排序",sortRelevance:"相关度",sortEra:"年代",sortTitle:"书名",sortEraAsc:"由早到晚",sortEraDesc:"由晚到早",sortTitleAsc:"拼音 A→Z",sortTitleDesc:"拼音 Z→A"},home:{title:"古籍索引",subtitle:"从左侧搜索框输入关键词,查找作品、书籍或丛编",recommendedBrowse:"推荐浏览",catalogTab:"目录",collectionTab:"丛编",siteTab:"在线资源",recommendTab:"推荐",feedbackTab:"反馈",statusInProgress:"进行中",statusDone:"已完成",statusTodo:"未开始",typeCatalog:"目录",typeCollection:"资源集合",totalPending:"待统计",progressFormat:"{imported} / {total}",siteCoverage:"资源覆盖"},browser:{title:"古籍资源索引",subtitle:""},detailTab:{basicInfo:"概览",catalog:"目录",collectionCatalog:"丛编目录",collatedEdition:"文本",catalogSuffix:"·目录",fullText:"文本",lineage:"版本传承",feedback:"勘误反馈",dataSource:"数据源",backToIndex:"典籍版本索引",submitVersion:"提交新版本",dataLicense:"数据源与授权"},metadata:{edition:"版本",version:"修订版本",quality:"资源质量",check_type:"校对",image_source:"影像来源",team:"所属团队",publisher:"出版社",year:"出版年份",format:"格式",note:"备注",total_page:"页数",total_pages:"总页数",page_range:"页码范围",page_count:"页数",file_page_range:"文件页码",file_page_count:"文件页数",content_page_range:"影印页码",volume:"册",color_mode:"色彩",paragraph_count:"段落数",has_translation:"翻译"},editor:{untitled:"未命名",workTitle:"作品名 (Work Title)",collectionTitle:"丛书名 (Collection Title)",bookTitle:"书名 (Book Title)",belongsToWork:"所属作品 (Work)",authorLabel:"作者 (Author)",publicationYearLabel:"出版年 (Publication year)",containedIn:"收入丛编",holderLabel:"现藏于 (Holder)",pageLabel:"页数 (Pages)",volumeLabel:"册数 (Volumes)",firstImageLabel:"首页图片 (First Image URL)",descriptionPlaceholder:"简要介绍...",provenancePlaceholder:"该资源的流转与收藏记录...",otherEditionsPlaceholder:"相关版本的 ID...",dangerZoneDesc:"从索引库中永久删除该实体的所有元数据文件。",deleteEntity:"删除该实体 (Delete Entity)",selectToLink:"选择要关联的",unnamedSource:"(未命名来源)",selectSourceType:"选择来源类型",fromExistingBook:"从现有书籍选择",enterUrl:"输入网址链接",sourceNamePlaceholder:"如: 维基文库、中国基本古籍库",deleteThisSource:"删除此来源",deleteThisResource:"删除此资源",resourcePlaceholder:"资源",idAutoExtract:"ID (自动从URL提取)",resourceName:"资源名称",resourceUrl:"资源链接 (URL)",structurePlaceholder:"层级结构 (如: 册、卷)",coverageRangePlaceholder:"如: 2,3,5-8",detailsPlaceholder:"详细说明",summaryPlaceholder:"提要...",commentPlaceholder:"按语...",additionalCommentPlaceholder:"附按...",imageResourceLink:"图片资源链接",bookNameLabel:"书名",sourcePlaceholder:"来源"},download:{completed:"下载完成",downloading:"下载中",downloadThis:"下载此资源"},mode:{localMode:"本地模式",syncMode:"同步模式:",githubSync:"GitHub 同步",switchToSync:"点击切换到同步模式",switchToLocal:"点击切换到本地模式",switchToGithub:"点击切换到 GitHub 同步模式",switchToDraft:"点击切换到 draft 仓库",switchToOfficial:"点击切换到 official 仓库",selectFolder:"选择本地文件夹",configurePath:"配置同步路径"},catalog:{totalVolumes:"共",processed:"已处理",contains:"收录",matched:"已匹配",unmatched:"待匹配",source:"来源:",all:"全部",loading:"加载丛编目录...",notFound:"未找到丛编目录数据",loadFailed:"加载失败",noMatch:"无匹配结果",unmatched_label:"未匹配",volume:"第 {n} 册"},unit:{juan:"卷",volume:"册",bu:"部",items:"条"},workSubtype:{book:"书",article:"篇",poem:"诗",chapter:"篇章"},colorMode:{bw:"黑白",color:"彩色"},misc:{noResources:"暂无资源信息",hasTranslation:"有",noTranslation:"无",structure:"层级",coverage:"覆盖",notFoundEntry:"未找到该条目",loadFailed:"加载失败",textResource:"文字资源",imageResource:"图片资源"}};function dt(e,n,o){return{"zh-Hant":e,"zh-Hans":n}}const wp=dt({toHans:"切换为简体",toHant:"切換為繁體",localeShortHans:"简",localeShortHant:"繁",themeLabel:"主題",theme:{zhusha:"朱砂",indigo:"靛青",ink:"墨"},loading:"加載中",repoSourceLink:"在 GitHub 查看本條目源文件",volumesMissing:"缺{n}",collapseVolumes:"收起分冊",expandVolumes:"展開分冊",collapseArrow:"收起 ▲",expandArrow:"展開 ▼",entitySubtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年號",office:"官名",anonymous:"佚名",collective:"集體"},cbdbTitle:"CBDB 中國歷代人物傳記數據庫",entityPlaceholderNote:"人物信息暫缺。該 Entity 僅作為作者佔位,詳細生平資料尚待補充。",otherVersions:"其他版本",switchToEdit:"切換到編輯模式",switchToView:"切換到查看模式",modeEdit:"✏️ 編輯",modeView:"👁 查看",noData:"無數據"},{toHans:"切换为简体",toHant:"切換為繁體",localeShortHans:"简",localeShortHant:"繁",themeLabel:"主题",theme:{zhusha:"朱砂",indigo:"靛青",ink:"墨"},loading:"加载中",repoSourceLink:"在 GitHub 查看本条目源文件",volumesMissing:"缺{n}",collapseVolumes:"收起分册",expandVolumes:"展开分册",collapseArrow:"收起 ▲",expandArrow:"展开 ▼",entitySubtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年号",office:"官名",anonymous:"佚名",collective:"集体"},cbdbTitle:"CBDB 中国历代人物传记数据库",entityPlaceholderNote:"人物信息暂缺。该 Entity 仅作为作者占位,详细生平资料尚待补充。",otherVersions:"其他版本",switchToEdit:"切换到编辑模式",switchToView:"切换到查看模式",modeEdit:"✏️ 编辑",modeView:"👁 查看",noData:"无数据"}),fi=dt({relation:{part_of:"所屬",has_part:"包含",contains_text_of:"收錄",collected_in:"叢編",text_carried_by:"載錄",studied_by:"研究",studies:"所考",preceded_by:"前承",followed_by:"後繼",derived_from:"衍生",has_adaptation:"改編",related:"相關"},lossStatus:{extant:"今存",fragment:"殘存",partial:"殘存",lost:"已佚",unknown:"未詳"},resourceKind:{text:"文本",image:"影印",textImage:"圖文",physical:"館藏"},otherImages:"其他影印",fragmentTag:"殘片",collapseVolumes:"收起分冊",expandVolumes:"展開 {n} 冊",mirror:"鏡像",volumeStats:"{found} / {expected} 冊",volumeStatsMissing:"{found} / {expected} 冊 缺 {missing}",pageNav:"本頁導航",thisPage:"本頁",more:"更多",expandRest:"展開其餘 {n} {unit}",read:"閱讀",showMore:"顯示更多({n})",review:{reviewed:"已審核",disputed:"有爭議",unreviewed:"未審核",draft:"草稿"},dataVersion:"數據版本",todoCount:"待核 {n} 項",lacuna:"闕文",lacunaWith:"闕文:{label}",composedChar:"組字:{label}",bce:"前{n}",roleAll:"全部",loading:"加載中…",noLineageGraph:"暫無版本圖數據",notFound:"找不到該條目,可能已被刪除或 ID 不正確",workInfo:"作品信息"},{relation:{part_of:"所属",has_part:"包含",contains_text_of:"收录",collected_in:"丛编",text_carried_by:"载录",studied_by:"研究",studies:"所考",preceded_by:"前承",followed_by:"后继",derived_from:"衍生",has_adaptation:"改编",related:"相关"},lossStatus:{extant:"今存",fragment:"残存",partial:"残存",lost:"已佚",unknown:"未详"},resourceKind:{text:"文本",image:"影印",textImage:"图文",physical:"馆藏"},otherImages:"其他影印",fragmentTag:"残片",collapseVolumes:"收起分册",expandVolumes:"展开 {n} 册",mirror:"镜像",volumeStats:"{found} / {expected} 册",volumeStatsMissing:"{found} / {expected} 册 缺 {missing}",pageNav:"本页导航",thisPage:"本页",more:"更多",expandRest:"展开其余 {n} {unit}",read:"阅读",showMore:"显示更多({n})",review:{reviewed:"已审核",disputed:"有争议",unreviewed:"未审核",draft:"草稿"},dataVersion:"数据版本",todoCount:"待核 {n} 项",lacuna:"阙文",lacunaWith:"阙文:{label}",composedChar:"组字:{label}",bce:"前{n}",roleAll:"全部",loading:"加载中…",noLineageGraph:"暂无版本图数据",notFound:"找不到该条目,可能已被删除或 ID 不正确",workInfo:"作品信息"}),Sp=dt({kind:"版本",fact:{editionType:"版本類型",publication:"刊印",era:"刊寫年代",measure:"卷帙",volumes:"冊次",baseEdition:"底本",holdings:"存藏",callNumber:"索書號",seals:"藏印",leafStyle:"行款",binding:"裝幀",dimensions:"尺寸",condition:"品相",aliases:"又名"},inferredFromEdition:"據版本題名推斷",volumesValue:"第 {range} {unit}({n} {unit})",andMorePlaces:" 等 {n} 處",viewImages:"看原書影印",sec:{fulltext:"文本",images:"影印",physical:"館藏",lineage:"版本源流",empty:"影印與文本"},chapterUnit:"章",chapterCount:"{n} {unit}",sourceBy:"據{src}",readFrom:"從{ch}讀起",firstChapter:"第一章",enterReader:"進入閱讀頁",externalText:"站外文本",groupCount:"{n} 組",placeCount:"{n} 處",lineageMeta:"據版本傳承著錄",lineageView:"源流視圖",viewCards:"卡片",viewGraph:"關係圖",totalOf:"全 {n} {unit}",emptyText:"尚未著錄該版本的影印、文本與收藏信息。",editionCount:"{n} 種版本",siblings:"同作品版本",byEra:"按年代",kindCount:"{n} 種",viewAllInWork:"在作品頁看全部 {n} 種 →",volumeRange:"第 {range} {unit}",volumeCount:"{n} {unit}",confidence:{certain:"確證",consensus:"通說",probable:"可能",disputed:"有爭議"},confidenceNote:"({c})",lineage:{ancestor:"祖本",reconstructed:"擬構祖本",thisEdition:"本版",derivatives:"翻刻 · 衍生",appendix:"附記"}},{kind:"版本",fact:{editionType:"版本类型",publication:"刊印",era:"刊写年代",measure:"卷帙",volumes:"册次",baseEdition:"底本",holdings:"存藏",callNumber:"索书号",seals:"藏印",leafStyle:"行款",binding:"装帧",dimensions:"尺寸",condition:"品相",aliases:"又名"},inferredFromEdition:"据版本题名推断",volumesValue:"第 {range} {unit}({n} {unit})",andMorePlaces:" 等 {n} 处",viewImages:"看原书影印",sec:{fulltext:"文本",images:"影印",physical:"馆藏",lineage:"版本源流",empty:"影印与文本"},chapterUnit:"章",chapterCount:"{n} {unit}",sourceBy:"据{src}",readFrom:"从{ch}读起",firstChapter:"第一章",enterReader:"进入阅读页",externalText:"站外文本",groupCount:"{n} 组",placeCount:"{n} 处",lineageMeta:"据版本传承著录",lineageView:"源流视图",viewCards:"卡片",viewGraph:"关系图",totalOf:"全 {n} {unit}",emptyText:"尚未著录该版本的影印、文本与收藏信息。",editionCount:"{n} 种版本",siblings:"同作品版本",byEra:"按年代",kindCount:"{n} 种",viewAllInWork:"在作品页看全部 {n} 种 →",volumeRange:"第 {range} {unit}",volumeCount:"{n} {unit}",confidence:{certain:"确证",consensus:"通说",probable:"可能",disputed:"有争议"},confidenceNote:"({c})",lineage:{ancestor:"祖本",reconstructed:"拟构祖本",thisEdition:"本版",derivatives:"翻刻 · 衍生",appendix:"附记"}}),_p=dt({fact:{written:"成書",measure:"卷帙",loss:"存佚",earliest:"最早存世",emendation:"考證",alias:"又名",attached:"附載",appendix:"附錄"},inferredFromEdition:"據版本題名推斷",loading:"載入中",emendationCount:"{n} 條",stat:{editions:"版本",hasImage:"有影印",catalogs:"家著錄"},classifiedBy:"據《{source}》",sec:{versions:"版本",catalogs:"著錄",collected:"收入叢編",related:"相關書目",resources:"在線資源"},versionsTotal:"共 {n} 種",versionsWithImage:"{n} 種有影印",versionsCurrent:"當前 {n} 種",scanOnly:"只看有影印",sortByYear:"按年代排列",sortByCatalog:"按著錄順序",col:{edition:"版本",era:"年代",holder:"館藏",image:"影印"},noVersionsFiltered:"當前篩選下沒有版本",noVersions:"暫無版本著錄",moreUnit:"種版本",inferredEraNote:"部分年代據版本題名推斷,非著錄原文",empty:"尚未著錄該作品的版本與書目收錄。",relatedCount:"{n} 部",hasImage:"有影印",catalog:{meta:"歷代書目 {n} 家",tablist:"著錄書目",titleOnly:"僅著錄書名,無提要。",prev:"上一家:{name}",next:"下一家:{name}"}},{fact:{written:"成书",measure:"卷帙",loss:"存佚",earliest:"最早存世",emendation:"考证",alias:"又名",attached:"附载",appendix:"附录"},inferredFromEdition:"据版本题名推断",loading:"载入中",emendationCount:"{n} 条",stat:{editions:"版本",hasImage:"有影印",catalogs:"家著录"},classifiedBy:"据《{source}》",sec:{versions:"版本",catalogs:"著录",collected:"收入丛编",related:"相关书目",resources:"在线资源"},versionsTotal:"共 {n} 种",versionsWithImage:"{n} 种有影印",versionsCurrent:"当前 {n} 种",scanOnly:"只看有影印",sortByYear:"按年代排列",sortByCatalog:"按著录顺序",col:{edition:"版本",era:"年代",holder:"馆藏",image:"影印"},noVersionsFiltered:"当前筛选下没有版本",noVersions:"暂无版本著录",moreUnit:"种版本",inferredEraNote:"部分年代据版本题名推断,非著录原文",empty:"尚未著录该作品的版本与书目收录。",relatedCount:"{n} 部",hasImage:"有影印",catalog:{meta:"历代书目 {n} 家",tablist:"著录书目",titleOnly:"仅著录书名,无提要。",prev:"上一家:{name}",next:"下一家:{name}"}}),$p=dt({kind:"叢編",workCollection:"作品集",stat:{titles:"子目"},fact:{publication:"刊印",expected:"應收",measure:"卷帙"},member:{Book:"所收版本",Work:"所收作品",other:"成員"},memberNote:"子目與其各版本合計",nZhong:"{n} 種",nHan:"{n} 函",dist:{head:"全帙冊次分佈",segTitle:"{section} 第 {from}–{to} 冊",only:"只看{section}",unclassified:"未分類",hint:"點色段篩選部類"},sec:{titles:"子目",resources:"影印與文本"},totalVolumes:"全帙 {n} {unit}",currentN:"當前 {n} {unit}",loadAllTitle:"將載入全部 {n} {unit}",grouping:"正在按部類分組…",groupBySection:"按部類分組",find:"在本叢編中檢索",col:{volumes:"冊次",title:"書名",versions:"版本"},volumeRange:"第 {range} {unit}",resourcesCount:"{n} 處",text:"文本",empty:"尚未著錄該叢編的子目。",parent:"上級叢編"},{kind:"丛编",workCollection:"作品集",stat:{titles:"子目"},fact:{publication:"刊印",expected:"应收",measure:"卷帙"},member:{Book:"所收版本",Work:"所收作品",other:"成员"},memberNote:"子目与其各版本合计",nZhong:"{n} 种",nHan:"{n} 函",dist:{head:"全帙册次分布",segTitle:"{section} 第 {from}–{to} 册",only:"只看{section}",unclassified:"未分类",hint:"点色段筛选部类"},sec:{titles:"子目",resources:"影印与文本"},totalVolumes:"全帙 {n} {unit}",currentN:"当前 {n} {unit}",loadAllTitle:"将载入全部 {n} {unit}",grouping:"正在按部类分组…",groupBySection:"按部类分组",find:"在本丛编中检索",col:{volumes:"册次",title:"书名",versions:"版本"},volumeRange:"第 {range} {unit}",resourcesCount:"{n} 处",text:"文本",empty:"尚未著录该丛编的子目。",parent:"上级丛编"}),Cp=dt({subtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年號",office:"官名",anonymous:"佚名",collective:"群體"},bce:"前{n}",floruit:"活躍於 {from}—{to}",zi:"字{name}",hao:"號{name}",nativePlace:"{place}人",lifeAria:"{birth}—{death},一生 {years} 年",lifeYears:"一生 {years} 年",fact:{works:"著作"},nZhong:"{n} 種",moreNames:"更多別名({n})",dist:"著作分佈",autoMatch:"自動匹配",sec:{featured:"著作舉要",allWorks:"全部著作",works:"著作",external:"站外資料"},featuredSub:"存世版本最多的三部",versionsUnit:"種版本",hasImage:"有影印",empty:"尚未著錄該人物的關聯作品。",total:"共 {n} 種",current:"當前 {n} 種",sortByVersions:"按版本數排列",sortByCatalog:"按著錄順序",col:{work:"作品",section:"部類",role:"職任",versions:"存世版本",image:"影印"},notRecorded:"未著錄",emptyRole:"該職任下的著作尚未著錄。",moreUnit:"種著作",cbdbAuto:"CBDB 為自動匹配,未經人工核對"},{subtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年号",office:"官名",anonymous:"佚名",collective:"群体"},bce:"前{n}",floruit:"活跃于 {from}—{to}",zi:"字{name}",hao:"号{name}",nativePlace:"{place}人",lifeAria:"{birth}—{death},一生 {years} 年",lifeYears:"一生 {years} 年",fact:{works:"著作"},nZhong:"{n} 种",moreNames:"更多别名({n})",dist:"著作分布",autoMatch:"自动匹配",sec:{featured:"著作举要",allWorks:"全部著作",works:"著作",external:"站外资料"},featuredSub:"存世版本最多的三部",versionsUnit:"种版本",hasImage:"有影印",empty:"尚未著录该人物的关联作品。",total:"共 {n} 种",current:"当前 {n} 种",sortByVersions:"按版本数排列",sortByCatalog:"按著录顺序",col:{work:"作品",section:"部类",role:"职任",versions:"存世版本",image:"影印"},notRecorded:"未著录",emptyRole:"该职任下的著作尚未著录。",moreUnit:"种著作",cbdbAuto:"CBDB 为自动匹配,未经人工核对"}),zp=dt({imagesLoading:"加載書影…",noImages:"暫無書影",noImagesHint:"這一卷還沒有配上影像;接入後在此與正文逐頁對看",imageAlt:"書影 第 {label} 頁",prevImage:"上一頁書影",nextImage:"下一頁書影",back:"閱讀",backAria:"返回{label}首頁",skipToText:"跳到正文",settings:"閱讀設置",settingsShort:"設置",closeSettings:"收起設置",groupText:"文字",groupMark:"標註",groupLayout:"版面",font:"字體",fontSong:"宋體",fontKai:"楷體",fontSystem:"系統默認",script:"繁簡",version:"版本",versionShort:"版本▾",unitJuan:"卷",pagerGroup:"翻{unit}",prevUnit:"上一{unit}",nextUnit:"下一{unit}",prevUnitTitle:"上一{unit}:{label}",nextUnitTitle:"下一{unit}:{label}",firstUnit:"已是第一{unit}",lastUnit:"已是最後一{unit}",toc:"目錄",images:"書影",fontSmaller:"縮小字號",fontLarger:"放大字號",paragraphTitle:"條目分行 ↔ 自然段",paragraph:"自然段",workLinks:"標出作品鏈接",properNameTitle:"書名加波浪線",properName:"專名線",vertical:"豎排",closeToc:"收起目錄",sourceLabel:"出處",licenseOf:"授權 {license}",revisedAt:"最近校訂 {date}",reportError:"報告錯字",pagerNav:"翻卷",rail:"本卷",bottomBar:"閱讀工具",tocShort:"卷目",fontSize:"字號",close:"關閉",loading:"加載中…",noText:"暫無文本",tocFailed:"無法加載目錄",tocLoading:"加載目錄…",viewEntry:"查看條目",defaultRole:"撰",tocCaption:"目錄 · {n} {unit}",searchChapters:"搜索全部章節",searchChaptersPlaceholder:"搜索全部章節…",searchUnit:"搜索全部{unit}",searchUnitPlaceholder:"搜索全部{unit}…",textSource:"來源",upstream:"上游",chapterFailed:"無法加載章節內容",references:"參考文獻"},{imagesLoading:"加载书影…",noImages:"暂无书影",noImagesHint:"这一卷还没有配上影像;接入后在此与正文逐页对看",imageAlt:"书影 第 {label} 页",prevImage:"上一页书影",nextImage:"下一页书影",back:"阅读",backAria:"返回{label}首页",skipToText:"跳到正文",settings:"阅读设置",settingsShort:"设置",closeSettings:"收起设置",groupText:"文字",groupMark:"标注",groupLayout:"版面",font:"字体",fontSong:"宋体",fontKai:"楷体",fontSystem:"系统默认",script:"繁简",version:"版本",versionShort:"版本▾",unitJuan:"卷",pagerGroup:"翻{unit}",prevUnit:"上一{unit}",nextUnit:"下一{unit}",prevUnitTitle:"上一{unit}:{label}",nextUnitTitle:"下一{unit}:{label}",firstUnit:"已是第一{unit}",lastUnit:"已是最后一{unit}",toc:"目录",images:"书影",fontSmaller:"缩小字号",fontLarger:"放大字号",paragraphTitle:"条目分行 ↔ 自然段",paragraph:"自然段",workLinks:"标出作品链接",properNameTitle:"书名加波浪线",properName:"专名线",vertical:"竖排",closeToc:"收起目录",sourceLabel:"出处",licenseOf:"授权 {license}",revisedAt:"最近校订 {date}",reportError:"报告错字",pagerNav:"翻卷",rail:"本卷",bottomBar:"阅读工具",tocShort:"卷目",fontSize:"字号",close:"关闭",loading:"加载中…",noText:"暂无文本",tocFailed:"无法加载目录",tocLoading:"加载目录…",viewEntry:"查看条目",defaultRole:"撰",tocCaption:"目录 · {n} {unit}",searchChapters:"搜索全部章节",searchChaptersPlaceholder:"搜索全部章节…",searchUnit:"搜索全部{unit}",searchUnitPlaceholder:"搜索全部{unit}…",textSource:"来源",upstream:"上游",chapterFailed:"无法加载章节内容",references:"参考文献"}),Tp=dt({nJuan:"{n}卷",viewWork:"查看作品",viewWorkOf:"查看作品:{title}",workArrow:"作品 →",arrowWork:"→作品",nWorks:"{n}部作品",unlinked:"未關聯",summary:"提要",comment:"按語",additionalComment:"附按",noMatch:"無匹配結果",sectionType:{类:"類",书:"書",序:"序",结语:"結語",注释:"註釋",考证:"考證",诗:"詩"},countTiao:"{n} 條",countTiaoOf:"{m} / {n} 條",countPoems:"{n} 首",countPoemsOf:"{m} / {n} 首",countBooks:"{n} 部書",countBooksOf:"{m} / {n} 部書",kaozhenTarget:"考證對象 {target}",baseText:"底本 {note}",textQuality:"文本質量",qualityLabel:{published:"出版",fine:"精校",rough:"粗校",ocr:"機器識別"},qualityCriteria:{published:"達到出版、學術研究標準,錯誤率在萬分之一以內",fine:"通讀無障礙,錯誤率在百分之一以內",rough:"保證文意基本正確,錯誤率在百分之三以內",ocr:"保持大意和結構,錯誤率在百分之十以內"},originalSource:"原文來源",viewsGroup:"看法",viewText:"正文",viewEntries:"條目",rowHeadNo:"序",rowHeadTitle:"書名",rowHeadWork:"作品",railCap:"本卷",railUnitPoems:"首",railUnitBooks:"部書",linkedN:"已關聯 {n}",linkedOf:"已關聯 {n} / {total}",railEntriesNav:"本卷條目"},{nJuan:"{n}卷",viewWork:"查看作品",viewWorkOf:"查看作品:{title}",workArrow:"作品 →",arrowWork:"→作品",nWorks:"{n}部作品",unlinked:"未关联",summary:"提要",comment:"按语",additionalComment:"附按",noMatch:"无匹配结果",sectionType:{类:"类",书:"书",序:"序",结语:"结语",注释:"注释",考证:"考证",诗:"诗"},countTiao:"{n} 条",countTiaoOf:"{m} / {n} 条",countPoems:"{n} 首",countPoemsOf:"{m} / {n} 首",countBooks:"{n} 部书",countBooksOf:"{m} / {n} 部书",kaozhenTarget:"考证对象 {target}",baseText:"底本 {note}",textQuality:"文本质量",qualityLabel:{published:"出版",fine:"精校",rough:"粗校",ocr:"机器识别"},qualityCriteria:{published:"达到出版、学术研究标准,错误率在万分之一以内",fine:"通读无障碍,错误率在百分之一以内",rough:"保证文意基本正确,错误率在百分之三以内",ocr:"保持大意和结构,错误率在百分之十以内"},originalSource:"原文来源",viewsGroup:"看法",viewText:"正文",viewEntries:"条目",rowHeadNo:"序",rowHeadTitle:"书名",rowHeadWork:"作品",railCap:"本卷",railUnitPoems:"首",railUnitBooks:"部书",linkedN:"已关联 {n}",linkedOf:"已关联 {n} / {total}",railEntriesNav:"本卷条目"}),Np=dt({typeShort:{work:"作",book:"版",collection:"叢",entity:"人"},typeLabel:{work:"作品",book:"版本",collection:"叢編",entity:"人物"},typeAll:"全部",typeChipsLabel:"按類型檢索",recentTitle:"最近瀏覽",recentClear:"清除",recentItemLabel:"{type} {title}",recentEmpty:"還沒有瀏覽記錄。打開任一條目後會出現在這裏。",status:{done:"已完成",in_progress:"進行中",todo:"計劃中"},siteStatus:{done:"已對接",in_progress:"進行中"},catalogTitle:"書目著錄進度",catalogNote:"每條著錄對到作品條目",colCatalog:"書目",colRecords:"著錄條目",colMatched:"已對上作品",colProgress:"進度",colStatus:"狀態",relatedTitle:"同類書目與考證",relatedNote:"不在書架上的",allNWorks:"全部 {n} 部",nKinds:"{n} 種",allNKinds:"全部 {n} 種",pavilion:"閣",yearBC:"前{n}",missingLife:"生卒年未錄、未上軸:{names}",viewLineage:"看版本譜系 →",plannedSites:"計劃接入:{names}",loss:{extant:"存",partially_extant:"殘",lost:"佚",unknown:"未詳"},lossNote:{extant:"今有傳本",partially_extant:"部分存世",lost:"僅見著錄",unknown:"尚未判定"},lossCount:"{n} 部 · {note}",stat:{works:"作品",books:"版本",collections:"叢編",entities:"人物",has_image:"有影印",has_text:"有文本",article:"單篇文",poem:"單篇詩"},dataScale:"數據規模",byLoss:"按存佚檢索",license:"古籍元數據以 CC0 公有領域發布,可自由複製、改編、再發布。",repo:"數據倉庫:",repoNote:"(GitHub,CC0)",version:"當前數據版本:",download:"引用方式與數據下載 →",navLabel:"元數據首頁分區",nav:{zhi:"歷代史志",sibu:"四部",cong:"叢編",people:"人物",lineage:"版本譜系",sites:"在線資源",data:"數據與授權"},zhiSub:"正史藝文志、經籍志與後人補志,按所志朝代排列;每部志的著錄逐條對到作品",shelfLegendCount:"脊下數字=著錄條目",shelfLegendClick:"點書脊進作品頁",sibuSub:"全部作品按經史子集分類;與「目錄」頁同一棵分類樹",toCatalog:"進入目錄 →",unclassifiedNote:"多為只見於史志著錄、尚未歸類的書",congSub:"大型叢書、影印彙編、出土文獻與館藏,逐種列到版本",allNKindsMore:"全部 {n} 種 →",peopleSub:"歷代目錄學家,按生卒年排在一條時間軸上",allNPeopleMore:"全部 {n} 人 →",lineageSub:"版本多的作品,看各本的源流與異同",sitesSub:"外部數字圖書館與本站條目的對接",dataSub:"規模、存佚、許可與版本"},{typeShort:{work:"作",book:"版",collection:"丛",entity:"人"},typeLabel:{work:"作品",book:"版本",collection:"丛编",entity:"人物"},typeAll:"全部",typeChipsLabel:"按类型检索",recentTitle:"最近浏览",recentClear:"清除",recentItemLabel:"{type} {title}",recentEmpty:"还没有浏览记录。打开任一条目后会出现在这里。",status:{done:"已完成",in_progress:"进行中",todo:"计划中"},siteStatus:{done:"已对接",in_progress:"进行中"},catalogTitle:"书目著录进度",catalogNote:"每条著录对到作品条目",colCatalog:"书目",colRecords:"著录条目",colMatched:"已对上作品",colProgress:"进度",colStatus:"状态",relatedTitle:"同类书目与考证",relatedNote:"不在书架上的",allNWorks:"全部 {n} 部",nKinds:"{n} 种",allNKinds:"全部 {n} 种",pavilion:"阁",yearBC:"前{n}",missingLife:"生卒年未录、未上轴:{names}",viewLineage:"看版本谱系 →",plannedSites:"计划接入:{names}",loss:{extant:"存",partially_extant:"残",lost:"佚",unknown:"未详"},lossNote:{extant:"今有传本",partially_extant:"部分存世",lost:"仅见著录",unknown:"尚未判定"},lossCount:"{n} 部 · {note}",stat:{works:"作品",books:"版本",collections:"丛编",entities:"人物",has_image:"有影印",has_text:"有文本",article:"单篇文",poem:"单篇诗"},dataScale:"数据规模",byLoss:"按存佚检索",license:"古籍元数据以 CC0 公有领域发布,可自由复制、改编、再发布。",repo:"数据仓库:",repoNote:"(GitHub,CC0)",version:"当前数据版本:",download:"引用方式与数据下载 →",navLabel:"元数据首页分区",nav:{zhi:"历代史志",sibu:"四部",cong:"丛编",people:"人物",lineage:"版本谱系",sites:"在线资源",data:"数据与授权"},zhiSub:"正史艺文志、经籍志与后人补志,按所志朝代排列;每部志的著录逐条对到作品",shelfLegendCount:"脊下数字=著录条目",shelfLegendClick:"点书脊进作品页",sibuSub:"全部作品按经史子集分类;与「目录」页同一棵分类树",toCatalog:"进入目录 →",unclassifiedNote:"多为只见于史志著录、尚未归类的书",congSub:"大型丛书、影印汇编、出土文献与馆藏,逐种列到版本",allNKindsMore:"全部 {n} 种 →",peopleSub:"历代目录学家,按生卒年排在一条时间轴上",allNPeopleMore:"全部 {n} 人 →",lineageSub:"版本多的作品,看各本的源流与异同",sitesSub:"外部数字图书馆与本站条目的对接",dataSub:"规模、存佚、许可与版本"}),Bo=dt({readable:"部可讀",pieces:"篇單篇詩文",startReading:"開始閱讀 →",nCopies:"{n}本",shelfHint:"按所志朝代排列,一脊一部",shelfLegendCount:"脊下「2本」=站內有幾個本子",shelfOther:"其他",shelfRegion:"{label}書架,可橫向滾動",origZhi:"正史原志",laterZhi:"後人補撰、續補",spineBy:"{name} 撰",spineRecords:"著錄 {n} 條",spineOnSite:"站內 {n}",nWorks:"{n} 部",allNWorks:"全部 {n} 部",nCopiesCard:"{n} 個本子",workPageLink:"作品頁:{title}的源流與全部版本 →",sibuUnclassifiedNote:"書目分類還沒補齊,其中多數是單篇詩文,已單列在下方。",subClasses:"{label}子類",allNClasses:"{label}全部 {n} 類 →",unclassified:"未分類",viewUnclassified:"查看未分類 →",periodItem:"{label},{n} 部",periodUnknown:"另有 {n} 部作者無朝代,在「四部」和搜索裏能找到",hoverHint:"窄段懸停看全名",nPieces:"{n} 篇",authorAll:"{name}全部 {n} 篇 →",period:{xianqin:"先秦",qinhan:"秦漢",weijin:"魏晉南北朝",suitang:"隋唐五代",song:"宋",liaojinyuan:"遼金元",ming:"明",qing:"清",modern:"近現代"},navLabel:"閱讀首頁分區",nav:{picks:"推薦閱讀",topics:"專題",famous:"名著與版本",sibu:"四部",period:"按年代",pieces:"單篇詩文"},picksSub:"編輯挑選,定期輪換",topicsSub:"按作品類型歸組;小說見下方「名著與版本」",famousSub:"一部作品一張卡,卡上列出站內能讀的各個本子",sibuSub:"按古籍總目的分類樹,只計站內可讀的作品",periodSub:"按作者朝代歸段,寬度與部數成比例",piecesSub:"單篇的詩、文、賦、表,按作者歸組",piecesMore:"按作者瀏覽全部 →"},{readable:"部可读",pieces:"篇单篇诗文",startReading:"开始阅读 →",nCopies:"{n}本",shelfHint:"按所志朝代排列,一脊一部",shelfLegendCount:"脊下「2本」=站内有几个本子",shelfOther:"其他",shelfRegion:"{label}书架,可横向滚动",origZhi:"正史原志",laterZhi:"后人补撰、续补",spineBy:"{name} 撰",spineRecords:"著录 {n} 条",spineOnSite:"站内 {n}",nWorks:"{n} 部",allNWorks:"全部 {n} 部",nCopiesCard:"{n} 个本子",workPageLink:"作品页:{title}的源流与全部版本 →",sibuUnclassifiedNote:"书目分类还没补齐,其中多数是单篇诗文,已单列在下方。",subClasses:"{label}子类",allNClasses:"{label}全部 {n} 类 →",unclassified:"未分类",viewUnclassified:"查看未分类 →",periodItem:"{label},{n} 部",periodUnknown:"另有 {n} 部作者无朝代,在「四部」和搜索里能找到",hoverHint:"窄段悬停看全名",nPieces:"{n} 篇",authorAll:"{name}全部 {n} 篇 →",period:{xianqin:"先秦",qinhan:"秦汉",weijin:"魏晋南北朝",suitang:"隋唐五代",song:"宋",liaojinyuan:"辽金元",ming:"明",qing:"清",modern:"近现代"},navLabel:"阅读首页分区",nav:{picks:"推荐阅读",topics:"专题",famous:"名著与版本",sibu:"四部",period:"按年代",pieces:"单篇诗文"},picksSub:"编辑挑选,定期轮换",topicsSub:"按作品类型归组;小说见下方「名著与版本」",famousSub:"一部作品一张卡,卡上列出站内能读的各个本子",sibuSub:"按古籍总目的分类树,只计站内可读的作品",periodSub:"按作者朝代归段,宽度与部数成比例",piecesSub:"单篇的诗、文、赋、表,按作者归组",piecesMore:"按作者浏览全部 →"}),Rp=dt({sideNav:"分類導航",classification:"分類",drawerLabel:"分類:{path}",all:"全部",allTitle:"全部典籍",stat:"共 {total} 種 · 每頁 {size} 條",statPage:" · 第 {page} / {pages} 頁",viewLabel:"呈現方式",viewCard:"卡片",viewList:"列表",juanN:"{n}卷",pagerLabel:"分頁",prevPage:"上一頁",nextPage:"下一頁",pageN:"第 {n} 頁",emptyWorks:"此類暫無作品",zhulu:"著錄",cunmu:"存目",categoriesN:"{n} 類",divisionStat:"{cats} 類 · {books} 部",categoryJuan:"卷{n}",booksN:"{n} 部",expandAllN:"展開全部 {n} 條"},{sideNav:"分类导航",classification:"分类",drawerLabel:"分类:{path}",all:"全部",allTitle:"全部典籍",stat:"共 {total} 种 · 每页 {size} 条",statPage:" · 第 {page} / {pages} 页",viewLabel:"呈现方式",viewCard:"卡片",viewList:"列表",juanN:"{n}卷",pagerLabel:"分页",prevPage:"上一页",nextPage:"下一页",pageN:"第 {n} 页",emptyWorks:"此类暂无作品",zhulu:"著录",cunmu:"存目",categoriesN:"{n} 类",divisionStat:"{cats} 类 · {books} 部",categoryJuan:"卷{n}",booksN:"{n} 部",expandAllN:"展开全部 {n} 条"}),Ep=dt({loss:{all:"全部",extant:"存",partially_extant:"殘",lost:"佚"},unclassified:"未分類",statBook:"書",statComma:",",statBookCopies:"本",statArticle:"文章",statArticleUnit:"篇",statPoem:"詩詞",statPoemUnit:"首",statCollection:"叢編",submit:"搜索"},{loss:{all:"全部",extant:"存",partially_extant:"残",lost:"佚"},unclassified:"未分类",statBook:"书",statComma:",",statBookCopies:"本",statArticle:"文章",statArticleUnit:"篇",statPoem:"诗词",statPoemUnit:"首",statCollection:"丛编",submit:"搜索"}),Ip=dt({title:"反饋",close:"關閉",submitType:{bug:"反饋錯誤",resource:"添加資源",suggestion:"功能建議",contact:"想參與"},placeholder:{bug:"請描述您發現的錯誤,包括頁面位置和具體內容",resource:"請提供完整資源鏈接和簡要版本說明",suggestion:"您希望網站增加或改進什麼?",contact:"想參與整理、校對或合作?簡單介紹一下您自己,並留下聯繫方式(此類留言不公開)"},chooseTypeFirst:"請先選擇反饋類型",contactPlaceholder:"郵箱(選填,僅站方可見,方便我們回覆您)",contactLabel:"聯繫方式(選填)",submitFailedRetry:"提交失敗,請稍後重試",submitFailed:"提交失敗",thanks:"感謝您的反饋!",viewList:"查看反饋列表 →",continueSubmit:"繼續提交",submitting:"提交中...",submit:"提交",submitFeedback:"提交反饋",listType:{bug:"錯誤反饋",resource:"資源建議",suggestion:"功能建議",other:"其他"},status:{pending:"待處理",in_progress:"處理中",resolved:"已處理",wontfix:"不採納",duplicate:"重複"},empty:"暫無反饋",reply:"回覆"},{title:"反馈",close:"关闭",submitType:{bug:"反馈错误",resource:"添加资源",suggestion:"功能建议",contact:"想参与"},placeholder:{bug:"请描述您发现的错误,包括页面位置和具体内容",resource:"请提供完整资源链接和简要版本说明",suggestion:"您希望网站增加或改进什么?",contact:"想参与整理、校对或合作?简单介绍一下您自己,并留下联系方式(此类留言不公开)"},chooseTypeFirst:"请先选择反馈类型",contactPlaceholder:"邮箱(选填,仅站方可见,方便我们回复您)",contactLabel:"联系方式(选填)",submitFailedRetry:"提交失败,请稍后重试",submitFailed:"提交失败",thanks:"感谢您的反馈!",viewList:"查看反馈列表 →",continueSubmit:"继续提交",submitting:"提交中...",submit:"提交",submitFeedback:"提交反馈",listType:{bug:"错误反馈",resource:"资源建议",suggestion:"功能建议",other:"其他"},status:{pending:"待处理",in_progress:"处理中",resolved:"已处理",wontfix:"不采纳",duplicate:"重复"},empty:"暂无反馈",reply:"回复"}),Lp=dt({empty:"暫無版本傳承數據",emptyGraph:"暫無版本圖數據",modeList:"列表",modeGraph:"關係圖",collectionLabel:"集合:",collectionAll:"全部",collectionAllDesc:"顯示該作品所有版本(含橋接節點)",graphLoading:"加載圖組件中…",graphMissing:"圖組件未安裝。請安裝 {xyflow} 與 {dagre}。",graphMissingHint:"或使用 {list} 列表視圖。",bridgeTitle:"橋接節點:本身不在核心集,為保持派生鏈完整而顯示",otherGroup:"其他",lost:"已佚",fragment:"殘本",hypothetical:"假想祖本",bridge:"橋接",extant:"現存:{juan}",sources:"來源:",related:"關聯:",confidence:{certain:"確定",consensus:"共識",probable:"推測",disputed:"有爭議"}},{empty:"暂无版本传承数据",emptyGraph:"暂无版本图数据",modeList:"列表",modeGraph:"关系图",collectionLabel:"集合:",collectionAll:"全部",collectionAllDesc:"显示该作品所有版本(含桥接节点)",graphLoading:"加载图组件中…",graphMissing:"图组件未安装。请安装 {xyflow} 与 {dagre}。",graphMissingHint:"或使用 {list} 列表视图。",bridgeTitle:"桥接节点:本身不在核心集,为保持派生链完整而显示",otherGroup:"其他",lost:"已佚",fragment:"残本",hypothetical:"假想祖本",bridge:"桥接",extant:"现存:{juan}",sources:"来源:",related:"关联:",confidence:{certain:"确定",consensus:"共识",probable:"推测",disputed:"有争议"}}),Ap={common:wp,detail:fi,bookPage:Sp,workPage:_p,collectionPage:$p,entityPage:Cp,reader:zp,collated:Tp,metaHome:Np,readHome:Bo,catalogPage:Rp,searchPage:Ep,feedback:Ip,lineage:Lp};function Pp(e){const n={};for(const[o,r]of Object.entries(Ap))n[o]=r[e];return n}function ht(e,n){return e.replace(/\{(\w+)\}/g,(o,r)=>String(n[r]??""))}const ts=new Map;function hn(e){let n=ts.get(e);return n||(n={...e==="zh-Hans"?kp:vp,...Pp(e)},ts.set(e,n)),n}function ns(e,n){let o=e;for(const r of n.split(".")){if(o==null||typeof o!="object")return;o=o[r]}return typeof o=="string"?o:void 0}function Aa(e){return(n,o)=>{const r=ns(e,n)??ns(hn("zh-Hant"),n)??n;return o?ht(r,o):r}}const is=new Map;function fn(e){let n=is.get(e);return n||(n=Aa(hn(e)),is.set(e,n)),n}const Pa="bim-locale";function Mp(){try{const e=localStorage.getItem(Pa);if(e==="zh-Hant"||e==="zh-Hans")return e}catch{}}function Bp(e){try{localStorage.setItem(Pa,e)}catch{}}const Wp="zh-Hans",Op=({locale:e,onLocaleChange:n,converter:o,children:r})=>{const[s,a]=h.useState(e??Wp),l=e??s;h.useEffect(()=>{if(e)return;const u=Mp();u&&u!==s&&a(u)},[]);const d=h.useMemo(()=>l==="zh-Hans"?o??jp():null,[l,o]),c=h.useCallback(u=>{a(u),Bp(u),n==null||n(u)},[n]),p=h.useMemo(()=>({locale:l,setLocale:c,messages:hn(l),converter:d}),[l,c,d]);return t.jsx(en.Provider,{value:p,children:r})};function Ce(){const e=h.useContext(en);return(e==null?void 0:e.messages)??hn("zh-Hant")}const Fp=2e3;function Pe(){const e=h.useContext(en),n=(e==null?void 0:e.locale)??"zh-Hant",o=(e==null?void 0:e.converter)??null,r=h.useRef(new Map),s=h.useRef(n);s.current!==n&&(r.current.clear(),s.current=n);const a=h.useCallback(l=>{if(!l)return"";if(!o)return l;const d=r.current.get(l);if(d!==void 0)return d;const c=o(l);if(r.current.size>=Fp){const p=r.current.keys().next().value;p!==void 0&&r.current.delete(p)}return r.current.set(l,c),c},[o]);return h.useMemo(()=>({convert:a,locale:n,isSimplified:n==="zh-Hans"}),[a,n])}function Q(){const e=h.useContext(en),{convert:n,locale:o,isSimplified:r}=Pe(),s=(e==null?void 0:e.messages)??hn("zh-Hant"),a=h.useMemo(()=>e?Aa(s):fn("zh-Hant"),[e,s]);return h.useMemo(()=>({t:a,convert:n,locale:o,isSimplified:r,messages:s}),[a,n,o,r,s])}const Ma=["錄說語詞議樣書記類傳國經補藝紀編後與間條號為開總種無數據冊頁選時題爲詩萬證學續關東圖資歷來讀館論見鈔別進師輯陳覽寫現應從","點兩華實對員長註結闕殘檢閱當會單換體將裡訂處過區釋術頭錢譯識個電動顯問這認質還幾遺雖須專擇係網運權務變發機請風聲輸軍導產","話們車難報讓業設帶辦紙氣麼際聽親場買賣謝費漢庫遷馬叢孫於張義晉閣維曆欽則夢慶齋録舊內陽樓紅淵歸載稱隱遼計評觀禮龜黃興節併","餘齊韓簡霑並樂諸滸屬組篩紹緒劉蘇誤職夾廣蓋敘斷歐寬駰極參試雜魯沒順線貞該測鮮統戰檔衛辭聯臺贊刪聖貫啟瀏譜薈寶約嘗諜謂舉詳","異賦軾復諒構級審標劃彙吳楊暫轉項寧硯蕭儀禪韻掃閉倉麗禎錯監鞏轍繫説筆竄縣聞諡賈僅擊羅宮訓談誌葉視戶細許祿繪鍵絕欄鑑講誕馮","趙習樹饋確賜裝擬規繼製薦畫鉛獨誠遠龍門覺訣隸軒諭繕塊爭鏡裏豐碼備掛堯錦駕鶴遊傷猶鄒瑩綴揚詔託僞頗竊虛莊歲禍爾辯獲篤窮盡跡","萊終穎訛瑣鐫繡廟幀佈躍雙預連狀態軸複懸遞灣箋頌訪層鏈敗達鈞鳳亂奮豈陰婁騎純優獻靈牆隨摺疊驗徑橫瀾蔣壞鈕盤範圍責減籤適側","榮聶頃縉讎銓廳軌厲鶚駢醫駝黨鐘諫樞滄軻溫贈鐵徵賴蹟潁閒顗歿駁歟勸諷誼湯詐脫羣尋澤擄顏釀謄鴻離騷傑滯憤執廢懼匱歎毀蠶獄寵闇","陸淺貨輕貧俠賤貴煩競樑鳩採綜謬鳴養堅韋顎呂蘭脈峯鵲兒賞籠階緊綱漁荊嬰慍潛營鎔繞陣塚億負卻塵懷閨擋撐縮領滾輪匯撈貼讚創險團","隊準礙強髒藥鮑顧給緯悅帳巖廬貢亞壇惡諱鎮薊驍愛討彌護揮偉輒擾況較響喪鑰藍"].join(""),Hp=new Set([...Ma,...Object.keys(_e.VARIANT_CHARS)]),Ba=[...La,"切換為繁體","漢籍リポジトリ"];function Dp(e,n=Ba){let o=e;for(const a of n)a&&(o=o.split(a).join(" "));const r=[],s=Array.from(o);return s.forEach((a,l)=>{Hp.has(a)&&r.push({char:a,context:s.slice(Math.max(0,l-8),l+9).join("")})}),r}function Up(e){if(!e)return"";try{const n=new URL(e).hostname,o={"zh.wikisource.org":"wikisource","www.shidianguji.com":"shidianguji","shidianguji.com":"shidianguji","archive.org":"archive","ctext.org":"ctext","read.nlc.cn":"nlc","www.digital.archives.go.jp":"japan_archives"};if(o[n])return o[n];const r=n.split(".");return r.length>=2?r[r.length-2]:n}catch{return""}}function Vp(){return{id:"",name:"",url:"",type:"text",details:""}}const uo=({items:e,onChange:n,onDownload:o,downloadStatuses:r,filterType:s})=>{const a=Ce(),[l,d]=h.useState(null),c=[{value:"text",label:a.resourceTypeShort.text},{value:"image",label:a.resourceTypeShort.image},{value:"text+image",label:a.resourceTypeShort.textImage},{value:"physical",label:a.resourceTypeShort.physical}],p=[{value:"catalog",label:a.rootType.catalog},{value:"search",label:a.rootType.search}],u=b=>{if(!s)return!0;const j=Qt(b);return s==="text"?j.includes("text"):s==="image"?j.includes("image")||j.includes("physical"):s==="physical"?j.includes("physical"):j.includes(s)},m=e.map((b,j)=>({item:b,originalIndex:j})).filter(({item:b})=>u(b)),g=()=>{const b=Vp();s&&(b.type=s),n([...e,b]),d(e.length)},f=b=>{n(e.filter((j,S)=>S!==b)),d(null)},x=(b,j,S)=>{const v=[...e];if(v[b]={...v[b],[j]:S},j==="url"&&!v[b].id){const $=Up(S);$&&(v[b].id=$)}n(v)},k=(b,j,S)=>{const $={...e[b].metadata||{}};S?$[j]=S:delete $[j],x(b,"metadata",Object.keys($).length>0?$:void 0)},y=(b,j)=>{const S=j.trim()?j.split(/[,,、]/).map(v=>v.trim()).filter(Boolean):void 0;x(b,"structure",S)},w=(b,j,S)=>{const $=e[b].coverage||{level:1,ranges:""};j==="level"?$.level=parseInt(S)||1:$.ranges=S,x(b,"coverage",$.ranges?$:void 0)};return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[m.map(({item:b,originalIndex:j})=>{var S,v,$;return t.jsxs("div",{style:{border:`1px solid ${i("widget-border")}`,borderRadius:"4px",background:i("input-bg"),overflow:"hidden"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer",gap:"8px"},onClick:()=>d(l===j?null:j),children:[t.jsx("span",{style:{opacity:.6,fontSize:"12px"},children:l===j?"▼":"▶"}),t.jsx("span",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"3px",background:Gp(b.type??"text"),color:i("on-color-fg")},children:(()=>{var z,P;const _=Qt(b);return _.length===0?b.type??"text":_.length===1?((z=c.find(N=>N.value===_[0]))==null?void 0:z.label)??_[0]:_.includes("text")&&_.includes("image")?((P=c.find(N=>N.value==="text+image"))==null?void 0:P.label)??"text+image":_.join("+")})()}),t.jsx("span",{style:{flex:1,fontSize:"13px",fontWeight:500},children:b.name||`${a.editor.resourcePlaceholder} ${j+1}`}),b.id&&t.jsx("span",{style:{fontSize:"11px",opacity:.5},children:b.id}),b.url&&t.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",onClick:_=>_.stopPropagation(),style:{fontSize:"12px",opacity:.7},children:"🔗"}),o&&b.url&&Yp(j,r==null?void 0:r[j],o,a),t.jsx("button",{onClick:_=>{_.stopPropagation(),f(j)},style:{background:"transparent",border:"none",color:i("danger"),cursor:"pointer",padding:"2px 6px",fontSize:"14px"},title:a.editor.deleteThisResource,children:"✕"})]}),l===j&&t.jsxs("div",{style:{padding:"12px",borderTop:`1px solid ${i("widget-border")}`},children:[fp(b,"image")&&b.url&&Kp(b,a),t.jsxs("div",{style:{display:"grid",gap:"8px"},children:[t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsxs("label",{style:Sn,children:[t.jsx("span",{style:_n,children:a.label.type}),t.jsx("select",{value:b.type,onChange:_=>x(j,"type",_.target.value),style:{..._t,flex:1},children:c.map(_=>t.jsx("option",{value:_.value,children:_.label},_.value))})]}),t.jsxs("label",{style:Sn,children:[t.jsx("span",{style:_n,children:a.label.rootType}),t.jsx("select",{value:b.root_type||"catalog",onChange:_=>x(j,"root_type",_.target.value),style:{..._t,flex:1},children:p.map(_=>t.jsx("option",{value:_.value,children:_.label},_.value))})]})]}),t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsx("input",{type:"text",value:b.id,onChange:_=>x(j,"id",_.target.value),placeholder:a.editor.idAutoExtract,style:{..._t,width:"140px",flexShrink:0}}),t.jsx("input",{type:"text",value:b.name,onChange:_=>x(j,"name",_.target.value),placeholder:a.editor.resourceName,style:{..._t,flex:1}})]}),t.jsx("input",{type:"text",value:b.url,onChange:_=>x(j,"url",_.target.value),placeholder:a.editor.resourceUrl,style:_t}),t.jsx("input",{type:"text",value:((S=b.structure)==null?void 0:S.join("、"))||"",onChange:_=>y(j,_.target.value),placeholder:a.editor.structurePlaceholder,style:_t}),t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsxs("label",{style:Sn,children:[t.jsx("span",{style:_n,children:a.label.coverageLevel}),t.jsx("input",{type:"number",min:1,value:((v=b.coverage)==null?void 0:v.level)??"",onChange:_=>w(j,"level",_.target.value),placeholder:"1",style:{..._t,width:"60px"}})]}),t.jsxs("label",{style:{...Sn,flex:1},children:[t.jsx("span",{style:_n,children:a.label.coverageRange}),t.jsx("input",{type:"text",value:(($=b.coverage)==null?void 0:$.ranges)||"",onChange:_=>w(j,"ranges",_.target.value),placeholder:a.editor.coverageRangePlaceholder,style:{..._t,flex:1}})]})]}),t.jsx("textarea",{value:b.details||"",onChange:_=>x(j,"details",_.target.value),placeholder:a.editor.detailsPlaceholder,style:{..._t,minHeight:"60px",resize:"vertical"}}),t.jsxs("div",{style:{borderTop:`1px solid ${i("widget-border")}`,paddingTop:"8px",marginTop:"4px"},children:[t.jsx("div",{style:{fontSize:"12px",color:i("desc-fg"),marginBottom:"6px"},children:a.label.metadata}),t.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px"},children:Object.entries(a.metadata).map(([_,z])=>{var P;return t.jsxs("label",{style:{...Sn,gap:"4px"},children:[t.jsx("span",{style:{..._n,minWidth:"56px"},children:z}),t.jsx("input",{type:"text",value:((P=b.metadata)==null?void 0:P[_])||"",onChange:N=>k(j,_,N.target.value),placeholder:z,style:{..._t,flex:1}})]},_)})})]})]})]})]},j)}),t.jsxs("button",{onClick:g,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"8px 16px",border:`1px dashed ${i("widget-border")}`,borderRadius:"4px",background:"transparent",color:i("fg"),cursor:"pointer",fontSize:"13px",opacity:.8},children:[t.jsx("span",{children:"+"}),t.jsx("span",{children:a.action.addResource})]})]})};function Gp(e){switch(e){case"text":return i("restype-text");case"image":return i("restype-image");case"text+image":return i("restype-text-image");case"physical":return i("restype-physical")}}function Yp(e,n,o,r){const s=(n==null?void 0:n.status)==="downloading",a=(n==null?void 0:n.status)==="completed";return t.jsx("button",{onClick:l=>{l.stopPropagation(),s||o(e,"")},disabled:s,style:{background:"transparent",border:"none",color:i(a?"success":s?"desc-fg":"link-fg"),cursor:s?"default":"pointer",padding:"2px 6px",fontSize:"12px",opacity:s?.6:.9},title:a?r.download.completed:s?`${r.download.downloading} ${(n==null?void 0:n.progress)||0}%`:r.download.downloadThis,children:a?"✓":s?"⏳":"⬇"})}function Kp(e,n){const o=/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(e.url)||e.url.includes("iiif")||e.url.includes("image");return t.jsx("div",{style:{marginBottom:"12px"},children:o?t.jsx("div",{style:{width:"100%",maxHeight:"150px",overflow:"hidden",borderRadius:"4px",background:i("overlay-bg")},children:t.jsx("img",{src:e.url,alt:e.name,style:{width:"100%",height:"150px",objectFit:"contain"},onError:r=>{r.target.style.display="none"}})}):t.jsx("div",{style:{padding:"12px",background:i("overlay-bg"),borderRadius:"4px",fontSize:"12px",color:i("desc-fg")},children:n.editor.imageResourceLink})})}const _t={width:"100%",padding:"6px 8px",background:i("input-bg"),color:i("input-fg"),border:`1px solid ${i("input-border")}`,borderRadius:"2px",fontSize:"13px",boxSizing:"border-box"},Sn={display:"flex",alignItems:"center",gap:"6px"},_n={fontSize:"12px",color:i("desc-fg"),whiteSpace:"nowrap"},qp={"commons.wikimedia.org":"維基共享","zh.wikisource.org":"維基文庫","taiwanebook.ncl.edu.tw":"臺灣華文電子書庫","ctext.org":"中國哲學書電子化計劃","www.shidianguji.com":"識典古籍","shidianguji.com":"識典古籍","archive.org":"Internet Archive","www.shuge.org":"書格","shuge.org":"書格","pan.baidu.com":"百度網盤"};function xn(e){try{return qp[new URL(e).hostname]}catch{return}}const os={text:0,image:1,physical:2};function Wo(e){return e.length===0?"physical":[...e].sort((n,o)=>(os[n]??99)-(os[o]??99)).join("+")}function Oo(e){var l;const n=d=>{const c=d.match(/^(.+?)·第(\d+)[冊册]$/);if(c)return[c[1],parseInt(c[2])];const p=d.match(/^(.+?)[·(](\d+)[)]?$/);return p?[p[1],parseInt(p[2])]:null},o=new Map;for(let d=0;d<e.length;d++){const c=e[d];if(c.volumes&&c.volumes.length>0)continue;const p=n(c.name);if(!p)continue;const[u,m]=p,g=`${u}|${Wo(Qt(c))}`;o.has(g)||o.set(g,{base:{...c,name:u,url:"",volumes:[]},volumes:[],indices:[]});const f=o.get(g);f.volumes.push({volume:m,url:c.url||void 0,status:"found"}),f.indices.push(d)}const r=[],s=new Set;for(const d of o.values())if(!(d.volumes.length<2)){d.volumes.sort((c,p)=>c.volume-p.volume),d.base.volumes=d.volumes,d.base.expected_volumes=d.volumes.length,d.base.url||(d.base.url=((l=d.volumes.find(c=>c.url))==null?void 0:l.url)??""),r.push(d.base);for(const c of d.indices)s.add(c)}const a=[...r];for(let d=0;d<e.length;d++)s.has(d)||a.push(e[d]);return a}function Wa(e){if(e.url)return e.url;for(const[n,o]of Object.entries(e))if(n.endsWith("_url")&&typeof o=="string")return o}function Oa(e){return!Array.isArray(e.volumes)||e.volumes.length===0?null:e.volumes.map(n=>({...n,url:n.url||Wa(n)}))}function xi(e){const n=Oa(e);if(!n)return null;const o=new Set(n.filter(s=>s.status!=="missing").map(s=>s.volume)).size,r=new Set(n.filter(s=>s.status==="missing").map(s=>s.volume)).size;return{found:o,missing:r,expected:e.expected_volumes??o+r}}function Fo(e){if(!e)return;const n=e.file_page_range||e.page_range;if(!n||typeof n!="string")return;const o=n.match(/^(\d+)/);return o?parseInt(o[1],10):void 0}function Ho(e,n){try{if(new URL(e).hostname.includes("wikimedia.org")){const r=e.match(/\/wiki\/File:(.+?)(?:#|$)/);if(r)return`https://commons.wikimedia.org/w/index.php?title=File%3A${encodeURIComponent(decodeURIComponent(r[1]))}&page=${n}`;const s=new URL(e);return s.searchParams.set("page",String(n)),s.toString()}return e}catch{return e}}function bn(e){if(!e.url)return;const n=Fo(e.metadata);return n?Ho(e.url,n):e.url}const rs={text:i("restype-text"),image:i("restype-image"),"text+image":i("restype-text-image"),physical:i("restype-physical")};function Xp(e){return e.includes("text")&&e.includes("image")?rs["text+image"]:rs[e[0]||"physical"]}const Do=({items:e,groupByType:n=!0,resourceGroups:o,onNavigate:r,renderLink:s})=>{const a=Ce(),{convert:l}=Pe(),d=h.useMemo(()=>Oo(e||[]),[e]),{mirrorGroups:c,ungroupedItems:p}=h.useMemo(()=>{const y=new Map,w=[];for(const b of d){const j=b.group;j?(y.has(j)||y.set(j,[]),y.get(j).push(b)):w.push(b)}for(const b of y.values())b.sort((j,S)=>{const v=$=>$.group_role==="origin"?0:$.group_role==="mirror"?1:2;return v(j)-v(S)});return{mirrorGroups:y,ungroupedItems:w}},[d]),u={text:a.resourceType.text,image:a.resourceType.image,"text+image":a.resourceType.textImage,physical:a.resourceType.physical},m=y=>u[y]?u[y]:y.split("+").map(w=>u[w]||w).join("+");if(!d||d.length===0)return t.jsx("div",{style:{padding:"16px",color:i("desc-fg"),fontSize:"13px",textAlign:"center"},children:a.misc.noResources});if(!n)return t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:d.map((y,w)=>t.jsx(Yi,{item:y},y.id||w))});const g=(y,w)=>{const b=o==null?void 0:o[y],j=(b==null?void 0:b.label)||y,S=b==null?void 0:b.description;return t.jsxs("div",{style:{padding:"10px 12px",border:`1px solid ${i("widget-border")}`,borderRadius:"6px",background:i("input-bg"),display:"flex",flexDirection:"column",gap:"8px"},children:[t.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:i("fg")},children:l(j)}),S&&t.jsx("div",{style:{fontSize:"12px",color:i("desc-fg"),lineHeight:1.5},children:l(S)}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:w.map((v,$)=>t.jsx(Yi,{item:v,onNavigate:r,renderLink:s},v.id||$))})]},`group-${y}`)},f=new Map;for(const y of p){const w=Wo(Qt(y));f.has(w)||f.set(w,[]),f.get(w).push(y)}const x=["text","image","text+image","physical"],k=[...x.filter(y=>f.has(y)),...[...f.keys()].filter(y=>!x.includes(y)).sort()];return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[[...c.entries()].map(([y,w])=>g(y,w)),k.map(y=>{const w=f.get(y),b=Xp(y.split("+"));return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"8px",flexWrap:"wrap"},children:[t.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:b,whiteSpace:"nowrap",flexShrink:0},children:m(y)}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:w.map((j,S)=>t.jsx(Yi,{item:j,onNavigate:r,renderLink:s},j.id||S))})]},y)})]})},Zp={bw:{label:"",bg:i("colormode-bw-bg"),fg:i("colormode-bw-fg")},color:{label:"",bg:i("colormode-color-bg"),fg:i("colormode-color-fg")}},Yi=({item:e})=>{const n=Ce(),{convert:o}=Pe(),[r,s]=h.useState(!1),a=h.useMemo(()=>(e.url?xn(e.url):void 0)||o(e.name),[e.url,e.name,o]),l=h.useMemo(()=>!Array.isArray(e.volumes)||e.volumes.length===0?null:e.volumes.map(x=>({...x,url:x.url||Wa(x)})),[e.volumes]),d=l&&l.length>0,c=d?new Set(l.filter(x=>x.status!=="missing").map(x=>x.volume)).size:0,p=d?new Set(l.filter(x=>x.status==="missing").map(x=>x.volume)).size:0,u=e.expected_volumes??(d?c+p:0),m=e.color_mode?{...Zp[e.color_mode],label:n.colorMode[e.color_mode]}:null,g=e.details&&!d?o(e.details):null,f={display:"inline-flex",alignItems:"center",gap:"5px",padding:"4px 10px",border:`1px solid ${i("widget-border")}`,borderRadius:"5px",background:i("input-bg"),fontSize:"12px",color:i("fg"),lineHeight:1.4,verticalAlign:"middle"};return t.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"4px"},children:[t.jsxs("div",{style:f,children:[t.jsx("span",{style:{fontWeight:500},children:a}),m&&t.jsx("span",{style:{padding:"0 5px",borderRadius:"3px",fontSize:"10px",fontWeight:500,background:m.bg,color:m.fg},children:m.label}),g&&t.jsx("span",{style:{fontSize:"11px",color:i("desc-fg")},children:g}),d&&t.jsxs("span",{style:{fontSize:"11px",color:i("desc-fg")},children:[c,"/",u,n.unit.volume,p>0&&t.jsx("span",{style:{color:i("missing-fg"),marginLeft:"3px"},children:ht(n.common.volumesMissing,{n:p})})]}),e.url&&t.jsx("a",{href:(()=>{const x=Fo(e.metadata);return x?Ho(e.url,x):e.url})(),target:"_blank",rel:"noopener noreferrer",style:{fontSize:"11px",color:i("link-fg"),textDecoration:"none",whiteSpace:"nowrap"},children:n.action.visit}),d&&t.jsx("button",{onClick:()=>s(!r),style:{padding:"0 6px",fontSize:"11px",border:"none",background:"transparent",color:i("desc-fg"),cursor:"pointer",lineHeight:1.4},children:r?"▲":"▼"})]}),d&&r&&t.jsx("div",{style:{padding:"6px 10px",border:`1px solid ${i("widget-border")}`,borderRadius:"5px",display:"flex",flexWrap:"wrap",gap:"4px",maxWidth:"360px"},children:l.map(x=>{const k=x.status==="missing";return x.url&&!k?t.jsx("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-block",padding:"1px 5px",fontSize:"11px",borderRadius:"3px",border:`1px solid ${i("widget-border")}`,color:i("link-fg"),textDecoration:"none"},children:x.volume},x.volume):t.jsx("span",{style:{display:"inline-block",padding:"1px 5px",fontSize:"11px",color:i(k?"missing-fg":"desc-fg"),textDecoration:k?"line-through":"none",opacity:k?.6:1},children:x.volume},x.volume)})})]})},Fa=({indexSource:e,syncConfig:n,variant:o="index-browser",onSwitchMode:r,onToggleDraft:s,onConfigurePath:a,onSelectFolder:l})=>{const d=Ce(),c=e==="local",p=(n==null?void 0:n.isDraft)??!0,u=(n==null?void 0:n.repoPath)||"",m=u?u.split(/[/\\]/).pop()||u:"",g={display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",borderRadius:"8px",fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"opacity 0.2s",border:"none",background:i("primary-soft"),color:i("primary")},f={onMouseOver:k=>k.currentTarget.style.opacity="0.8",onMouseOut:k=>k.currentTarget.style.opacity="1"},x=t.jsxs("div",{onClick:s,title:p?d.mode.switchToOfficial:d.mode.switchToDraft,style:{...g,background:i(p?"warning":"success"),color:i("on-color-fg")},...f,children:[t.jsx("span",{children:p?"📝":"📚"}),t.jsx("span",{children:p?"draft":"official"})]});return o==="index-browser"?c?t.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[x,t.jsxs("div",{onClick:r,title:d.mode.switchToSync,style:g,...f,children:[t.jsx("span",{children:"📁"}),t.jsx("span",{children:d.mode.localMode}),t.jsx("span",{style:{opacity:.6,marginLeft:"4px"},children:"⇄"})]}),t.jsxs("div",{onClick:l,title:u||d.mode.selectFolder,style:{...g,paddingLeft:"8px",paddingRight:"8px"},...f,children:[t.jsx("span",{children:"📂"}),m&&t.jsx("span",{style:{fontSize:"11px",opacity:.9},children:m})]})]}):t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x,t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[t.jsxs("div",{onClick:r,title:d.mode.switchToLocal,style:g,...f,children:[t.jsx("span",{children:"🌐"}),t.jsx("span",{children:d.mode.syncMode}),t.jsx("span",{style:{opacity:.6,marginLeft:"4px"},children:"⇄"})]}),t.jsx("div",{onClick:a,title:m||d.mode.configurePath,style:{...g,background:"transparent",padding:"6px",fontSize:"12px"},...f,children:t.jsx("span",{children:"⚙️"})})]})]}):t.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[t.jsxs("div",{onClick:r,title:c?d.mode.switchToGithub:d.mode.switchToLocal,style:g,...f,children:[t.jsx("span",{children:c?"📁":"🌐"}),t.jsx("span",{children:c?d.mode.localMode:d.mode.githubSync}),t.jsx("span",{style:{opacity:.6},children:"⇄"})]}),c&&t.jsxs("div",{onClick:l,title:u||d.mode.selectFolder,style:{...g,paddingLeft:"8px",paddingRight:"8px",minWidth:u?"100px":"auto",justifyContent:"space-between"},...f,children:[t.jsx("span",{children:"📂"}),m&&t.jsx("span",{style:{fontSize:"11px",opacity:.9},children:m})]}),!c&&m&&t.jsxs("div",{style:{...g,background:i("mode-active-bg"),color:i("on-color-fg"),cursor:"default"},title:u,children:[t.jsx("span",{children:"📂"}),t.jsx("span",{style:{fontSize:"11px"},children:m})]})]})},bi="bim-search-history",ss=10,as=8;function In(){try{const e=localStorage.getItem(bi);return e?JSON.parse(e):[]}catch{return[]}}function Ha(e){try{const n=In().filter(o=>o!==e);n.unshift(e),n.length>ss&&(n.length=ss),localStorage.setItem(bi,JSON.stringify(n))}catch{}}function Jp(e){try{const n=In().filter(o=>o!==e);localStorage.setItem(bi,JSON.stringify(n))}catch{}}function Qp(){try{localStorage.removeItem(bi)}catch{}}const Da=({transport:e,value:n,onChange:o,onSearch:r,onEntrySelect:s,placeholder:a})=>{const l=Ce(),d=a??l.search.placeholder,c={work:l.indexType.work,book:l.indexType.book,collection:l.indexType.collection,entity:l.indexType.entity},[p,u]=h.useState(!1),[m,g]=h.useState([]),[f,x]=h.useState(-1),[k,y]=h.useState(In),w=h.useRef(null),b=h.useRef(null),j=h.useRef(null),S=h.useRef(!1);h.useEffect(()=>{x(-1);const T=n.trim();if(!T){g(k.map(E=>({type:"history",text:E})));return}if(!e.searchAll){g([]);return}let D=!1;const R=setTimeout(()=>{e.searchAll(T,as).then(E=>{if(D)return;const L=[...E.works,...E.books,...E.collections,...E.entities??[]];g(L.slice(0,as).map(I=>({type:"entry",text:I.title||I.id,entry:I})))}).catch(()=>{D||g([])})},80);return()=>{D=!0,clearTimeout(R)}},[n,k,e]),h.useEffect(()=>{const T=D=>{j.current&&!j.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]),h.useEffect(()=>{const T=D=>{var R,E;if(D.key==="/"&&document.activeElement!==w.current){const L=(R=document.activeElement)==null?void 0:R.tagName;if(L==="INPUT"||L==="TEXTAREA"||L==="SELECT")return;D.preventDefault(),(E=w.current)==null||E.focus()}};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[]);const v=h.useCallback(T=>{T.trim()&&(Ha(T.trim()),y(In())),r(T),u(!1)},[r]),$=h.useCallback(T=>{T.type==="history"?(o(T.text),v(T.text)):T.entry&&(s?(s(T.entry),u(!1)):(o(T.text),v(T.text)))},[o,v,s]),_=h.useCallback(T=>{if(!p||m.length===0){T.key==="Enter"&&v(n);return}switch(T.key){case"ArrowDown":T.preventDefault(),x(D=>(D+1)%m.length);break;case"ArrowUp":T.preventDefault(),x(D=>(D-1+m.length)%m.length);break;case"Enter":T.preventDefault(),f>=0&&f<m.length?$(m[f]):v(n);break;case"Escape":T.preventDefault(),u(!1);break}},[p,m,f,n,v,$]),z=h.useCallback((T,D)=>{D.stopPropagation(),Jp(T),y(In()),g(R=>R.filter(E=>!(E.type==="history"&&E.text===T)))},[]),P=h.useCallback(T=>{T.stopPropagation(),Qp(),y([]),g([])},[]);h.useEffect(()=>{if(f>=0&&b.current){const T=b.current.children;T[f]&&T[f].scrollIntoView({block:"nearest"})}},[f]);const N=!n.trim()&&k.length>0;return t.jsxs("div",{ref:j,style:{position:"relative",flex:1},children:[t.jsx("input",{ref:w,type:"text",placeholder:d,value:n,onChange:T=>{o(T.target.value),u(!0)},onCompositionStart:()=>{S.current=!0},onCompositionEnd:()=>{S.current=!1},onFocus:()=>{u(!0)},onKeyDown:_,style:{width:"100%",padding:"8px 12px",border:`1px solid ${i("input-border")}`,borderRadius:"6px",background:i("input-bg"),color:i("input-fg"),fontSize:"14px",boxSizing:"border-box"}}),p&&m.length>0&&t.jsxs("div",{ref:b,style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",background:i("input-bg"),border:`1px solid ${i("widget-border")}`,borderRadius:"6px",boxShadow:i("shadow-dropdown"),zIndex:100,maxHeight:"320px",overflow:"auto"},children:[N&&t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 12px",fontSize:"11px",color:i("desc-fg"),borderBottom:`1px solid ${i("widget-border")}`},children:[t.jsx("span",{children:l.search.history}),t.jsx("button",{onClick:P,style:{border:"none",background:"transparent",color:i("desc-fg"),cursor:"pointer",fontSize:"11px",padding:"0 4px"},children:l.search.clearAll})]}),m.map((T,D)=>t.jsxs("div",{onClick:()=>$(T),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",cursor:"pointer",fontSize:"13px",color:i("fg"),background:D===f?i("list-active-bg"):"transparent"},children:[t.jsx("span",{style:{fontSize:"12px",opacity:.5,width:"16px",textAlign:"center"},children:T.type==="history"?"🕐":"🔍"}),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T.text}),T.entry&&t.jsxs("span",{style:{fontSize:"11px",color:i("desc-fg"),flexShrink:0},children:[c[T.entry.type],T.entry.edition&&` · ${T.entry.edition}`,T.entry.author&&` · ${T.entry.author}`]}),T.type==="history"&&t.jsx("button",{onClick:R=>z(T.text,R),style:{border:"none",background:"transparent",color:i("desc-fg"),cursor:"pointer",fontSize:"12px",padding:"0 2px",lineHeight:1},title:l.action.remove,children:"×"})]},`${T.type}-${T.text}-${D}`))]})]})},yn=({type:e,size:n=9})=>t.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:n,height:n,borderRadius:1,flex:"none",background:i(`type-${e}`),verticalAlign:"middle"}}),yi={dynasty:[],classification:[],hasImage:!1,hasText:!1,hasCollated:!1,loss:"",sort:""},Ua=new Set(["work","book","entity"]);function eu(e){return Ya(e)||!!e.sort}function tu(e,n){return n.sort&&Ua.has(e)?n.sort:void 0}const ji=[{key:"漢",values:["漢","西漢","東漢"]},{key:"魏晉南北朝",values:["三國魏","三國蜀","三國吳","三國","晉","西晉","東晉","南朝宋","南朝齊","南朝梁","南朝陳","北魏","東魏","西魏","北齊","北周"]},{key:"唐",values:["隋","唐","五代","前蜀","後蜀","南唐"]},{key:"宋",values:["宋","北宋","南宋","宋末元初","遼","金"]},{key:"元",values:["元","元末明初"]},{key:"明",values:["明","明末清初"]},{key:"清",values:["清"]}],vi=[{value:"經部",label:"經部"},{value:"史部",label:"史部"},{value:"子部",label:"子部"},{value:"集部",label:"集部"},{value:"",label:"未分類"}],Va=[{value:"",label:"全部"},{value:"extant",label:"存"},{value:"partially_extant",label:"殘"},{value:"lost",label:"佚"}],Ga={work:new Set(["dynasty","classification","hasImage","hasText","hasCollated","loss"]),book:new Set(["dynasty","hasImage","hasText"]),collection:new Set,entity:new Set(["dynasty"])};function ki(e){return e.dynasty.length+e.classification.length+(e.hasImage?1:0)+(e.hasText?1:0)+(e.hasCollated?1:0)+(e.loss?1:0)}function Ya(e){return ki(e)>0}function nu(e){const n=[];return e.dynasty.length&&n.push("dynasty"),e.classification.length&&n.push("classification"),e.hasImage&&n.push("hasImage"),e.hasText&&n.push("hasText"),e.hasCollated&&n.push("hasCollated"),e.loss&&n.push("loss"),n}function Ka(e,n){const o=Ga[e];return nu(n).every(r=>o.has(r))}const $n=e=>JSON.stringify(e);function iu(e,n){if(!Ka(n,e))return null;const o=[];if(e.dynasty.length){const r=Array.from(new Set(e.dynasty.flatMap(s=>{var a;return((a=ji.find(l=>l.key===s))==null?void 0:a.values)??[]})));r.length===1?o.push(`dynasty = ${$n(r[0])}`):r.length>1&&o.push(`dynasty IN [${r.map($n).join(", ")}]`)}return e.classification.length&&o.push(e.classification.length===1?`classification = ${$n(e.classification[0])}`:`classification IN [${e.classification.map($n).join(", ")}]`),e.hasImage&&o.push("has_image = true"),e.hasText&&o.push("has_text = true"),e.hasCollated&&o.push("has_collated = true"),e.loss&&o.push(`loss_status = ${$n(e.loss)}`),o.join(" AND ")}const st={dynasty:"dy",classification:"cls",hasImage:"img",hasText:"txt",hasCollated:"col",loss:"loss",sort:"sort"},qa="_";function ci(e,n=new URLSearchParams){for(const o of Object.values(st))n.delete(o);return e.dynasty.length&&n.set(st.dynasty,e.dynasty.join(",")),e.classification.length&&n.set(st.classification,e.classification.map(o=>o||qa).join(",")),e.hasImage&&n.set(st.hasImage,"1"),e.hasText&&n.set(st.hasText,"1"),e.hasCollated&&n.set(st.hasCollated,"1"),e.loss&&n.set(st.loss,e.loss),e.sort&&n.set(st.sort,e.sort),n}function ou(e){const n=a=>(e.get(a)??"").split(",").map(l=>l.trim()).filter(Boolean),o=new Set(ji.map(a=>a.key)),r=new Set(vi.map(a=>a.value)),s=e.get(st.loss);return{dynasty:Array.from(new Set(n(st.dynasty).filter(a=>o.has(a)))),classification:Array.from(new Set(n(st.classification).map(a=>a===qa?"":a).filter(a=>r.has(a)))),hasImage:e.get(st.hasImage)==="1",hasText:e.get(st.hasText)==="1"||e.get(st.hasCollated)==="1",hasCollated:!1,loss:s==="extant"||s==="partially_extant"||s==="lost"?s:"",sort:["era:asc","era:desc","title:asc","title:desc"].find(a=>a===e.get(st.sort))??""}}function ru(e,n){return JSON.stringify([e.dynasty.slice().sort(),e.classification.slice().sort(),e.hasImage,e.hasText,e.hasCollated,e.loss,e.sort])===JSON.stringify([n.dynasty.slice().sort(),n.classification.slice().sort(),n.hasImage,n.hasText,n.hasCollated,n.loss,n.sort])}function ls(e,n){return e.includes(n)?e.filter(o=>o!==n):[...e,n]}const su=({filters:e,onChange:n})=>{const o=Ce(),r=o.searchV4,{convert:s}=Pe(),[a,l]=h.useState(!1),d=h.useId(),c=ki(e),p=u=>n({...e,...u});return t.jsxs("aside",{className:"bim-sr-aside","aria-label":s(r.filterTitle),children:[t.jsxs("button",{type:"button",className:"bim-sr-fbtn","aria-expanded":a,"aria-controls":d,onClick:()=>l(u=>!u),children:[t.jsxs("span",{children:[s(r.filterButton),c>0&&t.jsx("span",{className:"bim-sr-fn",children:s(ht(r.filterSelected,{n:c}))})]}),t.jsxs("span",{className:"bim-sr-fa","aria-hidden":"true",children:[s(a?r.collapse:r.expand)," ",a?"▴":"▾"]})]}),t.jsxs("div",{className:"bim-sr-filters",id:d,"data-open":a?"true":"false",...a?{}:{"data-collapsed":"true"},children:[t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{children:s(r.dynasty)}),t.jsx("div",{className:"bim-sr-chips",children:ji.map(u=>t.jsx("button",{type:"button",className:"bim-sr-chip","aria-pressed":e.dynasty.includes(u.key),onClick:()=>p({dynasty:ls(e.dynasty,u.key)}),children:s(u.key)},u.key))})]}),t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{children:s(r.classification)}),vi.map(u=>t.jsxs("label",{className:"bim-sr-opt",children:[t.jsx("input",{type:"checkbox",checked:e.classification.includes(u.value),onChange:()=>p({classification:ls(e.classification,u.value)})}),u.value?s(u.label):o.searchPage.unclassified]},u.value||"_"))]}),t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{children:s(r.resources)}),t.jsxs("label",{className:"bim-sr-opt",children:[t.jsx("input",{type:"checkbox",checked:e.hasImage,onChange:u=>p({hasImage:u.target.checked})}),s(r.hasImage)]}),t.jsxs("label",{className:"bim-sr-opt",children:[t.jsx("input",{type:"checkbox",checked:e.hasText,onChange:u=>p({hasText:u.target.checked})}),s(r.hasText)]})]}),t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{id:`${d}-loss`,children:s(r.extant)}),t.jsx("div",{className:"bim-sr-seg",role:"group","aria-labelledby":`${d}-loss`,children:Va.map(u=>t.jsx("button",{type:"button","aria-pressed":e.loss===u.value,onClick:()=>p({loss:u.value}),children:o.searchPage.loss[u.value||"all"]},u.value||"all"))})]}),c>0&&t.jsx("button",{type:"button",className:"bim-sr-clear",onClick:()=>n({...yi,sort:e.sort}),children:s(r.clearAllFilters)})]})]})};function Xa({text:e,query:n}){const o=(n??"").trim();if(!o||!e)return t.jsx(t.Fragment,{children:e});const r=e.toLowerCase(),s=o.toLowerCase(),a=[];let l=0,d=0;for(;l<e.length;){const c=r.indexOf(s,l);if(c<0){a.push(e.slice(l));break}c>l&&a.push(e.slice(l,c)),a.push(t.jsx("mark",{className:"bim-sr-hl",children:e.slice(c,c+s.length)},d++)),l=c+s.length}return t.jsx(t.Fragment,{children:a})}const cs=({entries:e,query:n,onEntryLinkClick:o,typeName:r})=>{const s=Ce(),a=s.searchV4,{convert:l}=Pe(),d=tt();return t.jsx("div",{className:"bim-sr-tablewrap",children:t.jsxs("table",{className:"bim-sr-table",children:[t.jsxs("colgroup",{children:[t.jsx("col",{style:{width:"34%"}}),t.jsx("col",{style:{width:"8%"}}),t.jsx("col",{style:{width:"19%"}}),t.jsx("col",{style:{width:"13%"}}),t.jsx("col",{style:{width:"12%"}}),t.jsx("col",{style:{width:"14%"}})]}),t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",children:l(a.colTitle)}),t.jsx("th",{scope:"col",children:l(a.colType)}),t.jsx("th",{scope:"col",children:l(a.colAuthor)}),t.jsx("th",{scope:"col",children:l(a.colEra)}),t.jsx("th",{scope:"col",children:l(a.colClass)}),t.jsx("th",{scope:"col",style:{textAlign:"right"},children:l(a.colResource)})]})}),t.jsx("tbody",{children:e.map(c=>{const p=l(c.title||c.primary_name||c.id),u=c.measure_info?l(c.measure_info):c.juan_count?`${c.juan_count}${s.unit.juan}`:"",m=c.type==="entity"?[c.birth_year!=null||c.death_year!=null?`${c.birth_year??"?"}—${c.death_year??"?"}`:""].filter(Boolean).join(""):c.author?`${l(c.author)}${c.role&&c.role!=="author"?` ${l(c.role)}`:""}`:"",g=c.type==="book"?c.era??c.dynasty:c.dynasty,f=g?l(g):"",x=c.classification?l(c.classification):"",k=[];c.has_image&&k.push({label:a.tagImage,cls:"bim-sr-tag--img"}),(c.has_text||c.has_collated)&&k.push({label:a.tagText,cls:""}),c.loss_status==="lost"&&k.push({label:a.tagLost,cls:"bim-sr-tag--lost"});const y=[m,f,x].filter(Boolean).join(" · ");return t.jsxs("tr",{children:[t.jsxs("td",{className:"bim-sr-c-title",children:[t.jsxs("div",{className:"bim-sr-tl",children:[t.jsx("a",{href:d(c.id),onClick:w=>o(c,w),children:t.jsx(Xa,{text:p,query:n?l(n):void 0})}),u&&t.jsx("span",{className:"bim-sr-measure",children:u})]}),y&&t.jsx("span",{className:"bim-sr-sub",children:y})]}),t.jsxs("td",{className:"bim-sr-c-type",children:[t.jsx(yn,{type:c.type,size:6})," ",r(c.type)]}),t.jsx("td",{className:"bim-sr-c-who",children:m||"—"}),t.jsx("td",{className:"bim-sr-c-era",children:f||"—"}),t.jsx("td",{className:"bim-sr-c-cls",children:x||"—"}),t.jsx("td",{className:"bim-sr-c-res",children:k.map(w=>t.jsx("span",{className:`bim-sr-tag ${w.cls}`,children:l(w.label)},w.label))})]},c.id)})})]})})},au=`
1
+ "use strict";var ip=Object.create;var Qr=Object.defineProperty;var op=Object.getOwnPropertyDescriptor;var rp=Object.getOwnPropertyNames;var sp=Object.getPrototypeOf,ap=Object.prototype.hasOwnProperty;var lp=(e,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of rp(n))!ap.call(e,s)&&s!==o&&Qr(e,s,{get:()=>n[s],enumerable:!(r=op(n,s))||r.enumerable});return e};var Jn=(e,n,o)=>(o=e!=null?ip(sp(e)):{},lp(n||!e||!e.__esModule?Qr(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("./storage-entry-BNx9e7zn.cjs"),t=require("react/jsx-runtime"),h=require("react"),cp=require("opencc-js/t2cn"),dp=require("react-markdown"),pp=require("remark-gfm"),up=e=>`/book-index?id=${e}`,Na=h.createContext(up);function mp({buildUrl:e,children:n}){const o=h.useMemo(()=>e,[e]);return t.jsx(Na.Provider,{value:o,children:n})}function tt(){return h.useContext(Na)}const Ra="",Ea="";function Mo(e){const n=[];let o=!1,r=e;for(;r.length;){const s=o?Ea:Ra,a=r.indexOf(s);if(a===-1){n.push({text:r,marked:o});break}a>0&&n.push({text:r.slice(0,a),marked:o}),r=r.slice(a+1),o=!o}return n}function lt(e,n){return{title:e,tokens:n}}const es='"Songti SC", "Songti TC", STSong, "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif',gp=[lt("基础(VS Code 环境下跟随 --vscode-*)",{bg:{value:"#ffffff",vscode:"--vscode-editor-background"},fg:{value:"#333333",vscode:"--vscode-foreground"},"input-bg":{value:"#ffffff",vscode:"--vscode-input-background"},"input-fg":{value:"#333333",vscode:"--vscode-input-foreground"},"input-border":{value:"#cccccc",vscode:"--vscode-input-border"},"widget-border":{value:"#e0e0e0",vscode:"--vscode-widget-border"},"link-fg":{value:"#0066cc",vscode:"--vscode-textLink-foreground"},"desc-fg":{value:"#717171",vscode:"--vscode-descriptionForeground"},primary:{value:"#0078d4",vscode:"--vscode-button-background"},"primary-fg":{value:"#ffffff",vscode:"--vscode-button-foreground"},"primary-soft":{value:"rgba(0, 120, 212, 0.15)",css:"color-mix(in srgb, var(--bim-primary) 15%, transparent)"},danger:{value:"#f44336"},warning:{value:"#ff9800"},success:{value:"#4caf50"},"sidebar-bg":{value:"#f3f3f3",vscode:"--vscode-sideBar-background"},"list-hover-bg":{value:"rgba(0, 0, 0, 0.04)",vscode:"--vscode-list-hoverBackground"},"list-active-bg":{value:"rgba(0, 120, 212, 0.1)",vscode:"--vscode-list-activeSelectionBackground"},"focus-border":{value:"#0078d4",vscode:"--vscode-focusBorder"}}),lt("底色层次 / 文字与描边 / 链接",{"bg-subtle":{value:"#fafafa"},"widget-bg":{value:"#f8f8f8"},muted:{value:"#888888"},border:{value:"#e5e5e5"},"primary-bg":{value:"#fdf4f4"},link:{value:"#1976d2"},"tag-bg":{value:"#f0f0f0"},"accent-bg":{value:"#1976d2"},"on-color-fg":{value:"#ffffff",note:"彩色底(徽章、选中态按钮)上的文字"}}),lt("提示与警告",{"info-fg":{value:"#0c5380"},"info-bg":{value:"#e7f3ff"},"info-border":{value:"#b3dbff"},"warn-fg":{value:"#856404"},"warn-bg":{value:"#fff3cd"},"warn-border":{value:"#ffc107"},"danger-bg":{value:"rgba(244, 67, 54, 0.08)",note:"错误提示条底色"},"danger-soft-bg":{value:"rgba(244, 67, 54, 0.03)",note:"编辑器危险区块"},"danger-soft-border":{value:"rgba(244, 67, 54, 0.13)"}}),lt("遮罩与阴影",{backdrop:{value:"rgba(0, 0, 0, 0.5)",note:"对话框遮罩"},"overlay-bg":{value:"#00000010",note:"轻量遮罩底(图片占位等)"},"shadow-dialog":{value:"0 4px 20px rgba(0, 0, 0, 0.3)"},"shadow-dropdown":{value:"0 4px 12px rgba(0, 0, 0, 0.1)"},"shadow-tooltip":{value:"0 2px 8px rgba(0, 0, 0, 0.08)"},"shadow-fab":{value:"0 2px 8px rgba(0, 0, 0, 0.25)",note:"悬浮按钮(反馈)"},"shadow-card":{value:"0 1px 4px rgba(0, 0, 0, 0.06)",note:"展开的卡片"},"shadow-node":{value:"0 1px 3px rgba(0, 0, 0, 0.1)",note:"谱系图节点"},"shadow-node-selected":{value:"0 0 0 3px rgba(0, 120, 212, 0.2), 0 2px 8px rgba(0, 120, 212, 0.3)"}}),lt("条目类型 / 状态徽章",{"type-book":{value:"#c0392b"},"type-work":{value:"#8e6f3e"},"type-collection":{value:"#2471a3"},"type-entity":{value:"#5b3e8e"},"status-draft":{value:"#e67e22"},"status-official":{value:"#27ae60"}}),lt("资源",{"restype-text":{value:"#2196f3"},"restype-image":{value:"#ff9800"},"restype-text-image":{value:"#9c27b0"},"restype-physical":{value:"#795548"},"missing-fg":{value:"#e67e22",note:"资源缺册提示"},"colormode-bw-bg":{value:"#f5f5f5",note:"影印件色彩模式标记(黑白 / 彩色)"},"colormode-bw-fg":{value:"#757575"},"colormode-color-bg":{value:"#fff8e1"},"colormode-color-fg":{value:"#f57f17"},"progress-active":{value:"#f59e0b",note:"资源导入进度"},"progress-done":{value:"#10b981"},"progress-todo":{value:"#9ca3af"},"check-fine-bg":{value:"#e8f5e9",note:"文字资源校对程度徽章(精校 / 粗校 / AI整理)"},"check-fine-fg":{value:"#2e7d32"},"check-rough-bg":{value:"#fff3e0"},"check-rough-fg":{value:"#e65100"},"check-ai-bg":{value:"#e3f2fd"},"check-ai-fg":{value:"#1565c0"}}),lt("整理本(CollatedEdition)",{"highlight-bg":{value:"#fff59d",note:"搜索命中高亮底"},"highlight-fg":{value:"inherit",root:!1},"section-lei":{value:"#8e6f3e",note:"章节类型标记:类 / 书 / 序 / 结语 / 考证 / 注释"},"section-shu":{value:"#c0392b"},"section-xu":{value:"#1a5276"},"section-jieyu":{value:"#7d6608"},"section-kaozhen":{value:"#5d6d7e"},"section-zhushi":{value:"#6c5b7b"},"section-tag-fg":{value:"#e74c3c",note:"章节标记(△ 等)"},"matchstate-fg":{value:"#b78900",note:"与底本匹配状态提示"},"quality-published":{value:"#1b5e20",note:"文本质量等级(出版 / 精校 / 粗校 / OCR)"},"quality-fine":{value:"#2e7d32"},"quality-rough":{value:"#1565c0"},"quality-ocr":{value:"#e65100"}}),lt("版本传承(VersionLineageGraph / List) / 关系方向(RelationPanel)",{"lost-fg":{value:"#c62828",note:"佚失标记"},"confidence-certain":{value:"#2e7d32",note:"关系置信度"},"confidence-consensus":{value:"#1976d2"},"confidence-probable":{value:"#ed6c02"},"confidence-disputed":{value:"#c62828"},"lineage-edge-consensus":{value:"#555555",note:"⚠️ 同为 consensus,List 徽章用 --bim-confidence-consensus(蓝),Graph 连线用这个(灰)。若要统一,覆盖成 var(--bim-confidence-consensus)"},"relation-up":{value:"#2196f3"},"relation-down":{value:"#4caf50"},"relation-flat":{value:"#ff9800"}}),lt("编辑器视图(主要在 guji-platform 插件中可见)",{"editor-type-work":{value:"#4caf50",note:"⚠️ 与展示视图的 --bim-type-* 是两套配色(历史如此)。若要统一,覆盖成对应的 var(--bim-type-*)"},"editor-type-collection":{value:"#2196f3"},"editor-type-book":{value:"#ff9800"},"editor-type-entity":{value:"#9c27b0"},"source-url":{value:"#2196f3",note:"来源类型(SourceEditor)"},"source-bookid":{value:"#4caf50"},"mode-active-bg":{value:"#2196f3",note:"模式指示器当前态(ModeIndicator)"},"cover-accent":{value:"#8e6f3e",note:'书目卡片「封面」点缀(IndexBrowser resultVariant="card")'}}),lt("详情页(作品 / 版本 / 丛编):宣纸 + 朱砂一套独立暖色,不继承 --bim-primary 等控件色",{"page-bg":{value:"#fbf9f3",note:"纸"},"row-hover-bg":{value:"#f5f1e5"},"selection-bg":{value:"#ecdcbc",note:"选区"},"band-bg":{value:"#f0e4cb",note:"全文入口横幅(暖沙)"},"band-bg-hover":{value:"#e6d5b4"},ink:{value:"#2a231c",note:"文字层次:墨 → 正文 → 提要 → meta → 标签 → 提示"},"body-fg":{value:"#3b3228"},"quiet-fg":{value:"#5b4f40"},"meta-fg":{value:"#7b6a54"},"label-fg":{value:"#6f6457",note:"标签 / 提示:2026-09 N3a 调深,纸底与斑马底上对比度均 ≥4.5(原 #a3937b 2.8、#b3a385 2.3)"},"hint-fg":{value:"#756a5e"},accent:{value:"#9c3a2c",note:"朱"},"accent-deep":{value:"#6f2a20",note:"链接 hover"},"rule-strong":{value:"#2a231c",note:"分隔线:强 → 常规 → 虚线 → 提要左线"},rule:{value:"#e4dbc9"},"rule-dashed":{value:"#d6c9ae"},"rule-accent-soft":{value:"#e0d3b6"},"aux-fg":{value:"#6f6457",note:"辅助字(元数据、注记、「·」分隔的浅色小字)。须在 page-bg / zebra-bg 上对比度 ≥4.5(Q5 巡检)"},"card-bg":{value:"#fffdf9",note:"提要卡:抬起的面"},"zebra-bg":{value:"#f6f2eb",note:"表格斑马纹 / 左栏分组底(不画格线,靠这一阶底色分行)"},"tint-bg":{value:"#f3eee6",note:"检索框、悬停"},"shadow-summary":{value:"0 10px 32px rgba(60, 50, 40, 0.07)",note:"提要卡投影"},"flag-bg":{value:"rgba(158, 42, 43, 0.08)",note:"唯一的状态色块「有影印」"},"theme-dot-zhusha":{value:"#9c3a2c",note:"主题切换控件的色点:朱砂(不随主题变,两套主题下都要认得出)"},"theme-dot-indigo":{value:"#2e5266",note:"主题切换控件的色点:靛青"},"theme-dot-ink":{value:"#3b4a58",note:"主题切换控件的色点:墨"},"sect-jing":{value:"#2e5266",note:"四部分布条:經部(人物页提要卡;无别处使用)"},"sect-shi":{value:"#9a7a3b",note:"四部分布条:史部"},"sect-zi":{value:"#4f7a5c",note:"四部分布条:子部"},"sect-ji":{value:"#9fb3bc",note:"四部分布条:集部"},"table-border":{value:"color-mix(in srgb, currentColor 28%, transparent)",root:!1,note:"古籍表格(跟随当前文字色)"},"table-head-bg":{value:"color-mix(in srgb, currentColor 8%, transparent)",root:!1}}),lt('版式(v4 外观系统,overview#291):疏朗=留白分区(默认,下列值即疏朗);界栏=框线分区(`<html data-layout="boxed">`)',{"fr-bd":{value:"0 solid transparent",note:"区块外框(border 简写)。疏朗无框;界栏 1px 实线"},"fr-bg":{value:"transparent",note:"区块底。界栏=卡面色"},"fr-hd-pad":{value:"14px 18px",note:"区块标题栏内边距。10-01 起疏朗也有淡染底的标题栏(--bim-fr-hd-bg),故疏朗 14px 18px,界栏 12px 18px"},"fr-hd-bd":{value:"0 solid transparent",note:"区块标题栏下沿线(border 简写)"},"fr-bd-pad":{value:"0",note:"区块正文内边距"},"fr-gap":{value:"56px",note:"区块之间的间距。界栏收紧到 24px(框线本身已分隔)"},"fr-side-gap":{value:"34px",note:"侧栏各块之间的间距;界栏 20px"},"fr-shadow":{value:"0 1px 0 var(--bim-rule), 0 12px 32px -18px rgba(40, 36, 31, 0.25)",note:"抬起的面(提要卡)的投影;界栏不用投影,靠框线"},"fr-tab-bd":{value:"transparent",note:"页签行下沿线颜色(疏朗不画,界栏画)"},"fr-hd-size":{value:"24px",note:"分区标题字号。界栏标题在框顶标题栏里,小一档 19px"},"fr-hd-bg":{value:"color-mix(in srgb, var(--bim-accent) 7%, var(--bim-page-bg))",note:"分区标题栏底色(淡染主色)。疏朗混进页面底,界栏 6% 混进卡面底。主色取 accent(primary 是 VS Code 按钮蓝,不随配色)"},"fr-card-bd":{value:"1px solid transparent",note:"卡片边框。疏朗不画(靠卡面底与淡投影);界栏 1px"},"fr-card-bg":{value:"var(--bim-card-bg)",note:"卡片底"},"fr-row-bd":{value:"1px solid transparent",note:"列表行线、块内小分割线。疏朗不画(靠行距);界栏 1px"},"fr-row-pad":{value:"10px 2px",note:"列表行内边距。界栏收紧 7px 2px"},"fr-chrome-bd":{value:"1px solid transparent",note:"顶栏、分区导航(吸顶锚点条)的线"},"fr-tag-bd":{value:"1px solid transparent",note:"标签、版本签、计数签、工具按钮的边框。疏朗浅底无框;界栏透明底加框"},"fr-tag-bg":{value:"var(--bim-tint-bg)",note:"标签底"},"fr-tbl-cell-bd":{value:"0 solid transparent",note:"表格格线。疏朗不画(靠斑马纹);界栏全格线"},"fr-tbl-zebra":{value:"var(--bim-tint-bg)",note:"表格斑马纹(只在疏朗下有)"},"fr-rail-bd":{value:"1px solid transparent",note:"侧栏里的块、提示块的边框"},"fr-rail-bg":{value:"var(--bim-tint-bg)",note:"侧栏块底。疏朗浅底;界栏卡面底"},"fr-spine-bd":{value:"1px solid transparent",note:"题签、书脊(竖排书名)的边框。界栏是强调色浅线"},"fr-spine-bg":{value:"var(--bim-flag-bg)",note:"题签、书脊底。疏朗浅色实底;界栏卡面底(正史原志两种版式都是强调色实底)"},"fr-plank":{value:"0 solid transparent",note:"书架架板(border 简写)。只在界栏下画 3px"},"fr-axis-bd":{value:"0 solid transparent",note:"时间轴轴线。界栏 1px"},"fr-axis-band":{value:"6px",note:"时间轴底带高度。疏朗用 6px 浅色带代替轴线;界栏 0"},"fr-tick":{value:"0",note:"时间轴刻度短线长度。界栏 5px"},"fr-band-gap":{value:"3px",note:"年代带各段之间的空隙。疏朗 3px;界栏紧贴"},"fr-band-bd":{value:"0 solid transparent",note:"年代带外框与段间分隔。界栏 1px"}}),lt("阅读器(整理本 / 全文)",{"reader-top":{value:"0px",note:"宿主吸顶导航的高度:阅读器工具条、目录与书影侧栏在它下面吸顶(如 60px)"},"reader-warm":{value:"#c9a24a",note:"阅读设置侧栏的暖黄:只做底色(8%)与选中态(24%),与朱/靛/墨三套主色都不冲"},"warp-bg":{value:"#faf8f5",note:"古籍矫正底本书影画布底色"},"warp-box-shadow":{value:"0 2px 12px rgba(0, 0, 0, 0.08)",note:"古籍底本书影浮雕阴影"},"warp-sel-bg":{value:"rgba(196, 148, 76, 0.45)",note:"古籍对读字框选中高亮底色"},"warp-sel-stroke":{value:"#a06e1c",note:"古籍对读字框选中描边"},"warp-hover-bg":{value:"rgba(217, 185, 106, 0.25)",note:"古籍对读字框悬停高亮底色"},"warp-hover-stroke":{value:"#c4944c",note:"古籍对读字框悬停描边"},"warp-badge-bg":{value:"rgba(184, 134, 54, 0.12)",note:"图文对读徽章背景"},"warp-badge-fg":{value:"#8c6820",note:"图文对读徽章文字颜色"},"warp-badge-bd":{value:"rgba(184, 134, 54, 0.3)",note:"图文对读徽章边框"},"warp-banxin-border":{value:"#8a8070",note:"版心分界线"},"warp-banxin-fold":{value:"rgba(160, 110, 28, 0.65)",note:"版心中缝对折线"},"warp-banxin-outer":{value:"#c9c3b4",note:"版心外边线"}}),lt("反馈浮钮(2026-09-28 Q5)",{"feedback-fab-z":{value:"40",note:"层级:低于页面抽屉、弹层(本包对话框为 1000)"},"feedback-fab-offset":{value:"0px",root:!1}}),lt("字体(全站无衬线,2026-09-05 定)",{"font-ui":{value:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif'},"font-body":{value:"system-ui, sans-serif",css:"var(--bim-font-ui)"},"font-serif":{value:es,note:"著录原文(提要、按语)用宋体"},"font-reading":{value:es,css:"var(--bim-font-serif)",note:"阅读器正文(整理本 / 全文);默认接 font-serif,只需覆盖那一个就同时换掉"}})],hp=Object.assign({},...gp.map(e=>e.tokens)),Ia={};for(const[e,n]of Object.entries(hp))Ia[e]=`var(--bim-${e}, ${n.value})`;function i(e){const n=Ia[e];if(n===void 0)throw new Error(`book-index-ui: 未定义的设计变量 --bim-${e}`);return n}function Qt(e){return e.types&&e.types.length>0?e.types:e.type?e.type==="text+image"?["text","image"]:[e.type]:[]}function fp(e,n){return Qt(e).includes(n)}const xp={published:"出版",fine:"精校",rough:"粗校",ocr:"機器識別"};i("quality-published"),i("quality-fine"),i("quality-rough"),i("quality-ocr");const en=h.createContext(null),La=["曹霑"];function bp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yp(e,n=La){const o=[...new Set(n.filter(Boolean))].sort((a,l)=>l.length-a.length);if(!o.length)return e;const r=new RegExp(`(${o.map(bp).join("|")})`,"g"),s=new Set(o);return a=>{if(!a)return e(a);const l=a.split(r);return l.length===1?e(a):l.map((d,c)=>c%2===1&&s.has(d)?d:d&&e(d)).join("")}}let wn=null;function jp(){if(wn)return wn;try{const e=cp.Converter({from:"t",to:"cn"});wn=yp(n=>e(_e.normalizeVariants(n)))}catch{wn=e=>e}return wn}const vp={indexType:{work:"作品",book:"書籍",collection:"叢編",entity:"人物"},resourceType:{text:"文字資源",image:"圖片資源",textImage:"文字+圖片資源",physical:"館藏"},resourceTypeShort:{text:"文字",image:"圖片",textImage:"文字+圖片",physical:"館藏"},rootType:{catalog:"目錄式",search:"搜索式"},status:{draft:"草稿",official:"正式"},checkType:{精校:{label:"精校",bg:i("check-fine-bg"),fg:i("check-fine-fg")},粗校:{label:"粗校",bg:i("check-rough-bg"),fg:i("check-rough-fg")},AI整理:{label:"AI整理",bg:i("check-ai-bg"),fg:i("check-ai-fg")}},action:{save:"保存",delete:"刪除",newEntry:"+ 新建",viewAll:"查看全部 →",visit:"訪問 →",view:"查看 →",viewEntity:"查看",copy:"複製 ID",copied:"已複製",linkExisting:"+ 關聯現有",createAndLink:"+ 創建並關聯",remove:"刪除",clearAll:"清除全部",reselect:"重選",changeType:"更換類型",expand:"展開",collapse:"收起",expandMore:"展開更多",addSubWork:"添加子作品",addVersion:"添加新版本",addBook:"添加書籍",addSubCollection:"添加子叢編",addCollectionImpl:"添加叢編實現",addSource:"添加來源",addResource:"添加資源",addIndexedBy:"+ 添加收錄來源",addEmendatedBy:"+ 添加考證來源",addAdditionalWork:"+ 添加附屬作品",selectBookOrWork:"選擇書籍/作品",clickToSelectBookOrWork:"點擊選擇書籍/作品",unlink:"解除關聯"},label:{id:"ID:",author:"作者 (Author)",dynasty:"朝代/年份 (Dynasty/Year)",edition:"版本",juanCount:"卷數",pageCount:"頁數 (Pages)",volumeCount:"冊數 (Volumes)",holder:"現藏於 (Holder)",firstImage:"首頁圖片 (First Image URL)",year:"年代",currentLocation:"現藏",parentWork:"上級作品",relatedWorks:"相關作品",type:"類型",rootType:"根類型",coverageLevel:"覆蓋層級",coverageRange:"覆蓋範圍",metadata:"元數據",optionalInfo:"可選信息",details:"詳細說明",detailsOptional:"詳細說明 (可選)",positionOptional:"位置/頁碼 (可選)",dataVersionOptional:"數據版本 (可選)",processorVersionOptional:"處理器版本 (可選)",sourceName:"來源名稱",sourceBid:"來源 BID",titleInfo:"題名",authorInfo:"著者",urlAddress:"URL 地址"},section:{basicInfo:"📊 基本信息",description:"📝 介紹 (Description)",additionalWorks:"📑 附屬作品 (Additional Works)",indexedBy:"📖 著錄於",emendatedBy:"📝 考證",resources:"資源",textResources:"📝 文字資源 (Text Resources)",imageResources:"🖼️ 圖片資源 (Image Resources)",sources:"📚 資料來源 (Sources)",provenance:"📜 收藏歷史 (Provenance)",relatedVersions:"相關版本",otherEditions:"📚 其他版本 (Other Editions)",dangerZone:"危險區域 (Danger Zone)",aliases:"別名",attachedTexts:"附載篇目",appendix:"附錄",containedIn:"收入叢編",collectedIn:"收入叢編",belongsToWork:"所屬作品",locationHistory:"流轉歷史",historyOverview:"歷史沿革",containedBooks:"收錄書籍",relations:"關聯關係",summary:"提要",comment:"按語",additionalComment:"附按",indexed:"收錄於",emendated:"考證",relatedWorks:"相關作品",containedWorks:"包含作品",adaptations:"改編作品",derivativeWorks:"續書與評註",studies:"所考典籍"},relation:{belongsToWork:"所屬作品 (Work)",containedInCollection:"收入叢編",siblingVersions:"同作品其他版本",addVersionForWork:"為此作品添加新版本",parentWork:"父作品 (Parent Work)",childWorks:"子作品",collectionImpl:"叢編實現",allVersions:"所有版本",correspondingWork:"對應作品 (Work)",parentCollection:"父叢編 (Parent Collection)",childCollections:"子叢編",containedBooks:"包含書籍",notLinked:"(未關聯)",none:"(暫無)"},search:{placeholder:"搜索作品、書籍、叢編...",searching:"搜索中...",loading:"加載中...",noResults:"無匹配結果",noResultsFor:"未找到與「{query}」相關的結果",tryOther:"試試其他關鍵詞、別名或作者名",recentBrowse:"最近瀏覽",history:"搜索歷史",clearAll:"清除全部",clearRecent:"清除最近瀏覽",itemNotFound:"無法找到,可能已刪除",removeFromRecent:"移除",searchTitle:"搜索古籍索引",allTab:"全部",resultTabs:"結果分類",searchSubtitle:"輸入關鍵詞搜索作品、書籍或叢編",searchBookName:"搜索書名...",alias:"別名"},searchV4:{filterTitle:"篩選",dynasty:"朝代",classification:"部類",resources:"資源",extant:"存佚",clearAllFilters:"清除全部篩選",hasImage:"有影印",hasText:"有文本",hasCollated:"有文本",filterButton:"篩選",filterSelected:"{n} 項已選",expand:"展開",collapse:"收起",filteredCount:"篩出 {n} 條",removeFilter:"取消篩選:{name}",viewLabel:"結果視圖",viewTable:"表格",viewCard:"卡片",colTitle:"題名",colType:"類型",colAuthor:"責任者",colEra:"年代",colClass:"部類",colResource:"資源",tagImage:"影印",tagText:"文本",tagCollated:"文本",tagLost:"佚",pageInfo:"共 {total} 條 · 每頁 {size} 條 · 第 {page} / {pages} 頁",pagerLabel:"翻頁",prevPage:"上一頁",nextPage:"下一頁",emptyFiltered:"沒有找到匹配的條目。試試更短的書名、減少篩選,或切換繁 / 簡。",limitedNote:"各類只列前幾條,點上方分類頁籤看全部。",sortLabel:"排序",sortRelevance:"相關度",sortEra:"年代",sortTitle:"書名",sortEraAsc:"由早到晚",sortEraDesc:"由晚到早",sortTitleAsc:"拼音 A→Z",sortTitleDesc:"拼音 Z→A"},home:{title:"古籍索引",subtitle:"從左側搜索框輸入關鍵詞,查找作品、書籍或叢編",recommendedBrowse:"推薦瀏覽",catalogTab:"目錄",collectionTab:"叢編",siteTab:"在線資源",recommendTab:"推薦",feedbackTab:"反饋",statusInProgress:"進行中",statusDone:"已完成",statusTodo:"未開始",typeCatalog:"目錄",typeCollection:"資源集合",totalPending:"待統計",progressFormat:"{imported} / {total}",siteCoverage:"資源覆蓋"},browser:{title:"古籍資源索引",subtitle:""},detailTab:{basicInfo:"概覽",catalog:"目錄",collectionCatalog:"叢編目錄",collatedEdition:"文本",catalogSuffix:"·目錄",fullText:"文本",lineage:"版本傳承",feedback:"勘誤反饋",dataSource:"數據源",backToIndex:"典籍版本索引",submitVersion:"提交新版本",dataLicense:"數據源與授權"},metadata:{edition:"版本",version:"修訂版本",quality:"資源質量",check_type:"校對",image_source:"影像來源",team:"所屬團隊",publisher:"出版社",year:"出版年份",format:"格式",note:"備註",total_page:"頁數",total_pages:"總頁數",page_range:"頁碼範圍",page_count:"頁數",file_page_range:"文件頁碼",file_page_count:"文件頁數",content_page_range:"影印頁碼",volume:"冊",color_mode:"色彩",paragraph_count:"段落數",has_translation:"翻譯"},editor:{untitled:"未命名",workTitle:"作品名 (Work Title)",collectionTitle:"叢書名 (Collection Title)",bookTitle:"書名 (Book Title)",belongsToWork:"所屬作品 (Work)",authorLabel:"作者 (Author)",publicationYearLabel:"出版年 (Publication year)",containedIn:"收入叢編",holderLabel:"現藏於 (Holder)",pageLabel:"頁數 (Pages)",volumeLabel:"冊數 (Volumes)",firstImageLabel:"首頁圖片 (First Image URL)",descriptionPlaceholder:"簡要介紹...",provenancePlaceholder:"該資源的流轉與收藏記錄...",otherEditionsPlaceholder:"相關版本的 ID...",dangerZoneDesc:"從索引庫中永久刪除該實體的所有元數據文件。",deleteEntity:"刪除該實體 (Delete Entity)",selectToLink:"選擇要關聯的",unnamedSource:"(未命名來源)",selectSourceType:"選擇來源類型",fromExistingBook:"從現有書籍選擇",enterUrl:"輸入網址鏈接",sourceNamePlaceholder:"如: 維基文庫、中國基本古籍庫",deleteThisSource:"刪除此來源",deleteThisResource:"刪除此資源",resourcePlaceholder:"資源",idAutoExtract:"ID (自動從URL提取)",resourceName:"資源名稱",resourceUrl:"資源鏈接 (URL)",structurePlaceholder:"層級結構 (如: 冊、卷)",coverageRangePlaceholder:"如: 2,3,5-8",detailsPlaceholder:"詳細說明",summaryPlaceholder:"提要...",commentPlaceholder:"按語...",additionalCommentPlaceholder:"附按...",imageResourceLink:"圖片資源鏈接",bookNameLabel:"書名",sourcePlaceholder:"來源"},download:{completed:"下載完成",downloading:"下載中",downloadThis:"下載此資源"},mode:{localMode:"本地模式",syncMode:"同步模式:",githubSync:"GitHub 同步",switchToSync:"點擊切換到同步模式",switchToLocal:"點擊切換到本地模式",switchToGithub:"點擊切換到 GitHub 同步模式",switchToDraft:"點擊切換到 draft 倉庫",switchToOfficial:"點擊切換到 official 倉庫",selectFolder:"選擇本地文件夾",configurePath:"配置同步路徑"},catalog:{totalVolumes:"共",processed:"已處理",contains:"收錄",matched:"已匹配",unmatched:"待匹配",source:"來源:",all:"全部",loading:"加載叢編目錄...",notFound:"未找到叢編目錄數據",loadFailed:"加載失敗",noMatch:"無匹配結果",unmatched_label:"未匹配",volume:"第 {n} 冊"},unit:{juan:"卷",volume:"冊",bu:"部",items:"條"},workSubtype:{book:"書",article:"篇",poem:"詩",chapter:"篇章"},colorMode:{bw:"黑白",color:"彩色"},misc:{noResources:"暫無資源信息",hasTranslation:"有",noTranslation:"無",structure:"層級",coverage:"覆蓋",notFoundEntry:"未找到該條目",loadFailed:"加載失敗",textResource:"文字資源",imageResource:"圖片資源"}},kp={indexType:{work:"作品",book:"书籍",collection:"丛编",entity:"人物"},resourceType:{text:"文字资源",image:"图片资源",textImage:"文字+图片资源",physical:"馆藏"},resourceTypeShort:{text:"文字",image:"图片",textImage:"文字+图片",physical:"馆藏"},rootType:{catalog:"目录式",search:"搜索式"},status:{draft:"草稿",official:"正式"},checkType:{精校:{label:"精校",bg:i("check-fine-bg"),fg:i("check-fine-fg")},粗校:{label:"粗校",bg:i("check-rough-bg"),fg:i("check-rough-fg")},AI整理:{label:"AI整理",bg:i("check-ai-bg"),fg:i("check-ai-fg")}},action:{save:"保存",delete:"删除",newEntry:"+ 新建",viewAll:"查看全部 →",visit:"访问 →",view:"查看 →",viewEntity:"查看",copy:"复制 ID",copied:"已复制",linkExisting:"+ 关联现有",createAndLink:"+ 创建并关联",remove:"删除",clearAll:"清除全部",reselect:"重选",changeType:"更换类型",expand:"展开",collapse:"收起",expandMore:"展开更多",addSubWork:"添加子作品",addVersion:"添加新版本",addBook:"添加书籍",addSubCollection:"添加子丛编",addCollectionImpl:"添加丛编实现",addSource:"添加来源",addResource:"添加资源",addIndexedBy:"+ 添加收录来源",addEmendatedBy:"+ 添加考证来源",addAdditionalWork:"+ 添加附属作品",selectBookOrWork:"选择书籍/作品",clickToSelectBookOrWork:"点击选择书籍/作品",unlink:"解除关联"},label:{id:"ID:",author:"作者 (Author)",dynasty:"朝代/年份 (Dynasty/Year)",edition:"版本",juanCount:"卷数",pageCount:"页数 (Pages)",volumeCount:"册数 (Volumes)",holder:"现藏于 (Holder)",firstImage:"首页图片 (First Image URL)",year:"年代",currentLocation:"现藏",parentWork:"上级作品",relatedWorks:"相关作品",type:"类型",rootType:"根类型",coverageLevel:"覆盖层级",coverageRange:"覆盖范围",metadata:"元数据",optionalInfo:"可选信息",details:"详细说明",detailsOptional:"详细说明 (可选)",positionOptional:"位置/页码 (可选)",dataVersionOptional:"数据版本 (可选)",processorVersionOptional:"处理器版本 (可选)",sourceName:"来源名称",sourceBid:"来源 BID",titleInfo:"题名",authorInfo:"著者",urlAddress:"URL 地址"},section:{basicInfo:"📊 基本信息",description:"📝 介绍 (Description)",additionalWorks:"📑 附属作品 (Additional Works)",indexedBy:"📖 著录于",emendatedBy:"📝 考证",resources:"资源",textResources:"📝 文字资源 (Text Resources)",imageResources:"🖼️ 图片资源 (Image Resources)",sources:"📚 资料来源 (Sources)",provenance:"📜 收藏历史 (Provenance)",relatedVersions:"相关版本",otherEditions:"📚 其他版本 (Other Editions)",dangerZone:"危险区域 (Danger Zone)",aliases:"别名",attachedTexts:"附载篇目",appendix:"附录",containedIn:"收入丛编",collectedIn:"收入丛编",belongsToWork:"所属作品",locationHistory:"流转历史",historyOverview:"历史沿革",containedBooks:"收录书籍",relations:"关联关系",summary:"提要",comment:"按语",additionalComment:"附按",indexed:"收录于",emendated:"考证",relatedWorks:"相关作品",containedWorks:"包含作品",adaptations:"改编作品",derivativeWorks:"续书与评注",studies:"所考典籍"},relation:{belongsToWork:"所属作品 (Work)",containedInCollection:"收入丛编",siblingVersions:"同作品其他版本",addVersionForWork:"为此作品添加新版本",parentWork:"父作品 (Parent Work)",childWorks:"子作品",collectionImpl:"丛编实现",allVersions:"所有版本",correspondingWork:"对应作品 (Work)",parentCollection:"父丛编 (Parent Collection)",childCollections:"子丛编",containedBooks:"包含书籍",notLinked:"(未关联)",none:"(暂无)"},search:{placeholder:"搜索作品、书籍、丛编...",searching:"搜索中...",loading:"加载中...",noResults:"无匹配结果",noResultsFor:"未找到与「{query}」相关的结果",tryOther:"试试其他关键词、别名或作者名",recentBrowse:"最近浏览",history:"搜索历史",clearAll:"清除全部",clearRecent:"清除最近浏览",itemNotFound:"无法找到,可能已删除",removeFromRecent:"移除",searchTitle:"搜索古籍索引",allTab:"全部",resultTabs:"结果分类",searchSubtitle:"输入关键词搜索作品、书籍或丛编",searchBookName:"搜索书名...",alias:"别名"},searchV4:{filterTitle:"筛选",dynasty:"朝代",classification:"部类",resources:"资源",extant:"存佚",clearAllFilters:"清除全部筛选",hasImage:"有影印",hasText:"有文本",hasCollated:"有文本",filterButton:"筛选",filterSelected:"{n} 项已选",expand:"展开",collapse:"收起",filteredCount:"筛出 {n} 条",removeFilter:"取消筛选:{name}",viewLabel:"结果视图",viewTable:"表格",viewCard:"卡片",colTitle:"题名",colType:"类型",colAuthor:"责任者",colEra:"年代",colClass:"部类",colResource:"资源",tagImage:"影印",tagText:"文本",tagCollated:"文本",tagLost:"佚",pageInfo:"共 {total} 条 · 每页 {size} 条 · 第 {page} / {pages} 页",pagerLabel:"翻页",prevPage:"上一页",nextPage:"下一页",emptyFiltered:"没有找到匹配的条目。试试更短的书名、减少筛选,或切换繁 / 简。",limitedNote:"各类只列前几条,点上方分类页签看全部。",sortLabel:"排序",sortRelevance:"相关度",sortEra:"年代",sortTitle:"书名",sortEraAsc:"由早到晚",sortEraDesc:"由晚到早",sortTitleAsc:"拼音 A→Z",sortTitleDesc:"拼音 Z→A"},home:{title:"古籍索引",subtitle:"从左侧搜索框输入关键词,查找作品、书籍或丛编",recommendedBrowse:"推荐浏览",catalogTab:"目录",collectionTab:"丛编",siteTab:"在线资源",recommendTab:"推荐",feedbackTab:"反馈",statusInProgress:"进行中",statusDone:"已完成",statusTodo:"未开始",typeCatalog:"目录",typeCollection:"资源集合",totalPending:"待统计",progressFormat:"{imported} / {total}",siteCoverage:"资源覆盖"},browser:{title:"古籍资源索引",subtitle:""},detailTab:{basicInfo:"概览",catalog:"目录",collectionCatalog:"丛编目录",collatedEdition:"文本",catalogSuffix:"·目录",fullText:"文本",lineage:"版本传承",feedback:"勘误反馈",dataSource:"数据源",backToIndex:"典籍版本索引",submitVersion:"提交新版本",dataLicense:"数据源与授权"},metadata:{edition:"版本",version:"修订版本",quality:"资源质量",check_type:"校对",image_source:"影像来源",team:"所属团队",publisher:"出版社",year:"出版年份",format:"格式",note:"备注",total_page:"页数",total_pages:"总页数",page_range:"页码范围",page_count:"页数",file_page_range:"文件页码",file_page_count:"文件页数",content_page_range:"影印页码",volume:"册",color_mode:"色彩",paragraph_count:"段落数",has_translation:"翻译"},editor:{untitled:"未命名",workTitle:"作品名 (Work Title)",collectionTitle:"丛书名 (Collection Title)",bookTitle:"书名 (Book Title)",belongsToWork:"所属作品 (Work)",authorLabel:"作者 (Author)",publicationYearLabel:"出版年 (Publication year)",containedIn:"收入丛编",holderLabel:"现藏于 (Holder)",pageLabel:"页数 (Pages)",volumeLabel:"册数 (Volumes)",firstImageLabel:"首页图片 (First Image URL)",descriptionPlaceholder:"简要介绍...",provenancePlaceholder:"该资源的流转与收藏记录...",otherEditionsPlaceholder:"相关版本的 ID...",dangerZoneDesc:"从索引库中永久删除该实体的所有元数据文件。",deleteEntity:"删除该实体 (Delete Entity)",selectToLink:"选择要关联的",unnamedSource:"(未命名来源)",selectSourceType:"选择来源类型",fromExistingBook:"从现有书籍选择",enterUrl:"输入网址链接",sourceNamePlaceholder:"如: 维基文库、中国基本古籍库",deleteThisSource:"删除此来源",deleteThisResource:"删除此资源",resourcePlaceholder:"资源",idAutoExtract:"ID (自动从URL提取)",resourceName:"资源名称",resourceUrl:"资源链接 (URL)",structurePlaceholder:"层级结构 (如: 册、卷)",coverageRangePlaceholder:"如: 2,3,5-8",detailsPlaceholder:"详细说明",summaryPlaceholder:"提要...",commentPlaceholder:"按语...",additionalCommentPlaceholder:"附按...",imageResourceLink:"图片资源链接",bookNameLabel:"书名",sourcePlaceholder:"来源"},download:{completed:"下载完成",downloading:"下载中",downloadThis:"下载此资源"},mode:{localMode:"本地模式",syncMode:"同步模式:",githubSync:"GitHub 同步",switchToSync:"点击切换到同步模式",switchToLocal:"点击切换到本地模式",switchToGithub:"点击切换到 GitHub 同步模式",switchToDraft:"点击切换到 draft 仓库",switchToOfficial:"点击切换到 official 仓库",selectFolder:"选择本地文件夹",configurePath:"配置同步路径"},catalog:{totalVolumes:"共",processed:"已处理",contains:"收录",matched:"已匹配",unmatched:"待匹配",source:"来源:",all:"全部",loading:"加载丛编目录...",notFound:"未找到丛编目录数据",loadFailed:"加载失败",noMatch:"无匹配结果",unmatched_label:"未匹配",volume:"第 {n} 册"},unit:{juan:"卷",volume:"册",bu:"部",items:"条"},workSubtype:{book:"书",article:"篇",poem:"诗",chapter:"篇章"},colorMode:{bw:"黑白",color:"彩色"},misc:{noResources:"暂无资源信息",hasTranslation:"有",noTranslation:"无",structure:"层级",coverage:"覆盖",notFoundEntry:"未找到该条目",loadFailed:"加载失败",textResource:"文字资源",imageResource:"图片资源"}};function dt(e,n,o){return{"zh-Hant":e,"zh-Hans":n}}const wp=dt({toHans:"切换为简体",toHant:"切換為繁體",localeShortHans:"简",localeShortHant:"繁",themeLabel:"主題",theme:{zhusha:"朱砂",indigo:"靛青",ink:"墨"},loading:"加載中",repoSourceLink:"在 GitHub 查看本條目源文件",volumesMissing:"缺{n}",collapseVolumes:"收起分冊",expandVolumes:"展開分冊",collapseArrow:"收起 ▲",expandArrow:"展開 ▼",entitySubtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年號",office:"官職",anonymous:"佚名",collective:"集體"},cbdbTitle:"CBDB 中國歷代人物傳記數據庫",entityPlaceholderNote:"人物信息暫缺。該 Entity 僅作為作者佔位,詳細生平資料尚待補充。",otherVersions:"其他版本",switchToEdit:"切換到編輯模式",switchToView:"切換到查看模式",modeEdit:"✏️ 編輯",modeView:"👁 查看",noData:"無數據"},{toHans:"切换为简体",toHant:"切換為繁體",localeShortHans:"简",localeShortHant:"繁",themeLabel:"主题",theme:{zhusha:"朱砂",indigo:"靛青",ink:"墨"},loading:"加载中",repoSourceLink:"在 GitHub 查看本条目源文件",volumesMissing:"缺{n}",collapseVolumes:"收起分册",expandVolumes:"展开分册",collapseArrow:"收起 ▲",expandArrow:"展开 ▼",entitySubtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年号",office:"官职",anonymous:"佚名",collective:"集体"},cbdbTitle:"CBDB 中国历代人物传记数据库",entityPlaceholderNote:"人物信息暂缺。该 Entity 仅作为作者占位,详细生平资料尚待补充。",otherVersions:"其他版本",switchToEdit:"切换到编辑模式",switchToView:"切换到查看模式",modeEdit:"✏️ 编辑",modeView:"👁 查看",noData:"无数据"}),fi=dt({relation:{part_of:"所屬",has_part:"包含",contains_text_of:"收錄",collected_in:"叢編",text_carried_by:"載錄",studied_by:"研究",studies:"所考",preceded_by:"前承",followed_by:"後繼",derived_from:"衍生",has_adaptation:"改編",related:"相關"},lossStatus:{extant:"今存",fragment:"殘存",partial:"殘存",lost:"已佚",unknown:"未詳"},resourceKind:{text:"文本",image:"影印",textImage:"圖文",physical:"館藏"},otherImages:"其他影印",fragmentTag:"殘片",collapseVolumes:"收起分冊",expandVolumes:"展開 {n} 冊",mirror:"鏡像",volumeStats:"{found} / {expected} 冊",volumeStatsMissing:"{found} / {expected} 冊 缺 {missing}",pageNav:"本頁導航",thisPage:"本頁",more:"更多",expandRest:"展開其餘 {n} {unit}",read:"閱讀",showMore:"顯示更多({n})",review:{reviewed:"已審核",disputed:"有爭議",unreviewed:"未審核",draft:"草稿"},dataVersion:"數據版本",todoCount:"待核 {n} 項",lacuna:"闕文",lacunaWith:"闕文:{label}",composedChar:"組字:{label}",bce:"前{n}",roleAll:"全部",loading:"加載中…",noLineageGraph:"暫無版本圖數據",notFound:"找不到該條目,可能已被刪除或 ID 不正確",workInfo:"作品信息"},{relation:{part_of:"所属",has_part:"包含",contains_text_of:"收录",collected_in:"丛编",text_carried_by:"载录",studied_by:"研究",studies:"所考",preceded_by:"前承",followed_by:"后继",derived_from:"衍生",has_adaptation:"改编",related:"相关"},lossStatus:{extant:"今存",fragment:"残存",partial:"残存",lost:"已佚",unknown:"未详"},resourceKind:{text:"文本",image:"影印",textImage:"图文",physical:"馆藏"},otherImages:"其他影印",fragmentTag:"残片",collapseVolumes:"收起分册",expandVolumes:"展开 {n} 册",mirror:"镜像",volumeStats:"{found} / {expected} 册",volumeStatsMissing:"{found} / {expected} 册 缺 {missing}",pageNav:"本页导航",thisPage:"本页",more:"更多",expandRest:"展开其余 {n} {unit}",read:"阅读",showMore:"显示更多({n})",review:{reviewed:"已审核",disputed:"有争议",unreviewed:"未审核",draft:"草稿"},dataVersion:"数据版本",todoCount:"待核 {n} 项",lacuna:"阙文",lacunaWith:"阙文:{label}",composedChar:"组字:{label}",bce:"前{n}",roleAll:"全部",loading:"加载中…",noLineageGraph:"暂无版本图数据",notFound:"找不到该条目,可能已被删除或 ID 不正确",workInfo:"作品信息"}),Sp=dt({kind:"版本",fact:{editionType:"版本類型",publication:"刊印",era:"刊寫年代",measure:"卷帙",volumes:"冊次",baseEdition:"底本",holdings:"存藏",callNumber:"索書號",seals:"藏印",leafStyle:"行款",binding:"裝幀",dimensions:"尺寸",condition:"品相",aliases:"又名"},inferredFromEdition:"據版本題名推斷",volumesValue:"第 {range} {unit}({n} {unit})",andMorePlaces:" 等 {n} 處",viewImages:"看原書影印",sec:{fulltext:"文本",images:"影印",physical:"館藏",lineage:"版本源流",empty:"影印與文本"},chapterUnit:"章",chapterCount:"{n} {unit}",sourceBy:"據{src}",readFrom:"從{ch}讀起",firstChapter:"第一章",enterReader:"進入閱讀頁",externalText:"站外文本",groupCount:"{n} 組",placeCount:"{n} 處",lineageMeta:"據版本傳承著錄",lineageView:"源流視圖",viewCards:"卡片",viewGraph:"關係圖",totalOf:"全 {n} {unit}",emptyText:"尚未著錄該版本的影印、文本與收藏信息。",editionCount:"{n} 種版本",siblings:"同作品版本",byEra:"按年代",kindCount:"{n} 種",viewAllInWork:"在作品頁看全部 {n} 種 →",volumeRange:"第 {range} {unit}",volumeCount:"{n} {unit}",confidence:{certain:"確證",consensus:"通說",probable:"可能",disputed:"有爭議"},confidenceNote:"({c})",lineage:{ancestor:"祖本",reconstructed:"擬構祖本",thisEdition:"本版",derivatives:"翻刻 · 衍生",appendix:"附記"}},{kind:"版本",fact:{editionType:"版本类型",publication:"刊印",era:"刊写年代",measure:"卷帙",volumes:"册次",baseEdition:"底本",holdings:"存藏",callNumber:"索书号",seals:"藏印",leafStyle:"行款",binding:"装帧",dimensions:"尺寸",condition:"品相",aliases:"又名"},inferredFromEdition:"据版本题名推断",volumesValue:"第 {range} {unit}({n} {unit})",andMorePlaces:" 等 {n} 处",viewImages:"看原书影印",sec:{fulltext:"文本",images:"影印",physical:"馆藏",lineage:"版本源流",empty:"影印与文本"},chapterUnit:"章",chapterCount:"{n} {unit}",sourceBy:"据{src}",readFrom:"从{ch}读起",firstChapter:"第一章",enterReader:"进入阅读页",externalText:"站外文本",groupCount:"{n} 组",placeCount:"{n} 处",lineageMeta:"据版本传承著录",lineageView:"源流视图",viewCards:"卡片",viewGraph:"关系图",totalOf:"全 {n} {unit}",emptyText:"尚未著录该版本的影印、文本与收藏信息。",editionCount:"{n} 种版本",siblings:"同作品版本",byEra:"按年代",kindCount:"{n} 种",viewAllInWork:"在作品页看全部 {n} 种 →",volumeRange:"第 {range} {unit}",volumeCount:"{n} {unit}",confidence:{certain:"确证",consensus:"通说",probable:"可能",disputed:"有争议"},confidenceNote:"({c})",lineage:{ancestor:"祖本",reconstructed:"拟构祖本",thisEdition:"本版",derivatives:"翻刻 · 衍生",appendix:"附记"}}),_p=dt({fact:{written:"成書",measure:"卷帙",loss:"存佚",earliest:"最早存世",emendation:"考證",alias:"又名",attached:"附載",appendix:"附錄"},inferredFromEdition:"據版本題名推斷",loading:"載入中",emendationCount:"{n} 條",stat:{editions:"版本",hasImage:"有影印",catalogs:"家著錄"},classifiedBy:"據《{source}》",sec:{versions:"版本",catalogs:"著錄",collected:"收入叢編",related:"相關書目",resources:"在線資源"},versionsTotal:"共 {n} 種",versionsWithImage:"{n} 種有影印",versionsCurrent:"當前 {n} 種",scanOnly:"只看有影印",sortByYear:"按年代排列",sortByCatalog:"按著錄順序",col:{edition:"版本",era:"年代",holder:"館藏",image:"影印"},noVersionsFiltered:"當前篩選下沒有版本",noVersions:"暫無版本著錄",moreUnit:"種版本",inferredEraNote:"部分年代據版本題名推斷,非著錄原文",empty:"尚未著錄該作品的版本與書目收錄。",relatedCount:"{n} 部",hasImage:"有影印",catalog:{meta:"歷代書目 {n} 家",tablist:"著錄書目",titleOnly:"僅著錄書名,無提要。",prev:"上一家:{name}",next:"下一家:{name}"}},{fact:{written:"成书",measure:"卷帙",loss:"存佚",earliest:"最早存世",emendation:"考证",alias:"又名",attached:"附载",appendix:"附录"},inferredFromEdition:"据版本题名推断",loading:"载入中",emendationCount:"{n} 条",stat:{editions:"版本",hasImage:"有影印",catalogs:"家著录"},classifiedBy:"据《{source}》",sec:{versions:"版本",catalogs:"著录",collected:"收入丛编",related:"相关书目",resources:"在线资源"},versionsTotal:"共 {n} 种",versionsWithImage:"{n} 种有影印",versionsCurrent:"当前 {n} 种",scanOnly:"只看有影印",sortByYear:"按年代排列",sortByCatalog:"按著录顺序",col:{edition:"版本",era:"年代",holder:"馆藏",image:"影印"},noVersionsFiltered:"当前筛选下没有版本",noVersions:"暂无版本著录",moreUnit:"种版本",inferredEraNote:"部分年代据版本题名推断,非著录原文",empty:"尚未著录该作品的版本与书目收录。",relatedCount:"{n} 部",hasImage:"有影印",catalog:{meta:"历代书目 {n} 家",tablist:"著录书目",titleOnly:"仅著录书名,无提要。",prev:"上一家:{name}",next:"下一家:{name}"}}),$p=dt({kind:"叢編",workCollection:"作品集",stat:{titles:"子目"},fact:{publication:"刊印",expected:"應收",measure:"卷帙"},member:{Book:"所收版本",Work:"所收作品",other:"成員"},memberNote:"子目與其各版本合計",nZhong:"{n} 種",nHan:"{n} 函",dist:{head:"全帙冊次分佈",segTitle:"{section} 第 {from}–{to} 冊",only:"只看{section}",unclassified:"未分類",hint:"點色段篩選部類"},sec:{titles:"子目",resources:"影印與文本"},totalVolumes:"全帙 {n} {unit}",currentN:"當前 {n} {unit}",loadAllTitle:"將載入全部 {n} {unit}",grouping:"正在按部類分組…",groupBySection:"按部類分組",find:"在本叢編中檢索",col:{volumes:"冊次",title:"書名",versions:"版本"},volumeRange:"第 {range} {unit}",resourcesCount:"{n} 處",text:"文本",empty:"尚未著錄該叢編的子目。",parent:"上級叢編"},{kind:"丛编",workCollection:"作品集",stat:{titles:"子目"},fact:{publication:"刊印",expected:"应收",measure:"卷帙"},member:{Book:"所收版本",Work:"所收作品",other:"成员"},memberNote:"子目与其各版本合计",nZhong:"{n} 种",nHan:"{n} 函",dist:{head:"全帙册次分布",segTitle:"{section} 第 {from}–{to} 册",only:"只看{section}",unclassified:"未分类",hint:"点色段筛选部类"},sec:{titles:"子目",resources:"影印与文本"},totalVolumes:"全帙 {n} {unit}",currentN:"当前 {n} {unit}",loadAllTitle:"将载入全部 {n} {unit}",grouping:"正在按部类分组…",groupBySection:"按部类分组",find:"在本丛编中检索",col:{volumes:"册次",title:"书名",versions:"版本"},volumeRange:"第 {range} {unit}",resourcesCount:"{n} 处",text:"文本",empty:"尚未著录该丛编的子目。",parent:"上级丛编"}),Cp=dt({subtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年號",office:"官職",anonymous:"佚名",collective:"群體"},bce:"前{n}",floruit:"活躍於 {from}—{to}",zi:"字{name}",hao:"號{name}",nativePlace:"{place}人",lifeAria:"{birth}—{death},一生 {years} 年",lifeYears:"一生 {years} 年",fact:{works:"著作"},nZhong:"{n} 種",moreNames:"更多別名({n})",dist:"著作分佈",autoMatch:"自動匹配",sec:{featured:"著作舉要",allWorks:"全部著作",works:"著作",external:"站外資料"},featuredSub:"存世版本最多的三部",versionsUnit:"種版本",hasImage:"有影印",empty:"尚未著錄該人物的關聯作品。",total:"共 {n} 種",current:"當前 {n} 種",sortByVersions:"按版本數排列",sortByCatalog:"按著錄順序",col:{work:"作品",section:"部類",role:"職任",versions:"存世版本",image:"影印"},notRecorded:"未著錄",emptyRole:"該職任下的著作尚未著錄。",moreUnit:"種著作",cbdbAuto:"CBDB 為自動匹配,未經人工核對"},{subtype:{people:"人物",place:"地名",dynasty:"朝代",reign:"年号",office:"官职",anonymous:"佚名",collective:"群体"},bce:"前{n}",floruit:"活跃于 {from}—{to}",zi:"字{name}",hao:"号{name}",nativePlace:"{place}人",lifeAria:"{birth}—{death},一生 {years} 年",lifeYears:"一生 {years} 年",fact:{works:"著作"},nZhong:"{n} 种",moreNames:"更多别名({n})",dist:"著作分布",autoMatch:"自动匹配",sec:{featured:"著作举要",allWorks:"全部著作",works:"著作",external:"站外资料"},featuredSub:"存世版本最多的三部",versionsUnit:"种版本",hasImage:"有影印",empty:"尚未著录该人物的关联作品。",total:"共 {n} 种",current:"当前 {n} 种",sortByVersions:"按版本数排列",sortByCatalog:"按著录顺序",col:{work:"作品",section:"部类",role:"职任",versions:"存世版本",image:"影印"},notRecorded:"未著录",emptyRole:"该职任下的著作尚未著录。",moreUnit:"种著作",cbdbAuto:"CBDB 为自动匹配,未经人工核对"}),zp=dt({imagesLoading:"加載書影…",noImages:"暫無書影",noImagesHint:"這一卷還沒有配上影像;接入後在此與正文逐頁對看",imageAlt:"書影 第 {label} 頁",prevImage:"上一頁書影",nextImage:"下一頁書影",back:"閱讀",backAria:"返回{label}首頁",skipToText:"跳到正文",settings:"閱讀設置",settingsShort:"設置",closeSettings:"收起設置",groupText:"文字",groupMark:"標註",groupLayout:"版面",font:"字體",fontSong:"宋體",fontKai:"楷體",fontSystem:"系統默認",script:"繁簡",version:"版本",versionShort:"版本▾",unitJuan:"卷",pagerGroup:"翻{unit}",prevUnit:"上一{unit}",nextUnit:"下一{unit}",prevUnitTitle:"上一{unit}:{label}",nextUnitTitle:"下一{unit}:{label}",firstUnit:"已是第一{unit}",lastUnit:"已是最後一{unit}",toc:"目錄",images:"書影",fontSmaller:"縮小字號",fontLarger:"放大字號",paragraphTitle:"條目分行 ↔ 自然段",paragraph:"自然段",workLinks:"標出作品鏈接",properNameTitle:"書名加波浪線",properName:"專名線",vertical:"豎排",closeToc:"收起目錄",sourceLabel:"出處",licenseOf:"授權 {license}",revisedAt:"最近校訂 {date}",reportError:"報告錯字",pagerNav:"翻卷",rail:"本卷",bottomBar:"閱讀工具",tocShort:"卷目",fontSize:"字號",close:"關閉",loading:"加載中…",noText:"暫無文本",tocFailed:"無法加載目錄",tocLoading:"加載目錄…",viewEntry:"查看條目",defaultRole:"撰",tocCaption:"目錄 · {n} {unit}",searchChapters:"搜索全部章節",searchChaptersPlaceholder:"搜索全部章節…",searchUnit:"搜索全部{unit}",searchUnitPlaceholder:"搜索全部{unit}…",textSource:"來源",upstream:"上游",chapterFailed:"無法加載章節內容",references:"參考文獻"},{imagesLoading:"加载书影…",noImages:"暂无书影",noImagesHint:"这一卷还没有配上影像;接入后在此与正文逐页对看",imageAlt:"书影 第 {label} 页",prevImage:"上一页书影",nextImage:"下一页书影",back:"阅读",backAria:"返回{label}首页",skipToText:"跳到正文",settings:"阅读设置",settingsShort:"设置",closeSettings:"收起设置",groupText:"文字",groupMark:"标注",groupLayout:"版面",font:"字体",fontSong:"宋体",fontKai:"楷体",fontSystem:"系统默认",script:"繁简",version:"版本",versionShort:"版本▾",unitJuan:"卷",pagerGroup:"翻{unit}",prevUnit:"上一{unit}",nextUnit:"下一{unit}",prevUnitTitle:"上一{unit}:{label}",nextUnitTitle:"下一{unit}:{label}",firstUnit:"已是第一{unit}",lastUnit:"已是最后一{unit}",toc:"目录",images:"书影",fontSmaller:"缩小字号",fontLarger:"放大字号",paragraphTitle:"条目分行 ↔ 自然段",paragraph:"自然段",workLinks:"标出作品链接",properNameTitle:"书名加波浪线",properName:"专名线",vertical:"竖排",closeToc:"收起目录",sourceLabel:"出处",licenseOf:"授权 {license}",revisedAt:"最近校订 {date}",reportError:"报告错字",pagerNav:"翻卷",rail:"本卷",bottomBar:"阅读工具",tocShort:"卷目",fontSize:"字号",close:"关闭",loading:"加载中…",noText:"暂无文本",tocFailed:"无法加载目录",tocLoading:"加载目录…",viewEntry:"查看条目",defaultRole:"撰",tocCaption:"目录 · {n} {unit}",searchChapters:"搜索全部章节",searchChaptersPlaceholder:"搜索全部章节…",searchUnit:"搜索全部{unit}",searchUnitPlaceholder:"搜索全部{unit}…",textSource:"来源",upstream:"上游",chapterFailed:"无法加载章节内容",references:"参考文献"}),Tp=dt({nJuan:"{n}卷",viewWork:"查看作品",viewWorkOf:"查看作品:{title}",workArrow:"作品 →",arrowWork:"→作品",nWorks:"{n}部作品",unlinked:"未關聯",summary:"提要",comment:"按語",additionalComment:"附按",noMatch:"無匹配結果",sectionType:{类:"類",书:"書",序:"序",结语:"結語",注释:"註釋",考证:"考證",诗:"詩"},countTiao:"{n} 條",countTiaoOf:"{m} / {n} 條",countPoems:"{n} 首",countPoemsOf:"{m} / {n} 首",countBooks:"{n} 部書",countBooksOf:"{m} / {n} 部書",kaozhenTarget:"考證對象 {target}",baseText:"底本 {note}",textQuality:"文本質量",qualityLabel:{published:"出版",fine:"精校",rough:"粗校",ocr:"機器識別"},qualityCriteria:{published:"達到出版、學術研究標準,錯誤率在萬分之一以內",fine:"通讀無障礙,錯誤率在百分之一以內",rough:"保證文意基本正確,錯誤率在百分之三以內",ocr:"保持大意和結構,錯誤率在百分之十以內"},originalSource:"原文來源",viewsGroup:"看法",viewText:"正文",viewEntries:"條目",rowHeadNo:"序",rowHeadTitle:"書名",rowHeadWork:"作品",railCap:"本卷",railUnitPoems:"首",railUnitBooks:"部書",linkedN:"已關聯 {n}",linkedOf:"已關聯 {n} / {total}",railEntriesNav:"本卷條目"},{nJuan:"{n}卷",viewWork:"查看作品",viewWorkOf:"查看作品:{title}",workArrow:"作品 →",arrowWork:"→作品",nWorks:"{n}部作品",unlinked:"未关联",summary:"提要",comment:"按语",additionalComment:"附按",noMatch:"无匹配结果",sectionType:{类:"类",书:"书",序:"序",结语:"结语",注释:"注释",考证:"考证",诗:"诗"},countTiao:"{n} 条",countTiaoOf:"{m} / {n} 条",countPoems:"{n} 首",countPoemsOf:"{m} / {n} 首",countBooks:"{n} 部书",countBooksOf:"{m} / {n} 部书",kaozhenTarget:"考证对象 {target}",baseText:"底本 {note}",textQuality:"文本质量",qualityLabel:{published:"出版",fine:"精校",rough:"粗校",ocr:"机器识别"},qualityCriteria:{published:"达到出版、学术研究标准,错误率在万分之一以内",fine:"通读无障碍,错误率在百分之一以内",rough:"保证文意基本正确,错误率在百分之三以内",ocr:"保持大意和结构,错误率在百分之十以内"},originalSource:"原文来源",viewsGroup:"看法",viewText:"正文",viewEntries:"条目",rowHeadNo:"序",rowHeadTitle:"书名",rowHeadWork:"作品",railCap:"本卷",railUnitPoems:"首",railUnitBooks:"部书",linkedN:"已关联 {n}",linkedOf:"已关联 {n} / {total}",railEntriesNav:"本卷条目"}),Np=dt({typeShort:{work:"作",book:"版",collection:"叢",entity:"人"},typeLabel:{work:"作品",book:"版本",collection:"叢編",entity:"人物"},typeAll:"全部",typeChipsLabel:"按類型檢索",recentTitle:"最近瀏覽",recentClear:"清除",recentItemLabel:"{type} {title}",recentEmpty:"還沒有瀏覽記錄。打開任一條目後會出現在這裏。",status:{done:"已完成",in_progress:"進行中",todo:"計劃中"},siteStatus:{done:"已對接",in_progress:"進行中"},catalogTitle:"書目著錄進度",catalogNote:"每條著錄對到作品條目",colCatalog:"書目",colRecords:"著錄條目",colMatched:"已對上作品",colProgress:"進度",colStatus:"狀態",relatedTitle:"同類書目與考證",relatedNote:"不在書架上的",allNWorks:"全部 {n} 部",nKinds:"{n} 種",allNKinds:"全部 {n} 種",pavilion:"閣",yearBC:"前{n}",missingLife:"生卒年未錄、未上軸:{names}",viewLineage:"看版本譜系 →",plannedSites:"計劃接入:{names}",loss:{extant:"存",partially_extant:"殘",lost:"佚",unknown:"未詳"},lossNote:{extant:"今有傳本",partially_extant:"部分存世",lost:"僅見著錄",unknown:"尚未判定"},lossCount:"{n} 部 · {note}",stat:{works:"作品",books:"版本",collections:"叢編",entities:"人物",has_image:"有影印",has_text:"有文本",article:"單篇文",poem:"單篇詩"},dataScale:"數據規模",byLoss:"按存佚檢索",license:"古籍元數據以 CC0 公有領域發布,可自由複製、改編、再發布。",repo:"數據倉庫:",repoNote:"(GitHub,CC0)",version:"當前數據版本:",download:"引用方式與數據下載 →",navLabel:"元數據首頁分區",nav:{zhi:"歷代史志",sibu:"四部",cong:"叢編",people:"人物",lineage:"版本譜系",sites:"在線資源",data:"數據與授權"},zhiSub:"正史藝文志、經籍志與後人補志,按所志朝代排列;每部志的著錄逐條對到作品",shelfLegendCount:"脊下數字=著錄條目",shelfLegendClick:"點書脊進作品頁",sibuSub:"全部作品按經史子集分類;與「目錄」頁同一棵分類樹",toCatalog:"進入目錄 →",unclassifiedNote:"多為只見於史志著錄、尚未歸類的書",congSub:"大型叢書、影印彙編、出土文獻與館藏,逐種列到版本",allNKindsMore:"全部 {n} 種 →",peopleSub:"歷代目錄學家,按生卒年排在一條時間軸上",allNPeopleMore:"全部 {n} 人 →",lineageSub:"版本多的作品,看各本的源流與異同",sitesSub:"外部數字圖書館與本站條目的對接",dataSub:"規模、存佚、許可與版本"},{typeShort:{work:"作",book:"版",collection:"丛",entity:"人"},typeLabel:{work:"作品",book:"版本",collection:"丛编",entity:"人物"},typeAll:"全部",typeChipsLabel:"按类型检索",recentTitle:"最近浏览",recentClear:"清除",recentItemLabel:"{type} {title}",recentEmpty:"还没有浏览记录。打开任一条目后会出现在这里。",status:{done:"已完成",in_progress:"进行中",todo:"计划中"},siteStatus:{done:"已对接",in_progress:"进行中"},catalogTitle:"书目著录进度",catalogNote:"每条著录对到作品条目",colCatalog:"书目",colRecords:"著录条目",colMatched:"已对上作品",colProgress:"进度",colStatus:"状态",relatedTitle:"同类书目与考证",relatedNote:"不在书架上的",allNWorks:"全部 {n} 部",nKinds:"{n} 种",allNKinds:"全部 {n} 种",pavilion:"阁",yearBC:"前{n}",missingLife:"生卒年未录、未上轴:{names}",viewLineage:"看版本谱系 →",plannedSites:"计划接入:{names}",loss:{extant:"存",partially_extant:"残",lost:"佚",unknown:"未详"},lossNote:{extant:"今有传本",partially_extant:"部分存世",lost:"仅见著录",unknown:"尚未判定"},lossCount:"{n} 部 · {note}",stat:{works:"作品",books:"版本",collections:"丛编",entities:"人物",has_image:"有影印",has_text:"有文本",article:"单篇文",poem:"单篇诗"},dataScale:"数据规模",byLoss:"按存佚检索",license:"古籍元数据以 CC0 公有领域发布,可自由复制、改编、再发布。",repo:"数据仓库:",repoNote:"(GitHub,CC0)",version:"当前数据版本:",download:"引用方式与数据下载 →",navLabel:"元数据首页分区",nav:{zhi:"历代史志",sibu:"四部",cong:"丛编",people:"人物",lineage:"版本谱系",sites:"在线资源",data:"数据与授权"},zhiSub:"正史艺文志、经籍志与后人补志,按所志朝代排列;每部志的著录逐条对到作品",shelfLegendCount:"脊下数字=著录条目",shelfLegendClick:"点书脊进作品页",sibuSub:"全部作品按经史子集分类;与「目录」页同一棵分类树",toCatalog:"进入目录 →",unclassifiedNote:"多为只见于史志著录、尚未归类的书",congSub:"大型丛书、影印汇编、出土文献与馆藏,逐种列到版本",allNKindsMore:"全部 {n} 种 →",peopleSub:"历代目录学家,按生卒年排在一条时间轴上",allNPeopleMore:"全部 {n} 人 →",lineageSub:"版本多的作品,看各本的源流与异同",sitesSub:"外部数字图书馆与本站条目的对接",dataSub:"规模、存佚、许可与版本"}),Bo=dt({readable:"部可讀",pieces:"篇單篇詩文",startReading:"開始閱讀 →",nCopies:"{n}本",shelfHint:"按所志朝代排列,一脊一部",shelfLegendCount:"脊下「2本」=站內有幾個本子",shelfOther:"其他",shelfRegion:"{label}書架,可橫向滾動",origZhi:"正史原志",laterZhi:"後人補撰、續補",spineBy:"{name} 撰",spineRecords:"著錄 {n} 條",spineOnSite:"站內 {n}",nWorks:"{n} 部",allNWorks:"全部 {n} 部",nCopiesCard:"{n} 個本子",workPageLink:"作品頁:{title}的源流與全部版本 →",sibuUnclassifiedNote:"書目分類還沒補齊,其中多數是單篇詩文,已單列在下方。",subClasses:"{label}子類",allNClasses:"{label}全部 {n} 類 →",unclassified:"未分類",viewUnclassified:"查看未分類 →",periodItem:"{label},{n} 部",periodUnknown:"另有 {n} 部作者無朝代,在「四部」和搜索裏能找到",hoverHint:"窄段懸停看全名",nPieces:"{n} 篇",authorAll:"{name}全部 {n} 篇 →",period:{xianqin:"先秦",qinhan:"秦漢",weijin:"魏晉南北朝",suitang:"隋唐五代",song:"宋",liaojinyuan:"遼金元",ming:"明",qing:"清",modern:"近現代"},navLabel:"閱讀首頁分區",nav:{picks:"推薦閱讀",topics:"專題",famous:"名著與版本",sibu:"四部",period:"按年代",pieces:"單篇詩文"},picksSub:"編輯挑選,定期輪換",topicsSub:"按作品類型歸組;小說見下方「名著與版本」",famousSub:"一部作品一張卡,卡上列出站內能讀的各個本子",sibuSub:"按古籍總目的分類樹,只計站內可讀的作品",periodSub:"按作者朝代歸段,寬度與部數成比例",piecesSub:"單篇的詩、文、賦、表,按作者歸組",piecesMore:"按作者瀏覽全部 →"},{readable:"部可读",pieces:"篇单篇诗文",startReading:"开始阅读 →",nCopies:"{n}本",shelfHint:"按所志朝代排列,一脊一部",shelfLegendCount:"脊下「2本」=站内有几个本子",shelfOther:"其他",shelfRegion:"{label}书架,可横向滚动",origZhi:"正史原志",laterZhi:"后人补撰、续补",spineBy:"{name} 撰",spineRecords:"著录 {n} 条",spineOnSite:"站内 {n}",nWorks:"{n} 部",allNWorks:"全部 {n} 部",nCopiesCard:"{n} 个本子",workPageLink:"作品页:{title}的源流与全部版本 →",sibuUnclassifiedNote:"书目分类还没补齐,其中多数是单篇诗文,已单列在下方。",subClasses:"{label}子类",allNClasses:"{label}全部 {n} 类 →",unclassified:"未分类",viewUnclassified:"查看未分类 →",periodItem:"{label},{n} 部",periodUnknown:"另有 {n} 部作者无朝代,在「四部」和搜索里能找到",hoverHint:"窄段悬停看全名",nPieces:"{n} 篇",authorAll:"{name}全部 {n} 篇 →",period:{xianqin:"先秦",qinhan:"秦汉",weijin:"魏晋南北朝",suitang:"隋唐五代",song:"宋",liaojinyuan:"辽金元",ming:"明",qing:"清",modern:"近现代"},navLabel:"阅读首页分区",nav:{picks:"推荐阅读",topics:"专题",famous:"名著与版本",sibu:"四部",period:"按年代",pieces:"单篇诗文"},picksSub:"编辑挑选,定期轮换",topicsSub:"按作品类型归组;小说见下方「名著与版本」",famousSub:"一部作品一张卡,卡上列出站内能读的各个本子",sibuSub:"按古籍总目的分类树,只计站内可读的作品",periodSub:"按作者朝代归段,宽度与部数成比例",piecesSub:"单篇的诗、文、赋、表,按作者归组",piecesMore:"按作者浏览全部 →"}),Rp=dt({sideNav:"分類導航",classification:"分類",drawerLabel:"分類:{path}",all:"全部",allTitle:"全部典籍",stat:"共 {total} 種 · 每頁 {size} 條",statPage:" · 第 {page} / {pages} 頁",viewLabel:"呈現方式",viewCard:"卡片",viewList:"列表",juanN:"{n}卷",pagerLabel:"分頁",prevPage:"上一頁",nextPage:"下一頁",pageN:"第 {n} 頁",emptyWorks:"此類暫無作品",zhulu:"著錄",cunmu:"存目",categoriesN:"{n} 類",divisionStat:"{cats} 類 · {books} 部",categoryJuan:"卷{n}",booksN:"{n} 部",expandAllN:"展開全部 {n} 條"},{sideNav:"分类导航",classification:"分类",drawerLabel:"分类:{path}",all:"全部",allTitle:"全部典籍",stat:"共 {total} 种 · 每页 {size} 条",statPage:" · 第 {page} / {pages} 页",viewLabel:"呈现方式",viewCard:"卡片",viewList:"列表",juanN:"{n}卷",pagerLabel:"分页",prevPage:"上一页",nextPage:"下一页",pageN:"第 {n} 页",emptyWorks:"此类暂无作品",zhulu:"著录",cunmu:"存目",categoriesN:"{n} 类",divisionStat:"{cats} 类 · {books} 部",categoryJuan:"卷{n}",booksN:"{n} 部",expandAllN:"展开全部 {n} 条"}),Ep=dt({loss:{all:"全部",extant:"存",partially_extant:"殘",lost:"佚"},unclassified:"未分類",statBook:"書",statComma:",",statBookCopies:"本",statArticle:"文章",statArticleUnit:"篇",statPoem:"詩詞",statPoemUnit:"首",statCollection:"叢編",submit:"搜索"},{loss:{all:"全部",extant:"存",partially_extant:"残",lost:"佚"},unclassified:"未分类",statBook:"书",statComma:",",statBookCopies:"本",statArticle:"文章",statArticleUnit:"篇",statPoem:"诗词",statPoemUnit:"首",statCollection:"丛编",submit:"搜索"}),Ip=dt({title:"反饋",close:"關閉",submitType:{bug:"反饋錯誤",resource:"添加資源",suggestion:"功能建議",contact:"想參與"},placeholder:{bug:"請描述您發現的錯誤,包括頁面位置和具體內容",resource:"請提供完整資源鏈接和簡要版本說明",suggestion:"您希望網站增加或改進什麼?",contact:"想參與整理、校對或合作?簡單介紹一下您自己,並留下聯繫方式(此類留言不公開)"},chooseTypeFirst:"請先選擇反饋類型",contactPlaceholder:"郵箱(選填,僅站方可見,方便我們回覆您)",contactLabel:"聯繫方式(選填)",submitFailedRetry:"提交失敗,請稍後重試",submitFailed:"提交失敗",thanks:"感謝您的反饋!",viewList:"查看反饋列表 →",continueSubmit:"繼續提交",submitting:"提交中...",submit:"提交",submitFeedback:"提交反饋",listType:{bug:"錯誤反饋",resource:"資源建議",suggestion:"功能建議",other:"其他"},status:{pending:"待處理",in_progress:"處理中",resolved:"已處理",wontfix:"不採納",duplicate:"重複"},empty:"暫無反饋",reply:"回覆"},{title:"反馈",close:"关闭",submitType:{bug:"反馈错误",resource:"添加资源",suggestion:"功能建议",contact:"想参与"},placeholder:{bug:"请描述您发现的错误,包括页面位置和具体内容",resource:"请提供完整资源链接和简要版本说明",suggestion:"您希望网站增加或改进什么?",contact:"想参与整理、校对或合作?简单介绍一下您自己,并留下联系方式(此类留言不公开)"},chooseTypeFirst:"请先选择反馈类型",contactPlaceholder:"邮箱(选填,仅站方可见,方便我们回复您)",contactLabel:"联系方式(选填)",submitFailedRetry:"提交失败,请稍后重试",submitFailed:"提交失败",thanks:"感谢您的反馈!",viewList:"查看反馈列表 →",continueSubmit:"继续提交",submitting:"提交中...",submit:"提交",submitFeedback:"提交反馈",listType:{bug:"错误反馈",resource:"资源建议",suggestion:"功能建议",other:"其他"},status:{pending:"待处理",in_progress:"处理中",resolved:"已处理",wontfix:"不采纳",duplicate:"重复"},empty:"暂无反馈",reply:"回复"}),Lp=dt({empty:"暫無版本傳承數據",emptyGraph:"暫無版本圖數據",modeList:"列表",modeGraph:"關係圖",collectionLabel:"集合:",collectionAll:"全部",collectionAllDesc:"顯示該作品所有版本(含橋接節點)",graphLoading:"加載圖組件中…",graphMissing:"圖組件未安裝。請安裝 {xyflow} 與 {dagre}。",graphMissingHint:"或使用 {list} 列表視圖。",bridgeTitle:"橋接節點:本身不在核心集,為保持派生鏈完整而顯示",otherGroup:"其他",lost:"已佚",fragment:"殘本",hypothetical:"假想祖本",bridge:"橋接",extant:"現存:{juan}",sources:"來源:",related:"關聯:",confidence:{certain:"確定",consensus:"共識",probable:"推測",disputed:"有爭議"}},{empty:"暂无版本传承数据",emptyGraph:"暂无版本图数据",modeList:"列表",modeGraph:"关系图",collectionLabel:"集合:",collectionAll:"全部",collectionAllDesc:"显示该作品所有版本(含桥接节点)",graphLoading:"加载图组件中…",graphMissing:"图组件未安装。请安装 {xyflow} 与 {dagre}。",graphMissingHint:"或使用 {list} 列表视图。",bridgeTitle:"桥接节点:本身不在核心集,为保持派生链完整而显示",otherGroup:"其他",lost:"已佚",fragment:"残本",hypothetical:"假想祖本",bridge:"桥接",extant:"现存:{juan}",sources:"来源:",related:"关联:",confidence:{certain:"确定",consensus:"共识",probable:"推测",disputed:"有争议"}}),Ap={common:wp,detail:fi,bookPage:Sp,workPage:_p,collectionPage:$p,entityPage:Cp,reader:zp,collated:Tp,metaHome:Np,readHome:Bo,catalogPage:Rp,searchPage:Ep,feedback:Ip,lineage:Lp};function Pp(e){const n={};for(const[o,r]of Object.entries(Ap))n[o]=r[e];return n}function ht(e,n){return e.replace(/\{(\w+)\}/g,(o,r)=>String(n[r]??""))}const ts=new Map;function hn(e){let n=ts.get(e);return n||(n={...e==="zh-Hans"?kp:vp,...Pp(e)},ts.set(e,n)),n}function ns(e,n){let o=e;for(const r of n.split(".")){if(o==null||typeof o!="object")return;o=o[r]}return typeof o=="string"?o:void 0}function Aa(e){return(n,o)=>{const r=ns(e,n)??ns(hn("zh-Hant"),n)??n;return o?ht(r,o):r}}const is=new Map;function fn(e){let n=is.get(e);return n||(n=Aa(hn(e)),is.set(e,n)),n}const Pa="bim-locale";function Mp(){try{const e=localStorage.getItem(Pa);if(e==="zh-Hant"||e==="zh-Hans")return e}catch{}}function Bp(e){try{localStorage.setItem(Pa,e)}catch{}}const Wp="zh-Hans",Op=({locale:e,onLocaleChange:n,converter:o,children:r})=>{const[s,a]=h.useState(e??Wp),l=e??s;h.useEffect(()=>{if(e)return;const u=Mp();u&&u!==s&&a(u)},[]);const d=h.useMemo(()=>l==="zh-Hans"?o??jp():null,[l,o]),c=h.useCallback(u=>{a(u),Bp(u),n==null||n(u)},[n]),p=h.useMemo(()=>({locale:l,setLocale:c,messages:hn(l),converter:d}),[l,c,d]);return t.jsx(en.Provider,{value:p,children:r})};function Ce(){const e=h.useContext(en);return(e==null?void 0:e.messages)??hn("zh-Hant")}const Fp=2e3;function Pe(){const e=h.useContext(en),n=(e==null?void 0:e.locale)??"zh-Hant",o=(e==null?void 0:e.converter)??null,r=h.useRef(new Map),s=h.useRef(n);s.current!==n&&(r.current.clear(),s.current=n);const a=h.useCallback(l=>{if(!l)return"";if(!o)return l;const d=r.current.get(l);if(d!==void 0)return d;const c=o(l);if(r.current.size>=Fp){const p=r.current.keys().next().value;p!==void 0&&r.current.delete(p)}return r.current.set(l,c),c},[o]);return h.useMemo(()=>({convert:a,locale:n,isSimplified:n==="zh-Hans"}),[a,n])}function Q(){const e=h.useContext(en),{convert:n,locale:o,isSimplified:r}=Pe(),s=(e==null?void 0:e.messages)??hn("zh-Hant"),a=h.useMemo(()=>e?Aa(s):fn("zh-Hant"),[e,s]);return h.useMemo(()=>({t:a,convert:n,locale:o,isSimplified:r,messages:s}),[a,n,o,r,s])}const Ma=["錄說語詞議樣書記類傳國經補藝紀編後與間條號為開總種無數據冊頁選時題爲詩萬證學續關東圖資歷來讀館論見鈔別進師輯陳覽寫現應從","點兩華實對員長註結闕殘檢閱當會單換體將裡訂處過區釋術頭錢譯識個電動顯問這認質還幾遺雖須專擇係網運權務變發機請風聲輸軍導產","話們車難報讓業設帶辦紙氣麼際聽親場買賣謝費漢庫遷馬叢孫於張義晉閣維曆欽則夢慶齋録舊內陽樓紅淵歸載稱隱遼計評觀禮龜黃興節併","餘齊韓簡霑並樂諸滸屬組篩紹緒劉蘇誤職夾廣蓋敘斷歐寬駰極參試雜魯沒順線貞該測鮮統戰檔衛辭聯臺贊刪聖貫啟瀏譜薈寶約嘗諜謂舉詳","異賦軾復諒構級審標劃彙吳楊暫轉項寧硯蕭儀禪韻掃閉倉麗禎錯監鞏轍繫説筆竄縣聞諡賈僅擊羅宮訓談誌葉視戶細許祿繪鍵絕欄鑑講誕馮","趙習樹饋確賜裝擬規繼製薦畫鉛獨誠遠龍門覺訣隸軒諭繕塊爭鏡裏豐碼備掛堯錦駕鶴遊傷猶鄒瑩綴揚詔託僞頗竊虛莊歲禍爾辯獲篤窮盡跡","萊終穎訛瑣鐫繡廟幀佈躍雙預連狀態軸複懸遞灣箋頌訪層鏈敗達鈞鳳亂奮豈陰婁騎純優獻靈牆隨摺疊驗徑橫瀾蔣壞鈕盤範圍責減籤適側","榮聶頃縉讎銓廳軌厲鶚駢醫駝黨鐘諫樞滄軻溫贈鐵徵賴蹟潁閒顗歿駁歟勸諷誼湯詐脫羣尋澤擄顏釀謄鴻離騷傑滯憤執廢懼匱歎毀蠶獄寵闇","陸淺貨輕貧俠賤貴煩競樑鳩採綜謬鳴養堅韋顎呂蘭脈峯鵲兒賞籠階緊綱漁荊嬰慍潛營鎔繞陣塚億負卻塵懷閨擋撐縮領滾輪匯撈貼讚創險團","隊準礙強髒藥鮑顧給緯悅帳巖廬貢亞壇惡諱鎮薊驍愛討彌護揮偉輒擾況較響喪鑰藍"].join(""),Hp=new Set([...Ma,...Object.keys(_e.VARIANT_CHARS)]),Ba=[...La,"切換為繁體","漢籍リポジトリ"];function Dp(e,n=Ba){let o=e;for(const a of n)a&&(o=o.split(a).join(" "));const r=[],s=Array.from(o);return s.forEach((a,l)=>{Hp.has(a)&&r.push({char:a,context:s.slice(Math.max(0,l-8),l+9).join("")})}),r}function Up(e){if(!e)return"";try{const n=new URL(e).hostname,o={"zh.wikisource.org":"wikisource","www.shidianguji.com":"shidianguji","shidianguji.com":"shidianguji","archive.org":"archive","ctext.org":"ctext","read.nlc.cn":"nlc","www.digital.archives.go.jp":"japan_archives"};if(o[n])return o[n];const r=n.split(".");return r.length>=2?r[r.length-2]:n}catch{return""}}function Vp(){return{id:"",name:"",url:"",type:"text",details:""}}const uo=({items:e,onChange:n,onDownload:o,downloadStatuses:r,filterType:s})=>{const a=Ce(),[l,d]=h.useState(null),c=[{value:"text",label:a.resourceTypeShort.text},{value:"image",label:a.resourceTypeShort.image},{value:"text+image",label:a.resourceTypeShort.textImage},{value:"physical",label:a.resourceTypeShort.physical}],p=[{value:"catalog",label:a.rootType.catalog},{value:"search",label:a.rootType.search}],u=b=>{if(!s)return!0;const j=Qt(b);return s==="text"?j.includes("text"):s==="image"?j.includes("image")||j.includes("physical"):s==="physical"?j.includes("physical"):j.includes(s)},m=e.map((b,j)=>({item:b,originalIndex:j})).filter(({item:b})=>u(b)),g=()=>{const b=Vp();s&&(b.type=s),n([...e,b]),d(e.length)},f=b=>{n(e.filter((j,S)=>S!==b)),d(null)},x=(b,j,S)=>{const v=[...e];if(v[b]={...v[b],[j]:S},j==="url"&&!v[b].id){const $=Up(S);$&&(v[b].id=$)}n(v)},k=(b,j,S)=>{const $={...e[b].metadata||{}};S?$[j]=S:delete $[j],x(b,"metadata",Object.keys($).length>0?$:void 0)},y=(b,j)=>{const S=j.trim()?j.split(/[,,、]/).map(v=>v.trim()).filter(Boolean):void 0;x(b,"structure",S)},w=(b,j,S)=>{const $=e[b].coverage||{level:1,ranges:""};j==="level"?$.level=parseInt(S)||1:$.ranges=S,x(b,"coverage",$.ranges?$:void 0)};return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[m.map(({item:b,originalIndex:j})=>{var S,v,$;return t.jsxs("div",{style:{border:`1px solid ${i("widget-border")}`,borderRadius:"4px",background:i("input-bg"),overflow:"hidden"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer",gap:"8px"},onClick:()=>d(l===j?null:j),children:[t.jsx("span",{style:{opacity:.6,fontSize:"12px"},children:l===j?"▼":"▶"}),t.jsx("span",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"3px",background:Gp(b.type??"text"),color:i("on-color-fg")},children:(()=>{var z,P;const _=Qt(b);return _.length===0?b.type??"text":_.length===1?((z=c.find(N=>N.value===_[0]))==null?void 0:z.label)??_[0]:_.includes("text")&&_.includes("image")?((P=c.find(N=>N.value==="text+image"))==null?void 0:P.label)??"text+image":_.join("+")})()}),t.jsx("span",{style:{flex:1,fontSize:"13px",fontWeight:500},children:b.name||`${a.editor.resourcePlaceholder} ${j+1}`}),b.id&&t.jsx("span",{style:{fontSize:"11px",opacity:.5},children:b.id}),b.url&&t.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",onClick:_=>_.stopPropagation(),style:{fontSize:"12px",opacity:.7},children:"🔗"}),o&&b.url&&Yp(j,r==null?void 0:r[j],o,a),t.jsx("button",{onClick:_=>{_.stopPropagation(),f(j)},style:{background:"transparent",border:"none",color:i("danger"),cursor:"pointer",padding:"2px 6px",fontSize:"14px"},title:a.editor.deleteThisResource,children:"✕"})]}),l===j&&t.jsxs("div",{style:{padding:"12px",borderTop:`1px solid ${i("widget-border")}`},children:[fp(b,"image")&&b.url&&Kp(b,a),t.jsxs("div",{style:{display:"grid",gap:"8px"},children:[t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsxs("label",{style:Sn,children:[t.jsx("span",{style:_n,children:a.label.type}),t.jsx("select",{value:b.type,onChange:_=>x(j,"type",_.target.value),style:{..._t,flex:1},children:c.map(_=>t.jsx("option",{value:_.value,children:_.label},_.value))})]}),t.jsxs("label",{style:Sn,children:[t.jsx("span",{style:_n,children:a.label.rootType}),t.jsx("select",{value:b.root_type||"catalog",onChange:_=>x(j,"root_type",_.target.value),style:{..._t,flex:1},children:p.map(_=>t.jsx("option",{value:_.value,children:_.label},_.value))})]})]}),t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsx("input",{type:"text",value:b.id,onChange:_=>x(j,"id",_.target.value),placeholder:a.editor.idAutoExtract,style:{..._t,width:"140px",flexShrink:0}}),t.jsx("input",{type:"text",value:b.name,onChange:_=>x(j,"name",_.target.value),placeholder:a.editor.resourceName,style:{..._t,flex:1}})]}),t.jsx("input",{type:"text",value:b.url,onChange:_=>x(j,"url",_.target.value),placeholder:a.editor.resourceUrl,style:_t}),t.jsx("input",{type:"text",value:((S=b.structure)==null?void 0:S.join("、"))||"",onChange:_=>y(j,_.target.value),placeholder:a.editor.structurePlaceholder,style:_t}),t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsxs("label",{style:Sn,children:[t.jsx("span",{style:_n,children:a.label.coverageLevel}),t.jsx("input",{type:"number",min:1,value:((v=b.coverage)==null?void 0:v.level)??"",onChange:_=>w(j,"level",_.target.value),placeholder:"1",style:{..._t,width:"60px"}})]}),t.jsxs("label",{style:{...Sn,flex:1},children:[t.jsx("span",{style:_n,children:a.label.coverageRange}),t.jsx("input",{type:"text",value:(($=b.coverage)==null?void 0:$.ranges)||"",onChange:_=>w(j,"ranges",_.target.value),placeholder:a.editor.coverageRangePlaceholder,style:{..._t,flex:1}})]})]}),t.jsx("textarea",{value:b.details||"",onChange:_=>x(j,"details",_.target.value),placeholder:a.editor.detailsPlaceholder,style:{..._t,minHeight:"60px",resize:"vertical"}}),t.jsxs("div",{style:{borderTop:`1px solid ${i("widget-border")}`,paddingTop:"8px",marginTop:"4px"},children:[t.jsx("div",{style:{fontSize:"12px",color:i("desc-fg"),marginBottom:"6px"},children:a.label.metadata}),t.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px"},children:Object.entries(a.metadata).map(([_,z])=>{var P;return t.jsxs("label",{style:{...Sn,gap:"4px"},children:[t.jsx("span",{style:{..._n,minWidth:"56px"},children:z}),t.jsx("input",{type:"text",value:((P=b.metadata)==null?void 0:P[_])||"",onChange:N=>k(j,_,N.target.value),placeholder:z,style:{..._t,flex:1}})]},_)})})]})]})]})]},j)}),t.jsxs("button",{onClick:g,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"8px 16px",border:`1px dashed ${i("widget-border")}`,borderRadius:"4px",background:"transparent",color:i("fg"),cursor:"pointer",fontSize:"13px",opacity:.8},children:[t.jsx("span",{children:"+"}),t.jsx("span",{children:a.action.addResource})]})]})};function Gp(e){switch(e){case"text":return i("restype-text");case"image":return i("restype-image");case"text+image":return i("restype-text-image");case"physical":return i("restype-physical")}}function Yp(e,n,o,r){const s=(n==null?void 0:n.status)==="downloading",a=(n==null?void 0:n.status)==="completed";return t.jsx("button",{onClick:l=>{l.stopPropagation(),s||o(e,"")},disabled:s,style:{background:"transparent",border:"none",color:i(a?"success":s?"desc-fg":"link-fg"),cursor:s?"default":"pointer",padding:"2px 6px",fontSize:"12px",opacity:s?.6:.9},title:a?r.download.completed:s?`${r.download.downloading} ${(n==null?void 0:n.progress)||0}%`:r.download.downloadThis,children:a?"✓":s?"⏳":"⬇"})}function Kp(e,n){const o=/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(e.url)||e.url.includes("iiif")||e.url.includes("image");return t.jsx("div",{style:{marginBottom:"12px"},children:o?t.jsx("div",{style:{width:"100%",maxHeight:"150px",overflow:"hidden",borderRadius:"4px",background:i("overlay-bg")},children:t.jsx("img",{src:e.url,alt:e.name,style:{width:"100%",height:"150px",objectFit:"contain"},onError:r=>{r.target.style.display="none"}})}):t.jsx("div",{style:{padding:"12px",background:i("overlay-bg"),borderRadius:"4px",fontSize:"12px",color:i("desc-fg")},children:n.editor.imageResourceLink})})}const _t={width:"100%",padding:"6px 8px",background:i("input-bg"),color:i("input-fg"),border:`1px solid ${i("input-border")}`,borderRadius:"2px",fontSize:"13px",boxSizing:"border-box"},Sn={display:"flex",alignItems:"center",gap:"6px"},_n={fontSize:"12px",color:i("desc-fg"),whiteSpace:"nowrap"},qp={"commons.wikimedia.org":"維基共享","zh.wikisource.org":"維基文庫","taiwanebook.ncl.edu.tw":"臺灣華文電子書庫","ctext.org":"中國哲學書電子化計劃","www.shidianguji.com":"識典古籍","shidianguji.com":"識典古籍","archive.org":"Internet Archive","www.shuge.org":"書格","shuge.org":"書格","pan.baidu.com":"百度網盤"};function xn(e){try{return qp[new URL(e).hostname]}catch{return}}const os={text:0,image:1,physical:2};function Wo(e){return e.length===0?"physical":[...e].sort((n,o)=>(os[n]??99)-(os[o]??99)).join("+")}function Oo(e){var l;const n=d=>{const c=d.match(/^(.+?)·第(\d+)[冊册]$/);if(c)return[c[1],parseInt(c[2])];const p=d.match(/^(.+?)[·(](\d+)[)]?$/);return p?[p[1],parseInt(p[2])]:null},o=new Map;for(let d=0;d<e.length;d++){const c=e[d];if(c.volumes&&c.volumes.length>0)continue;const p=n(c.name);if(!p)continue;const[u,m]=p,g=`${u}|${Wo(Qt(c))}`;o.has(g)||o.set(g,{base:{...c,name:u,url:"",volumes:[]},volumes:[],indices:[]});const f=o.get(g);f.volumes.push({volume:m,url:c.url||void 0,status:"found"}),f.indices.push(d)}const r=[],s=new Set;for(const d of o.values())if(!(d.volumes.length<2)){d.volumes.sort((c,p)=>c.volume-p.volume),d.base.volumes=d.volumes,d.base.expected_volumes=d.volumes.length,d.base.url||(d.base.url=((l=d.volumes.find(c=>c.url))==null?void 0:l.url)??""),r.push(d.base);for(const c of d.indices)s.add(c)}const a=[...r];for(let d=0;d<e.length;d++)s.has(d)||a.push(e[d]);return a}function Wa(e){if(e.url)return e.url;for(const[n,o]of Object.entries(e))if(n.endsWith("_url")&&typeof o=="string")return o}function Oa(e){return!Array.isArray(e.volumes)||e.volumes.length===0?null:e.volumes.map(n=>({...n,url:n.url||Wa(n)}))}function xi(e){const n=Oa(e);if(!n)return null;const o=new Set(n.filter(s=>s.status!=="missing").map(s=>s.volume)).size,r=new Set(n.filter(s=>s.status==="missing").map(s=>s.volume)).size;return{found:o,missing:r,expected:e.expected_volumes??o+r}}function Fo(e){if(!e)return;const n=e.file_page_range||e.page_range;if(!n||typeof n!="string")return;const o=n.match(/^(\d+)/);return o?parseInt(o[1],10):void 0}function Ho(e,n){try{if(new URL(e).hostname.includes("wikimedia.org")){const r=e.match(/\/wiki\/File:(.+?)(?:#|$)/);if(r)return`https://commons.wikimedia.org/w/index.php?title=File%3A${encodeURIComponent(decodeURIComponent(r[1]))}&page=${n}`;const s=new URL(e);return s.searchParams.set("page",String(n)),s.toString()}return e}catch{return e}}function bn(e){if(!e.url)return;const n=Fo(e.metadata);return n?Ho(e.url,n):e.url}const rs={text:i("restype-text"),image:i("restype-image"),"text+image":i("restype-text-image"),physical:i("restype-physical")};function Xp(e){return e.includes("text")&&e.includes("image")?rs["text+image"]:rs[e[0]||"physical"]}const Do=({items:e,groupByType:n=!0,resourceGroups:o,onNavigate:r,renderLink:s})=>{const a=Ce(),{convert:l}=Pe(),d=h.useMemo(()=>Oo(e||[]),[e]),{mirrorGroups:c,ungroupedItems:p}=h.useMemo(()=>{const y=new Map,w=[];for(const b of d){const j=b.group;j?(y.has(j)||y.set(j,[]),y.get(j).push(b)):w.push(b)}for(const b of y.values())b.sort((j,S)=>{const v=$=>$.group_role==="origin"?0:$.group_role==="mirror"?1:2;return v(j)-v(S)});return{mirrorGroups:y,ungroupedItems:w}},[d]),u={text:a.resourceType.text,image:a.resourceType.image,"text+image":a.resourceType.textImage,physical:a.resourceType.physical},m=y=>u[y]?u[y]:y.split("+").map(w=>u[w]||w).join("+");if(!d||d.length===0)return t.jsx("div",{style:{padding:"16px",color:i("desc-fg"),fontSize:"13px",textAlign:"center"},children:a.misc.noResources});if(!n)return t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:d.map((y,w)=>t.jsx(Yi,{item:y},y.id||w))});const g=(y,w)=>{const b=o==null?void 0:o[y],j=(b==null?void 0:b.label)||y,S=b==null?void 0:b.description;return t.jsxs("div",{style:{padding:"10px 12px",border:`1px solid ${i("widget-border")}`,borderRadius:"6px",background:i("input-bg"),display:"flex",flexDirection:"column",gap:"8px"},children:[t.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:i("fg")},children:l(j)}),S&&t.jsx("div",{style:{fontSize:"12px",color:i("desc-fg"),lineHeight:1.5},children:l(S)}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:w.map((v,$)=>t.jsx(Yi,{item:v,onNavigate:r,renderLink:s},v.id||$))})]},`group-${y}`)},f=new Map;for(const y of p){const w=Wo(Qt(y));f.has(w)||f.set(w,[]),f.get(w).push(y)}const x=["text","image","text+image","physical"],k=[...x.filter(y=>f.has(y)),...[...f.keys()].filter(y=>!x.includes(y)).sort()];return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[[...c.entries()].map(([y,w])=>g(y,w)),k.map(y=>{const w=f.get(y),b=Xp(y.split("+"));return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"8px",flexWrap:"wrap"},children:[t.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:b,whiteSpace:"nowrap",flexShrink:0},children:m(y)}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:w.map((j,S)=>t.jsx(Yi,{item:j,onNavigate:r,renderLink:s},j.id||S))})]},y)})]})},Zp={bw:{label:"",bg:i("colormode-bw-bg"),fg:i("colormode-bw-fg")},color:{label:"",bg:i("colormode-color-bg"),fg:i("colormode-color-fg")}},Yi=({item:e})=>{const n=Ce(),{convert:o}=Pe(),[r,s]=h.useState(!1),a=h.useMemo(()=>(e.url?xn(e.url):void 0)||o(e.name),[e.url,e.name,o]),l=h.useMemo(()=>!Array.isArray(e.volumes)||e.volumes.length===0?null:e.volumes.map(x=>({...x,url:x.url||Wa(x)})),[e.volumes]),d=l&&l.length>0,c=d?new Set(l.filter(x=>x.status!=="missing").map(x=>x.volume)).size:0,p=d?new Set(l.filter(x=>x.status==="missing").map(x=>x.volume)).size:0,u=e.expected_volumes??(d?c+p:0),m=e.color_mode?{...Zp[e.color_mode],label:n.colorMode[e.color_mode]}:null,g=e.details&&!d?o(e.details):null,f={display:"inline-flex",alignItems:"center",gap:"5px",padding:"4px 10px",border:`1px solid ${i("widget-border")}`,borderRadius:"5px",background:i("input-bg"),fontSize:"12px",color:i("fg"),lineHeight:1.4,verticalAlign:"middle"};return t.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"4px"},children:[t.jsxs("div",{style:f,children:[t.jsx("span",{style:{fontWeight:500},children:a}),m&&t.jsx("span",{style:{padding:"0 5px",borderRadius:"3px",fontSize:"10px",fontWeight:500,background:m.bg,color:m.fg},children:m.label}),g&&t.jsx("span",{style:{fontSize:"11px",color:i("desc-fg")},children:g}),d&&t.jsxs("span",{style:{fontSize:"11px",color:i("desc-fg")},children:[c,"/",u,n.unit.volume,p>0&&t.jsx("span",{style:{color:i("missing-fg"),marginLeft:"3px"},children:ht(n.common.volumesMissing,{n:p})})]}),e.url&&t.jsx("a",{href:(()=>{const x=Fo(e.metadata);return x?Ho(e.url,x):e.url})(),target:"_blank",rel:"noopener noreferrer",style:{fontSize:"11px",color:i("link-fg"),textDecoration:"none",whiteSpace:"nowrap"},children:n.action.visit}),d&&t.jsx("button",{onClick:()=>s(!r),style:{padding:"0 6px",fontSize:"11px",border:"none",background:"transparent",color:i("desc-fg"),cursor:"pointer",lineHeight:1.4},children:r?"▲":"▼"})]}),d&&r&&t.jsx("div",{style:{padding:"6px 10px",border:`1px solid ${i("widget-border")}`,borderRadius:"5px",display:"flex",flexWrap:"wrap",gap:"4px",maxWidth:"360px"},children:l.map(x=>{const k=x.status==="missing";return x.url&&!k?t.jsx("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-block",padding:"1px 5px",fontSize:"11px",borderRadius:"3px",border:`1px solid ${i("widget-border")}`,color:i("link-fg"),textDecoration:"none"},children:x.volume},x.volume):t.jsx("span",{style:{display:"inline-block",padding:"1px 5px",fontSize:"11px",color:i(k?"missing-fg":"desc-fg"),textDecoration:k?"line-through":"none",opacity:k?.6:1},children:x.volume},x.volume)})})]})},Fa=({indexSource:e,syncConfig:n,variant:o="index-browser",onSwitchMode:r,onToggleDraft:s,onConfigurePath:a,onSelectFolder:l})=>{const d=Ce(),c=e==="local",p=(n==null?void 0:n.isDraft)??!0,u=(n==null?void 0:n.repoPath)||"",m=u?u.split(/[/\\]/).pop()||u:"",g={display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",borderRadius:"8px",fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"opacity 0.2s",border:"none",background:i("primary-soft"),color:i("primary")},f={onMouseOver:k=>k.currentTarget.style.opacity="0.8",onMouseOut:k=>k.currentTarget.style.opacity="1"},x=t.jsxs("div",{onClick:s,title:p?d.mode.switchToOfficial:d.mode.switchToDraft,style:{...g,background:i(p?"warning":"success"),color:i("on-color-fg")},...f,children:[t.jsx("span",{children:p?"📝":"📚"}),t.jsx("span",{children:p?"draft":"official"})]});return o==="index-browser"?c?t.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[x,t.jsxs("div",{onClick:r,title:d.mode.switchToSync,style:g,...f,children:[t.jsx("span",{children:"📁"}),t.jsx("span",{children:d.mode.localMode}),t.jsx("span",{style:{opacity:.6,marginLeft:"4px"},children:"⇄"})]}),t.jsxs("div",{onClick:l,title:u||d.mode.selectFolder,style:{...g,paddingLeft:"8px",paddingRight:"8px"},...f,children:[t.jsx("span",{children:"📂"}),m&&t.jsx("span",{style:{fontSize:"11px",opacity:.9},children:m})]})]}):t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x,t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[t.jsxs("div",{onClick:r,title:d.mode.switchToLocal,style:g,...f,children:[t.jsx("span",{children:"🌐"}),t.jsx("span",{children:d.mode.syncMode}),t.jsx("span",{style:{opacity:.6,marginLeft:"4px"},children:"⇄"})]}),t.jsx("div",{onClick:a,title:m||d.mode.configurePath,style:{...g,background:"transparent",padding:"6px",fontSize:"12px"},...f,children:t.jsx("span",{children:"⚙️"})})]})]}):t.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[t.jsxs("div",{onClick:r,title:c?d.mode.switchToGithub:d.mode.switchToLocal,style:g,...f,children:[t.jsx("span",{children:c?"📁":"🌐"}),t.jsx("span",{children:c?d.mode.localMode:d.mode.githubSync}),t.jsx("span",{style:{opacity:.6},children:"⇄"})]}),c&&t.jsxs("div",{onClick:l,title:u||d.mode.selectFolder,style:{...g,paddingLeft:"8px",paddingRight:"8px",minWidth:u?"100px":"auto",justifyContent:"space-between"},...f,children:[t.jsx("span",{children:"📂"}),m&&t.jsx("span",{style:{fontSize:"11px",opacity:.9},children:m})]}),!c&&m&&t.jsxs("div",{style:{...g,background:i("mode-active-bg"),color:i("on-color-fg"),cursor:"default"},title:u,children:[t.jsx("span",{children:"📂"}),t.jsx("span",{style:{fontSize:"11px"},children:m})]})]})},bi="bim-search-history",ss=10,as=8;function In(){try{const e=localStorage.getItem(bi);return e?JSON.parse(e):[]}catch{return[]}}function Ha(e){try{const n=In().filter(o=>o!==e);n.unshift(e),n.length>ss&&(n.length=ss),localStorage.setItem(bi,JSON.stringify(n))}catch{}}function Jp(e){try{const n=In().filter(o=>o!==e);localStorage.setItem(bi,JSON.stringify(n))}catch{}}function Qp(){try{localStorage.removeItem(bi)}catch{}}const Da=({transport:e,value:n,onChange:o,onSearch:r,onEntrySelect:s,placeholder:a})=>{const l=Ce(),d=a??l.search.placeholder,c={work:l.indexType.work,book:l.indexType.book,collection:l.indexType.collection,entity:l.indexType.entity},[p,u]=h.useState(!1),[m,g]=h.useState([]),[f,x]=h.useState(-1),[k,y]=h.useState(In),w=h.useRef(null),b=h.useRef(null),j=h.useRef(null),S=h.useRef(!1);h.useEffect(()=>{x(-1);const T=n.trim();if(!T){g(k.map(E=>({type:"history",text:E})));return}if(!e.searchAll){g([]);return}let D=!1;const R=setTimeout(()=>{e.searchAll(T,as).then(E=>{if(D)return;const L=[...E.works,...E.books,...E.collections,...E.entities??[]];g(L.slice(0,as).map(I=>({type:"entry",text:I.title||I.id,entry:I})))}).catch(()=>{D||g([])})},80);return()=>{D=!0,clearTimeout(R)}},[n,k,e]),h.useEffect(()=>{const T=D=>{j.current&&!j.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]),h.useEffect(()=>{const T=D=>{var R,E;if(D.key==="/"&&document.activeElement!==w.current){const L=(R=document.activeElement)==null?void 0:R.tagName;if(L==="INPUT"||L==="TEXTAREA"||L==="SELECT")return;D.preventDefault(),(E=w.current)==null||E.focus()}};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[]);const v=h.useCallback(T=>{T.trim()&&(Ha(T.trim()),y(In())),r(T),u(!1)},[r]),$=h.useCallback(T=>{T.type==="history"?(o(T.text),v(T.text)):T.entry&&(s?(s(T.entry),u(!1)):(o(T.text),v(T.text)))},[o,v,s]),_=h.useCallback(T=>{if(!p||m.length===0){T.key==="Enter"&&v(n);return}switch(T.key){case"ArrowDown":T.preventDefault(),x(D=>(D+1)%m.length);break;case"ArrowUp":T.preventDefault(),x(D=>(D-1+m.length)%m.length);break;case"Enter":T.preventDefault(),f>=0&&f<m.length?$(m[f]):v(n);break;case"Escape":T.preventDefault(),u(!1);break}},[p,m,f,n,v,$]),z=h.useCallback((T,D)=>{D.stopPropagation(),Jp(T),y(In()),g(R=>R.filter(E=>!(E.type==="history"&&E.text===T)))},[]),P=h.useCallback(T=>{T.stopPropagation(),Qp(),y([]),g([])},[]);h.useEffect(()=>{if(f>=0&&b.current){const T=b.current.children;T[f]&&T[f].scrollIntoView({block:"nearest"})}},[f]);const N=!n.trim()&&k.length>0;return t.jsxs("div",{ref:j,style:{position:"relative",flex:1},children:[t.jsx("input",{ref:w,type:"text",placeholder:d,value:n,onChange:T=>{o(T.target.value),u(!0)},onCompositionStart:()=>{S.current=!0},onCompositionEnd:()=>{S.current=!1},onFocus:()=>{u(!0)},onKeyDown:_,style:{width:"100%",padding:"8px 12px",border:`1px solid ${i("input-border")}`,borderRadius:"6px",background:i("input-bg"),color:i("input-fg"),fontSize:"14px",boxSizing:"border-box"}}),p&&m.length>0&&t.jsxs("div",{ref:b,style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",background:i("input-bg"),border:`1px solid ${i("widget-border")}`,borderRadius:"6px",boxShadow:i("shadow-dropdown"),zIndex:100,maxHeight:"320px",overflow:"auto"},children:[N&&t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 12px",fontSize:"11px",color:i("desc-fg"),borderBottom:`1px solid ${i("widget-border")}`},children:[t.jsx("span",{children:l.search.history}),t.jsx("button",{onClick:P,style:{border:"none",background:"transparent",color:i("desc-fg"),cursor:"pointer",fontSize:"11px",padding:"0 4px"},children:l.search.clearAll})]}),m.map((T,D)=>t.jsxs("div",{onClick:()=>$(T),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",cursor:"pointer",fontSize:"13px",color:i("fg"),background:D===f?i("list-active-bg"):"transparent"},children:[t.jsx("span",{style:{fontSize:"12px",opacity:.5,width:"16px",textAlign:"center"},children:T.type==="history"?"🕐":"🔍"}),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T.text}),T.entry&&t.jsxs("span",{style:{fontSize:"11px",color:i("desc-fg"),flexShrink:0},children:[c[T.entry.type],T.entry.edition&&` · ${T.entry.edition}`,T.entry.author&&` · ${T.entry.author}`]}),T.type==="history"&&t.jsx("button",{onClick:R=>z(T.text,R),style:{border:"none",background:"transparent",color:i("desc-fg"),cursor:"pointer",fontSize:"12px",padding:"0 2px",lineHeight:1},title:l.action.remove,children:"×"})]},`${T.type}-${T.text}-${D}`))]})]})},yn=({type:e,size:n=9})=>t.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:n,height:n,borderRadius:1,flex:"none",background:i(`type-${e}`),verticalAlign:"middle"}}),yi={dynasty:[],classification:[],hasImage:!1,hasText:!1,hasCollated:!1,loss:"",sort:""},Ua=new Set(["work","book","entity"]);function eu(e){return Ya(e)||!!e.sort}function tu(e,n){return n.sort&&Ua.has(e)?n.sort:void 0}const ji=[{key:"漢",values:["漢","西漢","東漢"]},{key:"魏晉南北朝",values:["三國魏","三國蜀","三國吳","三國","晉","西晉","東晉","南朝宋","南朝齊","南朝梁","南朝陳","北魏","東魏","西魏","北齊","北周"]},{key:"唐",values:["隋","唐","五代","前蜀","後蜀","南唐"]},{key:"宋",values:["宋","北宋","南宋","宋末元初","遼","金"]},{key:"元",values:["元","元末明初"]},{key:"明",values:["明","明末清初"]},{key:"清",values:["清"]}],vi=[{value:"經部",label:"經部"},{value:"史部",label:"史部"},{value:"子部",label:"子部"},{value:"集部",label:"集部"},{value:"",label:"未分類"}],Va=[{value:"",label:"全部"},{value:"extant",label:"存"},{value:"partially_extant",label:"殘"},{value:"lost",label:"佚"}],Ga={work:new Set(["dynasty","classification","hasImage","hasText","hasCollated","loss"]),book:new Set(["dynasty","hasImage","hasText"]),collection:new Set,entity:new Set(["dynasty"])};function ki(e){return e.dynasty.length+e.classification.length+(e.hasImage?1:0)+(e.hasText?1:0)+(e.hasCollated?1:0)+(e.loss?1:0)}function Ya(e){return ki(e)>0}function nu(e){const n=[];return e.dynasty.length&&n.push("dynasty"),e.classification.length&&n.push("classification"),e.hasImage&&n.push("hasImage"),e.hasText&&n.push("hasText"),e.hasCollated&&n.push("hasCollated"),e.loss&&n.push("loss"),n}function Ka(e,n){const o=Ga[e];return nu(n).every(r=>o.has(r))}const $n=e=>JSON.stringify(e);function iu(e,n){if(!Ka(n,e))return null;const o=[];if(e.dynasty.length){const r=Array.from(new Set(e.dynasty.flatMap(s=>{var a;return((a=ji.find(l=>l.key===s))==null?void 0:a.values)??[]})));r.length===1?o.push(`dynasty = ${$n(r[0])}`):r.length>1&&o.push(`dynasty IN [${r.map($n).join(", ")}]`)}return e.classification.length&&o.push(e.classification.length===1?`classification = ${$n(e.classification[0])}`:`classification IN [${e.classification.map($n).join(", ")}]`),e.hasImage&&o.push("has_image = true"),e.hasText&&o.push("has_text = true"),e.hasCollated&&o.push("has_collated = true"),e.loss&&o.push(`loss_status = ${$n(e.loss)}`),o.join(" AND ")}const st={dynasty:"dy",classification:"cls",hasImage:"img",hasText:"txt",hasCollated:"col",loss:"loss",sort:"sort"},qa="_";function ci(e,n=new URLSearchParams){for(const o of Object.values(st))n.delete(o);return e.dynasty.length&&n.set(st.dynasty,e.dynasty.join(",")),e.classification.length&&n.set(st.classification,e.classification.map(o=>o||qa).join(",")),e.hasImage&&n.set(st.hasImage,"1"),e.hasText&&n.set(st.hasText,"1"),e.hasCollated&&n.set(st.hasCollated,"1"),e.loss&&n.set(st.loss,e.loss),e.sort&&n.set(st.sort,e.sort),n}function ou(e){const n=a=>(e.get(a)??"").split(",").map(l=>l.trim()).filter(Boolean),o=new Set(ji.map(a=>a.key)),r=new Set(vi.map(a=>a.value)),s=e.get(st.loss);return{dynasty:Array.from(new Set(n(st.dynasty).filter(a=>o.has(a)))),classification:Array.from(new Set(n(st.classification).map(a=>a===qa?"":a).filter(a=>r.has(a)))),hasImage:e.get(st.hasImage)==="1",hasText:e.get(st.hasText)==="1"||e.get(st.hasCollated)==="1",hasCollated:!1,loss:s==="extant"||s==="partially_extant"||s==="lost"?s:"",sort:["era:asc","era:desc","title:asc","title:desc"].find(a=>a===e.get(st.sort))??""}}function ru(e,n){return JSON.stringify([e.dynasty.slice().sort(),e.classification.slice().sort(),e.hasImage,e.hasText,e.hasCollated,e.loss,e.sort])===JSON.stringify([n.dynasty.slice().sort(),n.classification.slice().sort(),n.hasImage,n.hasText,n.hasCollated,n.loss,n.sort])}function ls(e,n){return e.includes(n)?e.filter(o=>o!==n):[...e,n]}const su=({filters:e,onChange:n})=>{const o=Ce(),r=o.searchV4,{convert:s}=Pe(),[a,l]=h.useState(!1),d=h.useId(),c=ki(e),p=u=>n({...e,...u});return t.jsxs("aside",{className:"bim-sr-aside","aria-label":s(r.filterTitle),children:[t.jsxs("button",{type:"button",className:"bim-sr-fbtn","aria-expanded":a,"aria-controls":d,onClick:()=>l(u=>!u),children:[t.jsxs("span",{children:[s(r.filterButton),c>0&&t.jsx("span",{className:"bim-sr-fn",children:s(ht(r.filterSelected,{n:c}))})]}),t.jsxs("span",{className:"bim-sr-fa","aria-hidden":"true",children:[s(a?r.collapse:r.expand)," ",a?"▴":"▾"]})]}),t.jsxs("div",{className:"bim-sr-filters",id:d,"data-open":a?"true":"false",...a?{}:{"data-collapsed":"true"},children:[t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{children:s(r.dynasty)}),t.jsx("div",{className:"bim-sr-chips",children:ji.map(u=>t.jsx("button",{type:"button",className:"bim-sr-chip","aria-pressed":e.dynasty.includes(u.key),onClick:()=>p({dynasty:ls(e.dynasty,u.key)}),children:s(u.key)},u.key))})]}),t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{children:s(r.classification)}),vi.map(u=>t.jsxs("label",{className:"bim-sr-opt",children:[t.jsx("input",{type:"checkbox",checked:e.classification.includes(u.value),onChange:()=>p({classification:ls(e.classification,u.value)})}),u.value?s(u.label):o.searchPage.unclassified]},u.value||"_"))]}),t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{children:s(r.resources)}),t.jsxs("label",{className:"bim-sr-opt",children:[t.jsx("input",{type:"checkbox",checked:e.hasImage,onChange:u=>p({hasImage:u.target.checked})}),s(r.hasImage)]}),t.jsxs("label",{className:"bim-sr-opt",children:[t.jsx("input",{type:"checkbox",checked:e.hasText,onChange:u=>p({hasText:u.target.checked})}),s(r.hasText)]})]}),t.jsxs("section",{className:"bim-sr-fg",children:[t.jsx("h3",{id:`${d}-loss`,children:s(r.extant)}),t.jsx("div",{className:"bim-sr-seg",role:"group","aria-labelledby":`${d}-loss`,children:Va.map(u=>t.jsx("button",{type:"button","aria-pressed":e.loss===u.value,onClick:()=>p({loss:u.value}),children:o.searchPage.loss[u.value||"all"]},u.value||"all"))})]}),c>0&&t.jsx("button",{type:"button",className:"bim-sr-clear",onClick:()=>n({...yi,sort:e.sort}),children:s(r.clearAllFilters)})]})]})};function Xa({text:e,query:n}){const o=(n??"").trim();if(!o||!e)return t.jsx(t.Fragment,{children:e});const r=e.toLowerCase(),s=o.toLowerCase(),a=[];let l=0,d=0;for(;l<e.length;){const c=r.indexOf(s,l);if(c<0){a.push(e.slice(l));break}c>l&&a.push(e.slice(l,c)),a.push(t.jsx("mark",{className:"bim-sr-hl",children:e.slice(c,c+s.length)},d++)),l=c+s.length}return t.jsx(t.Fragment,{children:a})}const cs=({entries:e,query:n,onEntryLinkClick:o,typeName:r})=>{const s=Ce(),a=s.searchV4,{convert:l}=Pe(),d=tt();return t.jsx("div",{className:"bim-sr-tablewrap",children:t.jsxs("table",{className:"bim-sr-table",children:[t.jsxs("colgroup",{children:[t.jsx("col",{style:{width:"34%"}}),t.jsx("col",{style:{width:"8%"}}),t.jsx("col",{style:{width:"19%"}}),t.jsx("col",{style:{width:"13%"}}),t.jsx("col",{style:{width:"12%"}}),t.jsx("col",{style:{width:"14%"}})]}),t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",children:l(a.colTitle)}),t.jsx("th",{scope:"col",children:l(a.colType)}),t.jsx("th",{scope:"col",children:l(a.colAuthor)}),t.jsx("th",{scope:"col",children:l(a.colEra)}),t.jsx("th",{scope:"col",children:l(a.colClass)}),t.jsx("th",{scope:"col",style:{textAlign:"right"},children:l(a.colResource)})]})}),t.jsx("tbody",{children:e.map(c=>{const p=l(c.title||c.primary_name||c.id),u=c.measure_info?l(c.measure_info):c.juan_count?`${c.juan_count}${s.unit.juan}`:"",m=c.type==="entity"?[c.birth_year!=null||c.death_year!=null?`${c.birth_year??"?"}—${c.death_year??"?"}`:""].filter(Boolean).join(""):c.author?`${l(c.author)}${c.role&&c.role!=="author"?` ${l(c.role)}`:""}`:"",g=c.type==="book"?c.era??c.dynasty:c.dynasty,f=g?l(g):"",x=c.classification?l(c.classification):"",k=[];c.has_image&&k.push({label:a.tagImage,cls:"bim-sr-tag--img"}),(c.has_text||c.has_collated)&&k.push({label:a.tagText,cls:""}),c.loss_status==="lost"&&k.push({label:a.tagLost,cls:"bim-sr-tag--lost"});const y=[m,f,x].filter(Boolean).join(" · ");return t.jsxs("tr",{children:[t.jsxs("td",{className:"bim-sr-c-title",children:[t.jsxs("div",{className:"bim-sr-tl",children:[t.jsx("a",{href:d(c.id),onClick:w=>o(c,w),children:t.jsx(Xa,{text:p,query:n?l(n):void 0})}),u&&t.jsx("span",{className:"bim-sr-measure",children:u})]}),y&&t.jsx("span",{className:"bim-sr-sub",children:y})]}),t.jsxs("td",{className:"bim-sr-c-type",children:[t.jsx(yn,{type:c.type,size:6})," ",r(c.type)]}),t.jsx("td",{className:"bim-sr-c-who",children:m||"—"}),t.jsx("td",{className:"bim-sr-c-era",children:f||"—"}),t.jsx("td",{className:"bim-sr-c-cls",children:x||"—"}),t.jsx("td",{className:"bim-sr-c-res",children:k.map(w=>t.jsx("span",{className:`bim-sr-tag ${w.cls}`,children:l(w.label)},w.label))})]},c.id)})})]})})},au=`
2
2
  .bim-sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; }
3
3
  .bim-sc { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 12px; border: 1px solid ${i("rule")}; background: ${i("card-bg")}; color: inherit; text-decoration: none; }
4
4
  .bim-sc:hover { border-color: ${i("rule-dashed")}; box-shadow: ${i("fr-shadow")}; }
package/dist/index.js CHANGED
@@ -1031,7 +1031,7 @@ const Tc = gt({
1031
1031
  place: "地名",
1032
1032
  dynasty: "朝代",
1033
1033
  reign: "年號",
1034
- office: "官名",
1034
+ office: "官職",
1035
1035
  anonymous: "佚名",
1036
1036
  collective: "集體"
1037
1037
  },
@@ -1068,7 +1068,7 @@ const Tc = gt({
1068
1068
  place: "地名",
1069
1069
  dynasty: "朝代",
1070
1070
  reign: "年号",
1071
- office: "官名",
1071
+ office: "官职",
1072
1072
  anonymous: "佚名",
1073
1073
  collective: "集体"
1074
1074
  },
@@ -1530,7 +1530,7 @@ const Tc = gt({
1530
1530
  place: "地名",
1531
1531
  dynasty: "朝代",
1532
1532
  reign: "年號",
1533
- office: "官名",
1533
+ office: "官職",
1534
1534
  anonymous: "佚名",
1535
1535
  collective: "群體"
1536
1536
  },
@@ -1579,7 +1579,7 @@ const Tc = gt({
1579
1579
  place: "地名",
1580
1580
  dynasty: "朝代",
1581
1581
  reign: "年号",
1582
- office: "官名",
1582
+ office: "官职",
1583
1583
  anonymous: "佚名",
1584
1584
  collective: "群体"
1585
1585
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "book-index-ui",
3
- "version": "0.48.4",
3
+ "version": "0.48.5",
4
4
  "description": "React components for browsing and editing ancient book index metadata",
5
5
  "author": "Li Shaodong",
6
6
  "repository": {