dsh-life-pack 0.3.41 → 0.3.42

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/client.js CHANGED
@@ -153,14 +153,14 @@ window.__ModuleLoader__.load({
153
153
  path: "/api/ilife-manager"
154
154
  };
155
155
  //#endregion
156
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/config.js
156
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/config.js
157
157
  function assertPrefix(value, role) {
158
158
  if (typeof value !== "string" || value.length === 0) throw new Error("[dsh-plugin-update] " + role + " 非法:须为非空字符串(收到 " + JSON.stringify(value) + ")");
159
159
  if (value.includes(".") || value.includes("/") || value.includes("\\") || /\s/.test(value)) throw new Error("[dsh-plugin-update] " + role + " 非法:不得含有点、路径分隔符或空白(收到 " + JSON.stringify(value) + ")");
160
160
  return value;
161
161
  }
162
162
  //#endregion
163
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/redaction.js
163
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/redaction.js
164
164
  const COPY_BUDGET_CHARS = 1500;
165
165
  const REDACTED_PATH = "<路径>";
166
166
  const REDACTED_SECRET = "<脱敏>";
@@ -224,7 +224,7 @@ window.__ModuleLoader__.load({
224
224
  return truncateForCopy(scrubWithoutBudget(flat));
225
225
  }
226
226
  //#endregion
227
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/service.js
227
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/service.js
228
228
  function updateError(code) {
229
229
  return Object.assign(new Error(code), { code });
230
230
  }
@@ -311,7 +311,7 @@ window.__ModuleLoader__.load({
311
311
  return 0;
312
312
  }
313
313
  //#endregion
314
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/changelog.js
314
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/changelog.js
315
315
  const CHANGELOG_NEUTRAL_LINE = "作者未提供更新说明,安装不受影响。";
316
316
  const CHANGELOG_MAX_CHARS = 65536;
317
317
  const CHANGELOG_ALL_CATEGORIES = [
@@ -760,9 +760,14 @@ ${blocks.join("\n")}
760
760
  }
761
761
  }
762
762
  //#endregion
763
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/panel.js
763
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/log-events.js
764
+ const LOG_EVENT_CALL = "host.call";
765
+ const LOG_EVENT_CALL_FAIL = "host.call.fail";
766
+ const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
767
+ //#endregion
768
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/panel.js
764
769
  function normalizePanelTheme(value) {
765
- return value === "d5-paper" || value === "archive" ? "d5-paper" : "default";
770
+ return value === "archive" || value === "d5-paper" ? "archive" : "default";
766
771
  }
767
772
  const BLOCKED_COPY = {
768
773
  "unknown-profile": {
@@ -1193,8 +1198,8 @@ ${blocks.join("\n")}
1193
1198
  ".dsh-upd-banner[data-kind=\"update\"]{border-color:var(--dsh-upd-ok-line);background:var(--dsh-upd-ok-bg)}",
1194
1199
  ".dsh-upd-banner[data-kind=\"busy\"]{border-color:var(--dsh-upd-busy-line);background:var(--dsh-upd-busy-bg)}",
1195
1200
  ".dsh-upd code{font-family:Consolas,Menlo,monospace;font-size:12px;word-break:break-all}",
1196
- ".dsh-upd-manual,.dsh-upd-queue,.dsh-upd-log{margin:8px 0;font-size:13px}",
1197
- ".dsh-upd-changelog-wrap{margin:8px 0;font-size:13px;border-top:1px solid var(--dsh-upd-line,#e5e7eb);padding-top:8px}",
1201
+ ".dsh-upd-manual,.dsh-upd-queue,.dsh-upd-log{margin:4px 0;font-size:13px}",
1202
+ ".dsh-upd-changelog-wrap{margin:4px 0 0;font-size:13px}",
1198
1203
  ".dsh-upd-changelog-title{font-weight:700;margin:0 0 4px}",
1199
1204
  ".dsh-upd-changelog-version{margin:6px 0}",
1200
1205
  ".dsh-upd-changelog-catname{font-weight:600;margin:6px 0 2px}",
@@ -1210,7 +1215,13 @@ ${blocks.join("\n")}
1210
1215
  ".dsh-upd-changelog-more-note{font-size:12px;opacity:.7;margin:2px 0 4px}",
1211
1216
  ".dsh-upd-changelog-neutral{color:inherit;opacity:.8}",
1212
1217
  ".dsh-upd-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;z-index:9999}",
1213
- ".dsh-upd-overlay .dsh-upd{background:var(--dsh-upd-bg,#ffffff);max-height:85vh;overflow:auto}",
1218
+ ".dsh-upd-overlay .dsh-upd{background:var(--dsh-upd-bg,#ffffff);max-height:85vh;display:flex;flex-direction:column;overflow:hidden}",
1219
+ ".dsh-upd-body{min-height:0}",
1220
+ ".dsh-upd-overlay .dsh-upd-body{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--dsh-upd-line,#e5e7eb) transparent}",
1221
+ ".dsh-upd-overlay .dsh-upd-body::-webkit-scrollbar{width:8px}",
1222
+ ".dsh-upd-overlay .dsh-upd-body::-webkit-scrollbar-thumb{background:var(--dsh-upd-line,#e5e7eb);border-radius:4px}",
1223
+ ".dsh-upd-overlay .dsh-upd-body::-webkit-scrollbar-track{background:transparent}",
1224
+ ".dsh-upd-overlay .dsh-upd-body .dsh-upd-chap-head{position:sticky;top:0;z-index:1;background:var(--dsh-upd-bg,#ffffff);padding-top:2px}",
1214
1225
  ".dsh-upd-head{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap}",
1215
1226
  ".dsh-upd-masthead{display:none}",
1216
1227
  ".dsh-upd-name{font-weight:700}",
@@ -1256,10 +1267,16 @@ ${blocks.join("\n")}
1256
1267
  ".dsh-upd button:active:not(:disabled){transform:translateY(1px)}",
1257
1268
  ".dsh-upd button[aria-busy=\"true\"]{cursor:wait;animation:dsh-upd-pulse 1s ease-in-out infinite}",
1258
1269
  "@keyframes dsh-upd-pulse{0%,100%{opacity:1}50%{opacity:.55}}",
1270
+ ".dsh-upd-banner{animation:dsh-upd-fadein .22s ease}",
1271
+ "@keyframes dsh-upd-fadein{from{opacity:.35;transform:translateY(2px)}}",
1272
+ ".dsh-upd-changelog-foldbox{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows .22s ease,opacity .18s ease}",
1273
+ ".dsh-upd-changelog-foldbox-inner{min-height:0;overflow:hidden}",
1274
+ ".dsh-upd-changelog-foldbox[data-open=\"0\"]{grid-template-rows:0fr;opacity:0}",
1259
1275
  ".dsh-upd button[aria-busy=\"true\"]::after{content:\"\";display:inline-block;width:11px;height:11px;margin-left:8px;vertical-align:-1px;",
1260
1276
  "border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:dsh-upd-spin .8s linear infinite}",
1261
1277
  "@keyframes dsh-upd-spin{to{transform:rotate(360deg)}}",
1262
- "@media (prefers-reduced-motion: reduce){.dsh-upd button{transition:none}.dsh-upd button:active:not(:disabled){transform:none}.dsh-upd button[aria-busy=\"true\"]{animation:none}.dsh-upd-skv{animation:none}}",
1278
+ "@media (prefers-reduced-motion: reduce){.dsh-upd button{transition:none}.dsh-upd button:active:not(:disabled){transform:none}.dsh-upd button[aria-busy=\"true\"]{animation:none}.dsh-upd-skv{animation:none}.dsh-upd-banner{animation:none}.dsh-upd-changelog-foldbox{transition:none}}",
1279
+ "@media (forced-colors: active){.dsh-upd-overlay .dsh-upd-body .dsh-upd-chap-head{background:Canvas}}",
1263
1280
  "@media (prefers-color-scheme: dark){.dsh-upd{--dsh-upd-fg:#e5e7eb;--dsh-upd-bg:#111827;--dsh-upd-line:#374151;",
1264
1281
  "--dsh-upd-btn:#1f2937;--dsh-upd-soft:#1f2937;--dsh-upd-primary:#3b82f6;--dsh-upd-focus:#93c5fd;",
1265
1282
  "--dsh-upd-ok-bg:rgba(16,185,129,.14);--dsh-upd-ok-line:#34d399;",
@@ -1269,7 +1286,7 @@ ${blocks.join("\n")}
1269
1286
  ].join("\n");
1270
1287
  const UPDATE_PANEL_D5_CSS = [
1271
1288
  "/* D5 档案卷可选主题:只换颜色/字体/间距;内核 DOM 顺序一字不动,不断复制诊断。 */",
1272
- ".dsh-upd[data-theme=\"d5-paper\"]{--d5-bg:#f7f3ea;--d5-card:#fffdf6;--d5-ink:#1a1a1a;--d5-muted:#6f675a;",
1289
+ ".dsh-upd[data-theme=\"archive\"]{--d5-bg:#f7f3ea;--d5-card:#fffdf6;--d5-ink:#1a1a1a;--d5-muted:#6f675a;",
1273
1290
  "--d5-line:#e3d9c4;--d5-line-strong:#c4b896;--d5-accent:#c8402a;--d5-accent-deep:#9c2e1d;",
1274
1291
  "--d5-ok:#1a7f37;--d5-ok-bg:#e9f4ea;--d5-warn:#8a5a00;--d5-warn-bg:#fbf0d0;",
1275
1292
  "--d5-bad:#b3261e;--d5-bad-bg:#fbe9e5;",
@@ -1279,95 +1296,98 @@ ${blocks.join("\n")}
1279
1296
  "--d5-shadow:0 1px 2px rgba(60,40,20,.08),0 12px 32px rgba(60,40,20,.10);",
1280
1297
  "font-family:var(--d5-sans);color:var(--d5-ink);background:var(--d5-card);",
1281
1298
  "border:1px solid var(--d5-line-strong);border-radius:4px;box-shadow:var(--d5-shadow)}",
1282
- ".dsh-upd[data-theme=\"d5-paper\"] button{border-color:var(--d5-line-strong);background:var(--d5-card);color:var(--d5-ink);border-radius:3px;font-family:var(--d5-sans)}",
1283
- ".dsh-upd[data-theme=\"d5-paper\"] button:hover:not(:disabled){border-color:var(--d5-accent);color:var(--d5-accent)}",
1284
- ".dsh-upd[data-theme=\"d5-paper\"] button[data-primary=\"1\"]{background:var(--d5-accent);border-color:var(--d5-accent);color:#fff}",
1285
- ".dsh-upd[data-theme=\"d5-paper\"] button[data-primary=\"1\"]:hover:not(:disabled){background:var(--d5-accent-deep);color:#fff}",
1286
- ".dsh-upd[data-theme=\"d5-paper\"] button:focus-visible{outline:2px solid var(--d5-accent);outline-offset:2px}",
1287
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner{background:var(--d5-bg);border-color:var(--d5-line-strong)}",
1288
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"update\"]{border-color:var(--d5-ok);background:var(--d5-ok-bg)}",
1289
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"busy\"]{border-color:var(--d5-warn);background:var(--d5-warn-bg)}",
1290
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"restart\"]{border-color:var(--d5-warn);background:var(--d5-warn-bg);font-family:var(--d5-serif);border-width:2px}",
1291
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"failed\"],.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"blocked\"]{border-color:var(--d5-bad);background:var(--d5-bad-bg)}",
1292
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"done\"]{border-color:var(--d5-ok);background:var(--d5-ok-bg)}",
1293
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-changelog-yanked{border-color:var(--d5-warn);background:var(--d5-warn-bg);color:var(--d5-ink)}",
1294
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-breaking-badge{color:var(--d5-accent);border-color:var(--d5-accent)}",
1295
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-changelog-count{color:var(--d5-muted)}",
1296
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-changelog-more-note{color:var(--d5-muted)}",
1297
- ".dsh-upd[data-theme=\"d5-paper\"]{position:relative;padding:22px 26px 20px}",
1298
- ".dsh-upd[data-theme=\"d5-paper\"]::before{content:attr(data-seal);position:absolute;top:20px;right:24px;width:88px;height:88px;",
1299
+ ".dsh-upd[data-theme=\"archive\"] button{border-color:var(--d5-line-strong);background:var(--d5-card);color:var(--d5-ink);border-radius:3px;font-family:var(--d5-sans)}",
1300
+ ".dsh-upd[data-theme=\"archive\"] button:hover:not(:disabled){border-color:var(--d5-accent);color:var(--d5-accent)}",
1301
+ ".dsh-upd[data-theme=\"archive\"] button[data-primary=\"1\"]{background:var(--d5-accent);border-color:var(--d5-accent);color:#fff}",
1302
+ ".dsh-upd[data-theme=\"archive\"] button[data-primary=\"1\"]:hover:not(:disabled){background:var(--d5-accent-deep);color:#fff}",
1303
+ ".dsh-upd[data-theme=\"archive\"] button:focus-visible{outline:2px solid var(--d5-accent);outline-offset:2px}",
1304
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner{background:var(--d5-bg);border-color:var(--d5-line-strong)}",
1305
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"update\"]{border-color:var(--d5-ok);background:var(--d5-ok-bg)}",
1306
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"busy\"]{border-color:var(--d5-warn);background:var(--d5-warn-bg)}",
1307
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"restart\"]{border-color:var(--d5-warn);background:var(--d5-warn-bg);font-family:var(--d5-serif);border-width:2px}",
1308
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"failed\"],.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"blocked\"]{border-color:var(--d5-bad);background:var(--d5-bad-bg)}",
1309
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"done\"]{border-color:var(--d5-ok);background:var(--d5-ok-bg)}",
1310
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-changelog-yanked{border-color:var(--d5-warn);background:var(--d5-warn-bg);color:var(--d5-ink)}",
1311
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-breaking-badge{color:var(--d5-accent);border-color:var(--d5-accent)}",
1312
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-changelog-count{color:var(--d5-muted)}",
1313
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-changelog-more-note{color:var(--d5-muted)}",
1314
+ ".dsh-upd[data-theme=\"archive\"]{position:relative;padding:16px 20px 14px}",
1315
+ ".dsh-upd[data-theme=\"archive\"]::before{content:attr(data-seal);position:absolute;top:20px;right:24px;width:88px;height:88px;",
1299
1316
  "display:flex;align-items:center;justify-content:center;text-align:center;letter-spacing:.18em;text-indent:.18em;line-height:1.35;",
1300
1317
  "border:3px solid currentColor;border-radius:14px;transform:rotate(-7deg);font-family:var(--d5-serif);font-weight:700;font-size:21px;",
1301
1318
  "background:color-mix(in srgb,currentColor 8%,transparent);user-select:none;pointer-events:none;",
1302
1319
  "box-shadow:inset 0 0 0 5px var(--d5-card),inset 0 0 0 6px currentColor,0 2px 6px rgba(0,0,0,.12)}",
1303
- ".dsh-upd[data-theme=\"d5-paper\"][data-seal-tone=\"ink\"]::before{color:var(--d5-muted)}",
1304
- ".dsh-upd[data-theme=\"d5-paper\"][data-seal-tone=\"green\"]::before{color:var(--d5-ok)}",
1305
- ".dsh-upd[data-theme=\"d5-paper\"][data-seal-tone=\"yellow\"]::before{color:var(--d5-warn)}",
1306
- ".dsh-upd[data-theme=\"d5-paper\"][data-seal-tone=\"red\"]::before{color:var(--d5-bad)}",
1307
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-masthead{display:block;padding:0 0 10px;margin:0 0 12px;border-bottom:1px solid var(--d5-line)}",
1308
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-masthead-kicker{display:block;font-size:11px;letter-spacing:.35em;color:var(--d5-muted);margin-bottom:3px}",
1309
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-masthead-title{font-family:var(--d5-serif);font-size:26px;font-weight:700;line-height:1.2}",
1310
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-masthead-title i{color:var(--d5-accent);font-style:normal}",
1311
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-qrow{padding:8px 0}",
1312
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-qk{width:66px;letter-spacing:.18em}",
1313
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-qv{font-family:var(--d5-serif);font-size:16px}",
1314
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-qn{font-family:var(--d5-mono);font-size:11.5px;color:var(--d5-muted)}",
1315
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-qseq{color:var(--d5-muted)}",
1316
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-chap-note{color:var(--d5-muted)}",
1317
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"loading\"]::before,.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"idle\"]::before,",
1318
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"update\"]::before,.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"busy\"]::before,",
1319
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"blocked\"]::before,.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"failed\"]::before,",
1320
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"done\"]::before{content:attr(data-mini);display:inline-flex;align-items:center;justify-content:center;",
1320
+ ".dsh-upd[data-theme=\"archive\"][data-seal-tone=\"ink\"]::before{color:var(--d5-muted)}",
1321
+ ".dsh-upd[data-theme=\"archive\"][data-seal-tone=\"green\"]::before{color:var(--d5-ok)}",
1322
+ ".dsh-upd[data-theme=\"archive\"][data-seal-tone=\"yellow\"]::before{color:var(--d5-warn)}",
1323
+ ".dsh-upd[data-theme=\"archive\"][data-seal-tone=\"red\"]::before{color:var(--d5-bad)}",
1324
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-masthead{display:block;padding:0 0 8px;margin:0 0 8px;border-bottom:1px solid var(--d5-line)}",
1325
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-masthead-kicker{display:block;font-size:11px;letter-spacing:.35em;color:var(--d5-muted);margin-bottom:3px}",
1326
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-masthead-title{font-family:var(--d5-serif);font-size:26px;font-weight:700;line-height:1.2}",
1327
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-masthead-title i{color:var(--d5-accent);font-style:normal}",
1328
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-qrow{padding:6px 0}",
1329
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-qk{width:66px;letter-spacing:.18em}",
1330
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-qv{font-family:var(--d5-serif);font-size:16px}",
1331
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-qn{font-family:var(--d5-mono);font-size:11.5px;color:var(--d5-muted)}",
1332
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-qseq{color:var(--d5-muted)}",
1333
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-chap-note{color:var(--d5-muted)}",
1334
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-body .dsh-upd-chap-head{background:var(--d5-card)}",
1335
+ ".dsh-upd-overlay .dsh-upd[data-theme=\"archive\"] .dsh-upd-body{scrollbar-color:var(--d5-line-strong) transparent}",
1336
+ ".dsh-upd-overlay .dsh-upd[data-theme=\"archive\"] .dsh-upd-body::-webkit-scrollbar-thumb{background:var(--d5-line-strong)}",
1337
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"loading\"]::before,.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"idle\"]::before,",
1338
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"update\"]::before,.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"busy\"]::before,",
1339
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"blocked\"]::before,.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"failed\"]::before,",
1340
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"done\"]::before{content:attr(data-mini);display:inline-flex;align-items:center;justify-content:center;",
1321
1341
  "width:30px;height:30px;margin-right:10px;vertical-align:middle;border:2px solid currentColor;border-radius:7px;",
1322
1342
  "font-family:var(--d5-serif);font-weight:700;font-size:16px;line-height:26px;transform:rotate(-5deg);flex:none;color:var(--d5-muted)}",
1323
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"update\"]::before{color:var(--d5-ok)}",
1324
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"busy\"]::before{color:var(--d5-warn)}",
1325
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"blocked\"]::before,.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"failed\"]::before{color:var(--d5-bad)}",
1326
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"done\"]::before{color:var(--d5-ok)}",
1327
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-log code{font-family:var(--d5-mono);font-size:11px;color:var(--d5-muted);border:1px solid var(--d5-line-strong);border-radius:3px;padding:0 6px;letter-spacing:.06em}",
1328
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-manual code{display:block;background:var(--d5-ink);color:var(--d5-bg);font-family:var(--d5-mono);font-size:12.5px;padding:12px 14px;border-radius:4px;white-space:pre-wrap;word-break:break-all}",
1329
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child{display:flex;gap:10px;align-items:flex-start}",
1330
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child::before{content:\"\";flex:none;width:20px;height:20px;margin-top:3px;",
1343
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"update\"]::before{color:var(--d5-ok)}",
1344
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"busy\"]::before{color:var(--d5-warn)}",
1345
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"blocked\"]::before,.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"failed\"]::before{color:var(--d5-bad)}",
1346
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"done\"]::before{color:var(--d5-ok)}",
1347
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-log code{font-family:var(--d5-mono);font-size:11px;color:var(--d5-muted);border:1px solid var(--d5-line-strong);border-radius:3px;padding:0 6px;letter-spacing:.06em}",
1348
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-manual code{display:block;background:var(--d5-ink);color:var(--d5-bg);font-family:var(--d5-mono);font-size:12.5px;padding:12px 14px;border-radius:4px;white-space:pre-wrap;word-break:break-all}",
1349
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child{display:flex;gap:10px;align-items:flex-start}",
1350
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child::before{content:\"\";flex:none;width:20px;height:20px;margin-top:3px;",
1331
1351
  "background:url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%238a5a00%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z%27/%3E%3Cline x1=%2712%27 y1=%279%27 x2=%2712%27 y2=%2713%27/%3E%3Cline x1=%2712%27 y1=%2717%27 x2=%2712.01%27 y2=%2717%27/%3E%3C/svg%3E\") no-repeat center/20px 20px}",
1332
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner>div:first-child{overflow:hidden;text-overflow:ellipsis}",
1333
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-actions{flex-wrap:wrap}",
1334
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-footer{margin-top:26px;padding-top:16px;border-top:1px solid var(--d5-line)}",
1335
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-foot-note{color:var(--d5-muted)}",
1336
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-head{display:flex;gap:16px;align-items:baseline;flex-wrap:wrap;padding-right:120px}",
1337
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-name{font-family:var(--d5-serif);font-size:22px;font-weight:700}",
1338
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-meta{width:100%;font-size:12.5px;color:var(--d5-muted)}",
1339
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-meta b{color:var(--d5-ink);font-weight:600}",
1340
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-proftag{font-family:var(--d5-mono);font-size:11px;color:var(--d5-muted);border:1px solid var(--d5-line-strong);border-radius:3px;padding:0 6px;margin-left:8px;letter-spacing:.06em}",
1341
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-strip{display:flex;flex-wrap:wrap;margin:10px 0 0;border:1px solid var(--d5-line);border-radius:4px;overflow:hidden;font-size:12.5px}",
1342
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-strip>div{flex:1 1 120px;padding:8px 12px;border-left:1px solid var(--d5-line)}",
1343
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-strip>div:first-child{border-left:0}",
1344
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-strip-k{display:block;font-size:11px;letter-spacing:.2em;color:var(--d5-muted)}",
1345
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-strip-v{font-family:var(--d5-mono);font-size:13px}",
1346
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-chapter{margin-top:26px;padding-top:16px;border-top:1px solid var(--d5-line)}",
1347
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-chap-head{display:flex;align-items:baseline;gap:12px;margin-bottom:10px}",
1348
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-chap-no{font-family:var(--d5-serif);font-style:italic;font-size:15px;color:var(--d5-muted)}",
1349
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-chap-title{font-family:var(--d5-serif);font-size:17px;margin:0;letter-spacing:.1em}",
1350
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-chap-rule{flex:1;border-top:1px solid var(--d5-line);transform:translateY(-4px)}",
1351
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner{border:2px solid var(--d5-line-strong);border-radius:4px;padding:12px 16px;font-size:14.5px;font-family:var(--d5-serif);display:flex;gap:10px;align-items:center;flex-wrap:wrap}",
1352
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner>div:first-child{flex:1 1 auto;min-width:0}",
1353
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner>div:first-child strong{font-family:var(--d5-serif);font-size:27px;font-weight:700;line-height:1.35}",
1354
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-prog{height:8px;background:var(--d5-line);border-radius:4px;overflow:hidden;margin:10px 0 4px}",
1355
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-prog-bar{display:block;height:100%;background:var(--d5-accent);transition:width .3s}",
1356
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-progtxt{font-size:12.5px;color:var(--d5-muted)}",
1357
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-skipline{font-size:13px;margin-top:8px}",
1358
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-tag{display:inline-block;border:1px dashed var(--d5-line-strong);border-radius:3px;padding:1px 8px;margin-right:8px;font-family:var(--d5-mono);font-size:12px}",
1359
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-err{font-size:13px;margin:0 0 6px;color:var(--d5-muted)}",
1360
- "@media (max-width:640px){.dsh-upd[data-theme=\"d5-paper\"]{padding:10px 12px}.dsh-upd[data-theme=\"d5-paper\"]::before{top:12px;right:12px;width:56px;height:56px;font-size:15px;box-shadow:inset 0 0 0 4px var(--d5-card),inset 0 0 0 5px currentColor}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-masthead-title{font-size:19px}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner{padding-right:16px}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner::before{width:24px;height:24px;font-size:14px;line-height:20px;flex:none}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner>div:first-child{white-space:normal}}",
1361
- "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"d5-paper\"]{--d5-bg:#141210;--d5-card:#1e1a15;--d5-ink:#ece5d3;--d5-muted:#a89c83;",
1352
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner>div:first-child{overflow:hidden;text-overflow:ellipsis}",
1353
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-actions{flex-wrap:wrap}",
1354
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-footer{margin-top:14px;padding-top:10px;border-top:1px solid var(--d5-line)}",
1355
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-foot-note{color:var(--d5-muted)}",
1356
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-head{display:flex;gap:16px;align-items:baseline;flex-wrap:wrap;padding-right:120px}",
1357
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-name{font-family:var(--d5-serif);font-size:22px;font-weight:700}",
1358
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-meta{width:100%;font-size:12.5px;color:var(--d5-muted)}",
1359
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-meta b{color:var(--d5-ink);font-weight:600}",
1360
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-proftag{font-family:var(--d5-mono);font-size:11px;color:var(--d5-muted);border:1px solid var(--d5-line-strong);border-radius:3px;padding:0 6px;margin-left:8px;letter-spacing:.06em}",
1361
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-strip{display:flex;flex-wrap:wrap;margin:8px 0 0;border:1px solid var(--d5-line);border-radius:4px;overflow:hidden;font-size:12.5px}",
1362
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-strip>div{flex:1 1 120px;padding:6px 10px;border-left:1px solid var(--d5-line)}",
1363
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-strip>div:first-child{border-left:0}",
1364
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-strip-k{display:block;font-size:11px;letter-spacing:.2em;color:var(--d5-muted)}",
1365
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-strip-v{font-family:var(--d5-mono);font-size:13px}",
1366
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-chapter{margin-top:16px;padding-top:10px;border-top:1px solid var(--d5-line)}",
1367
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-chap-head{display:flex;align-items:baseline;gap:12px;margin-bottom:6px}",
1368
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-chap-no{font-family:var(--d5-serif);font-style:italic;font-size:15px;color:var(--d5-muted)}",
1369
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-chap-title{font-family:var(--d5-serif);font-size:17px;margin:0;letter-spacing:.1em}",
1370
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-chap-rule{flex:1;border-top:1px solid var(--d5-line);transform:translateY(-4px)}",
1371
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner{border:2px solid var(--d5-line-strong);border-radius:4px;padding:10px 12px;font-size:14.5px;font-family:var(--d5-serif);display:flex;gap:10px;align-items:center;flex-wrap:wrap}",
1372
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner>div:first-child{flex:1 1 auto;min-width:0}",
1373
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner>div:first-child strong{font-family:var(--d5-serif);font-size:27px;font-weight:700;line-height:1.25}",
1374
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-prog{height:8px;background:var(--d5-line);border-radius:4px;overflow:hidden;margin:10px 0 4px}",
1375
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-prog-bar{display:block;height:100%;background:var(--d5-accent);transition:width .3s}",
1376
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-progtxt{font-size:12.5px;color:var(--d5-muted)}",
1377
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-skipline{font-size:13px;margin-top:8px}",
1378
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-tag{display:inline-block;border:1px dashed var(--d5-line-strong);border-radius:3px;padding:1px 8px;margin-right:8px;font-family:var(--d5-mono);font-size:12px}",
1379
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-err{font-size:13px;margin:0 0 6px;color:var(--d5-muted)}",
1380
+ "@media (max-width:640px){.dsh-upd[data-theme=\"archive\"]{padding:10px 12px}.dsh-upd[data-theme=\"archive\"]::before{top:12px;right:12px;width:56px;height:56px;font-size:15px;box-shadow:inset 0 0 0 4px var(--d5-card),inset 0 0 0 5px currentColor}.dsh-upd[data-theme=\"archive\"] .dsh-upd-masthead-title{font-size:19px}.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner{padding-right:16px}.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner::before{width:24px;height:24px;font-size:14px;line-height:20px;flex:none}.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner>div:first-child{white-space:normal}}",
1381
+ "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"archive\"]{--d5-bg:#141210;--d5-card:#1e1a15;--d5-ink:#ece5d3;--d5-muted:#a89c83;",
1362
1382
  "--d5-line:#3a3226;--d5-line-strong:#5c4e3b;--d5-accent:#e0684e;--d5-accent-deep:#f0866b;",
1363
1383
  "--d5-ok:#8fd6a4;--d5-ok-bg:rgba(80,180,120,.12);--d5-warn:#e8c15a;--d5-warn-bg:rgba(232,193,90,.12);",
1364
1384
  "--d5-bad:#ef8a7d;--d5-bad-bg:rgba(239,138,125,.12);--d5-shadow:0 1px 2px rgba(0,0,0,.4),0 12px 32px rgba(0,0,0,.45)}}",
1365
- "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"d5-paper\"] button[data-primary=\"1\"]{color:#141210}.dsh-upd[data-theme=\"d5-paper\"] button:focus-visible{outline-color:var(--d5-accent-deep)}}",
1366
- "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23e8c15a%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z%27/%3E%3Cline x1=%2712%27 y1=%279%27 x2=%2712%27 y2=%2713%27/%3E%3Cline x1=%2712%27 y1=%2717%27 x2=%2712.01%27 y2=%2717%27/%3E%3C/svg%3E\")}}",
1367
- "@media (forced-colors: active){.dsh-upd[data-theme=\"d5-paper\"]{box-shadow:none}.dsh-upd[data-theme=\"d5-paper\"]::before{background:none;box-shadow:none;border-color:CanvasText;color:CanvasText}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner{border:1px solid CanvasText}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner::before{border-color:CanvasText;color:CanvasText;background:Canvas}.dsh-upd[data-theme=\"d5-paper\"] button{border:1px solid ButtonText}.dsh-upd[data-theme=\"d5-paper\"] button[data-primary=\"1\"]{background:ButtonFace;color:ButtonText;border-color:ButtonText}.dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child::before{background-image:none;content:\"⚠\"}}",
1368
- "@media (prefers-reduced-motion: reduce){.dsh-upd[data-theme=\"d5-paper\"] *{transition:none !important;animation:none !important}}"
1385
+ "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"archive\"] button[data-primary=\"1\"]{color:#141210}.dsh-upd[data-theme=\"archive\"] button:focus-visible{outline-color:var(--d5-accent-deep)}}",
1386
+ "@media (prefers-color-scheme: dark){.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child::before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23e8c15a%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z%27/%3E%3Cline x1=%2712%27 y1=%279%27 x2=%2712%27 y2=%2713%27/%3E%3Cline x1=%2712%27 y1=%2717%27 x2=%2712.01%27 y2=%2717%27/%3E%3C/svg%3E\")}}",
1387
+ "@media (forced-colors: active){.dsh-upd[data-theme=\"archive\"]{box-shadow:none}.dsh-upd[data-theme=\"archive\"]::before{background:none;box-shadow:none;border-color:CanvasText;color:CanvasText}.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner{border:1px solid CanvasText}.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner::before{border-color:CanvasText;color:CanvasText;background:Canvas}.dsh-upd[data-theme=\"archive\"] button{border:1px solid ButtonText}.dsh-upd[data-theme=\"archive\"] button[data-primary=\"1\"]{background:ButtonFace;color:ButtonText;border-color:ButtonText}.dsh-upd[data-theme=\"archive\"] .dsh-upd-banner[data-kind=\"restart\"]>div:first-child::before{background-image:none;content:\"⚠\"}}",
1388
+ "@media (prefers-reduced-motion: reduce){.dsh-upd[data-theme=\"archive\"] *{transition:none !important;animation:none !important}}"
1369
1389
  ].join("\n");
1370
- function escapeHtml$2(text) {
1390
+ function escapeHtml$3(text) {
1371
1391
  return String(text).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1372
1392
  }
1373
1393
  const CHAPTER_TITLES = [
@@ -1377,18 +1397,27 @@ ${blocks.join("\n")}
1377
1397
  "错误信息",
1378
1398
  "手工命令"
1379
1399
  ];
1400
+ function formatLatchTime(atMs) {
1401
+ if (typeof atMs !== "number" || !Number.isFinite(atMs) || atMs <= 0) return null;
1402
+ try {
1403
+ const s = new Date(atMs).toLocaleTimeString("zh-CN", { hour12: false });
1404
+ return s ? s : null;
1405
+ } catch {
1406
+ return null;
1407
+ }
1408
+ }
1380
1409
  function chapterOf(index, inner, note = "") {
1381
1410
  const no = String(index).padStart(2, "0");
1382
1411
  const title = CHAPTER_TITLES[index - 1];
1383
- return `<section class="dsh-upd-chapter" data-chapter="${no}"><div class="dsh-upd-chap-head"><span class="dsh-upd-chap-no">${no}</span><h3 class="dsh-upd-chap-title">${escapeHtml$2(title)}</h3><span class="dsh-upd-chap-rule"></span>${note}</div>${inner}</section>`;
1412
+ return `<section class="dsh-upd-chapter" data-chapter="${no}"><div class="dsh-upd-chap-head"><span class="dsh-upd-chap-no">${no}</span><h3 class="dsh-upd-chap-title">${escapeHtml$3(title)}</h3><span class="dsh-upd-chap-rule"></span>${note}</div>${inner}</section>`;
1384
1413
  }
1385
1414
  function skeletonStrip(loading) {
1386
1415
  if (!loading) return "";
1387
- const cell = (k) => `<div><span class="dsh-upd-strip-k">${escapeHtml$2(k)}</span><span class="dsh-upd-strip-v dsh-upd-skv" aria-hidden="true">\u2026</span></div>`;
1416
+ const cell = (k) => `<div><span class="dsh-upd-strip-k">${escapeHtml$3(k)}</span><span class="dsh-upd-strip-v dsh-upd-skv" aria-hidden="true">\u2026</span></div>`;
1388
1417
  return `<div class="dsh-upd-strip" aria-hidden="true">` + cell("运行") + cell("磁盘") + cell("远端") + `</div>`;
1389
1418
  }
1390
1419
  function versionStrip(snapshot) {
1391
- const cell = (k, v) => `<div><span class="dsh-upd-strip-k">${escapeHtml$2(k)}</span><span class="dsh-upd-strip-v">${escapeHtml$2(v ?? "未知")}</span></div>`;
1420
+ const cell = (k, v) => `<div><span class="dsh-upd-strip-k">${escapeHtml$3(k)}</span><span class="dsh-upd-strip-v">${escapeHtml$3(v ?? "未知")}</span></div>`;
1392
1421
  if (!snapshot) return "";
1393
1422
  return `<div class="dsh-upd-strip">` + cell("运行", snapshot.runningVersion) + cell("磁盘", snapshot.installedVersion) + cell("远端", snapshot.latestVersion) + `</div>`;
1394
1423
  }
@@ -1398,7 +1427,7 @@ ${blocks.join("\n")}
1398
1427
  const state = String(job.state);
1399
1428
  if (state !== "installing" && state !== "verifying") return "";
1400
1429
  const width = state === "installing" ? 60 : 90;
1401
- return `<div class="dsh-upd-prog" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${width}"><i class="dsh-upd-prog-bar" style="width:${width}%"></i></div><div class="dsh-upd-progtxt">${escapeHtml$2(state === "installing" ? "正在安装新版…" : "正在校验安装结果…")}</div>`;
1430
+ return `<div class="dsh-upd-prog" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${width}"><i class="dsh-upd-prog-bar" style="width:${width}%"></i></div><div class="dsh-upd-progtxt">${escapeHtml$3(state === "installing" ? "正在安装新版…" : "正在校验安装结果…")}</div>`;
1402
1431
  }
1403
1432
  function renderUpdatePanelKernel(input, view) {
1404
1433
  const { snapshot, manual, queue, mode, showOthers, pluginId, copyNotice } = input;
@@ -1408,10 +1437,10 @@ ${blocks.join("\n")}
1408
1437
  const seal = view.seal;
1409
1438
  const parts = [];
1410
1439
  parts.push("<div class=\"dsh-upd-masthead\"><span class=\"dsh-upd-masthead-kicker\">插件更新</span><span class=\"dsh-upd-masthead-title\">更新档案 <i>卷</i></span></div>");
1411
- parts.push(`<div class="dsh-upd-head"><span class="dsh-upd-name">${escapeHtml$2(pluginId)}</span><span class="dsh-upd-meta">\u4F7F\u7528\u8303\u56F4 <b>${escapeHtml$2(profileName ?? "未知")}</b><span class="dsh-upd-proftag">profile</span></span></div>`);
1412
- parts.push(`<div class="dsh-upd-banner" data-kind="${b.kind}" data-mini="${escapeHtml$2(seal.mini)}" role="status" aria-live="polite">`);
1413
- parts.push(`<div><strong>${escapeHtml$2(b.title)}</strong></div>`);
1414
- if (b.action) parts.push(`<div>${escapeHtml$2(b.action)}</div>`);
1440
+ parts.push(`<div class="dsh-upd-head"><span class="dsh-upd-name">${escapeHtml$3(pluginId)}</span><span class="dsh-upd-meta">\u4F7F\u7528\u8303\u56F4 <b>${escapeHtml$3(profileName ?? "未知")}</b><span class="dsh-upd-proftag">profile</span></span></div>`);
1441
+ parts.push(`<div class="dsh-upd-banner" data-kind="${b.kind}" data-mini="${escapeHtml$3(seal.mini)}" role="status" aria-live="polite">`);
1442
+ parts.push(`<div><strong>${escapeHtml$3(b.title)}</strong></div>`);
1443
+ if (b.action) parts.push(`<div>${escapeHtml$3(b.action)}</div>`);
1415
1444
  parts.push("</div>");
1416
1445
  parts.push(snapshot ? versionStrip(snapshot) : skeletonStrip(view.banner.kind === "loading"));
1417
1446
  const showActions = input.actions !== "none";
@@ -1421,19 +1450,22 @@ ${blocks.join("\n")}
1421
1450
  const checkBusy = busyAct === "check";
1422
1451
  const installBusy = busyAct === "install";
1423
1452
  actions.push("<div class=\"dsh-upd-actions\">");
1424
- actions.push((checkBusy ? `<button type="button" data-action="check" disabled aria-busy="true" title="\u6B63\u5728\u5411\u5B98\u65B9\u6E90\u67E5\u8BE2\uFF0C\u8BF7\u7A0D\u5019">\u6B63\u5728\u67E5\u65B0\u7248\u2026</button>` : `<button type="button" data-action="check" title="\u91CD\u65B0\u5411\u5B98\u65B9\u6E90\u67E5\u4E00\u6B21\u65B0\u7248\uFF08\u53EA\u8BFB\uFF0C\u4E0D\u5B89\u88C5\uFF09">\u67E5\u65B0\u7248</button>`) + (installBusy ? `<button type="button" data-action="install" data-primary="1" disabled aria-busy="true" title="\u6B63\u5728\u5B89\u88C5\uFF0C\u8BF7\u7A0D\u5019">\u6B63\u5728\u5B89\u88C5\u2026</button>` : `<button type="button" data-action="install" data-primary="1" title="\u7528\u7CBE\u786E\u7248\u672C\u5B89\u88C5\uFF1B\u540C\u4E00\u4F7F\u7528\u8303\u56F4\u540C\u65F6\u53EA\u88C5\u4E00\u4E2A"${view.installEnabled ? "" : " disabled"}>${escapeHtml$2(view.installLabel)}</button>`));
1453
+ actions.push((checkBusy ? `<button type="button" data-action="check" disabled aria-busy="true" title="\u6B63\u5728\u5411\u5B98\u65B9\u6E90\u67E5\u8BE2\uFF0C\u8BF7\u7A0D\u5019">\u6B63\u5728\u67E5\u65B0\u7248\u2026</button>` : `<button type="button" data-action="check" title="\u91CD\u65B0\u5411\u5B98\u65B9\u6E90\u67E5\u4E00\u6B21\u65B0\u7248\uFF08\u53EA\u8BFB\uFF0C\u4E0D\u5B89\u88C5\uFF09">\u67E5\u65B0\u7248</button>`) + (installBusy ? `<button type="button" data-action="install" data-primary="1" disabled aria-busy="true" title="\u6B63\u5728\u5B89\u88C5\uFF0C\u8BF7\u7A0D\u5019">\u6B63\u5728\u5B89\u88C5\u2026</button>` : `<button type="button" data-action="install" data-primary="1" title="\u7528\u7CBE\u786E\u7248\u672C\u5B89\u88C5\uFF1B\u540C\u4E00\u4F7F\u7528\u8303\u56F4\u540C\u65F6\u53EA\u88C5\u4E00\u4E2A"${view.installEnabled ? "" : " disabled"}>${escapeHtml$3(view.installLabel)}</button>`));
1425
1454
  if (snapshot?.latestVersion && !view.skippedLatest && view.banner.kind === "update") actions.push(`<button type="button" data-action="skip" title="\u8BE5\u7248\u672C\u4E0D\u518D\u63D0\u9192\uFF1B\u6709\u66F4\u65B0\u7684\u65B0\u7248\u672C\u7167\u5E38\u63D0\u9192">\u8DF3\u8FC7\u8BE5\u7248\u672C</button>`);
1426
- if (view.showReset && snapshot?.latestVersion) actions.push(`<button type="button" data-action="reset-skip" title="\u64A4\u9500\u8DF3\u8FC7\uFF0C\u8BE5\u7248\u672C\u91CD\u65B0\u63D0\u9192">\u6062\u590D\uFF08${escapeHtml$2(snapshot.latestVersion)}\uFF09</button>`);
1455
+ if (view.showReset && snapshot?.latestVersion) actions.push(`<button type="button" data-action="reset-skip" title="\u64A4\u9500\u8DF3\u8FC7\uFF0C\u8BE5\u7248\u672C\u91CD\u65B0\u63D0\u9192">\u6062\u590D\uFF08${escapeHtml$3(snapshot.latestVersion)}\uFF09</button>`);
1427
1456
  if (view.showManual && manual) actions.push(`<button type="button" data-action="copy-manual" title="\u590D\u5236\u624B\u5DE5\u547D\u4EE4\uFF0C\u7C98\u5230\u7EC8\u7AEF\u6574\u884C\u6267\u884C">\u590D\u5236\u624B\u5DE5\u547D\u4EE4</button>`);
1428
1457
  if (b.kind === "restart") actions.push(`<button type="button" data-action="restart-hint" data-primary="1" title="\u5BBF\u4E3B\u6CA1\u6709\u81EA\u91CD\u542F\u7535\u8BDD\uFF1A\u8BF7\u624B\u52A8\u91CD\u542F\u5BBF\u4E3B">\u91CD\u542F\u5BBF\u4E3B</button>`);
1458
+ if (b.kind === "failed") actions.push(`<button type="button" data-action="dismiss-failure" title="\u786E\u8BA4\u5DF2\u77E5\u6653\u8BE5\u5931\u8D25\uFF1A\u56DE\u5230\u53EF\u88C5\u9875\uFF0C\u4E0B\u6B21\u67E5/\u88C5\u5C06\u91CD\u65B0\u8BC4\u4F30">\u77E5\u9053\u4E86</button>`);
1429
1459
  if (snapshot) actions.push(`<button type="button" data-action="copy-diag" title="\u590D\u5236\u5DF2\u8131\u654F\u8BCA\u65AD\uFF0C\u76F4\u63A5\u7C98\u7ED9\u63D2\u4EF6\u4F5C\u8005">\u590D\u5236\u8BCA\u65AD</button>`);
1430
1460
  actions.push("</div>");
1431
1461
  }
1432
1462
  actions.push(progressBar(snapshot));
1433
- if (view.skippedLatest && snapshot?.latestVersion) actions.push(`<div class="dsh-upd-skipline"><span class="dsh-upd-tag">\u5DF2\u8DF3\u8FC7 ${escapeHtml$2(snapshot.latestVersion)}</span>\u70B9\u300C\u6062\u590D\u300D\u53EF\u64A4\u9500\uFF0C\u4E4B\u540E\u8FD9\u4E00\u7248\u8FD8\u4F1A\u518D\u63D0\u9192\u3002</div>`);
1434
- parts.push(chapterOf(1, actions.join("")));
1463
+ if (view.skippedLatest && snapshot?.latestVersion) actions.push(`<div class="dsh-upd-skipline"><span class="dsh-upd-tag">\u5DF2\u8DF3\u8FC7 ${escapeHtml$3(snapshot.latestVersion)}</span>\u70B9\u300C\u6062\u590D\u300D\u53EF\u64A4\u9500\uFF0C\u4E4B\u540E\u8FD9\u4E00\u7248\u8FD8\u4F1A\u518D\u63D0\u9192\u3002</div>`);
1464
+ const chapters = [];
1465
+ chapters.push(chapterOf(1, actions.join("")));
1435
1466
  {
1436
1467
  let inner = "";
1468
+ let hasLog = false;
1437
1469
  if (snapshot && snapshot.latestVersion) try {
1438
1470
  const ranged = changelogForUpdate(parseChangelog(typeof changelogMarkdown === "string" ? changelogMarkdown : ""), snapshot.runningVersion, snapshot.latestVersion, snapshot.installedVersion);
1439
1471
  const changelogHTML = renderChangelogHTML(ranged);
@@ -1453,14 +1485,18 @@ ${blocks.join("\n")}
1453
1485
  } catch {
1454
1486
  yankedBanner = "";
1455
1487
  }
1456
- inner = `<div class="dsh-upd-changelog-wrap"><div>${escapeHtml$2(rangeTitle)}</div>${yankedBanner}
1488
+ const logOpen = input.changelogCollapsed !== true;
1489
+ inner = `<div class="dsh-upd-changelog-wrap"><div>${escapeHtml$3(rangeTitle)}</div><div class="dsh-upd-changelog-foldbox" data-open="${logOpen ? "1" : "0"}"><div class="dsh-upd-changelog-foldbox-inner">${yankedBanner}
1457
1490
  ${changelogHTML}
1458
- </div>`;
1491
+ </div></div></div>`;
1492
+ hasLog = Array.isArray(ranged) && ranged.length > 0;
1459
1493
  } catch {
1460
1494
  inner = "";
1461
1495
  }
1462
- if (!inner) inner = `<div class="dsh-upd-changelog-wrap"><div class="dsh-upd-changelog-neutral">${escapeHtml$2(snapshot && snapshot.latestVersion ? "日志读不出来,安装不受影响。" : "还没查到新版;查到后再显示日志。")}</div></div>`;
1463
- parts.push(chapterOf(2, inner));
1496
+ if (!inner) inner = `<div class="dsh-upd-changelog-wrap"><div class="dsh-upd-changelog-neutral">${escapeHtml$3(snapshot && snapshot.latestVersion ? "日志读不出来,安装不受影响。" : "还没查到新版;查到后再显示日志。")}</div></div>`;
1497
+ const logCollapsed = input.changelogCollapsed === true;
1498
+ const logNote = showActions && hasLog ? `<span class="dsh-upd-chap-note"><button type="button" data-action="toggle-changelog" title="\u5C55\u5F00\u6216\u6536\u8D77\u66F4\u65B0\u65E5\u5FD7">${logCollapsed ? "展开更新日志" : "收起更新日志"}</button></span>` : "";
1499
+ chapters.push(chapterOf(2, inner, logNote));
1464
1500
  }
1465
1501
  if (!!queue && (queue.busy || queue.waiting.length > 0) && queue) {
1466
1502
  const busy = queue.busy;
@@ -1474,34 +1510,53 @@ ${changelogHTML}
1474
1510
  const pos = typeof queue.position === "number" ? queue.position : null;
1475
1511
  const posText = pos === null ? "未排队" : `\u7B2C ${pos} \u4F4D`;
1476
1512
  const posNote = pos === null ? "" : pos === 1 ? "下一个就是你" : `\u524D\u65B9 ${pos - 1} \u4E2A`;
1477
- const rows = [`<div class="dsh-upd-qrow"><span class="dsh-upd-qdot" data-tone="${busy ? "busy" : "idle"}"></span><span class="dsh-upd-qk">\u6B63\u5728\u5B89\u88C5</span><span class="dsh-upd-qv">${escapeHtml$2(ownerShown + ownerVer)}</span><span class="dsh-upd-qn">${busy ? "装完自动轮到你" : "同一使用范围一次只装一个"}</span></div>`, `<div class="dsh-upd-qrow"><span class="dsh-upd-qdot" data-tone="you"></span><span class="dsh-upd-qk">\u4F60\u7684\u987A\u4F4D</span><span class="dsh-upd-qv">${escapeHtml$2(posText)}</span><span class="dsh-upd-qn">${escapeHtml$2(posNote)}</span></div>`];
1513
+ const rows = [`<div class="dsh-upd-qrow"><span class="dsh-upd-qdot" data-tone="${busy ? "busy" : "idle"}"></span><span class="dsh-upd-qk">\u6B63\u5728\u5B89\u88C5</span><span class="dsh-upd-qv">${escapeHtml$3(ownerShown + ownerVer)}</span><span class="dsh-upd-qn">${busy ? "装完自动轮到你" : "同一使用范围一次只装一个"}</span></div>`, `<div class="dsh-upd-qrow"><span class="dsh-upd-qdot" data-tone="you"></span><span class="dsh-upd-qk">\u4F60\u7684\u987A\u4F4D</span><span class="dsh-upd-qv">${escapeHtml$3(posText)}</span><span class="dsh-upd-qn">${escapeHtml$3(posNote)}</span></div>`];
1478
1514
  if (reveal && queue.waiting.length > 0) {
1479
1515
  const seq = queue.waiting.map((e) => `${e.pluginId}${e.targetVersion ? `@${e.targetVersion}` : ""}`).join(" → ");
1480
- rows.push(`<div class="dsh-upd-qrow"><span class="dsh-upd-qdot"></span><span class="dsh-upd-qk">\u6392\u961F\u987A\u5E8F</span><span class="dsh-upd-qseq">${escapeHtml$2(seq)}</span></div>`);
1516
+ rows.push(`<div class="dsh-upd-qrow"><span class="dsh-upd-qdot"></span><span class="dsh-upd-qk">\u6392\u961F\u987A\u5E8F</span><span class="dsh-upd-qseq">${escapeHtml$3(seq)}</span></div>`);
1481
1517
  }
1482
1518
  const note = showActions ? `<span class="dsh-upd-chap-note"><button type="button" data-action="toggle-queue">${reveal ? "隐藏他人明细" : "显示其他插件"}</button></span>` : "";
1483
- parts.push(chapterOf(3, `<div class="dsh-upd-queue">${rows.join("")}</div>`, note));
1484
- } else parts.push(chapterOf(3, `<div class="dsh-upd-queue"><div class="dsh-upd-changelog-neutral">${escapeHtml$2(view.queueNote ?? "当前没有排队任务,同一使用范围一次只装一个。")}</div></div>`));
1519
+ chapters.push(chapterOf(3, `<div class="dsh-upd-queue">${rows.join("")}</div>`, note));
1520
+ } else chapters.push(chapterOf(3, `<div class="dsh-upd-queue"><div class="dsh-upd-changelog-neutral">${escapeHtml$3(view.queueNote ?? "当前没有排队任务,同一使用范围一次只装一个。")}</div></div>`));
1485
1521
  {
1486
1522
  const errLines = [];
1487
- if (b.kind === "failed" || b.kind === "blocked") errLines.push(`<div class="dsh-upd-err">\u7A33\u5B9A\u7801 <code>${escapeHtml$2(String(b.kind === "blocked" ? snapshot?.blockedReason ?? b.kind : "install-failed"))}</code>\uFF1A\u4E0A\u4E00\u6761\u4E2D\u6587\u8BF4\u660E\u5C31\u662F\u8981\u7528\u6237\u505A\u7684\u4E8B\uFF1B\u8981\u5F80\u4E0A\u6E38\u62A5\uFF0C\u7528\u300C\u590D\u5236\u8BCA\u65AD\u300D\u6574\u6BB5\u7C98\uFF08\u5DF2\u8131\u654F\uFF09\u3002</div>`);
1488
- errLines.push(`<div class="dsh-upd-log">\u6DF1\u6316\u770B\u65E5\u5FD7\uFF1A\u6309\u63D2\u4EF6\u6807\u8BC6 <code>${escapeHtml$2(pluginId)}</code> \u8FC7\u6EE4 <code>host.call</code>\u3001<code>host.call.fail</code>\u3001<code>update.install.exec</code> \u4E09\u4E2A\u4E8B\u4EF6\u3002</div>`);
1489
- if (copyNotice) errLines.push(`<div class="dsh-upd-copy" role="status">${escapeHtml$2(copyNotice)}</div>`);
1490
- parts.push(chapterOf(4, errLines.join("")));
1523
+ const failedNow = b.kind === "failed" || b.kind === "blocked";
1524
+ const failRef = input.failure;
1525
+ if (failedNow) {
1526
+ const shownCode = b.kind === "blocked" ? snapshot?.blockedReason ?? b.kind : typeof input.lastError === "string" && input.lastError.trim() ? input.lastError : "install-failed";
1527
+ errLines.push(`<div class="dsh-upd-err">\u7A33\u5B9A\u7801 <code>${escapeHtml$3(String(shownCode))}</code>\uFF1A\u4E0A\u4E00\u6761\u4E2D\u6587\u8BF4\u660E\u5C31\u662F\u8981\u7528\u6237\u505A\u7684\u4E8B\uFF1B\u8981\u5F80\u4E0A\u6E38\u62A5\uFF0C\u7528\u300C\u590D\u5236\u8BCA\u65AD\u300D\u6574\u6BB5\u7C98\uFF08\u5DF2\u8131\u654F\uFF09\u3002</div>`);
1528
+ if (b.kind === "failed" && failRef) {
1529
+ const keys = [];
1530
+ if (typeof failRef.requestId === "string" && failRef.requestId) keys.push(`\u8BF7\u6C42 <code>${escapeHtml$3(failRef.requestId)}</code>`);
1531
+ if (typeof failRef.checkId === "string" && failRef.checkId) keys.push(`\u68C0\u67E5 <code>${escapeHtml$3(failRef.checkId)}</code>`);
1532
+ const at = formatLatchTime(failRef.atMs);
1533
+ if (at) keys.push(`\u5931\u8D25\u4E8E ${escapeHtml$3(at)}`);
1534
+ if (keys.length > 0) errLines.push(`<div class="dsh-upd-err">\u672C\u6B21\u67E5\u8BE2\u952E\uFF1A${keys.join(" · ")}\uFF08\u62FF\u7740\u5B83\u4EEC\u53BB\u65E5\u5FD7\u91CC\u5BF9\uFF09\u3002</div>`);
1535
+ if (!failRef.volatile) errLines.push(`<div class="dsh-upd-err">\u8BC1\u636E\u5DF2\u51BB\u7ED3\uFF1A\u590D\u5236\u8BCA\u65AD\u91CC\u7684\u7801\u3001\u7248\u672C\u3001\u7F16\u53F7\u90FD\u53D6\u81EA\u5931\u8D25\u65F6\u523B\uFF0C\u4E0D\u968F\u8F6E\u8BE2\u5237\u65B0\uFF1B\u4E0B\u4E00\u6B21\u67E5\u65B0\u7248\u6216\u5B89\u88C5\u4F1A\u66F4\u65B0\u5B83\u3002</div>`);
1536
+ else errLines.push(`<div class="dsh-upd-err">\u8BFB\u6570\u77AC\u6001\u5931\u8D25\uFF1A\u4E0B\u4E00\u6B21\u6210\u529F\u8BFB\u6570\u4F1A\u81EA\u52A8\u89E3\u9664\uFF1B\u4E00\u76F4\u51FA\u73B0\u518D\u6309\u7A33\u5B9A\u7801\u6392\u67E5\u3002</div>`);
1537
+ }
1538
+ } else errLines.push(`<div class="dsh-upd-changelog-neutral">\u6682\u65E0\u5931\u8D25\uFF1A\u6B64\u65F6\u590D\u5236\u8BCA\u65AD\u7ED9\u51FA\u7684\u662F\u5F53\u524D\u72B6\u6001\u5FEB\u7167\u3002</div>`);
1539
+ if (input.showLogHint !== false) {
1540
+ errLines.push(`<div class="dsh-upd-log">\u6DF1\u6316\u770B\u65E5\u5FD7\uFF1A\u6309\u63D2\u4EF6\u6807\u8BC6 <code>${escapeHtml$3(pluginId)}</code> \u8FC7\u6EE4 <code>${LOG_EVENT_CALL}</code>\u3001<code>${LOG_EVENT_CALL_FAIL}</code>\u3001<code>${LOG_EVENT_INSTALL_EXEC}</code> \u4E09\u4E2A\u4E8B\u4EF6\u3002</div>`);
1541
+ if (b.kind === "failed" && failRef && (failRef.requestId || failRef.checkId)) errLines.push(`<div class="dsh-upd-log">\u51ED\u4E0A\u9762\u7684\u8BF7\u6C42\uFF0F\u68C0\u67E5\u7F16\u53F7\u5728 <code>${LOG_EVENT_CALL_FAIL}</code> \u91CC\u5BF9\u4E0A\uFF1B\u57FA\u7EBF\u8017\u65F6\u770B <code>${LOG_EVENT_CALL}</code>\uFF0C\u6267\u884C\u7ED3\u679C\u770B <code>${LOG_EVENT_INSTALL_EXEC}</code>\u3002</div>`);
1542
+ }
1543
+ if (copyNotice) errLines.push(`<div class="dsh-upd-copy" role="status">${escapeHtml$3(copyNotice)}</div>`);
1544
+ chapters.push(chapterOf(4, errLines.join("")));
1491
1545
  }
1492
- parts.push(chapterOf(5, view.showManual && manual ? `<div class="dsh-upd-manual"><div>\u624B\u5DE5\u515C\u5E95\u547D\u4EE4\uFF08\u590D\u5236\u6574\u884C\u6267\u884C\uFF09\uFF1A</div><code>${escapeHtml$2(manual)}</code></div>` : `<div class="dsh-upd-manual"><div class="dsh-upd-changelog-neutral">\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u7684\u624B\u5DE5\u547D\u4EE4\uFF08\u8BA4\u4E0D\u51FA\u4F7F\u7528\u8303\u56F4\u6216\u5C5E\u6E90\u7801\u5B89\u88C5\u65F6\u4E0D\u7ED9\uFF09\u3002</div></div>`));
1493
- if (showActions && mode === "dialog") parts.push(`<div class="dsh-upd-footer"><span class="dsh-upd-foot-note">\u5B89\u88C5\u5728\u5BBF\u4E3B\u4FA7\u7EE7\u7EED\u8DD1\uFF0C\u91CD\u5F00\u6062\u590D\u663E\u793A</span><button type="button" data-action="close-view" title="\u5173\u95ED\u9762\u677F\uFF08\u5B89\u88C5\u5728\u5BBF\u4E3B\u4FA7\u7EE7\u7EED\u8DD1\uFF0C\u53EF\u91CD\u5F00\u6062\u590D\u663E\u793A\uFF09">\u5173\u95ED</button></div>`);
1546
+ chapters.push(chapterOf(5, view.showManual && manual ? `<div class="dsh-upd-manual"><div>\u624B\u5DE5\u515C\u5E95\u547D\u4EE4\uFF08\u590D\u5236\u6574\u884C\u6267\u884C\uFF09\uFF1A</div><code>${escapeHtml$3(manual)}</code></div>` : `<div class="dsh-upd-manual"><div class="dsh-upd-changelog-neutral">\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u7684\u624B\u5DE5\u547D\u4EE4\uFF08\u8BA4\u4E0D\u51FA\u4F7F\u7528\u8303\u56F4\u6216\u5C5E\u6E90\u7801\u5B89\u88C5\u65F6\u4E0D\u7ED9\uFF09\u3002</div></div>`));
1547
+ parts.push("<div class=\"dsh-upd-body\">" + chapters.join("\n") + "</div>");
1548
+ if (showActions && mode === "dialog") parts.push(`<div class="dsh-upd-footer"><span class="dsh-upd-foot-note">\u5173\u95ED\u4E0D\u5F71\u54CD\u66F4\u65B0\uFF0C\u53EF\u968F\u65F6\u56DE\u6765\u67E5\u770B</span><button type="button" data-action="close-view" title="\u5173\u95ED\u7A97\u53E3\uFF0C\u66F4\u65B0\u4E0D\u53D7\u5F71\u54CD">\u5173\u95ED</button></div>`);
1494
1549
  return parts.join("\n");
1495
1550
  }
1496
1551
  function renderUpdatePanelHTML(input) {
1497
1552
  const view = panelViewModel(input);
1498
1553
  const kernel = renderUpdatePanelKernel(input, view);
1499
- const d5 = normalizePanelTheme(input.theme) === "d5-paper";
1500
- const attr = d5 ? " data-theme=\"d5-paper\"" : "";
1501
- const sealAttr = ` data-seal="${escapeHtml$2(view.seal.text)}" data-seal-tone="${view.seal.tone}"`;
1502
- const body = input.mode === "dialog" ? `<div class="dsh-upd-overlay" data-mode="dialog"><div class="dsh-upd" data-mode="dialog" data-plugin="${escapeHtml$2(input.pluginId)}"${sealAttr}${attr}>
1554
+ const d5 = normalizePanelTheme(input.theme) === "archive";
1555
+ const attr = d5 ? " data-theme=\"archive\"" : "";
1556
+ const sealAttr = ` data-seal="${escapeHtml$3(view.seal.text)}" data-seal-tone="${view.seal.tone}"`;
1557
+ const body = input.mode === "dialog" ? `<div class="dsh-upd-overlay" data-mode="dialog"><div class="dsh-upd" data-mode="dialog" data-plugin="${escapeHtml$3(input.pluginId)}"${sealAttr}${attr}>
1503
1558
  ${kernel}
1504
- </div></div>` : `<div class="dsh-upd" data-mode="embedded" data-plugin="${escapeHtml$2(input.pluginId)}"${sealAttr}${attr}>
1559
+ </div></div>` : `<div class="dsh-upd" data-mode="embedded" data-plugin="${escapeHtml$3(input.pluginId)}"${sealAttr}${attr}>
1505
1560
  ${kernel}
1506
1561
  </div>`;
1507
1562
  return `<style>${d5 ? `${UPDATE_PANEL_CSS}
@@ -1509,7 +1564,225 @@ ${UPDATE_PANEL_D5_CSS}` : UPDATE_PANEL_CSS}</style>
1509
1564
  ${body}`;
1510
1565
  }
1511
1566
  //#endregion
1512
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/entry.js
1567
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/lang.js
1568
+ function normalizeLangTag(tag) {
1569
+ if (typeof tag !== "string") return "zh";
1570
+ const s = tag.trim().toLowerCase().replace(/_/g, "-");
1571
+ if (!s) return "zh";
1572
+ if (s === "zh" || s.startsWith("zh-")) return "zh";
1573
+ if (s === "en" || s.startsWith("en-")) return "en";
1574
+ if (/^[a-z]{2,3}(-[a-z0-9]+)*$/.test(s)) return "en";
1575
+ return "zh";
1576
+ }
1577
+ function readDocumentLang() {
1578
+ try {
1579
+ const v = globalThis.document?.documentElement?.lang;
1580
+ if (typeof v === "string" && v.trim()) return v;
1581
+ } catch {}
1582
+ return null;
1583
+ }
1584
+ function readNavigatorLangs() {
1585
+ try {
1586
+ const nav = globalThis.navigator;
1587
+ if (!nav) return [];
1588
+ const out = [];
1589
+ if (Array.isArray(nav.languages)) {
1590
+ for (const c of nav.languages) if (typeof c === "string" && c.trim()) out.push(c);
1591
+ }
1592
+ if (typeof nav.language === "string" && nav.language.trim()) out.push(nav.language);
1593
+ return out;
1594
+ } catch {
1595
+ return [];
1596
+ }
1597
+ }
1598
+ function resolveLang(override) {
1599
+ if (override !== null && typeof override === "object") try {
1600
+ const fn = override.getActive;
1601
+ if (typeof fn === "function") {
1602
+ const v = fn.call(override);
1603
+ if (typeof v === "string" && v.trim()) return normalizeLangTag(v);
1604
+ }
1605
+ } catch {}
1606
+ else if (typeof override === "string" && override.trim()) return normalizeLangTag(override);
1607
+ const docLang = readDocumentLang();
1608
+ if (docLang !== null) return normalizeLangTag(docLang);
1609
+ const navs = readNavigatorLangs();
1610
+ for (const c of navs) return normalizeLangTag(c);
1611
+ return "zh";
1612
+ }
1613
+ const entries = /* @__PURE__ */ new Set();
1614
+ let mo = null;
1615
+ function ensureGlobalObserver() {
1616
+ if (mo !== null) return;
1617
+ try {
1618
+ const g = globalThis;
1619
+ const docEl = g.document?.documentElement;
1620
+ const MO = g.MutationObserver;
1621
+ if (!docEl || typeof MO !== "function") return;
1622
+ const obs = new MO(() => {
1623
+ notifyAll();
1624
+ });
1625
+ obs.observe(docEl, {
1626
+ attributes: true,
1627
+ attributeFilter: ["lang"]
1628
+ });
1629
+ mo = obs;
1630
+ } catch {
1631
+ mo = null;
1632
+ }
1633
+ }
1634
+ function notifyAll() {
1635
+ for (const e of [...entries]) try {
1636
+ const next = resolveLang(e.override);
1637
+ if (next !== e.last) {
1638
+ e.last = next;
1639
+ e.cb(next);
1640
+ }
1641
+ } catch {}
1642
+ }
1643
+ function subscribeLang(cb, override) {
1644
+ if (typeof cb !== "function") throw new Error("[dsh-plugin-update] subscribeLang needs a function");
1645
+ const entry = {
1646
+ cb,
1647
+ override: override ?? void 0,
1648
+ last: resolveLang(override),
1649
+ serviceUnsub: null
1650
+ };
1651
+ entries.add(entry);
1652
+ ensureGlobalObserver();
1653
+ try {
1654
+ if (entry.override !== null && typeof entry.override === "object") {
1655
+ const sub = entry.override.subscribe;
1656
+ if (typeof sub === "function") {
1657
+ const un = sub.call(entry.override, () => {
1658
+ try {
1659
+ const next = resolveLang(entry.override);
1660
+ if (next !== entry.last) {
1661
+ entry.last = next;
1662
+ entry.cb(next);
1663
+ }
1664
+ } catch {}
1665
+ });
1666
+ if (typeof un === "function") entry.serviceUnsub = un;
1667
+ }
1668
+ }
1669
+ } catch {}
1670
+ let done = false;
1671
+ return () => {
1672
+ if (done) return;
1673
+ done = true;
1674
+ entries.delete(entry);
1675
+ try {
1676
+ entry.serviceUnsub?.();
1677
+ } catch {}
1678
+ entry.serviceUnsub = null;
1679
+ if (entries.size === 0) {
1680
+ try {
1681
+ mo?.disconnect();
1682
+ } catch {}
1683
+ mo = null;
1684
+ }
1685
+ };
1686
+ }
1687
+ //#endregion
1688
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/bilingual.js
1689
+ const BILINGUAL_STRINGS = {
1690
+ "entry.label.idle": {
1691
+ en: "Check for updates",
1692
+ zh: "检查更新",
1693
+ draft: true
1694
+ },
1695
+ "entry.label.failed": {
1696
+ en: "Update failed — View details",
1697
+ zh: "更新失败,点此查看",
1698
+ draft: true
1699
+ },
1700
+ "entry.label.busy": {
1701
+ en: "Installing…",
1702
+ zh: "正在安装…",
1703
+ draft: true
1704
+ },
1705
+ "entry.label.restart": {
1706
+ en: "Restart required",
1707
+ zh: "待重启",
1708
+ draft: true
1709
+ },
1710
+ "entry.label.has-update": {
1711
+ en: "Update available {version}",
1712
+ zh: "有新版 {version}",
1713
+ draft: true
1714
+ },
1715
+ "entry.action.checking": {
1716
+ en: "Checking for updates…",
1717
+ zh: "正在查新版…",
1718
+ draft: true
1719
+ },
1720
+ "entry.note.up-to-date": {
1721
+ en: "Up to date {version}",
1722
+ zh: "已是最新 {version}",
1723
+ draft: true
1724
+ },
1725
+ "batch-entry.label.idle": {
1726
+ en: "Check for updates",
1727
+ zh: "检查更新",
1728
+ draft: true
1729
+ },
1730
+ "batch-entry.label.update": {
1731
+ en: "{count} updates available",
1732
+ zh: "{count} 家可更新",
1733
+ draft: true
1734
+ },
1735
+ "batch-entry.label.busy": {
1736
+ en: "Installing…",
1737
+ zh: "正在安装…",
1738
+ draft: true
1739
+ },
1740
+ "batch-entry.label.restart": {
1741
+ en: "{count} restarts required",
1742
+ zh: "{count} 家待重启",
1743
+ draft: true
1744
+ },
1745
+ "batch-entry.label.failed": {
1746
+ en: "{count} failed — View details",
1747
+ zh: "{count} 家失败,点此查看",
1748
+ draft: true
1749
+ },
1750
+ "batch-entry.action.checking": {
1751
+ en: "Checking for updates…",
1752
+ zh: "正在查新版…",
1753
+ draft: true
1754
+ }
1755
+ };
1756
+ function escapeHtml$2(value) {
1757
+ return String(value ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1758
+ }
1759
+ function formatTemplate(template, values) {
1760
+ const vals = values ?? {};
1761
+ return String(template).replace(/\{([A-Za-z0-9_]+)\}/g, (_, name) => {
1762
+ const v = vals[name];
1763
+ if (v === null || v === void 0) return "";
1764
+ return String(v).trim();
1765
+ });
1766
+ }
1767
+ function bilingualEntry(key) {
1768
+ const hit = BILINGUAL_STRINGS[key];
1769
+ if (!hit) throw new Error("[dsh-plugin-update] 未知文案 key:" + String(key));
1770
+ return hit;
1771
+ }
1772
+ function copyText(key, lang, values) {
1773
+ const l = normalizeLangTag(lang ?? "zh");
1774
+ const e = bilingualEntry(key);
1775
+ return formatTemplate(l === "en" ? e.en : e.zh, values);
1776
+ }
1777
+ function copyHTML(key, lang, values) {
1778
+ const l = normalizeLangTag(lang ?? "zh");
1779
+ const e = bilingualEntry(key);
1780
+ const text = escapeHtml$2(formatTemplate(l === "en" ? e.en : e.zh, values));
1781
+ return "<span class=\"dsh-upd-bi\"><span lang=\"" + l + "\">" + text + "</span></span>";
1782
+ }
1783
+ const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
1784
+ //#endregion
1785
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/entry.js
1513
1786
  const UPDATE_ENTRY_CSS = [
1514
1787
  ".dsh-upd-entry{display:inline-flex;align-items:center;gap:8px;font:13px/1.6 system-ui,\"Microsoft YaHei\",sans-serif;color:var(--dsh-upd-fg,#1f2937)}",
1515
1788
  ".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-upd-line,#d1d5db);border-radius:6px;",
@@ -1531,12 +1804,12 @@ ${body}`;
1531
1804
  ".dsh-upd-entry[data-state=\"busy\"] .dsh-upd-entry-dot,.dsh-upd-entry[data-state=\"restart\"] .dsh-upd-entry-dot{background:var(--dsh-upd-warn-line,#d97706)}",
1532
1805
  ".dsh-upd-entry[data-state=\"failed\"] .dsh-upd-entry-dot{background:var(--dsh-upd-bad-line,#dc2626)}",
1533
1806
  ".dsh-upd-entry-note{font-size:12.5px;opacity:.9;background:var(--dsh-upd-bg,#ffffff);border:1px solid var(--dsh-upd-line,#e5e7eb);border-radius:4px;padding:1px 8px}",
1534
- ".dsh-upd-entry[data-theme=\"d5-paper\"] .dsh-upd-entry-note{background:var(--d5-card);border-color:var(--d5-line-strong);color:var(--d5-ink)}",
1535
- ".dsh-upd-entry[data-theme=\"d5-paper\"]{--d5-ink:#1a1a1a;--d5-muted:#6f675a;--d5-line-strong:#c4b896;--d5-accent:#c8402a;--d5-card:#fffdf6;",
1807
+ ".dsh-upd-entry[data-theme=\"archive\"] .dsh-upd-entry-note{background:var(--d5-card);border-color:var(--d5-line-strong);color:var(--d5-ink)}",
1808
+ ".dsh-upd-entry[data-theme=\"archive\"]{--d5-ink:#1a1a1a;--d5-muted:#6f675a;--d5-line-strong:#c4b896;--d5-accent:#c8402a;--d5-card:#fffdf6;",
1536
1809
  "font-family:Georgia,\"Songti SC\",\"STSong\",\"SimSun\",serif;color:var(--d5-ink)}",
1537
- ".dsh-upd-entry[data-theme=\"d5-paper\"] .dsh-upd-entry-btn{border-color:var(--d5-line-strong);background:var(--d5-card);color:var(--d5-ink);border-radius:3px}",
1538
- ".dsh-upd-entry[data-theme=\"d5-paper\"] .dsh-upd-entry-btn:hover{border-color:var(--d5-accent);color:var(--d5-accent)}",
1539
- "@media (prefers-color-scheme: dark){.dsh-upd-entry[data-theme=\"d5-paper\"]{--d5-ink:#ece5d3;--d5-muted:#a89c83;--d5-line-strong:#5c4e3b;--d5-accent:#e0684e;--d5-card:#1e1a15}}",
1810
+ ".dsh-upd-entry[data-theme=\"archive\"] .dsh-upd-entry-btn{border-color:var(--d5-line-strong);background:var(--d5-card);color:var(--d5-ink);border-radius:3px}",
1811
+ ".dsh-upd-entry[data-theme=\"archive\"] .dsh-upd-entry-btn:hover{border-color:var(--d5-accent);color:var(--d5-accent)}",
1812
+ "@media (prefers-color-scheme: dark){.dsh-upd-entry[data-theme=\"archive\"]{--d5-ink:#ece5d3;--d5-muted:#a89c83;--d5-line-strong:#5c4e3b;--d5-accent:#e0684e;--d5-card:#1e1a15}}",
1540
1813
  "@media (prefers-color-scheme: dark){.dsh-upd-entry{color:#e5e7eb}",
1541
1814
  ".dsh-upd-entry-btn{--dsh-upd-btn:#1f2937;--dsh-upd-line:#374151}}"
1542
1815
  ].join("\n");
@@ -1620,7 +1893,7 @@ ${body}`;
1620
1893
  }
1621
1894
  }
1622
1895
  //#endregion
1623
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/panel-batch.js
1896
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/panel-batch.js
1624
1897
  const BATCH_PANEL_POLL = {
1625
1898
  defaultMs: 1500,
1626
1899
  minMs: 250
@@ -1727,7 +2000,7 @@ ${body}`;
1727
2000
  parts.push("<div class=\"dsh-upd-batch-macros\">");
1728
2001
  parts.push("<button type=\"button\" data-act=\"check\"" + disabled + " title=\"重新读取批量状态(只读)\">检查更新</button>");
1729
2002
  parts.push("<button type=\"button\" data-act=\"install\" data-primary=\"1\"" + disabled + " title=\"把有新版的几家一次提交;同一会话同一幂等编号\">全部更新</button>");
1730
- if (mode === "dialog") parts.push("<button type=\"button\" data-act=\"close\" title=\"关闭面板(批量推进在宿主侧继续跑)\">关闭</button>");
2003
+ if (mode === "dialog") parts.push("<button type=\"button\" data-act=\"close\" title=\"关闭窗口,批量更新不受影响\">关闭</button>");
1731
2004
  parts.push("</div>");
1732
2005
  parts.push("</div>");
1733
2006
  const summary = loaded ? batchSummaryText(counts, rows, total, installing, lastError !== null) : "正在读取批量更新状态…";
@@ -1757,8 +2030,8 @@ ${body}`;
1757
2030
  }
1758
2031
  if (notice !== null && detailNoticeKey === null) parts.push("<div class=\"dsh-upd-batch-notice\" role=\"status\">" + escapeHtml$1(notice) + "</div>");
1759
2032
  const kernel = parts.join(String.fromCharCode(10));
1760
- const d5 = normalizePanelTheme(theme) === "d5-paper";
1761
- const attr = d5 ? " data-theme=\"d5-paper\"" : "";
2033
+ const d5 = normalizePanelTheme(theme) === "archive";
2034
+ const attr = d5 ? " data-theme=\"archive\"" : "";
1762
2035
  const seal = batchSealOf(counts);
1763
2036
  const root = "<div class=\"dsh-upd dsh-upd-batch\" data-mode=\"" + mode + "\" data-seal=\"" + escapeHtml$1(seal.text) + "\" data-seal-tone=\"" + seal.tone + "\"" + attr + ">\n" + kernel + "\n</div>";
1764
2037
  const body = mode === "dialog" ? "<div class=\"dsh-upd-overlay\" data-mode=\"dialog\">" + root + "</div>" : root;
@@ -1929,21 +2202,23 @@ ${body}`;
1929
2202
  ".dsh-upd-bdetail{margin:2px 0 10px;overflow:visible}",
1930
2203
  ".dsh-upd .dsh-upd-bdetail .dsh-upd{max-width:none}",
1931
2204
  ".dsh-upd-overlay .dsh-upd-bdetail .dsh-upd{max-height:none;overflow:visible}",
2205
+ ".dsh-upd-overlay .dsh-upd-bdetail .dsh-upd-body{overflow:visible}",
2206
+ ".dsh-upd-overlay .dsh-upd-bdetail .dsh-upd-body .dsh-upd-chap-head{position:static}",
1932
2207
  "@media (prefers-color-scheme: dark){.dsh-upd-batch-title i{color:var(--dsh-upd-focus,#93c5fd)}}",
1933
2208
  "@media (prefers-reduced-motion: reduce){.dsh-upd-batch *{transition:none !important;animation:none !important}}"
1934
2209
  ].join(String.fromCharCode(10));
1935
2210
  const UPDATE_BATCH_PANEL_D5_CSS = [
1936
2211
  "/* 批量面板的 D5 皮肤:只换颜色/字体/间距;根上的大印章由 UPDATE_PANEL_D5_CSS 负责。 */",
1937
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-batch-head{padding-right:120px}",
1938
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-batch-title{font-family:var(--d5-serif);font-size:21px;letter-spacing:.04em}",
1939
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-batch-title i{color:var(--d5-accent)}",
1940
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-brow-main{background:transparent;border:0;color:var(--d5-ink)}",
1941
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-brow-main:hover{color:var(--d5-accent)}",
1942
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-bname{font-family:var(--d5-serif)}",
1943
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-bver{font-family:var(--d5-mono);color:var(--d5-muted)}",
1944
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-batch-ledger{color:var(--d5-muted)}",
1945
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-batch-sum{color:var(--d5-ink)}",
1946
- ".dsh-upd[data-theme=\"d5-paper\"] .dsh-upd-brow-set{border-top-color:var(--d5-line)}"
2212
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-head{padding-right:120px}",
2213
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-title{font-family:var(--d5-serif);font-size:21px;letter-spacing:.04em}",
2214
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-title i{color:var(--d5-accent)}",
2215
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-brow-main{background:transparent;border:0;color:var(--d5-ink)}",
2216
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-brow-main:hover{color:var(--d5-accent)}",
2217
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-bname{font-family:var(--d5-serif)}",
2218
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-bver{font-family:var(--d5-mono);color:var(--d5-muted)}",
2219
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-ledger{color:var(--d5-muted)}",
2220
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-batch-sum{color:var(--d5-ink)}",
2221
+ ".dsh-upd[data-theme=\"archive\"] .dsh-upd-brow-set{border-top-color:var(--d5-line)}"
1947
2222
  ].join(String.fromCharCode(10));
1948
2223
  function escapeHtml$1(text) {
1949
2224
  return String(text).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
@@ -2504,8 +2779,8 @@ ${body}`;
2504
2779
  } catch {}
2505
2780
  }
2506
2781
  function setTheme(next) {
2507
- if (next !== "default" && next !== "d5-paper") throw new Error("[dsh-plugin-update] 主题非法:只收 default 或 d5-paper(收到 " + JSON.stringify(next) + ")");
2508
- theme = next;
2782
+ if (next !== "default" && next !== "archive" && next !== "d5-paper") throw new Error("[dsh-plugin-update] 主题非法:只收 default 或 archive(d5-paper 为旧别名仍可用)(收到 " + JSON.stringify(next) + ")");
2783
+ theme = normalizePanelTheme(next);
2509
2784
  render();
2510
2785
  }
2511
2786
  function setMode(next) {
@@ -2570,9 +2845,7 @@ ${body}`;
2570
2845
  };
2571
2846
  }
