@dendelion/paper-camp 0.15.0 → 0.17.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 (77) hide show
  1. package/dist/app/assets/index-6xeWffZg.js +2 -0
  2. package/dist/app/assets/{index-Bo0V9-3F.js.map → index-6xeWffZg.js.map} +1 -1
  3. package/dist/app/assets/{index-BTyua-6D.js → index-B_yczIPZ.js} +2 -2
  4. package/dist/app/assets/{index-BTyua-6D.js.map → index-B_yczIPZ.js.map} +1 -1
  5. package/dist/app/assets/index-CASIH0vL.js +2 -0
  6. package/dist/app/assets/index-CASIH0vL.js.map +1 -0
  7. package/dist/app/assets/{index-2ahHj0hk.js → index-CYxk5mrY.js} +2 -2
  8. package/dist/app/assets/{index-2ahHj0hk.js.map → index-CYxk5mrY.js.map} +1 -1
  9. package/dist/app/assets/index-CjPmPsf0.js +4 -0
  10. package/dist/app/assets/index-CjPmPsf0.js.map +1 -0
  11. package/dist/app/assets/{index-Cz9HEIaO.js → index-CnD1dVCC.js} +2 -2
  12. package/dist/app/assets/{index-Cz9HEIaO.js.map → index-CnD1dVCC.js.map} +1 -1
  13. package/dist/app/assets/{index-BSp1FE97.js → index-DLgVuxp-.js} +2 -2
  14. package/dist/app/assets/{index-BSp1FE97.js.map → index-DLgVuxp-.js.map} +1 -1
  15. package/dist/app/assets/main-DR2ma6V-.js +207 -0
  16. package/dist/app/assets/main-DR2ma6V-.js.map +1 -0
  17. package/dist/app/assets/main-Ll-lvqgh.css +1 -0
  18. package/dist/app/assets/{sidebar-section-BHLbvk_X.js → sidebar-section-DKgV3XAx.js} +2 -2
  19. package/dist/app/assets/{sidebar-section-BHLbvk_X.js.map → sidebar-section-DKgV3XAx.js.map} +1 -1
  20. package/dist/app/index.html +2 -2
  21. package/dist/app/toolbar.js +4356 -4183
  22. package/dist/app/toolbar.js.map +1 -1
  23. package/dist/chunks/{parked-questions.BoAnCnQA.js → phase-progress.DsBJvd_o.js} +1204 -1052
  24. package/dist/chunks/phase-progress.DsBJvd_o.js.map +1 -0
  25. package/dist/cli/index.js +7800 -7632
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/core/git-log.d.ts +6 -0
  28. package/dist/core/git-log.d.ts.map +1 -0
  29. package/dist/core/git-log.test.d.ts +2 -0
  30. package/dist/core/git-log.test.d.ts.map +1 -0
  31. package/dist/core/git-pr/branch.d.ts.map +1 -1
  32. package/dist/core/index.d.ts +1 -0
  33. package/dist/core/index.d.ts.map +1 -1
  34. package/dist/core/index.js +101 -93
  35. package/dist/core/parse/parser.d.ts +1 -0
  36. package/dist/core/parse/parser.d.ts.map +1 -1
  37. package/dist/core/phase-progress.d.ts +16 -0
  38. package/dist/core/phase-progress.d.ts.map +1 -0
  39. package/dist/core/phase-progress.test.d.ts +2 -0
  40. package/dist/core/phase-progress.test.d.ts.map +1 -0
  41. package/dist/core/phase-run.d.ts +17 -0
  42. package/dist/core/phase-run.d.ts.map +1 -0
  43. package/dist/core/phase-run.test.d.ts +2 -0
  44. package/dist/core/phase-run.test.d.ts.map +1 -0
  45. package/dist/core/rate-limit.d.ts +4 -0
  46. package/dist/core/rate-limit.d.ts.map +1 -0
  47. package/dist/core/rate-limit.test.d.ts +2 -0
  48. package/dist/core/rate-limit.test.d.ts.map +1 -0
  49. package/dist/core/readers.d.ts +1 -1
  50. package/dist/core/readers.d.ts.map +1 -1
  51. package/dist/core/sections.d.ts.map +1 -1
  52. package/dist/core/stats.d.ts +5 -1
  53. package/dist/core/stats.d.ts.map +1 -1
  54. package/dist/core/status/status.d.ts +1 -1
  55. package/dist/core/status/status.d.ts.map +1 -1
  56. package/dist/core/trail.d.ts +2 -2
  57. package/dist/core/trail.d.ts.map +1 -1
  58. package/dist/types/index.d.ts +61 -2
  59. package/dist/types/index.d.ts.map +1 -1
  60. package/dist/types/index.js +8 -8
  61. package/dist/types/index.js.map +1 -1
  62. package/dist/vite/index.d.ts +1 -1
  63. package/dist/vite/index.d.ts.map +1 -1
  64. package/dist/vite/index.js +49 -30
  65. package/dist/vite/index.js.map +1 -1
  66. package/dist/vite/proxy.d.ts +3 -1
  67. package/dist/vite/proxy.d.ts.map +1 -1
  68. package/package.json +3 -2
  69. package/dist/app/assets/index-Bi4fur5H.js +0 -4
  70. package/dist/app/assets/index-Bi4fur5H.js.map +0 -1
  71. package/dist/app/assets/index-Bo0V9-3F.js +0 -2
  72. package/dist/app/assets/index-DKjtMMrA.js +0 -2
  73. package/dist/app/assets/index-DKjtMMrA.js.map +0 -1
  74. package/dist/app/assets/main-BW24wv9K.js +0 -207
  75. package/dist/app/assets/main-BW24wv9K.js.map +0 -1
  76. package/dist/app/assets/main-C-ynmROL.css +0 -1
  77. package/dist/chunks/parked-questions.BoAnCnQA.js.map +0 -1
@@ -1,66 +1,98 @@
1
1
  import { spawn as K } from "node:child_process";
2
- import { readdir as ws, readFile as pe, stat as _n, writeFile as x, mkdir as le, rename as Pn, access as Rn } from "node:fs/promises";
3
- import { join as $, dirname as Dn } from "node:path";
4
- import { AGENT_IDS as Oe, PLAN_KINDS as Mn } from "../types/index.js";
5
- import { createHash as jn } from "node:crypto";
2
+ import { readdir as As, readFile as pe, stat as Yn, writeFile as x, mkdir as le, rename as Gn, access as Vn } from "node:fs/promises";
3
+ import { join as T, dirname as Jn } from "node:path";
4
+ import { AGENT_IDS as Ce, PLAN_KINDS as Wn } from "../types/index.js";
5
+ import { createHash as xn } from "node:crypto";
6
6
  import { z as b } from "zod";
