@edspencer/paddock 0.64.0 → 0.66.0

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 (97) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/packages/server/dist/cli/args.d.ts +4 -4
  4. package/packages/server/dist/cli/args.js +5 -5
  5. package/packages/server/dist/cli/paddock.js +1 -1
  6. package/packages/server/dist/config.d.ts +7 -0
  7. package/packages/server/dist/config.js +9 -1
  8. package/packages/server/dist/herdctl.d.ts +89 -0
  9. package/packages/server/dist/herdctl.js +169 -2
  10. package/packages/server/dist/instance-config.js +12 -1
  11. package/packages/server/dist/management-ops.js +40 -1
  12. package/packages/server/dist/management-policy.d.ts +4 -3
  13. package/packages/server/dist/management-policy.js +5 -2
  14. package/packages/server/dist/projects.d.ts +23 -3
  15. package/packages/server/dist/projects.js +54 -7
  16. package/packages/server/dist/routes/chats.js +77 -6
  17. package/packages/server/dist/routes/projects.js +22 -2
  18. package/packages/server/dist/schema-version.d.ts +111 -0
  19. package/packages/server/dist/schema-version.js +142 -0
  20. package/packages/server/dist/self-mcp-descriptions.d.ts +1 -0
  21. package/packages/server/dist/self-mcp-descriptions.js +14 -1
  22. package/packages/server/dist/self-mcp-types.d.ts +26 -4
  23. package/packages/server/dist/self-mcp-write.d.ts +21 -0
  24. package/packages/server/dist/self-mcp-write.js +44 -0
  25. package/packages/server/dist/self-mcp.d.ts +7 -6
  26. package/packages/server/dist/self-mcp.js +36 -10
  27. package/packages/server/dist/subagents.d.ts +65 -0
  28. package/packages/server/dist/subagents.js +159 -19
  29. package/packages/server/dist/tooldetails.d.ts +10 -4
  30. package/packages/server/dist/tooldetails.js +23 -6
  31. package/packages/server/dist/trusted-proxy.js +1 -1
  32. package/packages/server/dist/turn-interlock.d.ts +101 -0
  33. package/packages/server/dist/turn-interlock.js +76 -0
  34. package/packages/server/package.json +1 -1
  35. package/packages/web/dist/assets/InstanceConfigPage-DBrwtZjx.js +2 -0
  36. package/packages/web/dist/assets/{MarkdownRenderer-R6YzfI9Y.js → MarkdownRenderer-Bn6VPBdL.js} +1 -1
  37. package/packages/web/dist/assets/{ProjectRedirect-Cy-7Thc-.js → ProjectRedirect-CQmDBtd-.js} +1 -1
  38. package/packages/web/dist/assets/ProjectView-BVKu9oIg.js +13 -0
  39. package/packages/web/dist/assets/{ProjectsGrid-C9XHf4eS.js → ProjectsGrid-BW56zqke.js} +1 -1
  40. package/packages/web/dist/assets/{arc-B_42F7Yk.js → arc-CGy6WkLl.js} +1 -1
  41. package/packages/web/dist/assets/{architectureDiagram-3BPJPVTR-BAXzSOyw.js → architectureDiagram-3BPJPVTR-DJH1WIxY.js} +1 -1
  42. package/packages/web/dist/assets/{blockDiagram-GPEHLZMM-BdYEdA-3.js → blockDiagram-GPEHLZMM-Cufb_pvX.js} +1 -1
  43. package/packages/web/dist/assets/{c4Diagram-AAUBKEIU-Cc4o15R5.js → c4Diagram-AAUBKEIU-glqeg1Ky.js} +1 -1
  44. package/packages/web/dist/assets/channel-C4kPYn_d.js +2 -0
  45. package/packages/web/dist/assets/{chunk-2J33WTMH-CeuxHjIm.js → chunk-2J33WTMH-SOFTHYgh.js} +1 -1
  46. package/packages/web/dist/assets/{chunk-4BX2VUAB-DnZfrAaV.js → chunk-4BX2VUAB-DFxFAiG8.js} +1 -1
  47. package/packages/web/dist/assets/{chunk-55IACEB6-DFE6UYOT.js → chunk-55IACEB6-CEEDxZVG.js} +1 -1
  48. package/packages/web/dist/assets/{chunk-727SXJPM-YVHQ5cHc.js → chunk-727SXJPM--3eiptsh.js} +1 -1
  49. package/packages/web/dist/assets/{chunk-AQP2D5EJ-5BYSbg-F.js → chunk-AQP2D5EJ-DIHIugCo.js} +1 -1
  50. package/packages/web/dist/assets/{chunk-FMBD7UC4-HBcelndR.js → chunk-FMBD7UC4-BmxWZl5c.js} +1 -1
  51. package/packages/web/dist/assets/{chunk-ND2GUHAM-2AwEsdxJ.js → chunk-ND2GUHAM-hMHtJs_I.js} +1 -1
  52. package/packages/web/dist/assets/{chunk-QZHKN3VN-BPpaZ6ct.js → chunk-QZHKN3VN-CRnnasyy.js} +1 -1
  53. package/packages/web/dist/assets/classDiagram-4FO5ZUOK-DCg6gTVh.js +2 -0
  54. package/packages/web/dist/assets/classDiagram-v2-Q7XG4LA2-DCg6gTVh.js +2 -0
  55. package/packages/web/dist/assets/{core-Cu_4vw1U.js → core-CGW2CVAY.js} +1 -1
  56. package/packages/web/dist/assets/{cose-bilkent-S5V4N54A-DWkF0NrF.js → cose-bilkent-S5V4N54A-kcl9qSfK.js} +1 -1
  57. package/packages/web/dist/assets/{dagre-BM42HDAG-DTgNmO9I.js → dagre-BM42HDAG-BiLsFx1W.js} +1 -1
  58. package/packages/web/dist/assets/{diagram-2AECGRRQ-DC28b7YS.js → diagram-2AECGRRQ-BcIpoY66.js} +1 -1
  59. package/packages/web/dist/assets/{diagram-5GNKFQAL-_WvuLno6.js → diagram-5GNKFQAL-BK5p5kJa.js} +1 -1
  60. package/packages/web/dist/assets/{diagram-KO2AKTUF-BEYxPfWq.js → diagram-KO2AKTUF-BmJYalCP.js} +1 -1
  61. package/packages/web/dist/assets/{diagram-LMA3HP47-Biyev7x0.js → diagram-LMA3HP47-BHs0SWEM.js} +1 -1
  62. package/packages/web/dist/assets/{diagram-OG6HWLK6-u47NLW3S.js → diagram-OG6HWLK6-CSs8hie4.js} +1 -1
  63. package/packages/web/dist/assets/{erDiagram-TEJ5UH35-Bud2ISlK.js → erDiagram-TEJ5UH35-4qd_Td27.js} +1 -1
  64. package/packages/web/dist/assets/{flowDiagram-I6XJVG4X-D-18vLQ1.js → flowDiagram-I6XJVG4X-CstUgr7V.js} +1 -1
  65. package/packages/web/dist/assets/{format-CQ2BDlby.js → format-B_kAvAW3.js} +1 -1
  66. package/packages/web/dist/assets/{ganttDiagram-6RSMTGT7-CzyRX39N.js → ganttDiagram-6RSMTGT7-DTn9OuIc.js} +1 -1
  67. package/packages/web/dist/assets/{gitGraphDiagram-PVQCEYII-DLogfrjg.js → gitGraphDiagram-PVQCEYII-E_bCor2O.js} +1 -1
  68. package/packages/web/dist/assets/{index-B0gJ0qWe.js → index-B-QAOq9a.js} +2 -2
  69. package/packages/web/dist/assets/index-B3K5nsLe.css +1 -0
  70. package/packages/web/dist/assets/{infoDiagram-5YYISTIA-OgNPt6RG.js → infoDiagram-5YYISTIA-foRUrIOQ.js} +1 -1
  71. package/packages/web/dist/assets/{ishikawaDiagram-YF4QCWOH-CrM0t0_X.js → ishikawaDiagram-YF4QCWOH-CTON8v5t.js} +1 -1
  72. package/packages/web/dist/assets/{journeyDiagram-JHISSGLW-xbxfHfwR.js → journeyDiagram-JHISSGLW-D-qwGjr7.js} +1 -1
  73. package/packages/web/dist/assets/{kanban-definition-UN3LZRKU-DpszBaZb.js → kanban-definition-UN3LZRKU-5l4y83rE.js} +1 -1
  74. package/packages/web/dist/assets/{linear-BLujdbjQ.js → linear-B1GiUWpI.js} +1 -1
  75. package/packages/web/dist/assets/{mermaid.core-DzEhy9Qq.js → mermaid.core-btQIOU6d.js} +4 -4
  76. package/packages/web/dist/assets/{mindmap-definition-RKZ34NQL-DaH3Lmoo.js → mindmap-definition-RKZ34NQL-DduczfMv.js} +1 -1
  77. package/packages/web/dist/assets/{pieDiagram-4H26LBE5-BxeW1kuf.js → pieDiagram-4H26LBE5-D86uGusc.js} +1 -1
  78. package/packages/web/dist/assets/{quadrantDiagram-W4KKPZXB-BKs2CT0r.js → quadrantDiagram-W4KKPZXB-Bo5EW3MZ.js} +1 -1
  79. package/packages/web/dist/assets/{requirementDiagram-4Y6WPE33-CVdO-hXD.js → requirementDiagram-4Y6WPE33-C9aZJK93.js} +1 -1
  80. package/packages/web/dist/assets/{sankeyDiagram-5OEKKPKP-yusj_kJC.js → sankeyDiagram-5OEKKPKP-b__W6SAJ.js} +1 -1
  81. package/packages/web/dist/assets/{sequenceDiagram-3UESZ5HK-C0h-9c8Y.js → sequenceDiagram-3UESZ5HK-Lr4Df8kX.js} +1 -1
  82. package/packages/web/dist/assets/{stateDiagram-AJRCARHV-BSBY8Psb.js → stateDiagram-AJRCARHV-R0XxGxD5.js} +1 -1
  83. package/packages/web/dist/assets/stateDiagram-v2-BHNVJYJU-i2pZN-iR.js +2 -0
  84. package/packages/web/dist/assets/{timeline-definition-PNZ67QCA-DEFUdNb8.js → timeline-definition-PNZ67QCA-D42Je9LW.js} +1 -1
  85. package/packages/web/dist/assets/{vennDiagram-CIIHVFJN-DunhMqxK.js → vennDiagram-CIIHVFJN-KCu14-QB.js} +1 -1
  86. package/packages/web/dist/assets/{wardley-L42UT6IY-CXJsBGKl.js → wardley-L42UT6IY-Cfir3V9o.js} +1 -1
  87. package/packages/web/dist/assets/{wardleyDiagram-YWT4CUSO-DfT_-dqX.js → wardleyDiagram-YWT4CUSO-BkXjbTXu.js} +1 -1
  88. package/packages/web/dist/assets/{xychartDiagram-2RQKCTM6-BysTtULW.js → xychartDiagram-2RQKCTM6-BVT60Pln.js} +1 -1
  89. package/packages/web/dist/index.html +2 -2
  90. package/packages/web/dist/sw.js +1 -1
  91. package/packages/web/dist/assets/InstanceConfigPage-Blr1a-hx.js +0 -2
  92. package/packages/web/dist/assets/ProjectView-bMX4GEau.js +0 -13
  93. package/packages/web/dist/assets/channel-BZnRb_8C.js +0 -2
  94. package/packages/web/dist/assets/classDiagram-4FO5ZUOK-BGCpL0-K.js +0 -2
  95. package/packages/web/dist/assets/classDiagram-v2-Q7XG4LA2-BGCpL0-K.js +0 -2
  96. package/packages/web/dist/assets/index-B6etJCHf.css +0 -1
  97. package/packages/web/dist/assets/stateDiagram-v2-BHNVJYJU-4DGE0Z1g.js +0 -2