2572
2847
  //#endregion
2573
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.4/node_modules/dsh-plugin-update/dist/entry-batch.js
2574
- const LABEL_IDLE = "检查更新";
2575
- const LABEL_BUSY = "正在安装…";
2848
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.5.8/node_modules/dsh-plugin-update/dist/entry-batch.js
2576
2849
  function isObject(value) {
2577
2850
  return !!value && typeof value === "object" && !Array.isArray(value);
2578
2851
  }
@@ -2583,7 +2856,7 @@ ${body}`;
2583
2856
  function escapeHtml(value) {
2584
2857
  return String(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2585
2858
  }
2586
- function batchEntrySummary(state) {
2859
+ function batchEntrySummary(state, lang) {
2587
2860
  const rows = state?.rows ?? null;
2588
2861
  const counts = batchLedgerCounts(Array.isArray(rows) ? rows : []);
2589
2862
  const total = Array.isArray(rows) ? rows.length : 0;
@@ -2598,21 +2871,22 @@ ${body}`;
2598
2871
  if (Array.isArray(rows) && rows.length > 0 && counts.failed === 0 && counts.installing === 0) kind = "failed";
2599
2872
  }
2600
2873
  const hasUpdate = counts.installing > 0 || counts.failed > 0 || counts.restart > 0 || counts.updatable > 0;