7
- const Bn = /^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;
8
- function Kn(s) {
7
+ const zn = /^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;
8
+ function Qn(s) {
9
9
  return s.length >= 2 && (s.startsWith('"') && s.endsWith('"') || s.startsWith("'") && s.endsWith("'")) ? s.slice(1, -1) : s;
10
10
  }
11
- function es(s) {
11
+ function is(s) {
12
12
  return s === "" || /[\s#"]/.test(s) ? `"${s.replace(/"/g, '\\"')}"` : s;
13
13
  }
14
- function bs(s) {
14
+ function Os(s) {
15
15
  const e = s.trim();
16
16
  if (!e || e.startsWith("#")) return null;
17
- const t = e.match(Bn);
18
- return t ? { key: t[1], value: Kn(t[2]) } : null;
17
+ const t = e.match(zn);
18
+ return t ? { key: t[1], value: Qn(t[2]) } : null;
19
19
  }
20
- function Vo(s) {
20
+ function la(s) {
21
21
  const e = [];
22
22
  for (const t of s.split(`
23
23
  `)) {
24
- const n = bs(t);
24
+ const n = Os(t);
25
25
  n && e.push(n);
26
26
  }
27
27
  return e;
28
28
  }
29
- function Jo(s, e) {
29
+ function fa(s, e) {
30
30
  const t = new Map(e.map((r) => [r.key, r.value])), n = s.length > 0 ? s.split(`
31
31
  `) : [], i = [];
32
32
  for (const r of n) {
33
- const o = bs(r);
33
+ const o = Os(r);
34
34
  if (!o) {
35
35
  i.push(r);
36
36
  continue;
37
37
  }
38
- t.has(o.key) && (i.push(`${o.key}=${es(t.get(o.key) ?? "")}`), t.delete(o.key));
38
+ t.has(o.key) && (i.push(`${o.key}=${is(t.get(o.key) ?? "")}`), t.delete(o.key));
39
39
  }
40
40
  for (const [r, o] of t)
41
- i.push(`${r}=${es(o)}`);
41
+ i.push(`${r}=${is(o)}`);
42
42
  for (; i.length > 0 && i[i.length - 1] === ""; ) i.pop();
43
43
  return i.length > 0 ? `${i.join(`
44
44
  `)}
45
45
  ` : "";
46
46
  }
47
- const yt = /* @__PURE__ */ new Map(), Fn = 5 * 60 * 1e3, qn = {
47
+ const Xn = /^[0-9a-f]{4,40}$/i, Zn = /^Merge pull request #\d+ from \S+\/([a-z]+-\d+)-/i;
48
+ function me(s, e) {
49
+ return new Promise((t) => {
50
+ var r;
51
+ const n = K("git", e, { cwd: s, stdio: ["ignore", "pipe", "ignore"] });
52
+ let i = "";
53
+ (r = n.stdout) == null || r.on("data", (o) => {
54
+ i += o.toString();
55
+ }), n.on("close", () => t(i)), n.on("error", () => t(""));
56
+ });
57
+ }
58
+ async function vs(s) {
59
+ var t;
60
+ return ((t = (await me(s, ["symbolic-ref", "refs/remotes/origin/HEAD"])).trim().match(/refs\/remotes\/origin\/(.+)/)) == null ? void 0 : t[1]) ?? "main";
61
+ }
62
+ function wt(s) {
63
+ const e = s.match(/^Refs:\s*([A-Za-z]+-\d+)\s*$/m);
64
+ if (e) return e[1].toUpperCase();
65
+ const t = s.split(`
66
+ `, 1)[0], n = t.match(/\(([A-Za-z]+-\d+)\)/);
67
+ if (n) return n[1].toUpperCase();
68
+ const i = t.match(Zn);
69
+ return i ? i[1].toUpperCase() : null;
70
+ }
71
+ async function Cs(s) {
72
+ const e = await vs(s), t = await me(s, ["log", "--format=%B%x00", e]), n = /* @__PURE__ */ new Set();
73
+ for (const i of t.split("\0")) {
74
+ const r = wt(i.trim());
75
+ r && n.add(r);
76
+ }
77
+ return n;
78
+ }
79
+ const bt = /* @__PURE__ */ new Map(), ei = 5 * 60 * 1e3, ti = {
48
80
  APPROVED: "approved",
49
81
  CHANGES_REQUESTED: "changes-requested",
50
82
  REVIEW_REQUIRED: "review-required"
51
83
  };
52
- function Un(s) {
53
- const e = s.state === "MERGED" ? "merged" : s.state === "CLOSED" ? "closed" : s.isDraft ? "draft" : "open", t = qn[s.reviewDecision];
84
+ function si(s) {
85
+ const e = s.state === "MERGED" ? "merged" : s.state === "CLOSED" ? "closed" : s.isDraft ? "draft" : "open", t = ti[s.reviewDecision];
54
86
  return { number: s.number, url: s.url, state: e, ...t && { reviewDecision: t } };
55
87
  }
56
- const ts = { merged: 4, open: 3, draft: 2, closed: 1 };
57
- function ks(s, e) {
88
+ const rs = { merged: 4, open: 3, draft: 2, closed: 1 };
89
+ function Ls(s, e) {
58
90
  const t = s == null ? void 0 : s.match(/\*\*Plan:\*\*\s*`?([A-Za-z]+-\d+)`?/);
59
91
  if (t) return t[1].toUpperCase();
60
92
  const n = e == null ? void 0 : e.match(/^[a-z]+\/([a-z]+-\d+)-/);
61
93
  return n ? n[1].toUpperCase() : null;
62
94
  }
63
- const Yn = `
95
+ const ni = `
64
96
  query($owner: String!, $repo: String!, $number: Int!) {
65
97
  repository(owner: $owner, name: $repo) {
66
98
  pullRequest(number: $number) {
@@ -71,14 +103,14 @@ query($owner: String!, $repo: String!, $number: Int!) {
71
103
  }
72
104
  }
73
105
  }`;
74
- function $t(s) {
106
+ function Ct(s) {
75
107
  const e = s.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);
76
108
  if (!e) return null;
77
109
  const [, t, n, i] = e;
78
110
  return { owner: t, repo: n, number: i };
79
111
  }
80
- const Hn = 15e3;
81
- function Ss(s, e) {
112
+ const ii = 15e3;
113
+ function _s(s, e) {
82
114
  return new Promise((t) => {
83
115
  var c, l;
84
116
  const n = K("gh", e, { cwd: s, stdio: ["ignore", "pipe", "pipe"] });
@@ -87,7 +119,7 @@ function Ss(s, e) {
87
119
  i || (i = !0, clearTimeout(o), u());
88
120
  }, o = setTimeout(() => {
89
121
  n.kill(), r(() => t(void 0));
90
- }, Hn);
122
+ }, ii);
91
123
  let a = "";
92
124
  (c = n.stdout) == null || c.on("data", (u) => {
93
125
  a += u.toString();
@@ -107,8 +139,8 @@ function Ss(s, e) {
107
139
  }), n.on("error", () => r(() => t(void 0)));
108
140
  });
109
141
  }
110
- function Es(s, e, t, n, i) {
111
- return Is(s, [
142
+ function Ps(s, e, t, n, i) {
143
+ return Ms(s, [
112
144
  "-f",
113
145
  `query=${e}`,
114
146
  "-f",
@@ -119,25 +151,25 @@ function Es(s, e, t, n, i) {
119
151
  `number=${i}`
120
152
  ]);
121
153
  }
122
- function Ns(s, e, t) {
154
+ function Rs(s, e, t) {
123
155
  const n = ["-f", `query=${e}`];
124
156
  for (const [i, r] of Object.entries(t))
125
157
  n.push("-f", `${i}=${r}`);
126
- return Is(s, n);
158
+ return Ms(s, n);
127
159
  }
128
- function Is(s, e) {
129
- return Ss(s, ["api", "graphql", ...e]);
160
+ function Ms(s, e) {
161
+ return _s(s, ["api", "graphql", ...e]);
130
162
  }
131
- async function Gn(s, e) {
163
+ async function ri(s, e) {
132
164
  var l, u, f, h, p;
133
- const t = $t(e);
165
+ const t = Ct(e);
134
166
  if (!t) return;
135
- const n = await Es(s, Yn, t.owner, t.repo, t.number), i = (u = (l = n == null ? void 0 : n.data) == null ? void 0 : l.repository) == null ? void 0 : u.pullRequest;
167
+ const n = await Ps(s, ni, t.owner, t.repo, t.number), i = (u = (l = n == null ? void 0 : n.data) == null ? void 0 : l.repository) == null ? void 0 : u.pullRequest;
136
168
  if (!i) return;
137
169
  const r = i.reviewThreads.nodes.filter((g) => !g.isResolved).length, o = (f = i.commits.nodes[0]) == null ? void 0 : f.commit.committedDate, a = [(h = i.comments.nodes[0]) == null ? void 0 : h.createdAt, (p = i.reviews.nodes[0]) == null ? void 0 : p.createdAt].filter((g) => !!g).sort().at(-1), c = !!(o && a && a > o);
138
170
  return { unresolvedThreadCount: r, hasNewCommentsSincePush: c };
139
171
  }
140
- const Vn = `
172
+ const oi = `
141
173
  query($owner: String!, $repo: String!, $number: Int!) {
142
174
  repository(owner: $owner, name: $repo) {
143
175
  pullRequest(number: $number) {
@@ -151,11 +183,11 @@ query($owner: String!, $repo: String!, $number: Int!) {
151
183
  }
152
184
  }
153
185
  }`;
154
- async function Wo(s, e) {
186
+ async function ua(s, e) {
155
187
  var r, o, a;
156
- const t = $t(e);
188
+ const t = Ct(e);
157
189
  if (!t) return [];
158
- const n = await Es(s, Vn, t.owner, t.repo, t.number);
190
+ const n = await Ps(s, oi, t.owner, t.repo, t.number);
159
191
  return (((a = (o = (r = n == null ? void 0 : n.data) == null ? void 0 : r.repository) == null ? void 0 : o.pullRequest) == null ? void 0 : a.reviewThreads.nodes) ?? []).filter((c) => !c.isResolved).map((c) => ({ id: c.id, comment: c.comments.nodes[0] })).filter((c) => !!c.comment).map(({ id: c, comment: l }) => {
160
192
  var u;
161
193
  return {
@@ -167,38 +199,38 @@ async function Wo(s, e) {
167
199
  };
168
200
  });
169
201
  }
170
- const Jn = `
202
+ const ai = `
171
203
  mutation($threadId: ID!) {
172
204
  resolveReviewThread(input: { threadId: $threadId }) {
173
205
  thread { id isResolved }
174
206
  }
175
- }`, Wn = `
207
+ }`, ci = `
176
208
  mutation($threadId: ID!, $body: String!) {
177
209
  addPullRequestReviewThreadReply(input: { pullRequestReviewThreadId: $threadId, body: $body }) {
178
210
  comment { id }
179
211
  }
180
212
  }`;
181
- async function xo(s, e) {
213
+ async function da(s, e) {
182
214
  var n, i, r;
183
- const t = await Ns(s, Jn, { threadId: e });
215
+ const t = await Rs(s, ai, { threadId: e });
184
216
  return !!((r = (i = (n = t == null ? void 0 : t.data) == null ? void 0 : n.resolveReviewThread) == null ? void 0 : i.thread) != null && r.isResolved);
185
217
  }
186
- async function zo(s, e, t) {
218
+ async function ha(s, e, t) {
187
219
  var i, r, o;
188
- const n = await Ns(s, Wn, { threadId: e, body: t });
220
+ const n = await Rs(s, ci, { threadId: e, body: t });
189
221
  return !!((o = (r = (i = n == null ? void 0 : n.data) == null ? void 0 : i.addPullRequestReviewThreadReply) == null ? void 0 : r.comment) != null && o.id);
190
222
  }
191
- async function xn(s, e) {
223
+ async function li(s, e) {
192
224
  const t = [...e.entries()].filter(
193
225
  ([, i]) => i.state === "open" || i.state === "draft"
194
- ), n = await Promise.all(t.map(([, i]) => Gn(s, i.url)));
226
+ ), n = await Promise.all(t.map(([, i]) => ri(s, i.url)));
195
227
  t.forEach(([i, r], o) => {
196
228
  const a = n[o];
197
229
  a && e.set(i, { ...r, ...a });
198
230
  });
199
231
  }
200
- async function zn(s) {
201
- const e = await Ss(s, [
232
+ async function fi(s) {
233
+ const e = await _s(s, [
202
234
  "pr",
203
235
  "list",
204
236
  "--state",
@@ -211,28 +243,28 @@ async function zn(s) {
211
243
  if (!e) return;
212
244
  const t = /* @__PURE__ */ new Map();
213
245
  for (const n of e) {
214
- const i = ks(n.body, n.headRefName);
246
+ const i = Ls(n.body, n.headRefName);
215
247
  if (!i) continue;
216
- const r = Un(n), o = t.get(i);
217
- (!o || ts[r.state] > ts[o.state]) && t.set(i, r);
248
+ const r = si(n), o = t.get(i);
249
+ (!o || rs[r.state] > rs[o.state]) && t.set(i, r);
218
250
  }
219
- return await xn(s, t), t;
251
+ return await li(s, t), t;
220
252
  }
221
- async function Ts(s, e = Fn) {
222
- const t = yt.get(s);
253
+ async function Ds(s, e = ei) {
254
+ const t = bt.get(s);
223
255
  if (t && Date.now() - t.fetchedAt < e) return t.prs;
224
- const n = await zn(s);
225
- return n !== void 0 && yt.set(s, { prs: n, fetchedAt: Date.now() }), n;
256
+ const n = await fi(s);
257
+ return n !== void 0 && bt.set(s, { prs: n, fetchedAt: Date.now() }), n;
226
258
  }
227
- function Qo() {
228
- yt.clear();
259
+ function pa() {
260
+ bt.clear();
229
261
  }
230
- const At = Symbol.for("yaml.alias"), wt = Symbol.for("yaml.document"), z = Symbol.for("yaml.map"), $s = Symbol.for("yaml.pair"), H = Symbol.for("yaml.scalar"), me = Symbol.for("yaml.seq"), B = Symbol.for("yaml.node.type"), ge = (s) => !!s && typeof s == "object" && s[B] === At, Ce = (s) => !!s && typeof s == "object" && s[B] === wt, Le = (s) => !!s && typeof s == "object" && s[B] === z, _ = (s) => !!s && typeof s == "object" && s[B] === $s, O = (s) => !!s && typeof s == "object" && s[B] === H, _e = (s) => !!s && typeof s == "object" && s[B] === me;
262
+ const Lt = Symbol.for("yaml.alias"), kt = Symbol.for("yaml.document"), z = Symbol.for("yaml.map"), js = Symbol.for("yaml.pair"), Y = Symbol.for("yaml.scalar"), ge = Symbol.for("yaml.seq"), B = Symbol.for("yaml.node.type"), ye = (s) => !!s && typeof s == "object" && s[B] === Lt, Le = (s) => !!s && typeof s == "object" && s[B] === kt, _e = (s) => !!s && typeof s == "object" && s[B] === z, _ = (s) => !!s && typeof s == "object" && s[B] === js, v = (s) => !!s && typeof s == "object" && s[B] === Y, Pe = (s) => !!s && typeof s == "object" && s[B] === ge;
231
263
  function C(s) {
232
264
  if (s && typeof s == "object")
233
265
  switch (s[B]) {
234
266
  case z:
235
- case me:
267
+ case ge:
236
268
  return !0;
237
269
  }
238
270
  return !1;
@@ -240,26 +272,26 @@ function C(s) {
240
272
  function L(s) {
241
273
  if (s && typeof s == "object")
242
274
  switch (s[B]) {
243
- case At:
275
+ case Lt:
244
276
  case z:
245
- case H:
246
- case me:
277
+ case Y:
278
+ case ge:
247
279
  return !0;
248
280
  }
249
281
  return !1;
250
282
  }
251
- const As = (s) => (O(s) || C(s)) && !!s.anchor, X = Symbol("break visit"), Qn = Symbol("skip children"), Te = Symbol("remove node");
252
- function ye(s, e) {
253
- const t = Xn(e);
254
- Ce(s) ? re(null, s.contents, t, Object.freeze([s])) === Te && (s.contents = null) : re(null, s, t, Object.freeze([]));
283
+ const Bs = (s) => (v(s) || C(s)) && !!s.anchor, X = Symbol("break visit"), ui = Symbol("skip children"), Te = Symbol("remove node");
284
+ function we(s, e) {
285
+ const t = di(e);
286
+ Le(s) ? re(null, s.contents, t, Object.freeze([s])) === Te && (s.contents = null) : re(null, s, t, Object.freeze([]));
255
287
  }
256
- ye.BREAK = X;
257
- ye.SKIP = Qn;
258
- ye.REMOVE = Te;
288
+ we.BREAK = X;
289
+ we.SKIP = ui;
290
+ we.REMOVE = Te;
259
291
  function re(s, e, t, n) {
260
- const i = Zn(s, e, t, n);
292
+ const i = hi(s, e, t, n);
261
293
  if (L(i) || _(i))
262
- return ei(s, n, i), re(s, i, t, n);
294
+ return pi(s, n, i), re(s, i, t, n);
263
295
  if (typeof i != "symbol") {
264
296
  if (C(e)) {
265
297
  n = Object.freeze(n.concat(e));
@@ -287,7 +319,7 @@ function re(s, e, t, n) {
287
319
  }
288
320
  return i;
289
321
  }
290
- function Xn(s) {
322
+ function di(s) {
291
323
  return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
292
324
  Alias: s.Node,
293
325
  Map: s.Node,
@@ -302,42 +334,42 @@ function Xn(s) {
302
334
  Seq: s.Collection
303
335
  }, s) : s;
304
336
  }
305
- function Zn(s, e, t, n) {
337
+ function hi(s, e, t, n) {
306
338
  var i, r, o, a, c;
307
339
  if (typeof t == "function")
308
340
  return t(s, e, n);
309
- if (Le(e))
310
- return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
311
341
  if (_e(e))
342
+ return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
343
+ if (Pe(e))
312
344
  return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
313
345
  if (_(e))
314
346
  return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
315
- if (O(e))
347
+ if (v(e))
316
348
  return (a = t.Scalar) == null ? void 0 : a.call(t, s, e, n);
317
- if (ge(e))
349
+ if (ye(e))
318
350
  return (c = t.Alias) == null ? void 0 : c.call(t, s, e, n);
319
351
  }
320
- function ei(s, e, t) {
352
+ function pi(s, e, t) {
321
353
  const n = e[e.length - 1];
322
354
  if (C(n))
323
355
  n.items[s] = t;
324
356
  else if (_(n))
325
357
  s === "key" ? n.key = t : n.value = t;
326
- else if (Ce(n))
358
+ else if (Le(n))
327
359
  n.contents = t;
328
360
  else {
329
- const i = ge(n) ? "alias" : "scalar";
361
+ const i = ye(n) ? "alias" : "scalar";
330
362
  throw new Error(`Cannot replace node with ${i} parent`);
331
363
  }
332
364
  }
333
- const ti = {
365
+ const mi = {
334
366
  "!": "%21",
335
367
  ",": "%2C",
336
368
  "[": "%5B",
337
369
  "]": "%5D",
338
370
  "{": "%7B",
339
371
  "}": "%7D"
340
- }, si = (s) => s.replace(/[!,[\]{}]/g, (e) => ti[e]);
372
+ }, gi = (s) => s.replace(/[!,[\]{}]/g, (e) => mi[e]);
341
373
  class R {
342
374
  constructor(e, t) {
343
375
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, R.defaultYaml, e), this.tags = Object.assign({}, R.defaultTags, t);
@@ -427,7 +459,7 @@ class R {
427
459
  tagString(e) {
428
460
  for (const [t, n] of Object.entries(this.tags))
429
461
  if (e.startsWith(n))
430
- return t + si(e.substring(n.length));
462
+ return t + gi(e.substring(n.length));
431
463
  return e[0] === "!" ? e : `!<${e}>`;
432
464
  }
433
465
  toString(e) {
@@ -435,7 +467,7 @@ class R {
435
467
  let i;
436
468
  if (e && n.length > 0 && L(e.contents)) {
437
469
  const r = {};
438
- ye(e.contents, (o, a) => {
470
+ we(e.contents, (o, a) => {
439
471
  L(a) && a.tag && (r[a.tag] = !0);
440
472
  }), i = Object.keys(r);
441
473
  } else
@@ -448,35 +480,35 @@ class R {
448
480
  }
449
481
  R.defaultYaml = { explicit: !1, version: "1.2" };
450
482
  R.defaultTags = { "!!": "tag:yaml.org,2002:" };
451
- function vs(s) {
483
+ function Ks(s) {
452
484
  if (/[\x00-\x19\s,[\]{}]/.test(s)) {
453
485
  const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
454
486
  throw new Error(t);
455
487
  }
456
488
  return !0;
457
489
  }
458
- function Os(s) {
490
+ function Fs(s) {
459
491
  const e = /* @__PURE__ */ new Set();
460
- return ye(s, {
492
+ return we(s, {
461
493
  Value(t, n) {
462
494
  n.anchor && e.add(n.anchor);
463
495
  }
464
496
  }), e;
465
497
  }
466
- function Cs(s, e) {
498
+ function qs(s, e) {
467
499
  for (let t = 1; ; ++t) {
468
500
  const n = `${s}${t}`;
469
501
  if (!e.has(n))
470
502
  return n;
471
503
  }
472
504
  }
473
- function ni(s, e) {
505
+ function yi(s, e) {
474
506
  const t = [], n = /* @__PURE__ */ new Map();
475
507
  let i = null;
476
508
  return {
477
509
  onAnchor: (r) => {
478
- t.push(r), i ?? (i = Os(s));
479
- const o = Cs(e, i);
510
+ t.push(r), i ?? (i = Fs(s));
511
+ const o = qs(e, i);
480
512
  return i.add(o), o;
481
513
  },
482
514
  /**
@@ -487,7 +519,7 @@ function ni(s, e) {
487
519
  setAnchors: () => {
488
520
  for (const r of t) {
489
521
  const o = n.get(r);
490
- if (typeof o == "object" && o.anchor && (O(o.node) || C(o.node)))
522
+ if (typeof o == "object" && o.anchor && (v(o.node) || C(o.node)))
491
523
  o.node.anchor = o.anchor;
492
524
  else {
493
525
  const a = new Error("Failed to resolve repeated object (this should not happen)");
@@ -526,7 +558,7 @@ function j(s, e, t) {
526
558
  if (Array.isArray(s))
527
559
  return s.map((n, i) => j(n, String(i), t));
528
560
  if (s && typeof s.toJSON == "function") {
529
- if (!t || !As(s))
561
+ if (!t || !Bs(s))
530
562
  return s.toJSON(e, t);
531
563
  const n = { aliasCount: 0, count: 1, res: void 0 };
532
564
  t.anchors.set(s, n), t.onCreate = (r) => {
@@ -537,7 +569,7 @@ function j(s, e, t) {
537
569
  }
538
570
  return typeof s == "bigint" && !(t != null && t.keep) ? Number(s) : s;
539
571
  }
540
- class vt {
572
+ class _t {
541
573
  constructor(e) {
542
574
  Object.defineProperty(this, B, { value: e });
543
575
  }
@@ -548,7 +580,7 @@ class vt {
548
580
  }
549
581
  /** A plain JavaScript representation of this node. */
550
582
  toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
551
- if (!Ce(e))
583
+ if (!Le(e))
552
584
  throw new TypeError("A document argument is required");
553
585
  const o = {
554
586
  anchors: /* @__PURE__ */ new Map(),
@@ -564,9 +596,9 @@ class vt {
564
596
  return typeof r == "function" ? oe(r, { "": a }, "", a) : a;
565
597
  }
566
598
  }
567
- class Ot extends vt {
599
+ class Pt extends _t {
568
600
  constructor(e) {
569
- super(At), this.source = e, Object.defineProperty(this, "tag", {
601
+ super(Lt), this.source = e, Object.defineProperty(this, "tag", {
570
602
  set() {
571
603
  throw new Error("Alias nodes cannot have tags");
572
604
  }
@@ -580,9 +612,9 @@ class Ot extends vt {
580
612
  if ((t == null ? void 0 : t.maxAliasCount) === 0)
581
613
  throw new ReferenceError("Alias resolution is disabled");
582
614
  let n;
583
- t != null && t.aliasResolveCache ? n = t.aliasResolveCache : (n = [], ye(e, {
615
+ t != null && t.aliasResolveCache ? n = t.aliasResolveCache : (n = [], we(e, {
584
616
  Node: (r, o) => {
585
- (ge(o) || As(o)) && n.push(o);
617
+ (ye(o) || Bs(o)) && n.push(o);
586
618
  }
587
619
  }), t && (t.aliasResolveCache = n));
588
620
  let i;
@@ -606,7 +638,7 @@ class Ot extends vt {
606
638
  const c = "This should not happen: Alias anchor was not resolved?";
607
639
  throw new ReferenceError(c);
608
640
  }
609
- if (r >= 0 && (a.count += 1, a.aliasCount === 0 && (a.aliasCount = Ye(i, o, n)), a.count * a.aliasCount > r)) {
641
+ if (r >= 0 && (a.count += 1, a.aliasCount === 0 && (a.aliasCount = He(i, o, n)), a.count * a.aliasCount > r)) {
610
642
  const c = "Excessive alias count indicates a resource exhaustion attack";
611
643
  throw new ReferenceError(c);
612
644
  }
@@ -615,7 +647,7 @@ class Ot extends vt {
615
647
  toString(e, t, n) {
616
648
  const i = `*${this.source}`;
617
649
  if (e) {
618
- if (vs(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
650
+ if (Ks(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
619
651
  const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
620
652
  throw new Error(r);
621
653
  }
@@ -625,27 +657,27 @@ class Ot extends vt {
625
657
  return i;
626
658
  }
627
659
  }
628
- function Ye(s, e, t) {
629
- if (ge(e)) {
660
+ function He(s, e, t) {
661
+ if (ye(e)) {
630
662
  const n = e.resolve(s), i = t && n && t.get(n);
631
663
  return i ? i.count * i.aliasCount : 0;
632
664
  } else if (C(e)) {
633
665
  let n = 0;
634
666
  for (const i of e.items) {
635
- const r = Ye(s, i, t);
667
+ const r = He(s, i, t);
636
668
  r > n && (n = r);
637
669
  }
638
670
  return n;
639
671
  } else if (_(e)) {
640
- const n = Ye(s, e.key, t), i = Ye(s, e.value, t);
672
+ const n = He(s, e.key, t), i = He(s, e.value, t);
641
673
  return Math.max(n, i);
642
674
  }
643
675
  return 1;
644
676
  }
645
- const Ls = (s) => !s || typeof s != "function" && typeof s != "object";
646
- class I extends vt {
677
+ const Us = (s) => !s || typeof s != "function" && typeof s != "object";
678
+ class I extends _t {
647
679
  constructor(e) {
648
- super(H), this.value = e;
680
+ super(Y), this.value = e;
649
681
  }
650
682
  toJSON(e, t) {
651
683
  return t != null && t.keep ? this.value : j(this.value, e, t);
@@ -659,8 +691,8 @@ I.BLOCK_LITERAL = "BLOCK_LITERAL";
659
691
  I.PLAIN = "PLAIN";
660
692
  I.QUOTE_DOUBLE = "QUOTE_DOUBLE";
661
693
  I.QUOTE_SINGLE = "QUOTE_SINGLE";
662
- const ii = "tag:yaml.org,2002:";
663
- function ri(s, e, t) {
694
+ const wi = "tag:yaml.org,2002:";
695
+ function bi(s, e, t) {
664
696
  if (e) {
665
697
  const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
666
698
  if (!i)
@@ -672,9 +704,9 @@ function ri(s, e, t) {
672
704
  return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
673
705
  });
674
706
  }
675
- function Ae(s, e, t) {
707
+ function Oe(s, e, t) {
676
708
  var f, h, p;
677
- if (Ce(s) && (s = s.contents), L(s))
709
+ if (Le(s) && (s = s.contents), L(s))
678
710
  return s;
679
711
  if (_(s)) {
680
712
  const g = (h = (f = t.schema[z]).createNode) == null ? void 0 : h.call(f, t.schema, null, t);
@@ -685,17 +717,17 @@ function Ae(s, e, t) {
685
717
  let c;
686
718
  if (n && s && typeof s == "object") {
687
719
  if (c = a.get(s), c)
688
- return c.anchor ?? (c.anchor = i(s)), new Ot(c.anchor);
720
+ return c.anchor ?? (c.anchor = i(s)), new Pt(c.anchor);
689
721
  c = { anchor: null, node: null }, a.set(s, c);
690
722
  }
691
- e != null && e.startsWith("!!") && (e = ii + e.slice(2));
692
- let l = ri(s, e, o.tags);
723
+ e != null && e.startsWith("!!") && (e = wi + e.slice(2));
724
+ let l = bi(s, e, o.tags);
693
725
  if (!l) {
694
726
  if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
695
727
  const g = new I(s);
696
728
  return c && (c.node = g), g;
697
729
  }
698
- l = s instanceof Map ? o[z] : Symbol.iterator in Object(s) ? o[me] : o[z];
730
+ l = s instanceof Map ? o[z] : Symbol.iterator in Object(s) ? o[ge] : o[z];
699
731
  }
700
732
  r && (r(l), delete t.onTagObj);
701
733
  const u = l != null && l.createNode ? l.createNode(t.schema, s, t) : typeof ((p = l == null ? void 0 : l.nodeClass) == null ? void 0 : p.from) == "function" ? l.nodeClass.from(t.schema, s, t) : new I(s);
@@ -711,7 +743,7 @@ function Je(s, e, t) {
711
743
  } else
712
744
  n = /* @__PURE__ */ new Map([[r, n]]);
713
745
  }
714
- return Ae(n, void 0, {
746
+ return Oe(n, void 0, {
715
747
  aliasDuplicateObjects: !1,
716
748
  keepUndefined: !1,
717
749
  onAnchor: () => {
@@ -721,8 +753,8 @@ function Je(s, e, t) {
721
753
  sourceObjects: /* @__PURE__ */ new Map()
722
754
  });
723
755
  }
724
- const Ne = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
725
- class _s extends vt {
756
+ const Ie = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
757
+ class Hs extends _t {
726
758
  constructor(e, t) {
727
759
  super(e), Object.defineProperty(this, "schema", {
728
760
  value: t,
@@ -746,7 +778,7 @@ class _s extends vt {
746
778
  * that already exists in the map.
747
779
  */
748
780
  addIn(e, t) {
749
- if (Ne(e))
781
+ if (Ie(e))
750
782
  this.add(t);
751
783
  else {
752
784
  const [n, ...i] = e, r = this.get(n, !0);
@@ -778,14 +810,14 @@ class _s extends vt {
778
810
  */
779
811
  getIn(e, t) {
780
812
  const [n, ...i] = e, r = this.get(n, !0);
781
- return i.length === 0 ? !t && O(r) ? r.value : r : C(r) ? r.getIn(i, t) : void 0;
813
+ return i.length === 0 ? !t && v(r) ? r.value : r : C(r) ? r.getIn(i, t) : void 0;
782
814
  }
783
815
  hasAllNullValues(e) {
784
816
  return this.items.every((t) => {
785
817
  if (!_(t))
786
818
  return !1;
787
819
  const n = t.value;
788
- return n == null || e && O(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
820
+ return n == null || e && v(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
789
821
  });
790
822
  }
791
823
  /**
@@ -817,14 +849,14 @@ class _s extends vt {
817
849
  }
818
850
  }
819
851
  }
820
- const oi = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
852
+ const ki = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
821
853
  function V(s, e) {
822
854
  return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
823
855
  }
824
856
  const Z = (s, e, t) => s.endsWith(`
825
857
  `) ? V(t, e) : t.includes(`
826
858
  `) ? `
827
- ` + V(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ps = "flow", bt = "block", He = "quoted";
859
+ ` + V(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ys = "flow", St = "block", Ye = "quoted";
828
860
  function et(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: a } = {}) {
829
861
  if (!i || i < 0)
830
862
  return s;
@@ -836,9 +868,9 @@ function et(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
836
868
  let f = i - e.length;
837
869
  typeof n == "number" && (n > i - Math.max(2, r) ? l.push(0) : f = i - n);
838
870
  let h, p, g = !1, d = -1, m = -1, y = -1;
839
- t === bt && (d = ss(s, d, e.length), d !== -1 && (f = d + c));
871
+ t === St && (d = os(s, d, e.length), d !== -1 && (f = d + c));
840
872
  for (let E; E = s[d += 1]; ) {
841
- if (t === He && E === "\\") {
873
+ if (t === Ye && E === "\\") {
842
874
  switch (m = d, s[d + 1]) {
843
875
  case "x":
844
876
  d += 3;
@@ -856,7 +888,7 @@ function et(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
856
888
  }
857
889
  if (E === `
858
890
  `)
859
- t === bt && (d = ss(s, d, e.length)), f = d + e.length + c, h = void 0;
891
+ t === St && (d = os(s, d, e.length)), f = d + e.length + c, h = void 0;
860
892
  else {
861
893
  if (E === " " && p && p !== " " && p !== `
862
894
  ` && p !== " ") {
@@ -867,7 +899,7 @@ function et(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
867
899
  if (d >= f)
868
900
  if (h)
869
901
  l.push(h), f = h + c, h = void 0;
870
- else if (t === He) {
902
+ else if (t === Ye) {
871
903
  for (; p === " " || p === " "; )
872
904
  p = E, E = s[d += 1], g = !0;
873
905
  const S = d > y + 1 ? d - 2 : m - 1;
@@ -886,12 +918,12 @@ function et(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
886
918
  for (let E = 0; E < l.length; ++E) {
887
919
  const S = l[E], N = l[E + 1] || s.length;
888
920
  S === 0 ? w = `
889
- ${e}${s.slice(0, N)}` : (t === He && u[S] && (w += `${s[S]}\\`), w += `
921
+ ${e}${s.slice(0, N)}` : (t === Ye && u[S] && (w += `${s[S]}\\`), w += `
890
922
  ${e}${s.slice(S + 1, N)}`);
891
923
  }
892
924
  return w;
893
925
  }
894
- function ss(s, e, t) {
926
+ function os(s, e, t) {
895
927
  let n = e, i = e + 1, r = s[i];
896
928
  for (; r === " " || r === " "; )
897
929
  if (e < i + t)
@@ -910,7 +942,7 @@ const tt = (s, e) => ({
910
942
  lineWidth: s.options.lineWidth,
911
943
  minContentWidth: s.options.minContentWidth
912
944
  }), st = (s) => /^(%|---|\.\.\.)/m.test(s);
913
- function ai(s, e, t) {
945
+ function Si(s, e, t) {
914
946
  if (!e || e < 0)
915
947
  return !1;
916
948
  const n = e - t, i = s.length;
@@ -926,7 +958,7 @@ function ai(s, e, t) {
926
958
  }
927
959
  return !0;
928
960
  }
929
- function $e(s, e) {
961
+ function Ae(s, e) {
930
962
  const t = JSON.stringify(s);
931
963
  if (e.options.doubleQuotedAsJSON)
932
964
  return t;
@@ -985,41 +1017,41 @@ function $e(s, e) {
985
1017
  default:
986
1018
  c += 1;
987
1019
  }
988
- return o = a ? o + t.slice(a) : t, n ? o : et(o, r, He, tt(e, !1));
1020
+ return o = a ? o + t.slice(a) : t, n ? o : et(o, r, Ye, tt(e, !1));
989
1021
  }
990
- function kt(s, e) {
1022
+ function Et(s, e) {
991
1023
  if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
992
1024
  `) || /[ \t]\n|\n[ \t]/.test(s))
993
- return $e(s, e);
1025
+ return Ae(s, e);
994
1026
  const t = e.indent || (st(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
995
1027
  ${t}`) + "'";
996
- return e.implicitKey ? n : et(n, t, Ps, tt(e, !1));
1028
+ return e.implicitKey ? n : et(n, t, Ys, tt(e, !1));
997
1029
  }
998
1030
  function ae(s, e) {
999
1031
  const { singleQuote: t } = e.options;
1000
1032
  let n;
1001
1033
  if (t === !1)
1002
- n = $e;
1034
+ n = Ae;
1003
1035
  else {
1004
1036
  const i = s.includes('"'), r = s.includes("'");
1005
- i && !r ? n = kt : r && !i ? n = $e : n = t ? kt : $e;
1037
+ i && !r ? n = Et : r && !i ? n = Ae : n = t ? Et : Ae;
1006
1038
  }
1007
1039
  return n(s, e);
1008
1040
  }
1009
- let St;
1041
+ let Nt;
1010
1042
  try {
1011
- St = new RegExp(`(^|(?<!
1043
+ Nt = new RegExp(`(^|(?<!
1012
1044
  ))
1013
1045
  +(?!
1014
1046
  |$)`, "g");
1015
1047
  } catch {
1016
- St = /\n+(?!\n|$)/g;
1048
+ Nt = /\n+(?!\n|$)/g;
1017
1049
  }
1018
1050
  function Ge({ comment: s, type: e, value: t }, n, i, r) {
1019
1051
  const { blockQuote: o, commentString: a, lineWidth: c } = n.options;
1020
1052
  if (!o || /\n[\t ]+$/.test(t))
1021
1053
  return ae(t, n);
1022
- const l = n.indent || (n.forceBlockIndent || st(t) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || e === I.BLOCK_FOLDED ? !1 : e === I.BLOCK_LITERAL ? !0 : !ai(t, c, l.length);
1054
+ const l = n.indent || (n.forceBlockIndent || st(t) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || e === I.BLOCK_FOLDED ? !1 : e === I.BLOCK_LITERAL ? !0 : !Si(t, c, l.length);
1023
1055
  if (!t)
1024
1056
  return u ? `|
1025
1057
  ` : `>
@@ -1035,7 +1067,7 @@ function Ge({ comment: s, type: e, value: t }, n, i, r) {
1035
1067
  const g = p.indexOf(`
1036
1068
  `);
1037
1069
  g === -1 ? f = "-" : t === p || g !== p.length - 1 ? (f = "+", r && r()) : f = "", p && (t = t.slice(0, -p.length), p[p.length - 1] === `
1038
- ` && (p = p.slice(0, -1)), p = p.replace(St, `$&${l}`));
1070
+ ` && (p = p.slice(0, -1)), p = p.replace(Nt, `$&${l}`));
1039
1071
  let d = !1, m, y = -1;
1040
1072
  for (m = 0; m < t.length; ++m) {
1041
1073
  const N = t[m];
@@ -1054,11 +1086,11 @@ function Ge({ comment: s, type: e, value: t }, n, i, r) {
1054
1086
  const N = t.replace(/\n+/g, `
1055
1087
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`);
1056
1088
  let A = !1;
1057
- const T = tt(n, !0);
1058
- o !== "folded" && e !== I.BLOCK_FOLDED && (T.onOverflow = () => {
1089
+ const $ = tt(n, !0);
1090
+ o !== "folded" && e !== I.BLOCK_FOLDED && ($.onOverflow = () => {
1059
1091
  A = !0;
1060
1092
  });
1061
- const k = et(`${w}${N}${p}`, l, bt, T);
1093
+ const k = et(`${w}${N}${p}`, l, St, $);
1062
1094
  if (!A)
1063
1095
  return `>${S}
1064
1096
  ${l}${k}`;
@@ -1066,7 +1098,7 @@ ${l}${k}`;
1066
1098
  return t = t.replace(/\n+/g, `$&${l}`), `|${S}
1067
1099
  ${l}${w}${t}${p}`;
1068
1100
  }
1069
- function ci(s, e, t, n) {
1101
+ function Ei(s, e, t, n) {
1070
1102
  const { type: i, value: r } = s, { actualString: o, implicitKey: a, indent: c, indentStep: l, inFlow: u } = e;
1071
1103
  if (a && r.includes(`
1072
1104
  `) || u && /[[\]{},]/.test(r))
@@ -1093,9 +1125,9 @@ ${c}`);
1093
1125
  if (g.some(h) || p != null && p.some(h))
1094
1126
  return ae(r, e);
1095
1127
  }
1096
- return a ? f : et(f, c, Ps, tt(e, !1));
1128
+ return a ? f : et(f, c, Ys, tt(e, !1));
1097
1129
  }
1098
- function Ct(s, e, t, n) {
1130
+ function Rt(s, e, t, n) {
1099
1131
  const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
1100
1132
  let { type: a } = s;
1101
1133
  a !== I.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (a = I.QUOTE_DOUBLE);
@@ -1105,11 +1137,11 @@ function Ct(s, e, t, n) {
1105
1137
  case I.BLOCK_LITERAL:
1106
1138
  return i || r ? ae(o.value, e) : Ge(o, e, t, n);
1107
1139
  case I.QUOTE_DOUBLE:
1108
- return $e(o.value, e);
1140
+ return Ae(o.value, e);
1109
1141
  case I.QUOTE_SINGLE:
1110
- return kt(o.value, e);
1142
+ return Et(o.value, e);
1111
1143
  case I.PLAIN:
1112
- return ci(o, e, t, n);
1144
+ return Ei(o, e, t, n);
1113
1145
  default:
1114
1146
  return null;
1115
1147
  }
@@ -1122,10 +1154,10 @@ function Ct(s, e, t, n) {
1122
1154
  }
1123
1155
  return l;
1124
1156
  }
1125
- function Rs(s, e) {
1157
+ function Gs(s, e) {
1126
1158
  const t = Object.assign({
1127
1159
  blockQuote: !0,
1128
- commentString: oi,
1160
+ commentString: ki,
1129
1161
  defaultKeyType: null,
1130
1162
  defaultStringType: "PLAIN",
1131
1163
  directives: null,
@@ -1164,7 +1196,7 @@ function Rs(s, e) {
1164
1196
  options: t
1165
1197
  };
1166
1198
  }
1167
- function li(s, e) {
1199
+ function Ni(s, e) {
1168
1200
  var i;
1169
1201
  if (e.tag) {
1170
1202
  const r = s.filter((o) => o.tag === e.tag);
@@ -1172,7 +1204,7 @@ function li(s, e) {
1172
1204
  return r.find((o) => o.format === e.format) ?? r[0];
1173
1205
  }
1174
1206
  let t, n;
1175
- if (O(e)) {
1207
+ if (v(e)) {
1176
1208
  n = e.value;
1177
1209
  let r = s.filter((o) => {
1178
1210
  var a;
@@ -1191,11 +1223,11 @@ function li(s, e) {
1191
1223
  }
1192
1224
  return t;
1193
1225
  }
1194
- function fi(s, e, { anchors: t, doc: n }) {
1226
+ function Ii(s, e, { anchors: t, doc: n }) {
1195
1227
  if (!n.directives)
1196
1228
  return "";
1197
- const i = [], r = (O(s) || C(s)) && s.anchor;
1198
- r && vs(r) && (t.add(r), i.push(`&${r}`));
1229
+ const i = [], r = (v(s) || C(s)) && s.anchor;
1230
+ r && Ks(r) && (t.add(r), i.push(`&${r}`));
1199
1231
  const o = s.tag ?? (e.default ? null : e.tag);
1200
1232
  return o && i.push(n.directives.tagString(o)), i.join(" ");
1201
1233
  }
@@ -1203,7 +1235,7 @@ function de(s, e, t, n) {
1203
1235
  var c;
1204
1236
  if (_(s))
1205
1237
  return s.toString(e, t, n);
1206
- if (ge(s)) {
1238
+ if (ye(s)) {
1207
1239
  if (e.doc.directives)
1208
1240
  return s.toString(e);
1209
1241
  if ((c = e.resolvedAliases) != null && c.has(s))
@@ -1212,25 +1244,25 @@ function de(s, e, t, n) {
1212
1244
  }
1213
1245
  let i;
1214
1246
  const r = L(s) ? s : e.doc.createNode(s, { onTagObj: (l) => i = l });
1215
- i ?? (i = li(e.doc.schema.tags, r));
1216
- const o = fi(r, i, e);
1247
+ i ?? (i = Ni(e.doc.schema.tags, r));
1248
+ const o = Ii(r, i, e);
1217
1249
  o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1218
- const a = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : O(r) ? Ct(r, e, t, n) : r.toString(e, t, n);
1219
- return o ? O(r) || a[0] === "{" || a[0] === "[" ? `${o} ${a}` : `${o}
1250
+ const a = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : v(r) ? Rt(r, e, t, n) : r.toString(e, t, n);
1251
+ return o ? v(r) || a[0] === "{" || a[0] === "[" ? `${o} ${a}` : `${o}
1220
1252
  ${e.indent}${a}` : a;
1221
1253
  }
1222
- function ui({ key: s, value: e }, t, n, i) {
1254
+ function $i({ key: s, value: e }, t, n, i) {
1223
1255
  const { allNullValues: r, doc: o, indent: a, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: f } } = t;
1224
1256
  let h = L(s) && s.comment || null;
1225
1257
  if (f) {
1226
1258
  if (h)
1227
1259
  throw new Error("With simple keys, key nodes cannot have comments");
1228
1260
  if (C(s) || !L(s) && typeof s == "object") {
1229
- const T = "With simple keys, collection cannot be used as a key value";
1230
- throw new Error(T);
1261
+ const $ = "With simple keys, collection cannot be used as a key value";
1262
+ throw new Error($);
1231
1263
  }
1232
1264
  }
1233
- let p = !f && (!s || h && e == null && !t.inFlow || C(s) || (O(s) ? s.type === I.BLOCK_FOLDED || s.type === I.BLOCK_LITERAL : typeof s == "object"));
1265
+ let p = !f && (!s || h && e == null && !t.inFlow || C(s) || (v(s) ? s.type === I.BLOCK_FOLDED || s.type === I.BLOCK_LITERAL : typeof s == "object"));
1234
1266
  t = Object.assign({}, t, {
1235
1267
  allNullValues: !1,
1236
1268
  implicitKey: !p && (f || !r),
@@ -1250,16 +1282,16 @@ function ui({ key: s, value: e }, t, n, i) {
1250
1282
  g && (h = null), p ? (h && (m += Z(m, t.indent, l(h))), m = `? ${m}
1251
1283
  ${a}:`) : (m = `${m}:`, h && (m += Z(m, t.indent, l(h))));
1252
1284
  let y, w, E;
1253
- L(e) ? (y = !!e.spaceBefore, w = e.commentBefore, E = e.comment) : (y = !1, w = null, E = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !p && !h && O(e) && (t.indentAtStart = m.length + 1), d = !1, !u && c.length >= 2 && !t.inFlow && !p && _e(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1285
+ L(e) ? (y = !!e.spaceBefore, w = e.commentBefore, E = e.comment) : (y = !1, w = null, E = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !p && !h && v(e) && (t.indentAtStart = m.length + 1), d = !1, !u && c.length >= 2 && !t.inFlow && !p && Pe(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1254
1286
  let S = !1;
1255
1287
  const N = de(e, t, () => S = !0, () => d = !0);
1256
1288
  let A = " ";
1257
1289
  if (h || y || w) {
1258
1290
  if (A = y ? `
1259
1291
  ` : "", w) {
1260
- const T = l(w);
1292
+ const $ = l(w);
1261
1293
  A += `
1262
- ${V(T, t.indent)}`;
1294
+ ${V($, t.indent)}`;
1263
1295
  }
1264
1296
  N === "" && !t.inFlow ? A === `
1265
1297
  ` && E && (A = `
@@ -1267,13 +1299,13 @@ ${V(T, t.indent)}`;
1267
1299
  `) : A += `
1268
1300
  ${t.indent}`;
1269
1301
  } else if (!p && C(e)) {
1270
- const T = N[0], k = N.indexOf(`
1271
- `), v = k !== -1, P = t.inFlow ?? e.flow ?? e.items.length === 0;
1272
- if (v || !P) {
1302
+ const $ = N[0], k = N.indexOf(`
1303
+ `), O = k !== -1, P = t.inFlow ?? e.flow ?? e.items.length === 0;
1304
+ if (O || !P) {
1273
1305
  let G = !1;
1274
- if (v && (T === "&" || T === "!")) {
1306
+ if (O && ($ === "&" || $ === "!")) {
1275
1307
  let F = N.indexOf(" ");
1276
- T === "&" && F !== -1 && F < k && N[F + 1] === "!" && (F = N.indexOf(" ", F + 1)), (F === -1 || k < F) && (G = !0);
1308
+ $ === "&" && F !== -1 && F < k && N[F + 1] === "!" && (F = N.indexOf(" ", F + 1)), (F === -1 || k < F) && (G = !0);
1277
1309
  }
1278
1310
  G || (A = `
1279
1311
  ${t.indent}`);
@@ -1282,7 +1314,7 @@ ${t.indent}`);
1282
1314
  `) && (A = "");
1283
1315
  return m += A + N, t.inFlow ? S && n && n() : E && !S ? m += Z(m, t.indent, l(E)) : d && i && i(), m;
1284
1316
  }
1285
- function Ds(s, e) {
1317
+ function Vs(s, e) {
1286
1318
  (s === "debug" || s === "warn") && console.warn(e);
1287
1319
  }
1288
1320
  const Be = "<<", J = {
@@ -1291,13 +1323,13 @@ const Be = "<<", J = {
1291
1323
  tag: "tag:yaml.org,2002:merge",
1292
1324
  test: /^<<$/,
1293
1325
  resolve: () => Object.assign(new I(Symbol(Be)), {
1294
- addToJSMap: Ms
1326
+ addToJSMap: Js
1295
1327
  }),
1296
1328
  stringify: () => Be
1297
- }, di = (s, e) => (J.identify(e) || O(e) && (!e.type || e.type === I.PLAIN) && J.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === J.tag && t.default));
1298
- function Ms(s, e, t) {
1299
- const n = js(s, t);
1300
- if (_e(n))
1329
+ }, Ti = (s, e) => (J.identify(e) || v(e) && (!e.type || e.type === I.PLAIN) && J.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === J.tag && t.default));
1330
+ function Js(s, e, t) {
1331
+ const n = Ws(s, t);
1332
+ if (Pe(n))
1301
1333
  for (const i of n.items)
1302
1334
  ut(s, e, i);
1303
1335
  else if (Array.isArray(n))
@@ -1307,8 +1339,8 @@ function Ms(s, e, t) {
1307
1339
  ut(s, e, n);
1308
1340
  }
1309
1341
  function ut(s, e, t) {
1310
- const n = js(s, t);
1311
- if (!Le(n))
1342
+ const n = Ws(s, t);
1343
+ if (!_e(n))
1312
1344
  throw new Error("Merge sources must be maps or map aliases");
1313
1345
  const i = n.toJSON(null, s, Map);
1314
1346
  for (const [r, o] of i)
@@ -1320,14 +1352,14 @@ function ut(s, e, t) {
1320
1352
  });
1321
1353
  return e;
1322
1354
  }
1323
- function js(s, e) {
1324
- return s && ge(e) ? e.resolve(s.doc, s) : e;
1355
+ function Ws(s, e) {
1356
+ return s && ye(e) ? e.resolve(s.doc, s) : e;
1325
1357
  }
1326
- function Bs(s, e, { key: t, value: n }) {
1358
+ function xs(s, e, { key: t, value: n }) {
1327
1359
  if (L(t) && t.addToJSMap)
1328
1360
  t.addToJSMap(s, e, n);
1329
- else if (di(s, t))
1330
- Ms(s, e, n);
1361
+ else if (Ti(s, t))
1362
+ Js(s, e, n);
1331
1363
  else {
1332
1364
  const i = j(t, "", s);
1333
1365
  if (e instanceof Map)
@@ -1335,7 +1367,7 @@ function Bs(s, e, { key: t, value: n }) {
1335
1367
  else if (e instanceof Set)
1336
1368
  e.add(i);
1337
1369
  else {
1338
- const r = hi(t, i, s), o = j(n, r, s);
1370
+ const r = Ai(t, i, s), o = j(n, r, s);
1339
1371
  r in e ? Object.defineProperty(e, r, {
1340
1372
  value: o,
1341
1373
  writable: !0,
@@ -1346,13 +1378,13 @@ function Bs(s, e, { key: t, value: n }) {
1346
1378
  }
1347
1379
  return e;
1348
1380
  }
1349
- function hi(s, e, t) {
1381
+ function Ai(s, e, t) {
1350
1382
  if (e === null)
1351
1383
  return "";
1352
1384
  if (typeof e != "object")
1353
1385
  return String(e);
1354
1386
  if (L(s) && (t != null && t.doc)) {
1355
- const n = Rs(t.doc, {});
1387
+ const n = Gs(t.doc, {});
1356
1388
  n.anchors = /* @__PURE__ */ new Set();
1357
1389
  for (const r of t.anchors.keys())
1358
1390
  n.anchors.add(r.anchor);
@@ -1360,36 +1392,36 @@ function hi(s, e, t) {
1360
1392
  const i = s.toString(n);
1361
1393
  if (!t.mapKeyWarned) {
1362
1394
  let r = JSON.stringify(i);
1363
- r.length > 40 && (r = r.substring(0, 36) + '..."'), Ds(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1395
+ r.length > 40 && (r = r.substring(0, 36) + '..."'), Vs(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1364
1396
  }
1365
1397
  return i;
1366
1398
  }
1367
1399
  return JSON.stringify(e);
1368
1400
  }
1369
- function Lt(s, e, t) {
1370
- const n = Ae(s, void 0, t), i = Ae(e, void 0, t);
1371
- return new D(n, i);
1401
+ function Mt(s, e, t) {
1402
+ const n = Oe(s, void 0, t), i = Oe(e, void 0, t);
1403
+ return new M(n, i);
1372
1404
  }
1373
- class D {
1405
+ class M {
1374
1406
  constructor(e, t = null) {
1375
- Object.defineProperty(this, B, { value: $s }), this.key = e, this.value = t;
1407
+ Object.defineProperty(this, B, { value: js }), this.key = e, this.value = t;
1376
1408
  }
1377
1409
  clone(e) {
1378
1410
  let { key: t, value: n } = this;
1379
- return L(t) && (t = t.clone(e)), L(n) && (n = n.clone(e)), new D(t, n);
1411
+ return L(t) && (t = t.clone(e)), L(n) && (n = n.clone(e)), new M(t, n);
1380
1412
  }
1381
1413
  toJSON(e, t) {
1382
1414
  const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1383
- return Bs(t, n, this);
1415
+ return xs(t, n, this);
1384
1416
  }
1385
1417
  toString(e, t, n) {
1386
- return e != null && e.doc ? ui(this, e, t, n) : JSON.stringify(this);
1418
+ return e != null && e.doc ? $i(this, e, t, n) : JSON.stringify(this);
1387
1419
  }
1388
1420
  }
1389
- function Ks(s, e, t) {
1390
- return (e.inFlow ?? s.flow ? mi : pi)(s, e, t);
1421
+ function zs(s, e, t) {
1422
+ return (e.inFlow ?? s.flow ? vi : Oi)(s, e, t);
1391
1423
  }
1392
- function pi({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: a }) {
1424
+ function Oi({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: a }) {
1393
1425
  const { indent: c, options: { commentString: l } } = t, u = Object.assign({}, t, { indent: r, type: null });
1394
1426
  let f = !1;
1395
1427
  const h = [];
@@ -1421,7 +1453,7 @@ ${c}${d}` : `
1421
1453
  return s ? (p += `
1422
1454
  ` + V(l(s), c), a && a()) : f && o && o(), p;
1423
1455
  }
1424
- function mi({ items: s }, e, { flowChars: t, itemIndent: n }) {
1456
+ function vi({ items: s }, e, { flowChars: t, itemIndent: n }) {
1425
1457
  const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: a } } = e;
1426
1458
  n += r;
1427
1459
  const c = Object.assign({}, e, {
@@ -1472,12 +1504,12 @@ function We({ indent: s, options: { commentString: e } }, t, n, i) {
1472
1504
  }
1473
1505
  }
1474
1506
  function ee(s, e) {
1475
- const t = O(e) ? e.value : e;
1507
+ const t = v(e) ? e.value : e;
1476
1508
  for (const n of s)
1477
- if (_(n) && (n.key === e || n.key === t || O(n.key) && n.key.value === t))
1509
+ if (_(n) && (n.key === e || n.key === t || v(n.key) && n.key.value === t))
1478
1510
  return n;
1479
1511
  }
1480
- class M extends _s {
1512
+ class D extends Hs {
1481
1513
  static get tagName() {
1482
1514
  return "tag:yaml.org,2002:map";
1483
1515
  }
@@ -1494,7 +1526,7 @@ class M extends _s {
1494
1526
  l = r.call(t, c, l);
1495
1527
  else if (Array.isArray(r) && !r.includes(c))
1496
1528
  return;
1497
- (l !== void 0 || i) && o.items.push(Lt(c, l, n));
1529
+ (l !== void 0 || i) && o.items.push(Mt(c, l, n));
1498
1530
  };
1499
1531
  if (t instanceof Map)
1500
1532
  for (const [c, l] of t)
@@ -1513,12 +1545,12 @@ class M extends _s {
1513
1545
  add(e, t) {
1514
1546
  var o;
1515
1547
  let n;
1516
- _(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new D(e, e == null ? void 0 : e.value) : n = new D(e.key, e.value);
1548
+ _(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new M(e, e == null ? void 0 : e.value) : n = new M(e.key, e.value);
1517
1549
  const i = ee(this.items, n.key), r = (o = this.schema) == null ? void 0 : o.sortMapEntries;
1518
1550
  if (i) {
1519
1551
  if (!t)
1520
1552
  throw new Error(`Key ${n.key} already set`);
1521
- O(i.value) && Ls(n.value) ? i.value.value = n.value : i.value = n.value;
1553
+ v(i.value) && Us(n.value) ? i.value.value = n.value : i.value = n.value;
1522
1554
  } else if (r) {
1523
1555
  const a = this.items.findIndex((c) => r(n, c) < 0);
1524
1556
  a === -1 ? this.items.push(n) : this.items.splice(a, 0, n);
@@ -1531,13 +1563,13 @@ class M extends _s {
1531
1563
  }
1532
1564
  get(e, t) {
1533
1565
  const n = ee(this.items, e), i = n == null ? void 0 : n.value;
1534
- return (!t && O(i) ? i.value : i) ?? void 0;
1566
+ return (!t && v(i) ? i.value : i) ?? void 0;
1535
1567
  }
1536
1568
  has(e) {
1537
1569
  return !!ee(this.items, e);
1538
1570
  }
1539
1571
  set(e, t) {
1540
- this.add(new D(e, t), !0);
1572
+ this.add(new M(e, t), !0);
1541
1573
  }
1542
1574
  /**
1543
1575
  * @param ctx - Conversion context, originally set in Document#toJS()
@@ -1548,7 +1580,7 @@ class M extends _s {
1548
1580
  const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1549
1581
  t != null && t.onCreate && t.onCreate(i);
1550
1582
  for (const r of this.items)
1551
- Bs(t, i, r);
1583
+ xs(t, i, r);
1552
1584
  return i;
1553
1585
  }
1554
1586
  toString(e, t, n) {
@@ -1557,7 +1589,7 @@ class M extends _s {
1557
1589
  for (const i of this.items)
1558
1590
  if (!_(i))
1559
1591
  throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1560
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Ks(this, e, {
1592
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), zs(this, e, {
1561
1593
  blockItemPrefix: "",
1562
1594
  flowChars: { start: "{", end: "}" },
1563
1595
  itemIndent: e.indent || "",
@@ -1566,22 +1598,22 @@ class M extends _s {
1566
1598
  });
1567
1599
  }
1568
1600
  }
1569
- const we = {
1601
+ const be = {
1570
1602
  collection: "map",
1571
1603
  default: !0,
1572
- nodeClass: M,
1604
+ nodeClass: D,
1573
1605
  tag: "tag:yaml.org,2002:map",
1574
1606
  resolve(s, e) {
1575
- return Le(s) || e("Expected a mapping for this tag"), s;
1607
+ return _e(s) || e("Expected a mapping for this tag"), s;
1576
1608
  },
1577
- createNode: (s, e, t) => M.from(s, e, t)
1609
+ createNode: (s, e, t) => D.from(s, e, t)
1578
1610
  };
1579
- class te extends _s {
1611
+ class te extends Hs {
1580
1612
  static get tagName() {
1581
1613
  return "tag:yaml.org,2002:seq";
1582
1614
  }
1583
1615
  constructor(e) {
1584
- super(me, e), this.items = [];
1616
+ super(ge, e), this.items = [];
1585
1617
  }
1586
1618
  add(e) {
1587
1619
  this.items.push(e);
@@ -1603,7 +1635,7 @@ class te extends _s {
1603
1635
  if (typeof n != "number")
1604
1636
  return;
1605
1637
  const i = this.items[n];
1606
- return !t && O(i) ? i.value : i;
1638
+ return !t && v(i) ? i.value : i;
1607
1639
  }
1608
1640
  /**
1609
1641
  * Checks if the collection includes a value with the key `key`.
@@ -1627,7 +1659,7 @@ class te extends _s {
1627
1659
  if (typeof n != "number")
1628
1660
  throw new Error(`Expected a valid index, not ${e}.`);
1629
1661
  const i = this.items[n];
1630
- O(i) && Ls(t) ? i.value = t : this.items[n] = t;
1662
+ v(i) && Us(t) ? i.value = t : this.items[n] = t;
1631
1663
  }
1632
1664
  toJSON(e, t) {
1633
1665
  const n = [];
@@ -1638,7 +1670,7 @@ class te extends _s {
1638
1670
  return n;
1639
1671
  }
1640
1672
  toString(e, t, n) {
1641
- return e ? Ks(this, e, {
1673
+ return e ? zs(this, e, {
1642
1674
  blockItemPrefix: "- ",
1643
1675
  flowChars: { start: "[", end: "]" },
1644
1676
  itemIndent: (e.indent || "") + " ",
@@ -1655,23 +1687,23 @@ class te extends _s {
1655
1687
  const c = t instanceof Set ? a : String(o++);
1656
1688
  a = i.call(t, c, a);
1657
1689
  }
1658
- r.items.push(Ae(a, void 0, n));
1690
+ r.items.push(Oe(a, void 0, n));
1659
1691
  }
1660
1692
  }
1661
1693
  return r;
1662
1694
  }
1663
1695
  }
1664
1696
  function Ke(s) {
1665
- let e = O(s) ? s.value : s;
1697
+ let e = v(s) ? s.value : s;
1666
1698
  return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
1667
1699
  }
1668
- const be = {
1700
+ const ke = {
1669
1701
  collection: "seq",
1670
1702
  default: !0,
1671
1703
  nodeClass: te,
1672
1704
  tag: "tag:yaml.org,2002:seq",
1673
1705
  resolve(s, e) {
1674
- return _e(s) || e("Expected a sequence for this tag"), s;
1706
+ return Pe(s) || e("Expected a sequence for this tag"), s;
1675
1707
  },
1676
1708
  createNode: (s, e, t) => te.from(s, e, t)
1677
1709
  }, nt = {
@@ -1680,7 +1712,7 @@ const be = {
1680
1712
  tag: "tag:yaml.org,2002:str",
1681
1713
  resolve: (s) => s,
1682
1714
  stringify(s, e, t, n) {
1683
- return e = Object.assign({ actualString: !0 }, e), Ct(s, e, t, n);
1715
+ return e = Object.assign({ actualString: !0 }, e), Rt(s, e, t, n);
1684
1716
  }
1685
1717
  }, it = {
1686
1718
  identify: (s) => s == null,
@@ -1690,14 +1722,14 @@ const be = {
1690
1722
  test: /^(?:~|[Nn]ull|NULL)?$/,
1691
1723
  resolve: () => new I(null),
1692
1724
  stringify: ({ source: s }, e) => typeof s == "string" && it.test.test(s) ? s : e.options.nullStr
1693
- }, _t = {
1725
+ }, Dt = {
1694
1726
  identify: (s) => typeof s == "boolean",
1695
1727
  default: !0,
1696
1728
  tag: "tag:yaml.org,2002:bool",
1697
1729
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1698
1730
  resolve: (s) => new I(s[0] === "t" || s[0] === "T"),
1699
1731
  stringify({ source: s, value: e }, t) {
1700
- if (s && _t.test.test(s)) {
1732
+ if (s && Dt.test.test(s)) {
1701
1733
  const n = s[0] === "t" || s[0] === "T";
1702
1734
  if (e === n)
1703
1735
  return s;
@@ -1705,7 +1737,7 @@ const be = {
1705
1737
  return e ? t.options.trueStr : t.options.falseStr;
1706
1738
  }
1707
1739
  };
1708
- function Y({ format: s, minFractionDigits: e, tag: t, value: n }) {
1740
+ function H({ format: s, minFractionDigits: e, tag: t, value: n }) {
1709
1741
  if (typeof n == "bigint")
1710
1742
  return String(n);
1711
1743
  const i = typeof n == "number" ? n : Number(n);
@@ -1721,14 +1753,14 @@ function Y({ format: s, minFractionDigits: e, tag: t, value: n }) {
1721
1753
  }
1722
1754
  return r;
1723
1755
  }
1724
- const Fs = {
1756
+ const Qs = {
1725
1757
  identify: (s) => typeof s == "number",
1726
1758
  default: !0,
1727
1759
  tag: "tag:yaml.org,2002:float",
1728
1760
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1729
1761
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1730
- stringify: Y
1731
- }, qs = {
1762
+ stringify: H
1763
+ }, Xs = {
1732
1764
  identify: (s) => typeof s == "number",
1733
1765
  default: !0,
1734
1766
  tag: "tag:yaml.org,2002:float",
@@ -1737,9 +1769,9 @@ const Fs = {
1737
1769
  resolve: (s) => parseFloat(s),
1738
1770
  stringify(s) {
1739
1771
  const e = Number(s.value);
1740
- return isFinite(e) ? e.toExponential() : Y(s);
1772
+ return isFinite(e) ? e.toExponential() : H(s);
1741
1773
  }
1742
- }, Us = {
1774
+ }, Zs = {
1743
1775
  identify: (s) => typeof s == "number",
1744
1776
  default: !0,
1745
1777
  tag: "tag:yaml.org,2002:float",
@@ -1748,52 +1780,52 @@ const Fs = {
1748
1780
  const e = new I(parseFloat(s)), t = s.indexOf(".");
1749
1781
  return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1750
1782
  },
1751
- stringify: Y
1752
- }, rt = (s) => typeof s == "bigint" || Number.isInteger(s), Pt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1753
- function Ys(s, e, t) {
1783
+ stringify: H
1784
+ }, rt = (s) => typeof s == "bigint" || Number.isInteger(s), jt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1785
+ function en(s, e, t) {
1754
1786
  const { value: n } = s;
1755
- return rt(n) && n >= 0 ? t + n.toString(e) : Y(s);
1787
+ return rt(n) && n >= 0 ? t + n.toString(e) : H(s);
1756
1788
  }
1757
- const Hs = {
1789
+ const tn = {
1758
1790
  identify: (s) => rt(s) && s >= 0,
1759
1791
  default: !0,
1760
1792
  tag: "tag:yaml.org,2002:int",
1761
1793
  format: "OCT",
1762
1794
  test: /^0o[0-7]+$/,
1763
- resolve: (s, e, t) => Pt(s, 2, 8, t),
1764
- stringify: (s) => Ys(s, 8, "0o")
1765
- }, Gs = {
1795
+ resolve: (s, e, t) => jt(s, 2, 8, t),
1796
+ stringify: (s) => en(s, 8, "0o")
1797
+ }, sn = {
1766
1798
  identify: rt,
1767
1799
  default: !0,
1768
1800
  tag: "tag:yaml.org,2002:int",
1769
1801
  test: /^[-+]?[0-9]+$/,
1770
- resolve: (s, e, t) => Pt(s, 0, 10, t),
1771
- stringify: Y
1772
- }, Vs = {
1802
+ resolve: (s, e, t) => jt(s, 0, 10, t),
1803
+ stringify: H
1804
+ }, nn = {
1773
1805
  identify: (s) => rt(s) && s >= 0,
1774
1806
  default: !0,
1775
1807
  tag: "tag:yaml.org,2002:int",
1776
1808
  format: "HEX",
1777
1809
  test: /^0x[0-9a-fA-F]+$/,
1778
- resolve: (s, e, t) => Pt(s, 2, 16, t),
1779
- stringify: (s) => Ys(s, 16, "0x")
1780
- }, gi = [
1781
- we,
1810
+ resolve: (s, e, t) => jt(s, 2, 16, t),
1811
+ stringify: (s) => en(s, 16, "0x")
1812
+ }, Ci = [
1782
1813
  be,
1814
+ ke,
1783
1815
  nt,
1784
1816
  it,
1785
- _t,
1786
- Hs,
1787
- Gs,
1788
- Vs,
1789
- Fs,
1790
- qs,
1791
- Us
1817
+ Dt,
1818
+ tn,
1819
+ sn,
1820
+ nn,
1821
+ Qs,
1822
+ Xs,
1823
+ Zs
1792
1824
  ];
1793
- function ns(s) {
1825
+ function as(s) {
1794
1826
  return typeof s == "bigint" || Number.isInteger(s);
1795
1827
  }
1796
- const Fe = ({ value: s }) => JSON.stringify(s), yi = [
1828
+ const Fe = ({ value: s }) => JSON.stringify(s), Li = [
1797
1829
  {
1798
1830
  identify: (s) => typeof s == "string",
1799
1831
  default: !0,
@@ -1819,12 +1851,12 @@ const Fe = ({ value: s }) => JSON.stringify(s), yi = [
1819
1851
  stringify: Fe
1820
1852
  },
1821
1853
  {
1822
- identify: ns,
1854
+ identify: as,
1823
1855
  default: !0,
1824
1856
  tag: "tag:yaml.org,2002:int",
1825
1857
  test: /^-?(?:0|[1-9][0-9]*)$/,
1826
1858
  resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1827
- stringify: ({ value: s }) => ns(s) ? s.toString() : JSON.stringify(s)
1859
+ stringify: ({ value: s }) => as(s) ? s.toString() : JSON.stringify(s)
1828
1860
  },
1829
1861
  {
1830
1862
  identify: (s) => typeof s == "number",
@@ -1834,14 +1866,14 @@ const Fe = ({ value: s }) => JSON.stringify(s), yi = [
1834
1866
  resolve: (s) => parseFloat(s),
1835
1867
  stringify: Fe
1836
1868
  }
1837
- ], wi = {
1869
+ ], _i = {
1838
1870
  default: !0,
1839
1871
  tag: "",
1840
1872
  test: /^/,
1841
1873
  resolve(s, e) {
1842
1874
  return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1843
1875
  }
1844
- }, bi = [we, be].concat(yi, wi), Rt = {
1876
+ }, Pi = [be, ke].concat(Li, _i), Bt = {
1845
1877
  identify: (s) => s instanceof Uint8Array,
1846
1878
  // Buffer inherits from Uint8Array
1847
1879
  default: !1,
@@ -1882,17 +1914,17 @@ const Fe = ({ value: s }) => JSON.stringify(s), yi = [
1882
1914
  a = u.join(e === I.BLOCK_LITERAL ? `
1883
1915
  ` : " ");
1884
1916
  }
1885
- return Ct({ comment: s, type: e, value: a }, n, i, r);
1917
+ return Rt({ comment: s, type: e, value: a }, n, i, r);
1886
1918
  }
1887
1919
  };
1888
- function Js(s, e) {
1889
- if (_e(s))
1920
+ function rn(s, e) {
1921
+ if (Pe(s))
1890
1922
  for (let t = 0; t < s.items.length; ++t) {
1891
1923
  let n = s.items[t];
1892
1924
  if (!_(n)) {
1893
- if (Le(n)) {
1925
+ if (_e(n)) {
1894
1926
  n.items.length > 1 && e("Each pair must have its own sequence indicator");
1895
- const i = n.items[0] || new D(new I(null));
1927
+ const i = n.items[0] || new M(new I(null));
1896
1928
  if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1897
1929
  ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1898
1930
  const r = i.value ?? i.key;
@@ -1901,14 +1933,14 @@ ${r.comment}` : n.comment;
1901
1933
  }
1902
1934
  n = i;
1903
1935
  }
1904
- s.items[t] = _(n) ? n : new D(n);
1936
+ s.items[t] = _(n) ? n : new M(n);
1905
1937
  }
1906
1938
  }
1907
1939
  else
1908
1940
  e("Expected a sequence for this tag");
1909
1941
  return s;
1910
1942
  }
1911
- function Ws(s, e, t) {
1943
+ function on(s, e, t) {
1912
1944
  const { replacer: n } = t, i = new te(s);
1913
1945
  i.tag = "tag:yaml.org,2002:pairs";
1914
1946
  let r = 0;
@@ -1929,20 +1961,20 @@ function Ws(s, e, t) {
1929
1961
  throw new TypeError(`Expected tuple with one key, not ${l.length} keys`);
1930
1962
  } else
1931
1963
  a = o;
1932
- i.items.push(Lt(a, c, t));
1964
+ i.items.push(Mt(a, c, t));
1933
1965
  }
1934
1966
  return i;
1935
1967
  }
1936
- const Dt = {
1968
+ const Kt = {
1937
1969
  collection: "seq",
1938
1970
  default: !1,
1939
1971
  tag: "tag:yaml.org,2002:pairs",
1940
- resolve: Js,
1941
- createNode: Ws
1972
+ resolve: rn,
1973
+ createNode: on
1942
1974
  };
1943
1975
  class fe extends te {
1944
1976
  constructor() {
1945
- super(), this.add = M.prototype.add.bind(this), this.delete = M.prototype.delete.bind(this), this.get = M.prototype.get.bind(this), this.has = M.prototype.has.bind(this), this.set = M.prototype.set.bind(this), this.tag = fe.tag;
1977
+ super(), this.add = D.prototype.add.bind(this), this.delete = D.prototype.delete.bind(this), this.get = D.prototype.get.bind(this), this.has = D.prototype.has.bind(this), this.set = D.prototype.set.bind(this), this.tag = fe.tag;
1946
1978
  }
1947
1979
  /**
1948
1980
  * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
@@ -1962,50 +1994,50 @@ class fe extends te {
1962
1994
  return n;
1963
1995
  }
1964
1996
  static from(e, t, n) {
1965
- const i = Ws(e, t, n), r = new this();
1997
+ const i = on(e, t, n), r = new this();
1966
1998
  return r.items = i.items, r;
1967
1999
  }
1968
2000
  }
1969
2001
  fe.tag = "tag:yaml.org,2002:omap";
1970
- const Mt = {
2002
+ const Ft = {
1971
2003
  collection: "seq",
1972
2004
  identify: (s) => s instanceof Map,
1973
2005
  nodeClass: fe,
1974
2006
  default: !1,
1975
2007
  tag: "tag:yaml.org,2002:omap",
1976
2008
  resolve(s, e) {
1977
- const t = Js(s, e), n = [];
2009
+ const t = rn(s, e), n = [];
1978
2010
  for (const { key: i } of t.items)
1979
- O(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
2011
+ v(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1980
2012
  return Object.assign(new fe(), t);
1981
2013
  },
1982
2014
  createNode: (s, e, t) => fe.from(s, e, t)
1983
2015
  };
1984
- function xs({ value: s, source: e }, t) {
1985
- return e && (s ? zs : Qs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
2016
+ function an({ value: s, source: e }, t) {
2017
+ return e && (s ? cn : ln).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1986
2018
  }
1987
- const zs = {
2019
+ const cn = {
1988
2020
  identify: (s) => s === !0,
1989
2021
  default: !0,
1990
2022
  tag: "tag:yaml.org,2002:bool",
1991
2023
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1992
2024
  resolve: () => new I(!0),
1993
- stringify: xs
1994
- }, Qs = {
2025
+ stringify: an
2026
+ }, ln = {
1995
2027
  identify: (s) => s === !1,
1996
2028
  default: !0,
1997
2029
  tag: "tag:yaml.org,2002:bool",
1998
2030
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1999
2031
  resolve: () => new I(!1),
2000
- stringify: xs
2001
- }, ki = {
2032
+ stringify: an
2033
+ }, Ri = {
2002
2034
  identify: (s) => typeof s == "number",
2003
2035
  default: !0,
2004
2036
  tag: "tag:yaml.org,2002:float",
2005
2037
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
2006
2038
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
2007
- stringify: Y
2008
- }, Si = {
2039
+ stringify: H
2040
+ }, Mi = {
2009
2041
  identify: (s) => typeof s == "number",
2010
2042
  default: !0,
2011
2043
  tag: "tag:yaml.org,2002:float",
@@ -2014,9 +2046,9 @@ const zs = {
2014
2046
  resolve: (s) => parseFloat(s.replace(/_/g, "")),
2015
2047
  stringify(s) {
2016
2048
  const e = Number(s.value);
2017
- return isFinite(e) ? e.toExponential() : Y(s);
2049
+ return isFinite(e) ? e.toExponential() : H(s);
2018
2050
  }
2019
- }, Ei = {
2051
+ }, Di = {
2020
2052
  identify: (s) => typeof s == "number",
2021
2053
  default: !0,
2022
2054
  tag: "tag:yaml.org,2002:float",
@@ -2029,8 +2061,8 @@ const zs = {
2029
2061
  }
2030
2062
  return e;
2031
2063
  },
2032
- stringify: Y
2033
- }, Pe = (s) => typeof s == "bigint" || Number.isInteger(s);
2064
+ stringify: H
2065
+ }, Re = (s) => typeof s == "bigint" || Number.isInteger(s);
2034
2066
  function ot(s, e, t, { intAsBigInt: n }) {
2035
2067
  const i = s[0];
2036
2068
  if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
@@ -2051,53 +2083,53 @@ function ot(s, e, t, { intAsBigInt: n }) {
2051
2083
  const r = parseInt(s, t);
2052
2084
  return i === "-" ? -1 * r : r;
2053
2085
  }
2054
- function jt(s, e, t) {
2086
+ function qt(s, e, t) {
2055
2087
  const { value: n } = s;
2056
- if (Pe(n)) {
2088
+ if (Re(n)) {
2057
2089
  const i = n.toString(e);
2058
2090
  return n < 0 ? "-" + t + i.substr(1) : t + i;
2059
2091
  }
2060
- return Y(s);
2092
+ return H(s);
2061
2093
  }
2062
- const Ni = {
2063
- identify: Pe,
2094
+ const ji = {
2095
+ identify: Re,
2064
2096
  default: !0,
2065
2097
  tag: "tag:yaml.org,2002:int",
2066
2098
  format: "BIN",
2067
2099
  test: /^[-+]?0b[0-1_]+$/,
2068
2100
  resolve: (s, e, t) => ot(s, 2, 2, t),
2069
- stringify: (s) => jt(s, 2, "0b")
2070
- }, Ii = {
2071
- identify: Pe,
2101
+ stringify: (s) => qt(s, 2, "0b")
2102
+ }, Bi = {
2103
+ identify: Re,
2072
2104
  default: !0,
2073
2105
  tag: "tag:yaml.org,2002:int",
2074
2106
  format: "OCT",
2075
2107
  test: /^[-+]?0[0-7_]+$/,
2076
2108
  resolve: (s, e, t) => ot(s, 1, 8, t),
2077
- stringify: (s) => jt(s, 8, "0")
2078
- }, Ti = {
2079
- identify: Pe,
2109
+ stringify: (s) => qt(s, 8, "0")
2110
+ }, Ki = {
2111
+ identify: Re,
2080
2112
  default: !0,
2081
2113
  tag: "tag:yaml.org,2002:int",
2082
2114
  test: /^[-+]?[0-9][0-9_]*$/,
2083
2115
  resolve: (s, e, t) => ot(s, 0, 10, t),
2084
- stringify: Y
2085
- }, $i = {
2086
- identify: Pe,
2116
+ stringify: H
2117
+ }, Fi = {
2118
+ identify: Re,
2087
2119
  default: !0,
2088
2120
  tag: "tag:yaml.org,2002:int",
2089
2121
  format: "HEX",
2090
2122
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
2091
2123
  resolve: (s, e, t) => ot(s, 2, 16, t),
2092
- stringify: (s) => jt(s, 16, "0x")
2124
+ stringify: (s) => qt(s, 16, "0x")
2093
2125
  };
2094
- class ue extends M {
2126
+ class ue extends D {
2095
2127
  constructor(e) {
2096
2128
  super(e), this.tag = ue.tag;
2097
2129
  }
2098
2130
  add(e) {
2099
2131
  let t;
2100
- _(e) ? t = e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? t = new D(e.key, null) : t = new D(e, null), ee(this.items, t.key) || this.items.push(t);
2132
+ _(e) ? t = e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? t = new M(e.key, null) : t = new M(e, null), ee(this.items, t.key) || this.items.push(t);
2101
2133
  }
2102
2134
  /**
2103
2135
  * If `keepPair` is `true`, returns the Pair matching `key`.
@@ -2105,13 +2137,13 @@ class ue extends M {
2105
2137
  */
2106
2138
  get(e, t) {
2107
2139
  const n = ee(this.items, e);
2108
- return !t && _(n) ? O(n.key) ? n.key.value : n.key : n;
2140
+ return !t && _(n) ? v(n.key) ? n.key.value : n.key : n;
2109
2141
  }
2110
2142
  set(e, t) {
2111
2143
  if (typeof t != "boolean")
2112
2144
  throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
2113
2145
  const n = ee(this.items, e);
2114
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new D(e));
2146
+ n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new M(e));
2115
2147
  }
2116
2148
  toJSON(e, t) {
2117
2149
  return super.toJSON(e, t, Set);
@@ -2127,12 +2159,12 @@ class ue extends M {
2127
2159
  const { replacer: i } = n, r = new this(e);
2128
2160
  if (t && Symbol.iterator in Object(t))
2129
2161
  for (let o of t)
2130
- typeof i == "function" && (o = i.call(t, o, o)), r.items.push(Lt(o, null, n));
2162
+ typeof i == "function" && (o = i.call(t, o, o)), r.items.push(Mt(o, null, n));
2131
2163
  return r;
2132
2164
  }
2133
2165
  }
2134
2166
  ue.tag = "tag:yaml.org,2002:set";
2135
- const Bt = {
2167
+ const Ut = {
2136
2168
  collection: "map",
2137
2169
  identify: (s) => s instanceof Set,
2138
2170
  nodeClass: ue,
@@ -2140,7 +2172,7 @@ const Bt = {
2140
2172
  tag: "tag:yaml.org,2002:set",
2141
2173
  createNode: (s, e, t) => ue.from(s, e, t),
2142
2174
  resolve(s, e) {
2143
- if (Le(s)) {
2175
+ if (_e(s)) {
2144
2176
  if (s.hasAllNullValues(!0))
2145
2177
  return Object.assign(new ue(), s);
2146
2178
  e("Set items must all have null values");
@@ -2149,37 +2181,37 @@ const Bt = {
2149
2181
  return s;
2150
2182
  }
2151
2183
  };
2152
- function Kt(s, e) {
2184
+ function Ht(s, e) {
2153
2185
  const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, a) => o * i(60) + i(a), i(0));
2154
2186
  return t === "-" ? i(-1) * r : r;
2155
2187
  }
2156
- function Xs(s) {
2188
+ function fn(s) {
2157
2189
  let { value: e } = s, t = (o) => o;
2158
2190
  if (typeof e == "bigint")
2159
2191
  t = (o) => BigInt(o);
2160
2192
  else if (isNaN(e) || !isFinite(e))
2161
- return Y(s);
2193
+ return H(s);
2162
2194
  let n = "";
2163
2195
  e < 0 && (n = "-", e *= t(-1));
2164
2196
  const i = t(60), r = [e % i];
2165
2197
  return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
2166
2198
  }
2167
- const Zs = {
2199
+ const un = {
2168
2200
  identify: (s) => typeof s == "bigint" || Number.isInteger(s),
2169
2201
  default: !0,
2170
2202
  tag: "tag:yaml.org,2002:int",
2171
2203
  format: "TIME",
2172
2204
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
2173
- resolve: (s, e, { intAsBigInt: t }) => Kt(s, t),
2174
- stringify: Xs
2175
- }, en = {
2205
+ resolve: (s, e, { intAsBigInt: t }) => Ht(s, t),
2206
+ stringify: fn
2207
+ }, dn = {
2176
2208
  identify: (s) => typeof s == "number",
2177
2209
  default: !0,
2178
2210
  tag: "tag:yaml.org,2002:float",
2179
2211
  format: "TIME",
2180
2212
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
2181
- resolve: (s) => Kt(s, !1),
2182
- stringify: Xs
2213
+ resolve: (s) => Ht(s, !1),
2214
+ stringify: fn
2183
2215
  }, at = {
2184
2216
  identify: (s) => s instanceof Date,
2185
2217
  default: !0,
@@ -2196,69 +2228,69 @@ const Zs = {
2196
2228
  let l = Date.UTC(t, n - 1, i, r || 0, o || 0, a || 0, c);
2197
2229
  const u = e[8];
2198
2230
  if (u && u !== "Z") {
2199
- let f = Kt(u, !1);
2231
+ let f = Ht(u, !1);
2200
2232
  Math.abs(f) < 30 && (f *= 60), l -= 6e4 * f;
2201
2233
  }
2202
2234
  return new Date(l);
2203
2235
  },
2204
2236
  stringify: ({ value: s }) => (s == null ? void 0 : s.toISOString().replace(/(T00:00:00)?\.000Z$/, "")) ?? ""
2205
- }, is = [
2206
- we,
2237
+ }, cs = [
2207
2238
  be,
2239
+ ke,
2208
2240
  nt,
2209
2241
  it,
2210
- zs,
2211
- Qs,
2212
- Ni,
2213
- Ii,
2214
- Ti,
2215
- $i,
2216
- ki,
2217
- Si,
2218
- Ei,
2219
- Rt,
2220
- J,
2221
- Mt,
2222
- Dt,
2242
+ cn,
2243
+ ln,
2244
+ ji,
2245
+ Bi,
2246
+ Ki,
2247
+ Fi,
2248
+ Ri,
2249
+ Mi,
2250
+ Di,
2223
2251
  Bt,
2224
- Zs,
2225
- en,
2252
+ J,
2253
+ Ft,
2254
+ Kt,
2255
+ Ut,
2256
+ un,
2257
+ dn,
2226
2258
  at
2227
- ], rs = /* @__PURE__ */ new Map([
2228
- ["core", gi],
2229
- ["failsafe", [we, be, nt]],
2230
- ["json", bi],
2231
- ["yaml11", is],
2232
- ["yaml-1.1", is]
2233
- ]), os = {
2234
- binary: Rt,
2235
- bool: _t,
2236
- float: Us,
2237
- floatExp: qs,
2238
- floatNaN: Fs,
2239
- floatTime: en,
2240
- int: Gs,
2241
- intHex: Vs,
2242
- intOct: Hs,
2243
- intTime: Zs,
2244
- map: we,
2259
+ ], ls = /* @__PURE__ */ new Map([
2260
+ ["core", Ci],
2261
+ ["failsafe", [be, ke, nt]],
2262
+ ["json", Pi],
2263
+ ["yaml11", cs],
2264
+ ["yaml-1.1", cs]
2265
+ ]), fs = {
2266
+ binary: Bt,
2267
+ bool: Dt,
2268
+ float: Zs,
2269
+ floatExp: Xs,
2270
+ floatNaN: Qs,
2271
+ floatTime: dn,
2272
+ int: sn,
2273
+ intHex: nn,
2274
+ intOct: tn,
2275
+ intTime: un,
2276
+ map: be,
2245
2277
  merge: J,
2246
2278
  null: it,
2247
- omap: Mt,
2248
- pairs: Dt,
2249
- seq: be,
2250
- set: Bt,
2279
+ omap: Ft,
2280
+ pairs: Kt,
2281
+ seq: ke,
2282
+ set: Ut,
2251
2283
  timestamp: at
2252
- }, Ai = {
2253
- "tag:yaml.org,2002:binary": Rt,
2284
+ }, qi = {
2285
+ "tag:yaml.org,2002:binary": Bt,
2254
2286
  "tag:yaml.org,2002:merge": J,
2255
- "tag:yaml.org,2002:omap": Mt,
2256
- "tag:yaml.org,2002:pairs": Dt,
2257
- "tag:yaml.org,2002:set": Bt,
2287
+ "tag:yaml.org,2002:omap": Ft,
2288
+ "tag:yaml.org,2002:pairs": Kt,
2289
+ "tag:yaml.org,2002:set": Ut,
2258
2290
  "tag:yaml.org,2002:timestamp": at
2259
2291
  };
2260
2292
  function dt(s, e, t) {
2261
- const n = rs.get(e);
2293
+ const n = ls.get(e);
2262
2294
  if (n && !s)
2263
2295
  return t && !n.includes(J) ? n.concat(J) : n.slice();
2264
2296
  let i = n;
@@ -2266,7 +2298,7 @@ function dt(s, e, t) {
2266
2298
  if (Array.isArray(s))
2267
2299
  i = [];
2268
2300
  else {
2269
- const r = Array.from(rs.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2301
+ const r = Array.from(ls.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2270
2302
  throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`);
2271
2303
  }
2272
2304
  if (Array.isArray(s))
@@ -2274,25 +2306,25 @@ function dt(s, e, t) {
2274
2306
  i = i.concat(r);
2275
2307
  else typeof s == "function" && (i = s(i.slice()));
2276
2308
  return t && (i = i.concat(J)), i.reduce((r, o) => {
2277
- const a = typeof o == "string" ? os[o] : o;
2309
+ const a = typeof o == "string" ? fs[o] : o;
2278
2310
  if (!a) {
2279
- const c = JSON.stringify(o), l = Object.keys(os).map((u) => JSON.stringify(u)).join(", ");
2311
+ const c = JSON.stringify(o), l = Object.keys(fs).map((u) => JSON.stringify(u)).join(", ");
2280
2312
  throw new Error(`Unknown custom tag ${c}; use one of ${l}`);
2281
2313
  }
2282
2314
  return r.includes(a) || r.push(a), r;
2283
2315
  }, []);
2284
2316
  }
2285
- const vi = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2286
- class Ft {
2317
+ const Ui = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2318
+ class Yt {
2287
2319
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: a }) {
2288
- this.compat = Array.isArray(e) ? dt(e, "compat") : e ? dt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? Ai : {}, this.tags = dt(t, this.name, n), this.toStringOptions = a ?? null, Object.defineProperty(this, z, { value: we }), Object.defineProperty(this, H, { value: nt }), Object.defineProperty(this, me, { value: be }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? vi : null;
2320
+ this.compat = Array.isArray(e) ? dt(e, "compat") : e ? dt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? qi : {}, this.tags = dt(t, this.name, n), this.toStringOptions = a ?? null, Object.defineProperty(this, z, { value: be }), Object.defineProperty(this, Y, { value: nt }), Object.defineProperty(this, ge, { value: ke }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? Ui : null;
2289
2321
  }
2290
2322
  clone() {
2291
- const e = Object.create(Ft.prototype, Object.getOwnPropertyDescriptors(this));
2323
+ const e = Object.create(Yt.prototype, Object.getOwnPropertyDescriptors(this));
2292
2324
  return e.tags = this.tags.slice(), e;
2293
2325
  }
2294
2326
  }
2295
- function Oi(s, e) {
2327
+ function Hi(s, e) {
2296
2328
  var c;
2297
2329
  const t = [];
2298
2330
  let n = e.directives === !0;
@@ -2301,7 +2333,7 @@ function Oi(s, e) {
2301
2333
  l ? (t.push(l), n = !0) : s.directives.docStart && (n = !0);
2302
2334
  }
2303
2335
  n && t.push("---");
2304
- const i = Rs(s, e), { commentString: r } = i.options;
2336
+ const i = Gs(s, e), { commentString: r } = i.options;
2305
2337
  if (s.commentBefore) {
2306
2338
  t.length !== 1 && t.unshift("");
2307
2339
  const l = r(s.commentBefore);
@@ -2336,9 +2368,9 @@ function Oi(s, e) {
2336
2368
  `) + `
2337
2369
  `;
2338
2370
  }
2339
- class Re {
2371
+ class Me {
2340
2372
  constructor(e, t, n) {
2341
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, B, { value: wt });
2373
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, B, { value: kt });
2342
2374
  let i = null;
2343
2375
  typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2344
2376
  const r = Object.assign({
@@ -2361,8 +2393,8 @@ class Re {
2361
2393
  * Custom Node values that inherit from `Object` still refer to their original instances.
2362
2394
  */
2363
2395
  clone() {
2364
- const e = Object.create(Re.prototype, {
2365
- [B]: { value: wt }
2396
+ const e = Object.create(Me.prototype, {
2397
+ [B]: { value: kt }
2366
2398
  });
2367
2399
  return e.commentBefore = this.commentBefore, e.comment = this.comment, e.errors = this.errors.slice(), e.warnings = this.warnings.slice(), e.options = Object.assign({}, this.options), this.directives && (e.directives = this.directives.clone()), e.schema = this.schema.clone(), e.contents = L(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
2368
2400
  }
@@ -2385,11 +2417,11 @@ class Re {
2385
2417
  */
2386
2418
  createAlias(e, t) {
2387
2419
  if (!e.anchor) {
2388
- const n = Os(this);
2420
+ const n = Fs(this);
2389
2421
  e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2390
- !t || n.has(t) ? Cs(t || "a", n) : t;
2422
+ !t || n.has(t) ? qs(t || "a", n) : t;
2391
2423
  }
2392
- return new Ot(e.anchor);
2424
+ return new Pt(e.anchor);
2393
2425
  }
2394
2426
  createNode(e, t, n) {
2395
2427
  let i;
@@ -2399,7 +2431,7 @@ class Re {
2399
2431
  const m = (w) => typeof w == "number" || w instanceof String || w instanceof Number, y = t.filter(m).map(String);
2400
2432
  y.length > 0 && (t = t.concat(y)), i = t;
2401
2433
  } else n === void 0 && t && (n = t, t = void 0);
2402
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: a, keepUndefined: c, onTagObj: l, tag: u } = n ?? {}, { onAnchor: f, setAnchors: h, sourceObjects: p } = ni(
2434
+ const { aliasDuplicateObjects: r, anchorPrefix: o, flow: a, keepUndefined: c, onTagObj: l, tag: u } = n ?? {}, { onAnchor: f, setAnchors: h, sourceObjects: p } = yi(
2403
2435
  this,
2404
2436
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2405
2437
  o || "a"
@@ -2411,7 +2443,7 @@ class Re {
2411
2443
  replacer: i,
2412
2444
  schema: this.schema,
2413
2445
  sourceObjects: p
2414
- }, d = Ae(e, u, g);
2446
+ }, d = Oe(e, u, g);
2415
2447
  return a && C(d) && (d.flow = !0), h(), d;
2416
2448
  }
2417
2449
  /**
@@ -2420,7 +2452,7 @@ class Re {
2420
2452
  */
2421
2453
  createPair(e, t, n = {}) {
2422
2454
  const i = this.createNode(e, null, n), r = this.createNode(t, null, n);
2423
- return new D(i, r);
2455
+ return new M(i, r);
2424
2456
  }
2425
2457
  /**
2426
2458
  * Removes a value from the document.
@@ -2434,7 +2466,7 @@ class Re {
2434
2466
  * @returns `true` if the item was found and removed.
2435
2467
  */
2436
2468
  deleteIn(e) {
2437
- return Ne(e) ? this.contents == null ? !1 : (this.contents = null, !0) : ne(this.contents) ? this.contents.deleteIn(e) : !1;
2469
+ return Ie(e) ? this.contents == null ? !1 : (this.contents = null, !0) : ne(this.contents) ? this.contents.deleteIn(e) : !1;
2438
2470
  }
2439
2471
  /**
2440
2472
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -2450,7 +2482,7 @@ class Re {
2450
2482
  * `true` (collections are always returned intact).
2451
2483
  */
2452
2484
  getIn(e, t) {
2453
- return Ne(e) ? !t && O(this.contents) ? this.contents.value : this.contents : C(this.contents) ? this.contents.getIn(e, t) : void 0;
2485
+ return Ie(e) ? !t && v(this.contents) ? this.contents.value : this.contents : C(this.contents) ? this.contents.getIn(e, t) : void 0;
2454
2486
  }
2455
2487
  /**
2456
2488
  * Checks if the document includes a value with the key `key`.
@@ -2462,7 +2494,7 @@ class Re {
2462
2494
  * Checks if the document includes a value at `path`.
2463
2495
  */
2464
2496
  hasIn(e) {
2465
- return Ne(e) ? this.contents !== void 0 : C(this.contents) ? this.contents.hasIn(e) : !1;
2497
+ return Ie(e) ? this.contents !== void 0 : C(this.contents) ? this.contents.hasIn(e) : !1;
2466
2498
  }
2467
2499
  /**
2468
2500
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -2476,7 +2508,7 @@ class Re {
2476
2508
  * boolean to add/remove the item from the set.
2477
2509
  */
2478
2510
  setIn(e, t) {
2479
- Ne(e) ? this.contents = t : this.contents == null ? this.contents = Je(this.schema, Array.from(e), t) : ne(this.contents) && this.contents.setIn(e, t);
2511
+ Ie(e) ? this.contents = t : this.contents == null ? this.contents = Je(this.schema, Array.from(e), t) : ne(this.contents) && this.contents.setIn(e, t);
2480
2512
  }
2481
2513
  /**
2482
2514
  * Change the YAML version and schema used by the document.
@@ -2507,7 +2539,7 @@ class Re {
2507
2539
  if (t.schema instanceof Object)
2508
2540
  this.schema = t.schema;
2509
2541
  else if (n)
2510
- this.schema = new Ft(Object.assign(n, t));
2542
+ this.schema = new Yt(Object.assign(n, t));
2511
2543
  else
2512
2544
  throw new Error("With a null YAML version, the { schema: Schema } option is required");
2513
2545
  }
@@ -2543,7 +2575,7 @@ class Re {
2543
2575
  const t = JSON.stringify(e.indent);
2544
2576
  throw new Error(`"indent" option must be a positive integer, not ${t}`);
2545
2577
  }
2546
- return Oi(this, e);
2578
+ return Hi(this, e);
2547
2579
  }
2548
2580
  }
2549
2581
  function ne(s) {
@@ -2551,22 +2583,22 @@ function ne(s) {
2551
2583
  return !0;
2552
2584
  throw new Error("Expected a YAML collection as document contents");
2553
2585
  }
2554
- class tn extends Error {
2586
+ class hn extends Error {
2555
2587
  constructor(e, t, n, i) {
2556
2588
  super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2557
2589
  }
2558
2590
  }
2559
- class Ie extends tn {
2591
+ class $e extends hn {
2560
2592
  constructor(e, t, n) {
2561
2593
  super("YAMLParseError", e, t, n);
2562
2594
  }
2563
2595
  }
2564
- class Ci extends tn {
2596
+ class Yi extends hn {
2565
2597
  constructor(e, t, n) {
2566
2598
  super("YAMLWarning", e, t, n);
2567
2599
  }
2568
2600
  }
2569
- const as = (s, e) => (t) => {
2601
+ const us = (s, e) => (t) => {
2570
2602
  if (t.pos[0] === -1)
2571
2603
  return;
2572
2604
  t.linePos = t.pos.map((a) => e.linePos(a));
@@ -2603,8 +2635,8 @@ function he(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
2603
2635
  break;
2604
2636
  case "comment": {
2605
2637
  u || r(k, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2606
- const v = k.source.substring(1) || " ";
2607
- f ? f += h + v : f = v, h = "", l = !1;
2638
+ const O = k.source.substring(1) || " ";
2639
+ f ? f += h + O : f = O, h = "", l = !1;
2608
2640
  break;
2609
2641
  }
2610
2642
  case "newline":
@@ -2628,7 +2660,7 @@ function he(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
2628
2660
  default:
2629
2661
  r(k, "UNEXPECTED_TOKEN", `Unexpected ${k.type} token`), l = !1, u = !1;
2630
2662
  }
2631
- const A = s[s.length - 1], T = A ? A.offset + A.source.length : i;
2663
+ const A = s[s.length - 1], $ = A ? A.offset + A.source.length : i;
2632
2664
  return g && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), d && (l && d.indent <= o || (n == null ? void 0 : n.type) === "block-map" || (n == null ? void 0 : n.type) === "block-seq") && r(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2633
2665
  comma: E,
2634
2666
  found: S,
@@ -2638,8 +2670,8 @@ function he(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
2638
2670
  anchor: m,
2639
2671
  tag: y,
2640
2672
  newlineAfterProp: w,
2641
- end: T,
2642
- start: N ?? T
2673
+ end: $,
2674
+ start: N ?? $
2643
2675
  };
2644
2676
  }
2645
2677
  function ve(s) {
@@ -2677,23 +2709,23 @@ function ve(s) {
2677
2709
  return !0;
2678
2710
  }
2679
2711
  }
2680
- function Et(s, e, t) {
2712
+ function It(s, e, t) {
2681
2713
  if ((e == null ? void 0 : e.type) === "flow-collection") {
2682
2714
  const n = e.end[0];
2683
2715
  n.indent === s && (n.source === "]" || n.source === "}") && ve(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2684
2716
  }
2685
2717
  }
2686
- function sn(s, e, t) {
2718
+ function pn(s, e, t) {
2687
2719
  const { uniqueKeys: n } = s.options;
2688
2720
  if (n === !1)
2689
2721
  return !1;
2690
- const i = typeof n == "function" ? n : (r, o) => r === o || O(r) && O(o) && r.value === o.value;
2722
+ const i = typeof n == "function" ? n : (r, o) => r === o || v(r) && v(o) && r.value === o.value;
2691
2723
  return e.some((r) => i(r.key, t));
2692
2724
  }
2693
- const cs = "All mapping items must start at the same column";
2694
- function Li({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2725
+ const ds = "All mapping items must start at the same column";
2726
+ function Gi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2695
2727
  var u;
2696
- const o = (r == null ? void 0 : r.nodeClass) ?? M, a = new o(t.schema);
2728
+ const o = (r == null ? void 0 : r.nodeClass) ?? D, a = new o(t.schema);
2697
2729
  t.atRoot && (t.atRoot = !1);
2698
2730
  let c = n.offset, l = null;
2699
2731
  for (const f of n.items) {
@@ -2706,16 +2738,16 @@ function Li({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2706
2738
  startOnNewline: !0
2707
2739
  }), y = !m.found;
2708
2740
  if (y) {
2709
- if (p && (p.type === "block-seq" ? i(c, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in p && p.indent !== n.indent && i(c, "BAD_INDENT", cs)), !m.anchor && !m.tag && !g) {
2741
+ if (p && (p.type === "block-seq" ? i(c, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in p && p.indent !== n.indent && i(c, "BAD_INDENT", ds)), !m.anchor && !m.tag && !g) {
2710
2742
  l = m.end, m.comment && (a.comment ? a.comment += `
2711
2743
  ` + m.comment : a.comment = m.comment);
2712
2744
  continue;
2713
2745
  }
2714
2746
  (m.newlineAfterProp || ve(p)) && i(p ?? h[h.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2715
- } else ((u = m.found) == null ? void 0 : u.indent) !== n.indent && i(c, "BAD_INDENT", cs);
2747
+ } else ((u = m.found) == null ? void 0 : u.indent) !== n.indent && i(c, "BAD_INDENT", ds);
2716
2748
  t.atKey = !0;
2717
2749
  const w = m.end, E = p ? s(t, p, m, i) : e(t, w, h, null, m, i);
2718
- t.schema.compat && Et(n.indent, p, i), t.atKey = !1, sn(t, a.items, E) && i(w, "DUPLICATE_KEY", "Map keys must be unique");
2750
+ t.schema.compat && It(n.indent, p, i), t.atKey = !1, pn(t, a.items, E) && i(w, "DUPLICATE_KEY", "Map keys must be unique");
2719
2751
  const S = he(g ?? [], {
2720
2752
  indicator: "map-value-ind",
2721
2753
  next: d,
@@ -2727,19 +2759,19 @@ function Li({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2727
2759
  if (c = S.end, S.found) {
2728
2760
  y && ((d == null ? void 0 : d.type) === "block-map" && !S.hasNewline && i(c, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && m.start < S.found.offset - 1024 && i(E.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2729
2761
  const N = d ? s(t, d, S, i) : e(t, c, g, null, S, i);
2730
- t.schema.compat && Et(n.indent, d, i), c = N.range[2];
2731
- const A = new D(E, N);
2762
+ t.schema.compat && It(n.indent, d, i), c = N.range[2];
2763
+ const A = new M(E, N);
2732
2764
  t.options.keepSourceTokens && (A.srcToken = f), a.items.push(A);
2733
2765
  } else {
2734
2766
  y && i(E.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), S.comment && (E.comment ? E.comment += `
2735
2767
  ` + S.comment : E.comment = S.comment);
2736
- const N = new D(E);
2768
+ const N = new M(E);
2737
2769
  t.options.keepSourceTokens && (N.srcToken = f), a.items.push(N);
2738
2770
  }
2739
2771
  }
2740
2772
  return l && l < c && i(l, "IMPOSSIBLE", "Map comment with trailing content"), a.range = [n.offset, c, l ?? c], a;
2741
2773
  }
2742
- function _i({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2774
+ function Vi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2743
2775
  const o = (r == null ? void 0 : r.nodeClass) ?? te, a = new o(t.schema);
2744
2776
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2745
2777
  let c = n.offset, l = null;
@@ -2760,7 +2792,7 @@ function _i({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2760
2792
  continue;
2761
2793
  }
2762
2794
  const p = f ? s(t, f, h, i) : e(t, h.end, u, null, h, i);
2763
- t.schema.compat && Et(n.indent, f, i), c = p.range[2], a.items.push(p);
2795
+ t.schema.compat && It(n.indent, f, i), c = p.range[2], a.items.push(p);
2764
2796
  }
2765
2797
  return a.range = [n.offset, c, l ?? c], a;
2766
2798
  }
@@ -2792,15 +2824,15 @@ function De(s, e, t, n) {
2792
2824
  return { comment: i, offset: e };
2793
2825
  }
2794
2826
  const ht = "Block collections are not allowed within flow collections", pt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2795
- function Pi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2827
+ function Ji({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2796
2828
  var m;
2797
- const o = n.start.source === "{", a = o ? "flow map" : "flow sequence", c = (r == null ? void 0 : r.nodeClass) ?? (o ? M : te), l = new c(t.schema);
2829
+ const o = n.start.source === "{", a = o ? "flow map" : "flow sequence", c = (r == null ? void 0 : r.nodeClass) ?? (o ? D : te), l = new c(t.schema);
2798
2830
  l.flow = !0;
2799
2831
  const u = t.atRoot;
2800
2832
  u && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2801
2833
  let f = n.offset + n.start.source.length;
2802
2834
  for (let y = 0; y < n.items.length; ++y) {
2803
- const w = n.items[y], { start: E, key: S, sep: N, value: A } = w, T = he(E, {
2835
+ const w = n.items[y], { start: E, key: S, sep: N, value: A } = w, $ = he(E, {
2804
2836
  flow: a,
2805
2837
  indicator: "explicit-key-ind",
2806
2838
  next: S ?? (N == null ? void 0 : N[0]),
@@ -2809,10 +2841,10 @@ function Pi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2809
2841
  parentIndent: n.indent,
2810
2842
  startOnNewline: !1
2811
2843
  });
2812
- if (!T.found) {
2813
- if (!T.anchor && !T.tag && !N && !A) {
2814
- y === 0 && T.comma ? i(T.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`) : y < n.items.length - 1 && i(T.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${a}`), T.comment && (l.comment ? l.comment += `
2815
- ` + T.comment : l.comment = T.comment), f = T.end;
2844
+ if (!$.found) {
2845
+ if (!$.anchor && !$.tag && !N && !A) {
2846
+ y === 0 && $.comma ? i($.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`) : y < n.items.length - 1 && i($.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${a}`), $.comment && (l.comment ? l.comment += `
2847
+ ` + $.comment : l.comment = $.comment), f = $.end;
2816
2848
  continue;
2817
2849
  }
2818
2850
  !o && t.options.strict && ve(S) && i(
@@ -2823,44 +2855,44 @@ function Pi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2823
2855
  );
2824
2856
  }
2825
2857
  if (y === 0)
2826
- T.comma && i(T.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`);
2827
- else if (T.comma || i(T.start, "MISSING_CHAR", `Missing , between ${a} items`), T.comment) {
2858
+ $.comma && i($.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`);
2859
+ else if ($.comma || i($.start, "MISSING_CHAR", `Missing , between ${a} items`), $.comment) {
2828
2860
  let k = "";
2829
- e: for (const v of E)
2830
- switch (v.type) {
2861
+ e: for (const O of E)
2862
+ switch (O.type) {
2831
2863
  case "comma":
2832
2864
  case "space":
2833
2865
  break;
2834
2866
  case "comment":
2835
- k = v.source.substring(1);
2867
+ k = O.source.substring(1);
2836
2868
  break e;
2837
2869
  default:
2838
2870
  break e;
2839
2871
  }
2840
2872
  if (k) {
2841
- let v = l.items[l.items.length - 1];
2842
- _(v) && (v = v.value ?? v.key), v.comment ? v.comment += `
2843
- ` + k : v.comment = k, T.comment = T.comment.substring(k.length + 1);
2873
+ let O = l.items[l.items.length - 1];
2874
+ _(O) && (O = O.value ?? O.key), O.comment ? O.comment += `
2875
+ ` + k : O.comment = k, $.comment = $.comment.substring(k.length + 1);
2844
2876
  }
2845
2877
  }
2846
- if (!o && !N && !T.found) {
2847
- const k = A ? s(t, A, T, i) : e(t, T.end, N, null, T, i);
2878
+ if (!o && !N && !$.found) {
2879
+ const k = A ? s(t, A, $, i) : e(t, $.end, N, null, $, i);
2848
2880
  l.items.push(k), f = k.range[2], pt(A) && i(k.range, "BLOCK_IN_FLOW", ht);
2849
2881
  } else {
2850
2882
  t.atKey = !0;
2851
- const k = T.end, v = S ? s(t, S, T, i) : e(t, k, E, null, T, i);
2852
- pt(S) && i(v.range, "BLOCK_IN_FLOW", ht), t.atKey = !1;
2883
+ const k = $.end, O = S ? s(t, S, $, i) : e(t, k, E, null, $, i);
2884
+ pt(S) && i(O.range, "BLOCK_IN_FLOW", ht), t.atKey = !1;
2853
2885
  const P = he(N ?? [], {
2854
2886
  flow: a,
2855
2887
  indicator: "map-value-ind",
2856
2888
  next: A,
2857
- offset: v.range[2],
2889
+ offset: O.range[2],
2858
2890
  onError: i,
2859
2891
  parentIndent: n.indent,
2860
2892
  startOnNewline: !1
2861
2893
  });
2862
2894
  if (P.found) {
2863
- if (!o && !T.found && t.options.strict) {
2895
+ if (!o && !$.found && t.options.strict) {
2864
2896
  if (N)
2865
2897
  for (const q of N) {
2866
2898
  if (q === P.found)
@@ -2870,21 +2902,21 @@ function Pi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2870
2902
  break;
2871
2903
  }
2872
2904
  }
2873
- T.start < P.found.offset - 1024 && i(P.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
2905
+ $.start < P.found.offset - 1024 && i(P.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
2874
2906
  }
2875
2907
  } else A && ("source" in A && ((m = A.source) == null ? void 0 : m[0]) === ":" ? i(A, "MISSING_CHAR", `Missing space after : in ${a}`) : i(P.start, "MISSING_CHAR", `Missing , or : between ${a} items`));
2876
2908
  const G = A ? s(t, A, P, i) : P.found ? e(t, P.end, N, null, P, i) : null;
2877
- G ? pt(A) && i(G.range, "BLOCK_IN_FLOW", ht) : P.comment && (v.comment ? v.comment += `
2878
- ` + P.comment : v.comment = P.comment);
2879
- const F = new D(v, G);
2909
+ G ? pt(A) && i(G.range, "BLOCK_IN_FLOW", ht) : P.comment && (O.comment ? O.comment += `
2910
+ ` + P.comment : O.comment = P.comment);
2911
+ const F = new M(O, G);
2880
2912
  if (t.options.keepSourceTokens && (F.srcToken = w), o) {
2881
2913
  const q = l;
2882
- sn(t, q.items, v) && i(k, "DUPLICATE_KEY", "Map keys must be unique"), q.items.push(F);
2914
+ pn(t, q.items, O) && i(k, "DUPLICATE_KEY", "Map keys must be unique"), q.items.push(F);
2883
2915
  } else {
2884
- const q = new M(t.schema);
2916
+ const q = new D(t.schema);
2885
2917
  q.flow = !0, q.items.push(F);
2886
- const Zt = (G ?? v).range;
2887
- q.range = [v.range[0], Zt[1], Zt[2]], l.items.push(q);
2918
+ const ns = (G ?? O).range;
2919
+ q.range = [O.range[0], ns[1], ns[2]], l.items.push(q);
2888
2920
  }
2889
2921
  f = G ? G.range[2] : P.end;
2890
2922
  }
@@ -2906,10 +2938,10 @@ function Pi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2906
2938
  return l;
2907
2939
  }
2908
2940
  function mt(s, e, t, n, i, r) {
2909
- const o = t.type === "block-map" ? Li(s, e, t, n, r) : t.type === "block-seq" ? _i(s, e, t, n, r) : Pi(s, e, t, n, r), a = o.constructor;
2941
+ const o = t.type === "block-map" ? Gi(s, e, t, n, r) : t.type === "block-seq" ? Vi(s, e, t, n, r) : Ji(s, e, t, n, r), a = o.constructor;
2910
2942
  return i === "!" || i === a.tagName ? (o.tag = a.tagName, o) : (i && (o.tag = i), o);
2911
2943
  }
2912
- function Ri(s, e, t, n, i) {
2944
+ function Wi(s, e, t, n, i) {
2913
2945
  var h;
2914
2946
  const r = n.tag, o = r ? e.directives.tagName(r.source, (p) => i(r, "TAG_RESOLVE_FAILED", p)) : null;
2915
2947
  if (t.type === "block-seq") {
@@ -2917,7 +2949,7 @@ function Ri(s, e, t, n, i) {
2917
2949
  d && (!g || g.offset < d.offset) && i(d, "MISSING_CHAR", "Missing newline after block sequence props");
2918
2950
  }
2919
2951
  const a = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2920
- if (!r || !o || o === "!" || o === M.tagName && a === "map" || o === te.tagName && a === "seq")
2952
+ if (!r || !o || o === "!" || o === D.tagName && a === "map" || o === te.tagName && a === "seq")
2921
2953
  return mt(s, e, t, i, o);
2922
2954
  let c = e.schema.tags.find((p) => p.tag === o && p.collection === a);
2923
2955
  if (!c) {
@@ -2930,11 +2962,11 @@ function Ri(s, e, t, n, i) {
2930
2962
  const l = mt(s, e, t, i, o, c), u = ((h = c.resolve) == null ? void 0 : h.call(c, l, (p) => i(r, "TAG_RESOLVE_FAILED", p), e.options)) ?? l, f = L(u) ? u : new I(u);
2931
2963
  return f.range = l.range, f.tag = o, c != null && c.format && (f.format = c.format), f;
2932
2964
  }
2933
- function Di(s, e, t) {
2934
- const n = e.offset, i = Mi(e, s.options.strict, t);
2965
+ function xi(s, e, t) {
2966
+ const n = e.offset, i = zi(e, s.options.strict, t);
2935
2967
  if (!i)
2936
2968
  return { value: "", type: null, comment: "", range: [n, n, n] };
2937
- const r = i.mode === ">" ? I.BLOCK_FOLDED : I.BLOCK_LITERAL, o = e.source ? ji(e.source) : [];
2969
+ const r = i.mode === ">" ? I.BLOCK_FOLDED : I.BLOCK_LITERAL, o = e.source ? Qi(e.source) : [];
2938
2970
  let a = o.length;
2939
2971
  for (let d = o.length - 1; d >= 0; --d) {
2940
2972
  const m = o[d][1];
@@ -3003,7 +3035,7 @@ function Di(s, e, t) {
3003
3035
  const g = n + i.length + e.source.length;
3004
3036
  return { value: f, type: r, comment: i.comment, range: [n, g, g] };
3005
3037
  }
3006
- function Mi({ offset: s, props: e }, t, n) {
3038
+ function zi({ offset: s, props: e }, t, n) {
3007
3039
  if (e[0].type !== "block-scalar-header")
3008
3040
  return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
3009
3041
  const { source: i } = e[0], r = i[0];
@@ -3043,25 +3075,25 @@ function Mi({ offset: s, props: e }, t, n) {
3043
3075
  }
3044
3076
  return { mode: r, indent: o, chomp: a, comment: u, length: f };
3045
3077
  }
3046
- function ji(s) {
3078
+ function Qi(s) {
3047
3079
  const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
3048
3080
  for (let o = 1; o < e.length; o += 2)
3049
3081
  r.push([e[o], e[o + 1]]);
3050
3082
  return r;
3051
3083
  }
3052
- function Bi(s, e, t) {
3084
+ function Xi(s, e, t) {
3053
3085
  const { offset: n, type: i, source: r, end: o } = s;
3054
3086
  let a, c;
3055
3087
  const l = (h, p, g) => t(n + h, p, g);
3056
3088
  switch (i) {
3057
3089
  case "scalar":
3058
- a = I.PLAIN, c = Ki(r, l);
3090
+ a = I.PLAIN, c = Zi(r, l);
3059
3091
  break;
3060
3092
  case "single-quoted-scalar":
3061
- a = I.QUOTE_SINGLE, c = Fi(r, l);
3093
+ a = I.QUOTE_SINGLE, c = er(r, l);
3062
3094
  break;
3063
3095
  case "double-quoted-scalar":
3064
- a = I.QUOTE_DOUBLE, c = qi(r, l);
3096
+ a = I.QUOTE_DOUBLE, c = tr(r, l);
3065
3097
  break;
3066
3098
  default:
3067
3099
  return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
@@ -3079,7 +3111,7 @@ function Bi(s, e, t) {
3079
3111
  range: [n, u, f.offset]
3080
3112
  };
3081
3113
  }
3082
- function Ki(s, e) {
3114
+ function Zi(s, e) {
3083
3115
  let t = "";
3084
3116
  switch (s[0]) {
3085
3117
  case " ":
@@ -3102,12 +3134,12 @@ function Ki(s, e) {
3102
3134
  break;
3103
3135
  }
3104
3136
  }
3105
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), nn(s);
3137
+ return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), mn(s);
3106
3138
  }
3107
- function Fi(s, e) {
3108
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), nn(s.slice(1, -1)).replace(/''/g, "'");
3139
+ function er(s, e) {
3140
+ return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), mn(s.slice(1, -1)).replace(/''/g, "'");
3109
3141
  }
3110
- function nn(s) {
3142
+ function mn(s) {
3111
3143
  let e, t;
3112
3144
  try {
3113
3145
  e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
@@ -3127,7 +3159,7 @@ function nn(s) {
3127
3159
  const a = /[ \t]*(.*)/sy;
3128
3160
  return a.lastIndex = o, n = a.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
3129
3161
  }
3130
- function qi(s, e) {
3162
+ function tr(s, e) {
3131
3163
  let t = "";
3132
3164
  for (let n = 1; n < s.length - 1; ++n) {
3133
3165
  const i = s[n];
@@ -3135,11 +3167,11 @@ function qi(s, e) {
3135
3167
  `))
3136
3168
  if (i === `
3137
3169
  `) {
3138
- const { fold: r, offset: o } = Ui(s, n);
3170
+ const { fold: r, offset: o } = sr(s, n);
3139
3171
  t += r, n = o;
3140
3172
  } else if (i === "\\") {
3141
3173
  let r = s[++n];
3142
- const o = Yi[r];
3174
+ const o = nr[r];
3143
3175
  if (o)
3144
3176
  t += o;
3145
3177
  else if (r === `
@@ -3152,7 +3184,7 @@ function qi(s, e) {
3152
3184
  r = s[++n + 1];
3153
3185
  else if (r === "x" || r === "u" || r === "U") {
3154
3186
  const a = r === "x" ? 2 : r === "u" ? 4 : 8;
3155
- t += Hi(s, n + 1, a, e), n += a;
3187
+ t += ir(s, n + 1, a, e), n += a;
3156
3188
  } else {
3157
3189
  const a = s.substr(n - 1, 2);
3158
3190
  e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${a}`), t += a;
@@ -3170,7 +3202,7 @@ function qi(s, e) {
3170
3202
  }
3171
3203
  return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
3172
3204
  }
3173
- function Ui(s, e) {
3205
+ function sr(s, e) {
3174
3206
  let t = "", n = s[e + 1];
3175
3207
  for (; (n === " " || n === " " || n === `
3176
3208
  ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
@@ -3180,7 +3212,7 @@ function Ui(s, e) {
3180
3212
  `), e += 1, n = s[e + 1];
3181
3213
  return t || (t = " "), { fold: t, offset: e };
3182
3214
  }
3183
- const Yi = {
3215
+ const nr = {
3184
3216
  0: "\0",
3185
3217
  // null character
3186
3218
  a: "\x07",
@@ -3214,7 +3246,7 @@ const Yi = {
3214
3246
  "\\": "\\",
3215
3247
  " ": " "
3216
3248
  };
3217
- function Hi(s, e, t, n) {
3249
+ function ir(s, e, t, n) {
3218
3250
  const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
3219
3251
  try {
3220
3252
  return String.fromCodePoint(o);
@@ -3223,24 +3255,24 @@ function Hi(s, e, t, n) {
3223
3255
  return n(e - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${a}`), a;
3224
3256
  }
3225
3257
  }
3226
- function rn(s, e, t, n) {
3227
- const { value: i, type: r, comment: o, range: a } = e.type === "block-scalar" ? Di(s, e, n) : Bi(e, s.options.strict, n), c = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3258
+ function gn(s, e, t, n) {
3259
+ const { value: i, type: r, comment: o, range: a } = e.type === "block-scalar" ? xi(s, e, n) : Xi(e, s.options.strict, n), c = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3228
3260
  let l;
3229
- s.options.stringKeys && s.atKey ? l = s.schema[H] : c ? l = Gi(s.schema, i, c, t, n) : e.type === "scalar" ? l = Vi(s, i, e, n) : l = s.schema[H];
3261
+ s.options.stringKeys && s.atKey ? l = s.schema[Y] : c ? l = rr(s.schema, i, c, t, n) : e.type === "scalar" ? l = or(s, i, e, n) : l = s.schema[Y];
3230
3262
  let u;
3231
3263
  try {
3232
3264
  const f = l.resolve(i, (h) => n(t ?? e, "TAG_RESOLVE_FAILED", h), s.options);
3233
- u = O(f) ? f : new I(f);
3265
+ u = v(f) ? f : new I(f);
3234
3266
  } catch (f) {
3235
3267
  const h = f instanceof Error ? f.message : String(f);
3236
3268
  n(t ?? e, "TAG_RESOLVE_FAILED", h), u = new I(i);
3237
3269
  }
3238
3270
  return u.range = a, u.source = i, r && (u.type = r), c && (u.tag = c), l.format && (u.format = l.format), o && (u.comment = o), u;
3239
3271
  }
3240
- function Gi(s, e, t, n, i) {
3272
+ function rr(s, e, t, n, i) {
3241
3273
  var a;
3242
3274
  if (t === "!")
3243
- return s[H];
3275
+ return s[Y];
3244
3276
  const r = [];
3245
3277
  for (const c of s.tags)
3246
3278
  if (!c.collection && c.tag === t)
@@ -3252,18 +3284,18 @@ function Gi(s, e, t, n, i) {
3252
3284
  if ((a = c.test) != null && a.test(e))
3253
3285
  return c;
3254
3286
  const o = s.knownTags[t];
3255
- return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[H]);
3287
+ return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[Y]);
3256
3288
  }
3257
- function Vi({ atKey: s, directives: e, schema: t }, n, i, r) {
3289
+ function or({ atKey: s, directives: e, schema: t }, n, i, r) {
3258
3290
  const o = t.tags.find((a) => {
3259
3291
  var c;
3260
3292
  return (a.default === !0 || s && a.default === "key") && ((c = a.test) == null ? void 0 : c.test(n));
3261
- }) || t[H];
3293
+ }) || t[Y];
3262
3294
  if (t.compat) {
3263
3295
  const a = t.compat.find((c) => {
3264
3296
  var l;
3265
3297
  return c.default && ((l = c.test) == null ? void 0 : l.test(n));
3266
- }) ?? t[H];
3298
+ }) ?? t[Y];
3267
3299
  if (o.tag !== a.tag) {
3268
3300
  const c = e.tagString(o.tag), l = e.tagString(a.tag), u = `Value may be parsed as either ${c} or ${l}`;
3269
3301
  r(i, "TAG_RESOLVE_FAILED", u, !0);
@@ -3271,7 +3303,7 @@ function Vi({ atKey: s, directives: e, schema: t }, n, i, r) {
3271
3303
  }
3272
3304
  return o;
3273
3305
  }
3274
- function Ji(s, e, t) {
3306
+ function ar(s, e, t) {
3275
3307
  if (e) {
3276
3308
  t ?? (t = e.length);
3277
3309
  for (let n = t - 1; n >= 0; --n) {
@@ -3290,25 +3322,25 @@ function Ji(s, e, t) {
3290
3322
  }
3291
3323
  return s;
3292
3324
  }
3293
- const Wi = { composeNode: on, composeEmptyNode: qt };
3294
- function on(s, e, t, n) {
3325
+ const cr = { composeNode: yn, composeEmptyNode: Gt };
3326
+ function yn(s, e, t, n) {
3295
3327
  const i = s.atKey, { spaceBefore: r, comment: o, anchor: a, tag: c } = t;
3296
3328
  let l, u = !0;
3297
3329
  switch (e.type) {
3298
3330
  case "alias":
3299
- l = xi(s, e, n), (a || c) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3331
+ l = lr(s, e, n), (a || c) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3300
3332
  break;
3301
3333
  case "scalar":
3302
3334
  case "single-quoted-scalar":
3303
3335
  case "double-quoted-scalar":
3304
3336
  case "block-scalar":
3305
- l = rn(s, e, c, n), a && (l.anchor = a.source.substring(1));
3337
+ l = gn(s, e, c, n), a && (l.anchor = a.source.substring(1));
3306
3338
  break;
3307
3339
  case "block-map":
3308
3340
  case "block-seq":
3309
3341
  case "flow-collection":
3310
3342
  try {
3311
- l = Ri(Wi, s, e, t, n), a && (l.anchor = a.source.substring(1));
3343
+ l = Wi(cr, s, e, t, n), a && (l.anchor = a.source.substring(1));
3312
3344
  } catch (f) {
3313
3345
  const h = f instanceof Error ? f.message : String(f);
3314
3346
  n(e, "RESOURCE_EXHAUSTION", h);
@@ -3319,25 +3351,25 @@ function on(s, e, t, n) {
3319
3351
  n(e, "UNEXPECTED_TOKEN", f), u = !1;
3320
3352
  }
3321
3353
  }
3322
- return l ?? (l = qt(s, e.offset, void 0, null, t, n)), a && l.anchor === "" && n(a, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!O(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && n(c ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (l.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? l.comment = o : l.commentBefore = o), s.options.keepSourceTokens && u && (l.srcToken = e), l;
3354
+ return l ?? (l = Gt(s, e.offset, void 0, null, t, n)), a && l.anchor === "" && n(a, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!v(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && n(c ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (l.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? l.comment = o : l.commentBefore = o), s.options.keepSourceTokens && u && (l.srcToken = e), l;
3323
3355
  }
3324
- function qt(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: a, end: c }, l) {
3356
+ function Gt(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: a, end: c }, l) {
3325
3357
  const u = {
3326
3358
  type: "scalar",
3327
- offset: Ji(e, t, n),
3359
+ offset: ar(e, t, n),
3328
3360
  indent: -1,
3329
3361
  source: ""
3330
- }, f = rn(s, u, a, l);
3362
+ }, f = gn(s, u, a, l);
3331
3363
  return o && (f.anchor = o.source.substring(1), f.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = c), f;
3332
3364
  }
3333
- function xi({ options: s }, { offset: e, source: t, end: n }, i) {
3334
- const r = new Ot(t.substring(1));
3365
+ function lr({ options: s }, { offset: e, source: t, end: n }, i) {
3366
+ const r = new Pt(t.substring(1));
3335
3367
  r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
3336
3368
  const o = e + t.length, a = De(n, o, s.strict, i);
3337
3369
  return r.range = [e, o, a.offset], a.comment && (r.comment = a.comment), r;
3338
3370
  }
3339
- function zi(s, e, { offset: t, start: n, value: i, end: r }, o) {
3340
- const a = Object.assign({ _directives: e }, s), c = new Re(void 0, a), l = {
3371
+ function fr(s, e, { offset: t, start: n, value: i, end: r }, o) {
3372
+ const a = Object.assign({ _directives: e }, s), c = new Me(void 0, a), l = {
3341
3373
  atKey: !1,
3342
3374
  atRoot: !0,
3343
3375
  directives: c.directives,
@@ -3351,11 +3383,11 @@ function zi(s, e, { offset: t, start: n, value: i, end: r }, o) {
3351
3383
  parentIndent: 0,
3352
3384
  startOnNewline: !0
3353
3385
  });
3354
- u.found && (c.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !u.hasNewline && o(u.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), c.contents = i ? on(l, i, u, o) : qt(l, u.end, n, null, u, o);
3386
+ u.found && (c.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !u.hasNewline && o(u.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), c.contents = i ? yn(l, i, u, o) : Gt(l, u.end, n, null, u, o);
3355
3387
  const f = c.contents.range[2], h = De(r, f, !1, o);
3356
3388
  return h.comment && (c.comment = h.comment), c.range = [t, f, h.offset], c;
3357
3389
  }
3358
- function Se(s) {
3390
+ function Ee(s) {
3359
3391
  if (typeof s == "number")
3360
3392
  return [s, s + 1];
3361
3393
  if (Array.isArray(s))
@@ -3363,7 +3395,7 @@ function Se(s) {
3363
3395
  const { offset: e, source: t } = s;
3364
3396
  return [e, e + (typeof t == "string" ? t.length : 1)];
3365
3397
  }
3366
- function ls(s) {
3398
+ function hs(s) {
3367
3399
  var i;
3368
3400
  let e = "", t = !1, n = !1;
3369
3401
  for (let r = 0; r < s.length; ++r) {
@@ -3384,15 +3416,15 @@ function ls(s) {
3384
3416
  }
3385
3417
  return { comment: e, afterEmptyLine: n };
3386
3418
  }
3387
- class Qi {
3419
+ class ur {
3388
3420
  constructor(e = {}) {
3389
3421
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3390
- const o = Se(t);
3391
- r ? this.warnings.push(new Ci(o, n, i)) : this.errors.push(new Ie(o, n, i));
3422
+ const o = Ee(t);
3423
+ r ? this.warnings.push(new Yi(o, n, i)) : this.errors.push(new $e(o, n, i));
3392
3424
  }, this.directives = new R({ version: e.version || "1.2" }), this.options = e;
3393
3425
  }
3394
3426
  decorate(e, t) {
3395
- const { comment: n, afterEmptyLine: i } = ls(this.prelude);
3427
+ const { comment: n, afterEmptyLine: i } = hs(this.prelude);
3396
3428
  if (n) {
3397
3429
  const r = e.contents;
3398
3430
  if (t)
@@ -3428,7 +3460,7 @@ ${o}` : n;
3428
3460
  */
3429
3461
  streamInfo() {
3430
3462
  return {
3431
- comment: ls(this.prelude).comment,
3463
+ comment: hs(this.prelude).comment,
3432
3464
  directives: this.directives,
3433
3465
  errors: this.errors,
3434
3466
  warnings: this.warnings
@@ -3450,12 +3482,12 @@ ${o}` : n;
3450
3482
  switch (e.type) {
3451
3483
  case "directive":
3452
3484
  this.directives.add(e.source, (t, n, i) => {
3453
- const r = Se(e);
3485
+ const r = Ee(e);
3454
3486
  r[0] += t, this.onError(r, "BAD_DIRECTIVE", n, i);
3455
3487
  }), this.prelude.push(e.source), this.atDirectives = !0;
3456
3488
  break;
3457
3489
  case "document": {
3458
- const t = zi(this.options, this.directives, e, this.onError);
3490
+ const t = fr(this.options, this.directives, e, this.onError);
3459
3491
  this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
3460
3492
  break;
3461
3493
  }
@@ -3467,14 +3499,14 @@ ${o}` : n;
3467
3499
  this.prelude.push(e.source);
3468
3500
  break;
3469
3501
  case "error": {
3470
- const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new Ie(Se(e), "UNEXPECTED_TOKEN", t);
3502
+ const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new $e(Ee(e), "UNEXPECTED_TOKEN", t);
3471
3503
  this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
3472
3504
  break;
3473
3505
  }
3474
3506
  case "doc-end": {
3475
3507
  if (!this.doc) {
3476
3508
  const n = "Unexpected doc-end without preceding document";
3477
- this.errors.push(new Ie(Se(e), "UNEXPECTED_TOKEN", n));
3509
+ this.errors.push(new $e(Ee(e), "UNEXPECTED_TOKEN", n));
3478
3510
  break;
3479
3511
  }
3480
3512
  this.doc.directives.docEnd = !0;
@@ -3488,7 +3520,7 @@ ${t.comment}` : t.comment;
3488
3520
  break;
3489
3521
  }
3490
3522
  default:
3491
- this.errors.push(new Ie(Se(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3523
+ this.errors.push(new $e(Ee(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3492
3524
  }
3493
3525
  }
3494
3526
  /**
@@ -3501,21 +3533,21 @@ ${t.comment}` : t.comment;
3501
3533
  if (this.doc)
3502
3534
  this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3503
3535
  else if (e) {
3504
- const n = Object.assign({ _directives: this.directives }, this.options), i = new Re(void 0, n);
3536
+ const n = Object.assign({ _directives: this.directives }, this.options), i = new Me(void 0, n);
3505
3537
  this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3506
3538
  }
3507
3539
  }
3508
3540
  }
3509
- const an = "\uFEFF", cn = "", ln = "", Nt = "";
3510
- function Xi(s) {
3541
+ const wn = "\uFEFF", bn = "", kn = "", $t = "";
3542
+ function dr(s) {
3511
3543
  switch (s) {
3512
- case an:
3544
+ case wn:
3513
3545
  return "byte-order-mark";
3514
- case cn:
3546
+ case bn:
3515
3547
  return "doc-mode";
3516
- case ln:
3548
+ case kn:
3517
3549
  return "flow-error-end";
3518
- case Nt:
3550
+ case $t:
3519
3551
  return "scalar";
3520
3552
  case "---":
3521
3553
  return "doc-start";
@@ -3581,9 +3613,9 @@ function U(s) {
3581
3613
  return !1;
3582
3614
  }
3583
3615
  }
3584
- const fs = new Set("0123456789ABCDEFabcdef"), Zi = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), qe = new Set(",[]{}"), er = new Set(` ,[]{}
3585
- \r `), gt = (s) => !s || er.has(s);
3586
- class tr {
3616
+ const ps = new Set("0123456789ABCDEFabcdef"), hr = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), qe = new Set(",[]{}"), pr = new Set(` ,[]{}
3617
+ \r `), gt = (s) => !s || pr.has(s);
3618
+ class mr {
3587
3619
  constructor() {
3588
3620
  this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
3589
3621
  }
@@ -3675,7 +3707,7 @@ class tr {
3675
3707
  let e = this.getLine();
3676
3708
  if (e === null)
3677
3709
  return this.setNext("stream");
3678
- if (e[0] === an && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3710
+ if (e[0] === wn && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3679
3711
  let t = e.length, n = e.indexOf("#");
3680
3712
  for (; n !== -1; ) {
3681
3713
  const r = e[n - 1];
@@ -3699,7 +3731,7 @@ class tr {
3699
3731
  const t = yield* this.pushSpaces(!0);
3700
3732
  return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3701
3733
  }
3702
- return yield cn, yield* this.parseLineStart();
3734
+ return yield bn, yield* this.parseLineStart();
3703
3735
  }
3704
3736
  *parseLineStart() {
3705
3737
  const e = this.charAt(0);
@@ -3762,7 +3794,7 @@ class tr {
3762
3794
  if (i === null)
3763
3795
  return this.setNext("flow");
3764
3796
  if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && U(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
3765
- return this.flowLevel = 0, yield ln, yield* this.parseLineStart();
3797
+ return this.flowLevel = 0, yield kn, yield* this.parseLineStart();
3766
3798
  let r = 0;
3767
3799
  for (; i[r] === ","; )
3768
3800
  r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
@@ -3900,7 +3932,7 @@ class tr {
3900
3932
  else
3901
3933
  break;
3902
3934
  } while (!0);
3903
- return yield Nt, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3935
+ return yield $t, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3904
3936
  }
3905
3937
  *parsePlainScalar() {
3906
3938
  const e = this.flowLevel > 0;
@@ -3929,7 +3961,7 @@ class tr {
3929
3961
  break;
3930
3962
  t = n;
3931
3963
  }
3932
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield Nt, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3964
+ return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield $t, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3933
3965
  }
3934
3966
  *pushCount(e) {
3935
3967
  return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
@@ -3971,9 +4003,9 @@ class tr {
3971
4003
  } else {
3972
4004
  let e = this.pos + 1, t = this.buffer[e];
3973
4005
  for (; t; )
3974
- if (Zi.has(t))
4006
+ if (hr.has(t))
3975
4007
  t = this.buffer[++e];
3976
- else if (t === "%" && fs.has(this.buffer[e + 1]) && fs.has(this.buffer[e + 2]))
4008
+ else if (t === "%" && ps.has(this.buffer[e + 1]) && ps.has(this.buffer[e + 2]))
3977
4009
  t = this.buffer[e += 3];
3978
4010
  else
3979
4011
  break;
@@ -4001,7 +4033,7 @@ class tr {
4001
4033
  return yield* this.pushToIndex(t, !1);
4002
4034
  }
4003
4035
  }
4004
- class sr {
4036
+ class gr {
4005
4037
  constructor() {
4006
4038
  this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4007
4039
  let t = 0, n = this.lineStarts.length;
@@ -4024,7 +4056,7 @@ function W(s, e) {
4024
4056
  return !0;
4025
4057
  return !1;
4026
4058
  }
4027
- function us(s) {
4059
+ function ms(s) {
4028
4060
  for (let e = 0; e < s.length; ++e)
4029
4061
  switch (s[e].type) {
4030
4062
  case "space":
@@ -4036,7 +4068,7 @@ function us(s) {
4036
4068
  }
4037
4069
  return -1;
4038
4070
  }
4039
- function fn(s) {
4071
+ function Sn(s) {
4040
4072
  switch (s == null ? void 0 : s.type) {
4041
4073
  case "alias":
4042
4074
  case "scalar":
@@ -4087,18 +4119,18 @@ function xe(s, e) {
4087
4119
  for (let t = 0; t < e.length; ++t)
4088
4120
  s.push(e[t]);
4089
4121
  }
4090
- function ds(s) {
4122
+ function gs(s) {
4091
4123
  if (s.start.type === "flow-seq-start")
4092
4124
  for (const e of s.items)
4093
- e.sep && !e.value && !W(e.start, "explicit-key-ind") && !W(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, fn(e.value) ? e.value.end ? xe(e.value.end, e.sep) : e.value.end = e.sep : xe(e.start, e.sep), delete e.sep);
4125
+ e.sep && !e.value && !W(e.start, "explicit-key-ind") && !W(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, Sn(e.value) ? e.value.end ? xe(e.value.end, e.sep) : e.value.end = e.sep : xe(e.start, e.sep), delete e.sep);
4094
4126
  }
4095
- class nr {
4127
+ class yr {
4096
4128
  /**
4097
4129
  * @param onNewLine - If defined, called separately with the start position of
4098
4130
  * each new line (in `parse()`, including the start of input).
4099
4131
  */
4100
4132
  constructor(e) {
4101
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new tr(), this.onNewLine = e;
4133
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new mr(), this.onNewLine = e;
4102
4134
  }
4103
4135
  /**
4104
4136
  * Parse `source` as a YAML stream.
@@ -4122,7 +4154,7 @@ class nr {
4122
4154
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
4123
4155
  return;
4124
4156
  }
4125
- const t = Xi(e);
4157
+ const t = dr(e);
4126
4158
  if (t)
4127
4159
  if (t === "scalar")
4128
4160
  this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
@@ -4211,7 +4243,7 @@ class nr {
4211
4243
  yield t;
4212
4244
  else {
4213
4245
  const n = this.peek(1);
4214
- switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && ds(t), n.type) {
4246
+ switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && gs(t), n.type) {
4215
4247
  case "document":
4216
4248
  n.value = t;
4217
4249
  break;
@@ -4246,7 +4278,7 @@ class nr {
4246
4278
  }
4247
4279
  if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4248
4280
  const i = t.items[t.items.length - 1];
4249
- i && !i.sep && !i.value && i.start.length > 0 && us(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4281
+ i && !i.sep && !i.value && i.start.length > 0 && ms(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4250
4282
  }
4251
4283
  }
4252
4284
  }
@@ -4284,7 +4316,7 @@ class nr {
4284
4316
  return yield* this.lineEnd(e);
4285
4317
  switch (this.type) {
4286
4318
  case "doc-start": {
4287
- us(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4319
+ ms(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4288
4320
  return;
4289
4321
  }
4290
4322
  case "anchor":
@@ -4414,7 +4446,7 @@ class nr {
4414
4446
  indent: this.indent,
4415
4447
  items: [{ start: o, key: null, sep: [this.sourceToken] }]
4416
4448
  });
4417
- else if (fn(t.key) && !W(t.sep, "newline")) {
4449
+ else if (Sn(t.key) && !W(t.sep, "newline")) {
4418
4450
  const a = ie(t.start), c = t.key, l = t.sep;
4419
4451
  l.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4420
4452
  type: "block-map",
@@ -4564,7 +4596,7 @@ class nr {
4564
4596
  yield* this.pop(), yield* this.step();
4565
4597
  else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4566
4598
  const i = Ue(n), r = ie(i);
4567
- ds(e);
4599
+ gs(e);
4568
4600
  const o = e.end.splice(1, e.end.length);
4569
4601
  o.push(this.sourceToken);
4570
4602
  const a = {
@@ -4673,57 +4705,118 @@ class nr {
4673
4705
  }
4674
4706
  }
4675
4707
  }
4676
- function ir(s) {
4708
+ function wr(s) {
4677
4709
  const e = s.prettyErrors !== !1;
4678
- return { lineCounter: s.lineCounter || e && new sr() || null, prettyErrors: e };
4710
+ return { lineCounter: s.lineCounter || e && new gr() || null, prettyErrors: e };
4679
4711
  }
4680
- function rr(s, e = {}) {
4681
- const { lineCounter: t, prettyErrors: n } = ir(e), i = new nr(t == null ? void 0 : t.addNewLine), r = new Qi(e);
4712
+ function br(s, e = {}) {
4713
+ const { lineCounter: t, prettyErrors: n } = wr(e), i = new yr(t == null ? void 0 : t.addNewLine), r = new ur(e);
4682
4714
  let o = null;
4683
4715
  for (const a of r.compose(i.parse(s), !0, s.length))
4684
4716
  if (!o)
4685
4717
  o = a;
4686
4718
  else if (o.options.logLevel !== "silent") {
4687
- o.errors.push(new Ie(a.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4719
+ o.errors.push(new $e(a.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4688
4720
  break;
4689
4721
  }
4690
- return n && t && (o.errors.forEach(as(s, t)), o.warnings.forEach(as(s, t))), o;
4722
+ return n && t && (o.errors.forEach(us(s, t)), o.warnings.forEach(us(s, t))), o;
4691
4723
  }
4692
- function or(s, e, t) {
4724
+ function kr(s, e, t) {
4693
4725
  let n;
4694
- const i = rr(s, t);
4726
+ const i = br(s, t);
4695
4727
  if (!i)
4696
4728
  return null;
4697
- if (i.warnings.forEach((r) => Ds(i.options.logLevel, r)), i.errors.length > 0) {
4729
+ if (i.warnings.forEach((r) => Vs(i.options.logLevel, r)), i.errors.length > 0) {
4698
4730
  if (i.options.logLevel !== "silent")
4699
4731
  throw i.errors[0];
4700
4732
  i.errors = [];
4701
4733
  }
4702
4734
  return i.toJS(Object.assign({ reviver: n }, t));
4703
4735
  }
4704
- function ar(s, e, t) {
4736
+ function Sr(s, e, t) {
4705
4737
  let n = null;
4706
4738
  if (Array.isArray(e) && (n = e), s === void 0) {
4707
4739
  const { keepUndefined: i } = {};
4708
4740
  if (!i)
4709
4741
  return;
4710
4742
  }
4711
- return Ce(s) && !n ? s.toString(t) : new Re(s, n, t).toString(t);
4743
+ return Le(s) && !n ? s.toString(t) : new Me(s, n, t).toString(t);
4744
+ }
4745
+ function ys(s, e) {
4746
+ return s.toFixed(e).replace(/\.0+$/, "").replace(/(\.\d*?)0+$/, "$1");
4747
+ }
4748
+ function Er(s) {
4749
+ const e = Math.round(s / 1e3), t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), i = e % 60;
4750
+ return t > 0 ? n > 0 ? `${t}h${n}m` : `${t}h` : n > 0 ? i > 0 ? `${n}m${i}s` : `${n}m` : `${i}s`;
4751
+ }
4752
+ function Nr(s) {
4753
+ const e = s.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);
4754
+ if (!e || !e[1] && !e[2] && !e[3]) return null;
4755
+ const t = Number(e[1] ?? 0), n = Number(e[2] ?? 0), i = Number(e[3] ?? 0);
4756
+ return (t * 3600 + n * 60 + i) * 1e3;
4757
+ }
4758
+ function ws(s) {
4759
+ return s >= 1e6 ? `${ys(s / 1e6, 1)}M` : s >= 1e3 ? `${ys(s / 1e3, 1)}k` : `${Math.round(s)}`;
4760
+ }
4761
+ function bs(s) {
4762
+ const e = s.match(/^([\d.]+)([kM]?)$/);
4763
+ if (!e) return 0;
4764
+ const t = Number(e[1]);
4765
+ return Number.isFinite(t) ? e[2] === "M" ? Math.round(t * 1e6) : e[2] === "k" ? Math.round(t * 1e3) : Math.round(t) : 0;
4766
+ }
4767
+ function Ir(s) {
4768
+ return s.replace(/^(?:[\w.]+\.)?anthropic\./, "").replace(/^claude-/, "").replace(/-\d{6,8}$/, "");
4769
+ }
4770
+ function $r(s) {
4771
+ const e = [
4772
+ Er(s.durationMs),
4773
+ `${ws(s.inputTokens)} in`,
4774
+ `${ws(s.outputTokens)} out`
4775
+ ];
4776
+ return s.model && e.push(s.model), s.attempts > 1 && e.push(`×${s.attempts}`), e.join(" · ");
4777
+ }
4778
+ function Tr(s) {
4779
+ const e = s.split("·").map((i) => i.trim()).filter(Boolean);
4780
+ if (e.length === 0) return;
4781
+ const t = Nr(e[0]);
4782
+ if (t === null) return;
4783
+ const n = {
4784
+ durationMs: t,
4785
+ inputTokens: 0,
4786
+ outputTokens: 0,
4787
+ attempts: 1
4788
+ };
4789
+ for (const i of e.slice(1)) {
4790
+ const r = i.match(/^(.+)\s+in$/), o = i.match(/^(.+)\s+out$/), a = i.match(/^×(\d+)$/);
4791
+ r ? n.inputTokens = bs(r[1]) : o ? n.outputTokens = bs(o[1]) : a ? n.attempts = Number(a[1]) : n.model = i;
4792
+ }
4793
+ return n;
4794
+ }
4795
+ function ma(s, e) {
4796
+ return {
4797
+ durationMs: ((s == null ? void 0 : s.durationMs) ?? 0) + e.durationMs,
4798
+ inputTokens: ((s == null ? void 0 : s.inputTokens) ?? 0) + e.inputTokens,
4799
+ outputTokens: ((s == null ? void 0 : s.outputTokens) ?? 0) + e.outputTokens,
4800
+ model: e.model ? Ir(e.model) : s == null ? void 0 : s.model,
4801
+ attempts: ((s == null ? void 0 : s.attempts) ?? 0) + 1
4802
+ };
4712
4803
  }
4713
- const cr = /^#{2,3}\s+/, It = /^[-*]\s+\[([ xX])\]\s+(.*)$/, lr = /^\[review\]\s+(.*)$/, fr = /^-\s+(\d{4}-\d{2}-\d{2}):\s*(.*)$/, ur = /^\[(?:phase:(\d+)|body)\]\s+(?:\[(decision|question)\]\s+)?(.*)$/, dr = /^-\s+\[([ xX])\]\s+(?:(\d{4}-\d{2}-\d{2})\s+)?\[(log|clarification|review|note|decision|question|chat)\]\s+(\[agent\]\s+)?(.*)$/, hr = ["note", "decision", "question"];
4714
- function un(s, e, t) {
4804
+ const Ar = /^#{2,3}\s+/, Tt = /^[-*]\s+\[([ xX])\]\s+(.*)$/, Or = /^\[review\]\s+(.*)$/, vr = /^run:\s*(.+)$/, Cr = /^-\s+(\d{4}-\d{2}-\d{2}):\s*(.*)$/, Lr = /^\[(?:phase:(\d+)|body)\]\s+(?:\[(decision|question)\]\s+)?(.*)$/, _r = /^-\s+\[([ xX])\]\s+(?:(\d{4}-\d{2}-\d{2})\s+)?\[(log|clarification|review|note|decision|question|chat)\]\s+(\[agent\]\s+)?(.*)$/, Pr = ["note", "decision", "question"];
4805
+ function En(s, e, t) {
4715
4806
  const n = [];
4716
4807
  let i = e;
4717
4808
  for (; i < t; ) {
4718
- const r = s[i].match(It);
4809
+ const r = s[i].match(Tt);
4719
4810
  if (r) {
4720
- const o = r[1].toLowerCase() === "x", a = r[2].trim(), c = a.match(lr), l = c ? c[1].trim() : a, u = c ? "review" : void 0, f = [];
4811
+ const o = r[1].toLowerCase() === "x", a = r[2].trim(), c = a.match(Or), l = c ? c[1].trim() : a, u = c ? "review" : void 0, f = [];
4812
+ let h;
4721
4813
  for (i++; i < t; ) {
4722
- const h = s[i];
4723
- if (h.trim() === "" || It.test(h) || cr.test(h)) break;
4724
- if (/^\s/.test(h))
4725
- f.push(h.trimStart()), i++;
4726
- else
4814
+ const p = s[i];
4815
+ if (p.trim() === "" || Tt.test(p) || Ar.test(p)) break;
4816
+ if (/^\s/.test(p)) {
4817
+ const g = p.trimStart(), d = g.match(vr), m = d ? Tr(d[1]) : void 0;
4818
+ m ? h = m : f.push(g), i++;
4819
+ } else
4727
4820
  break;
4728
4821
  }
4729
4822
  n.push({
@@ -4731,43 +4824,45 @@ function un(s, e, t) {
4731
4824
  text: l,
4732
4825
  description: f.length > 0 ? f.join(`
4733
4826
  `) : void 0,
4734
- source: u
4827
+ source: u,
4828
+ run: h
4735
4829
  });
4736
4830
  } else
4737
4831
  i++;
4738
4832
  }
4739
4833
  return n;
4740
4834
  }
4741
- function Ut(s, e, t) {
4835
+ function Vt(s, e, t) {
4742
4836
  const n = [];
4743
4837
  for (let i = e; i < t; i++) {
4744
- const r = s[i].match(fr);
4838
+ const r = s[i].match(Cr);
4745
4839
  r && n.push({ date: r[1], text: r[2].trim() });
4746
4840
  }
4747
4841
  return n;
4748
4842
  }
4749
- function dn(s, e) {
4843
+ function Nn(s, e) {
4750
4844
  const t = [s];
4751
4845
  for (const n of e) {
4752
4846
  const i = n.source === "review" ? `[review] ${n.text}` : n.text;
4753
4847
  if (t.push(`- [${n.done ? "x" : " "}] ${i}`), n.description)
4754
4848
  for (const r of n.description.split(`
4755
4849
  `)) t.push(` ${r}`);
4850
+ n.run && t.push(` run: ${$r(n.run)}`);
4756
4851
  }
4757
4852
  return t;
4758
4853
  }
4759
- function Yt(s, e) {
4854
+ function Jt(s, e) {
4760
4855
  return [s, ...e.map((t) => `- ${t.date}: ${t.text}`)];
4761
4856
  }
4762
- function pr(s) {
4857
+ function Rr(s) {
4763
4858
  return s.kind === "phase" ? `[phase:${s.index}]` : "[body]";
4764
4859
  }
4765
- function mr(s, e, t) {
4860
+ function Mr(s, e, t) {
4766
4861
  const n = [];
4767
4862
  for (let i = e; i < t; i++) {
4768
- const r = s[i].match(It);
4863
+ const r = s[i].match(Tt);
4769
4864
  if (!r) continue;
4770
- const o = r[2].trim().match(ur);
4865
+ const o = r[2].trim().match(Lr);
4771
4866
  if (!o) continue;
4772
4867
  const a = o[1] ? { kind: "phase", index: Number(o[1]) } : { kind: "body" }, c = o[2];
4773
4868
  n.push({
@@ -4779,52 +4874,52 @@ function mr(s, e, t) {
4779
4874
  }
4780
4875
  return n;
4781
4876
  }
4782
- function gr(s) {
4877
+ function Dr(s) {
4783
4878
  const e = ["### Notes"];
4784
4879
  for (const t of s) {
4785
4880
  const n = t.kind && t.kind !== "note" ? `[${t.kind}] ` : "";
4786
4881
  e.push(
4787
- `- [${t.state === "resolved" ? "x" : " "}] ${pr(t.anchor)} ${n}${t.prose}`
4882
+ `- [${t.state === "resolved" ? "x" : " "}] ${Rr(t.anchor)} ${n}${t.prose}`
4788
4883
  );
4789
4884
  }
4790
4885
  return e;
4791
4886
  }
4792
4887
  const ct = {
4793
4888
  headingRe: /^#{2,3}\s+Phases\s*$/i,
4794
- parseEntries: un,
4795
- formatLines: (s) => dn("### Phases", s)
4796
- }, hn = {
4889
+ parseEntries: En,
4890
+ formatLines: (s) => Nn("### Phases", s)
4891
+ }, In = {
4797
4892
  headingRe: /^#{2,3}\s+Fixes\s*$/i,
4798
- parseEntries: un,
4799
- formatLines: (s) => dn("### Fixes", s)
4800
- }, Me = {
4893
+ parseEntries: En,
4894
+ formatLines: (s) => Nn("### Fixes", s)
4895
+ }, je = {
4801
4896
  headingRe: /^#{2,3}\s+Log\s*$/i,
4802
- parseEntries: Ut,
4803
- formatLines: (s) => Yt("### Log", s)
4804
- }, Ht = {
4897
+ parseEntries: Vt,
4898
+ formatLines: (s) => Jt("### Log", s)
4899
+ }, Wt = {
4805
4900
  headingRe: /^#{2,3}\s+Clarifications\s*$/i,
4806
- parseEntries: Ut,
4807
- formatLines: (s) => Yt("### Clarifications", s)
4808
- }, Gt = {
4901
+ parseEntries: Vt,
4902
+ formatLines: (s) => Jt("### Clarifications", s)
4903
+ }, xt = {
4809
4904
  headingRe: /^#{2,3}\s+Notes\s*$/i,
4810
- parseEntries: mr,
4811
- formatLines: gr
4812
- }, yr = {
4905
+ parseEntries: Mr,
4906
+ formatLines: Dr
4907
+ }, jr = {
4813
4908
  headingRe: /^#{2,3}\s+Review\s*$/i,
4814
- parseEntries: Ut,
4815
- formatLines: (s) => Yt("### Review", s)
4909
+ parseEntries: Vt,
4910
+ formatLines: (s) => Jt("### Review", s)
4816
4911
  };
4817
- function wr(s, e, t) {
4912
+ function Br(s, e, t) {
4818
4913
  const n = [];
4819
4914
  for (let i = e; i < t; i++) {
4820
- const r = s[i].match(dr);
4915
+ const r = s[i].match(_r);
4821
4916
  if (!r) continue;
4822
4917
  const o = r[3], a = { kind: o, text: r[5].trim() };
4823
- r[2] && (a.date = r[2]), r[4] && (a.from = "agent"), hr.includes(o) && (a.state = r[1].toLowerCase() === "x" ? "resolved" : "open"), n.push(a);
4918
+ r[2] && (a.date = r[2]), r[4] && (a.from = "agent"), Pr.includes(o) && (a.state = r[1].toLowerCase() === "x" ? "resolved" : "open"), n.push(a);
4824
4919
  }
4825
4920
  return n;
4826
4921
  }
4827
- function br(s) {
4922
+ function Kr(s) {
4828
4923
  const e = ["### Thread"];
4829
4924
  for (const t of s) {
4830
4925
  const n = t.state ? t.state === "resolved" : !0, i = t.date ? `${t.date} ` : "", r = t.from === "agent" ? "[agent] " : "";
@@ -4832,12 +4927,12 @@ function br(s) {
4832
4927
  }
4833
4928
  return e;
4834
4929
  }
4835
- const pn = {
4930
+ const $n = {
4836
4931
  headingRe: /^#{2,3}\s+Thread\s*$/i,
4837
- parseEntries: wr,
4838
- formatLines: br
4932
+ parseEntries: Br,
4933
+ formatLines: Kr
4839
4934
  };
4840
- function kr(s = [], e = [], t = [], n = []) {
4935
+ function Fr(s = [], e = [], t = [], n = []) {
4841
4936
  const i = [
4842
4937
  ...s.map((o) => ({ kind: "log", date: o.date, text: o.text })),
4843
4938
  ...e.map((o) => ({ kind: "clarification", date: o.date, text: o.text })),
@@ -4849,19 +4944,19 @@ function kr(s = [], e = [], t = [], n = []) {
4849
4944
  }));
4850
4945
  return [...i, ...r];
4851
4946
  }
4852
- function Vt(s, e) {
4947
+ function zt(s, e) {
4853
4948
  return s.filter((t) => t.kind === e).map((t) => ({ date: t.date ?? "", text: t.text }));
4854
4949
  }
4855
- function mn(s = []) {
4856
- return Vt(s, "log");
4950
+ function Tn(s = []) {
4951
+ return zt(s, "log");
4857
4952
  }
4858
- function Sr(s = []) {
4859
- return Vt(s, "clarification");
4953
+ function qr(s = []) {
4954
+ return zt(s, "clarification");
4860
4955
  }
4861
- function Er(s = []) {
4862
- return Vt(s, "review");
4956
+ function Ur(s = []) {
4957
+ return zt(s, "review");
4863
4958
  }
4864
- function Nr(s = []) {
4959
+ function Hr(s = []) {
4865
4960
  return s.filter(
4866
4961
  (e) => e.kind === "note" || e.kind === "decision" || e.kind === "question"
4867
4962
  ).map((e) => ({
@@ -4871,10 +4966,10 @@ function Nr(s = []) {
4871
4966
  kind: e.kind
4872
4967
  }));
4873
4968
  }
4874
- function Xo(s, e, t) {
4969
+ function ga(s, e, t) {
4875
4970
  return [...(s ?? []).filter((n) => !e.includes(n.kind)), ...t];
4876
4971
  }
4877
- function Zo(s, e, t, n) {
4972
+ function ya(s, e, t, n) {
4878
4973
  return s.map((i, r) => {
4879
4974
  if (r !== e) return i;
4880
4975
  const o = n ? `${i.text}
@@ -4885,39 +4980,39 @@ ${n}` : i.text;
4885
4980
  return { ...c, kind: t, text: o };
4886
4981
  });
4887
4982
  }
4888
- function ea(s = []) {
4983
+ function wa(s = []) {
4889
4984
  const e = s.reduce((t, n, i) => n.kind === "log" ? i : t, -1);
4890
4985
  return s.slice(e + 1).filter((t) => t.kind === "chat");
4891
4986
  }
4892
- const Ee = b.preprocess(
4987
+ const Ne = b.preprocess(
4893
4988
  (s) => typeof s == "string" ? { agent: s } : s,
4894
4989
  b.object({
4895
- agent: b.enum(Oe),
4990
+ agent: b.enum(Ce),
4896
4991
  model: b.string().optional(),
4897
4992
  effort: b.string().optional()
4898
4993
  })
4899
- ), Q = b.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD"), Ir = b.object({
4994
+ ), Q = b.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD"), Yr = b.object({
4900
4995
  status: b.enum(["idea", "planned", "in-progress", "review", "done", "dropped"]),
4901
4996
  kind: b.enum(["feat", "fix", "chore", "docs", "refactor"]).optional(),
4902
4997
  id: b.string().optional(),
4903
4998
  idea: b.string().optional(),
4904
- agent: b.enum(Oe).optional(),
4999
+ agent: b.enum(Ce).optional(),
4905
5000
  created: Q,
4906
5001
  updated: Q.optional(),
4907
5002
  tags: b.string().optional()
4908
- }), Tr = b.object({
5003
+ }), Gr = b.object({
4909
5004
  id: b.string().describe("Permanent plan ID, e.g. FEAT-24"),
4910
5005
  title: b.string().describe('Human-readable plan name, e.g. "Plan storage architecture"'),
4911
5006
  kind: b.enum(["feat", "fix", "chore", "docs", "refactor"]).describe("Plan kind matching Conventional Commits types"),
4912
5007
  status: b.enum(["idea", "planned", "in-progress", "review", "done", "dropped"]).describe("Current lifecycle status"),
4913
5008
  idea: b.string().optional().describe("IDEA-N backlink if this plan grew out of an idea"),
4914
- agent: b.enum(Oe).optional().describe("Per-plan agent override"),
5009
+ agent: b.enum(Ce).optional().describe("Per-plan agent override"),
4915
5010
  created: Q.describe("Creation date (YYYY-MM-DD)"),
4916
5011
  updated: Q.optional().describe("Last significant update date (YYYY-MM-DD)"),
4917
5012
  audited: Q.optional().describe("Date of last successful convergence audit (YYYY-MM-DD)"),
4918
5013
  "audited-hash": b.string().optional().describe("Content hash of the plan at last audit, used to detect edits regardless of mtime"),
4919
5014
  tags: b.array(b.string()).optional().describe("Tagging categories")
4920
- }), $r = b.object({
5015
+ }), Vr = b.object({
4921
5016
  id: b.string().describe("Permanent idea ID, e.g. IDEA-20"),
4922
5017
  title: b.string().describe("Short idea headline (3-6 words)"),
4923
5018
  kind: b.enum(["idea", "note"]).optional().describe('"note" for ideas that never need a plan; omitted means a plan-bearing idea'),
@@ -4925,7 +5020,7 @@ const Ee = b.preprocess(
4925
5020
  }).refine((s) => s.status === void 0 || s.kind === "note", {
4926
5021
  message: "status is only valid on ideas with kind: note",
4927
5022
  path: ["status"]
4928
- }), Ar = b.object({
5023
+ }), Jr = b.object({
4929
5024
  id: b.string().describe("Permanent lifetime entity ID, e.g. IDEA-45 — never changes"),
4930
5025
  title: b.string().describe("Human-readable entity name"),
4931
5026
  type: b.enum(["feat", "fix", "chore", "docs", "refactor"]).optional().describe(
@@ -4935,7 +5030,7 @@ const Ee = b.preprocess(
4935
5030
  status: b.enum(["idea", "planned", "in-progress", "review", "done", "dropped", "open"]).optional().describe(
4936
5031
  "Stored override, no longer the source of truth: most lifecycle states derive from phases/branch/PR. Only dropped, a planless idea/note being closed, or the offline fallback need this set."
4937
5032
  ),
4938
- agent: b.enum(Oe).optional().describe("Per-entity agent override"),
5033
+ agent: b.enum(Ce).optional().describe("Per-entity agent override"),
4939
5034
  created: Q.describe("Creation date (YYYY-MM-DD)"),
4940
5035
  updated: Q.optional().describe("Last significant update date (YYYY-MM-DD)"),
4941
5036
  audited: Q.optional().describe("Date of last successful convergence audit (YYYY-MM-DD)"),
@@ -4957,7 +5052,7 @@ const Ee = b.preprocess(
4957
5052
  ).refine((s) => s.kind === "note" || s.status !== "open", {
4958
5053
  message: "status open is only valid on entities with kind: note",
4959
5054
  path: ["status"]
4960
- }), vr = b.object({
5055
+ }), Wr = b.object({
4961
5056
  version: b.string(),
4962
5057
  projectName: b.string(),
4963
5058
  initializedAt: b.string(),
@@ -4971,22 +5066,22 @@ const Ee = b.preprocess(
4971
5066
  docs: b.number().optional(),
4972
5067
  refactor: b.number().optional()
4973
5068
  }).optional(),
4974
- defaultAgent: b.enum(Oe).optional(),
5069
+ defaultAgent: b.enum(Ce).optional(),
4975
5070
  defaultAgents: b.object({
4976
- phase: Ee,
4977
- planDraft: Ee,
4978
- ideaExtend: Ee,
4979
- commitSuggest: Ee,
4980
- feedback: Ee
5071
+ phase: Ne,
5072
+ planDraft: Ne,
5073
+ ideaExtend: Ne,
5074
+ commitSuggest: Ne,
5075
+ feedback: Ne
4981
5076
  }).optional()
4982
- }), hs = /^##\s+(.+?)\s*$/, Or = /^\*\*([A-Za-z][A-Za-z-]*):\*\*\s*(.*)$/, Cr = /^#{2,3}\s+/;
5077
+ }), ks = /^##\s+(.+?)\s*$/, xr = /^\*\*([A-Za-z][A-Za-z-]*):\*\*\s*(.*)$/, zr = /^#{2,3}\s+/;
4983
5078
  function ze(s, e) {
4984
5079
  const t = s.split(`
4985
5080
  `), n = t.findIndex((a) => e.headingRe.test(a));
4986
5081
  if (n === -1) return { body: s, entries: [] };
4987
5082
  let i = t.length;
4988
5083
  for (let a = n + 1; a < t.length; a++)
4989
- if (Cr.test(t[a])) {
5084
+ if (zr.test(t[a])) {
4990
5085
  i = a;
4991
5086
  break;
4992
5087
  }
@@ -4994,14 +5089,14 @@ function ze(s, e) {
4994
5089
  return { body: [...t.slice(0, n), ...t.slice(i)].join(`
4995
5090
  `).trim(), entries: r };
4996
5091
  }
4997
- const ps = {
5092
+ const Ss = {
4998
5093
  phases: ct,
4999
- log: Me,
5000
- clarifications: Ht,
5001
- notes: Gt,
5002
- review: yr
5094
+ log: je,
5095
+ clarifications: Wt,
5096
+ notes: xt,
5097
+ review: jr
5003
5098
  };
5004
- function Jt(s) {
5099
+ function Qt(s) {
5005
5100
  const e = {
5006
5101
  phases: [],
5007
5102
  log: [],
@@ -5010,39 +5105,39 @@ function Jt(s) {
5010
5105
  review: []
5011
5106
  };
5012
5107
  let t = s;
5013
- for (const n of Object.keys(ps)) {
5014
- const i = ze(t, ps[n]);
5108
+ for (const n of Object.keys(Ss)) {
5109
+ const i = ze(t, Ss[n]);
5015
5110
  t = i.body, e[n] = i.entries;
5016
5111
  }
5017
5112
  return { body: t, ...e };
5018
5113
  }
5019
- function Lr(s) {
5114
+ function Qr(s) {
5020
5115
  const e = s.split(`
5021
5116
  `), t = [];
5022
5117
  for (let i = 0; i < e.length; i++)
5023
- hs.test(e[i]) && t.push(i);
5118
+ ks.test(e[i]) && t.push(i);
5024
5119
  const n = [];
5025
5120
  for (let i = 0; i < t.length; i++) {
5026
- const r = t[i], o = i + 1 < t.length ? t[i + 1] : e.length, a = e[r].match(hs)[1], c = e.slice(r + 1, o);
5121
+ const r = t[i], o = i + 1 < t.length ? t[i + 1] : e.length, a = e[r].match(ks)[1], c = e.slice(r + 1, o);
5027
5122
  let l = 0;
5028
5123
  for (; l < c.length && c[l].trim() === ""; ) l++;
5029
5124
  const u = {};
5030
5125
  for (; l < c.length; ) {
5031
- const w = c[l].match(Or);
5126
+ const w = c[l].match(xr);
5032
5127
  if (!w) break;
5033
5128
  u[w[1].toLowerCase()] = w[2].trim(), l++;
5034
5129
  }
5035
5130
  for (; l < c.length && c[l].trim() === ""; ) l++;
5036
5131
  const f = c.slice(l).join(`
5037
- `).trim(), { body: h, phases: p, log: g, clarifications: d, notes: m, review: y } = Jt(f);
5132
+ `).trim(), { body: h, phases: p, log: g, clarifications: d, notes: m, review: y } = Qt(f);
5038
5133
  n.push({ title: a, fields: u, body: h, phases: p, log: g, clarifications: d, notes: m, review: y });
5039
5134
  }
5040
5135
  return n;
5041
5136
  }
5042
- function ta(s) {
5137
+ function ba(s) {
5043
5138
  const e = [], t = [];
5044
- for (const n of Lr(s)) {
5045
- const i = Ir.safeParse(n.fields);
5139
+ for (const n of Qr(s)) {
5140
+ const i = Yr.safeParse(n.fields);
5046
5141
  if (!i.success) {
5047
5142
  t.push({
5048
5143
  title: n.title,
@@ -5071,15 +5166,15 @@ function ta(s) {
5071
5166
  }
5072
5167
  return { entries: e, warnings: t };
5073
5168
  }
5074
- const _r = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/;
5075
- function Wt(s, e) {
5076
- const t = [], n = s.match(_r);
5169
+ const Xr = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/;
5170
+ function Xt(s, e) {
5171
+ const t = [], n = s.match(Xr);
5077
5172
  if (!n)
5078
5173
  return { data: null, body: s.trim(), warnings: t };
5079
5174
  const i = n[1], r = s.slice(n[0].length).trim();
5080
5175
  let o;
5081
5176
  try {
5082
- o = or(i);
5177
+ o = kr(i);
5083
5178
  } catch (c) {
5084
5179
  return t.push({
5085
5180
  title: "(frontmatter)",
@@ -5101,12 +5196,12 @@ function Wt(s, e) {
5101
5196
  }
5102
5197
  return { data: a.data, body: r, warnings: t };
5103
5198
  }
5104
- function gn(s) {
5199
+ function An(s) {
5105
5200
  const e = [], {
5106
5201
  data: t,
5107
5202
  body: n,
5108
5203
  warnings: i
5109
- } = Wt(s, Ar);
5204
+ } = Xt(s, Jr);
5110
5205
  if (e.push(...i), !t)
5111
5206
  return { entries: [], warnings: e };
5112
5207
  const {
@@ -5116,7 +5211,7 @@ function gn(s) {
5116
5211
  clarifications: c,
5117
5212
  notes: l,
5118
5213
  review: u
5119
- } = Jt(n), { body: f, entries: h } = ze(r, hn), { body: p, entries: g } = ze(f, pn), d = [...g, ...kr(a, c, l, u)];
5214
+ } = Qt(n), { body: f, entries: h } = ze(r, In), { body: p, entries: g } = ze(f, $n), d = [...g, ...Fr(a, c, l, u)];
5120
5215
  return t.kind === "note" && o.length > 0 && e.push({
5121
5216
  title: t.title,
5122
5217
  message: "note entities must not carry a Phases section — kept, but fix the file"
@@ -5141,15 +5236,15 @@ function gn(s) {
5141
5236
  ...d.length > 0 && { thread: d }
5142
5237
  }], warnings: e };
5143
5238
  }
5144
- function sa(s) {
5239
+ function ka(s) {
5145
5240
  const e = [], {
5146
5241
  data: t,
5147
5242
  body: n,
5148
5243
  warnings: i
5149
- } = Wt(s, Tr);
5244
+ } = Xt(s, Gr);
5150
5245
  if (e.push(...i), !t)
5151
5246
  return { entries: [], warnings: e };
5152
- const { body: r, phases: o, log: a, clarifications: c, notes: l, review: u } = Jt(n);
5247
+ const { body: r, phases: o, log: a, clarifications: c, notes: l, review: u } = Qt(n);
5153
5248
  return { entries: [{
5154
5249
  title: t.title,
5155
5250
  status: t.status,
@@ -5170,15 +5265,15 @@ function sa(s) {
5170
5265
  review: u
5171
5266
  }], warnings: e };
5172
5267
  }
5173
- function na(s) {
5268
+ function Sa(s) {
5174
5269
  const {
5175
5270
  data: e,
5176
5271
  body: t,
5177
5272
  warnings: n
5178
- } = Wt(s, $r);
5273
+ } = Xt(s, Vr);
5179
5274
  if (!e)
5180
5275
  return { entries: [], warnings: n };
5181
- const { body: i, entries: r } = ze(t, Me);
5276
+ const { body: i, entries: r } = ze(t, je);
5182
5277
  return { entries: [{
5183
5278
  id: e.id,
5184
5279
  title: e.title,
@@ -5188,28 +5283,38 @@ function na(s) {
5188
5283
  ...r.length > 0 && { log: r }
5189
5284
  }], warnings: n };
5190
5285
  }
5191
- const Pr = /^(IDEA-\d+):\s*/, Rr = /\n---+\n/;
5192
- function ia(s) {
5193
- return s.split(Rr).filter(Boolean).map((t) => {
5286
+ const Zr = /^(IDEA-\d+):\s*/, eo = /\n---+\n/;
5287
+ function Ea(s) {
5288
+ return s.split(eo).filter(Boolean).map((t) => {
5194
5289
  var c;
5195
5290
  const n = t.match(/^#{1,3}\s+(.+)/m), i = n ? n[1].trim() : ((c = t.trim().split(`
5196
- `)[0]) == null ? void 0 : c.trim()) ?? "Untitled", r = i.match(Pr), o = (r == null ? void 0 : r[1]) ?? null, a = o ? i.slice(r[0].length) : i;
5291
+ `)[0]) == null ? void 0 : c.trim()) ?? "Untitled", r = i.match(Zr), o = (r == null ? void 0 : r[1]) ?? null, a = o ? i.slice(r[0].length) : i;
5197
5292
  return { id: o, title: a, body: t.trim() };
5198
5293
  });
5199
5294
  }
5200
- function Dr(s, e = []) {
5295
+ const Es = 40;
5296
+ function to(s, e = []) {
5201
5297
  const t = [];
5202
5298
  for (const n of s)
5203
- n.archived || n.subject && !e.includes(n.subject) && t.push({
5299
+ if (!n.archived && (n.subject && !e.includes(n.subject) && t.push({
5204
5300
  kind: "orphan-subject",
5205
5301
  section: "plans",
5206
5302
  title: n.title,
5207
5303
  planId: n.id,
5208
5304
  message: `Subject "${n.subject}" isn't in the roadmap vocabulary — "${n.title}"`
5209
- });
5305
+ }), n.status !== "done" && n.status !== "dropped")) {
5306
+ const i = [];
5307
+ n.title.length > Es && i.push(`${n.title.length} chars over the ${Es}-char limit`), n.title.includes("—") && i.push("em-dash subtitle"), i.length > 0 && t.push({
5308
+ kind: "title-style",
5309
+ section: "plans",
5310
+ title: n.title,
5311
+ planId: n.id,
5312
+ message: `Title style — ${i.join(", ")}; the detail belongs in the body: "${n.title}"`
5313
+ });
5314
+ }
5210
5315
  return t;
5211
5316
  }
5212
- function Mr(s) {
5317
+ function so(s) {
5213
5318
  const e = [];
5214
5319
  for (const t of s.split(`
5215
5320
  `)) {
@@ -5222,73 +5327,73 @@ function Mr(s) {
5222
5327
  }
5223
5328
  return e;
5224
5329
  }
5225
- const yn = /^-\s+(\d{4}-\d{2}-\d{2}):\s+(.+?)\s+—\s+(.*)$/;
5226
- function ra(s) {
5330
+ const On = /^-\s+(\d{4}-\d{2}-\d{2}):\s+(.+?)\s+—\s+(.*)$/;
5331
+ function Na(s) {
5227
5332
  const e = [];
5228
5333
  for (const t of s.split(`
5229
5334
  `)) {
5230
- const n = t.match(yn);
5335
+ const n = t.match(On);
5231
5336
  n && e.push({ date: n[1], title: n[2].trim(), description: n[3].trim() });
5232
5337
  }
5233
5338
  return e;
5234
5339
  }
5235
- const Tt = " — ";
5236
- function jr(s) {
5340
+ const At = " — ";
5341
+ function no(s) {
5237
5342
  return s.split(`
5238
5343
  `).map((e) => e.trim()).filter((e) => e.length > 0).map((e) => {
5239
- const t = e.indexOf(Tt);
5344
+ const t = e.indexOf(At);
5240
5345
  return t === -1 ? { id: e, title: "" } : {
5241
5346
  id: e.slice(0, t).trim(),
5242
- title: e.slice(t + Tt.length).trim()
5347
+ title: e.slice(t + At.length).trim()
5243
5348
  };
5244
5349
  });
5245
5350
  }
5246
- function oa(s) {
5247
- return s.length === 0 ? "" : `${s.map((e) => `${e.id}${Tt}${e.title}`).join(`
5351
+ function Ia(s) {
5352
+ return s.length === 0 ? "" : `${s.map((e) => `${e.id}${At}${e.title}`).join(`
5248
5353
  `)}
5249
5354
  `;
5250
5355
  }
5251
- function Br(s) {
5356
+ function yt(s) {
5252
5357
  const e = s.phases.length > 0 && s.phases.every((n) => n.done), t = (s.fixes ?? []).every((n) => n.done);
5253
5358
  return e && t;
5254
5359
  }
5255
- function lt(s, e, t) {
5256
- return s.kind === "note" || s.status === "dropped" ? s.status : e ? e.state === "merged" ? "done" : e.state === "closed" ? "dropped" : Br(s) ? "review" : "in-progress" : t ? s.status === "done" ? "done" : s.phases.length > 0 ? "planned" : "idea" : s.status ?? (s.phases.length > 0 ? "planned" : "idea");
5360
+ function lt(s, e, t, n = !1) {
5361
+ return s.kind === "note" || s.status === "dropped" ? s.status : e ? e.state === "merged" ? yt(s) ? "done" : "planned" : e.state === "closed" ? "dropped" : yt(s) ? "review" : "in-progress" : t ? s.status === "review" || s.status === "done" ? s.status : n && s.phases.length > 0 ? yt(s) ? "review" : "in-progress" : s.phases.length > 0 ? "planned" : "idea" : s.status ?? (s.phases.length > 0 ? "planned" : "idea");
5257
5362
  }
5258
- function Kr(s, e) {
5363
+ function io(s, e) {
5259
5364
  if (s.kind === "note" || s.archived || (e == null ? void 0 : e.state) !== "merged") return !1;
5260
5365
  const t = lt(s, e, !0);
5261
5366
  return t === "review" || t === "done";
5262
5367
  }
5263
- async function Fr(s) {
5368
+ async function ro(s) {
5264
5369
  try {
5265
- return await ws(s);
5370
+ return await As(s);
5266
5371
  } catch {
5267
5372
  return [];
5268
5373
  }
5269
5374
  }
5270
- async function wn(s) {
5375
+ async function vn(s) {
5271
5376
  try {
5272
5377
  return await pe(s, "utf-8");
5273
5378
  } catch {
5274
5379
  return "";
5275
5380
  }
5276
5381
  }
5277
- async function qr(s) {
5278
- const e = await wn($(s, "..", "run-order.md"));
5279
- return new Map(jr(e).map((t, n) => [t.id, n + 1]));
5382
+ async function oo(s) {
5383
+ const e = await vn(T(s, "..", "run-order.md"));
5384
+ return new Map(no(e).map((t, n) => [t.id, n + 1]));
5280
5385
  }
5281
- async function ke(s) {
5386
+ async function Se(s) {
5282
5387
  const e = [], t = [];
5283
5388
  let n = 0;
5284
- const i = await qr(s);
5285
- for (const r of [s, $(s, "archive")]) {
5286
- const o = r !== s, a = (await Fr(r)).filter((l) => l.endsWith(".md") && l !== "index.md");
5389
+ const i = await oo(s);
5390
+ for (const r of [s, T(s, "archive")]) {
5391
+ const o = r !== s, a = (await ro(r)).filter((l) => l.endsWith(".md") && l !== "index.md");
5287
5392
  n += a.length;
5288
5393
  const c = await Promise.all(
5289
5394
  a.map(async (l) => {
5290
- const u = await wn($(r, l));
5291
- return u ? gn(u) : { warnings: [{ title: l, message: "Could not read entity file" }] };
5395
+ const u = await vn(T(r, l));
5396
+ return u ? An(u) : { warnings: [{ title: l, message: "Could not read entity file" }] };
5292
5397
  })
5293
5398
  );
5294
5399
  for (const l of c)
@@ -5298,11 +5403,11 @@ async function ke(s) {
5298
5403
  }
5299
5404
  return { entries: e, warnings: t, fileCount: n };
5300
5405
  }
5301
- function bn(s, e, t = !1) {
5406
+ function Cn(s, e, t = !1, n = !1) {
5302
5407
  return {
5303
5408
  title: s.title,
5304
5409
  // Non-note entities can't carry the note-only 'open' (schema-enforced).
5305
- status: lt(s, e, t),
5410
+ status: lt(s, e, t, n),
5306
5411
  kind: s.type,
5307
5412
  id: s.id,
5308
5413
  agent: s.agent,
@@ -5317,16 +5422,16 @@ function bn(s, e, t = !1) {
5317
5422
  body: s.body,
5318
5423
  phases: s.phases,
5319
5424
  fixes: s.fixes,
5320
- log: mn(s.thread),
5321
- clarifications: Sr(s.thread),
5322
- notes: Nr(s.thread),
5323
- review: Er(s.thread),
5425
+ log: Tn(s.thread),
5426
+ clarifications: qr(s.thread),
5427
+ notes: Hr(s.thread),
5428
+ review: Ur(s.thread),
5324
5429
  thread: s.thread,
5325
5430
  archived: s.archived,
5326
5431
  pr: e
5327
5432
  };
5328
5433
  }
5329
- function Ur(s) {
5434
+ function ao(s) {
5330
5435
  return {
5331
5436
  id: s.id,
5332
5437
  title: s.title,
@@ -5336,38 +5441,41 @@ function Ur(s) {
5336
5441
  subject: s.subject,
5337
5442
  order: s.order,
5338
5443
  created: s.created,
5339
- log: mn(s.thread)
5444
+ log: Tn(s.thread)
5340
5445
  };
5341
5446
  }
5342
- async function xt(s) {
5343
- const { entries: e, warnings: t } = await ke(s), n = await Ts($(s, "..", ".."));
5344
- return { entries: e, warnings: t, prs: n, resolved: n !== void 0 };
5447
+ async function Zt(s) {
5448
+ const { entries: e, warnings: t } = await Se(s), n = T(s, "..", ".."), [i, r] = await Promise.all([
5449
+ Ds(n),
5450
+ Cs(n)
5451
+ ]);
5452
+ return { entries: e, warnings: t, prs: i, resolved: i !== void 0, mainActivityIds: r };
5345
5453
  }
5346
- async function aa(s) {
5347
- const { entries: e, warnings: t, prs: n, resolved: i } = await xt(s);
5348
- return { entries: e.map((o) => ({
5349
- ...o,
5350
- status: lt(o, n == null ? void 0 : n.get(o.id), i)
5454
+ async function $a(s) {
5455
+ const { entries: e, warnings: t, prs: n, resolved: i, mainActivityIds: r } = await Zt(s);
5456
+ return { entries: e.map((a) => ({
5457
+ ...a,
5458
+ status: lt(a, n == null ? void 0 : n.get(a.id), i, r.has(a.id))
5351
5459
  })), warnings: t };
5352
5460
  }
5353
- async function ca(s) {
5354
- const { entries: e, warnings: t, prs: n, resolved: i } = await xt(s);
5461
+ async function Ta(s) {
5462
+ const { entries: e, warnings: t, prs: n, resolved: i, mainActivityIds: r } = await Zt(s);
5355
5463
  return {
5356
- entries: e.filter((r) => r.kind !== "note").map((r) => bn(r, n == null ? void 0 : n.get(r.id), i)),
5464
+ entries: e.filter((o) => o.kind !== "note").map((o) => Cn(o, n == null ? void 0 : n.get(o.id), i, r.has(o.id))),
5357
5465
  warnings: t
5358
5466
  };
5359
5467
  }
5360
- async function la(s) {
5361
- const { entries: e, prs: t } = await xt(s);
5468
+ async function Aa(s) {
5469
+ const { entries: e, prs: t } = await Zt(s);
5362
5470
  return e.flatMap((n) => {
5363
5471
  const i = t == null ? void 0 : t.get(n.id);
5364
- return i && Kr(n, i) ? [{ id: n.id, title: n.title, pr: i }] : [];
5472
+ return i && io(n, i) ? [{ id: n.id, title: n.title, pr: i }] : [];
5365
5473
  });
5366
5474
  }
5367
- async function fa(s) {
5368
- const { entries: e, warnings: t } = await ke(s);
5475
+ async function Oa(s) {
5476
+ const { entries: e, warnings: t } = await Se(s);
5369
5477
  return {
5370
- entries: e.filter((n) => n.kind === "note").map(Ur),
5478
+ entries: e.filter((n) => n.kind === "note").map(ao),
5371
5479
  warnings: t
5372
5480
  };
5373
5481
  }
@@ -5378,41 +5486,27 @@ async function Qe(s) {
5378
5486
  return "";
5379
5487
  }
5380
5488
  }
5381
- function kn(s, e) {
5489
+ function Ln(s, e) {
5382
5490
  var t;
5383
5491
  return (t = s.split(`
5384
5492
  `).find((n) => n.includes(`(${e})`))) == null ? void 0 : t.trim();
5385
5493
  }
5386
- const Yr = /^Merge pull request #\d+ from \S+\/([a-z]+-\d+)-/i;
5387
- function ms(s) {
5388
- const e = s.match(/^Refs:\s*([A-Za-z]+-\d+)\s*$/m);
5389
- if (e) return e[1].toUpperCase();
5390
- const t = s.split(`
5391
- `, 1)[0], n = t.match(/\(([A-Za-z]+-\d+)\)/);
5392
- if (n) return n[1].toUpperCase();
5393
- const i = t.match(Yr);
5394
- return i ? i[1].toUpperCase() : null;
5395
- }
5396
- const Hr = /^## \[.+?\]\(.*\/compare\/(.+?)\.\.\.(.+?)\)/;
5397
- function Gr(s) {
5494
+ const co = /^## \[.+?\]\(.*\/compare\/(.+?)\.\.\.(.+?)\)/;
5495
+ function lo(s) {
5398
5496
  return s.split(`
5399
- `).map((e) => Hr.exec(e)).filter((e) => e !== null).map((e) => ({ version: e[2], range: `${e[1]}..${e[2]}` }));
5497
+ `).map((e) => co.exec(e)).filter((e) => e !== null).map((e) => ({ version: e[2], range: `${e[1]}..${e[2]}` }));
5400
5498
  }
5401
- function Vr(s, e) {
5499
+ function fo(s, e) {
5402
5500
  return s.split(`
5403
5501
  `).find((t) => {
5404
5502
  const n = t.match(/\/commit\/([0-9a-f]+)\)/i);
5405
5503
  return n ? n[1].startsWith(e) || e.startsWith(n[1]) : !1;
5406
5504
  });
5407
5505
  }
5408
- const Jr = /^[a-z]+\/([a-z]+-\d+)-/, Wr = /^[0-9a-f]{4,40}$/i;
5409
- async function xr(s) {
5410
- var t;
5411
- return ((t = (await je(s, ["symbolic-ref", "refs/remotes/origin/HEAD"])).trim().match(/refs\/remotes\/origin\/(.+)/)) == null ? void 0 : t[1]) ?? "main";
5412
- }
5413
- async function zr(s, e) {
5506
+ const uo = /^[a-z]+\/([a-z]+-\d+)-/;
5507
+ async function ho(s, e) {
5414
5508
  var i;
5415
- const t = await je(s, [
5509
+ const t = await me(s, [
5416
5510
  "for-each-ref",
5417
5511
  "--format=%(refname)",
5418
5512
  "refs/heads",
@@ -5421,36 +5515,26 @@ async function zr(s, e) {
5421
5515
  for (const r of t.split(`
5422
5516
  `)) {
5423
5517
  const o = r.replace(/^refs\/heads\//, "").replace(/^refs\/remotes\/[^/]+\//, "");
5424
- if (((i = Jr.exec(o)) == null ? void 0 : i[1]) === n) return o;
5518
+ if (((i = uo.exec(o)) == null ? void 0 : i[1]) === n) return o;
5425
5519
  }
5426
5520
  }
5427
- async function Qr(s, e) {
5428
- const t = await zr(s, e);
5521
+ async function po(s, e) {
5522
+ const t = await ho(s, e);
5429
5523
  if (!t) return [];
5430
- const n = await xr(s);
5431
- return (await je(s, ["log", "--format=%s", `${n}..${t}`])).split(`
5524
+ const n = await vs(s);
5525
+ return (await me(s, ["log", "--format=%s", `${n}..${t}`])).split(`
5432
5526
  `).map((r) => r.trim()).filter(Boolean);
5433
5527
  }
5434
- function je(s, e) {
5435
- return new Promise((t) => {
5436
- var r;
5437
- const n = K("git", e, { cwd: s, stdio: ["ignore", "pipe", "ignore"] });
5438
- let i = "";
5439
- (r = n.stdout) == null || r.on("data", (o) => {
5440
- i += o.toString();
5441
- }), n.on("close", () => t(i)), n.on("error", () => t(""));
5442
- });
5443
- }
5444
- async function Xr(s, e) {
5445
- if (!Wr.test(e)) return null;
5446
- const t = await je(s, ["log", "-1", "--format=%B", e]), n = t ? ms(t) : null;
5528
+ async function mo(s, e) {
5529
+ if (!Xn.test(e)) return null;
5530
+ const t = await me(s, ["log", "-1", "--format=%B", e]), n = t ? wt(t) : null;
5447
5531
  if (n) return n;
5448
- const i = await Qe($(s, "CHANGELOG.md")), r = Vr(i, e);
5449
- return r ? ms(r) : null;
5532
+ const i = await Qe(T(s, "CHANGELOG.md")), r = fo(i, e);
5533
+ return r ? wt(r) : null;
5450
5534
  }
5451
- async function Zr(s, e) {
5452
- const n = (await je(s, ["log", "--format=%H", "--reverse", e])).split(`
5453
- `).map((o) => o.trim()).filter(Boolean), i = await Promise.all(n.map((o) => Xr(s, o))), r = /* @__PURE__ */ new Map();
5535
+ async function go(s, e) {
5536
+ const n = (await me(s, ["log", "--format=%H", "--reverse", e])).split(`
5537
+ `).map((o) => o.trim()).filter(Boolean), i = await Promise.all(n.map((o) => mo(s, o))), r = /* @__PURE__ */ new Map();
5454
5538
  return n.forEach((o, a) => {
5455
5539
  const c = i[a];
5456
5540
  if (!c) return;
@@ -5458,33 +5542,34 @@ async function Zr(s, e) {
5458
5542
  l ? l.push(o) : r.set(c, [o]);
5459
5543
  }), r;
5460
5544
  }
5461
- async function ua(s, e) {
5462
- const [{ entries: t }, n, i, r, o] = await Promise.all([
5463
- ke($(s, "papercamp", "ideas")),
5464
- Ts(s),
5465
- Qe($(s, "papercamp", "tasks.log")),
5466
- Qe($(s, "CHANGELOG.md")),
5467
- Qr(s, e)
5468
- ]), a = t.find((f) => f.id === e), c = n == null ? void 0 : n.get(e), l = Mr(i).filter((f) => f.planId === e), u = kn(r, e);
5545
+ async function va(s, e) {
5546
+ const [{ entries: t }, n, i, r, o, a] = await Promise.all([
5547
+ Se(T(s, "papercamp", "ideas")),
5548
+ Ds(s),
5549
+ Qe(T(s, "papercamp", "tasks.log")),
5550
+ Qe(T(s, "CHANGELOG.md")),
5551
+ po(s, e),
5552
+ Cs(s)
5553
+ ]), c = t.find((h) => h.id === e), l = n == null ? void 0 : n.get(e), u = so(i).filter((h) => h.planId === e), f = Ln(r, e);
5469
5554
  return {
5470
5555
  id: e,
5471
- idea: a ? {
5556
+ idea: c ? {
5472
5557
  reached: !0,
5473
5558
  data: {
5474
- title: a.title,
5475
- status: lt(a, c, n !== void 0),
5476
- type: a.type
5559
+ title: c.title,
5560
+ status: lt(c, l, n !== void 0, a.has(e)),
5561
+ type: c.type
5477
5562
  }
5478
5563
  } : { reached: !1 },
5479
- phases: a ? { reached: a.phases.length > 0, data: a.phases } : { reached: !1 },
5480
- taskRuns: l.length > 0 ? { reached: !0, data: l } : { reached: !1 },
5564
+ phases: c ? { reached: c.phases.length > 0, data: c.phases } : { reached: !1 },
5565
+ taskRuns: u.length > 0 ? { reached: !0, data: u } : { reached: !1 },
5481
5566
  commits: o.length > 0 ? { reached: !0, data: o } : { reached: !1 },
5482
- pr: c ? { reached: !0, data: c } : { reached: !1 },
5483
- releaseLine: u ? { reached: !0, data: u } : { reached: !1 }
5567
+ pr: l ? { reached: !0, data: l } : { reached: !1 },
5568
+ releaseLine: f ? { reached: !0, data: f } : { reached: !1 }
5484
5569
  };
5485
5570
  }
5486
- const Ve = /^##\s+/, eo = /^##\s+The goal\s*$/i, Sn = /^##\s+(Horizon\s+\d+\s*[—-].*)\r?$/i, to = /^##\s+Standing concerns\s*$/i, Xe = /^-\s+\*\*(.+?)\*\*\s+[—-]\s+(.*)\r?$/, so = /^\s+-\s+→\s+(.+?)\r?$/, En = /^\s+-\s+(.+?)\r?$/, Nn = /^\s+\S/;
5487
- function gs(s, e, t) {
5571
+ const Ve = /^##\s+/, yo = /^##\s+The goal\s*$/i, _n = /^##\s+(Horizon\s+\d+\s*[—-].*)\r?$/i, wo = /^##\s+Standing concerns\s*$/i, Xe = /^-\s+\*\*(.+?)\*\*\s+[—-]\s+(.*)\r?$/, bo = /^\s+-\s+→\s+(.+?)\r?$/, Pn = /^\s+-\s+(.+?)\r?$/, Rn = /^\s+\S/;
5572
+ function Ns(s, e, t) {
5488
5573
  const n = [];
5489
5574
  let i = e;
5490
5575
  for (; i < t; ) {
@@ -5495,116 +5580,116 @@ function gs(s, e, t) {
5495
5580
  }
5496
5581
  const o = [r[2].trim()], a = [], c = [];
5497
5582
  for (i++; i < t && !Xe.test(s[i]); ) {
5498
- const l = s[i].match(so);
5583
+ const l = s[i].match(bo);
5499
5584
  if (l) {
5500
5585
  c.push(l[1].trim()), i++;
5501
5586
  continue;
5502
5587
  }
5503
- const u = s[i].match(En);
5588
+ const u = s[i].match(Pn);
5504
5589
  if (u) {
5505
5590
  a.push(u[1].trim()), i++;
5506
5591
  continue;
5507
5592
  }
5508
- if (!Nn.test(s[i])) break;
5593
+ if (!Rn.test(s[i])) break;
5509
5594
  o.push(s[i].trim()), i++;
5510
5595
  }
5511
5596
  n.push({ name: r[1].trim(), description: o.join(" "), candidates: a, linked: c });
5512
5597
  }
5513
5598
  return n;
5514
5599
  }
5515
- function no(s) {
5600
+ function ko(s) {
5516
5601
  const e = s.split(`
5517
5602
  `);
5518
5603
  let t = "";
5519
5604
  const n = [];
5520
5605
  let i = [];
5521
5606
  for (let r = 0; r < e.length; r++) {
5522
- if (eo.test(e[r])) {
5607
+ if (yo.test(e[r])) {
5523
5608
  let a = r + 1;
5524
5609
  for (; a < e.length && !Ve.test(e[a]); ) a++;
5525
5610
  t = e.slice(r + 1, a).join(`
5526
5611
  `).trim(), r = a - 1;
5527
5612
  continue;
5528
5613
  }
5529
- const o = e[r].match(Sn);
5614
+ const o = e[r].match(_n);
5530
5615
  if (o) {
5531
5616
  let a = r + 1;
5532
5617
  for (; a < e.length && !Ve.test(e[a]); ) a++;
5533
- n.push({ title: o[1].trim(), items: gs(e, r + 1, a) }), r = a - 1;
5618
+ n.push({ title: o[1].trim(), items: Ns(e, r + 1, a) }), r = a - 1;
5534
5619
  continue;
5535
5620
  }
5536
- if (to.test(e[r])) {
5621
+ if (wo.test(e[r])) {
5537
5622
  let a = r + 1;
5538
5623
  for (; a < e.length && !Ve.test(e[a]); ) a++;
5539
- i = gs(e, r + 1, a), r = a - 1;
5624
+ i = Ns(e, r + 1, a), r = a - 1;
5540
5625
  }
5541
5626
  }
5542
5627
  return { goal: t, horizons: n, standingConcerns: i };
5543
5628
  }
5544
- function In(s, e) {
5629
+ function Mn(s, e) {
5545
5630
  for (let t = 0; t < s.length; t++) {
5546
- const n = s[t].match(Sn);
5631
+ const n = s[t].match(_n);
5547
5632
  if (!n || n[1].trim() !== e) continue;
5548
5633
  let i = t + 1;
5549
5634
  for (; i < s.length && !Ve.test(s[i]); ) i++;
5550
5635
  return { start: t + 1, end: i };
5551
5636
  }
5552
5637
  }
5553
- function zt(s, e, t) {
5554
- const n = In(s, e);
5638
+ function es(s, e, t) {
5639
+ const n = Mn(s, e);
5555
5640
  if (n)
5556
5641
  for (let i = n.start; i < n.end; i++) {
5557
5642
  const r = s[i].match(Xe);
5558
5643
  if (!r || r[1].trim() !== t) continue;
5559
5644
  let o = i + 1;
5560
- for (; o < n.end && !Xe.test(s[o]) && Nn.test(s[o]); )
5645
+ for (; o < n.end && !Xe.test(s[o]) && Rn.test(s[o]); )
5561
5646
  o++;
5562
5647
  return { start: i, end: o };
5563
5648
  }
5564
5649
  }
5565
- function da(s, e, t, n) {
5650
+ function Ca(s, e, t, n) {
5566
5651
  const i = s.split(`
5567
- `), r = zt(i, e, t);
5652
+ `), r = es(i, e, t);
5568
5653
  if (!r) return s;
5569
5654
  if (n === void 0)
5570
5655
  return i.splice(r.start, r.end - r.start), i.join(`
5571
5656
  `);
5572
5657
  for (let o = r.start + 1; o < r.end; o++) {
5573
- const a = i[o].match(En);
5658
+ const a = i[o].match(Pn);
5574
5659
  if (a && a[1].trim() === n)
5575
5660
  return i.splice(o, 1), i.join(`
5576
5661
  `);
5577
5662
  }
5578
5663
  return s;
5579
5664
  }
5580
- function ha(s, e, t, n) {
5665
+ function La(s, e, t, n) {
5581
5666
  const i = s.split(`
5582
- `), r = In(i, e);
5667
+ `), r = Mn(i, e);
5583
5668
  if (!r) return s;
5584
5669
  let o = r.end;
5585
5670
  for (; o > r.start && i[o - 1].trim() === ""; ) o--;
5586
5671
  return i.splice(o, 0, `- **${t}** — ${n}`), i.join(`
5587
5672
  `);
5588
5673
  }
5589
- function pa(s, e, t, n) {
5674
+ function _a(s, e, t, n) {
5590
5675
  const i = s.split(`
5591
- `), r = zt(i, e, t);
5676
+ `), r = es(i, e, t);
5592
5677
  return r ? (i.splice(r.end, 0, ` - ${n}`), i.join(`
5593
5678
  `)) : s;
5594
5679
  }
5595
- function ma(s, e, t, n) {
5680
+ function Pa(s, e, t, n) {
5596
5681
  const i = s.split(`
5597
- `), r = zt(i, e, t);
5682
+ `), r = es(i, e, t);
5598
5683
  return r ? (i.splice(r.end, 0, ` - → ${n}`), i.join(`
5599
5684
  `)) : s;
5600
5685
  }
5601
- function io(s) {
5686
+ function So(s) {
5602
5687
  return [
5603
5688
  ...s.horizons.flatMap((e) => e.items.map((t) => t.name)),
5604
5689
  ...s.standingConcerns.map((e) => e.name)
5605
5690
  ];
5606
5691
  }
5607
- function ga(s, e, t = [], n = "") {
5692
+ function Ra(s, e, t = [], n = "") {
5608
5693
  const i = new Map(e.filter((c) => c.id).map((c) => [c.id, c])), r = /* @__PURE__ */ new Map();
5609
5694
  for (const c of t)
5610
5695
  c.planId && r.set(c.planId, (r.get(c.planId) ?? 0) + 1);
@@ -5618,7 +5703,7 @@ function ga(s, e, t = [], n = "") {
5618
5703
  status: d.status,
5619
5704
  taskRuns: r.get(g) ?? 0,
5620
5705
  pr: d.pr,
5621
- released: kn(n, g) !== void 0
5706
+ released: Ln(n, g) !== void 0
5622
5707
  }
5623
5708
  ] : [];
5624
5709
  }), p = { total: h.length, done: h.filter((g) => g.status === "done").length };
@@ -5631,10 +5716,10 @@ function ga(s, e, t = [], n = "") {
5631
5716
  { total: 0, done: 0 }
5632
5717
  );
5633
5718
  return { title: c.title, items: l, rollup: u };
5634
- }), a = ro(s, e, t);
5719
+ }), a = Eo(s, e, t);
5635
5720
  return { goal: s.goal, horizons: o, events: a };
5636
5721
  }
5637
- function ro(s, e, t) {
5722
+ function Eo(s, e, t) {
5638
5723
  const n = /* @__PURE__ */ new Map();
5639
5724
  for (const r of s.horizons)
5640
5725
  for (const o of r.items)
@@ -5667,7 +5752,7 @@ function ro(s, e, t) {
5667
5752
  }
5668
5753
  return i.sort((r, o) => Date.parse(r.date) - Date.parse(o.date));
5669
5754
  }
5670
- function oo(s) {
5755
+ function No(s) {
5671
5756
  const e = JSON.stringify({
5672
5757
  body: s.body,
5673
5758
  phases: s.phases.map((t) => ({
@@ -5677,9 +5762,9 @@ function oo(s) {
5677
5762
  source: t.source ?? null
5678
5763
  }))
5679
5764
  });
5680
- return jn("sha256").update(e).digest("hex");
5765
+ return xn("sha256").update(e).digest("hex");
5681
5766
  }
5682
- const Qt = /* @__PURE__ */ new Set([
5767
+ const ts = /* @__PURE__ */ new Set([
5683
5768
  "core",
5684
5769
  "cli",
5685
5770
  "app",
@@ -5699,10 +5784,10 @@ const Qt = /* @__PURE__ */ new Set([
5699
5784
  "release",
5700
5785
  "main"
5701
5786
  ]);
5702
- function ao(s, e) {
5703
- return (s == null ? void 0 : s.find((t) => Qt.has(t))) ?? e;
5787
+ function Io(s, e) {
5788
+ return (s == null ? void 0 : s.find((t) => ts.has(t))) ?? e;
5704
5789
  }
5705
- function Tn(s, e) {
5790
+ function Dn(s, e) {
5706
5791
  return new Promise((t) => {
5707
5792
  var r, o;
5708
5793
  const n = K(
@@ -5730,45 +5815,45 @@ function Tn(s, e) {
5730
5815
  }), n.on("error", () => t(void 0));
5731
5816
  });
5732
5817
  }
5733
- async function co(s, e) {
5734
- for (const t of ["ideas", $("ideas", "archive")]) {
5735
- const n = $(s, "papercamp", t, `${e}.md`);
5818
+ async function $o(s, e) {
5819
+ for (const t of ["ideas", T("ideas", "archive")]) {
5820
+ const n = T(s, "papercamp", t, `${e}.md`);
5736
5821
  try {
5737
- return await _n(n), n;
5822
+ return await Yn(n), n;
5738
5823
  } catch {
5739
5824
  }
5740
5825
  }
5741
5826
  return null;
5742
5827
  }
5743
5828
  async function se(s, e) {
5744
- const t = await Tn(s, e), n = ks(t == null ? void 0 : t.body, (t == null ? void 0 : t.headRefName) ?? e);
5829
+ const t = await Dn(s, e), n = Ls(t == null ? void 0 : t.body, (t == null ? void 0 : t.headRefName) ?? e);
5745
5830
  if (!n) return;
5746
- const i = await co(s, n);
5831
+ const i = await $o(s, n);
5747
5832
  if (!i) return;
5748
- const { entries: r } = gn(await pe(i, "utf-8")), o = r[0];
5833
+ const { entries: r } = An(await pe(i, "utf-8")), o = r[0];
5749
5834
  if (o)
5750
5835
  return { id: n, view: t, entry: o };
5751
5836
  }
5752
- async function ya(s, e) {
5837
+ async function Ma(s, e) {
5753
5838
  const t = await se(s, e);
5754
5839
  if (!t) return;
5755
5840
  const { id: n, entry: i } = t;
5756
5841
  return { id: n, kind: i.type, tags: i.tags, phases: i.phases };
5757
5842
  }
5758
- const $n = "<!-- papercamp:phases:start -->", An = "<!-- papercamp:phases:end -->", ys = new RegExp(`${$n}[\\s\\S]*?${An}`);
5759
- function lo(s, e) {
5843
+ const jn = "<!-- papercamp:phases:start -->", Bn = "<!-- papercamp:phases:end -->", Is = new RegExp(`${jn}[\\s\\S]*?${Bn}`);
5844
+ function To(s, e) {
5760
5845
  const t = e.map((r) => `- [${r.done ? "x" : " "}] ${r.text}`).join(`
5761
- `), n = `${$n}
5846
+ `), n = `${jn}
5762
5847
  ### Phases
5763
5848
  ${t}
5764
- ${An}`;
5765
- if (ys.test(s)) return s.replace(ys, () => n);
5849
+ ${Bn}`;
5850
+ if (Is.test(s)) return s.replace(Is, () => n);
5766
5851
  const i = s.trimEnd();
5767
5852
  return i.length > 0 ? `${i}
5768
5853
 
5769
5854
  ${n}` : n;
5770
5855
  }
5771
- function fo(s, e, t) {
5856
+ function Ao(s, e, t) {
5772
5857
  return new Promise((n) => {
5773
5858
  var r, o;
5774
5859
  const i = K("gh", ["pr", "edit", e, "--body-file", "-"], {
@@ -5779,20 +5864,20 @@ function fo(s, e, t) {
5779
5864
  }), i.on("close", (a) => n(a === 0)), i.on("error", () => n(!1)), (o = i.stdin) == null || o.end(t);
5780
5865
  });
5781
5866
  }
5782
- async function wa(s, e) {
5867
+ async function Da(s, e) {
5783
5868
  const t = await se(s, e);
5784
5869
  if (!(t != null && t.view)) return "unresolved";
5785
- const { view: n, entry: i } = t, r = lo(n.body, i.phases);
5786
- return r === n.body ? "unchanged" : await fo(s, e, r) ? "updated" : "unresolved";
5870
+ const { view: n, entry: i } = t, r = To(n.body, i.phases);
5871
+ return r === n.body ? "unchanged" : await Ao(s, e, r) ? "updated" : "unresolved";
5787
5872
  }
5788
- function uo(s) {
5873
+ function Oo(s) {
5789
5874
  const e = /* @__PURE__ */ new Set();
5790
5875
  s.kind && e.add(s.kind);
5791
5876
  for (const t of s.tags)
5792
- Qt.has(t) && e.add(t);
5877
+ ts.has(t) && e.add(t);
5793
5878
  return [...e];
5794
5879
  }
5795
- function ho(s) {
5880
+ function vo(s) {
5796
5881
  return new Promise((e) => {
5797
5882
  var i, r;
5798
5883
  const t = K("gh", ["label", "list", "--limit", "200", "--json", "name"], {
@@ -5817,7 +5902,7 @@ function ho(s) {
5817
5902
  }), t.on("error", () => e(void 0));
5818
5903
  });
5819
5904
  }
5820
- function po(s, e) {
5905
+ function Co(s, e) {
5821
5906
  return new Promise((t) => {
5822
5907
  var i;
5823
5908
  const n = K("gh", ["label", "create", e, "--color", "ededed"], {
@@ -5828,7 +5913,7 @@ function po(s, e) {
5828
5913
  }), n.on("close", (r) => t(r === 0)), n.on("error", () => t(!1));
5829
5914
  });
5830
5915
  }
5831
- function mo(s, e, t) {
5916
+ function Lo(s, e, t) {
5832
5917
  return new Promise((n) => {
5833
5918
  var r;
5834
5919
  const i = K("gh", ["pr", "edit", e, "--add-label", t.join(",")], {
@@ -5839,29 +5924,29 @@ function mo(s, e, t) {
5839
5924
  }), i.on("close", (o) => n(o === 0)), i.on("error", () => n(!1));
5840
5925
  });
5841
5926
  }
5842
- async function ba(s, e) {
5927
+ async function ja(s, e) {
5843
5928
  const t = await se(s, e);
5844
5929
  if (!(t != null && t.view)) return "unresolved";
5845
- const { view: n, entry: i } = t, r = uo({ kind: i.type, tags: i.tags }), o = new Set((n.labels ?? []).map((u) => u.name)), a = r.filter((u) => !o.has(u));
5930
+ const { view: n, entry: i } = t, r = Oo({ kind: i.type, tags: i.tags }), o = new Set((n.labels ?? []).map((u) => u.name)), a = r.filter((u) => !o.has(u));
5846
5931
  if (a.length === 0) return "unchanged";
5847
- const c = await ho(s);
5932
+ const c = await vo(s);
5848
5933
  if (c) {
5849
5934
  const u = a.filter((f) => !c.has(f));
5850
5935
  for (const f of u)
5851
- await po(s, f);
5936
+ await Co(s, f);
5852
5937
  }
5853
- return await mo(s, e, a) ? "updated" : "unresolved";
5938
+ return await Lo(s, e, a) ? "updated" : "unresolved";
5854
5939
  }
5855
- function vn(s, e) {
5856
- const t = e.type ?? "feat", n = ao(e.tags, "repo");
5940
+ function Kn(s, e) {
5941
+ const t = e.type ?? "feat", n = Io(e.tags, "repo");
5857
5942
  return `${t}(${n}): ${e.title} (${s})`;
5858
5943
  }
5859
- const go = new RegExp(`^(${Mn.join("|")})\\(([a-z-]+)\\): .+$`);
5860
- function yo(s) {
5861
- const e = s.match(go);
5862
- return !!e && Qt.has(e[2]);
5944
+ const _o = new RegExp(`^(${Wn.join("|")})\\(([a-z-]+)\\): .+$`);
5945
+ function Po(s) {
5946
+ const e = s.match(_o);
5947
+ return !!e && ts.has(e[2]);
5863
5948
  }
5864
- function wo(s, e, t) {
5949
+ function Ro(s, e, t) {
5865
5950
  return new Promise((n) => {
5866
5951
  var r;
5867
5952
  const i = K("gh", ["pr", "edit", e, "--title", t], {
@@ -5872,19 +5957,19 @@ function wo(s, e, t) {
5872
5957
  }), i.on("close", (o) => n(o === 0)), i.on("error", () => n(!1));
5873
5958
  });
5874
5959
  }
5875
- async function ka(s, e) {
5960
+ async function Ba(s, e) {
5876
5961
  const t = await se(s, e);
5877
5962
  if (!(t != null && t.view)) return "unresolved";
5878
- const { id: n, view: i, entry: r } = t, o = vn(n, r);
5879
- return i.title === o ? "unchanged" : await wo(s, e, o) ? "updated" : "unresolved";
5963
+ const { id: n, view: i, entry: r } = t, o = Kn(n, r);
5964
+ return i.title === o ? "unchanged" : await Ro(s, e, o) ? "updated" : "unresolved";
5880
5965
  }
5881
- async function Sa(s, e) {
5882
- const t = await Tn(s, e);
5966
+ async function Ka(s, e) {
5967
+ const t = await Dn(s, e);
5883
5968
  if (!t) return "no-pr";
5884
5969
  const n = await se(s, e);
5885
- return n ? t.title === vn(n.id, n.entry) ? "valid" : "invalid" : yo(t.title) ? "valid" : "invalid";
5970
+ return n ? t.title === Kn(n.id, n.entry) ? "valid" : "invalid" : Po(t.title) ? "valid" : "invalid";
5886
5971
  }
5887
- function bo(s, e) {
5972
+ function Mo(s, e) {
5888
5973
  return new Promise((t) => {
5889
5974
  var i;
5890
5975
  const n = K("gh", ["pr", "ready", e], {
@@ -5895,7 +5980,7 @@ function bo(s, e) {
5895
5980
  }), n.on("close", (r) => t(r === 0)), n.on("error", () => t(!1));
5896
5981
  });
5897
5982
  }
5898
- function ko(s, e) {
5983
+ function Do(s, e) {
5899
5984
  return new Promise((t) => {
5900
5985
  var i;
5901
5986
  const n = K("gh", ["pr", "close", e], {
@@ -5906,14 +5991,14 @@ function ko(s, e) {
5906
5991
  }), n.on("close", (r) => t(r === 0)), n.on("error", () => t(!1));
5907
5992
  });
5908
5993
  }
5909
- async function Ea(s, e) {
5994
+ async function Fa(s, e) {
5910
5995
  const t = await se(s, e);
5911
5996
  if (!(t != null && t.view)) return "unresolved";
5912
5997
  const { view: n, entry: i } = t;
5913
- return i.status === "dropped" ? n.state !== "OPEN" ? "unchanged" : await ko(s, e) ? "closed" : "unresolved" : !(i.phases.length > 0 && i.phases.every((a) => a.done)) || !n.isDraft ? "unchanged" : await bo(s, e) ? "ready" : "unresolved";
5998
+ return i.status === "dropped" ? n.state !== "OPEN" ? "unchanged" : await Do(s, e) ? "closed" : "unresolved" : !(i.phases.length > 0 && i.phases.every((a) => a.done)) || !n.isDraft ? "unchanged" : await Mo(s, e) ? "ready" : "unresolved";
5914
5999
  }
5915
- const On = "<!-- papercamp:consistency:start -->", So = "<!-- papercamp:consistency:end -->";
5916
- function Eo(s, e) {
6000
+ const Fn = "<!-- papercamp:consistency:start -->", jo = "<!-- papercamp:consistency:end -->";
6001
+ function Bo(s, e) {
5917
6002
  const t = ["### Paper Camp checks", ""];
5918
6003
  if (s.length === 0)
5919
6004
  t.push("No consistency issues found.");
@@ -5922,12 +6007,12 @@ function Eo(s, e) {
5922
6007
  t.push(`- **${n.kind}** (${n.section}): ${n.message}`);
5923
6008
  return e && (t.push(""), t.push(
5924
6009
  e.stale ? `Convergence audit: last run \`${e.audited}\`, plan has changed since — due for a re-audit.` : `Convergence audit: last run \`${e.audited}\`, still current.`
5925
- )), `${On}
6010
+ )), `${Fn}
5926
6011
  ${t.join(`
5927
6012
  `)}
5928
- ${So}`;
6013
+ ${jo}`;
5929
6014
  }
5930
- function No(s, e, t) {
6015
+ function Ko(s, e, t) {
5931
6016
  return new Promise((n) => {
5932
6017
  var r, o;
5933
6018
  const i = K("gh", ["pr", "comment", e, "--body-file", "-"], {
@@ -5938,7 +6023,7 @@ function No(s, e, t) {
5938
6023
  }), i.on("close", (a) => n(a === 0)), i.on("error", () => n(!1)), (o = i.stdin) == null || o.end(t);
5939
6024
  });
5940
6025
  }
5941
- function Io(s, e, t, n, i) {
6026
+ function Fo(s, e, t, n, i) {
5942
6027
  return new Promise((r) => {
5943
6028
  var a, c;
5944
6029
  const o = K(
@@ -5957,59 +6042,59 @@ function Io(s, e, t, n, i) {
5957
6042
  }), o.on("close", (l) => r(l === 0)), o.on("error", () => r(!1)), (c = o.stdin) == null || c.end(i);
5958
6043
  });
5959
6044
  }
5960
- async function Na(s, e) {
6045
+ async function qa(s, e) {
5961
6046
  var g, d;
5962
6047
  const t = await se(s, e);
5963
6048
  if (!((g = t == null ? void 0 : t.view) != null && g.url)) return "unresolved";
5964
6049
  const { view: n, entry: i } = t, [{ entries: r }, o] = await Promise.all([
5965
- ke($(s, "papercamp", "ideas")),
5966
- pe($(s, "ROADMAP.md"), "utf-8").catch(() => "")
5967
- ]), a = r.filter((m) => m.kind !== "note").map((m) => bn(m)), c = o ? io(no(o)) : [], l = Dr(a, c), u = i.audited && i.auditedHash ? {
6050
+ Se(T(s, "papercamp", "ideas")),
6051
+ pe(T(s, "ROADMAP.md"), "utf-8").catch(() => "")
6052
+ ]), a = r.filter((m) => m.kind !== "note").map((m) => Cn(m)), c = o ? So(ko(o)) : [], l = to(a, c), u = i.audited && i.auditedHash ? {
5968
6053
  audited: i.audited,
5969
- stale: oo(i) !== i.auditedHash
5970
- } : void 0, f = Eo(l, u), h = (n.comments ?? []).find((m) => m.body.includes(On));
6054
+ stale: No(i) !== i.auditedHash
6055
+ } : void 0, f = Bo(l, u), h = (n.comments ?? []).find((m) => m.body.includes(Fn));
5971
6056
  if (h) {
5972
6057
  if (h.body === f) return "unchanged";
5973
- const m = $t(n.url), y = (d = h.url.match(/issuecomment-(\d+)/)) == null ? void 0 : d[1];
5974
- return !m || !y ? "unresolved" : await Io(s, m.owner, m.repo, y, f) ? "updated" : "unresolved";
6058
+ const m = Ct(n.url), y = (d = h.url.match(/issuecomment-(\d+)/)) == null ? void 0 : d[1];
6059
+ return !m || !y ? "unresolved" : await Fo(s, m.owner, m.repo, y, f) ? "updated" : "unresolved";
5975
6060
  }
5976
- return await No(s, e, f) ? "created" : "unresolved";
6061
+ return await Ko(s, e, f) ? "created" : "unresolved";
5977
6062
  }
5978
- function Ia(s, e, t) {
6063
+ function Ua(s, e, t) {
5979
6064
  if (!s) return;
5980
- const n = (e ?? "feat").toLowerCase(), i = t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
5981
- return `${n}/${s.toLowerCase()}-${i}`;
6065
+ const n = (e ?? "feat").toLowerCase(), i = t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, ""), r = i.length <= 40 ? i : i[40] === "-" ? i.slice(0, 40) : i.slice(0, 40).replace(/-[^-]*$/, "");
6066
+ return `${n}/${s.toLowerCase()}-${r}`;
5982
6067
  }
5983
6068
  function ft(s, e) {
5984
6069
  for (const { entries: t, section: n } of e)
5985
6070
  t && t.length > 0 && s.push(n.formatLines(t).join(`
5986
6071
  `));
5987
6072
  }
5988
- function Cn() {
6073
+ function qn() {
5989
6074
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
5990
6075
  }
5991
- function Ta(s, e = "log") {
6076
+ function Ha(s, e = "log") {
5992
6077
  return {
5993
6078
  kind: e,
5994
- date: Cn(),
6079
+ date: qn(),
5995
6080
  text: s,
5996
6081
  from: "agent",
5997
6082
  ...e === "question" ? { state: "open" } : {}
5998
6083
  };
5999
6084
  }
6000
6085
  let Ze = Promise.resolve();
6001
- async function To(s, e) {
6086
+ async function qo(s, e) {
6002
6087
  const t = new RegExp(`^${e.toUpperCase()}-(\\d+)\\.md$`), n = [
6003
- $(s, "ideas"),
6004
- $(s, "ideas", "archive"),
6005
- $(s, "plans"),
6006
- $(s, "plans", "archive")
6088
+ T(s, "ideas"),
6089
+ T(s, "ideas", "archive"),
6090
+ T(s, "plans"),
6091
+ T(s, "plans", "archive")
6007
6092
  ];
6008
6093
  let i = 0;
6009
6094
  for (const r of n) {
6010
6095
  let o;
6011
6096
  try {
6012
- o = await ws(r);
6097
+ o = await As(r);
6013
6098
  } catch {
6014
6099
  continue;
6015
6100
  }
@@ -6020,7 +6105,7 @@ async function To(s, e) {
6020
6105
  }
6021
6106
  return i;
6022
6107
  }
6023
- async function $o(s, e) {
6108
+ async function Uo(s, e) {
6024
6109
  const t = Ze.then(async () => {
6025
6110
  let n = null;
6026
6111
  try {
@@ -6029,39 +6114,39 @@ async function $o(s, e) {
6029
6114
  return;
6030
6115
  }
6031
6116
  if (!(n != null && n.nextId)) return;
6032
- const i = n.nextId[e] ?? 1, r = await To(Dn(s), e), o = Math.max(i, r + 1), a = `${e.toUpperCase()}-${o}`;
6117
+ const i = n.nextId[e] ?? 1, r = await qo(Jn(s), e), o = Math.max(i, r + 1), a = `${e.toUpperCase()}-${o}`;
6033
6118
  return n.nextId[e] = o + 1, await x(s, `${JSON.stringify(n, null, 2)}
6034
6119
  `), a;
6035
6120
  });
6036
6121
  return Ze = t.catch(() => {
6037
6122
  }), t;
6038
6123
  }
6039
- function Ao(s) {
6124
+ function Ho(s) {
6040
6125
  const e = [`## ${s.title}`, "", `**Status:** ${s.status}`];
6041
6126
  s.kind && e.push(`**Kind:** ${s.kind}`), s.id && e.push(`**Id:** ${s.id}`), s.idea && e.push(`**Idea:** ${s.idea}`), s.agent && e.push(`**Agent:** ${s.agent}`), e.push(`**Created:** ${s.created}`), s.updated && e.push(`**Updated:** ${s.updated}`), s.tags && s.tags.length > 0 && e.push(`**Tags:** ${s.tags.join(", ")}`);
6042
6127
  const t = [e.join(`
6043
6128
  `)];
6044
6129
  return s.body && t.push(s.body), ft(t, [
6045
- { entries: s.clarifications, section: Ht },
6130
+ { entries: s.clarifications, section: Wt },
6046
6131
  { entries: s.phases, section: ct },
6047
- { entries: s.log, section: Me },
6048
- { entries: s.notes, section: Gt }
6132
+ { entries: s.log, section: je },
6133
+ { entries: s.notes, section: xt }
6049
6134
  ]), t.join(`
6050
6135
 
6051
6136
  `).trimEnd();
6052
6137
  }
6053
- function $a(s) {
6054
- return s.length === 0 ? "" : `${s.map((e) => Ao(e)).join(`
6138
+ function Ya(s) {
6139
+ return s.length === 0 ? "" : `${s.map((e) => Ho(e)).join(`
6055
6140
 
6056
6141
  `)}
6057
6142
  `;
6058
6143
  }
6059
- function Xt(s) {
6144
+ function ss(s) {
6060
6145
  return `---
6061
- ${ar(s).trimEnd()}
6146
+ ${Sr(s).trimEnd()}
6062
6147
  ---`;
6063
6148
  }
6064
- function Aa(s) {
6149
+ function Ga(s) {
6065
6150
  const e = {
6066
6151
  id: s.id,
6067
6152
  title: s.title,
@@ -6070,35 +6155,35 @@ function Aa(s) {
6070
6155
  created: s.created
6071
6156
  };
6072
6157
  s.idea && (e.idea = s.idea), s.agent && (e.agent = s.agent), s.updated && (e.updated = s.updated), s.audited && (e.audited = s.audited), s.auditedHash && (e["audited-hash"] = s.auditedHash), s.tags && s.tags.length > 0 && (e.tags = s.tags);
6073
- const t = [Xt(e)];
6158
+ const t = [ss(e)];
6074
6159
  return s.body && t.push(s.body), ft(t, [
6075
- { entries: s.clarifications, section: Ht },
6160
+ { entries: s.clarifications, section: Wt },
6076
6161
  { entries: s.phases, section: ct },
6077
- { entries: s.log, section: Me },
6078
- { entries: s.notes, section: Gt }
6162
+ { entries: s.log, section: je },
6163
+ { entries: s.notes, section: xt }
6079
6164
  ]), t.join(`
6080
6165
 
6081
6166
  `).trimEnd();
6082
6167
  }
6083
- function vo(s) {
6168
+ function Yo(s) {
6084
6169
  const e = {
6085
6170
  id: s.id,
6086
6171
  title: s.title
6087
6172
  };
6088
6173
  s.type && (e.type = s.type), s.kind && (e.kind = s.kind), s.status && (e.status = s.status), e.created = s.created, s.agent && (e.agent = s.agent), s.updated && (e.updated = s.updated), s.audited && (e.audited = s.audited), s.auditedHash && (e["audited-hash"] = s.auditedHash), s.released && (e.released = s.released), s.tags && s.tags.length > 0 && (e.tags = s.tags), s.subject && (e.subject = s.subject), s.order !== void 0 && (e.order = s.order);
6089
- const t = [Xt(e)];
6174
+ const t = [ss(e)];
6090
6175
  return s.body && t.push(s.body), ft(t, [
6091
6176
  { entries: s.phases, section: ct },
6092
- { entries: s.fixes, section: hn },
6093
- { entries: s.thread, section: pn }
6177
+ { entries: s.fixes, section: In },
6178
+ { entries: s.thread, section: $n }
6094
6179
  ]), t.join(`
6095
6180
 
6096
6181
  `).trimEnd();
6097
6182
  }
6098
- async function va(s) {
6099
- return $o(s, "idea");
6183
+ async function Va(s) {
6184
+ return Uo(s, "idea");
6100
6185
  }
6101
- async function Oa(s, e) {
6186
+ async function Ja(s, e) {
6102
6187
  const t = Ze.then(async () => {
6103
6188
  let n = null;
6104
6189
  try {
@@ -6113,35 +6198,35 @@ async function Oa(s, e) {
6113
6198
  return Ze = t.catch(() => {
6114
6199
  }), t;
6115
6200
  }
6116
- function Ca(s) {
6201
+ function Wa(s) {
6117
6202
  const e = {
6118
6203
  id: s.id,
6119
6204
  title: s.title
6120
6205
  };
6121
6206
  s.kind && (e.kind = s.kind), s.status && (e.status = s.status);
6122
- const t = [Xt(e)], n = `## ${s.id}: ${s.title}`;
6207
+ const t = [ss(e)], n = `## ${s.id}: ${s.title}`;
6123
6208
  return t.push(s.body ? `${n}
6124
6209
 
6125
- ${s.body}` : n), ft(t, [{ entries: s.log, section: Me }]), t.join(`
6210
+ ${s.body}` : n), ft(t, [{ entries: s.log, section: je }]), t.join(`
6126
6211
 
6127
6212
  `).trimEnd();
6128
6213
  }
6129
- async function La(s, e) {
6130
- const t = $(s, "papercamp", "ideas"), n = $(t, "archive"), i = $(t, `${e}.md`), r = $(n, `${e}.md`);
6214
+ async function xa(s, e) {
6215
+ const t = T(s, "papercamp", "ideas"), n = T(t, "archive"), i = T(t, `${e}.md`), r = T(n, `${e}.md`);
6131
6216
  await le(n, { recursive: !0 });
6132
6217
  try {
6133
- return await Pn(i, r), !0;
6218
+ return await Gn(i, r), !0;
6134
6219
  } catch (o) {
6135
6220
  if (o.code === "ENOENT") return !1;
6136
6221
  throw o;
6137
6222
  }
6138
6223
  }
6139
- function _a(s, e) {
6224
+ function za(s, e) {
6140
6225
  let t = !1;
6141
6226
  const n = s.split(`
6142
6227
  `).filter((i) => {
6143
6228
  if (!t) {
6144
- const r = i.match(yn);
6229
+ const r = i.match(On);
6145
6230
  if (r && r[1] === e.date && r[2].trim() === e.title && r[3].trim() === e.description)
6146
6231
  return t = !0, !1;
6147
6232
  }
@@ -6150,7 +6235,7 @@ function _a(s, e) {
6150
6235
  return t ? n.join(`
6151
6236
  `) : s;
6152
6237
  }
6153
- function Pa(s) {
6238
+ function Qa(s) {
6154
6239
  return s.length === 0 ? `# Ideas
6155
6240
 
6156
6241
  No ideas yet.
@@ -6167,7 +6252,7 @@ ${[...s].sort((n, i) => {
6167
6252
  `)}
6168
6253
  `;
6169
6254
  }
6170
- const Oo = `---
6255
+ const Go = `---
6171
6256
  name: paper-camp
6172
6257
  description: Work inside a project that has a papercamp/ folder — its unified idea entities (each holding its plan as a section), with decisions and open questions logged as notes on the idea they bind. Use this whenever the working directory contains papercamp/ (papercamp/ideas/), and especially before starting, continuing, or completing any plan phase, drafting an idea, logging a decision, or answering "what are we working on / what's next".
6173
6258
  ---
@@ -6236,13 +6321,13 @@ session start from live plan data, not hand-maintained here. It does
6236
6321
  not define the file formats in full; treat the existing files under
6237
6322
  \`papercamp/\` as the grammar reference (mirror their structure exactly rather
6238
6323
  than inventing a new shape).
6239
- `, Co = "$CLAUDE_PROJECT_DIR/node_modules/.bin/paper-camp", Lo = `${JSON.stringify(
6324
+ `, Vo = "$CLAUDE_PROJECT_DIR/node_modules/.bin/paper-camp", Jo = `${JSON.stringify(
6240
6325
  {
6241
6326
  hooks: {
6242
6327
  SessionStart: [
6243
6328
  {
6244
6329
  matcher: "*",
6245
- hooks: [{ type: "command", command: `"${Co}" session-focus` }]
6330
+ hooks: [{ type: "command", command: `"${Vo}" session-focus` }]
6246
6331
  }
6247
6332
  ]
6248
6333
  }
@@ -6250,36 +6335,36 @@ than inventing a new shape).
6250
6335
  null,
6251
6336
  2
6252
6337
  )}
6253
- `, _o = "0.1.0";
6254
- class Po extends Error {
6338
+ `, Wo = "0.1.0";
6339
+ class xo extends Error {
6255
6340
  constructor(e) {
6256
6341
  super(`Paper Camp is already initialized in ${e} (papercamp/config.json exists).`);
6257
6342
  }
6258
6343
  }
6259
6344
  async function ce(s) {
6260
6345
  try {
6261
- return await Rn(s), !0;
6346
+ return await Vn(s), !0;
6262
6347
  } catch {
6263
6348
  return !1;
6264
6349
  }
6265
6350
  }
6266
- const Ro = ["suggestions.md"];
6267
- async function Ra(s, e) {
6268
- const t = $(s, "papercamp"), n = $(t, "config.json");
6351
+ const zo = ["suggestions.md"];
6352
+ async function Xa(s, e) {
6353
+ const t = T(s, "papercamp"), n = T(t, "config.json");
6269
6354
  if (await ce(n))
6270
- throw new Po(s);
6355
+ throw new xo(s);
6271
6356
  const i = {
6272
- version: _o,
6357
+ version: Wo,
6273
6358
  projectName: e.projectName,
6274
6359
  initializedAt: (/* @__PURE__ */ new Date()).toISOString(),
6275
6360
  nextId: { idea: 2 }
6276
6361
  };
6277
- vr.parse(i), await le(t, { recursive: !0 });
6278
- const r = $(t, "ideas");
6362
+ Wr.parse(i), await le(t, { recursive: !0 });
6363
+ const r = T(t, "ideas");
6279
6364
  await le(r, { recursive: !0 });
6280
- const o = $(r, "archive");
6365
+ const o = T(r, "archive");
6281
6366
  await le(o, { recursive: !0 });
6282
- const a = $(r, "index.md");
6367
+ const a = T(r, "index.md");
6283
6368
  if (!await ce(a)) {
6284
6369
  const l = e.intent ? `# ${e.projectName}
6285
6370
 
@@ -6290,13 +6375,13 @@ What are you building, and why?
6290
6375
  `;
6291
6376
  await x(a, l, "utf-8");
6292
6377
  }
6293
- const c = $(r, "IDEA-1.md");
6378
+ const c = T(r, "IDEA-1.md");
6294
6379
  if (!await ce(c)) {
6295
- const l = vo({
6380
+ const l = Yo({
6296
6381
  id: "IDEA-1",
6297
6382
  title: "Capture your first idea",
6298
6383
  status: "idea",
6299
- created: Cn(),
6384
+ created: qn(),
6300
6385
  body: `This is an example idea, in the format Paper Camp expects: a short title, a status, and a paragraph of context. Read it, then archive or delete it once you've written your own.
6301
6386
 
6302
6387
  Use the New idea button to capture what you're building next, or ask an agent for suggestions.`
@@ -6304,49 +6389,49 @@ Use the New idea button to capture what you're building next, or ask an agent fo
6304
6389
  await x(c, `${l}
6305
6390
  `, "utf-8");
6306
6391
  }
6307
- for (const l of Ro) {
6308
- const u = $(t, l);
6392
+ for (const l of zo) {
6393
+ const u = T(t, l);
6309
6394
  await ce(u) || await x(u, "", "utf-8");
6310
6395
  }
6311
6396
  await x(n, `${JSON.stringify(i, null, 2)}
6312
- `, "utf-8"), await Do(s);
6397
+ `, "utf-8"), await Qo(s);
6313
6398
  }
6314
- async function Do(s) {
6315
- const e = $(s, ".claude", "skills", "paper-camp");
6399
+ async function Qo(s) {
6400
+ const e = T(s, ".claude", "skills", "paper-camp");
6316
6401
  await le(e, { recursive: !0 });
6317
- const t = $(e, "SKILL.md");
6318
- await ce(t) || await x(t, Oo, "utf-8");
6319
- const n = $(s, ".claude");
6402
+ const t = T(e, "SKILL.md");
6403
+ await ce(t) || await x(t, Go, "utf-8");
6404
+ const n = T(s, ".claude");
6320
6405
  await le(n, { recursive: !0 });
6321
- const i = $(n, "settings.json");
6322
- await ce(i) || await x(i, Lo, "utf-8");
6406
+ const i = T(n, "settings.json");
6407
+ await ce(i) || await x(i, Jo, "utf-8");
6323
6408
  }
6324
- const Ln = {
6409
+ const Un = {
6325
6410
  feat: "Features",
6326
6411
  fix: "Bug Fixes",
6327
6412
  refactor: "Code Refactoring",
6328
6413
  docs: "Documentation",
6329
6414
  chore: "Miscellaneous"
6330
- }, Mo = Array.from(new Set(Object.values(Ln)));
6331
- async function Da(s, e) {
6332
- const t = await Qe($(s, "CHANGELOG.md")), n = Gr(t).find((a) => a.version === e);
6415
+ }, Xo = Array.from(new Set(Object.values(Un)));
6416
+ async function Za(s, e) {
6417
+ const t = await Qe(T(s, "CHANGELOG.md")), n = lo(t).find((a) => a.version === e);
6333
6418
  if (!n) return null;
6334
6419
  const [{ entries: i }, r] = await Promise.all([
6335
- ke($(s, "papercamp", "ideas")),
6336
- Zr(s, n.range)
6420
+ Se(T(s, "papercamp", "ideas")),
6421
+ go(s, n.range)
6337
6422
  ]), o = /* @__PURE__ */ new Map();
6338
6423
  for (const a of r.keys()) {
6339
6424
  const c = i.find((f) => f.id === a);
6340
6425
  if (!c) continue;
6341
- const l = Ln[c.type ?? "chore"], u = o.get(l) ?? [];
6426
+ const l = Un[c.type ?? "chore"], u = o.get(l) ?? [];
6342
6427
  u.push({ id: c.id, title: c.title }), o.set(l, u);
6343
6428
  }
6344
- return Mo.filter((a) => o.has(a)).map((a) => ({
6429
+ return Xo.filter((a) => o.has(a)).map((a) => ({
6345
6430
  label: a,
6346
6431
  ideas: o.get(a)
6347
6432
  }));
6348
6433
  }
6349
- function Ma(s, e) {
6434
+ function ec(s, e) {
6350
6435
  const t = [`## ${s}`];
6351
6436
  for (const n of e) {
6352
6437
  t.push("", `### ${n.label}`, "");
@@ -6356,119 +6441,186 @@ function Ma(s, e) {
6356
6441
  return t.join(`
6357
6442
  `);
6358
6443
  }
6359
- function jo(s) {
6444
+ function Zo(s) {
6360
6445
  return Math.floor((Date.now() - Date.parse(s)) / 864e5);
6361
6446
  }
6362
- const Bo = (s, e) => s === "question" && (e ?? "open") === "open";
6363
- function Ko(s) {
6447
+ const ea = (s, e) => s === "question" && (e ?? "open") === "open";
6448
+ function ta(s) {
6364
6449
  return s.flatMap(
6365
- (e) => (e.thread ?? []).filter((t) => Bo(t.kind, t.state)).map((t) => ({
6450
+ (e) => (e.thread ?? []).filter((t) => ea(t.kind, t.state)).map((t) => ({
6366
6451
  entityId: e.id,
6367
6452
  entityTitle: e.title,
6368
6453
  text: t.text,
6369
6454
  date: t.date,
6370
- ageDays: t.date ? jo(t.date) : Number.POSITIVE_INFINITY
6455
+ ageDays: t.date ? Zo(t.date) : Number.POSITIVE_INFINITY
6371
6456
  }))
6372
6457
  ).sort((e, t) => t.ageDays - e.ageDays);
6373
6458
  }
6374
- async function ja(s) {
6375
- const { entries: e } = await ke(s);
6376
- return Ko(e);
6459
+ async function tc(s) {
6460
+ const { entries: e } = await Se(s);
6461
+ return ta(e);
6462
+ }
6463
+ const Ot = 0.95, Hn = 3e4, vt = {
6464
+ implement: { from: 0, to: 0.6 },
6465
+ verify: { from: 0.6, to: 0.9 },
6466
+ checkbox: { from: 0.95, to: 0.95 }
6467
+ }, $s = {
6468
+ implement: 0,
6469
+ verify: 1,
6470
+ checkbox: 2
6471
+ };
6472
+ function Ts(s, ...e) {
6473
+ for (const t of e)
6474
+ if (typeof (s == null ? void 0 : s[t]) == "string") return s[t];
6475
+ return "";
6476
+ }
6477
+ function sc(s, e) {
6478
+ const t = s.toLowerCase();
6479
+ if (t === "bash")
6480
+ return (typeof (e == null ? void 0 : e.command) == "string" ? e.command : "").includes("check-types") ? "verify" : null;
6481
+ if (t === "edit" || t === "multiedit" || t === "write") {
6482
+ const n = Ts(e, "old_string", "oldString"), i = Ts(e, "new_string", "newString");
6483
+ return n.includes("- [ ]") && i.includes("- [x]") ? "checkbox" : "implement";
6484
+ }
6485
+ return null;
6486
+ }
6487
+ function nc(s, e) {
6488
+ return s ? $s[e] > $s[s] ? e : s : e;
6489
+ }
6490
+ function ic(s, e) {
6491
+ return s === void 0 ? !1 : e - s >= Hn;
6492
+ }
6493
+ function sa(s) {
6494
+ const e = [...s].sort((n, i) => n - i), t = Math.floor(e.length / 2);
6495
+ return e.length % 2 === 0 ? (e[t - 1] + e[t]) / 2 : e[t];
6496
+ }
6497
+ function rc(s) {
6498
+ const e = s.filter((i) => i.taskKind === "phase" && i.outcome === "done").map((i) => Date.parse(i.endedAt) - Date.parse(i.startedAt)).filter((i) => Number.isFinite(i) && i > 0);
6499
+ if (e.length === 0) return {};
6500
+ const t = sa(e), n = {};
6501
+ for (const i of ["implement", "verify"]) {
6502
+ const r = vt[i].to - vt[i].from;
6503
+ n[i] = t * r / Ot;
6504
+ }
6505
+ return n;
6506
+ }
6507
+ function oc({
6508
+ anchor: s,
6509
+ anchorEnteredAt: e,
6510
+ lastStreamAt: t,
6511
+ now: n,
6512
+ medians: i
6513
+ }) {
6514
+ if (!s) return 0;
6515
+ const r = vt[s], o = Math.min(r.from, Ot), a = i == null ? void 0 : i[s];
6516
+ if (!a || a <= 0 || e === void 0 || r.to === r.from)
6517
+ return o;
6518
+ const c = t === void 0 ? n : Math.min(n, t + Hn), l = Math.min(1, Math.max(0, c - e) / a);
6519
+ return Math.min(r.from + l * (r.to - r.from), Ot);
6377
6520
  }
6378
6521
  export {
6379
- ra as $,
6380
- Po as A,
6381
- Dr as B,
6382
- Lo as C,
6383
- kn as D,
6384
- Pa as E,
6385
- vo as F,
6386
- Ca as G,
6387
- Ao as H,
6388
- Aa as I,
6389
- $a as J,
6390
- Ma as K,
6391
- $r as L,
6392
- Ra as M,
6393
- yo as N,
6394
- ma as O,
6395
- _o as P,
6396
- vr as Q,
6397
- gn as R,
6398
- Oo as S,
6399
- Vo as T,
6400
- Wt as U,
6401
- na as V,
6402
- ia as W,
6403
- sa as X,
6404
- ta as Y,
6405
- Lr as Z,
6406
- no as _,
6407
- Qt as a,
6408
- Mr as a0,
6409
- Ir as a1,
6410
- Tr as a2,
6411
- ke as a3,
6412
- aa as a4,
6413
- Qe as a5,
6414
- fa as a6,
6415
- ja as a7,
6416
- ca as a8,
6417
- da as a9,
6418
- Zo as aA,
6419
- ea as aB,
6420
- Xo as aC,
6421
- kr as aD,
6422
- _a as aa,
6423
- Eo as ab,
6424
- lo as ac,
6425
- zo as ad,
6426
- Xr as ae,
6427
- ua as af,
6428
- ms as ag,
6429
- Zr as ah,
6430
- ya as ai,
6431
- ao as aj,
6432
- Ts as ak,
6433
- Da as al,
6434
- Gr as am,
6435
- xo as an,
6436
- ga as ao,
6437
- Xt as ap,
6438
- Na as aq,
6439
- wa as ar,
6440
- ba as as,
6441
- Ea as at,
6442
- ka as au,
6443
- Cn as av,
6444
- Sa as aw,
6445
- jr as ax,
6446
- oa as ay,
6447
- mn as az,
6448
- Wr as b,
6449
- yn as c,
6450
- pa as d,
6451
- ha as e,
6452
- Ee as f,
6453
- Ta as g,
6454
- Jo as h,
6455
- La as i,
6456
- va as j,
6457
- $o as k,
6458
- Ia as l,
6459
- Qo as m,
6460
- Ko as n,
6461
- oo as o,
6462
- vn as p,
6463
- Q as q,
6464
- uo as r,
6465
- ro as s,
6466
- io as t,
6467
- Oa as u,
6468
- Ar as v,
6469
- Ur as w,
6470
- bn as x,
6471
- Wo as y,
6472
- la as z
6522
+ Xt as $,
6523
+ xo as A,
6524
+ ao as B,
6525
+ Jo as C,
6526
+ Cn as D,
6527
+ ua as E,
6528
+ Aa as F,
6529
+ to as G,
6530
+ Ln as H,
6531
+ Qa as I,
6532
+ Yo as J,
6533
+ Wa as K,
6534
+ Ho as L,
6535
+ Es as M,
6536
+ Ga as N,
6537
+ Ya as O,
6538
+ Wo as P,
6539
+ ec as Q,
6540
+ Vr as R,
6541
+ Go as S,
6542
+ Xa as T,
6543
+ Po as U,
6544
+ ic as V,
6545
+ Pa as W,
6546
+ rc as X,
6547
+ Wr as Y,
6548
+ An as Z,
6549
+ la as _,
6550
+ ts as a,
6551
+ Sa as a0,
6552
+ Ea as a1,
6553
+ ka as a2,
6554
+ ba as a3,
6555
+ Qr as a4,
6556
+ ko as a5,
6557
+ Na as a6,
6558
+ so as a7,
6559
+ oc as a8,
6560
+ Yr as a9,
6561
+ ja as aA,
6562
+ Fa as aB,
6563
+ Ba as aC,
6564
+ qn as aD,
6565
+ Ka as aE,
6566
+ no as aF,
6567
+ Ia as aG,
6568
+ Tn as aH,
6569
+ ma as aI,
6570
+ ya as aJ,
6571
+ wa as aK,
6572
+ ga as aL,
6573
+ Fr as aM,
6574
+ Gr as aa,
6575
+ Se as ab,
6576
+ $a as ac,
6577
+ Qe as ad,
6578
+ Oa as ae,
6579
+ tc as af,
6580
+ Ta as ag,
6581
+ Ca as ah,
6582
+ za as ai,
6583
+ Bo as aj,
6584
+ To as ak,
6585
+ ha as al,
6586
+ mo as am,
6587
+ va as an,
6588
+ wt as ao,
6589
+ go as ap,
6590
+ Ma as aq,
6591
+ Io as ar,
6592
+ Ds as as,
6593
+ Za as at,
6594
+ lo as au,
6595
+ da as av,
6596
+ Ra as aw,
6597
+ ss as ax,
6598
+ qa as ay,
6599
+ Da as az,
6600
+ Xn as b,
6601
+ Ot as c,
6602
+ Hn as d,
6603
+ On as e,
6604
+ _a as f,
6605
+ La as g,
6606
+ nc as h,
6607
+ Ne as i,
6608
+ Ha as j,
6609
+ fa as k,
6610
+ xa as l,
6611
+ Va as m,
6612
+ Uo as n,
6613
+ Ua as o,
6614
+ sc as p,
6615
+ pa as q,
6616
+ ta as r,
6617
+ No as s,
6618
+ Kn as t,
6619
+ Q as u,
6620
+ Oo as v,
6621
+ Eo as w,
6622
+ So as x,
6623
+ Ja as y,
6624
+ Jr as z
6473
6625
  };
6474
- //# sourceMappingURL=parked-questions.BoAnCnQA.js.map
6626
+ //# sourceMappingURL=phase-progress.DsBJvd_o.js.map