@yinuo-ngm/server 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/lib/app.js +3 -15
  2. package/lib/common/editor.js +2 -2
  3. package/lib/env.d.ts +1 -0
  4. package/lib/env.js +1 -0
  5. package/lib/plugins/error-handler.plugin.d.ts +2 -2
  6. package/lib/plugins/error-handler.plugin.js +97 -93
  7. package/lib/plugins/ws/topics/nginx.ws.js +2 -1
  8. package/lib/plugins/ws/topics/svn.ws.d.ts +2 -1
  9. package/lib/plugins/ws/topics/svn.ws.js +3 -2
  10. package/lib/plugins/ws/topics/syslog.ws.d.ts +1 -1
  11. package/lib/plugins/ws/topics/task.ws.d.ts +2 -1
  12. package/lib/plugins/ws/topics/task.ws.js +2 -1
  13. package/lib/plugins/ws/ws.context.d.ts +1 -1
  14. package/lib/plugins/ws/ws.plugin.js +4 -3
  15. package/lib/plugins/ws/ws.router.d.ts +2 -2
  16. package/lib/plugins/ws/ws.router.js +8 -7
  17. package/lib/routes/api-client/collection.routes.js +8 -6
  18. package/lib/routes/api-client/env.routes.js +4 -3
  19. package/lib/routes/api-client/history.routes.js +3 -2
  20. package/lib/routes/api-client/hub-token.routes.js +11 -11
  21. package/lib/routes/api-client/request.routes.js +7 -6
  22. package/lib/routes/api-client/send.routes.js +3 -2
  23. package/lib/routes/config.routes.js +5 -5
  24. package/lib/routes/hub.routes.js +10 -10
  25. package/lib/routes/nginx/nginx-lifecycle.routes.js +4 -0
  26. package/lib/routes/nginx/nginx-route.context.js +23 -7
  27. package/lib/routes/nginx/nginx-server.routes.js +158 -6
  28. package/lib/routes/node-version.routes.js +7 -7
  29. package/lib/routes/project.routes.js +9 -9
  30. package/lib/routes/rss.routes.js +3 -3
  31. package/lib/routes/sprite-browse.routes.js +2 -1
  32. package/lib/routes/sprite.routes.js +3 -3
  33. package/lib/routes/static-files.routes.js +7 -7
  34. package/lib/routes/svn.routes.js +5 -3
  35. package/lib/routes/system.routes.js +20 -1
  36. package/lib/routes/task.routes.js +4 -4
  37. package/package.json +13 -6
  38. package/www/3rdpartylicenses.txt +52 -52
  39. package/www/browser/chunk-2L7NUOMX.js +2 -0
  40. package/www/browser/chunk-2NZJ7CN2.js +20 -0
  41. package/www/browser/{chunk-SPRWNZHF.js → chunk-3CM4SKDO.js} +2 -2
  42. package/www/browser/{chunk-EEVPZGEY.js → chunk-3I7BQCXS.js} +1 -1
  43. package/www/browser/{chunk-DXF7BVK5.js → chunk-3M56F2S2.js} +1 -1
  44. package/www/browser/chunk-3OHBKMAA.js +1 -0
  45. package/www/browser/{chunk-4KETC6EB.js → chunk-3XNNQFWR.js} +1 -1
  46. package/www/browser/chunk-4BRW6LCZ.js +4 -0
  47. package/www/browser/{chunk-HGONFYP6.js → chunk-4LBSLURA.js} +1 -1
  48. package/www/browser/{chunk-BYEU6KGP.js → chunk-4X42HB6N.js} +1 -1
  49. package/www/browser/chunk-5DYX4DUX.js +11 -0
  50. package/www/browser/chunk-6SYVDN5L.js +1 -0
  51. package/www/browser/{chunk-XJ5KZQNN.js → chunk-6YYNHZ2A.js} +1 -1
  52. package/www/browser/{chunk-G2W3B7TJ.js → chunk-75W3GVSO.js} +1 -1
  53. package/www/browser/{chunk-76TVIB33.js → chunk-7U44RF5F.js} +1 -1
  54. package/www/browser/{chunk-WD4IAQR3.js → chunk-AELTP6YN.js} +1 -1
  55. package/www/browser/chunk-AMXRL4GR.js +1 -0
  56. package/www/browser/chunk-AV2ZODEH.js +1 -0
  57. package/www/browser/chunk-AZ6SIMYH.js +1 -0
  58. package/www/browser/chunk-B3C35ET3.js +2 -0
  59. package/www/browser/chunk-BTQIUVTQ.js +1 -0
  60. package/www/browser/chunk-CN5J4WNO.js +1 -0
  61. package/www/browser/{chunk-N4LRZJBP.js → chunk-D2ODDESN.js} +1 -1
  62. package/www/browser/{chunk-O2EYEF7J.js → chunk-DE6E23ET.js} +1 -1
  63. package/www/browser/{chunk-SVQWPHF5.js → chunk-DIJPUYIA.js} +1 -1
  64. package/www/browser/{chunk-SYCNSLAW.js → chunk-DLGJD6YU.js} +4 -4
  65. package/www/browser/{chunk-JHMEKUZ5.js → chunk-EEDA5U4V.js} +1 -1
  66. package/www/browser/chunk-FK6Z4HLL.js +1 -0
  67. package/www/browser/chunk-FL6GDGHW.js +1 -0
  68. package/www/browser/{chunk-HRXCR3IN.js → chunk-FXCG34QS.js} +1 -1
  69. package/www/browser/{chunk-UJOHBN2Y.js → chunk-H2USFIYR.js} +1 -1
  70. package/www/browser/chunk-H5HGMOE6.js +1 -0
  71. package/www/browser/chunk-HB3HECPD.js +1 -0
  72. package/www/browser/{chunk-INL2PELS.js → chunk-HDNG236Q.js} +1 -1
  73. package/www/browser/{chunk-WF2QTF5L.js → chunk-HJTXXSMC.js} +1 -1
  74. package/www/browser/{chunk-LQ5OXSW7.js → chunk-HUMCWAKJ.js} +1 -1
  75. package/www/browser/chunk-IKB3EQCP.js +2 -0
  76. package/www/browser/{chunk-TMX5TTV3.js → chunk-K7PESFPY.js} +1 -1
  77. package/www/browser/{chunk-T3KK7ZXB.js → chunk-KRYMOHYF.js} +1 -1
  78. package/www/browser/{chunk-SQQNR223.js → chunk-M4QRBV3K.js} +1 -1
  79. package/www/browser/chunk-N2PELLMM.js +30 -0
  80. package/www/browser/{chunk-ACAZUX6C.js → chunk-ONXBYGIG.js} +1 -1
  81. package/www/browser/{chunk-JZULA5JV.js → chunk-OSBDR36P.js} +1 -1
  82. package/www/browser/chunk-OZCK4XVV.js +1 -0
  83. package/www/browser/{chunk-GDWS2L66.js → chunk-QJP5F735.js} +1 -1
  84. package/www/browser/{chunk-2X3MRS27.js → chunk-RGOYDY7H.js} +1 -1
  85. package/www/browser/{chunk-B6MBYCXI.js → chunk-UJKK4A7Y.js} +1 -1
  86. package/www/browser/{chunk-ZNTJRLVH.js → chunk-WD2EKZQC.js} +1 -1
  87. package/www/browser/{chunk-L5D75AMV.js → chunk-WUA5JFDD.js} +1 -1
  88. package/www/browser/chunk-XLFHB7RS.js +3 -0
  89. package/www/browser/{chunk-JU3TEDBV.js → chunk-YNW4HEJO.js} +1 -1
  90. package/www/browser/{chunk-RW2JPJV7.js → chunk-ZTDLWBW5.js} +1 -1
  91. package/www/browser/index.html +1 -1
  92. package/www/browser/main-N64WJCHX.js +34 -0
  93. package/www/browser/chunk-2BZRE4G7.js +0 -1
  94. package/www/browser/chunk-5T5KA5PG.js +0 -1
  95. package/www/browser/chunk-6CGHNKJI.js +0 -1
  96. package/www/browser/chunk-7J24TP36.js +0 -1
  97. package/www/browser/chunk-CZ5AZ3VW.js +0 -1
  98. package/www/browser/chunk-DW7F5PEA.js +0 -1
  99. package/www/browser/chunk-HHBPULJW.js +0 -2
  100. package/www/browser/chunk-KVFR7GFV.js +0 -20
  101. package/www/browser/chunk-L7TMCSHV.js +0 -1
  102. package/www/browser/chunk-MVQTKINJ.js +0 -1
  103. package/www/browser/chunk-OMDHJIUB.js +0 -1
  104. package/www/browser/chunk-OWUAAOHW.js +0 -2
  105. package/www/browser/chunk-PIK5YPIB.js +0 -1
  106. package/www/browser/chunk-RHLQRQDK.js +0 -9
  107. package/www/browser/chunk-S3SJ4VVM.js +0 -11
  108. package/www/browser/chunk-SIVPP74B.js +0 -0
  109. package/www/browser/chunk-UFY3FLDK.js +0 -1
  110. package/www/browser/chunk-UQGCUFNM.js +0 -1
  111. package/www/browser/chunk-UXXWRMM6.js +0 -1
  112. package/www/browser/chunk-UZRJGJTD.js +0 -2
  113. package/www/browser/chunk-WI67LAOV.js +0 -4
  114. package/www/browser/chunk-WNCM6QKB.js +0 -1
  115. package/www/browser/chunk-YETDFSQE.js +0 -1
  116. package/www/browser/chunk-YMTC5GZK.js +0 -1
  117. package/www/browser/chunk-YVZHJ76K.js +0 -1
  118. package/www/browser/main-6LN5C22E.js +0 -34
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.default = projectRoutes;
37
- const core_1 = require("@yinuo-ngm/core");
37
+ const errors_1 = require("@yinuo-ngm/errors");
38
38
  const path = __importStar(require("path"));
39
39
  const editor_1 = require("../common/editor");