2874
+ const l = lang !== void 0 && lang !== null ? normalizeLangTag(lang) : resolveLang();
2601
2875
  let label;
2602
2876
  switch (kind) {
2603
2877
  case "busy":
2604
- label = LABEL_BUSY;
2878
+ label = copyText("batch-entry.label.busy", l);
2605
2879
  break;
2606
2880
  case "failed":
2607
- label = counts.failed > 0 ? counts.failed + " 家失败,点此查看" : "更新失败,点此查看";
2881
+ label = counts.failed > 0 ? copyText("batch-entry.label.failed", l, { count: String(counts.failed) }) : copyText("entry.label.failed", l);
2608
2882
  break;
2609
2883
  case "restart":
2610
- label = counts.restart + " 家待重启";
2884
+ label = copyText("batch-entry.label.restart", l, { count: String(counts.restart) });
2611
2885
  break;
2612
2886
  case "update":
2613
- label = counts.updatable + " 家可更新";
2887
+ label = copyText("batch-entry.label.update", l, { count: String(counts.updatable) });
2614
2888
  break;
2615
- default: label = LABEL_IDLE;
2889
+ default: label = copyText("batch-entry.label.idle", l);
2616
2890
  }
2617
2891
  return {
2618
2892
  kind,
@@ -2628,6 +2902,25 @@ ${body}`;
2628
2902
  hasUpdate
2629
2903
  };
2630
2904
  }
2905
+ function batchEntryBilingualKeyFor(state) {
2906
+ const s = batchEntrySummary(state);
2907
+ switch (s.kind) {
2908
+ case "busy": return "batch-entry.label.busy";
2909
+ case "failed": return s.failed > 0 ? "batch-entry.label.failed" : "entry.label.failed";
2910
+ case "restart": return "batch-entry.label.restart";
2911
+ case "update": return "batch-entry.label.update";
2912
+ default: return "batch-entry.label.idle";
2913
+ }
2914
+ }
2915
+ function batchEntryBilingualValuesFor(state) {
2916
+ const s = batchEntrySummary(state);
2917
+ switch (s.kind) {
2918
+ case "update": return { count: String(s.updatable) };
2919
+ case "restart": return { count: String(s.restart) };
2920
+ case "failed": return s.failed > 0 ? { count: String(s.failed) } : {};
2921
+ default: return {};
2922
+ }
2923
+ }
2631
2924
  function mountUpdateBatchEntry(container, options) {
2632
2925
  if (!container || typeof container.innerHTML !== "string") throw new Error("[dsh-plugin-update] 挂批量入口件需要一个有 innerHTML 的容器");
2633
2926
  if (!options || typeof options !== "object") throw new Error("[dsh-plugin-update] 挂批量入口件缺少配置:批量电话前缀 prefix 必填");
@@ -2644,6 +2937,16 @@ ${body}`;
2644
2937
  const pollMs = options.pollMs;
2645
2938
  if (pollMs !== void 0 && (typeof pollMs !== "number" || !Number.isFinite(pollMs) || pollMs < 250)) throw new Error("[dsh-plugin-update] 面板轮询间隔非法:不得小于 250 毫秒(收到 " + JSON.stringify(options.pollMs) + ")");
2646
2939
  const labelOverride = typeof options.label === "string" && options.label ? options.label : null;
2940
+ const localeOpt = options.locale ?? void 0;
2941
+ if (localeOpt !== void 0 && localeOpt !== null) {
2942
+ const isStr = typeof localeOpt === "string";
2943
+ const isObj = typeof localeOpt === "object" && typeof localeOpt.getActive === "function";
2944
+ if (!isStr && !isObj) throw new Error("[dsh-plugin-update] invalid locale: expected zh / en / BCP47 or { getActive(), subscribe? }");
2945
+ if (isStr && !localeOpt.trim()) throw new Error("[dsh-plugin-update] invalid locale: empty string");
2946
+ }
2947
+ function currentLang() {
2948
+ return resolveLang(localeOpt);
2949
+ }
2647
2950
  const titles = options.titles && typeof options.titles === "object" ? options.titles : {};
2648
2951
  const onActivate = typeof options.onActivate === "function" ? options.onActivate : null;
2649
2952
  const call = options.call;
@@ -2682,7 +2985,7 @@ ${body}`;
2682
2985
  };
2683
2986
  }
2684
2987
  function summaryOf() {
2685
- return batchEntrySummary(stateOf());
2988
+ return batchEntrySummary(stateOf(), currentLang());
2686
2989
  }
2687
2990
  function currentLabel() {
2688
2991
  return labelOverride ?? summaryOf().label;
@@ -2691,13 +2994,15 @@ ${body}`;
2691
2994
  return {};
2692
2995
  }