@@ -24,10 +24,16 @@ export declare function readToolDetails(projectDir: string, sessionId: string):
24
24
  */
25
25
  export declare function attachToolDetails(projectDir: string, sessionId: string, messages: EnrichedMessage[]): Promise<EnrichedMessage[]>;
26
26
  /**
27
- * The single history-enrichment orchestrator (issue #237). Composes the three
28
- * server-side passes so the routes call one function: sub-agent recovery (#37) →
29
- * generalized per-tool detail (#237, subsuming #232's edit diff) → background /
30
- * task-notification folding (#230) → local-command stdout recovery (#158).
27
+ * The single history-enrichment orchestrator (issue #237). Composes the
28
+ * server-side passes so the routes call one function: sidechain drop (#727) →
29
+ * sub-agent recovery (#37) → generalized per-tool detail (#237, subsuming #232's
30
+ * edit diff) → background / task-notification folding (#230) → local-command
31
+ * stdout recovery (#158).
32
+ *
33
+ * The sidechain drop goes FIRST and is the history-path mirror of the live path's
34
+ * `isSidechainMessage` filter: a sub-agent's steps belong inside its Task card,
35
+ * and every later pass here joins by file order, so they have to be gone before
36
+ * anything counts positions.
31
37
  */
32
38
  export declare function enrichWithToolDetails(projectDir: string, sessionId: string, messages: EnrichedMessage[]): Promise<EnrichedMessage[]>;
33
39
  export {};
@@ -33,7 +33,7 @@ import { createInterface } from "node:readline";
33
33
  import path from "node:path";
34
34
  import { projectChatsDir } from "./transcripts.js";
35
35
  import { fileKind } from "./projects.js";
36
- import { enrichWithSubagents } from "./subagents.js";
36
+ import { dropSidechainMessages, enrichWithSubagents, isSidechainLine } from "./subagents.js";
37
37
  import { enrichWithBackground } from "./background.js";
38
38
  import { enrichWithLocalCommands } from "./localcommand.js";
39
39
  import { SAFE_SEGMENT, statMtimeMs, mtimeCacheGet, mtimeCacheSet, } from "./subagents.js";
@@ -355,6 +355,16 @@ async function readToolDetailsFromFileUncached(file) {
355
355
  catch {
356
356
  continue;
357
357
  }
358
+ // A sub-agent's steps are not rows of THIS transcript — `dropSidechainMessages`
359
+ // has already removed them from the message list this list joins against, so
360
+ // keeping them would shift every following tool's detail by one (#727). Their
361
+ // detail is derived separately, off the sub-agent's own transcript. (A file
362
+ // that is sidechain top to bottom — a sub-agent's OWN transcript — therefore
363
+ // recovers nothing and its messages pass through unenriched, which is a
364
+ // degrade rather than a misjoin; `dropSidechainMessages` likewise refuses to
365
+ // empty such a history.)
366
+ if (isSidechainLine(parsed))
367
+ continue;
358
368
  const content = parsed.message?.content;
359
369
  if (!Array.isArray(content))
360
370
  continue;
@@ -453,13 +463,20 @@ export async function attachToolDetails(projectDir, sessionId, messages) {
453
463
  });
454
464
  }
455
465
  /**
456
- * The single history-enrichment orchestrator (issue #237). Composes the three
457
- * server-side passes so the routes call one function: sub-agent recovery (#37) →
458
- * generalized per-tool detail (#237, subsuming #232's edit diff) → background /
459
- * task-notification folding (#230) → local-command stdout recovery (#158).
466
+ * The single history-enrichment orchestrator (issue #237). Composes the
467
+ * server-side passes so the routes call one function: sidechain drop (#727) →
468
+ * sub-agent recovery (#37) → generalized per-tool detail (#237, subsuming #232's
469
+ * edit diff) → background / task-notification folding (#230) → local-command
470
+ * stdout recovery (#158).
471
+ *
472
+ * The sidechain drop goes FIRST and is the history-path mirror of the live path's
473
+ * `isSidechainMessage` filter: a sub-agent's steps belong inside its Task card,
474
+ * and every later pass here joins by file order, so they have to be gone before
475
+ * anything counts positions.
460
476
  */