40
40
  async function projectRoutes(fastify) {
@@ -138,7 +138,7 @@ async function projectRoutes(fastify) {
138
138
  const { id } = req.params;
139
139
  const body = req.body;
140
140
  if (typeof body?.timestamp !== "number") {
141
- throw new core_1.AppError("INVALID_TIMESTAMP", "timestamp must be a number");
141
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.INVALID_TIMESTAMP, "timestamp must be a number");
142
142
  }
143
143
  const updated = await fastify.core.project.setLastOpened(id, body.timestamp);
144
144
  return updated;
@@ -147,7 +147,7 @@ async function projectRoutes(fastify) {
147
147
  const { id } = req.params;
148
148
  const body = req.body;
149
149
  if (typeof body?.name !== "string" || body.name.trim() === "") {
150
- throw new core_1.AppError("INVALID_NAME", "name must be a non-empty string");
150
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.INVALID_NAME, "name must be a non-empty string");
151
151
  }
152
152
  const updated = await fastify.core.project.rename(id, body.name.trim());
153
153
  return updated;
@@ -161,7 +161,7 @@ async function projectRoutes(fastify) {
161
161
  const { id } = req.params;
162
162
  const body = req.body;
163
163
  if (typeof body?.name !== "string" || body.name.trim() === "") {
164
- throw new core_1.AppError("INVALID_NAME", "name must be a non-empty string");
164
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.INVALID_NAME, "name must be a non-empty string");
165
165
  }
166
166
  const updated = await fastify.core.project.edit(id, {
167
167
  name: body.name.trim(),
@@ -175,7 +175,7 @@ async function projectRoutes(fastify) {
175
175
  const body = req.body;
176
176
  const assets = body?.assets;
177
177
  if (!assets || !assets.iconsSvn) {
178
- throw new core_1.AppError("BAD_REQUEST", "参数错误,assets.iconsSvn 是必需的");
178
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, "参数错误,assets.iconsSvn 是必需的");
179
179
  }
180
180
  const updated = await fastify.core.project.updateAssets(id, assets);
181
181
  return updated;
@@ -187,10 +187,10 @@ async function projectRoutes(fastify) {
187
187
  const p = await fastify.core.project.get(id);
188
188
  const editor = body?.editor || "code";
189
189
  await (0, editor_1.openFolder)(p.root, { editor });
190
- return { ok: true };
190
+ return {};
191
191
  }
192
192
  catch (e) {
193
- throw new core_1.AppError("EDITOR_LAUNCH_FAILED", e?.message || "openInEditor failed");
193
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.EDITOR_LAUNCH_FAILED, e?.message || "openInEditor failed");
194
194
  }
195
195
  });
196
196
  fastify.post("/bootstrap/cli", async (req) => {
@@ -206,9 +206,9 @@ async function projectRoutes(fastify) {
206
206
  const taskId = String(body?.taskId ?? "").trim();
207
207
  const pickedRoot = String(body?.pickedRoot ?? "").trim();
208
208
  if (!taskId)
209
- throw new core_1.AppError("BAD_REQUEST", "taskId is required");
209
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, "taskId is required");
210
210
  if (!pickedRoot)
211
- throw new core_1.AppError("BAD_REQUEST", "pickedRoot is required");
211
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, "pickedRoot is required");
212
212
  const r = await fastify.core.bootstrap.pickWorkspaceRoot({ taskId, pickedRoot });
213
213
  return r;
214
214
  });
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = rssRoutes;
7
- const core_1 = require("@yinuo-ngm/core");
7
+ const errors_1 = require("@yinuo-ngm/errors");
8
8
  const rss_parser_1 = __importDefault(require("rss-parser"));
9
9
  const cache = new Map();
10
10
  const parser = new rss_parser_1.default({
@@ -15,7 +15,7 @@ async function rssRoutes(app) {
15
15
  const q = req.query;
16
16
  const url = (q.url ?? "").trim();
17
17
  if (!url) {
18
- throw new core_1.AppError("INVALID_RSS_URL", "url required", { query: q });
18
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.INVALID_RSS_URL, "url required", { query: q });
19
19
  }
20
20
  const limit = Math.min(Math.max(parseInt(q.limit ?? "20", 10) || 20, 1), 100);
21
21
  const force = (q.force ?? "0") === "1";
@@ -47,7 +47,7 @@ async function rssRoutes(app) {
47
47
  return payload;
48
48
  }
49
49
  catch (e) {
50
- throw new core_1.AppError(`RSS_FETCH_FAILED`, e?.message || String(e), { url });
50
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.RSS_FETCH_FAILED, e?.message || String(e), { url });
51
51
  }
52
52
  });
53
53
  }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = spriteBrowseRoutes;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