2693
2996
  function entryHTML() {
2694
- const summary = summaryOf();
2695
- const text = activating ? "正在查新版…" : currentLabel();
2997
+ const lang = currentLang();
2998
+ const summary = batchEntrySummary(stateOf(), lang);
2999
+ const labelHTML = labelOverride ? escapeHtml(labelOverride) : activating ? copyHTML("batch-entry.action.checking", lang) : copyHTML(batchEntryBilingualKeyFor(stateOf()), lang, batchEntryBilingualValuesFor(stateOf()));
3000
+ const labelText = labelOverride ?? (activating ? copyText("batch-entry.action.checking", lang) : copyText(batchEntryBilingualKeyFor(stateOf()), lang, batchEntryBilingualValuesFor(stateOf())));
2696
3001
  const busyAttr = activating ? " disabled aria-busy=\"true\"" : "";
2697
- const themeAttr = theme === "d5-paper" ? " data-theme=\"d5-paper\"" : "";
2698
- const control = variant === "badge" ? "<button type=\"button\" class=\"dsh-upd-entry-dot\" " + ENTRY_ATTR + "=\"activate\" title=\"" + escapeHtml(text) + "\" aria-label=\"" + escapeHtml(text) + "\"" + busyAttr + "></button>" : "<button type=\"button\" class=\"dsh-upd-entry-btn\" " + ENTRY_ATTR + "=\"activate\"" + busyAttr + ">" + escapeHtml(text) + "</button>";
3002
+ const themeAttr = theme === "archive" ? " data-theme=\"archive\"" : "";
3003
+ const control = variant === "badge" ? "<button type=\"button\" class=\"dsh-upd-entry-dot\" " + ENTRY_ATTR + "=\"activate\" title=\"" + escapeHtml(labelText) + "\" aria-label=\"" + escapeHtml(labelText) + "\"" + busyAttr + "></button>" : "<button type=\"button\" class=\"dsh-upd-entry-btn\" " + ENTRY_ATTR + "=\"activate\"" + busyAttr + ">" + labelHTML + "</button>";
2699
3004
  const noteHTML = note ? "<span class=\"dsh-upd-entry-note\" data-dsh-upd-note=\"1\">" + escapeHtml(note) + "</span>" : "";
2700
- return "<style>" + UPDATE_ENTRY_CSS + "</style>\n<span class=\"dsh-upd-entry\" data-variant=\"" + variant + "\" data-state=\"" + summary.kind + "\"" + themeAttr + ">" + control + noteHTML + "</span>";
3005
+ return "<style>" + UPDATE_ENTRY_CSS + "\n" + BILINGUAL_CSS + "</style>\n<span class=\"dsh-upd-entry\" data-variant=\"" + variant + "\" data-state=\"" + summary.kind + "\"" + themeAttr + ">" + control + noteHTML + "</span>";
2701
3006
  }