461
477
  export async function enrichWithToolDetails(projectDir, sessionId, messages) {
462
- const withSubagents = await enrichWithSubagents(projectDir, sessionId, messages);
478
+ const topLevel = await dropSidechainMessages(projectDir, sessionId, messages);
479
+ const withSubagents = await enrichWithSubagents(projectDir, sessionId, topLevel);
463
480
  const withDetails = await attachToolDetails(projectDir, sessionId, withSubagents);
464
481
  const withBackground = enrichWithBackground(withDetails);
465
482
  return enrichWithLocalCommands(projectDir, sessionId, withBackground);
@@ -40,7 +40,7 @@
40
40
  * A request from another host to a `0.0.0.0`-published port is SNAT'd to that
41
41
  * same address, so "peer is the gateway" does not prove the traffic stayed on
42
42
  * the box. Smoke-test from INSIDE the container instead (`docker compose exec
43
- * paddock curl http://127.0.0.1:4000/mcp …`), where the peer really is loopback.
43
+ * paddock curl http://127.0.0.1:7233/mcp …`), where the peer really is loopback.
44
44
  */
45
45
  import proxyAddr from "proxy-addr";
46
46
  /**
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Turn interlock (issue #731) — stop a chat's in-flight turn BEFORE a destructive
3
+ * operation mutates its transcript.
4
+ *
5
+ * ## The bug this exists to make impossible
6
+ *
7
+ * A chat's transcript is not something paddock writes: `claude` writes
8
+ * `<sessionId>.jsonl` itself, straight through the symlink `ensureProjectAgent`
9
+ * plants (see `transcripts.ts`). So a destructive operation — delete, promote,
10
+ * revert, project delete — is a race against a live subprocess that still holds
11
+ * that path and will append to it whenever it next has something to say.
12
+ *
13
+ * Deleting the file mid-turn therefore did not delete the chat. The unlink
14
+ * landed, the chat left the list, and ~45s later the still-running process
15
+ * re-created the SAME file containing only its own tail: a 3-line transcript
16
+ * opening on an orphan `tool_result` whose `tool_use` no longer existed. The
17
+ * chat came back, named after its raw session id, with every prior turn
18
+ * permanently gone. Promote lost the chat from BOTH projects the same way.
19
+ *
20
+ * ## The guarantee
21
+ *
22
+ * Nothing here tries to out-race the writer, because that race is unwinnable.
23
+ * Instead {@link quiesceSession} refuses to return "go ahead" until the session
24
+ * is verifiably dead — and a caller that cannot get that answer within its
25
+ * timeout must NOT mutate (the routes return 409 instead). A destructive op
26
+ * therefore only ever runs against a transcript no process holds, and a dead
27
+ * session has nothing left to write itself back with.
28
+ *
29
+ * ## Why two liveness signals
30
+ *
31
+ * `hub.isRunning` sees the WS layer's turn, and `herdctl.isSdkSessionLive` sees
32
+ * herdctl's `SessionReaper` — a session held open past its turn (a killed
33
+ * background task's keepAlive, or the re-invocation grace, #397). Either one
34
+ * means a `claude` process may still write. The recovery engine already pairs
35
+ * them for exactly this reason (`ws-turn.ts`); so do we.
36
+ *
37
+ * ## Why cancel is not enough on its own
38
+ *
39
+ * `herdctl.cancel(jobId)` ends the model TURN. On the session runtime that is an
40
+ * `interrupt()`, which deliberately leaves the session — and its subprocess —
41
+ * alive for the next message. That is right for the Stop button and wrong for a
42
+ * delete, so we also reap the managed session. Cancel and reap are both
43
+ * best-effort; the polled liveness check is what actually decides.
44
+ */
45
+ import type { SessionHub } from "./session-hub.js";
46
+ import type { HerdctlService } from "./herdctl.js";
47
+ /** How long to wait for a cancelled turn to actually die before giving up. */
48
+ export declare const DEFAULT_QUIESCE_TIMEOUT_MS = 10000;
49
+ /**
50
+ * The dependencies the interlock needs. Both come off the route context: `hub`
51
+ * via `ctx.managementOpsContext?.hub` (hence optional — a server built without
52
+ * the WS layer has no hub, and correctly reports nothing running).
53
+ */
54
+ export interface TurnInterlockDeps {
55
+ hub: SessionHub | undefined;
56
+ herdctl: HerdctlService;
57
+ }
58
+ /**
59
+ * - `idle` — nothing was running; the caller may proceed.
60
+ * - `stopped` — a turn WAS running, was stopped, and is now verifiably dead;
61
+ * the caller may proceed.
62
+ * - `stuck` — something is still alive after the timeout. The caller MUST NOT
63
+ * mutate the transcript: that is precisely the resurrection case.
64
+ */
65
+ export type QuiesceOutcome = "idle" | "stopped" | "stuck";
66
+ /**
67
+ * Is anything alive on this session right now — a live WS turn, or a session
68
+ * herdctl's reaper is still holding open?
69
+ */
70
+ export declare function sessionIsBusy(deps: TurnInterlockDeps, sessionId: string): boolean;
71
+ /**
72
+ * Stop whatever is running against `sessionId` and WAIT for it to actually be
73
+ * gone. Returns `stuck` rather than throwing, so each caller can pick its own
74
+ * failure shape (a 409, or a `failed` bucket entry in a batch).
75
+ *
76
+ * A running turn is not always cancellable the instant we look at it: `jobId`
77
+ * is null early in a turn (it arrives with the first frames). That is why this
78
+ * polls rather than cancelling once — each pass re-reads `activeInfo` and
79
+ * cancels any job id it has not cancelled yet, so a turn that arms its job id a
80
+ * beat later is still caught inside the same call.
81
+ */
82
+ export declare function quiesceSession(deps: TurnInterlockDeps, sessionId: string, opts?: {
83
+ timeoutMs?: number;
84
+ }): Promise<QuiesceOutcome>;
85
+ /**
86
+ * Quiesce every session with a running turn in `projectSlug`, ahead of a project
87
+ * delete. Returns the ids that could NOT be stopped — empty means it is safe to
88
+ * remove the project directory.
89
+ *
90
+ * Only the hub can enumerate running turns by project, so a server with no hub
91
+ * simply has nothing to stop.
92
+ */
93
+ export declare function quiesceProject(deps: TurnInterlockDeps, projectSlug: string, opts?: {
94
+ timeoutMs?: number;
95
+ }): Promise<string[]>;
96
+ /** The 409 body every refusing route sends, so clients can match one code. */
97
+ export declare function turnRunningError(sessionIds: string[]): {
98
+ error: string;
99
+ code: "turn_running";
100
+ sessionIds: string[];
101
+ };
@@ -0,0 +1,76 @@
1
+ /** How long to wait for a cancelled turn to actually die before giving up. */
2
+ export const DEFAULT_QUIESCE_TIMEOUT_MS = 10_000;
3
+ /** How often to re-check liveness while waiting. */
4
+ const POLL_MS = 25;
5
+ const delay = (ms) => new Promise((r) => setTimeout(r, ms));
6
+ /**
7
+ * Is anything alive on this session right now — a live WS turn, or a session
8
+ * herdctl's reaper is still holding open?
9
+ */
10
+ export function sessionIsBusy(deps, sessionId) {
11
+ if (deps.hub?.isRunning(sessionId) === true)
12
+ return true;
13
+ return deps.herdctl.isSdkSessionLive(sessionId);
14
+ }
15
+ /**
16
+ * Stop whatever is running against `sessionId` and WAIT for it to actually be
17
+ * gone. Returns `stuck` rather than throwing, so each caller can pick its own
18
+ * failure shape (a 409, or a `failed` bucket entry in a batch).
19
+ *
20
+ * A running turn is not always cancellable the instant we look at it: `jobId`
21
+ * is null early in a turn (it arrives with the first frames). That is why this
22
+ * polls rather than cancelling once — each pass re-reads `activeInfo` and
23
+ * cancels any job id it has not cancelled yet, so a turn that arms its job id a
24
+ * beat later is still caught inside the same call.
25
+ */
26
+ export async function quiesceSession(deps, sessionId, opts = {}) {
27
+ if (!sessionIsBusy(deps, sessionId))
28
+ return "idle";
29
+ const deadline = Date.now() + (opts.timeoutMs ?? DEFAULT_QUIESCE_TIMEOUT_MS);
30
+ const cancelled = new Set();
31
+ let reaped = false;
32
+ for (;;) {
33
+ const jobId = deps.hub?.activeInfo(sessionId)?.jobId ?? null;
34
+ if (jobId && !cancelled.has(jobId)) {
35
+ cancelled.add(jobId);
36
+ await deps.herdctl.cancel(jobId).catch(() => false);
37
+ }
38
+ // Close the managed session too — on the session runtime `cancel` only
39
+ // interrupts the turn and leaves the subprocess holding the transcript.
40
+ // Once is enough; a second reap of an already-closed session is a no-op.
41
+ if (!reaped) {
42
+ reaped = true;
43
+ deps.herdctl.reapSession(sessionId);
44
+ }
45
+ if (!sessionIsBusy(deps, sessionId))
46
+ return "stopped";
47
+ if (Date.now() >= deadline)
48
+ return "stuck";
49
+ await delay(POLL_MS);
50
+ }
51
+ }
52
+ /**
53
+ * Quiesce every session with a running turn in `projectSlug`, ahead of a project
54
+ * delete. Returns the ids that could NOT be stopped — empty means it is safe to
55
+ * remove the project directory.
56
+ *
57
+ * Only the hub can enumerate running turns by project, so a server with no hub
58
+ * simply has nothing to stop.
59
+ */
60
+ export async function quiesceProject(deps, projectSlug, opts = {}) {
61
+ const running = (deps.hub?.runningSessions() ?? []).filter((i) => i.projectSlug === projectSlug);
62
+ // Concurrent: each turn dies independently, so the whole call is bounded by one
63
+ // timeout rather than N of them stacked end to end.
64
+ const outcomes = await Promise.all(running.map(async (info) => [info.sessionId, await quiesceSession(deps, info.sessionId, opts)]));
65
+ return outcomes.filter(([, outcome]) => outcome === "stuck").map(([sessionId]) => sessionId);
66
+ }
67
+ /** The 409 body every refusing route sends, so clients can match one code. */
68
+ export function turnRunningError(sessionIds) {
69
+ return {
70
+ error: sessionIds.length === 1
71
+ ? `A turn is still running on chat ${sessionIds[0]} and could not be stopped; try again.`
72
+ : `Turns are still running on ${sessionIds.length} chats and could not be stopped; try again.`,
73
+ code: "turn_running",
74
+ sessionIds,
75
+ };
76
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddock/server",
3
- "version": "0.64.0",
3
+ "version": "0.66.0",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -0,0 +1,2 @@
1
+ import{r as p,k as Q,b as C,j as t,A as B,l as U,X as W,m as Y,n as Z,p as _,M as ee,q as te}from"./index-B-QAOq9a.js";function ne(){const[e,n]=p.useState(null),[l,o]=p.useState(!0),[a,c]=p.useState(null),[i,g]=p.useState({}),[u,O]=p.useState(!1),[$,y]=p.useState(null),[R,w]=p.useState(!1),[k,V]=p.useState(""),[j,P]=p.useState(!1),[D,A]=p.useState(null),F=p.useRef(null),T=Q("(min-width: 1024px)");p.useEffect(()=>{let s=!0;return o(!0),C.getInstanceConfig().then(r=>{s&&(n(r),c(null))}).catch(r=>s&&c(r instanceof Error?r.message:String(r))).finally(()=>s&&o(!1)),()=>{s=!1}},[]);const G=(s,r)=>{w(!1),y(null),g(d=>({...d,[s]:r}))},q=s=>Object.prototype.hasOwnProperty.call(i,s.key)?i[s.key]:s.value,S=p.useMemo(()=>e?e.groups.flatMap(s=>s.fields):[],[e]),x=p.useMemo(()=>S.filter(s=>s.editable&&!s.envOverridden).filter(s=>Object.prototype.hasOwnProperty.call(i,s.key)).filter(s=>!M(i[s.key],s.value)).map(s=>s.key),[S,i]),I=p.useMemo(()=>new Set(x),[x]),m=p.useMemo(()=>{if(!e)return[];const s=k.trim().toLowerCase(),r=[];for(const d of e.groups){const f=s!==""&&d.label.toLowerCase().includes(s),b=d.fields.filter(h=>{const v=Object.prototype.hasOwnProperty.call(i,h.key)?i[h.key]:h.value;return j&&M(v,h.default)?!1:s===""||f?!0:ue(h).includes(s)});b.length>0&&r.push({...d,fields:b})}return r},[e,k,j,i]),L=m.reduce((s,r)=>s+r.fields.length,0),H=k.trim()!==""||j,K=m.some(s=>s.fields.some(r=>r.envOverridden));p.useEffect(()=>{const s=F.current;if(!s||m.length===0)return;const r=m.map(f=>f.id),d=()=>{const f=s.getBoundingClientRect().top;let b=r[0];for(const h of r){const v=document.getElementById(E(h));if(v)if(v.getBoundingClientRect().top-f<=80)b=h;else break}A(b)};return d(),s.addEventListener("scroll",d,{passive:!0}),()=>s.removeEventListener("scroll",d)},[m]);const X=s=>{var d;const r=document.getElementById(E(s));(d=r==null?void 0:r.scrollIntoView)==null||d.call(r,{behavior:"smooth",block:"start"}),A(s)},z=async()=>{if(x.length===0)return;const s={};for(const r of x)s[r]=i[r];O(!0),y(null);try{await C.updateInstanceConfig(s);const r=await C.getInstanceConfig();n(r),g({}),w(!0)}catch(r){y(r instanceof Z||r instanceof Error?r.message:String(r))}finally{O(!1)}},J=()=>{g({}),y(null),w(!1)};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex min-h-0 flex-1",children:[e&&t.jsx(se,{groups:m,active:D,onJump:X,dirtyCount:me(m,I)}),t.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e&&t.jsx(re,{query:k,onQuery:V,modifiedOnly:j,onModifiedOnly:P,visibleCount:L,totalCount:S.length,filtering:H,autoFocus:T}),t.jsx("div",{ref:F,className:"min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:px-6",children:t.jsxs("div",{className:"mx-auto max-w-4xl",children:[t.jsx(ae,{saved:R,configPath:e==null?void 0:e.configPath}),l&&t.jsx("p",{className:"text-sm text-paddock-500",children:"Loading…"}),a&&t.jsxs("p",{className:"text-sm text-red-600 dark:text-red-400",role:"alert",children:["Failed to load settings: ",a]}),e&&K&&t.jsx(le,{}),e&&L===0&&t.jsxs("p",{className:"py-8 text-center text-sm text-paddock-500",children:["No settings match"," ",k.trim()?t.jsxs(t.Fragment,{children:["“",t.jsx("span",{className:"font-medium",children:k.trim()}),"”"]}):"this filter","."]}),m.map((s,r)=>t.jsx(oe,{group:s,first:r===0,children:t.jsx("div",{className:"grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2",children:s.fields.map(d=>t.jsx(ie,{field:d,value:q(d),dirty:I.has(d.key),onChange:f=>G(d.key,f)},d.key))})},s.id))]})})]})]}),e&&t.jsxs("footer",{className:"flex items-center gap-3 border-t border-paddock-200 px-4 py-3 dark:border-paddock-800 sm:px-6",children:[$&&t.jsxs("span",{className:"flex items-center gap-1.5 text-[13px] text-red-600 dark:text-red-400",role:"alert",children:[t.jsx(B,{width:14,height:14,className:"shrink-0"}),$]}),t.jsx("span",{className:"ml-auto text-[12px] text-paddock-400",children:x.length>0?`${x.length} unsaved change${x.length===1?"":"s"}`:"No changes"}),t.jsx("button",{type:"button",className:"btn-subtle",onClick:J,disabled:x.length===0||u,children:"Reset"}),t.jsx("button",{type:"button",className:"btn-primary",onClick:z,disabled:x.length===0||u,children:u?"Saving…":"Save changes"})]})]})}function se({groups:e,active:n,onJump:l,dirtyCount:o}){return t.jsx("nav",{"aria-label":"Config sections",className:"hidden w-52 shrink-0 overflow-y-auto border-r border-paddock-200 px-2 py-4 dark:border-paddock-800 lg:block",children:t.jsx("ul",{className:"space-y-0.5",children:e.map(a=>{const c=a.id===n,i=o[a.id]??0;return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>l(a.id),"aria-current":c?"true":void 0,className:`flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-[13px] transition-colors ${c?"bg-paddock-100 font-medium text-paddock-900 dark:bg-paddock-800 dark:text-paddock-100":"text-paddock-500 hover:bg-paddock-100/60 hover:text-paddock-800 dark:hover:bg-paddock-800/50 dark:hover:text-paddock-200"}`,children:[t.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.label}),i>0&&t.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-accent","aria-label":`${i} unsaved`}),t.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-paddock-400",children:a.fields.length})]})},a.id)})})})}function re({query:e,onQuery:n,modifiedOnly:l,onModifiedOnly:o,visibleCount:a,totalCount:c,filtering:i,autoFocus:g}){return t.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-paddock-200 px-4 py-2.5 dark:border-paddock-800 sm:px-6",children:[t.jsxs("div",{className:"relative min-w-0 flex-1 sm:max-w-sm",children:[t.jsx(U,{width:14,height:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-paddock-400"}),t.jsx("input",{type:"search","aria-label":"Search settings",placeholder:"Search settings, keys, env vars…",className:"input h-8 w-full pl-8 pr-7 text-[13px] [&::-webkit-search-cancel-button]:appearance-none",value:e,autoFocus:g,onChange:u=>n(u.target.value),onKeyDown:u=>{u.key==="Escape"&&e!==""&&(u.preventDefault(),n(""))}}),e!==""&&t.jsx("button",{type:"button","aria-label":"Clear search",onClick:()=>n(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-paddock-400 hover:text-paddock-700 dark:hover:text-paddock-200",children:t.jsx(W,{width:13,height:13})})]}),t.jsx("button",{type:"button","aria-pressed":l,onClick:()=>o(!l),className:`shrink-0 rounded-md border px-2.5 py-1 text-[12px] transition-colors ${l?"border-accent/60 bg-accent/10 text-accent":"border-paddock-200 text-paddock-500 hover:text-paddock-800 dark:border-paddock-700 dark:hover:text-paddock-200"}`,children:"Modified only"}),t.jsx("span",{className:"shrink-0 text-[12px] tabular-nums text-paddock-400",children:i?`${a} of ${c}`:`${c} settings`})]})}function ae({saved:e,configPath:n}){return t.jsxs("div",{role:"status",className:`mb-5 flex items-start gap-2 rounded-lg border px-3 py-2.5 text-[13px] leading-snug ${e?"border-emerald-300 bg-emerald-50 text-emerald-800 dark:border-emerald-700/60 dark:bg-emerald-900/20 dark:text-emerald-300":"border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-700/60 dark:bg-amber-900/20 dark:text-amber-300"}`,children:[e?t.jsx(Y,{width:15,height:15,className:"mt-0.5 shrink-0"}):t.jsx(B,{width:15,height:15,className:"mt-0.5 shrink-0"}),t.jsx("span",{children:e?t.jsxs(t.Fragment,{children:[t.jsx("strong",{children:"Saved to disk."})," These changes take effect only after the server restarts."]}):t.jsxs(t.Fragment,{children:["Changes here are written to ",t.jsx("code",{className:"font-mono text-[12px]",children:he(n)})," ","and take effect only after the server restarts — the running instance keeps its current config until then."]})})]})}function le(){return t.jsxs("p",{className:"mb-5 text-[12px] leading-snug text-paddock-500",children:["Settings marked ",t.jsx(N,{tone:"amber",children:"env"})," are overridden by an environment variable, which wins over this file — edit that variable (and restart) to change them."]})}function oe({group:e,first:n,children:l}){return t.jsxs("section",{id:E(e.id),className:`scroll-mt-4 ${n?"":"mt-9 border-t border-paddock-200 pt-7 dark:border-paddock-800"}`,children:[t.jsx("h2",{className:"text-base font-semibold tracking-tight text-paddock-900 dark:text-paddock-50",children:e.label}),e.description&&t.jsx("p",{className:"mt-1 text-[12px] leading-snug text-paddock-500",children:e.description}),t.jsx("div",{className:"mt-4",children:l})]})}function ie({field:e,value:n,dirty:l,onChange:o}){const a=!e.editable||e.envOverridden,c=`cfg-${e.key}`,i=e.type==="boolean";return t.jsxs("div",{className:`min-w-0 ${xe(e,n)?"sm:col-span-2":""} ${l?"-ml-2.5 border-l-2 border-accent pl-2":""}`,children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("label",{htmlFor:a||i?void 0:c,className:"min-w-0 text-[13px] font-medium",children:[t.jsx("span",{className:"align-middle",children:e.label}),e.sensitive&&t.jsx(N,{tone:"amber",children:"sensitive"}),e.envOverridden&&t.jsx(N,{tone:"amber",title:`Overridden by environment variable ${e.envVar} — edit that env var (and restart) to change it.`,children:"env"}),!e.editable&&!e.envOverridden&&t.jsx(N,{tone:"plain",children:"read-only"})]}),i&&!a&&t.jsx(de,{id:c,checked:!!n,onChange:o,label:e.label})]}),e.help&&t.jsx("p",{className:"mt-0.5 text-[12px] leading-snug text-paddock-500",children:e.help}),a?t.jsx(pe,{field:e,value:n}):!i&&t.jsx(ce,{field:e,value:n,onChange:o,inputId:c}),e.envOverridden&&t.jsx("p",{className:"mt-1 truncate font-mono text-[11px] text-amber-600 dark:text-amber-500/90",children:e.envVar})]})}function N({children:e,tone:n,title:l}){return t.jsx("span",{title:l,className:`ml-1.5 rounded px-1 py-px align-middle text-[10px] font-semibold uppercase tracking-wide ${n==="amber"?"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-400":"bg-paddock-100 text-paddock-500 dark:bg-paddock-800 dark:text-paddock-400"}`,children:e})}function de({id:e,checked:n,onChange:l,label:o}){return t.jsxs("label",{htmlFor:e,className:"relative shrink-0 cursor-pointer",children:[t.jsx("input",{id:e,type:"checkbox","aria-label":o,className:"peer sr-only",checked:n,onChange:a=>l(a.target.checked)}),t.jsx("span",{className:"block h-[18px] w-8 rounded-full bg-paddock-300 transition-colors after:absolute after:left-[2px] after:top-[2px] after:h-[14px] after:w-[14px] after:rounded-full after:bg-white after:transition-transform after:content-[''] peer-checked:bg-accent peer-checked:after:translate-x-[14px] peer-focus-visible:ring-2 peer-focus-visible:ring-accent/50 dark:bg-paddock-700"})]})}function ce({field:e,value:n,onChange:l,inputId:o}){if(e.type==="enum")return t.jsx("select",{id:o,className:"input mt-1.5",value:String(n??""),onChange:a=>l(a.target.value),children:(e.enumValues??[]).map(a=>t.jsx("option",{value:a,children:a},a))});if(e.type==="number")return t.jsx("input",{id:o,type:"number",className:"input mt-1.5",value:n==null?"":String(n),placeholder:e.default===null?"default":String(e.default),onChange:a=>l(a.target.value===""?null:Number(a.target.value))});if(e.type==="text"){const a=n==null||n===e.default,c=n==null?String(e.default??""):String(n),i=typeof e.default=="string"&&!a;return t.jsxs("div",{className:"mt-1.5",children:[t.jsx("textarea",{id:o,className:"input min-h-[7rem] resize-y font-mono text-[12px] leading-relaxed",rows:6,spellCheck:!1,value:c,onChange:g=>l(g.target.value)}),t.jsxs("div",{className:"mt-1 flex items-center justify-between gap-3 text-[12px] text-paddock-500",children:[t.jsx("span",{children:a?"Using the built-in default.":n===""?"Empty — nothing will be appended.":`${c.length.toLocaleString()} characters.`}),i&&t.jsx("button",{type:"button",className:"shrink-0 underline underline-offset-2 hover:text-paddock-700 dark:hover:text-paddock-300",onClick:()=>l(null),children:"Restore default"})]})]})}if(e.type==="string-list"){const a=Array.isArray(n)?n.join(", "):String(n??"");return t.jsx("input",{id:o,type:"text",className:"input mt-1.5",value:a,onChange:c=>l(c.target.value.split(",").map(i=>i.trim()).filter(Boolean))})}return t.jsx("input",{id:o,type:"text",className:"input mt-1.5",value:n==null?"":String(n),placeholder:e.default===null?"":String(e.default),onChange:a=>l(a.target.value)})}function pe({field:e,value:n}){return t.jsx("div",{className:"mt-1 text-[12px] text-paddock-600 dark:text-paddock-300",children:e.type==="boolean"?t.jsx("span",{className:"font-mono",children:n?"true":"false"}):n==null||n===""?t.jsx("span",{className:"italic text-paddock-400",children:e.type==="text"&&n===""?"(empty — nothing appended)":"(not set)"}):e.type==="text"?t.jsx("span",{className:"block max-h-40 overflow-y-auto whitespace-pre-wrap rounded bg-paddock-50 px-2 py-1.5 font-mono text-[12px] leading-relaxed dark:bg-paddock-900/40",children:String(n)}):t.jsx("span",{className:"block break-all font-mono",children:Array.isArray(n)?n.join(", "):String(n)})})}function xe(e,n){return e.type==="text"||e.type==="string-list"?!0:(Array.isArray(n)?n.join(", "):n==null?"":String(n)).length>38}function ue(e){return[e.label,e.key,e.help,e.envVar,...e.enumValues??[]].filter(Boolean).join(" ").toLowerCase()}function me(e,n){const l={};for(const o of e)l[o.id]=o.fields.filter(a=>n.has(a.key)).length;return l}const E=e=>`cfg-section-${e}`;function M(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every((l,o)=>l===n[o]):e===n}function he(e){if(!e)return"paddock.config.yaml";const n=e.split("/");return n[n.length-1]||e}function fe(){const e=_(),n=(e==null?void 0:e.openNav)??(()=>{});return t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("header",{className:"pt-safe flex items-center gap-2 border-b border-paddock-200 px-3 pb-2.5 dark:border-paddock-800 sm:px-6 lg:py-4",children:[t.jsx("button",{type:"button",onClick:n,"aria-label":"Open menu",className:"btn-subtle -ml-1 shrink-0 px-2 py-1.5 lg:hidden",children:t.jsx(ee,{width:20,height:20})}),t.jsx(te,{width:18,height:18,className:"shrink-0 text-paddock-400"}),t.jsx("h1",{className:"text-[15px] font-semibold tracking-tight",children:"Config"})]}),t.jsx(ne,{})]})}export{fe as InstanceConfigPage};
2
+
@@ -1,4 +1,4 @@
1
- import{v as tn,p as or,j as xe}from"./index-B0gJ0qWe.js";import{M as wi}from"./ProjectView-bMX4GEau.js";import"./format-CQ2BDlby.js";import"./queued-LamEU0GH.js";import"./lastTab-CU1zsF0j.js";function Si(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ci=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ii={};function ft(e,t){return(Ii.jsx?Ei:Ci).test(e)}const Ai=/[ \t\n\f\r]/g;function Ti(e){return typeof e=="object"?e.type==="text"?ht(e.value):!1:ht(e)}function ht(e){return e.replace(Ai,"")===""}class We{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}We.prototype.normal={};We.prototype.property={};We.prototype.space=void 0;function ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new We(n,r,t)}function vn(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Pi=0;const L=Te(),W=Te(),zn=Te(),C=Te(),U=Te(),Ie=Te(),te=Te();function Te(){return 2**++Pi}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:L,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:Ie,number:C,overloadedBoolean:zn,spaceSeparated:U},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Dn);class Hn extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),pt(this,"space",i),typeof r=="number")for(;++o<mn.length;){const l=mn[o];pt(this,mn[o],(r&Dn[l])===Dn[l])}}}Hn.prototype.defined=!0;function pt(e,t,n){n&&(e[t]=n)}function Re(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Hn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[vn(r)]=r,n[vn(o.attribute)]=r}return new We(t,n,e.space)}const ur=Re({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:W,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:U,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:C,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:U,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:W,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sr(e,t){return t in e?e[t]:t}function cr(e,t){return sr(e,t.toLowerCase())}const vi=Re({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ie,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alpha:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:U,autoFocus:L,autoPlay:L,blocking:U,capture:null,charSet:null,checked:L,cite:null,className:U,closedBy:null,colorSpace:null,cols:C,colSpan:C,command:null,commandFor:null,content:null,contentEditable:W,controls:L,controlsList:U,coords:C|Ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:zn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:U,height:C,hidden:zn,high:C,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:U,itemRef:U,itemScope:L,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:L,optimum:C,pattern:null,ping:U,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:U,required:L,reversed:L,rows:C,rowSpan:C,sandbox:U,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootCustomElementRegistry:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shadowRootSerializable:L,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:W,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:L,disablePictureInPicture:L,disableRemotePlayback:L,exportParts:Ie,part:U,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:cr}),zi=Re({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:te,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:U,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ie,g2:Ie,glyphName:Ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:te,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:te,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:te,rev:te,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:te,requiredFeatures:te,requiredFonts:te,requiredFormats:te,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:te,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:te,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:te,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sr}),fr=Re({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),hr=Re({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cr}),pr=Re({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Di={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Li=/[A-Z]/g,mt=/-[a-z]/g,Fi=/^data[-\w.:]+$/i;function Ri(e,t){const n=vn(t);let r=t,i=ee;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fi.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mt,Oi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mt.test(o)){let l=o.replace(Li,_i);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Hn}return new i(r,t)}function _i(e){return"-"+e.toLowerCase()}function Oi(e){return e.charAt(1).toUpperCase()}const Mi=ar([ur,vi,fr,hr,pr],"html"),Un=ar([ur,zi,fr,hr,pr],"svg");function Ni(e){return e.join(" ").trim()}var Vn={},gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Bi=/\n/g,ji=/^\s*/,Hi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ui=/^:\s*/,Vi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$i=/^[;\s]*/,qi=/^\s+|\s+$/g,Wi=`
1
+ import{x as tn,s as or,j as xe}from"./index-B-QAOq9a.js";import{M as wi}from"./ProjectView-BVKu9oIg.js";import"./format-B_kAvAW3.js";import"./queued-LamEU0GH.js";import"./lastTab-CU1zsF0j.js";function Si(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ci=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ii={};function ft(e,t){return(Ii.jsx?Ei:Ci).test(e)}const Ai=/[ \t\n\f\r]/g;function Ti(e){return typeof e=="object"?e.type==="text"?ht(e.value):!1:ht(e)}function ht(e){return e.replace(Ai,"")===""}class We{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}We.prototype.normal={};We.prototype.property={};We.prototype.space=void 0;function ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new We(n,r,t)}function vn(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Pi=0;const L=Te(),W=Te(),zn=Te(),C=Te(),U=Te(),Ie=Te(),te=Te();function Te(){return 2**++Pi}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:L,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:Ie,number:C,overloadedBoolean:zn,spaceSeparated:U},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Dn);class Hn extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),pt(this,"space",i),typeof r=="number")for(;++o<mn.length;){const l=mn[o];pt(this,mn[o],(r&Dn[l])===Dn[l])}}}Hn.prototype.defined=!0;function pt(e,t,n){n&&(e[t]=n)}function Re(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Hn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[vn(r)]=r,n[vn(o.attribute)]=r}return new We(t,n,e.space)}const ur=Re({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:W,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:U,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:C,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:U,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:W,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sr(e,t){return t in e?e[t]:t}function cr(e,t){return sr(e,t.toLowerCase())}const vi=Re({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ie,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alpha:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:U,autoFocus:L,autoPlay:L,blocking:U,capture:null,charSet:null,checked:L,cite:null,className:U,closedBy:null,colorSpace:null,cols:C,colSpan:C,command:null,commandFor:null,content:null,contentEditable:W,controls:L,controlsList:U,coords:C|Ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:zn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:U,height:C,hidden:zn,high:C,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:U,itemRef:U,itemScope:L,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:L,optimum:C,pattern:null,ping:U,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:U,required:L,reversed:L,rows:C,rowSpan:C,sandbox:U,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootCustomElementRegistry:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shadowRootSerializable:L,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:W,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:L,disablePictureInPicture:L,disableRemotePlayback:L,exportParts:Ie,part:U,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:cr}),zi=Re({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:te,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:U,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ie,g2:Ie,glyphName:Ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:te,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:te,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:te,rev:te,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:te,requiredFeatures:te,requiredFonts:te,requiredFormats:te,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:te,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:te,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:te,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sr}),fr=Re({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),hr=Re({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cr}),pr=Re({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Di={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Li=/[A-Z]/g,mt=/-[a-z]/g,Fi=/^data[-\w.:]+$/i;function Ri(e,t){const n=vn(t);let r=t,i=ee;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fi.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mt,Oi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mt.test(o)){let l=o.replace(Li,_i);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Hn}return new i(r,t)}function _i(e){return"-"+e.toLowerCase()}function Oi(e){return e.charAt(1).toUpperCase()}const Mi=ar([ur,vi,fr,hr,pr],"html"),Un=ar([ur,zi,fr,hr,pr],"svg");function Ni(e){return e.join(" ").trim()}var Vn={},gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Bi=/\n/g,ji=/^\s*/,Hi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ui=/^:\s*/,Vi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$i=/^[;\s]*/,qi=/^\s+|\s+$/g,Wi=`
2
2
  `,dt="/",yt="*",Ee="",Yi="comment",Xi="declaration";function Qi(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(d){var x=d.match(Bi);x&&(n+=x.length);var E=d.lastIndexOf(Wi);r=~E?d.length-E:r+d.length}function o(){var d={line:n,column:r};return function(x){return x.position=new l(d),s(),x}}function l(d){this.start=d,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(d){var x=new Error(t.source+":"+n+":"+r+": "+d);if(x.reason=d,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(d){var x=d.exec(e);if(x){var E=x[0];return i(E),e=e.slice(E.length),x}}function s(){u(ji)}function f(d){var x;for(d=d||[];x=c();)x!==!1&&d.push(x);return d}function c(){var d=o();if(!(dt!=e.charAt(0)||yt!=e.charAt(1))){for(var x=2;Ee!=e.charAt(x)&&(yt!=e.charAt(x)||dt!=e.charAt(x+1));)++x;if(x+=2,Ee===e.charAt(x-1))return a("End of comment missing");var E=e.slice(2,x-2);return r+=2,i(E),e=e.slice(x),r+=2,d({type:Yi,comment:E})}}function p(){var d=o(),x=u(Hi);if(x){if(c(),!u(Ui))return a("property missing ':'");var E=u(Vi),y=d({type:Xi,property:kt(x[0].replace(gt,Ee)),value:E?kt(E[0].replace(gt,Ee)):Ee});return u($i),y}}function h(){var d=[];f(d);for(var x;x=p();)x!==!1&&(d.push(x),f(d));return d}return s(),h()}function kt(e){return e?e.replace(qi,Ee):Ee}var Gi=Qi,Ki=tn&&tn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=Zi;const Ji=Ki(Gi);function Zi(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ji.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?t(l,a,o):a&&(n=n||{},n[l]=a)}),n}var un={};Object.defineProperty(un,"__esModule",{value:!0});un.camelCase=void 0;var el=/^--[a-zA-Z0-9_-]+$/,nl=/-([a-z])/g,tl=/^[^-]+$/,rl=/^-(webkit|moz|ms|o|khtml)-/,il=/^-(ms)-/,ll=function(e){return!e||tl.test(e)||el.test(e)},ol=function(e,t){return t.toUpperCase()},xt=function(e,t){return"".concat(t,"-")},al=function(e,t){return t===void 0&&(t={}),ll(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(il,xt):e=e.replace(rl,xt),e.replace(nl,ol))};un.camelCase=al;var ul=tn&&tn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sl=ul(Vn),cl=un;function Ln(e,t){var n={};return!e||typeof e!="string"||(0,sl.default)(e,function(r,i){r&&i&&(n[(0,cl.camelCase)(r,t)]=i)}),n}Ln.default=Ln;var fl=Ln;const hl=or(fl),mr=gr("end"),$n=gr("start");function gr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function pl(e){const t=$n(e),n=mr(e);if(t&&n)return{start:t,end:n}}function He(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bt(e.position):"start"in e||"end"in e?bt(e):"line"in e||"column"in e?Fn(e):""}function Fn(e){return wt(e&&e.line)+":"+wt(e&&e.column)}function bt(e){return Fn(e&&e.start)+"-"+Fn(e&&e.end)}function wt(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=He(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const qn={}.hasOwnProperty,ml=new Map,gl=/[A-Z]/g,dl=new Set(["table","tbody","thead","tfoot","tr"]),yl=new Set(["td","th"]),dr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function kl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Al(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Il(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Un:Mi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=yr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function yr(e,t,n){if(t.type==="element")return xl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Sl(e,t,n);if(t.type==="mdxjsEsm")return wl(e,t);if(t.type==="root")return Cl(e,t,n);if(t.type==="text")return El(e,t)}function xl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Un,e.schema=i),e.ancestors.push(t);const o=xr(e,t.tagName,!1),l=Tl(e,t);let a=Yn(e,t);return dl.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Ti(u):!0})),kr(e,l,o,t),Wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function bl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}$e(e,t.position)}function wl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);$e(e,t.position)}function Sl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Un,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:xr(e,t.name,!0),l=Pl(e,t),a=Yn(e,t);return kr(e,l,o,t),Wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Cl(e,t,n){const r={};return Wn(r,Yn(e,t)),e.create(t,e.Fragment,r,n)}function El(e,t){return t.value}function kr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Il(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function Al(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=$n(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Tl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qn.call(t.properties,i)){const o=vl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&yl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Pl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else $e(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else $e(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Yn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ml;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=i.get(u)||0;l=u+"-"+s,i.set(u,s+1)}}const a=yr(e,o,l);a!==void 0&&n.push(a)}return n}function vl(e,t,n){const r=Ri(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Si(n):Ni(n)),r.property==="style"){let i=typeof n=="object"?n:zl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Dl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Di[r.property]||r.property:r.attribute,n]}}function zl(e,t){try{return hl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new K("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=dr+"#cannot-parse-style-attribute",i}}function xr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=ft(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=ft(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return qn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);$e(e)}function $e(e,t){const n=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=dr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dl(e){const t={};let n;for(n in e)qn.call(e,n)&&(t[Ll(n)]=e[n]);return t}function Ll(e){let t=e.replace(gl,Fl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fl(e){return"-"+e.toLowerCase()}const gn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Rl={};function Xn(e,t){const n=Rl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return br(e,r,i)}function br(e,t,n){if(_l(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return St(e.children,t,n)}return Array.isArray(e)?St(e,t,n):""}function St(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=br(e[i],t,n);return r.join("")}function _l(e){return!!(e&&typeof e=="object")}const Ct=document.createElement("i");function Qn(e){const t="&"+e+";";Ct.innerHTML=t;const n=Ct.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function re(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function ie(e,t){return e.length>0?(re(e,e.length,0,t),e):t}const Et={}.hasOwnProperty;function wr(e){const t={};let n=-1;for(;++n<e.length;)Ol(t,e[n]);return t}function Ol(e,t){let n;for(n in t){const i=(Et.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Et.call(i,l)||(i[l]=[]);const a=o[l];Ml(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Ml(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);re(e,0,0,r)}function Sr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const J=be(/[A-Za-z]/),G=be(/[\dA-Za-z]/),Nl=be(/[#-'*+\--9=?A-Z^-~]/);function rn(e){return e!==null&&(e<32||e===127)}const Rn=be(/\d/),Bl=be(/[\dA-Fa-f]/),jl=be(/[!-/:-@[-`{-~]/);function v(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const sn=be(new RegExp("\\p{P}|\\p{S}","u")),Ae=be(/\s/);function be(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _e(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&G(e.charCodeAt(n+1))&&G(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function M(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return R(u)?(e.enter(n),a(u)):t(u)}function a(u){return R(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const Hl={tokenize:Ul};function Ul(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),M(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return v(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Vl={tokenize:$l},It={tokenize:ql};function $l(e){const t=this,n=[];let r=0,i,o,l;return a;function a(S){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,u,s)(S)}return s(S)}function u(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const D=t.events.length;let z=D,w;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){w=t.events[z][1].end;break}y(r);let _=D;for(;_<t.events.length;)t.events[_][1].end={...w},_++;return re(t.events,z+1,0,t.events.slice(D)),t.events.length=_,s(S)}return a(S)}function s(S){if(r===n.length){if(!i)return p(S);if(i.currentConstruct&&i.currentConstruct.concrete)return d(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(It,f,c)(S)}function f(S){return i&&I(),y(r),p(S)}function c(S){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,d(S)}function p(S){return t.containerState={},e.attempt(It,h,d)(S)}function h(S){return r++,n.push([t.currentConstruct,t.containerState]),p(S)}function d(S){if(S===null){i&&I(),y(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(S)}function x(S){if(S===null){E(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return v(S)?(e.consume(S),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(S),x)}function E(S,D){const z=t.sliceStream(S);if(D&&z.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(z),t.parser.lazy[S.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const _=t.events.length;let $=_,B,k;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(B){k=t.events[$][1].end;break}B=!0}for(y(r),w=_;w<t.events.length;)t.events[w][1].end={...k},w++;re(t.events,$+1,0,t.events.slice(_)),t.events.length=w}}function y(S){let D=n.length;for(;D-- >S;){const z=n[D];t.containerState=z[1],z[0].exit.call(t,e)}n.length=S}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ql(e,t,n){return M(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fe(e){if(e===null||V(e)||Ae(e))return 1;if(sn(e))return 2}function cn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const _n={name:"attention",resolveAll:Wl,tokenize:Yl};function Wl(e,t){let n=-1,r,i,o,l,a,u,s,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};At(c,-u),At(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ie(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=ie(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=ie(s,cn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=ie(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=ie(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,re(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Yl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fe(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=Fe(u),c=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),t(u)}}function At(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Xl={name:"autolink",tokenize:Ql};function Ql(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return J(h)?(e.consume(h),l):h===64?n(h):s(h)}function l(h){return h===43||h===45||h===46||G(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||G(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||rn(h)?n(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):Nl(h)?(e.consume(h),s):n(h)}function f(h){return G(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||G(h))&&r++<63){const d=h===45?p:c;return e.consume(h),d}return n(h)}}const Ye={partial:!0,tokenize:Gl};function Gl(e,t,n){return r;function r(o){return R(o)?M(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||v(o)?t(o):n(o)}}const Cr={continuation:{tokenize:Jl},exit:Zl,name:"blockQuote",tokenize:Kl};function Kl(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return R(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Jl(e,t,n){const r=this;return i;function i(l){return R(l)?M(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Cr,t,n)(l)}}function Zl(e){e.exit("blockQuote")}const Er={name:"characterEscape",tokenize:eo};function eo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return jl(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ir={name:"characterReference",tokenize:no};function no(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=G,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Bl,f):(e.enter("characterReferenceValue"),o=7,l=Rn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===G&&!Qn(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const Tt={partial:!0,tokenize:ro},Pt={concrete:!0,name:"codeFenced",tokenize:to};function to(e,t,n){const r=this,i={partial:!0,tokenize:z};let o=0,l=0,a;return u;function u(w){return s(w)}function s(w){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(l++,e.consume(w),f):l<3?n(w):(e.exit("codeFencedFenceSequence"),R(w)?M(e,c,"whitespace")(w):c(w))}function c(w){return w===null||v(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Tt,x,D)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||v(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):R(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),M(e,h,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),p)}function h(w){return w===null||v(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===null||v(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),d)}function x(w){return e.attempt(i,D,E)(w)}function E(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y}function y(w){return o>0&&R(w)?M(e,I,"linePrefix",o+1)(w):I(w)}function I(w){return w===null||v(w)?e.check(Tt,x,D)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||v(w)?(e.exit("codeFlowValue"),I(w)):(e.consume(w),S)}function D(w){return e.exit("codeFenced"),t(w)}function z(w,_,$){let B=0;return k;function k(N){return w.enter("lineEnding"),w.consume(N),w.exit("lineEnding"),T}function T(N){return w.enter("codeFencedFence"),R(N)?M(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):P(N)}function P(N){return N===a?(w.enter("codeFencedFenceSequence"),j(N)):$(N)}function j(N){return N===a?(B++,w.consume(N),j):B>=l?(w.exit("codeFencedFenceSequence"),R(N)?M(w,q,"whitespace")(N):q(N)):$(N)}function q(N){return N===null||v(N)?(w.exit("codeFencedFence"),_(N)):$(N)}}}function ro(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const dn={name:"codeIndented",tokenize:lo},io={partial:!0,tokenize:oo};function lo(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),M(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):v(s)?e.attempt(io,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||v(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function oo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):v(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):M(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):v(l)?i(l):n(l)}}const ao={name:"codeText",previous:so,resolve:uo,tokenize:co};function uo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function so(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function co(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):v(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||v(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",s(c))}}class fo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Be(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Be(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Be(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Be(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Be(this.left,n.reverse())}}}function Be(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ar(e){const t={};let n=-1,r,i,o,l,a,u,s;const f=new fo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ho(f,n)),n=t[n],s=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return re(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function ho(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=n,d=0,x=0;const E=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(x=p+1,E.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):E.pop(),p=E.length;p--;){const y=a.slice(E[p],E[p+1]),I=o.pop();u.push([I,I+y.length-1]),e.splice(I,2,y)}for(u.reverse(),p=-1;++p<u.length;)s[d+u[p][0]]=d+u[p][1],d+=u[p][1]-u[p][0]-1;return s}const po={resolve:go,tokenize:yo},mo={partial:!0,tokenize:ko};function go(e){return Ar(e),e}function yo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):v(a)?e.check(mo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ko(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),M(e,o,"linePrefix")}function o(l){if(l===null||v(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Tr(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||rn(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),p(y)):y===null||y===60||v(y)?n(y):(e.consume(y),y===92?d:h)}function d(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!f&&(y===null||y===41||V(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f<s&&y===40?(e.consume(y),f++,x):y===41?(e.consume(y),f--,x):y===null||y===32||y===40||rn(y)?n(y):(e.consume(y),y===92?E:x)}function E(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function Pr(e,t,n,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):v(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||v(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!R(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function vr(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):v(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),M(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||v(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Ue(e,t){let n;return r;function r(i){return v(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):R(i)?M(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const xo={name:"definition",tokenize:wo},bo={partial:!0,tokenize:So};function wo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Pr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return V(h)?Ue(e,s)(h):s(h)}function s(h){return Tr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(bo,c,c)(h)}function c(h){return R(h)?M(e,p,"whitespace")(h):p(h)}function p(h){return h===null||v(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function So(e,t,n){return r;function r(a){return V(a)?Ue(e,i)(a):n(a)}function i(a){return vr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return R(a)?M(e,l,"whitespace")(a):l(a)}function l(a){return a===null||v(a)?t(a):n(a)}}const Co={name:"hardBreakEscape",tokenize:Eo};function Eo(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return v(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Io={name:"headingAtx",resolve:Ao,tokenize:To};function Ao(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},re(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function To(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||V(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||v(f)?(e.exit("atxHeading"),t(f)):R(f)?M(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||V(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const Po=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vt=["pre","script","style","textarea"],vo={concrete:!0,name:"htmlFlow",resolveTo:Lo,tokenize:Fo},zo={partial:!0,tokenize:_o},Do={partial:!0,tokenize:Ro};function Lo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Fo(e,t,n){const r=this;let i,o,l,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:m):J(g)?(e.consume(g),l=String.fromCharCode(g),E):n(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,d):J(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const ae="CDATA[";return g===ae.charCodeAt(a++)?(e.consume(g),a===ae.length?r.interrupt?t:P:d):n(g)}function x(g){return J(g)?(e.consume(g),l=String.fromCharCode(g),E):n(g)}function E(g){if(g===null||g===47||g===62||V(g)){const ae=g===47,we=l.toLowerCase();return!ae&&!o&&vt.includes(we)?(i=1,r.interrupt?t(g):P(g)):Po.includes(l.toLowerCase())?(i=6,ae?(e.consume(g),y):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?I(g):S(g))}return g===45||G(g)?(e.consume(g),l+=String.fromCharCode(g),E):n(g)}function y(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function I(g){return R(g)?(e.consume(g),I):k(g)}function S(g){return g===47?(e.consume(g),k):g===58||g===95||J(g)?(e.consume(g),D):R(g)?(e.consume(g),S):k(g)}function D(g){return g===45||g===46||g===58||g===95||G(g)?(e.consume(g),D):z(g)}function z(g){return g===61?(e.consume(g),w):R(g)?(e.consume(g),z):S(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,_):R(g)?(e.consume(g),w):$(g)}function _(g){return g===u?(e.consume(g),u=null,B):g===null||v(g)?n(g):(e.consume(g),_)}function $(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?z(g):(e.consume(g),$)}function B(g){return g===47||g===62||R(g)?S(g):n(g)}function k(g){return g===62?(e.consume(g),T):n(g)}function T(g){return g===null||v(g)?P(g):R(g)?(e.consume(g),T):n(g)}function P(g){return g===45&&i===2?(e.consume(g),Q):g===60&&i===1?(e.consume(g),Y):g===62&&i===4?(e.consume(g),oe):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),he):v(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(zo,pe,j)(g)):g===null||v(g)?(e.exit("htmlFlowData"),j(g)):(e.consume(g),P)}function j(g){return e.check(Do,q,pe)(g)}function q(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||v(g)?j(g):(e.enter("htmlFlowData"),P(g))}function Q(g){return g===45?(e.consume(g),m):P(g)}function Y(g){return g===47?(e.consume(g),l="",le):P(g)}function le(g){if(g===62){const ae=l.toLowerCase();return vt.includes(ae)?(e.consume(g),oe):P(g)}return J(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),le):P(g)}function he(g){return g===93?(e.consume(g),m):P(g)}function m(g){return g===62?(e.consume(g),oe):g===45&&i===2?(e.consume(g),m):P(g)}function oe(g){return g===null||v(g)?(e.exit("htmlFlowData"),pe(g)):(e.consume(g),oe)}function pe(g){return e.exit("htmlFlow"),t(g)}}function Ro(e,t,n){const r=this;return i;function i(l){return v(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function _o(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ye,t,n)}}const Oo={name:"htmlText",tokenize:Mo};function Mo(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),z):m===63?(e.consume(m),S):J(m)?(e.consume(m),$):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):J(m)?(e.consume(m),I):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):v(m)?(l=c,Y(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?Q(m):m===45?p(m):c(m)}function d(m){const oe="CDATA[";return m===oe.charCodeAt(o++)?(e.consume(m),o===oe.length?x:d):n(m)}function x(m){return m===null?n(m):m===93?(e.consume(m),E):v(m)?(l=x,Y(m)):(e.consume(m),x)}function E(m){return m===93?(e.consume(m),y):x(m)}function y(m){return m===62?Q(m):m===93?(e.consume(m),y):x(m)}function I(m){return m===null||m===62?Q(m):v(m)?(l=I,Y(m)):(e.consume(m),I)}function S(m){return m===null?n(m):m===63?(e.consume(m),D):v(m)?(l=S,Y(m)):(e.consume(m),S)}function D(m){return m===62?Q(m):S(m)}function z(m){return J(m)?(e.consume(m),w):n(m)}function w(m){return m===45||G(m)?(e.consume(m),w):_(m)}function _(m){return v(m)?(l=_,Y(m)):R(m)?(e.consume(m),_):Q(m)}function $(m){return m===45||G(m)?(e.consume(m),$):m===47||m===62||V(m)?B(m):n(m)}function B(m){return m===47?(e.consume(m),Q):m===58||m===95||J(m)?(e.consume(m),k):v(m)?(l=B,Y(m)):R(m)?(e.consume(m),B):Q(m)}function k(m){return m===45||m===46||m===58||m===95||G(m)?(e.consume(m),k):T(m)}function T(m){return m===61?(e.consume(m),P):v(m)?(l=T,Y(m)):R(m)?(e.consume(m),T):B(m)}function P(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,j):v(m)?(l=P,Y(m)):R(m)?(e.consume(m),P):(e.consume(m),q)}function j(m){return m===i?(e.consume(m),i=void 0,N):m===null?n(m):v(m)?(l=j,Y(m)):(e.consume(m),j)}function q(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||V(m)?B(m):(e.consume(m),q)}function N(m){return m===47||m===62||V(m)?B(m):n(m)}function Q(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Y(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),le}function le(m){return R(m)?M(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):he(m)}function he(m){return e.enter("htmlTextData"),l(m)}}const Gn={name:"labelEnd",resolveAll:Ho,resolveTo:Uo,tokenize:Vo},No={tokenize:$o},Bo={tokenize:qo},jo={tokenize:Wo};function Ho(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&re(e,0,e.length,n),e}function Uo(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",s,t]],a=ie(a,e.slice(o+1,o+r+3)),a=ie(a,[["enter",f,t]]),a=ie(a,cn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=ie(a,[["exit",f,t],e[l-2],e[l-1],["exit",s,t]]),a=ie(a,e.slice(l+1)),a=ie(a,[["exit",u,t]]),re(e,o,e.length,a),e}function Vo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(se(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(No,f,l?f:c)(p):p===91?e.attempt(Bo,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(jo,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function $o(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return V(c)?Ue(e,o)(c):o(c)}function o(c){return c===41?f(c):Tr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return V(c)?Ue(e,u)(c):f(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?vr(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return V(c)?Ue(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function qo(e,t,n){const r=this;return i;function i(a){return Pr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Wo(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Yo={name:"labelStartImage",resolveAll:Gn.resolveAll,tokenize:Xo};function Xo(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Qo={name:"labelStartLink",resolveAll:Gn.resolveAll,tokenize:Go};function Go(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const yn={name:"lineEnding",tokenize:Ko};function Ko(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),M(e,t,"linePrefix")}}const en={name:"thematicBreak",tokenize:Jo};function Jo(e,t,n){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||v(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),R(s)?M(e,a,"whitespace")(s):a(s))}}const Z={continuation:{tokenize:ta},exit:ia,name:"list",tokenize:na},Zo={partial:!0,tokenize:la},ea={partial:!0,tokenize:ra};function na(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Rn(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(en,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Rn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ye,r.interrupt?n:f,e.attempt(Zo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return R(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ta(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ye,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!R(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ea,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(Z,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ra(e,t,n){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ia(e){e.exit(this.containerState.type)}function la(e,t,n){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!R(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const zt={name:"setextUnderline",resolveTo:oa,tokenize:aa};function oa(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function aa(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),R(s)?M(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||v(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const ua={tokenize:sa};function sa(e){const t=this,n=e.attempt(Ye,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(po,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ca={resolveAll:Dr()},fa=zr("string"),ha=zr("text");function zr(e){return{resolveAll:Dr(e==="text"?pa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Dr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function pa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const s={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}const ma={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:Cr},ga={91:xo},da={[-2]:dn,[-1]:dn,32:dn},ya={35:Io,42:en,45:[zt,en],60:vo,61:zt,95:en,96:Pt,126:Pt},ka={38:Ir,92:Er},xa={[-5]:yn,[-4]:yn,[-3]:yn,33:Yo,38:Ir,42:_n,60:[Xl,Oo],91:Qo,92:[Co,Er],93:Gn,95:_n,96:ao},ba={null:[_n,ca]},wa={null:[42,95]},Sa={null:[]},Ca=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wa,contentInitial:ga,disable:Sa,document:ma,flow:ya,flowInitial:da,insideSpan:ba,string:ka,text:xa},Symbol.toStringTag,{value:"Module"}));function Ea(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:_(z),check:_(w),consume:I,enter:S,exit:D,interrupt:_(w,{interrupt:!0})},s={code:null,containerState:{},defineSkip:x,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function c(T){return l=ie(l,T),E(),l[l.length-1]!==null?[]:($(t,0),s.events=cn(o,s.events,s),s.events)}function p(T,P){return Aa(h(T),P)}function h(T){return Ia(l,T)}function d(){const{_bufferIndex:T,_index:P,line:j,column:q,offset:N}=r;return{_bufferIndex:T,_index:P,line:j,column:q,offset:N}}function x(T){i[T.line]=T.column,k()}function E(){let T;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<P.length;)y(P.charCodeAt(r._bufferIndex));else y(P)}}function y(T){f=f(T)}function I(T){v(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,k()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function S(T,P){const j=P||{};return j.type=T,j.start=d(),s.events.push(["enter",j,s]),a.push(j),j}function D(T){const P=a.pop();return P.end=d(),s.events.push(["exit",P,s]),P}function z(T,P){$(T,P.from)}function w(T,P){P.restore()}function _(T,P){return j;function j(q,N,Q){let Y,le,he,m;return Array.isArray(q)?pe(q):"tokenize"in q?pe([q]):oe(q);function oe(X){return Oe;function Oe(ye){const Pe=ye!==null&&X[ye],ve=ye!==null&&X.null,Qe=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return pe(Qe)(ye)}}function pe(X){return Y=X,le=0,X.length===0?Q:g(X[le])}function g(X){return Oe;function Oe(ye){return m=B(),he=X,X.partial||(s.currentConstruct=X),X.name&&s.parser.constructs.disable.null.includes(X.name)?we():X.tokenize.call(P?Object.assign(Object.create(s),P):s,u,ae,we)(ye)}}function ae(X){return T(he,m),N}function we(X){return m.restore(),++le<Y.length?g(Y[le]):Q}}}function $(T,P){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&re(s.events,P,s.events.length-P,T.resolve(s.events.slice(P),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function B(){const T=d(),P=s.previous,j=s.currentConstruct,q=s.events.length,N=Array.from(a);return{from:q,restore:Q};function Q(){r=T,s.previous=P,s.currentConstruct=j,s.events.length=q,a=N,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ia(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Aa(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
3
  `;break}case-3:{l=`\r
4
4
  `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Ta(e){const r={constructs:wr([Ca,...(e||{}).extensions||[]]),content:i(Hl),defined:[],document:i(Vl),flow:i(ua),lazy:{},string:i(fa),text:i(ha)};return r;function i(o){return l;function l(a){return Ea(r,o,a)}}}function Pa(e){for(;!Ar(e););return e}const Dt=/[\0\t\n\r]/g;function va(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Dt.lastIndex=c,s=Dt.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){t=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const za=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Da(e){return e.replace(za,La)}function La(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Sr(n.slice(o?2:1),o?16:10)}return Qn(n)||e}const Lr={}.hasOwnProperty;function Fa(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ra(n)(Pa(Ta(n).document().write(va()(e,t,!0))))}function Ra(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(ot),blockQuote:o(ve),characterEscape:B,characterReference:B,codeFenced:o(Qe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Qe,l),codeText:o(hi,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(pi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(mi),hardBreakEscape:o(at),hardBreakTrailing:o(at),htmlFlow:o(ut,l),htmlFlowData:B,htmlText:o(ut,l),htmlTextData:B,image:o(gi),label:l,link:o(st),listItem:o(di),listItemValue:p,listOrdered:o(ct,c),listUnordered:o(ct),paragraph:o(yi),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ot),strong:o(ki),thematicBreak:o(bi)},exit:{atxHeading:u(),atxHeadingSequence:z,autolink:u(),autolinkEmail:Pe,autolinkProtocol:ye,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:X,characterReference:Oe,codeFenced:u(E),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:k,codeIndented:u(y),codeText:u(N),codeTextData:k,data:k,definition:u(),definitionDestinationString:D,definitionLabelString:I,definitionTitleString:S,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(j),htmlFlowData:k,htmlText:u(q),htmlTextData:k,image:u(Y),label:he,labelText:le,lineEnding:T,link:u(Q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ae,resourceDestinationString:m,resourceTitleString:oe,resource:pe,setextHeading:u($),setextHeadingLineSequence:_,setextHeadingText:w,strong:u(),thematicBreak:u()}};Fr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let A={type:"root",children:[]};const F={stack:[A],tokenStack:[],config:t,enter:a,exit:s,buffer:l,resume:f,data:n},O=[];let H=-1;for(;++H<b.length;)if(b[H][1].type==="listOrdered"||b[H][1].type==="listUnordered")if(b[H][0]==="enter")O.push(H);else{const ue=O.pop();H=i(b,ue,H)}for(H=-1;++H<b.length;){const ue=t[b[H][0]];Lr.call(ue,b[H][1].type)&&ue[b[H][1].type].call(Object.assign({sliceSerialize:b[H][2].sliceSerialize},F),b[H][1])}if(F.tokenStack.length>0){const ue=F.tokenStack[F.tokenStack.length-1];(ue[1]||Lt).call(F,void 0,ue[0])}for(A.position={start:ke(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:ke(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H<t.transforms.length;)A=t.transforms[H](A)||A;return A}function i(b,A,F){let O=A-1,H=-1,ue=!1,Se,me,Me,Ne;for(;++O<=F;){const ne=b[O];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?H++:H--,Ne=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Se&&!Ne&&!H&&!Me&&(Me=O),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!H&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||H===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(Se){let ze=O;for(me=void 0;ze--;){const ge=b[ze];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;me&&(b[me][1].type="lineEndingBlank",ue=!0),ge[1].type="lineEnding",me=ze}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}Me&&(!me||Me<me)&&(Se._spread=!0),Se.end=Object.assign({},me?b[me][1].start:ne[1].end),b.splice(me||O,0,["exit",Se,ne[2]]),O++,F++}if(ne[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Se=ze,b.splice(O,0,["enter",ze,ne[2]]),O++,F++,Me=void 0,Ne=!0}}}return b[A][1]._spread=ue,F}function o(b,A){return F;function F(O){a.call(this,b(O),O),A&&A.call(this,O)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,A,F){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([A,F||void 0]),b.position={start:ke(A.start),end:void 0}}function u(b){return A;function A(F){b&&b.call(this,F),s.call(this,F)}}function s(b,A){const F=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==b.type&&(A?A.call(this,b,O[0]):(O[1]||Lt).call(this,b,O[0]));else throw new Error("Cannot close `"+b.type+"` ("+He({start:b.start,end:b.end})+"): it’s not open");F.position.end=ke(b.end)}function f(){return Xn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(b){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function h(){const b=this.resume(),A=this.stack[this.stack.length-1];A.lang=b}function d(){const b=this.resume(),A=this.stack[this.stack.length-1];A.meta=b}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const b=this.resume(),A=this.stack[this.stack.length-1];A.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const b=this.resume(),A=this.stack[this.stack.length-1];A.value=b.replace(/(\r?\n|\r)$/g,"")}function I(b){const A=this.resume(),F=this.stack[this.stack.length-1];F.label=A,F.identifier=se(this.sliceSerialize(b)).toLowerCase()}function S(){const b=this.resume(),A=this.stack[this.stack.length-1];A.title=b}function D(){const b=this.resume(),A=this.stack[this.stack.length-1];A.url=b}function z(b){const A=this.stack[this.stack.length-1];if(!A.depth){const F=this.sliceSerialize(b).length;A.depth=F}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function _(b){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function B(b){const F=this.stack[this.stack.length-1].children;let O=F[F.length-1];(!O||O.type!=="text")&&(O=xi(),O.position={start:ke(b.start),end:void 0},F.push(O)),this.stack.push(O)}function k(b){const A=this.stack.pop();A.value+=this.sliceSerialize(b),A.position.end=ke(b.end)}function T(b){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=A.children[A.children.length-1];F.position.end=ke(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(B.call(this,b),k.call(this,b))}function P(){this.data.atHardBreak=!0}function j(){const b=this.resume(),A=this.stack[this.stack.length-1];A.value=b}function q(){const b=this.resume(),A=this.stack[this.stack.length-1];A.value=b}function N(){const b=this.resume(),A=this.stack[this.stack.length-1];A.value=b}function Q(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=A,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function Y(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=A,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function le(b){const A=this.sliceSerialize(b),F=this.stack[this.stack.length-2];F.label=Da(A),F.identifier=se(A).toLowerCase()}function he(){const b=this.stack[this.stack.length-1],A=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const O=b.children;F.children=O}else F.alt=A}function m(){const b=this.resume(),A=this.stack[this.stack.length-1];A.url=b}function oe(){const b=this.resume(),A=this.stack[this.stack.length-1];A.title=b}function pe(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ae(b){const A=this.resume(),F=this.stack[this.stack.length-1];F.label=A,F.identifier=se(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function we(b){this.data.characterReferenceType=b.type}function X(b){const A=this.sliceSerialize(b),F=this.data.characterReferenceType;let O;F?(O=Sr(A,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=Qn(A);const H=this.stack[this.stack.length-1];H.value+=O}function Oe(b){const A=this.stack.pop();A.position.end=ke(b.end)}function ye(b){k.call(this,b);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(b)}function Pe(b){k.call(this,b);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(b)}function ve(){return{type:"blockquote",children:[]}}function Qe(){return{type:"code",lang:null,meta:null,value:""}}function hi(){return{type:"inlineCode",value:""}}function pi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mi(){return{type:"emphasis",children:[]}}function ot(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function ut(){return{type:"html",value:""}}function gi(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function ct(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function di(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function yi(){return{type:"paragraph",children:[]}}function ki(){return{type:"strong",children:[]}}function xi(){return{type:"text",value:""}}function bi(){return{type:"thematicBreak"}}}function ke(e){return{line:e.line,column:e.column,offset:e.offset}}function Fr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Fr(e,r):_a(e,r)}}function _a(e,t){let n;for(n in t)if(Lr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Lt(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+He({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+He({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+He({start:t.start,end:t.end})+") is still open")}function Oa(e){const t=this;t.parser=n;function n(r){return Fa(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ma(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Na(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -1,2 +1,2 @@
1
- import{h as u,r as o,b as i,j as n,i as p}from"./index-B0gJ0qWe.js";import{r as d,v as h}from"./lastTab-CU1zsF0j.js";function j(){const{slug:t=""}=u(),[s,r]=o.useState(null);return o.useEffect(()=>{let c=!1;const e=d(t);if(!e){r("home");return}if(e==="home"||e.startsWith("chat")){r(e);return}return Promise.all([i.getProjectDetail(t).then(a=>a.project.pinned).catch(()=>[]),i.listProjectFiles(t).catch(()=>[])]).then(([a,l])=>{c||r(h(e,{pinned:a,files:l}))}),()=>{c=!0}},[t]),s===null?n.jsx("div",{className:"p-8 text-sm text-paddock-500",children:"Opening project…"}):n.jsx(p,{to:`/projects/${t}/${s}`,replace:!0})}export{j as ProjectRedirect};
1
+ import{h as u,r as o,b as i,j as n,i as p}from"./index-B-QAOq9a.js";import{r as d,v as h}from"./lastTab-CU1zsF0j.js";function j(){const{slug:t=""}=u(),[s,r]=o.useState(null);return o.useEffect(()=>{let c=!1;const e=d(t);if(!e){r("home");return}if(e==="home"||e.startsWith("chat")){r(e);return}return Promise.all([i.getProjectDetail(t).then(a=>a.project.pinned).catch(()=>[]),i.listProjectFiles(t).catch(()=>[])]).then(([a,l])=>{c||r(h(e,{pinned:a,files:l}))}),()=>{c=!0}},[t]),s===null?n.jsx("div",{className:"p-8 text-sm text-paddock-500",children:"Opening project…"}):n.jsx(p,{to:`/projects/${t}/${s}`,replace:!0})}export{j as ProjectRedirect};
2
2