+ const errors_1 = require("@yinuo-ngm/errors");
9
10
  const SKIP = new Set([
10
11
  ".svn",
11
12
  ".git",
@@ -18,7 +19,7 @@ function safeJoin(root, sub) {
18
19
  const resolved = node_path_1.default.resolve(root, sub);
19
20
  const rootResolved = node_path_1.default.resolve(root);
20
21
  if (!resolved.startsWith(rootResolved)) {
21
- throw new Error("INVALID_PATH");
22
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, "INVALID_PATH");
22
23
  }
23
24
  return resolved;
24
25
  }
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.spriteRoutes = spriteRoutes;
7
7
  const node_path_1 = __importDefault(require("node:path"));
8
- const core_1 = require("@yinuo-ngm/core");
8
+ const errors_1 = require("@yinuo-ngm/errors");
9
9
  async function spriteRoutes(fastify) {
10
10
  fastify.get("/config/:projectId", async (req) => {
11
11
  const { projectId } = req.params;
@@ -15,13 +15,13 @@ async function spriteRoutes(fastify) {
15
15
  const { projectId } = req.params;
16
16
  const body = req.body;
17
17
  if (!body || !body.config) {
18
- throw new core_1.AppError('BAD_REQUEST', 'Missing config in request body');
18
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, 'Missing config in request body');
19
19
  }
20
20
  const nextCfg = body.config;
21
21
  const nextAssets = body.assets || {};
22
22
  const hasLocalImageRoot = !!String(nextCfg.localImageRoot ?? "").trim();
23
23
  if (!nextAssets.iconsSvn && !hasLocalImageRoot) {
24
- throw new core_1.AppError('BAD_REQUEST', 'iconsSvn asset or localImageRoot is required');
24
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, 'iconsSvn asset or localImageRoot is required');
25
25
  }
26
26
  if (nextCfg.localDir && nextAssets.iconsSvn) {
27
27
  nextAssets.iconsSvn.localDir = node_path_1.default.join(nextCfg.localDir, nextAssets.iconsSvn.label || 'icons');
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.default = staticFileRoutes;
40
- const core_1 = require("@yinuo-ngm/core");
40
+ const errors_1 = require("@yinuo-ngm/errors");
41
41
  const mime_types_1 = __importDefault(require("mime-types"));
42
42
  const node_fs_1 = __importStar(require("node:fs"));
43
43
  const node_path_1 = __importDefault(require("node:path"));
@@ -45,7 +45,7 @@ function safeJoin(root, sub) {
45
45
  const resolved = node_path_1.default.resolve(root, sub);
46
46
  const rootResolved = node_path_1.default.resolve(root);
47
47
  if (!resolved.startsWith(rootResolved)) {
48
- throw new Error("INVALID_PATH");
48
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.BAD_REQUEST, "INVALID_PATH");
49
49
  }
50
50
  return resolved;
51
51
  }
@@ -56,7 +56,7 @@ async function staticFileRoutes(fastify) {
56
56
  const cacheDir = fastify.core.sprite.ensureCacheDir(projectId);
57
57
  const filePath = safeJoin(cacheDir, file);
58
58
  if (!node_fs_1.default.existsSync(filePath)) {
59
- throw new core_1.AppError("NOT_FOUND", "Requested file not found in cache");
59
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.NOT_FOUND, "Requested file not found in cache");
60
60
  }
61
61
  const ct = mime_types_1.default.lookup(filePath) || "application/octet-stream";
62
62
  reply.header("Content-Type", ct);
@@ -70,11 +70,11 @@ async function staticFileRoutes(fastify) {
70
70
  ? project?.assets?.iconsSvn?.localDir
71
71
  : project?.assets?.cutImageSvn?.localDir;
72
72
  if (!root) {
73
- throw new core_1.AppError("ASSET_NOT_FOUND", "Project asset source not found");
73
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.ASSET_NOT_FOUND, "Project asset source not found");
74
74
  }
75
75
  const filePath = safeJoin(root, file);
76
76
  if (!node_fs_1.default.existsSync(filePath)) {
77
- throw new core_1.AppError("NOT_FOUND", "Requested file not found in SVN");
77
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.NOT_FOUND, "Requested file not found in SVN");
78
78
  }
79
79
  const ct = mime_types_1.default.lookup(filePath) || "application/octet-stream";
80
80
  reply.header("Content-Type", ct);
@@ -86,11 +86,11 @@ async function staticFileRoutes(fastify) {
86
86
  const cfg = await fastify.core.sprite.getConfig(projectId);
87
87
  const root = String(cfg?.localImageRoot ?? "").trim();
88
88
  if (!root) {
89
- throw new core_1.AppError("ASSET_NOT_FOUND", "localImageRoot not configured");
89
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.ASSET_NOT_FOUND, "localImageRoot not configured");
90
90
  }
91
91
  const filePath = safeJoin(root, file);
92
92
  if (!node_fs_1.default.existsSync(filePath)) {
93
- throw new core_1.AppError("NOT_FOUND", "Requested file not found in local folder");
93
+ throw new errors_1.GlobalError(errors_1.GlobalErrorCodes.NOT_FOUND, "Requested file not found in local folder");
94
94
  }
95
95
  const ct = mime_types_1.default.lookup(filePath) || "application/octet-stream";
96
96
  reply.header("Content-Type", ct);
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = svnRoutes;
7
- const core_1 = require("@yinuo-ngm/core");
7
+ const errors_1 = require("@yinuo-ngm/errors");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const env_1 = require("../env");
10
10
  async function svnRoutes(fastify) {
@@ -13,7 +13,8 @@ async function svnRoutes(fastify) {
13
13
  const p = await fastify.core.project.get(projectId);
14
14
  const assets = p.assets;
15
15
  if (!assets) {
16
- throw new core_1.AppError('ASSET_NOT_FOUND', 'Project assets are required for SVN sync');
16
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.ASSET_NOT_FOUND, 'Project assets are required for SVN sync');
17
+ ;
17
18
  }
18
19
  const { iconsSvn, cutImageSvn } = assets;
19
20
  const svnSources = [iconsSvn, cutImageSvn].filter(s => s && s.kind === "svn");
@@ -37,7 +38,8 @@ async function svnRoutes(fastify) {
37
38
  const { projectId } = req.params;
38
39
  const assets = (await fastify.core.project.get(projectId)).assets;
39
40
  if (!assets) {
40
- throw new core_1.AppError('ASSET_NOT_FOUND', 'Project assets are required for SVN sync');
41
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.ASSET_NOT_FOUND, 'Project assets are required for SVN sync');
42
+ ;
41
43
  }
42
44
  const { iconsSvn, cutImageSvn } = assets;
43
45
  const svnSources = [iconsSvn, cutImageSvn].filter(s => s && s.kind === "svn");
@@ -2,6 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = systemRoutes;
4
4
  const env_1 = require("../env");
5
+ function isLocalAddress(ip) {
6
+ return (ip === '127.0.0.1' ||
7
+ ip === '::1' ||
8
+ ip === '::ffff:127.0.0.1');
9
+ }
5
10
  async function systemRoutes(fastify) {
6
11
  fastify.get("/health", async () => ({
7
12
  ts: Date.now(),
@@ -11,7 +16,21 @@ async function systemRoutes(fastify) {
11
16
  version: process.env.npm_package_version,
12
17
  dataDir: env_1.env.dataDir
13
18
  }));
14
- fastify.post("/shutdown", async () => {
19
+ fastify.post("/shutdown", async (request, reply) => {
20
+ if (!isLocalAddress(request.ip)) {
21
+ fastify.log.warn(`Shutdown rejected: not localhost (${request.ip})`);
22
+ return reply.code(403).send({ ok: false, error: 'Localhost only' });
23
+ }
24
+ const token = request.headers["x-ngm-shutdown-token"];
25
+ const expected = env_1.env.shutdownToken;
26
+ if (!expected) {
27
+ fastify.log.warn("Shutdown rejected: no shutdown token configured");
28
+ return reply.code(403).send({ ok: false, error: 'Shutdown token required' });
29
+ }
30
+ if (token !== expected) {
31
+ fastify.log.warn("Shutdown rejected: invalid token");
32
+ return reply.code(403).send({ ok: false, error: 'Invalid shutdown token' });
33
+ }
15
34
  fastify.log.info("Shutdown requested via /shutdown");
16
35
  setTimeout(async () => {
17
36
  try {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = taskRoutes;
4
- const core_1 = require("@yinuo-ngm/core");
4
+ const errors_1 = require("@yinuo-ngm/errors");
5
5
  async function ensureSpecs(fastify, projectId) {
6
6
  const specs = await fastify.core.task.listSpecsByProject(projectId);
7
7
  if (specs.length === 0) {
@@ -22,21 +22,21 @@ async function taskRoutes(fastify) {
22
22
  const body = req.body;
23
23
  const taskId = body?.taskId?.trim();
24
24
  if (!taskId)
25
- throw new core_1.AppError("TASK_ID_REQUIRED", "taskId is required", { body });
25
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.TASK_ID_REQUIRED, "taskId is required", { body });
26
26
  return await fastify.core.task.start(taskId);
27
27
  });
28
28
  fastify.post("/stop", async (req) => {
29
29
  const body = req.body;
30
30
  const taskId = body?.taskId?.trim();
31
31
  if (!taskId)
32
- throw new core_1.AppError("TASK_ID_REQUIRED", "taskId is required", { body });
32
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.TASK_ID_REQUIRED, "taskId is required", { body });
33
33
  return await fastify.core.task.stop(taskId);
34
34
  });
35
35
  fastify.post("/restart", async (req) => {
36
36
  const body = req.body;
37
37
  const taskId = body?.taskId?.trim();
38
38
  if (!taskId)
39
- throw new core_1.AppError("TASK_ID_REQUIRED", "taskId is required", { body });
39
+ throw new errors_1.CoreError(errors_1.CoreErrorCodes.TASK_ID_REQUIRED, "taskId is required", { body });
40
40
  return await fastify.core.task.restart(taskId);
41
41
  });
42
42
  fastify.get("/status/:taskId", async (req) => {
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@yinuo-ngm/server",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "a server package for Yinuo NG Manager",
5
5
  "author": "ZhangJing <892295834@qq.com>",
6
6
  "license": "ISC",
7
7
  "main": "lib/index.js",
8
8
  "types": "lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ }
14
+ },
9
15
  "keywords": [],
10
16
  "files": [
11
17
  "lib",
@@ -22,19 +28,20 @@
22
28
  "dependencies": {
23
29
  "@fastify/static": "^9.0.0",
24
30
  "@fastify/websocket": "^11.2.0",
25
- "@yinuo-ngm/api": "^0.1.5",
26
- "@yinuo-ngm/core": "^0.1.8",
27
- "@yinuo-ngm/nginx": "^0.1.1",
31
+ "@yinuo-ngm/api": "^0.1.6",
32
+ "@yinuo-ngm/core": "^0.1.10",
33
+ "@yinuo-ngm/errors": "^1.0.1",
34
+ "@yinuo-ngm/nginx": "^0.1.2",
35
+ "@yinuo-ngm/protocol": "^0.1.1",
28
36
  "fastify": "^5.6.2",
29
37
  "fastify-plugin": "^5.1.0",
30
38
  "launch-editor": "^2.12.0",
31
39
  "mime-types": "^2.1.35",
32
- "pino-pretty": "^13.1.3",
33
40
  "rss-parser": "^3.13.0"
34
41
  },
35
42
  "devDependencies": {
36
43
  "@types/mime-types": "^3.0.1",
37
44
  "tsx": "^4.21.0"
38
45
  },
39
- "gitHead": "a460311e2e16b1287561f722b184d3533dc2849a"
46
+ "gitHead": "bb512d9bb6bcbf3993af029a5c3f722b637f8ff2"
40
47
  }
@@ -235,58 +235,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
235
235
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
236
236
  THE SOFTWARE.
237
237
 
238
- --------------------------------------------------------------------------------
239
- Package: lodash
240
- License: "MIT"
241
-
242
- Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
243
-
244
- Based on Underscore.js, copyright Jeremy Ashkenas,
245
- DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
246
-
247
- This software consists of voluntary contributions made by many
248
- individuals. For exact contribution history, see the revision history
249
- available at https://github.com/lodash/lodash
250
-
251
- The following license applies to all parts of this software except as
252
- documented below:
253
-
254
- ====
255
-
256
- Permission is hereby granted, free of charge, to any person obtaining
257
- a copy of this software and associated documentation files (the
258
- "Software"), to deal in the Software without restriction, including
259
- without limitation the rights to use, copy, modify, merge, publish,
260
- distribute, sublicense, and/or sell copies of the Software, and to
261
- permit persons to whom the Software is furnished to do so, subject to
262
- the following conditions:
263
-
264
- The above copyright notice and this permission notice shall be
265
- included in all copies or substantial portions of the Software.
266
-
267
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
268
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
269
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
270
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
271
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
272
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
273
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
274
-
275
- ====
276
-
277
- Copyright and related rights for sample code are waived via CC0. Sample
278
- code is defined as all source code displayed within the prose of the
279
- documentation.
280
-
281
- CC0: http://creativecommons.org/publicdomain/zero/1.0/
282
-
283
- ====
284
-
285
- Files located in the node_modules and vendor directories are externally
286
- maintained libraries used by this software which have their own
287
- licenses; we recommend you read them, as their terms may differ from the
288
- terms above.
289
-
290
238
  --------------------------------------------------------------------------------
291
239
  Package: @xterm/xterm
292
240
  License: "MIT"
@@ -361,6 +309,58 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
361
309
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
362
310
  THE SOFTWARE.
363
311
 
312
+ --------------------------------------------------------------------------------
313
+ Package: lodash
314
+ License: "MIT"
315
+
316
+ Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
317
+
318
+ Based on Underscore.js, copyright Jeremy Ashkenas,
319
+ DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
320
+
321
+ This software consists of voluntary contributions made by many
322
+ individuals. For exact contribution history, see the revision history
323
+ available at https://github.com/lodash/lodash
324
+
325
+ The following license applies to all parts of this software except as
326
+ documented below:
327
+
328
+ ====
329
+
330
+ Permission is hereby granted, free of charge, to any person obtaining
331
+ a copy of this software and associated documentation files (the
332
+ "Software"), to deal in the Software without restriction, including
333
+ without limitation the rights to use, copy, modify, merge, publish,
334
+ distribute, sublicense, and/or sell copies of the Software, and to
335
+ permit persons to whom the Software is furnished to do so, subject to
336
+ the following conditions:
337
+
338
+ The above copyright notice and this permission notice shall be
339
+ included in all copies or substantial portions of the Software.
340
+
341
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
342
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
343
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
344
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
345
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
346
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
347
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
348
+
349
+ ====
350
+
351
+ Copyright and related rights for sample code are waived via CC0. Sample
352
+ code is defined as all source code displayed within the prose of the
353
+ documentation.
354
+
355
+ CC0: http://creativecommons.org/publicdomain/zero/1.0/
356
+
357
+ ====
358
+
359
+ Files located in the node_modules and vendor directories are externally
360
+ maintained libraries used by this software which have their own
361
+ licenses; we recommend you read them, as their terms may differ from the
362
+ terms above.
363
+
364
364
  --------------------------------------------------------------------------------
365
365
  Package: @angular/core
366
366
  License: "MIT"
@@ -0,0 +1,2 @@
1
+ import{b as ot,d as rt}from"./chunk-DE6E23ET.js";import{a as at,c as lt}from"./chunk-7U44RF5F.js";import{a as Ke,b as Xe}from"./chunk-RGOYDY7H.js";import{a as nt,b as it}from"./chunk-K7PESFPY.js";import{$ as Ze,Ga as we,Ha as ze,Ia as de,Ja as me,L as J,S as We,a as xe,ta as Ye,va as K,vb as Je,wb as et,yb as tt}from"./chunk-3CM4SKDO.js";import{i as ie,n as ve}from"./chunk-KRYMOHYF.js";import{$b as S,Ac as B,Da as ue,Ec as le,Fb as y,Fc as Z,Gb as ne,Gc as P,Ha as Pe,Hc as je,Jc as x,Kc as G,L as ke,Lb as M,Lc as b,Mb as $e,N as De,Oa as j,Ra as Ae,Ub as re,Wb as f,Xc as Qe,Yb as v,Zc as Ue,_b as V,ac as I,bc as _,cc as s,da as Ee,dc as d,dd as se,ea as Ne,ec as X,f as ee,ha as Re,ic as R,id as Ge,jc as F,jd as qe,kb as Le,kc as ae,l as Se,lc as W,n as Ie,na as Fe,nb as r,oa as te,od as D,r as q,rc as Q,s as T,sa as k,sb as Be,ub as Ve,uc as l,ud as Y,vc as A,wb as He,wc as E,xc as Ce,ya as H,yc as U,yd as ce,za as $,zc as L,zd as fe}from"./chunk-4BRW6LCZ.js";var Un=["open","in_progress","pending_update","resolved","verified","reopened","closed"],Gn={open:"\u5F85\u5904\u7406",in_progress:"\u5904\u7406\u4E2D",resolved:"\u5F85\u9A8C\u8BC1",verified:"\u5DF2\u9A8C\u8BC1",reopened:"\u5DF2\u91CD\u5F00",closed:"\u5DF2\u5173\u95ED"},qn={open:"volcano",in_progress:"cyan",resolved:"blue",verified:"green",reopened:"volcano",closed:"default"},Wn={todo:"gold",in_progress:"geekblue",done:"green"},Zn={todo:"\u5F85\u5F00\u59CB",in_progress:"\u5904\u7406\u4E2D",done:"\u5DF2\u5B8C\u6210"},Yn=[{label:"\u6240\u6709\u72B6\u6001",value:""},{label:"\u5F85\u5904\u7406",value:"open"},{label:"\u5904\u7406\u4E2D",value:"in_progress"},{label:"\u5F85\u63D0\u6D4B",value:"pending_update"},{label:"\u5F85\u9A8C\u8BC1",value:"resolved"},{label:"\u5DF2\u9A8C\u8BC1",value:"verified"},{label:"\u5DF2\u91CD\u5F00",value:"reopened"},{label:"\u5DF2\u5173\u95ED",value:"closed"}],Kn=["todo","doing","blocked","done","canceled"],Xn={todo:"\u5F85\u5F00\u59CB",doing:"\u5F00\u53D1\u4E2D",blocked:"\u963B\u585E\u4E2D",done:"\u5DF2\u5B8C\u6210",accepted:"\u5DF2\u5B8C\u6210",closed:"\u5DF2\u5173\u95ED"},Jn={todo:"volcano",doing:"cyan",blocked:"error",done:"green",accepted:"green",closed:"default"},ei=[{label:"\u6240\u6709\u72B6\u6001",value:""},{label:"\u5F85\u5F00\u59CB",value:"todo"},{label:"\u5F00\u53D1\u4E2D",value:"doing"},{label:"\u963B\u585E\u4E2D",value:"blocked"},{label:"\u5DF2\u5B8C\u6210",value:"done"},{label:"\u5DF2\u5173\u95ED",value:"closed"}];var ni={low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",critical:"\u7D27\u6025"},ii=[{label:"\u5168\u90E8\u4F18\u5148\u7EA7",value:""},{label:"\u4F4E",value:"low"},{label:"\u4E2D",value:"medium"},{label:"\u9AD8",value:"high"},{label:"\u7D27\u6025",value:"critical"}],oi={low:"green",medium:"orange",high:"magenta",critical:"red"};var vt=["*"];function xt(e,n){e&1&&E(0)}function wt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),G(t.nzTitle)}}function zt(e,n){if(e&1&&(s(0,"div",2),M(1,wt,2,1,"ng-container",4),d()),e&2){let t=l(2);r(),_("nzStringTemplateOutlet",t.nzTitle)}}function Mt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),G(t.nzExtra)}}function Ot(e,n){if(e&1&&(s(0,"div",3),M(1,Mt,2,1,"ng-container",4),d()),e&2){let t=l(2);r(),_("nzStringTemplateOutlet",t.nzExtra)}}function kt(e,n){if(e&1&&(s(0,"div",0),f(1,zt,2,1,"div",2),f(2,Ot,2,1,"div",3),d()),e&2){let t=l();r(),v(t.nzTitle?1:-1),r(),v(t.nzExtra?2:-1)}}function Pt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(2).$implicit;r(),b(" ",t.title," ")}}function bt(e,n){}function Tt(e,n){if(e&1&&(s(0,"td",6)(1,"div",7)(2,"span",8),M(3,Pt,2,1,"ng-container",4),d(),s(4,"span",9),M(5,bt,0,0,"ng-template",10),d()()()),e&2){let t=l().$implicit,i=l(3);_("colSpan",t.span),r(2),P("ant-descriptions-item-no-colon",!i.nzColon),r(),_("nzStringTemplateOutlet",t.title),r(2),_("ngTemplateOutlet",t.content)}}function yt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(2).$implicit;r(),b(" ",t.title," ")}}function St(e,n){}function It(e,n){if(e&1&&(s(0,"td",8),M(1,yt,2,1,"ng-container",4),d(),s(2,"td",11),M(3,St,0,0,"ng-template",10),d()),e&2){let t=l().$implicit;r(),_("nzStringTemplateOutlet",t.title),r(),_("colSpan",t.span*2-1),r(),_("ngTemplateOutlet",t.content)}}function Dt(e,n){if(e&1&&f(0,Tt,6,5,"td",6)(1,It,4,3),e&2){let t=l(3);v(t.nzBordered?1:0)}}function Et(e,n){if(e&1&&(s(0,"tr",5),S(1,Dt,2,1,null,null,V),d()),e&2){let t=n.$implicit;r(),I(t)}}function Nt(e,n){if(e&1&&S(0,Et,3,0,"tr",5,V),e&2){let t=l();I(t.itemMatrix)}}function Rt(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l().$implicit;r(),b(" ",t.title," ")}}function Ft(e,n){if(e&1&&(s(0,"td",6)(1,"div",7)(2,"span",8),M(3,Rt,2,1,"ng-container",4),d()()()),e&2){let t=n.$implicit,i=l(4);_("colSpan",t.span),r(2),P("ant-descriptions-item-no-colon",!i.nzColon),r(),_("nzStringTemplateOutlet",t.title)}}function At(e,n){}function Lt(e,n){if(e&1&&(s(0,"td",6)(1,"div",7)(2,"span",9),M(3,At,0,0,"ng-template",10),d()()()),e&2){let t=n.$implicit;_("colSpan",t.span),r(3),_("ngTemplateOutlet",t.content)}}function Bt(e,n){if(e&1&&(s(0,"tr",5),S(1,Ft,4,4,"td",6,V),d(),s(3,"tr",5),S(4,Lt,4,2,"td",6,V),d()),e&2){let t=n.$implicit;r(),I(t),r(3),I(t)}}function Vt(e,n){if(e&1&&S(0,Bt,6,0,null,null,V),e&2){let t=l(2);I(t.itemMatrix)}}function Ht(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l().$implicit;r(),b(" ",t.title," ")}}function $t(e,n){if(e&1&&(s(0,"td",12),M(1,Ht,2,1,"ng-container",4),d()),e&2){let t=n.$implicit;_("colSpan",t.span),r(),_("nzStringTemplateOutlet",t.title)}}function jt(e,n){}function Qt(e,n){if(e&1&&(s(0,"td",11),M(1,jt,0,0,"ng-template",10),d()),e&2){let t=n.$implicit;_("colSpan",t.span),r(),_("ngTemplateOutlet",t.content)}}function Ut(e,n){if(e&1&&(s(0,"tr",5),S(1,$t,2,2,"td",12,V),d(),s(3,"tr",5),S(4,Qt,2,2,"td",11,V),d()),e&2){let t=n.$implicit;r(),I(t),r(3),I(t)}}function Gt(e,n){if(e&1&&S(0,Ut,6,0,null,null,V),e&2){let t=l(2);I(t.itemMatrix)}}function qt(e,n){if(e&1&&f(0,Vt,2,0)(1,Gt,2,0),e&2){let t=l();v(t.nzBordered?1:0)}}var Wt=(()=>{class e{content;nzSpan=1;nzTitle="";inputChange$=new Se;ngOnChanges(){this.inputChange$.next()}ngOnDestroy(){this.inputChange$.complete()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-descriptions-item"]],viewQuery:function(i,o){if(i&1&&U(He,7),i&2){let a;L(a=B())&&(o.content=a.first)}},inputs:{nzSpan:[2,"nzSpan","nzSpan",fe],nzTitle:"nzTitle"},exportAs:["nzDescriptionsItem"],features:[j],ngContentSelectors:vt,decls:1,vars:0,template:function(i,o){i&1&&(A(),$e(0,xt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return e})(),Zt="descriptions",Yt={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},Kt=(()=>{var p;let e,n=[],t=[],i,o=[],a=[],g,u=[],z=[],m,N=[],O=[];return p=class{nzConfigService=k(Ye);cdr=k(Y);breakpointService=k(tt);directionality=k(xe);destroyRef=k(ue);_nzModuleName=Zt;items;nzBordered=T(this,n,!1);nzLayout=(T(this,t),"horizontal");nzColumn=T(this,o,Yt);nzSize=(T(this,a),T(this,u,"default"));nzTitle=(T(this,z),"");nzExtra;nzColon=T(this,N,!0);itemMatrix=(T(this,O),[]);realColumn=3;dir="ltr";breakpoint=Je.md;ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(J(this.destroyRef)).subscribe(C=>{this.dir=C})}ngOnChanges(C){C.nzColumn&&this.prepareMatrix()}ngAfterContentInit(){let C=this.items.changes.pipe(Ee(this.items));ke(C,C.pipe(Ne(()=>ke(...this.items.map(c=>c.inputChange$)).pipe(De(16)))),this.breakpointService.subscribe(et).pipe(Re(c=>this.breakpoint=c))).pipe(J(this.destroyRef)).subscribe(()=>{this.prepareMatrix(),this.cdr.markForCheck()})}prepareMatrix(){if(!this.items)return;let C=[],c=0,w=this.realColumn=this.getColumn(),ge=this.items.toArray(),oe=ge.length,Te=[],ye=()=>{Te.push(C),C=[],c=0};for(let _e=0;_e<oe;_e++){let Ct=ge[_e],{nzTitle:Me,content:Oe,nzSpan:he}=Ct;c+=he,c>=w?(c>w&&We(`"nzColumn" is ${w} but we have row length ${c}`),C.push({title:Me,content:Oe,span:w-(c-he)}),ye()):_e===oe-1?(C.push({title:Me,content:Oe,span:w-(c-he)}),ye()):C.push({title:Me,content:Oe,span:he})}this.itemMatrix=Te}getColumn(){return typeof this.nzColumn!="number"?this.nzColumn[this.breakpoint]:this.nzColumn}},(()=>{let C=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],i=[K()],g=[K()],m=[K()],q(null,null,e,{kind:"field",name:"nzBordered",static:!1,private:!1,access:{has:c=>"nzBordered"in c,get:c=>c.nzBordered,set:(c,w)=>{c.nzBordered=w}},metadata:C},n,t),q(null,null,i,{kind:"field",name:"nzColumn",static:!1,private:!1,access:{has:c=>"nzColumn"in c,get:c=>c.nzColumn,set:(c,w)=>{c.nzColumn=w}},metadata:C},o,a),q(null,null,g,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:c=>"nzSize"in c,get:c=>c.nzSize,set:(c,w)=>{c.nzSize=w}},metadata:C},u,z),q(null,null,m,{kind:"field",name:"nzColon",static:!1,private:!1,access:{has:c=>"nzColon"in c,get:c=>c.nzColon,set:(c,w)=>{c.nzColon=w}},metadata:C},N,O),C&&Object.defineProperty(p,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:C})})(),ee(p,"\u0275fac",function(c){return new(c||p)}),ee(p,"\u0275cmp",y({type:p,selectors:[["nz-descriptions"]],contentQueries:function(c,w,ge){if(c&1&&Ce(ge,Wt,4),c&2){let oe;L(oe=B())&&(w.items=oe)}},hostAttrs:[1,"ant-descriptions"],hostVars:8,hostBindings:function(c,w){c&2&&P("ant-descriptions-bordered",w.nzBordered)("ant-descriptions-middle",w.nzSize==="middle")("ant-descriptions-small",w.nzSize==="small")("ant-descriptions-rtl",w.dir==="rtl")},inputs:{nzBordered:[2,"nzBordered","nzBordered",ce],nzLayout:"nzLayout",nzColumn:"nzColumn",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra",nzColon:[2,"nzColon","nzColon",ce]},exportAs:["nzDescriptions"],features:[j],decls:6,vars:3,consts:[[1,"ant-descriptions-header"],[1,"ant-descriptions-view"],[1,"ant-descriptions-title"],[1,"ant-descriptions-extra"],[4,"nzStringTemplateOutlet"],[1,"ant-descriptions-row"],[1,"ant-descriptions-item",3,"colSpan"],[1,"ant-descriptions-item-container"],[1,"ant-descriptions-item-label"],[1,"ant-descriptions-item-content"],[3,"ngTemplateOutlet"],[1,"ant-descriptions-item-content",3,"colSpan"],[1,"ant-descriptions-item-label",3,"colSpan"]],template:function(c,w){c&1&&(f(0,kt,3,2,"div",0),s(1,"div",1)(2,"table")(3,"tbody"),f(4,Nt,2,0),f(5,qt,2,1),d()()()),c&2&&(v(w.nzTitle||w.nzExtra?0:-1),r(4),v(w.nzLayout==="horizontal"?4:-1),r(),v(w.nzLayout==="vertical"?5:-1))},dependencies:[me,de,ie],encapsulation:2,changeDetection:0})),p})(),Oi=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=ne({type:e});static \u0275inj=te({imports:[Kt]})}return e})();var Jt=["template"],ct=["*"];function en(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),G(t.nzLabel)}}function tn(e,n){if(e&1&&(s(0,"div",2),M(1,en,2,1,"ng-container",5),d()),e&2){let t=l(2);r(),_("nzStringTemplateOutlet",t.nzLabel)}}function nn(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(2);r(),G(t.nzDot)}}function on(e,n){if(e&1&&(s(0,"li",1),f(1,tn,2,1,"div",2),X(2,"div",3),s(3,"div",4),M(4,nn,2,1,"ng-container",5),d(),s(5,"div",6),E(6),d()()),e&2){let t=l();P("ant-timeline-item-right",(t.nzPosition||t.position)==="right")("ant-timeline-item-left",(t.nzPosition||t.position)==="left")("ant-timeline-item-last",t.isLast),r(),v(t.nzLabel?1:-1),r(2),Z("border-color",t.borderColor),P("ant-timeline-item-head-red",t.nzColor==="red")("ant-timeline-item-head-blue",t.nzColor==="blue")("ant-timeline-item-head-green",t.nzColor==="green")("ant-timeline-item-head-gray",t.nzColor==="gray")("ant-timeline-item-head-custom",!!t.nzDot),r(),_("nzStringTemplateOutlet",t.nzDot)}}function rn(e,n){if(e&1&&ae(0,2),e&2){l();let t=le(6);_("ngTemplateOutlet",t)}}function an(e,n){}function ln(e,n){if(e&1&&M(0,an,0,0,"ng-template",2),e&2){let t=n.$implicit;_("ngTemplateOutlet",t.template)}}function sn(e,n){if(e&1&&ae(0,2),e&2){l();let t=le(6);_("ngTemplateOutlet",t)}}function cn(e,n){e&1&&X(0,"nz-icon",8)}function dn(e,n){if(e&1&&(R(0),x(1),f(2,cn,1,0,"nz-icon",8),F()),e&2){let t=l(3);r(),b(" ",t.nzPendingDot," "),r(),v(t.nzPendingDot?-1:2)}}function mn(e,n){if(e&1&&(R(0),x(1),F()),e&2){let t=l(3);r(),b(" ",t.isPendingBoolean?"":t.nzPending," ")}}function pn(e,n){if(e&1&&(s(0,"li",3),X(1,"div",4),s(2,"div",5),M(3,dn,3,2,"ng-container",6),d(),s(4,"div",7),M(5,mn,2,1,"ng-container",6),d()()),e&2){let t=l(2);r(3),_("nzStringTemplateOutlet",t.nzPendingDot),r(2),_("nzStringTemplateOutlet",t.nzPending)}}function gn(e,n){if(e&1&&f(0,pn,6,2,"li",3),e&2){let t=l();v(t.nzPending?0:-1)}}var be=(()=>{class e{check$=new Ie(1);markForCheck(){this.check$.next()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=Fe({token:e,factory:e.\u0275fac})}return e})(),_n=["red","blue","green","grey","gray"];function hn(e){return _n.findIndex(n=>n===e)!==-1}var dt=(()=>{class e{cdr=k(Y);timelineService=k(be);template;nzPosition;nzColor="blue";nzDot;nzLabel;isLast=!1;borderColor=null;position;ngOnChanges(t){this.timelineService.markForCheck();let{nzColor:i}=t;i&&this.updateCustomColor()}detectChanges(){this.cdr.detectChanges()}updateCustomColor(){this.borderColor=hn(this.nzColor)?null:this.nzColor}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-timeline-item"],["","nz-timeline-item",""]],viewQuery:function(i,o){if(i&1&&U(Jt,5),i&2){let a;L(a=B())&&(o.template=a.first)}},inputs:{nzPosition:"nzPosition",nzColor:"nzColor",nzDot:"nzDot",nzLabel:"nzLabel"},exportAs:["nzTimelineItem"],features:[j],ngContentSelectors:ct,decls:2,vars:0,consts:[["template",""],[1,"ant-timeline-item"],[1,"ant-timeline-item-label"],[1,"ant-timeline-item-tail"],[1,"ant-timeline-item-head"],[4,"nzStringTemplateOutlet"],[1,"ant-timeline-item-content"]],template:function(i,o){i&1&&(A(),M(0,on,7,20,"ng-template",null,0,se))},dependencies:[me,de],encapsulation:2,changeDetection:0})}return e})(),un=(()=>{class e{cdr=k(Y);timelineService=k(be);directionality=k(xe);destroyRef=k(ue);listOfItems;nzMode="left";nzPending;nzPendingDot;nzReverse=!1;isPendingBoolean=!1;timelineItems=[];dir="ltr";hasLabelItem=!1;ngOnChanges(t){let{nzMode:i,nzReverse:o,nzPending:a}=t;(st(i)||st(o))&&this.updateChildren(),a&&(this.isPendingBoolean=a.currentValue===!0)}ngOnInit(){this.timelineService.check$.pipe(J(this.destroyRef)).subscribe(()=>{this.cdr.markForCheck()}),this.directionality.change?.pipe(J(this.destroyRef)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterContentInit(){this.updateChildren(),this.listOfItems.changes.pipe(J(this.destroyRef)).subscribe(()=>{this.updateChildren()})}updateChildren(){if(this.listOfItems&&this.listOfItems.length){let t=this.listOfItems.length,i=!1;this.listOfItems.forEach((o,a)=>{o.isLast=this.nzReverse?a===0:a===t-1,o.position=Cn(a,this.nzMode),!i&&o.nzLabel&&(i=!0),o.detectChanges()}),this.timelineItems=this.nzReverse?this.listOfItems.toArray().reverse():this.listOfItems.toArray(),this.hasLabelItem=i}else this.timelineItems=[],this.hasLabelItem=!1;this.cdr.markForCheck()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-timeline"]],contentQueries:function(i,o,a){if(i&1&&Ce(a,dt,4),i&2){let g;L(g=B())&&(o.listOfItems=g)}},inputs:{nzMode:"nzMode",nzPending:"nzPending",nzPendingDot:"nzPendingDot",nzReverse:[2,"nzReverse","nzReverse",ce]},exportAs:["nzTimeline"],features:[Qe([be]),j],ngContentSelectors:ct,decls:8,vars:14,consts:[["pendingTemplate",""],[1,"ant-timeline"],[3,"ngTemplateOutlet"],[1,"ant-timeline-item","ant-timeline-item-pending"],[1,"ant-timeline-item-tail"],[1,"ant-timeline-item-head","ant-timeline-item-head-custom","ant-timeline-item-head-blue"],[4,"nzStringTemplateOutlet"],[1,"ant-timeline-item-content"],["nzType","loading"]],template:function(i,o){i&1&&(A(),s(0,"ul",1),f(1,rn,1,1,"ng-container",2),S(2,ln,1,1,null,2,V),f(4,sn,1,1,"ng-container",2),d(),M(5,gn,1,1,"ng-template",null,0,se),E(7)),i&2&&(P("ant-timeline-label",o.hasLabelItem)("ant-timeline-right",!o.hasLabelItem&&o.nzMode==="right")("ant-timeline-alternate",o.nzMode==="alternate"||o.nzMode==="custom")("ant-timeline-pending",!!o.nzPending)("ant-timeline-reverse",o.nzReverse)("ant-timeline-rtl",o.dir==="rtl"),r(),v(o.nzReverse?1:-1),r(),I(o.timelineItems),r(2),v(o.nzReverse?-1:4))},dependencies:[ie,me,de,ze,we],encapsulation:2,changeDetection:0})}return e})();function st(e){return!!(e&&(e.previousValue!==e.currentValue||e.isFirstChange()))}function Cn(e,n){if(n!=="custom")return n==="left"||n==="right"?n:n==="alternate"&&e%2===0?"left":"right"}var $i=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=ne({type:e});static \u0275inj=te({imports:[dt,un]})}return e})();function Qi(e,n,t,i){let o=(e??"").trim();if(!o)return{summary:"",imageUrl:null,imageAlt:""};let a=null,g="",u=/!\[([^\]]*)\]\(([^)]+)\)/.exec(o);if(u&&(g=u[1]?.trim()??"",a=fn(u[2]??"",n,t,i)),!a){let m=/<img\b[^>]*\bsrc\s*=\s*['"]([^'"]+)['"][^>]*>/i.exec(o);m&&(a=m[1]?.trim()??null,g=/<img\b[^>]*\balt\s*=\s*['"]([^'"]*)['"][^>]*>/i.exec(m[0]??"")?.[1]?.trim()??"")}return{summary:o.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"\u3010\u56FE\u7247\u3011").replace(/<img\b[^>]*>/gi," ").replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s*>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"").replace(/<\/?[^>]+>/g," ").replace(/[*_~]/g,"").replace(/\r?\n+/g," ").replace(/\s+/g," ").trim(),imageUrl:a||null,imageAlt:g}}function fn(e,n,t,i){let o=e.trim();if(!o)return null;let a=o.match(/\/api\/admin\/uploads\/([a-zA-Z0-9_-]+)\/raw/);if(!a)return o;let g=a[1];return`/api/client/hub-token/projects/${n}/${i}/${t}/uploads/${g}/raw`}function Ui(e,n,t,i){let o=/!\[.*?\]\((\/api\/admin\/uploads\/[a-zA-Z0-9_-]+\/raw)\)/g;return e.replace(o,(a,g)=>{let u=g.match(/uploads\/([a-zA-Z0-9_-]+)/);if(!u)return a;let z=u[1],m=`/api/client/hub-token/projects/${n}/${i}/${t}/uploads/${z}/raw`;return a.replace(g,m)})}function Gi(e,n,t,i){let o=[],a=/!\[.*?\]\((\/api\/admin\/uploads\/[a-zA-Z0-9_-]+\/raw)\)/g;return{text:e.replace(a,(u,z)=>{let m=z.match(/uploads\/([a-zA-Z0-9_-]+)/);if(!m)return u;let N=m[1],O=`/api/client/hub-token/projects/${n}/${i}/${t}/uploads/${N}/raw`;return o.push(O),""}).replace(/\n{2,}/g,`
2
+ `).trim(),imgUrls:o}}function qi(e,n,t=/(@[^\s@,,.。;;::!?!?]+)/g){if(!e)return[];let i=new Set(n),o=[],a=0,g=new RegExp(t.source,t.flags);for(let u of e.matchAll(g)){let z=u.index,m=u[0],N=m.slice(1);z>a&&o.push({text:e.slice(a,z)}),o.push({text:m,mention:i.has(N)}),a=z+m.length}return a<e.length&&o.push({text:e.slice(a)}),o}var vn=["textRef"],xn=["*"];function wn(e,n){e&1&&E(0)}function zn(e,n){e&1&&ae(0)}function Mn(e,n){if(e&1&&M(0,zn,1,0,"ng-container",4),e&2){l();let t=le(5);_("ngTemplateOutlet",t)}}function On(e,n){if(e&1&&x(0),e&2){let t=l();b(" ",t.text()," ")}}function kn(e,n){if(e&1){let t=W();s(0,"a",5),Q("click",function(){H(t);let o=l();return $(o.toggle())}),x(1),d()}if(e&2){let t=l();r(),b(" ",t.expanded()?"\u6536\u8D77":"\u5C55\u5F00"," ")}}var mt=class e{text=D("");lines=D(2);maxHeight=D(null);enableToggle=D(!0);textRef;observer;expanded=Pe(!1);showToggle=Pe(!1);hasTextInput=Ge(()=>!!this.text());ngAfterViewInit(){this.checkOverflow(),this.initObserver()}ngOnDestroy(){this.observer?.disconnect()}constructor(){qe(()=>{this.text(),this.lines(),setTimeout(()=>this.checkOverflow())})}initObserver(){let n=this.textRef?.nativeElement;n&&(this.observer=new MutationObserver(()=>{this.checkOverflow()}),this.observer.observe(n,{childList:!0,subtree:!0,characterData:!0}))}checkOverflow(){this.toggle(!1),this.showToggle.set(!1);let n=this.textRef?.nativeElement;n&&requestAnimationFrame(()=>{let t=n.scrollHeight>n.clientHeight,i=this.maxHeight()!=null&&n.scrollHeight>this.maxHeight();this.showToggle.set(t||i)})}toggle(n){n!==void 0?this.expanded.set(n):this.expanded.update(t=>!t)}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=y({type:e,selectors:[["app-ellipsis-text"]],viewQuery:function(t,i){if(t&1&&U(vn,5),t&2){let o;L(o=B())&&(i.textRef=o.first)}},inputs:{text:[1,"text"],lines:[1,"lines"],maxHeight:[1,"maxHeight"],enableToggle:[1,"enableToggle"]},ngContentSelectors:xn,decls:7,vars:8,consts:[["textRef",""],["textTpl",""],[1,"text"],[1,"toggle"],[4,"ngTemplateOutlet"],[1,"toggle",3,"click"]],template:function(t,i){t&1&&(A(),s(0,"span",2,0),f(2,wn,1,0)(3,Mn,1,1,"ng-container"),M(4,On,1,1,"ng-template",null,1,se),d(),f(6,kn,2,1,"a",3)),t&2&&(Z("--line-clamp",i.lines())("--max-height",i.maxHeight(),"px"),P("expanded",i.expanded()),r(2),v(i.hasTextInput()?3:2),r(4),v(i.showToggle()&&i.enableToggle()?6:-1))},dependencies:[ve,ie],styles:[".text[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word;-webkit-line-clamp:var(--line-clamp);max-height:var(--max-height)}.text.expanded[_ngcontent-%COMP%]{-webkit-line-clamp:unset!important;max-height:none!important}.toggle[_ngcontent-%COMP%]{font-size:.8rem;font-weight:700;color:#1677ff;cursor:pointer;-webkit-user-select:none;user-select:none}"]})};var Pn=[[["","actions",""]],"*"],bn=["[actions]","*"],Tn=e=>({maxHeight:e});function yn(e,n){if(e&1&&X(0,"nz-badge",5),e&2){let t=l(2);_("nzCount",t.count())}}function Sn(e,n){if(e&1&&(s(0,"div",1)(1,"h2",4),x(2),f(3,yn,1,1,"nz-badge",5),d(),E(4),d()),e&2){let t=l();r(2),b(" ",t.title()," "),r(),v(t.count()!==null?3:-1)}}function In(e,n){if(e&1&&(s(0,"div",3),x(1),d()),e&2){let t=l();r(),G(t.emptyText())}}function Dn(e,n){e&1&&E(0,1)}var gt=class e{title=D();maxHeight=D();count=D(null);emptyStatus=D(!1);emptyText=D("\u6682\u65E0\u6570\u636E");static \u0275fac=function(t){return new(t||e)};static \u0275cmp=y({type:e,selectors:[["app-detail-item-card"]],inputs:{title:[1,"title"],maxHeight:[1,"maxHeight"],count:[1,"count"],emptyStatus:[1,"emptyStatus"],emptyText:[1,"emptyText"]},ngContentSelectors:bn,decls:5,vars:6,consts:[[1,"detail-item"],[1,"actions"],[1,"content"],[1,"empty"],[1,"wrap-title"],["nzStandalone","","nzShowZero","","nzColor","#eaeaea",3,"nzCount"]],template:function(t,i){t&1&&(A(Pn),s(0,"nz-card",0),f(1,Sn,5,2,"div",1),s(2,"div",2),f(3,In,2,1,"div",3)(4,Dn,1,0),d()()),t&2&&(je(Ue(4,Tn,i.maxHeight())),r(),v(i.title()?1:-1),r(2),v(i.emptyStatus()?3:4))},dependencies:[Xe,Ke,it,nt],styles:[".detail-item[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}.detail-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{margin-bottom:12px;padding:0 4px 4px;display:flex;border-bottom:1px solid #f0f0f0}.detail-item[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] .wrap-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:0;width:100%;font-size:18px;font-weight:700}[_nghost-%COMP%] .ant-card-body{min-height:0;height:100%;flex:1;display:flex;flex-direction:column}.content[_ngcontent-%COMP%]{overflow-y:auto;flex:1}.empty[_ngcontent-%COMP%]{font-size:.875rem;text-align:center;color:gray}[_nghost-%COMP%] .ant-card-bordered{border-radius:10px}"]})};var En=["textEl"],_t=["*"];function Nn(e,n){if(e&1&&X(0,"nz-icon",1),e&2){let t=l();_("nzType",t.nzIcon)}}function Rn(e,n){if(e&1){let t=W();s(0,"img",4),Q("error",function(o){H(t);let a=l();return $(a.imgError(o))}),d()}if(e&2){let t=l();_("src",t.nzSrc,Le),re("srcset",t.nzSrcSet)("alt",t.nzAlt)("loading",t.nzLoading()||"eager")("fetchpriority",t.nzFetchPriority()||"auto")}}function Fn(e,n){if(e&1&&(s(0,"span",3,0),x(2),d()),e&2){let t=l();r(2),G(t.nzText)}}var An="avatar",Ln=(()=>{var m;let e,n=[],t=[],i,o=[],a=[],g,u=[],z=[];return m=class{_nzModuleName=An;nzShape=T(this,n,"circle");nzSize=(T(this,t),T(this,o,"default"));nzGap=(T(this,a),T(this,u,4));nzText=T(this,z);nzSrc;nzSrcSet;nzAlt;nzIcon;nzLoading=D();nzFetchPriority=D();nzError=new Be;hasText=!1;hasSrc=!0;hasIcon=!1;customSize=null;textEl;el=k(Ae).nativeElement;cdr=k(Y);constructor(){Ve(()=>this.calcStringSize())}imgError(O){this.nzError.emit(O),O.defaultPrevented||(this.hasSrc=!1,this.hasIcon=!1,this.hasText=!1,this.nzIcon?this.hasIcon=!0:this.nzText&&(this.hasText=!0),this.cdr.detectChanges(),this.setSizeStyle(),this.calcStringSize())}ngOnChanges(){this.hasText=!this.nzSrc&&!!this.nzText,this.hasIcon=!this.nzSrc&&!!this.nzIcon,this.hasSrc=!!this.nzSrc,this.setSizeStyle(),this.calcStringSize()}calcStringSize(){if(!this.hasText||!this.textEl)return;let O=this.textEl.nativeElement,p=O.offsetWidth,h=this.el.getBoundingClientRect?.().width??0,C=this.nzGap*2<h?this.nzGap*2:8,c=h-C<p?(h-C)/p:1;O.style.transform=`scale(${c}) translateX(-50%)`,O.style.lineHeight=this.customSize||""}setSizeStyle(){typeof this.nzSize=="number"?this.customSize=Ze(this.nzSize):this.customSize=null,this.cdr.markForCheck()}},(()=>{let O=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],i=[K()],g=[K()],q(null,null,e,{kind:"field",name:"nzShape",static:!1,private:!1,access:{has:p=>"nzShape"in p,get:p=>p.nzShape,set:(p,h)=>{p.nzShape=h}},metadata:O},n,t),q(null,null,i,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:p=>"nzSize"in p,get:p=>p.nzSize,set:(p,h)=>{p.nzSize=h}},metadata:O},o,a),q(null,null,g,{kind:"field",name:"nzGap",static:!1,private:!1,access:{has:p=>"nzGap"in p,get:p=>p.nzGap,set:(p,h)=>{p.nzGap=h}},metadata:O},u,z),O&&Object.defineProperty(m,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:O})})(),ee(m,"\u0275fac",function(p){return new(p||m)}),ee(m,"\u0275cmp",y({type:m,selectors:[["nz-avatar"]],viewQuery:function(p,h){if(p&1&&U(En,5),p&2){let C;L(C=B())&&(h.textEl=C.first)}},hostAttrs:[1,"ant-avatar"],hostVars:20,hostBindings:function(p,h){p&2&&(Z("width",h.customSize)("height",h.customSize)("line-height",h.customSize)("font-size",h.hasIcon&&h.customSize?h.nzSize/2:null,"px"),P("ant-avatar-lg",h.nzSize==="large")("ant-avatar-sm",h.nzSize==="small")("ant-avatar-square",h.nzShape==="square")("ant-avatar-circle",h.nzShape==="circle")("ant-avatar-icon",h.nzIcon)("ant-avatar-image",h.hasSrc))},inputs:{nzShape:"nzShape",nzSize:"nzSize",nzGap:[2,"nzGap","nzGap",fe],nzText:"nzText",nzSrc:"nzSrc",nzSrcSet:"nzSrcSet",nzAlt:"nzAlt",nzIcon:"nzIcon",nzLoading:[1,"nzLoading"],nzFetchPriority:[1,"nzFetchPriority"]},outputs:{nzError:"nzError"},exportAs:["nzAvatar"],features:[j],ngContentSelectors:_t,decls:4,vars:1,consts:[["textEl",""],[3,"nzType"],[3,"src"],[1,"ant-avatar-string"],[3,"error","src"]],template:function(p,h){p&1&&(A(),f(0,Nn,1,1,"nz-icon",1)(1,Rn,1,5,"img",2)(2,Fn,3,1,"span",3),E(3)),p&2&&v(h.nzIcon&&h.hasIcon?0:h.nzSrc&&h.hasSrc?1:h.nzText&&h.hasText?2:-1)},dependencies:[ze,we],encapsulation:2,changeDetection:0})),m})(),Oo=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["nz-avatar-group"]],hostAttrs:[1,"ant-avatar-group"],exportAs:["nzAvatarGroup"],ngContentSelectors:_t,decls:1,vars:0,template:function(i,o){i&1&&(A(),E(0))},encapsulation:2,changeDetection:0})}return e})(),ko=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=ne({type:e});static \u0275inj=te({imports:[Ln]})}return e})();var Bn=["viewerRef"],ut=(e,n)=>n.id;function Vn(e,n){if(e&1){let t=W();s(0,"li")(1,"button",12),Q("click",function(){let o=H(t).$implicit,a=l(3);return $(a.jumpToHeading(o.id))}),x(2),d()()}if(e&2){let t=n.$implicit,i=l(3);r(),Z("padding-left",(t.level-1)*12,"px"),P("is-active",i.activeTocId===t.id),re("data-toc-id",t.id),r(),b(" ",t.text," ")}}function Hn(e,n){if(e&1&&(s(0,"aside",9)(1,"div",10),x(2,"On this page"),d(),s(3,"ul",11),S(4,Vn,3,6,"li",null,ut),d()()),e&2){let t=l(2);r(4),I(t.tocItems)}}function $n(e,n){if(e&1){let t=W();s(0,"div",7)(1,"button",8),Q("click",function(){H(t);let o=l();return $(o.toggleToc())}),x(2),d(),f(3,Hn,6,0,"aside",9),d()}if(e&2){let t=l();P("is-collapsed",t.tocCollapsed),r(2),b(" ",t.tocCollapsed?"\u76EE\u5F55":"\u6536\u8D77\u76EE\u5F55"," "),r(),v(t.tocCollapsed?-1:3)}}function jn(e,n){if(e&1){let t=W();s(0,"li")(1,"button",12),Q("click",function(){let o=H(t).$implicit,a=l(2);return $(a.jumpToHeading(o.id))}),x(2),d()()}if(e&2){let t=n.$implicit,i=l(2);r(),Z("padding-left",(t.level-1)*12,"px"),P("is-active",i.activeTocId===t.id),re("data-toc-id",t.id),r(),b(" ",t.text," ")}}function Qn(e,n){if(e&1&&(s(0,"aside",4)(1,"div",10),x(2,"On this page"),d(),s(3,"ul",11),S(4,jn,3,6,"li",null,ut),d()()),e&2){let t=l();r(4),I(t.tocItems)}}var ht=class e{imageService=k(ot);cdr=k(Y);viewerRef;content="";showToc=!0;tocVariant="inline";tocCollapsedByDefault=!1;tocItems=[];activeTocId=null;tocCollapsed=!1;headingElements=[];scrollContainer=null;scrollListener=null;ngOnChanges(n){(n.content||n.showToc||n.tocCollapsedByDefault||n.tocVariant)&&queueMicrotask(()=>this.buildToc())}onMarkdownReady(){this.buildToc()}ngOnDestroy(){this.teardownScrollTracking()}jumpToHeading(n){let i=this.viewerRef?.nativeElement?.querySelector(`#${CSS.escape(n)}`);if(!i)return;this.activeTocId=n,this.cdr.markForCheck(),queueMicrotask(()=>this.ensureActiveTocItemVisible());let o=this.scrollContainer instanceof HTMLElement?this.scrollContainer:null,a=16;if(o){let u=o.getBoundingClientRect(),z=i.getBoundingClientRect(),m=o.scrollTop+(z.top-u.top)-a;o.scrollTo({top:Math.max(0,m),behavior:"smooth"});return}let g=i.getBoundingClientRect().top+window.scrollY-88;window.scrollTo({top:Math.max(0,g),behavior:"smooth"})}toggleToc(){this.tocCollapsed=!this.tocCollapsed}onContentClick(n){let i=n.target?.closest("img");if(!i?.src)return;let o=this.viewerRef?.nativeElement,a=o?Array.from(o.querySelectorAll("img")):[i],g=a.map(m=>({src:m.currentSrc||m.src,alt:m.alt||void 0})).filter(m=>!!m.src),u=Math.max(0,a.findIndex(m=>m===i));if(g.length===0)return;let z=this.imageService.preview(g,{nzMaskClosable:!0,nzKeyboard:!0});u>0&&z.switchTo(u)}buildToc(){if(!this.showToc){this.tocItems=[],this.activeTocId=null,this.tocCollapsed=!0,this.teardownScrollTracking(),this.cdr.markForCheck();return}let n=this.viewerRef?.nativeElement;if(!n){this.tocItems=[],this.activeTocId=null,this.tocCollapsed=this.tocCollapsedByDefault,this.teardownScrollTracking(),this.cdr.markForCheck();return}let t=Array.from(n.querySelectorAll("h1, h2, h3")),i=new Map,o=[];for(let a=0;a<t.length;a+=1){let g=t[a],u=(g.textContent||"").trim();if(!u)continue;let z=Number(g.tagName.slice(1))||1,m=this.slugify(u)||`section-${a+1}`,N=i.get(m)??0;i.set(m,N+1),N>0&&(m=`${m}-${N+1}`),g.id=g.id||m,o.push({id:g.id,text:u,level:z})}this.tocItems=o,this.activeTocId=o[0]?.id??null,this.tocCollapsed=this.tocCollapsedByDefault,this.setupScrollTracking(n,t),this.cdr.markForCheck()}setupScrollTracking(n,t){if(this.teardownScrollTracking(),t.length===0)return;this.headingElements=t;let i=this.findScrollContainer(n);this.scrollContainer=i??window,this.scrollListener=()=>this.syncActiveHeading(),this.scrollContainer.addEventListener("scroll",this.scrollListener,{passive:!0}),window.addEventListener("resize",this.scrollListener,{passive:!0}),this.syncActiveHeading()}teardownScrollTracking(){this.scrollListener&&(this.scrollContainer?.removeEventListener("scroll",this.scrollListener),window.removeEventListener("resize",this.scrollListener)),this.headingElements=[],this.scrollContainer=null,this.scrollListener=null}syncActiveHeading(){if(this.headingElements.length===0)return;let n=96,t=this.headingElements[0],i=this.scrollContainer instanceof HTMLElement?this.scrollContainer:null;if(i){let o=i.getBoundingClientRect(),a=i.scrollTop+n;Math.max(i.scrollHeight-i.clientHeight,0)-i.scrollTop<=2&&(t=this.headingElements[this.headingElements.length-1]);for(let z of this.headingElements)if(z.getBoundingClientRect().top-o.top+i.scrollTop<=a)t=z;else break}else for(let o of this.headingElements)if(o.getBoundingClientRect().top<=n)t=o;else break;!t.id||t.id===this.activeTocId||(this.activeTocId=t.id,this.cdr.markForCheck(),queueMicrotask(()=>this.ensureActiveTocItemVisible()))}ensureActiveTocItemVisible(){let n=this.viewerRef?.nativeElement;if(!n||!this.activeTocId)return;let t=n.querySelector(`.markdown-toc__item[data-toc-id="${CSS.escape(this.activeTocId)}"]`);if(!t)return;let i=t.closest(".markdown-toc--floating, .markdown-toc");if(!i)return;t.scrollIntoView({block:"nearest",inline:"nearest"});let o=t.offsetTop,a=o+t.offsetHeight,g=i.scrollTop,u=g+i.clientHeight;o<g?i.scrollTop=Math.max(o-8,0):a>u&&(i.scrollTop=a-i.clientHeight+8)}findScrollContainer(n){let t=n.parentElement;for(;t;){let o=getComputedStyle(t).overflowY;if((o==="auto"||o==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}slugify(n){return n.toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\u4e00-\u9fa5-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=y({type:e,selectors:[["app-markdown-viewer"]],viewQuery:function(t,i){if(t&1&&U(Bn,7),t&2){let o;L(o=B())&&(i.viewerRef=o.first)}},inputs:{content:"content",showToc:"showToc",tocVariant:"tocVariant",tocCollapsedByDefault:"tocCollapsedByDefault"},features:[j],decls:7,vars:6,consts:[["viewerRef",""],[1,"markdown-viewer","markdown-body",3,"click"],[1,"markdown-layout"],[1,"markdown-toc-floating",3,"is-collapsed"],[1,"markdown-toc"],[1,"markdown-content"],[3,"ready","data","clipboard"],[1,"markdown-toc-floating"],["type","button",1,"markdown-toc-floating__toggle",3,"click"],[1,"markdown-toc","markdown-toc--floating"],[1,"markdown-toc__title"],[1,"markdown-toc__list"],["type","button",1,"markdown-toc__item",3,"click"]],template:function(t,i){if(t&1){let o=W();s(0,"div",1,0),Q("click",function(g){return H(o),$(i.onContentClick(g))}),s(2,"div",2),f(3,$n,4,4,"div",3),f(4,Qn,6,0,"aside",4),s(5,"div",5)(6,"markdown",6),Q("ready",function(){return H(o),$(i.onMarkdownReady())}),d()()()()}t&2&&(r(2),P("has-toc",i.showToc&&i.tocItems.length>0&&i.tocVariant==="inline"),r(),v(i.showToc&&i.tocItems.length>0&&i.tocVariant==="floating"?3:-1),r(),v(i.showToc&&i.tocItems.length>0&&i.tocVariant==="inline"?4:-1),r(2),_("data",i.content)("clipboard",!0))},dependencies:[ve,lt,at,rt],styles:['[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%]{font-size:14px;line-height:1.8;color:var(--text-primary, #262626);word-break:break-word}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-layout[_ngcontent-%COMP%]{display:block;position:relative}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-layout.has-toc[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-content[_ngcontent-%COMP%]{min-width:0;order:1;display:flow-root}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating[_ngcontent-%COMP%]{position:sticky;top:8px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:8px;float:right;clear:right;margin:0 0 8px 16px;width:fit-content}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%]{height:30px;min-width:64px;padding:0 10px;border:1px solid var(--border-color-soft, #d9dde6);border-radius:999px;background:var(--surface-elevated, rgba(255, 255, 255, .92));color:var(--text-secondary, #475569);font-size:12px;line-height:28px;cursor:pointer;box-shadow:0 6px 16px #0f172a1a;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%]:hover{color:var(--text-primary, #0f172a)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%]{width:220px;max-height:min(55vh,420px);overflow:auto;margin:0;padding:10px 0 10px 14px;border-radius:14px;border:1px solid var(--border-color-soft, #e5e6eb);background:var(--surface-elevated, rgba(255, 255, 255, .96));box-shadow:0 14px 28px #0f172a29;position:static}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc.markdown-toc--floating[_ngcontent-%COMP%]{position:static;top:auto;order:initial;border-left:0;padding-left:14px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc[_ngcontent-%COMP%]{margin:0;padding:6px 0 6px 18px;border-left:1px solid var(--border-color-soft, #e5e6eb);position:sticky;top:76px;order:2;min-width:0;max-height:min(68vh,calc(100vh - 140px));overflow:auto}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__title[_ngcontent-%COMP%]{margin:0 0 10px;font-size:14px;font-weight:700;color:var(--text-heading, #1f2937)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:grid;gap:2px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]{position:relative;width:100%;min-height:30px;border:0;border-radius:0;background:transparent;color:var(--text-muted, #64748b);text-align:left;font-size:13px;line-height:1.45;padding:4px 8px 4px 10px;cursor:pointer;white-space:normal;word-break:break-word;overflow-wrap:anywhere}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover{background:transparent;color:var(--text-primary, #0f172a)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%]{color:var(--primary-500, #2563eb);font-weight:600}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%]:after{content:"";position:absolute;left:2px;top:7px;bottom:7px;width:2px;border-radius:999px;background:var(--primary-500, #2563eb)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]{padding-left:10px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h2, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h3, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h4, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h5, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h6{margin:1.2em 0 .6em;font-weight:600;line-height:1.4;word-break:break-word;overflow-wrap:anywhere}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h1{font-size:28px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h2{font-size:24px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h3{font-size:20px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h2, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h3, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h4, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h5, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] h6{scroll-margin-top:88px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] p{margin:0 0 12px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] ul, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] ol{margin:0 0 12px;padding-left:24px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] li{margin:4px 0}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] blockquote{margin:0 0 12px;padding:8px 12px;color:#595959;border-left:4px solid #d9d9d9;background:#fafafa}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] pre{overflow:auto;padding:12px 14px;border-radius:8px;background:#f6f8fa;border:1px solid var(--border-color-soft, #e5e6eb)}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] code{font-family:Consolas,Courier New,monospace}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] :not(pre)>code{padding:2px 6px;border-radius:6px;background:var(--bg-subtle, #f5f7fa);border:1px solid var(--border-color-soft, #e5e6eb);color:var(--text-primary, #262626);font-size:13px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] pre code{background:transparent;border:0;padding:0;color:inherit;font-size:13px;line-height:1.7}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] table{width:100%;margin:0 0 12px;border-collapse:collapse}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] th, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] td{padding:8px 10px;border:1px solid #e5e6eb;text-align:left}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] img{display:block;max-width:100%;width:auto;max-height:min(32vh,100px);margin:12px 0;border-radius:10px;object-fit:contain;border:1px solid var(--border-color-soft, #e5e6eb);background:var(--bg-elevated, #fff);cursor:zoom-in;box-shadow:0 4px 12px #0f172a14}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] a{color:#1677ff;text-decoration:none}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] a:hover{text-decoration:underline}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] pre, html[data-theme="dark"] [_nghost-%COMP%] pre{background:#0f172a;border-color:#94a3b83d}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] :not(pre)>code, html[data-theme="dark"] [_nghost-%COMP%] :not(pre)>code{background:#94a3b824;border-color:#94a3b83d;color:#e2e8f0}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc[_ngcontent-%COMP%]{border-color:#94a3b83d;background:transparent}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%]{border-color:#94a3b847;background:#162033!important;box-shadow:0 14px 28px #02061773}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc-floating__toggle[_ngcontent-%COMP%]{border-color:#94a3b84d!important;background:#162033!important;color:#e2e8f0!important;box-shadow:0 10px 22px #0206176b}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__title[_ngcontent-%COMP%]{color:#e2e8f0}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]{color:#cbd5e1}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, html.dark [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover, body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item[_ngcontent-%COMP%]:hover{color:#f1f5f9}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], html[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] html.dark[_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], html.dark [_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], [_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] body[data-theme="dark"][_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%], body[data-theme="dark"] [_nghost-%COMP%] .markdown-toc__item.is-active[_ngcontent-%COMP%]{color:#60a5fa}@media (max-width: 1024px){[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-layout.has-toc[_ngcontent-%COMP%]{grid-template-columns:1fr}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc[_ngcontent-%COMP%]{position:static;margin-bottom:12px}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc-floating[_ngcontent-%COMP%]{position:static;margin-bottom:8px;align-items:flex-start}[_nghost-%COMP%] .markdown-viewer[_ngcontent-%COMP%] .markdown-toc--floating[_ngcontent-%COMP%]{width:100%;max-height:none}}'],changeDetection:0})};export{Wt as a,Kt as b,Oi as c,dt as d,un as e,$i as f,Un as g,Gn as h,qn as i,Wn as j,Zn as k,Yn as l,Kn as m,Xn as n,Jn as o,ei as p,gt as q,Ln as r,Oo as s,ko as t,ni as u,ii as v,oi as w,ht as x,Qi as y,Ui as z,Gi as A,qi as B,mt as C};