2702
3007
  function render() {
2703
3008
  if (!mounted) return;
@@ -2747,6 +3052,7 @@ ${body}`;
2747
3052
  onRestartRequested: options.onRestartRequested,
2748
3053
  copyText: options.copyText,
2749
3054
  autoChangelog: options.autoChangelog,
3055
+ locale: localeOpt,
2750
3056
  onCloseRequested: () => close(),
2751
3057
  call: panelCall
2752
3058
  });
@@ -2836,6 +3142,9 @@ ${body}`;
2836
3142
  function unmount() {
2837
3143
  if (!mounted) return;
2838
3144
  mounted = false;
3145
+ try {
3146
+ unsubLang();
3147
+ } catch {}
2839
3148
  const opened = panel;
2840
3149
  panel = null;
2841
3150
  panelMode = null;
@@ -2849,6 +3158,9 @@ ${body}`;
2849
3158
  container.removeEventListener?.("keydown", onKeyDown);
2850
3159
  } catch {}
2851
3160
  }
3161
+ const unsubLang = subscribeLang(() => {
3162
+ render();
3163
+ }, localeOpt);
2852
3164
  try {
2853
3165
  container.addEventListener?.("click", onClick);
2854
3166
  } catch {}
@@ -4791,7 +5103,7 @@ ${body}`;
4791
5103
  }, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
4792
5104
  }
4793
5105
  /** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
4794
- const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.41";
5106
+ const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.42";
4795
5107
  /** 爱生活面板:总设置区 + 检查更新(七家)+ 爱生活页签条(slot 驱动)+ 技能设置页投影/缺席卡。 */
4796
5108
  function LifePackSection(props) {
4797
5109
  const tabsId = react.useId();