@dendelion/paper-camp 0.10.0 → 0.11.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 (37) hide show
  1. package/dist/app/assets/index-CwotynaS.js +2 -0
  2. package/dist/app/assets/index-CwotynaS.js.map +1 -0
  3. package/dist/app/assets/index-DHHPg0hQ.js +4 -0
  4. package/dist/app/assets/index-DHHPg0hQ.js.map +1 -0
  5. package/dist/app/assets/{index-DrNAzLuW.js → index-DyLHu3dg.js} +2 -2
  6. package/dist/app/assets/{index-DrNAzLuW.js.map → index-DyLHu3dg.js.map} +1 -1
  7. package/dist/app/assets/{index-C2kYil0S.js → index-DzMK8ayh.js} +3 -3
  8. package/dist/app/assets/index-DzMK8ayh.js.map +1 -0
  9. package/dist/app/assets/{main-BJGNGUiz.css → main-B7k4s_9g.css} +1 -1
  10. package/dist/app/assets/main-BNLbBO0E.js +233 -0
  11. package/dist/app/assets/main-BNLbBO0E.js.map +1 -0
  12. package/dist/app/assets/{sidebar-section-Ch50IaLb.js → sidebar-section-DVSoUVEe.js} +2 -2
  13. package/dist/app/assets/{sidebar-section-Ch50IaLb.js.map → sidebar-section-DVSoUVEe.js.map} +1 -1
  14. package/dist/app/index.html +2 -2
  15. package/dist/chunks/{roadmap.C0AQ6pUX.js → roadmap.HCld8rN3.js} +1221 -1130
  16. package/dist/chunks/{roadmap.C0AQ6pUX.js.map → roadmap.HCld8rN3.js.map} +1 -1
  17. package/dist/cli/index.js +6271 -6023
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/core/git-pr/pr.d.ts +12 -1
  20. package/dist/core/git-pr/pr.d.ts.map +1 -1
  21. package/dist/core/git-pr/scopes.d.ts +3 -0
  22. package/dist/core/git-pr/scopes.d.ts.map +1 -1
  23. package/dist/core/index.js +86 -79
  24. package/dist/core/roadmap.d.ts +2 -0
  25. package/dist/core/roadmap.d.ts.map +1 -1
  26. package/dist/core/scaffold/scaffold.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +6 -1
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/types/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/app/assets/index-BnXxehKU.js +0 -2
  32. package/dist/app/assets/index-BnXxehKU.js.map +0 -1
  33. package/dist/app/assets/index-C2kYil0S.js.map +0 -1
  34. package/dist/app/assets/index-CRRHTP77.js +0 -2
  35. package/dist/app/assets/index-CRRHTP77.js.map +0 -1
  36. package/dist/app/assets/main-CyxblUnu.js +0 -233
  37. package/dist/app/assets/main-CyxblUnu.js.map +0 -1
@@ -1,66 +1,66 @@
1
- import { spawn as U } from "node:child_process";
2
- import { readdir as un, readFile as x, stat as dn, mkdir as X, writeFile as V, access as hn, rename as pn } from "node:fs/promises";
3
- import { join as v, dirname as ls } from "node:path";
4
- import { createHash as mn } from "node:crypto";
1
+ import { spawn as K } from "node:child_process";
2
+ import { readdir as mn, readFile as x, stat as gn, writeFile as Y, mkdir as X, rename as yn, access as bn } from "node:fs/promises";
3
+ import { join as v, dirname as us } from "node:path";
4
+ import { AGENT_IDS as Le, PLAN_KINDS as wn } from "../types/index.js";
5
+ import { createHash as kn } from "node:crypto";
5
6
  import { z as b } from "zod";
6
- import { AGENT_IDS as Ae } from "../types/index.js";
7
- const gn = /^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;
8
- function yn(s) {
7
+ const Sn = /^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;
8
+ function En(s) {
9
9
  return s.length >= 2 && (s.startsWith('"') && s.endsWith('"') || s.startsWith("'") && s.endsWith("'")) ? s.slice(1, -1) : s;
10
10
  }
11
- function Vt(s) {
11
+ function Jt(s) {
12
12
  return s === "" || /[\s#"]/.test(s) ? `"${s.replace(/"/g, '\\"')}"` : s;
13
13
  }
14
- function cs(s) {
14
+ function ds(s) {
15
15
  const e = s.trim();
16
16
  if (!e || e.startsWith("#")) return null;
17
- const t = e.match(gn);
18
- return t ? { key: t[1], value: yn(t[2]) } : null;
17
+ const t = e.match(Sn);
18
+ return t ? { key: t[1], value: En(t[2]) } : null;
19
19
  }
20
- function Hr(s) {
20
+ function xr(s) {
21
21
  const e = [];
22
22
  for (const t of s.split(`
23
23
  `)) {
24
- const n = cs(t);
24
+ const n = ds(t);
25
25
  n && e.push(n);
26
26
  }
27
27
  return e;
28
28
  }
29
- function Jr(s, e) {
29
+ function eo(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 = cs(r);
33
+ const o = ds(r);
34
34
  if (!o) {
35
35
  i.push(r);
36
36
  continue;
37
37
  }
38
- t.has(o.key) && (i.push(`${o.key}=${Vt(t.get(o.key) ?? "")}`), t.delete(o.key));
38
+ t.has(o.key) && (i.push(`${o.key}=${Jt(t.get(o.key) ?? "")}`), t.delete(o.key));
39
39
  }
40
40
  for (const [r, o] of t)
41
- i.push(`${r}=${Vt(o)}`);
41
+ i.push(`${r}=${Jt(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 dt = /* @__PURE__ */ new Map(), bn = 5 * 60 * 1e3, wn = {
47
+ const pt = /* @__PURE__ */ new Map(), Nn = 5 * 60 * 1e3, $n = {
48
48
  APPROVED: "approved",
49
49
  CHANGES_REQUESTED: "changes-requested",
50
50
  REVIEW_REQUIRED: "review-required"
51
51
  };
52
- function kn(s) {
53
- const e = s.state === "MERGED" ? "merged" : s.state === "CLOSED" ? "closed" : s.isDraft ? "draft" : "open", t = wn[s.reviewDecision];
52
+ function In(s) {
53
+ const e = s.state === "MERGED" ? "merged" : s.state === "CLOSED" ? "closed" : s.isDraft ? "draft" : "open", t = $n[s.reviewDecision];
54
54
  return { number: s.number, url: s.url, state: e, ...t && { reviewDecision: t } };
55
55
  }
56
- const Gt = { merged: 4, open: 3, draft: 2, closed: 1 };
57
- function fs(s, e) {
56
+ const Wt = { merged: 4, open: 3, draft: 2, closed: 1 };
57
+ function hs(s, e) {
58
58
  const t = s == null ? void 0 : s.match(/\*\*Plan:\*\*\s*`?([A-Za-z]+-\d+)`?/);
59
59
  if (t) return t[1].toUpperCase();
60
60
  const n = e == null ? void 0 : e.match(/^[a-z]+\/([a-z]+-\d+)-/);
61
61
  return n ? n[1].toUpperCase() : null;
62
62
  }
63
- const Sn = `
63
+ const Tn = `
64
64
  query($owner: String!, $repo: String!, $number: Int!) {
65
65
  repository(owner: $owner, name: $repo) {
66
66
  pullRequest(number: $number) {
@@ -71,15 +71,15 @@ query($owner: String!, $repo: String!, $number: Int!) {
71
71
  }
72
72
  }
73
73
  }`;
74
- function kt(s) {
74
+ function St(s) {
75
75
  const e = s.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);
76
76
  if (!e) return null;
77
77
  const [, t, n, i] = e;
78
78
  return { owner: t, repo: n, number: i };
79
79
  }
80
- const us = 15e3;
81
- function ds(s, e, t, n, i) {
82
- return ps(s, [
80
+ const ps = 15e3;
81
+ function ms(s, e, t, n, i) {
82
+ return ys(s, [
83
83
  "-f",
84
84
  `query=${e}`,
85
85
  "-f",
@@ -90,16 +90,16 @@ function ds(s, e, t, n, i) {
90
90
  `number=${i}`
91
91
  ]);
92
92
  }
93
- function hs(s, e, t) {
93
+ function gs(s, e, t) {
94
94
  const n = ["-f", `query=${e}`];
95
95
  for (const [i, r] of Object.entries(t))
96
96
  n.push("-f", `${i}=${r}`);
97
- return ps(s, n);
97
+ return ys(s, n);
98
98
  }
99
- function ps(s, e) {
99
+ function ys(s, e) {
100
100
  return new Promise((t) => {
101
101
  var l, c;
102
- const n = U("gh", ["api", "graphql", ...e], {
102
+ const n = K("gh", ["api", "graphql", ...e], {
103
103
  cwd: s,
104
104
  stdio: ["ignore", "pipe", "pipe"]
105
105
  });
@@ -108,7 +108,7 @@ function ps(s, e) {
108
108
  i || (i = !0, clearTimeout(o), u());
109
109
  }, o = setTimeout(() => {
110
110
  n.kill(), r(() => t(void 0));
111
- }, us);
111
+ }, ps);
112
112
  let a = "";
113
113
  (l = n.stdout) == null || l.on("data", (u) => {
114
114
  a += u.toString();
@@ -128,16 +128,16 @@ function ps(s, e) {
128
128
  }), n.on("error", () => r(() => t(void 0)));
129
129
  });
130
130
  }
131
- async function En(s, e) {
131
+ async function An(s, e) {
132
132
  var c, u, f, d, p;
133
- const t = kt(e);
133
+ const t = St(e);
134
134
  if (!t) return;
135
- const n = await ds(s, Sn, t.owner, t.repo, t.number), i = (u = (c = n == null ? void 0 : n.data) == null ? void 0 : c.repository) == null ? void 0 : u.pullRequest;
135
+ const n = await ms(s, Tn, t.owner, t.repo, t.number), i = (u = (c = n == null ? void 0 : n.data) == null ? void 0 : c.repository) == null ? void 0 : u.pullRequest;
136
136
  if (!i) return;
137
137
  const r = i.reviewThreads.nodes.filter((g) => !g.isResolved).length, o = (f = i.commits.nodes[0]) == null ? void 0 : f.commit.committedDate, a = [(d = i.comments.nodes[0]) == null ? void 0 : d.createdAt, (p = i.reviews.nodes[0]) == null ? void 0 : p.createdAt].filter((g) => !!g).sort().at(-1), l = !!(o && a && a > o);
138
138
  return { unresolvedThreadCount: r, hasNewCommentsSincePush: l };
139
139
  }
140
- const Nn = `
140
+ const On = `
141
141
  query($owner: String!, $repo: String!, $number: Int!) {
142
142
  repository(owner: $owner, name: $repo) {
143
143
  pullRequest(number: $number) {
@@ -151,11 +151,11 @@ query($owner: String!, $repo: String!, $number: Int!) {
151
151
  }
152
152
  }
153
153
  }`;
154
- async function Wr(s, e) {
154
+ async function to(s, e) {
155
155
  var r, o, a;
156
- const t = kt(e);
156
+ const t = St(e);
157
157
  if (!t) return [];
158
- const n = await ds(s, Nn, t.owner, t.repo, t.number);
158
+ const n = await ms(s, On, t.owner, t.repo, t.number);
159
159
  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((l) => !l.isResolved).map((l) => ({ id: l.id, comment: l.comments.nodes[0] })).filter((l) => !!l.comment).map(({ id: l, comment: c }) => {
160
160
  var u;
161
161
  return {
@@ -167,40 +167,40 @@ async function Wr(s, e) {
167
167
  };
168
168
  });
169
169
  }
170
- const In = `
170
+ const vn = `
171
171
  mutation($threadId: ID!) {
172
172
  resolveReviewThread(input: { threadId: $threadId }) {
173
173
  thread { id isResolved }
174
174
  }
175
- }`, $n = `
175
+ }`, Ln = `
176
176
  mutation($threadId: ID!, $body: String!) {
177
177
  addPullRequestReviewThreadReply(input: { pullRequestReviewThreadId: $threadId, body: $body }) {
178
178
  comment { id }
179
179
  }
180
180
  }`;
181
- async function Qr(s, e) {
181
+ async function so(s, e) {
182
182
  var n, i, r;
183
- const t = await hs(s, In, { threadId: e });
183
+ const t = await gs(s, vn, { threadId: e });
184
184
  return !!((r = (i = (n = t == null ? void 0 : t.data) == null ? void 0 : n.resolveReviewThread) == null ? void 0 : i.thread) != null && r.isResolved);
185
185
  }
186
- async function zr(s, e, t) {
186
+ async function no(s, e, t) {
187
187
  var i, r, o;
188
- const n = await hs(s, $n, { threadId: e, body: t });
188
+ const n = await gs(s, Ln, { threadId: e, body: t });
189
189
  return !!((o = (r = (i = n == null ? void 0 : n.data) == null ? void 0 : i.addPullRequestReviewThreadReply) == null ? void 0 : r.comment) != null && o.id);
190
190
  }
191
- async function Tn(s, e) {
191
+ async function Cn(s, e) {
192
192
  const t = [...e.entries()].filter(
193
193
  ([, i]) => i.state === "open" || i.state === "draft"
194
- ), n = await Promise.all(t.map(([, i]) => En(s, i.url)));
194
+ ), n = await Promise.all(t.map(([, i]) => An(s, i.url)));
195
195
  t.forEach(([i, r], o) => {
196
196
  const a = n[o];
197
197
  a && e.set(i, { ...r, ...a });
198
198
  });
199
199
  }
200
- function An(s) {
200
+ function _n(s) {
201
201
  return new Promise((e) => {
202
202
  var a, l;
203
- const t = U(
203
+ const t = K(
204
204
  "gh",
205
205
  [
206
206
  "pr",
@@ -219,7 +219,7 @@ function An(s) {
219
219
  n || (n = !0, clearTimeout(r), c());
220
220
  }, r = setTimeout(() => {
221
221
  t.kill(), i(() => e(void 0));
222
- }, us);
222
+ }, ps);
223
223
  let o = "";
224
224
  (a = t.stdout) == null || a.on("data", (c) => {
225
225
  o += c.toString();
@@ -233,12 +233,12 @@ function An(s) {
233
233
  try {
234
234
  const u = JSON.parse(o), f = /* @__PURE__ */ new Map();
235
235
  for (const d of u) {
236
- const p = fs(d.body, d.headRefName);
236
+ const p = hs(d.body, d.headRefName);
237
237
  if (!p) continue;
238
- const g = kn(d), h = f.get(p);
239
- (!h || Gt[g.state] > Gt[h.state]) && f.set(p, g);
238
+ const g = In(d), h = f.get(p);
239
+ (!h || Wt[g.state] > Wt[h.state]) && f.set(p, g);
240
240
  }
241
- Tn(s, f).then(() => e(f));
241
+ Cn(s, f).then(() => e(f));
242
242
  } catch {
243
243
  e(void 0);
244
244
  }
@@ -246,21 +246,21 @@ function An(s) {
246
246
  }), t.on("error", () => i(() => e(void 0)));
247
247
  });
248
248
  }
249
- async function On(s, e = bn) {
250
- const t = dt.get(s);
249
+ async function Pn(s, e = Nn) {
250
+ const t = pt.get(s);
251
251
  if (t && Date.now() - t.fetchedAt < e) return t.prs;
252
- const n = await An(s);
253
- return n !== void 0 && dt.set(s, { prs: n, fetchedAt: Date.now() }), n;
252
+ const n = await _n(s);
253
+ return n !== void 0 && pt.set(s, { prs: n, fetchedAt: Date.now() }), n;
254
254
  }
255
- function Xr() {
256
- dt.clear();
255
+ function io() {
256
+ pt.clear();
257
257
  }
258
- const St = Symbol.for("yaml.alias"), ht = Symbol.for("yaml.document"), Z = Symbol.for("yaml.map"), ms = Symbol.for("yaml.pair"), H = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), B = Symbol.for("yaml.node.type"), pe = (s) => !!s && typeof s == "object" && s[B] === St, Oe = (s) => !!s && typeof s == "object" && s[B] === ht, ve = (s) => !!s && typeof s == "object" && s[B] === Z, _ = (s) => !!s && typeof s == "object" && s[B] === ms, O = (s) => !!s && typeof s == "object" && s[B] === H, Le = (s) => !!s && typeof s == "object" && s[B] === he;
258
+ const Et = Symbol.for("yaml.alias"), mt = Symbol.for("yaml.document"), Z = Symbol.for("yaml.map"), bs = Symbol.for("yaml.pair"), H = Symbol.for("yaml.scalar"), ge = Symbol.for("yaml.seq"), B = Symbol.for("yaml.node.type"), ye = (s) => !!s && typeof s == "object" && s[B] === Et, Ce = (s) => !!s && typeof s == "object" && s[B] === mt, _e = (s) => !!s && typeof s == "object" && s[B] === Z, _ = (s) => !!s && typeof s == "object" && s[B] === bs, O = (s) => !!s && typeof s == "object" && s[B] === H, Pe = (s) => !!s && typeof s == "object" && s[B] === ge;
259
259
  function L(s) {
260
260
  if (s && typeof s == "object")
261
261
  switch (s[B]) {
262
262
  case Z:
263
- case he:
263
+ case ge:
264
264
  return !0;
265
265
  }
266
266
  return !1;
@@ -268,54 +268,54 @@ function L(s) {
268
268
  function C(s) {
269
269
  if (s && typeof s == "object")
270
270
  switch (s[B]) {
271
- case St:
271
+ case Et:
272
272
  case Z:
273
273
  case H:
274
- case he:
274
+ case ge:
275
275
  return !0;
276
276
  }
277
277
  return !1;
278
278
  }
279
- const gs = (s) => (O(s) || L(s)) && !!s.anchor, ee = Symbol("break visit"), vn = Symbol("skip children"), Ee = Symbol("remove node");
280
- function me(s, e) {
281
- const t = Ln(e);
282
- Oe(s) ? oe(null, s.contents, t, Object.freeze([s])) === Ee && (s.contents = null) : oe(null, s, t, Object.freeze([]));
279
+ const ws = (s) => (O(s) || L(s)) && !!s.anchor, ee = Symbol("break visit"), Dn = Symbol("skip children"), Ie = Symbol("remove node");
280
+ function be(s, e) {
281
+ const t = jn(e);
282
+ Ce(s) ? ae(null, s.contents, t, Object.freeze([s])) === Ie && (s.contents = null) : ae(null, s, t, Object.freeze([]));
283
283
  }
284
- me.BREAK = ee;
285
- me.SKIP = vn;
286
- me.REMOVE = Ee;
287
- function oe(s, e, t, n) {
288
- const i = Cn(s, e, t, n);
284
+ be.BREAK = ee;
285
+ be.SKIP = Dn;
286
+ be.REMOVE = Ie;
287
+ function ae(s, e, t, n) {
288
+ const i = Rn(s, e, t, n);
289
289
  if (C(i) || _(i))
290
- return _n(s, n, i), oe(s, i, t, n);
290
+ return Mn(s, n, i), ae(s, i, t, n);
291
291
  if (typeof i != "symbol") {
292
292
  if (L(e)) {
293
293
  n = Object.freeze(n.concat(e));
294
294
  for (let r = 0; r < e.items.length; ++r) {
295
- const o = oe(r, e.items[r], t, n);
295
+ const o = ae(r, e.items[r], t, n);
296
296
  if (typeof o == "number")
297
297
  r = o - 1;
298
298
  else {
299
299
  if (o === ee)
300
300
  return ee;
301
- o === Ee && (e.items.splice(r, 1), r -= 1);
301
+ o === Ie && (e.items.splice(r, 1), r -= 1);
302
302
  }
303
303
  }
304
304
  } else if (_(e)) {
305
305
  n = Object.freeze(n.concat(e));
306
- const r = oe("key", e.key, t, n);
306
+ const r = ae("key", e.key, t, n);
307
307
  if (r === ee)
308
308
  return ee;
309
- r === Ee && (e.key = null);
310
- const o = oe("value", e.value, t, n);
309
+ r === Ie && (e.key = null);
310
+ const o = ae("value", e.value, t, n);
311
311
  if (o === ee)
312
312
  return ee;
313
- o === Ee && (e.value = null);
313
+ o === Ie && (e.value = null);
314
314
  }
315
315
  }
316
316
  return i;
317
317
  }
318
- function Ln(s) {
318
+ function jn(s) {
319
319
  return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
320
320
  Alias: s.Node,
321
321
  Map: s.Node,
@@ -330,42 +330,42 @@ function Ln(s) {
330
330
  Seq: s.Collection
331
331
  }, s) : s;
332
332
  }
333
- function Cn(s, e, t, n) {
333
+ function Rn(s, e, t, n) {
334
334
  var i, r, o, a, l;
335
335
  if (typeof t == "function")
336
336
  return t(s, e, n);
337
- if (ve(e))
337
+ if (_e(e))
338
338
  return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
339
- if (Le(e))
339
+ if (Pe(e))
340
340
  return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
341
341
  if (_(e))
342
342
  return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
343
343
  if (O(e))
344
344
  return (a = t.Scalar) == null ? void 0 : a.call(t, s, e, n);
345
- if (pe(e))
345
+ if (ye(e))
346
346
  return (l = t.Alias) == null ? void 0 : l.call(t, s, e, n);
347
347
  }
348
- function _n(s, e, t) {
348
+ function Mn(s, e, t) {
349
349
  const n = e[e.length - 1];
350
350
  if (L(n))
351
351
  n.items[s] = t;
352
352
  else if (_(n))
353
353
  s === "key" ? n.key = t : n.value = t;
354
- else if (Oe(n))
354
+ else if (Ce(n))
355
355
  n.contents = t;
356
356
  else {
357
- const i = pe(n) ? "alias" : "scalar";
357
+ const i = ye(n) ? "alias" : "scalar";
358
358
  throw new Error(`Cannot replace node with ${i} parent`);
359
359
  }
360
360
  }
361
- const Pn = {
361
+ const Bn = {
362
362
  "!": "%21",
363
363
  ",": "%2C",
364
364
  "[": "%5B",
365
365
  "]": "%5D",
366
366
  "{": "%7B",
367
367
  "}": "%7D"
368
- }, Dn = (s) => s.replace(/[!,[\]{}]/g, (e) => Pn[e]);
368
+ }, Kn = (s) => s.replace(/[!,[\]{}]/g, (e) => Bn[e]);
369
369
  class D {
370
370
  constructor(e, t) {
371
371
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, D.defaultYaml, e), this.tags = Object.assign({}, D.defaultTags, t);
@@ -455,7 +455,7 @@ class D {
455
455
  tagString(e) {
456
456
  for (const [t, n] of Object.entries(this.tags))
457
457
  if (e.startsWith(n))
458
- return t + Dn(e.substring(n.length));
458
+ return t + Kn(e.substring(n.length));
459
459
  return e[0] === "!" ? e : `!<${e}>`;
460
460
  }
461
461
  toString(e) {
@@ -463,7 +463,7 @@ class D {
463
463
  let i;
464
464
  if (e && n.length > 0 && C(e.contents)) {
465
465
  const r = {};
466
- me(e.contents, (o, a) => {
466
+ be(e.contents, (o, a) => {
467
467
  C(a) && a.tag && (r[a.tag] = !0);
468
468
  }), i = Object.keys(r);
469
469
  } else
@@ -476,35 +476,35 @@ class D {
476
476
  }
477
477
  D.defaultYaml = { explicit: !1, version: "1.2" };
478
478
  D.defaultTags = { "!!": "tag:yaml.org,2002:" };
479
- function ys(s) {
479
+ function ks(s) {
480
480
  if (/[\x00-\x19\s,[\]{}]/.test(s)) {
481
481
  const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
482
482
  throw new Error(t);
483
483
  }
484
484
  return !0;
485
485
  }
486
- function bs(s) {
486
+ function Ss(s) {
487
487
  const e = /* @__PURE__ */ new Set();
488
- return me(s, {
488
+ return be(s, {
489
489
  Value(t, n) {
490
490
  n.anchor && e.add(n.anchor);
491
491
  }
492
492
  }), e;
493
493
  }
494
- function ws(s, e) {
494
+ function Es(s, e) {
495
495
  for (let t = 1; ; ++t) {
496
496
  const n = `${s}${t}`;
497
497
  if (!e.has(n))
498
498
  return n;
499
499
  }
500
500
  }
501
- function jn(s, e) {
501
+ function qn(s, e) {
502
502
  const t = [], n = /* @__PURE__ */ new Map();
503
503
  let i = null;
504
504
  return {
505
505
  onAnchor: (r) => {
506
- t.push(r), i ?? (i = bs(s));
507
- const o = ws(e, i);
506
+ t.push(r), i ?? (i = Ss(s));
507
+ const o = Es(e, i);
508
508
  return i.add(o), o;
509
509
  },
510
510
  /**
@@ -526,26 +526,26 @@ function jn(s, e) {
526
526
  sourceObjects: n
527
527
  };
528
528
  }
529
- function ae(s, e, t, n) {
529
+ function le(s, e, t, n) {
530
530
  if (n && typeof n == "object")
531
531
  if (Array.isArray(n))
532
532
  for (let i = 0, r = n.length; i < r; ++i) {
533
- const o = n[i], a = ae(s, n, String(i), o);
533
+ const o = n[i], a = le(s, n, String(i), o);
534
534
  a === void 0 ? delete n[i] : a !== o && (n[i] = a);
535
535
  }
536
536
  else if (n instanceof Map)
537
537
  for (const i of Array.from(n.keys())) {
538
- const r = n.get(i), o = ae(s, n, i, r);
538
+ const r = n.get(i), o = le(s, n, i, r);
539
539
  o === void 0 ? n.delete(i) : o !== r && n.set(i, o);
540
540
  }
541
541
  else if (n instanceof Set)
542
542
  for (const i of Array.from(n)) {
543
- const r = ae(s, n, i, i);
543
+ const r = le(s, n, i, i);
544
544
  r === void 0 ? n.delete(i) : r !== i && (n.delete(i), n.add(r));
545
545
  }
546
546
  else
547
547
  for (const [i, r] of Object.entries(n)) {
548
- const o = ae(s, n, i, r);
548
+ const o = le(s, n, i, r);
549
549
  o === void 0 ? delete n[i] : o !== r && (n[i] = o);
550
550
  }
551
551
  return s.call(e, t, n);
@@ -554,7 +554,7 @@ function M(s, e, t) {
554
554
  if (Array.isArray(s))
555
555
  return s.map((n, i) => M(n, String(i), t));
556
556
  if (s && typeof s.toJSON == "function") {
557
- if (!t || !gs(s))
557
+ if (!t || !ws(s))
558
558
  return s.toJSON(e, t);
559
559
  const n = { aliasCount: 0, count: 1, res: void 0 };
560
560
  t.anchors.set(s, n), t.onCreate = (r) => {
@@ -565,7 +565,7 @@ function M(s, e, t) {
565
565
  }
566
566
  return typeof s == "bigint" && !(t != null && t.keep) ? Number(s) : s;
567
567
  }
568
- class Et {
568
+ class Nt {
569
569
  constructor(e) {
570
570
  Object.defineProperty(this, B, { value: e });
571
571
  }
@@ -576,7 +576,7 @@ class Et {
576
576
  }
577
577
  /** A plain JavaScript representation of this node. */
578
578
  toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
579
- if (!Oe(e))
579
+ if (!Ce(e))
580
580
  throw new TypeError("A document argument is required");
581
581
  const o = {
582
582
  anchors: /* @__PURE__ */ new Map(),
@@ -589,12 +589,12 @@ class Et {
589
589
  if (typeof i == "function")
590
590
  for (const { count: l, res: c } of o.anchors.values())
591
591
  i(c, l);
592
- return typeof r == "function" ? ae(r, { "": a }, "", a) : a;
592
+ return typeof r == "function" ? le(r, { "": a }, "", a) : a;
593
593
  }
594
594
  }
595
- class Nt extends Et {
595
+ class $t extends Nt {
596
596
  constructor(e) {
597
- super(St), this.source = e, Object.defineProperty(this, "tag", {
597
+ super(Et), this.source = e, Object.defineProperty(this, "tag", {
598
598
  set() {
599
599
  throw new Error("Alias nodes cannot have tags");
600
600
  }
@@ -608,9 +608,9 @@ class Nt extends Et {
608
608
  if ((t == null ? void 0 : t.maxAliasCount) === 0)
609
609
  throw new ReferenceError("Alias resolution is disabled");
610
610
  let n;
611
- t != null && t.aliasResolveCache ? n = t.aliasResolveCache : (n = [], me(e, {
611
+ t != null && t.aliasResolveCache ? n = t.aliasResolveCache : (n = [], be(e, {
612
612
  Node: (r, o) => {
613
- (pe(o) || gs(o)) && n.push(o);
613
+ (ye(o) || ws(o)) && n.push(o);
614
614
  }
615
615
  }), t && (t.aliasResolveCache = n));
616
616
  let i;
@@ -634,7 +634,7 @@ class Nt extends Et {
634
634
  const l = "This should not happen: Alias anchor was not resolved?";
635
635
  throw new ReferenceError(l);
636
636
  }
637
- if (r >= 0 && (a.count += 1, a.aliasCount === 0 && (a.aliasCount = Fe(i, o, n)), a.count * a.aliasCount > r)) {
637
+ if (r >= 0 && (a.count += 1, a.aliasCount === 0 && (a.aliasCount = Ye(i, o, n)), a.count * a.aliasCount > r)) {
638
638
  const l = "Excessive alias count indicates a resource exhaustion attack";
639
639
  throw new ReferenceError(l);
640
640
  }
@@ -643,7 +643,7 @@ class Nt extends Et {
643
643
  toString(e, t, n) {
644
644
  const i = `*${this.source}`;
645
645
  if (e) {
646
- if (ys(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
646
+ if (ks(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
647
647
  const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
648
648
  throw new Error(r);
649
649
  }
@@ -653,25 +653,25 @@ class Nt extends Et {
653
653
  return i;
654
654
  }
655
655
  }
656
- function Fe(s, e, t) {
657
- if (pe(e)) {
656
+ function Ye(s, e, t) {
657
+ if (ye(e)) {
658
658
  const n = e.resolve(s), i = t && n && t.get(n);
659
659
  return i ? i.count * i.aliasCount : 0;
660
660
  } else if (L(e)) {
661
661
  let n = 0;
662
662
  for (const i of e.items) {
663
- const r = Fe(s, i, t);
663
+ const r = Ye(s, i, t);
664
664
  r > n && (n = r);
665
665
  }
666
666
  return n;
667
667
  } else if (_(e)) {
668
- const n = Fe(s, e.key, t), i = Fe(s, e.value, t);
668
+ const n = Ye(s, e.key, t), i = Ye(s, e.value, t);
669
669
  return Math.max(n, i);
670
670
  }
671
671
  return 1;
672
672
  }
673
- const ks = (s) => !s || typeof s != "function" && typeof s != "object";
674
- class I extends Et {
673
+ const Ns = (s) => !s || typeof s != "function" && typeof s != "object";
674
+ class $ extends Nt {
675
675
  constructor(e) {
676
676
  super(H), this.value = e;
677
677
  }
@@ -682,13 +682,13 @@ class I extends Et {
682
682
  return String(this.value);
683
683
  }
684
684
  }
685
- I.BLOCK_FOLDED = "BLOCK_FOLDED";
686
- I.BLOCK_LITERAL = "BLOCK_LITERAL";
687
- I.PLAIN = "PLAIN";
688
- I.QUOTE_DOUBLE = "QUOTE_DOUBLE";
689
- I.QUOTE_SINGLE = "QUOTE_SINGLE";
690
- const Rn = "tag:yaml.org,2002:";
691
- function Mn(s, e, t) {
685
+ $.BLOCK_FOLDED = "BLOCK_FOLDED";
686
+ $.BLOCK_LITERAL = "BLOCK_LITERAL";
687
+ $.PLAIN = "PLAIN";
688
+ $.QUOTE_DOUBLE = "QUOTE_DOUBLE";
689
+ $.QUOTE_SINGLE = "QUOTE_SINGLE";
690
+ const Un = "tag:yaml.org,2002:";
691
+ function Fn(s, e, t) {
692
692
  if (e) {
693
693
  const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
694
694
  if (!i)
@@ -700,9 +700,9 @@ function Mn(s, e, t) {
700
700
  return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
701
701
  });
702
702
  }
703
- function $e(s, e, t) {
703
+ function Ae(s, e, t) {
704
704
  var f, d, p;
705
- if (Oe(s) && (s = s.contents), C(s))
705
+ if (Ce(s) && (s = s.contents), C(s))
706
706
  return s;
707
707
  if (_(s)) {
708
708
  const g = (d = (f = t.schema[Z]).createNode) == null ? void 0 : d.call(f, t.schema, null, t);
@@ -713,23 +713,23 @@ function $e(s, e, t) {
713
713
  let l;
714
714
  if (n && s && typeof s == "object") {
715
715
  if (l = a.get(s), l)
716
- return l.anchor ?? (l.anchor = i(s)), new Nt(l.anchor);
716
+ return l.anchor ?? (l.anchor = i(s)), new $t(l.anchor);
717
717
  l = { anchor: null, node: null }, a.set(s, l);
718
718
  }
719
- e != null && e.startsWith("!!") && (e = Rn + e.slice(2));
720
- let c = Mn(s, e, o.tags);
719
+ e != null && e.startsWith("!!") && (e = Un + e.slice(2));
720
+ let c = Fn(s, e, o.tags);
721
721
  if (!c) {
722
722
  if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
723
- const g = new I(s);
723
+ const g = new $(s);
724
724
  return l && (l.node = g), g;
725
725
  }
726
- c = s instanceof Map ? o[Z] : Symbol.iterator in Object(s) ? o[he] : o[Z];
726
+ c = s instanceof Map ? o[Z] : Symbol.iterator in Object(s) ? o[ge] : o[Z];
727
727
  }
728
728
  r && (r(c), delete t.onTagObj);
729
- const u = c != null && c.createNode ? c.createNode(t.schema, s, t) : typeof ((p = c == null ? void 0 : c.nodeClass) == null ? void 0 : p.from) == "function" ? c.nodeClass.from(t.schema, s, t) : new I(s);
729
+ const u = c != null && c.createNode ? c.createNode(t.schema, s, t) : typeof ((p = c == null ? void 0 : c.nodeClass) == null ? void 0 : p.from) == "function" ? c.nodeClass.from(t.schema, s, t) : new $(s);
730
730
  return e ? u.tag = e : c.default || (u.tag = c.tag), l && (l.node = u), u;
731
731
  }
732
- function Ge(s, e, t) {
732
+ function Je(s, e, t) {
733
733
  let n = t;
734
734
  for (let i = e.length - 1; i >= 0; --i) {
735
735
  const r = e[i];
@@ -739,7 +739,7 @@ function Ge(s, e, t) {
739
739
  } else
740
740
  n = /* @__PURE__ */ new Map([[r, n]]);
741
741
  }
742
- return $e(n, void 0, {
742
+ return Ae(n, void 0, {
743
743
  aliasDuplicateObjects: !1,
744
744
  keepUndefined: !1,
745
745
  onAnchor: () => {
@@ -749,8 +749,8 @@ function Ge(s, e, t) {
749
749
  sourceObjects: /* @__PURE__ */ new Map()
750
750
  });
751
751
  }
752
- const ke = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
753
- class Ss extends Et {
752
+ const Ne = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
753
+ class $s extends Nt {
754
754
  constructor(e, t) {
755
755
  super(e), Object.defineProperty(this, "schema", {
756
756
  value: t,
@@ -774,14 +774,14 @@ class Ss extends Et {
774
774
  * that already exists in the map.
775
775
  */
776
776
  addIn(e, t) {
777
- if (ke(e))
777
+ if (Ne(e))
778
778
  this.add(t);
779
779
  else {
780
780
  const [n, ...i] = e, r = this.get(n, !0);
781
781
  if (L(r))
782
782
  r.addIn(i, t);
783
783
  else if (r === void 0 && this.schema)
784
- this.set(n, Ge(this.schema, i, t));
784
+ this.set(n, Je(this.schema, i, t));
785
785
  else
786
786
  throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
787
787
  }
@@ -839,21 +839,21 @@ class Ss extends Et {
839
839
  if (L(r))
840
840
  r.setIn(i, t);
841
841
  else if (r === void 0 && this.schema)
842
- this.set(n, Ge(this.schema, i, t));
842
+ this.set(n, Je(this.schema, i, t));
843
843
  else
844
844
  throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
845
845
  }
846
846
  }
847
847
  }
848
- const Bn = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
848
+ const Yn = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
849
849
  function W(s, e) {
850
850
  return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
851
851
  }
852
852
  const te = (s, e, t) => s.endsWith(`
853
853
  `) ? W(t, e) : t.includes(`
854
854
  `) ? `
855
- ` + W(t, e) : (s.endsWith(" ") ? "" : " ") + t, Es = "flow", pt = "block", Ue = "quoted";
856
- function ze(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: a } = {}) {
855
+ ` + W(t, e) : (s.endsWith(" ") ? "" : " ") + t, Is = "flow", gt = "block", Ve = "quoted";
856
+ function Xe(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: a } = {}) {
857
857
  if (!i || i < 0)
858
858
  return s;
859
859
  i < r && (r = 0);
@@ -864,9 +864,9 @@ function ze(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
864
864
  let f = i - e.length;
865
865
  typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
866
866
  let d, p, g = !1, h = -1, m = -1, y = -1;
867
- t === pt && (h = Ht(s, h, e.length), h !== -1 && (f = h + l));
867
+ t === gt && (h = Qt(s, h, e.length), h !== -1 && (f = h + l));
868
868
  for (let E; E = s[h += 1]; ) {
869
- if (t === Ue && E === "\\") {
869
+ if (t === Ve && E === "\\") {
870
870
  switch (m = h, s[h + 1]) {
871
871
  case "x":
872
872
  h += 3;
@@ -884,7 +884,7 @@ function ze(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
884
884
  }
885
885
  if (E === `
886
886
  `)
887
- t === pt && (h = Ht(s, h, e.length)), f = h + e.length + l, d = void 0;
887
+ t === gt && (h = Qt(s, h, e.length)), f = h + e.length + l, d = void 0;
888
888
  else {
889
889
  if (E === " " && p && p !== " " && p !== `
890
890
  ` && p !== " ") {
@@ -895,7 +895,7 @@ function ze(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
895
895
  if (h >= f)
896
896
  if (d)
897
897
  c.push(d), f = d + l, d = void 0;
898
- else if (t === Ue) {
898
+ else if (t === Ve) {
899
899
  for (; p === " " || p === " "; )
900
900
  p = E, E = s[h += 1], g = !0;
901
901
  const S = h > y + 1 ? h - 2 : m - 1;
@@ -914,12 +914,12 @@ function ze(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
914
914
  for (let E = 0; E < c.length; ++E) {
915
915
  const S = c[E], N = c[E + 1] || s.length;
916
916
  S === 0 ? w = `
917
- ${e}${s.slice(0, N)}` : (t === Ue && u[S] && (w += `${s[S]}\\`), w += `
917
+ ${e}${s.slice(0, N)}` : (t === Ve && u[S] && (w += `${s[S]}\\`), w += `
918
918
  ${e}${s.slice(S + 1, N)}`);
919
919
  }
920
920
  return w;
921
921
  }
922
- function Ht(s, e, t) {
922
+ function Qt(s, e, t) {
923
923
  let n = e, i = e + 1, r = s[i];
924
924
  for (; r === " " || r === " "; )
925
925
  if (e < i + t)
@@ -933,12 +933,12 @@ function Ht(s, e, t) {
933
933
  }
934
934
  return n;
935
935
  }
936
- const Xe = (s, e) => ({
936
+ const Ze = (s, e) => ({
937
937
  indentAtStart: e ? s.indent.length : s.indentAtStart,
938
938
  lineWidth: s.options.lineWidth,
939
939
  minContentWidth: s.options.minContentWidth
940
- }), Ze = (s) => /^(%|---|\.\.\.)/m.test(s);
941
- function Kn(s, e, t) {
940
+ }), xe = (s) => /^(%|---|\.\.\.)/m.test(s);
941
+ function Vn(s, e, t) {
942
942
  if (!e || e < 0)
943
943
  return !1;
944
944
  const n = e - t, i = s.length;
@@ -954,11 +954,11 @@ function Kn(s, e, t) {
954
954
  }
955
955
  return !0;
956
956
  }
957
- function Ne(s, e) {
957
+ function Te(s, e) {
958
958
  const t = JSON.stringify(s);
959
959
  if (e.options.doubleQuotedAsJSON)
960
960
  return t;
961
- const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (Ze(s) ? " " : "");
961
+ const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (xe(s) ? " " : "");
962
962
  let o = "", a = 0;
963
963
  for (let l = 0, c = t[l]; c; c = t[++l])
964
964
  if (c === " " && t[l + 1] === "\\" && t[l + 2] === "n" && (o += t.slice(a, l) + "\\ ", l += 1, a = l, c = "\\"), c === "\\")
@@ -1013,41 +1013,41 @@ function Ne(s, e) {
1013
1013
  default:
1014
1014
  l += 1;
1015
1015
  }
1016
- return o = a ? o + t.slice(a) : t, n ? o : ze(o, r, Ue, Xe(e, !1));
1016
+ return o = a ? o + t.slice(a) : t, n ? o : Xe(o, r, Ve, Ze(e, !1));
1017
1017
  }
1018
- function mt(s, e) {
1018
+ function yt(s, e) {
1019
1019
  if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
1020
1020
  `) || /[ \t]\n|\n[ \t]/.test(s))
1021
- return Ne(s, e);
1022
- const t = e.indent || (Ze(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
1021
+ return Te(s, e);
1022
+ const t = e.indent || (xe(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
1023
1023
  ${t}`) + "'";
1024
- return e.implicitKey ? n : ze(n, t, Es, Xe(e, !1));
1024
+ return e.implicitKey ? n : Xe(n, t, Is, Ze(e, !1));
1025
1025
  }
1026
- function le(s, e) {
1026
+ function ce(s, e) {
1027
1027
  const { singleQuote: t } = e.options;
1028
1028
  let n;
1029
1029
  if (t === !1)
1030
- n = Ne;
1030
+ n = Te;
1031
1031
  else {
1032
1032
  const i = s.includes('"'), r = s.includes("'");
1033
- i && !r ? n = mt : r && !i ? n = Ne : n = t ? mt : Ne;
1033
+ i && !r ? n = yt : r && !i ? n = Te : n = t ? yt : Te;
1034
1034
  }
1035
1035
  return n(s, e);
1036
1036
  }
1037
- let gt;
1037
+ let bt;
1038
1038
  try {
1039
- gt = new RegExp(`(^|(?<!
1039
+ bt = new RegExp(`(^|(?<!
1040
1040
  ))
1041
1041
  +(?!
1042
1042
  |$)`, "g");
1043
1043
  } catch {
1044
- gt = /\n+(?!\n|$)/g;
1044
+ bt = /\n+(?!\n|$)/g;
1045
1045
  }
1046
- function Ye({ comment: s, type: e, value: t }, n, i, r) {
1046
+ function Ge({ comment: s, type: e, value: t }, n, i, r) {
1047
1047
  const { blockQuote: o, commentString: a, lineWidth: l } = n.options;
1048
1048
  if (!o || /\n[\t ]+$/.test(t))
1049
- return le(t, n);
1050
- const c = n.indent || (n.forceBlockIndent || Ze(t) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || e === I.BLOCK_FOLDED ? !1 : e === I.BLOCK_LITERAL ? !0 : !Kn(t, l, c.length);
1049
+ return ce(t, n);
1050
+ const c = n.indent || (n.forceBlockIndent || xe(t) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || e === $.BLOCK_FOLDED ? !1 : e === $.BLOCK_LITERAL ? !0 : !Vn(t, l, c.length);
1051
1051
  if (!t)
1052
1052
  return u ? `|
1053
1053
  ` : `>
@@ -1063,7 +1063,7 @@ function Ye({ comment: s, type: e, value: t }, n, i, r) {
1063
1063
  const g = p.indexOf(`
1064
1064
  `);
1065
1065
  g === -1 ? f = "-" : t === p || g !== p.length - 1 ? (f = "+", r && r()) : f = "", p && (t = t.slice(0, -p.length), p[p.length - 1] === `
1066
- ` && (p = p.slice(0, -1)), p = p.replace(gt, `$&${c}`));
1066
+ ` && (p = p.slice(0, -1)), p = p.replace(bt, `$&${c}`));
1067
1067
  let h = !1, m, y = -1;
1068
1068
  for (m = 0; m < t.length; ++m) {
1069
1069
  const N = t[m];
@@ -1082,11 +1082,11 @@ function Ye({ comment: s, type: e, value: t }, n, i, r) {
1082
1082
  const N = t.replace(/\n+/g, `
1083
1083
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
1084
1084
  let T = !1;
1085
- const $ = Xe(n, !0);
1086
- o !== "folded" && e !== I.BLOCK_FOLDED && ($.onOverflow = () => {
1085
+ const I = Ze(n, !0);
1086
+ o !== "folded" && e !== $.BLOCK_FOLDED && (I.onOverflow = () => {
1087
1087
  T = !0;
1088
1088
  });
1089
- const k = ze(`${w}${N}${p}`, c, pt, $);
1089
+ const k = Xe(`${w}${N}${p}`, c, gt, I);
1090
1090
  if (!T)
1091
1091
  return `>${S}
1092
1092
  ${c}${k}`;
@@ -1094,22 +1094,22 @@ ${c}${k}`;
1094
1094
  return t = t.replace(/\n+/g, `$&${c}`), `|${S}
1095
1095
  ${c}${w}${t}${p}`;
1096
1096
  }
1097
- function qn(s, e, t, n) {
1097
+ function Gn(s, e, t, n) {
1098
1098
  const { type: i, value: r } = s, { actualString: o, implicitKey: a, indent: l, indentStep: c, inFlow: u } = e;
1099
1099
  if (a && r.includes(`
1100
1100
  `) || u && /[[\]{},]/.test(r))
1101
- return le(r, e);
1101
+ return ce(r, e);
1102
1102
  if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
1103
1103
  return a || u || !r.includes(`
1104
- `) ? le(r, e) : Ye(s, e, t, n);
1105
- if (!a && !u && i !== I.PLAIN && r.includes(`
1104
+ `) ? ce(r, e) : Ge(s, e, t, n);
1105
+ if (!a && !u && i !== $.PLAIN && r.includes(`
1106
1106
  `))
1107
- return Ye(s, e, t, n);
1108
- if (Ze(r)) {
1107
+ return Ge(s, e, t, n);
1108
+ if (xe(r)) {
1109
1109
  if (l === "")
1110
- return e.forceBlockIndent = !0, Ye(s, e, t, n);
1110
+ return e.forceBlockIndent = !0, Ge(s, e, t, n);
1111
1111
  if (a && l === c)
1112
- return le(r, e);
1112
+ return ce(r, e);
1113
1113
  }
1114
1114
  const f = r.replace(/\n+/g, `$&
1115
1115
  ${l}`);
@@ -1119,25 +1119,25 @@ ${l}`);
1119
1119
  return h.default && h.tag !== "tag:yaml.org,2002:str" && ((m = h.test) == null ? void 0 : m.test(f));
1120
1120
  }, { compat: p, tags: g } = e.doc.schema;
1121
1121
  if (g.some(d) || p != null && p.some(d))
1122
- return le(r, e);
1122
+ return ce(r, e);
1123
1123
  }
1124
- return a ? f : ze(f, l, Es, Xe(e, !1));
1124
+ return a ? f : Xe(f, l, Is, Ze(e, !1));
1125
1125
  }
1126
1126
  function It(s, e, t, n) {
1127
1127
  const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
1128
1128
  let { type: a } = s;
1129
- a !== I.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (a = I.QUOTE_DOUBLE);
1129
+ a !== $.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (a = $.QUOTE_DOUBLE);
1130
1130
  const l = (u) => {
1131
1131
  switch (u) {
1132
- case I.BLOCK_FOLDED:
1133
- case I.BLOCK_LITERAL:
1134
- return i || r ? le(o.value, e) : Ye(o, e, t, n);
1135
- case I.QUOTE_DOUBLE:
1136
- return Ne(o.value, e);
1137
- case I.QUOTE_SINGLE:
1138
- return mt(o.value, e);
1139
- case I.PLAIN:
1140
- return qn(o, e, t, n);
1132
+ case $.BLOCK_FOLDED:
1133
+ case $.BLOCK_LITERAL:
1134
+ return i || r ? ce(o.value, e) : Ge(o, e, t, n);
1135
+ case $.QUOTE_DOUBLE:
1136
+ return Te(o.value, e);
1137
+ case $.QUOTE_SINGLE:
1138
+ return yt(o.value, e);
1139
+ case $.PLAIN:
1140
+ return Gn(o, e, t, n);
1141
1141
  default:
1142
1142
  return null;
1143
1143
  }
@@ -1150,10 +1150,10 @@ function It(s, e, t, n) {
1150
1150
  }
1151
1151
  return c;
1152
1152
  }
1153
- function Ns(s, e) {
1153
+ function Ts(s, e) {
1154
1154
  const t = Object.assign({
1155
1155
  blockQuote: !0,
1156
- commentString: Bn,
1156
+ commentString: Yn,
1157
1157
  defaultKeyType: null,
1158
1158
  defaultStringType: "PLAIN",
1159
1159
  directives: null,
@@ -1192,7 +1192,7 @@ function Ns(s, e) {
1192
1192
  options: t
1193
1193
  };
1194
1194
  }
1195
- function Fn(s, e) {
1195
+ function Hn(s, e) {
1196
1196
  var i;
1197
1197
  if (e.tag) {
1198
1198
  const r = s.filter((o) => o.tag === e.tag);
@@ -1219,19 +1219,19 @@ function Fn(s, e) {
1219
1219
  }
1220
1220
  return t;
1221
1221
  }
1222
- function Un(s, e, { anchors: t, doc: n }) {
1222
+ function Jn(s, e, { anchors: t, doc: n }) {
1223
1223
  if (!n.directives)
1224
1224
  return "";
1225
1225
  const i = [], r = (O(s) || L(s)) && s.anchor;
1226
- r && ys(r) && (t.add(r), i.push(`&${r}`));
1226
+ r && ks(r) && (t.add(r), i.push(`&${r}`));
1227
1227
  const o = s.tag ?? (e.default ? null : e.tag);
1228
1228
  return o && i.push(n.directives.tagString(o)), i.join(" ");
1229
1229
  }
1230
- function ue(s, e, t, n) {
1230
+ function he(s, e, t, n) {
1231
1231
  var l;
1232
1232
  if (_(s))
1233
1233
  return s.toString(e, t, n);
1234
- if (pe(s)) {
1234
+ if (ye(s)) {
1235
1235
  if (e.doc.directives)
1236
1236
  return s.toString(e);
1237
1237
  if ((l = e.resolvedAliases) != null && l.has(s))
@@ -1240,31 +1240,31 @@ function ue(s, e, t, n) {
1240
1240
  }
1241
1241
  let i;
1242
1242
  const r = C(s) ? s : e.doc.createNode(s, { onTagObj: (c) => i = c });
1243
- i ?? (i = Fn(e.doc.schema.tags, r));
1244
- const o = Un(r, i, e);
1243
+ i ?? (i = Hn(e.doc.schema.tags, r));
1244
+ const o = Jn(r, i, e);
1245
1245
  o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1246
1246
  const a = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : O(r) ? It(r, e, t, n) : r.toString(e, t, n);
1247
1247
  return o ? O(r) || a[0] === "{" || a[0] === "[" ? `${o} ${a}` : `${o}
1248
1248
  ${e.indent}${a}` : a;
1249
1249
  }
1250
- function Yn({ key: s, value: e }, t, n, i) {
1250
+ function Wn({ key: s, value: e }, t, n, i) {
1251
1251
  const { allNullValues: r, doc: o, indent: a, indentStep: l, options: { commentString: c, indentSeq: u, simpleKeys: f } } = t;
1252
1252
  let d = C(s) && s.comment || null;
1253
1253
  if (f) {
1254
1254
  if (d)
1255
1255
  throw new Error("With simple keys, key nodes cannot have comments");
1256
1256
  if (L(s) || !C(s) && typeof s == "object") {
1257
- const $ = "With simple keys, collection cannot be used as a key value";
1258
- throw new Error($);
1257
+ const I = "With simple keys, collection cannot be used as a key value";
1258
+ throw new Error(I);
1259
1259
  }
1260
1260
  }
1261
- let p = !f && (!s || d && e == null && !t.inFlow || L(s) || (O(s) ? s.type === I.BLOCK_FOLDED || s.type === I.BLOCK_LITERAL : typeof s == "object"));
1261
+ let p = !f && (!s || d && e == null && !t.inFlow || L(s) || (O(s) ? s.type === $.BLOCK_FOLDED || s.type === $.BLOCK_LITERAL : typeof s == "object"));
1262
1262
  t = Object.assign({}, t, {
1263
1263
  allNullValues: !1,
1264
1264
  implicitKey: !p && (f || !r),
1265
1265
  indent: a + l
1266
1266
  });
1267
- let g = !1, h = !1, m = ue(s, t, () => g = !0, () => h = !0);
1267
+ let g = !1, h = !1, m = he(s, t, () => g = !0, () => h = !0);
1268
1268
  if (!p && !t.inFlow && m.length > 1024) {
1269
1269
  if (f)
1270
1270
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
@@ -1278,16 +1278,16 @@ function Yn({ key: s, value: e }, t, n, i) {
1278
1278
  g && (d = null), p ? (d && (m += te(m, t.indent, c(d))), m = `? ${m}
1279
1279
  ${a}:`) : (m = `${m}:`, d && (m += te(m, t.indent, c(d))));
1280
1280
  let y, w, E;
1281
- C(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 && !d && O(e) && (t.indentAtStart = m.length + 1), h = !1, !u && l.length >= 2 && !t.inFlow && !p && Le(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1281
+ C(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 && !d && O(e) && (t.indentAtStart = m.length + 1), h = !1, !u && l.length >= 2 && !t.inFlow && !p && Pe(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1282
1282
  let S = !1;
1283
- const N = ue(e, t, () => S = !0, () => h = !0);
1283
+ const N = he(e, t, () => S = !0, () => h = !0);
1284
1284
  let T = " ";
1285
1285
  if (d || y || w) {
1286
1286
  if (T = y ? `
1287
1287
  ` : "", w) {
1288
- const $ = c(w);
1288
+ const I = c(w);
1289
1289
  T += `
1290
- ${W($, t.indent)}`;
1290
+ ${W(I, t.indent)}`;
1291
1291
  }
1292
1292
  N === "" && !t.inFlow ? T === `
1293
1293
  ` && E && (T = `
@@ -1295,13 +1295,13 @@ ${W($, t.indent)}`;
1295
1295
  `) : T += `
1296
1296
  ${t.indent}`;
1297
1297
  } else if (!p && L(e)) {
1298
- const $ = N[0], k = N.indexOf(`
1298
+ const I = N[0], k = N.indexOf(`
1299
1299
  `), A = k !== -1, P = t.inFlow ?? e.flow ?? e.items.length === 0;
1300
1300
  if (A || !P) {
1301
1301
  let J = !1;
1302
- if (A && ($ === "&" || $ === "!")) {
1303
- let K = N.indexOf(" ");
1304
- $ === "&" && K !== -1 && K < k && N[K + 1] === "!" && (K = N.indexOf(" ", K + 1)), (K === -1 || k < K) && (J = !0);
1302
+ if (A && (I === "&" || I === "!")) {
1303
+ let q = N.indexOf(" ");
1304
+ I === "&" && q !== -1 && q < k && N[q + 1] === "!" && (q = N.indexOf(" ", q + 1)), (q === -1 || k < q) && (J = !0);
1305
1305
  }
1306
1306
  J || (T = `
1307
1307
  ${t.indent}`);
@@ -1310,33 +1310,33 @@ ${t.indent}`);
1310
1310
  `) && (T = "");
1311
1311
  return m += T + N, t.inFlow ? S && n && n() : E && !S ? m += te(m, t.indent, c(E)) : h && i && i(), m;
1312
1312
  }
1313
- function Is(s, e) {
1313
+ function As(s, e) {
1314
1314
  (s === "debug" || s === "warn") && console.warn(e);
1315
1315
  }
1316
- const je = "<<", Q = {
1317
- identify: (s) => s === je || typeof s == "symbol" && s.description === je,
1316
+ const Me = "<<", Q = {
1317
+ identify: (s) => s === Me || typeof s == "symbol" && s.description === Me,
1318
1318
  default: "key",
1319
1319
  tag: "tag:yaml.org,2002:merge",
1320
1320
  test: /^<<$/,
1321
- resolve: () => Object.assign(new I(Symbol(je)), {
1322
- addToJSMap: $s
1321
+ resolve: () => Object.assign(new $(Symbol(Me)), {
1322
+ addToJSMap: Os
1323
1323
  }),
1324
- stringify: () => je
1325
- }, Vn = (s, e) => (Q.identify(e) || O(e) && (!e.type || e.type === I.PLAIN) && Q.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === Q.tag && t.default));
1326
- function $s(s, e, t) {
1327
- const n = Ts(s, t);
1328
- if (Le(n))
1324
+ stringify: () => Me
1325
+ }, Qn = (s, e) => (Q.identify(e) || O(e) && (!e.type || e.type === $.PLAIN) && Q.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === Q.tag && t.default));
1326
+ function Os(s, e, t) {
1327
+ const n = vs(s, t);
1328
+ if (Pe(n))
1329
1329
  for (const i of n.items)
1330
- ot(s, e, i);
1330
+ lt(s, e, i);
1331
1331
  else if (Array.isArray(n))
1332
1332
  for (const i of n)
1333
- ot(s, e, i);
1333
+ lt(s, e, i);
1334
1334
  else
1335
- ot(s, e, n);
1335
+ lt(s, e, n);
1336
1336
  }
1337
- function ot(s, e, t) {
1338
- const n = Ts(s, t);
1339
- if (!ve(n))
1337
+ function lt(s, e, t) {
1338
+ const n = vs(s, t);
1339
+ if (!_e(n))
1340
1340
  throw new Error("Merge sources must be maps or map aliases");
1341
1341
  const i = n.toJSON(null, s, Map);
1342
1342
  for (const [r, o] of i)
@@ -1348,14 +1348,14 @@ function ot(s, e, t) {
1348
1348
  });
1349
1349
  return e;
1350
1350
  }
1351
- function Ts(s, e) {
1352
- return s && pe(e) ? e.resolve(s.doc, s) : e;
1351
+ function vs(s, e) {
1352
+ return s && ye(e) ? e.resolve(s.doc, s) : e;
1353
1353
  }
1354
- function As(s, e, { key: t, value: n }) {
1354
+ function Ls(s, e, { key: t, value: n }) {
1355
1355
  if (C(t) && t.addToJSMap)
1356
1356
  t.addToJSMap(s, e, n);
1357
- else if (Vn(s, t))
1358
- $s(s, e, n);
1357
+ else if (Qn(s, t))
1358
+ Os(s, e, n);
1359
1359
  else {
1360
1360
  const i = M(t, "", s);
1361
1361
  if (e instanceof Map)
@@ -1363,7 +1363,7 @@ function As(s, e, { key: t, value: n }) {
1363
1363
  else if (e instanceof Set)
1364
1364
  e.add(i);
1365
1365
  else {
1366
- const r = Gn(t, i, s), o = M(n, r, s);
1366
+ const r = zn(t, i, s), o = M(n, r, s);
1367
1367
  r in e ? Object.defineProperty(e, r, {
1368
1368
  value: o,
1369
1369
  writable: !0,
@@ -1374,13 +1374,13 @@ function As(s, e, { key: t, value: n }) {
1374
1374
  }
1375
1375
  return e;
1376
1376
  }
1377
- function Gn(s, e, t) {
1377
+ function zn(s, e, t) {
1378
1378
  if (e === null)
1379
1379
  return "";
1380
1380
  if (typeof e != "object")
1381
1381
  return String(e);
1382
1382
  if (C(s) && (t != null && t.doc)) {
1383
- const n = Ns(t.doc, {});
1383
+ const n = Ts(t.doc, {});
1384
1384
  n.anchors = /* @__PURE__ */ new Set();
1385
1385
  for (const r of t.anchors.keys())
1386
1386
  n.anchors.add(r.anchor);
@@ -1388,19 +1388,19 @@ function Gn(s, e, t) {
1388
1388
  const i = s.toString(n);
1389
1389
  if (!t.mapKeyWarned) {
1390
1390
  let r = JSON.stringify(i);
1391
- r.length > 40 && (r = r.substring(0, 36) + '..."'), Is(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;
1391
+ r.length > 40 && (r = r.substring(0, 36) + '..."'), As(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;
1392
1392
  }
1393
1393
  return i;
1394
1394
  }
1395
1395
  return JSON.stringify(e);
1396
1396
  }
1397
- function $t(s, e, t) {
1398
- const n = $e(s, void 0, t), i = $e(e, void 0, t);
1397
+ function Tt(s, e, t) {
1398
+ const n = Ae(s, void 0, t), i = Ae(e, void 0, t);
1399
1399
  return new j(n, i);
1400
1400
  }
1401
1401
  class j {
1402
1402
  constructor(e, t = null) {
1403
- Object.defineProperty(this, B, { value: ms }), this.key = e, this.value = t;
1403
+ Object.defineProperty(this, B, { value: bs }), this.key = e, this.value = t;
1404
1404
  }
1405
1405
  clone(e) {
1406
1406
  let { key: t, value: n } = this;
@@ -1408,16 +1408,16 @@ class j {
1408
1408
  }
1409
1409
  toJSON(e, t) {
1410
1410
  const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1411
- return As(t, n, this);
1411
+ return Ls(t, n, this);
1412
1412
  }
1413
1413
  toString(e, t, n) {
1414
- return e != null && e.doc ? Yn(this, e, t, n) : JSON.stringify(this);
1414
+ return e != null && e.doc ? Wn(this, e, t, n) : JSON.stringify(this);
1415
1415
  }
1416
1416
  }
1417
- function Os(s, e, t) {
1418
- return (e.inFlow ?? s.flow ? Jn : Hn)(s, e, t);
1417
+ function Cs(s, e, t) {
1418
+ return (e.inFlow ?? s.flow ? Zn : Xn)(s, e, t);
1419
1419
  }
1420
- function Hn({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: a }) {
1420
+ function Xn({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: a }) {
1421
1421
  const { indent: l, options: { commentString: c } } = t, u = Object.assign({}, t, { indent: r, type: null });
1422
1422
  let f = !1;
1423
1423
  const d = [];
@@ -1425,13 +1425,13 @@ function Hn({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, ite
1425
1425
  const h = e[g];
1426
1426
  let m = null;
1427
1427
  if (C(h))
1428
- !f && h.spaceBefore && d.push(""), He(t, d, h.commentBefore, f), h.comment && (m = h.comment);
1428
+ !f && h.spaceBefore && d.push(""), We(t, d, h.commentBefore, f), h.comment && (m = h.comment);
1429
1429
  else if (_(h)) {
1430
1430
  const w = C(h.key) ? h.key : null;
1431
- w && (!f && w.spaceBefore && d.push(""), He(t, d, w.commentBefore, f));
1431
+ w && (!f && w.spaceBefore && d.push(""), We(t, d, w.commentBefore, f));
1432
1432
  }
1433
1433
  f = !1;
1434
- let y = ue(h, u, () => m = null, () => f = !0);
1434
+ let y = he(h, u, () => m = null, () => f = !0);
1435
1435
  m && (y += te(y, r, c(m))), f && m && (f = !1), d.push(n + y);
1436
1436
  }
1437
1437
  let p;
@@ -1449,7 +1449,7 @@ ${l}${h}` : `
1449
1449
  return s ? (p += `
1450
1450
  ` + W(c(s), l), a && a()) : f && o && o(), p;
1451
1451
  }
1452
- function Jn({ items: s }, e, { flowChars: t, itemIndent: n }) {
1452
+ function Zn({ items: s }, e, { flowChars: t, itemIndent: n }) {
1453
1453
  const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: a } } = e;
1454
1454
  n += r;
1455
1455
  const l = Object.assign({}, e, {
@@ -1463,15 +1463,15 @@ function Jn({ items: s }, e, { flowChars: t, itemIndent: n }) {
1463
1463
  const h = s[g];
1464
1464
  let m = null;
1465
1465
  if (C(h))
1466
- h.spaceBefore && f.push(""), He(e, f, h.commentBefore, !1), h.comment && (m = h.comment);
1466
+ h.spaceBefore && f.push(""), We(e, f, h.commentBefore, !1), h.comment && (m = h.comment);
1467
1467
  else if (_(h)) {
1468
1468
  const w = C(h.key) ? h.key : null;
1469
- w && (w.spaceBefore && f.push(""), He(e, f, w.commentBefore, !1), w.comment && (c = !0));
1469
+ w && (w.spaceBefore && f.push(""), We(e, f, w.commentBefore, !1), w.comment && (c = !0));
1470
1470
  const E = C(h.value) ? h.value : null;
1471
1471
  E ? (E.comment && (m = E.comment), E.commentBefore && (c = !0)) : h.value == null && (w != null && w.comment) && (m = w.comment);
1472
1472
  }
1473
1473
  m && (c = !0);
1474
- let y = ue(h, l, () => m = null);
1474
+ let y = he(h, l, () => m = null);
1475
1475
  c || (c = f.length > u || y.includes(`
1476
1476
  `)), g < s.length - 1 ? y += "," : e.options.trailingComma && (e.options.lineWidth > 0 && (c || (c = f.reduce((w, E) => w + E.length + 2, 2) + (y.length + 2) > e.options.lineWidth)), c && (y += ",")), m && (y += te(y, n, a(m))), f.push(y), u = f.length;
1477
1477
  }
@@ -1493,7 +1493,7 @@ ${i}${p}`;
1493
1493
  } else
1494
1494
  return `${d}${o}${f.join(" ")}${o}${p}`;
1495
1495
  }
1496
- function He({ indent: s, options: { commentString: e } }, t, n, i) {
1496
+ function We({ indent: s, options: { commentString: e } }, t, n, i) {
1497
1497
  if (n && i && (n = n.replace(/^\n+/, "")), n) {
1498
1498
  const r = W(e(n), s);
1499
1499
  t.push(r.trimStart());
@@ -1505,7 +1505,7 @@ function se(s, e) {
1505
1505
  if (_(n) && (n.key === e || n.key === t || O(n.key) && n.key.value === t))
1506
1506
  return n;
1507
1507
  }
1508
- class R extends Ss {
1508
+ class R extends $s {
1509
1509
  static get tagName() {
1510
1510
  return "tag:yaml.org,2002:map";
1511
1511
  }
@@ -1522,7 +1522,7 @@ class R extends Ss {
1522
1522
  c = r.call(t, l, c);
1523
1523
  else if (Array.isArray(r) && !r.includes(l))
1524
1524
  return;
1525
- (c !== void 0 || i) && o.items.push($t(l, c, n));
1525
+ (c !== void 0 || i) && o.items.push(Tt(l, c, n));
1526
1526
  };
1527
1527
  if (t instanceof Map)
1528
1528
  for (const [l, c] of t)
@@ -1546,7 +1546,7 @@ class R extends Ss {
1546
1546
  if (i) {
1547
1547
  if (!t)
1548
1548
  throw new Error(`Key ${n.key} already set`);
1549
- O(i.value) && ks(n.value) ? i.value.value = n.value : i.value = n.value;
1549
+ O(i.value) && Ns(n.value) ? i.value.value = n.value : i.value = n.value;
1550
1550
  } else if (r) {
1551
1551
  const a = this.items.findIndex((l) => r(n, l) < 0);
1552
1552
  a === -1 ? this.items.push(n) : this.items.splice(a, 0, n);
@@ -1576,7 +1576,7 @@ class R extends Ss {
1576
1576
  const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1577
1577
  t != null && t.onCreate && t.onCreate(i);
1578
1578
  for (const r of this.items)
1579
- As(t, i, r);
1579
+ Ls(t, i, r);
1580
1580
  return i;
1581
1581
  }
1582
1582
  toString(e, t, n) {
@@ -1585,7 +1585,7 @@ class R extends Ss {
1585
1585
  for (const i of this.items)
1586
1586
  if (!_(i))
1587
1587
  throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1588
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Os(this, e, {
1588
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Cs(this, e, {
1589
1589
  blockItemPrefix: "",
1590
1590
  flowChars: { start: "{", end: "}" },
1591
1591
  itemIndent: e.indent || "",
@@ -1594,22 +1594,22 @@ class R extends Ss {
1594
1594
  });
1595
1595
  }
1596
1596
  }
1597
- const ge = {
1597
+ const we = {
1598
1598
  collection: "map",
1599
1599
  default: !0,
1600
1600
  nodeClass: R,
1601
1601
  tag: "tag:yaml.org,2002:map",
1602
1602
  resolve(s, e) {
1603
- return ve(s) || e("Expected a mapping for this tag"), s;
1603
+ return _e(s) || e("Expected a mapping for this tag"), s;
1604
1604
  },
1605
1605
  createNode: (s, e, t) => R.from(s, e, t)
1606
1606
  };
1607
- class ne extends Ss {
1607
+ class ne extends $s {
1608
1608
  static get tagName() {
1609
1609
  return "tag:yaml.org,2002:seq";
1610
1610
  }
1611
1611
  constructor(e) {
1612
- super(he, e), this.items = [];
1612
+ super(ge, e), this.items = [];
1613
1613
  }
1614
1614
  add(e) {
1615
1615
  this.items.push(e);
@@ -1623,11 +1623,11 @@ class ne extends Ss {
1623
1623
  * @returns `true` if the item was found and removed.
1624
1624
  */
1625
1625
  delete(e) {
1626
- const t = Re(e);
1626
+ const t = Be(e);
1627
1627
  return typeof t != "number" ? !1 : this.items.splice(t, 1).length > 0;
1628
1628
  }
1629
1629
  get(e, t) {
1630
- const n = Re(e);
1630
+ const n = Be(e);
1631
1631
  if (typeof n != "number")
1632
1632
  return;
1633
1633
  const i = this.items[n];
@@ -1640,7 +1640,7 @@ class ne extends Ss {
1640
1640
  * It may be wrapped in a `Scalar`.
1641
1641
  */
1642
1642
  has(e) {
1643
- const t = Re(e);
1643
+ const t = Be(e);
1644
1644
  return typeof t == "number" && t < this.items.length;
1645
1645
  }
1646
1646
  /**
@@ -1651,11 +1651,11 @@ class ne extends Ss {
1651
1651
  * It may be wrapped in a `Scalar`.
1652
1652
  */
1653
1653
  set(e, t) {
1654
- const n = Re(e);
1654
+ const n = Be(e);
1655
1655
  if (typeof n != "number")
1656
1656
  throw new Error(`Expected a valid index, not ${e}.`);
1657
1657
  const i = this.items[n];
1658
- O(i) && ks(t) ? i.value = t : this.items[n] = t;
1658
+ O(i) && Ns(t) ? i.value = t : this.items[n] = t;
1659
1659
  }
1660
1660
  toJSON(e, t) {
1661
1661
  const n = [];
@@ -1666,7 +1666,7 @@ class ne extends Ss {
1666
1666
  return n;
1667
1667
  }
1668
1668
  toString(e, t, n) {
1669
- return e ? Os(this, e, {
1669
+ return e ? Cs(this, e, {
1670
1670
  blockItemPrefix: "- ",
1671
1671
  flowChars: { start: "[", end: "]" },
1672
1672
  itemIndent: (e.indent || "") + " ",
@@ -1683,26 +1683,26 @@ class ne extends Ss {
1683
1683
  const l = t instanceof Set ? a : String(o++);
1684
1684
  a = i.call(t, l, a);
1685
1685
  }
1686
- r.items.push($e(a, void 0, n));
1686
+ r.items.push(Ae(a, void 0, n));
1687
1687
  }
1688
1688
  }
1689
1689
  return r;
1690
1690
  }
1691
1691
  }
1692
- function Re(s) {
1692
+ function Be(s) {
1693
1693
  let e = O(s) ? s.value : s;
1694
1694
  return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
1695
1695
  }
1696
- const ye = {
1696
+ const ke = {
1697
1697
  collection: "seq",
1698
1698
  default: !0,
1699
1699
  nodeClass: ne,
1700
1700
  tag: "tag:yaml.org,2002:seq",
1701
1701
  resolve(s, e) {
1702
- return Le(s) || e("Expected a sequence for this tag"), s;
1702
+ return Pe(s) || e("Expected a sequence for this tag"), s;
1703
1703
  },
1704
1704
  createNode: (s, e, t) => ne.from(s, e, t)
1705
- }, xe = {
1705
+ }, et = {
1706
1706
  identify: (s) => typeof s == "string",
1707
1707
  default: !0,
1708
1708
  tag: "tag:yaml.org,2002:str",
@@ -1710,22 +1710,22 @@ const ye = {
1710
1710
  stringify(s, e, t, n) {
1711
1711
  return e = Object.assign({ actualString: !0 }, e), It(s, e, t, n);
1712
1712
  }
1713
- }, et = {
1713
+ }, tt = {
1714
1714
  identify: (s) => s == null,
1715
- createNode: () => new I(null),
1715
+ createNode: () => new $(null),
1716
1716
  default: !0,
1717
1717
  tag: "tag:yaml.org,2002:null",
1718
1718
  test: /^(?:~|[Nn]ull|NULL)?$/,
1719
- resolve: () => new I(null),
1720
- stringify: ({ source: s }, e) => typeof s == "string" && et.test.test(s) ? s : e.options.nullStr
1721
- }, Tt = {
1719
+ resolve: () => new $(null),
1720
+ stringify: ({ source: s }, e) => typeof s == "string" && tt.test.test(s) ? s : e.options.nullStr
1721
+ }, At = {
1722
1722
  identify: (s) => typeof s == "boolean",
1723
1723
  default: !0,
1724
1724
  tag: "tag:yaml.org,2002:bool",
1725
1725
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1726
- resolve: (s) => new I(s[0] === "t" || s[0] === "T"),
1726
+ resolve: (s) => new $(s[0] === "t" || s[0] === "T"),
1727
1727
  stringify({ source: s, value: e }, t) {
1728
- if (s && Tt.test.test(s)) {
1728
+ if (s && At.test.test(s)) {
1729
1729
  const n = s[0] === "t" || s[0] === "T";
1730
1730
  if (e === n)
1731
1731
  return s;
@@ -1733,7 +1733,7 @@ const ye = {
1733
1733
  return e ? t.options.trueStr : t.options.falseStr;
1734
1734
  }
1735
1735
  };
1736
- function Y({ format: s, minFractionDigits: e, tag: t, value: n }) {
1736
+ function V({ format: s, minFractionDigits: e, tag: t, value: n }) {
1737
1737
  if (typeof n == "bigint")
1738
1738
  return String(n);
1739
1739
  const i = typeof n == "number" ? n : Number(n);
@@ -1749,14 +1749,14 @@ function Y({ format: s, minFractionDigits: e, tag: t, value: n }) {
1749
1749
  }
1750
1750
  return r;
1751
1751
  }
1752
- const vs = {
1752
+ const _s = {
1753
1753
  identify: (s) => typeof s == "number",
1754
1754
  default: !0,
1755
1755
  tag: "tag:yaml.org,2002:float",
1756
1756
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1757
1757
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1758
- stringify: Y
1759
- }, Ls = {
1758
+ stringify: V
1759
+ }, Ps = {
1760
1760
  identify: (s) => typeof s == "number",
1761
1761
  default: !0,
1762
1762
  tag: "tag:yaml.org,2002:float",
@@ -1765,78 +1765,78 @@ const vs = {
1765
1765
  resolve: (s) => parseFloat(s),
1766
1766
  stringify(s) {
1767
1767
  const e = Number(s.value);
1768
- return isFinite(e) ? e.toExponential() : Y(s);
1768
+ return isFinite(e) ? e.toExponential() : V(s);
1769
1769
  }
1770
- }, Cs = {
1770
+ }, Ds = {
1771
1771
  identify: (s) => typeof s == "number",
1772
1772
  default: !0,
1773
1773
  tag: "tag:yaml.org,2002:float",
1774
1774
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1775
1775
  resolve(s) {
1776
- const e = new I(parseFloat(s)), t = s.indexOf(".");
1776
+ const e = new $(parseFloat(s)), t = s.indexOf(".");
1777
1777
  return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1778
1778
  },
1779
- stringify: Y
1780
- }, tt = (s) => typeof s == "bigint" || Number.isInteger(s), At = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1781
- function _s(s, e, t) {
1779
+ stringify: V
1780
+ }, st = (s) => typeof s == "bigint" || Number.isInteger(s), Ot = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1781
+ function js(s, e, t) {
1782
1782
  const { value: n } = s;
1783
- return tt(n) && n >= 0 ? t + n.toString(e) : Y(s);
1783
+ return st(n) && n >= 0 ? t + n.toString(e) : V(s);
1784
1784
  }
1785
- const Ps = {
1786
- identify: (s) => tt(s) && s >= 0,
1785
+ const Rs = {
1786
+ identify: (s) => st(s) && s >= 0,
1787
1787
  default: !0,
1788
1788
  tag: "tag:yaml.org,2002:int",
1789
1789
  format: "OCT",
1790
1790
  test: /^0o[0-7]+$/,
1791
- resolve: (s, e, t) => At(s, 2, 8, t),
1792
- stringify: (s) => _s(s, 8, "0o")
1793
- }, Ds = {
1794
- identify: tt,
1791
+ resolve: (s, e, t) => Ot(s, 2, 8, t),
1792
+ stringify: (s) => js(s, 8, "0o")
1793
+ }, Ms = {
1794
+ identify: st,
1795
1795
  default: !0,
1796
1796
  tag: "tag:yaml.org,2002:int",
1797
1797
  test: /^[-+]?[0-9]+$/,
1798
- resolve: (s, e, t) => At(s, 0, 10, t),
1799
- stringify: Y
1800
- }, js = {
1801
- identify: (s) => tt(s) && s >= 0,
1798
+ resolve: (s, e, t) => Ot(s, 0, 10, t),
1799
+ stringify: V
1800
+ }, Bs = {
1801
+ identify: (s) => st(s) && s >= 0,
1802
1802
  default: !0,
1803
1803
  tag: "tag:yaml.org,2002:int",
1804
1804
  format: "HEX",
1805
1805
  test: /^0x[0-9a-fA-F]+$/,
1806
- resolve: (s, e, t) => At(s, 2, 16, t),
1807
- stringify: (s) => _s(s, 16, "0x")
1808
- }, Wn = [
1809
- ge,
1810
- ye,
1811
- xe,
1806
+ resolve: (s, e, t) => Ot(s, 2, 16, t),
1807
+ stringify: (s) => js(s, 16, "0x")
1808
+ }, xn = [
1809
+ we,
1810
+ ke,
1812
1811
  et,
1813
- Tt,
1812
+ tt,
1813
+ At,
1814
+ Rs,
1815
+ Ms,
1816
+ Bs,
1817
+ _s,
1814
1818
  Ps,
1815
- Ds,
1816
- js,
1817
- vs,
1818
- Ls,
1819
- Cs
1819
+ Ds
1820
1820
  ];
1821
- function Jt(s) {
1821
+ function zt(s) {
1822
1822
  return typeof s == "bigint" || Number.isInteger(s);
1823
1823
  }
1824
- const Me = ({ value: s }) => JSON.stringify(s), Qn = [
1824
+ const Ke = ({ value: s }) => JSON.stringify(s), ei = [
1825
1825
  {
1826
1826
  identify: (s) => typeof s == "string",
1827
1827
  default: !0,
1828
1828
  tag: "tag:yaml.org,2002:str",
1829
1829
  resolve: (s) => s,
1830
- stringify: Me
1830
+ stringify: Ke
1831
1831
  },
1832
1832
  {
1833
1833
  identify: (s) => s == null,
1834
- createNode: () => new I(null),
1834
+ createNode: () => new $(null),
1835
1835
  default: !0,
1836
1836
  tag: "tag:yaml.org,2002:null",
1837
1837
  test: /^null$/,
1838
1838
  resolve: () => null,
1839
- stringify: Me
1839
+ stringify: Ke
1840
1840
  },
1841
1841
  {
1842
1842
  identify: (s) => typeof s == "boolean",
@@ -1844,15 +1844,15 @@ const Me = ({ value: s }) => JSON.stringify(s), Qn = [
1844
1844
  tag: "tag:yaml.org,2002:bool",
1845
1845
  test: /^true$|^false$/,
1846
1846
  resolve: (s) => s === "true",
1847
- stringify: Me
1847
+ stringify: Ke
1848
1848
  },
1849
1849
  {
1850
- identify: Jt,
1850
+ identify: zt,
1851
1851
  default: !0,
1852
1852
  tag: "tag:yaml.org,2002:int",
1853
1853
  test: /^-?(?:0|[1-9][0-9]*)$/,
1854
1854
  resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1855
- stringify: ({ value: s }) => Jt(s) ? s.toString() : JSON.stringify(s)
1855
+ stringify: ({ value: s }) => zt(s) ? s.toString() : JSON.stringify(s)
1856
1856
  },
1857
1857
  {
1858
1858
  identify: (s) => typeof s == "number",
@@ -1860,16 +1860,16 @@ const Me = ({ value: s }) => JSON.stringify(s), Qn = [
1860
1860
  tag: "tag:yaml.org,2002:float",
1861
1861
  test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1862
1862
  resolve: (s) => parseFloat(s),
1863
- stringify: Me
1863
+ stringify: Ke
1864
1864
  }
1865
- ], zn = {
1865
+ ], ti = {
1866
1866
  default: !0,
1867
1867
  tag: "",
1868
1868
  test: /^/,
1869
1869
  resolve(s, e) {
1870
1870
  return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1871
1871
  }
1872
- }, Xn = [ge, ye].concat(Qn, zn), Ot = {
1872
+ }, si = [we, ke].concat(ei, ti), vt = {
1873
1873
  identify: (s) => s instanceof Uint8Array,
1874
1874
  // Buffer inherits from Uint8Array
1875
1875
  default: !1,
@@ -1903,24 +1903,24 @@ const Me = ({ value: s }) => JSON.stringify(s), Qn = [
1903
1903
  a = btoa(l);
1904
1904
  } else
1905
1905
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1906
- if (e ?? (e = I.BLOCK_LITERAL), e !== I.QUOTE_DOUBLE) {
1906
+ if (e ?? (e = $.BLOCK_LITERAL), e !== $.QUOTE_DOUBLE) {
1907
1907
  const l = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(a.length / l), u = new Array(c);
1908
1908
  for (let f = 0, d = 0; f < c; ++f, d += l)
1909
1909
  u[f] = a.substr(d, l);
1910
- a = u.join(e === I.BLOCK_LITERAL ? `
1910
+ a = u.join(e === $.BLOCK_LITERAL ? `
1911
1911
  ` : " ");
1912
1912
  }
1913
1913
  return It({ comment: s, type: e, value: a }, n, i, r);
1914
1914
  }
1915
1915
  };
1916
- function Rs(s, e) {
1917
- if (Le(s))
1916
+ function Ks(s, e) {
1917
+ if (Pe(s))
1918
1918
  for (let t = 0; t < s.items.length; ++t) {
1919
1919
  let n = s.items[t];
1920
1920
  if (!_(n)) {
1921
- if (ve(n)) {
1921
+ if (_e(n)) {
1922
1922
  n.items.length > 1 && e("Each pair must have its own sequence indicator");
1923
- const i = n.items[0] || new j(new I(null));
1923
+ const i = n.items[0] || new j(new $(null));
1924
1924
  if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1925
1925
  ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1926
1926
  const r = i.value ?? i.key;
@@ -1936,7 +1936,7 @@ ${r.comment}` : n.comment;
1936
1936
  e("Expected a sequence for this tag");
1937
1937
  return s;
1938
1938
  }
1939
- function Ms(s, e, t) {
1939
+ function qs(s, e, t) {
1940
1940
  const { replacer: n } = t, i = new ne(s);
1941
1941
  i.tag = "tag:yaml.org,2002:pairs";
1942
1942
  let r = 0;
@@ -1957,20 +1957,20 @@ function Ms(s, e, t) {
1957
1957
  throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
1958
1958
  } else
1959
1959
  a = o;
1960
- i.items.push($t(a, l, t));
1960
+ i.items.push(Tt(a, l, t));
1961
1961
  }
1962
1962
  return i;
1963
1963
  }
1964
- const vt = {
1964
+ const Lt = {
1965
1965
  collection: "seq",
1966
1966
  default: !1,
1967
1967
  tag: "tag:yaml.org,2002:pairs",
1968
- resolve: Rs,
1969
- createNode: Ms
1968
+ resolve: Ks,
1969
+ createNode: qs
1970
1970
  };
1971
- class ce extends ne {
1971
+ class ue extends ne {
1972
1972
  constructor() {
1973
- super(), this.add = R.prototype.add.bind(this), this.delete = R.prototype.delete.bind(this), this.get = R.prototype.get.bind(this), this.has = R.prototype.has.bind(this), this.set = R.prototype.set.bind(this), this.tag = ce.tag;
1973
+ super(), this.add = R.prototype.add.bind(this), this.delete = R.prototype.delete.bind(this), this.get = R.prototype.get.bind(this), this.has = R.prototype.has.bind(this), this.set = R.prototype.set.bind(this), this.tag = ue.tag;
1974
1974
  }
1975
1975
  /**
1976
1976
  * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
@@ -1990,50 +1990,50 @@ class ce extends ne {
1990
1990
  return n;
1991
1991
  }
1992
1992
  static from(e, t, n) {
1993
- const i = Ms(e, t, n), r = new this();
1993
+ const i = qs(e, t, n), r = new this();
1994
1994
  return r.items = i.items, r;
1995
1995
  }
1996
1996
  }
1997
- ce.tag = "tag:yaml.org,2002:omap";
1998
- const Lt = {
1997
+ ue.tag = "tag:yaml.org,2002:omap";
1998
+ const Ct = {
1999
1999
  collection: "seq",
2000
2000
  identify: (s) => s instanceof Map,
2001
- nodeClass: ce,
2001
+ nodeClass: ue,
2002
2002
  default: !1,
2003
2003
  tag: "tag:yaml.org,2002:omap",
2004
2004
  resolve(s, e) {
2005
- const t = Rs(s, e), n = [];
2005
+ const t = Ks(s, e), n = [];
2006
2006
  for (const { key: i } of t.items)
2007
2007
  O(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
2008
- return Object.assign(new ce(), t);
2008
+ return Object.assign(new ue(), t);
2009
2009
  },
2010
- createNode: (s, e, t) => ce.from(s, e, t)
2010
+ createNode: (s, e, t) => ue.from(s, e, t)
2011
2011
  };
2012
- function Bs({ value: s, source: e }, t) {
2013
- return e && (s ? Ks : qs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
2012
+ function Us({ value: s, source: e }, t) {
2013
+ return e && (s ? Fs : Ys).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
2014
2014
  }
2015
- const Ks = {
2015
+ const Fs = {
2016
2016
  identify: (s) => s === !0,
2017
2017
  default: !0,
2018
2018
  tag: "tag:yaml.org,2002:bool",
2019
2019
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
2020
- resolve: () => new I(!0),
2021
- stringify: Bs
2022
- }, qs = {
2020
+ resolve: () => new $(!0),
2021
+ stringify: Us
2022
+ }, Ys = {
2023
2023
  identify: (s) => s === !1,
2024
2024
  default: !0,
2025
2025
  tag: "tag:yaml.org,2002:bool",
2026
2026
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
2027
- resolve: () => new I(!1),
2028
- stringify: Bs
2029
- }, Zn = {
2027
+ resolve: () => new $(!1),
2028
+ stringify: Us
2029
+ }, ni = {
2030
2030
  identify: (s) => typeof s == "number",
2031
2031
  default: !0,
2032
2032
  tag: "tag:yaml.org,2002:float",
2033
2033
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
2034
2034
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
2035
- stringify: Y
2036
- }, xn = {
2035
+ stringify: V
2036
+ }, ii = {
2037
2037
  identify: (s) => typeof s == "number",
2038
2038
  default: !0,
2039
2039
  tag: "tag:yaml.org,2002:float",
@@ -2042,24 +2042,24 @@ const Ks = {
2042
2042
  resolve: (s) => parseFloat(s.replace(/_/g, "")),
2043
2043
  stringify(s) {
2044
2044
  const e = Number(s.value);
2045
- return isFinite(e) ? e.toExponential() : Y(s);
2045
+ return isFinite(e) ? e.toExponential() : V(s);
2046
2046
  }
2047
- }, ei = {
2047
+ }, ri = {
2048
2048
  identify: (s) => typeof s == "number",
2049
2049
  default: !0,
2050
2050
  tag: "tag:yaml.org,2002:float",
2051
2051
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
2052
2052
  resolve(s) {
2053
- const e = new I(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
2053
+ const e = new $(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
2054
2054
  if (t !== -1) {
2055
2055
  const n = s.substring(t + 1).replace(/_/g, "");
2056
2056
  n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
2057
2057
  }
2058
2058
  return e;
2059
2059
  },
2060
- stringify: Y
2061
- }, Ce = (s) => typeof s == "bigint" || Number.isInteger(s);
2062
- function st(s, e, t, { intAsBigInt: n }) {
2060
+ stringify: V
2061
+ }, De = (s) => typeof s == "bigint" || Number.isInteger(s);
2062
+ function nt(s, e, t, { intAsBigInt: n }) {
2063
2063
  const i = s[0];
2064
2064
  if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
2065
2065
  switch (t) {
@@ -2079,49 +2079,49 @@ function st(s, e, t, { intAsBigInt: n }) {
2079
2079
  const r = parseInt(s, t);
2080
2080
  return i === "-" ? -1 * r : r;
2081
2081
  }
2082
- function Ct(s, e, t) {
2082
+ function _t(s, e, t) {
2083
2083
  const { value: n } = s;
2084
- if (Ce(n)) {
2084
+ if (De(n)) {
2085
2085
  const i = n.toString(e);
2086
2086
  return n < 0 ? "-" + t + i.substr(1) : t + i;
2087
2087
  }
2088
- return Y(s);
2088
+ return V(s);
2089
2089
  }
2090
- const ti = {
2091
- identify: Ce,
2090
+ const oi = {
2091
+ identify: De,
2092
2092
  default: !0,
2093
2093
  tag: "tag:yaml.org,2002:int",
2094
2094
  format: "BIN",
2095
2095
  test: /^[-+]?0b[0-1_]+$/,
2096
- resolve: (s, e, t) => st(s, 2, 2, t),
2097
- stringify: (s) => Ct(s, 2, "0b")
2098
- }, si = {
2099
- identify: Ce,
2096
+ resolve: (s, e, t) => nt(s, 2, 2, t),
2097
+ stringify: (s) => _t(s, 2, "0b")
2098
+ }, ai = {
2099
+ identify: De,
2100
2100
  default: !0,
2101
2101
  tag: "tag:yaml.org,2002:int",
2102
2102
  format: "OCT",
2103
2103
  test: /^[-+]?0[0-7_]+$/,
2104
- resolve: (s, e, t) => st(s, 1, 8, t),
2105
- stringify: (s) => Ct(s, 8, "0")
2106
- }, ni = {
2107
- identify: Ce,
2104
+ resolve: (s, e, t) => nt(s, 1, 8, t),
2105
+ stringify: (s) => _t(s, 8, "0")
2106
+ }, li = {
2107
+ identify: De,
2108
2108
  default: !0,
2109
2109
  tag: "tag:yaml.org,2002:int",
2110
2110
  test: /^[-+]?[0-9][0-9_]*$/,
2111
- resolve: (s, e, t) => st(s, 0, 10, t),
2112
- stringify: Y
2113
- }, ii = {
2114
- identify: Ce,
2111
+ resolve: (s, e, t) => nt(s, 0, 10, t),
2112
+ stringify: V
2113
+ }, ci = {
2114
+ identify: De,
2115
2115
  default: !0,
2116
2116
  tag: "tag:yaml.org,2002:int",
2117
2117
  format: "HEX",
2118
2118
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
2119
- resolve: (s, e, t) => st(s, 2, 16, t),
2120
- stringify: (s) => Ct(s, 16, "0x")
2119
+ resolve: (s, e, t) => nt(s, 2, 16, t),
2120
+ stringify: (s) => _t(s, 16, "0x")
2121
2121
  };
2122
- class fe extends R {
2122
+ class de extends R {
2123
2123
  constructor(e) {
2124
- super(e), this.tag = fe.tag;
2124
+ super(e), this.tag = de.tag;
2125
2125
  }
2126
2126
  add(e) {
2127
2127
  let t;
@@ -2155,60 +2155,60 @@ class fe extends R {
2155
2155
  const { replacer: i } = n, r = new this(e);
2156
2156
  if (t && Symbol.iterator in Object(t))
2157
2157
  for (let o of t)
2158
- typeof i == "function" && (o = i.call(t, o, o)), r.items.push($t(o, null, n));
2158
+ typeof i == "function" && (o = i.call(t, o, o)), r.items.push(Tt(o, null, n));
2159
2159
  return r;
2160
2160
  }
2161
2161
  }
2162
- fe.tag = "tag:yaml.org,2002:set";
2163
- const _t = {
2162
+ de.tag = "tag:yaml.org,2002:set";
2163
+ const Pt = {
2164
2164
  collection: "map",
2165
2165
  identify: (s) => s instanceof Set,
2166
- nodeClass: fe,
2166
+ nodeClass: de,
2167
2167
  default: !1,
2168
2168
  tag: "tag:yaml.org,2002:set",
2169
- createNode: (s, e, t) => fe.from(s, e, t),
2169
+ createNode: (s, e, t) => de.from(s, e, t),
2170
2170
  resolve(s, e) {
2171
- if (ve(s)) {
2171
+ if (_e(s)) {
2172
2172
  if (s.hasAllNullValues(!0))
2173
- return Object.assign(new fe(), s);
2173
+ return Object.assign(new de(), s);
2174
2174
  e("Set items must all have null values");
2175
2175
  } else
2176
2176
  e("Expected a mapping for this tag");
2177
2177
  return s;
2178
2178
  }
2179
2179
  };
2180
- function Pt(s, e) {
2180
+ function Dt(s, e) {
2181
2181
  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));
2182
2182
  return t === "-" ? i(-1) * r : r;
2183
2183
  }
2184
- function Fs(s) {
2184
+ function Vs(s) {
2185
2185
  let { value: e } = s, t = (o) => o;
2186
2186
  if (typeof e == "bigint")
2187
2187
  t = (o) => BigInt(o);
2188
2188
  else if (isNaN(e) || !isFinite(e))
2189
- return Y(s);
2189
+ return V(s);
2190
2190
  let n = "";
2191
2191
  e < 0 && (n = "-", e *= t(-1));
2192
2192
  const i = t(60), r = [e % i];
2193
2193
  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*$/, "");
2194
2194
  }
2195
- const Us = {
2195
+ const Gs = {
2196
2196
  identify: (s) => typeof s == "bigint" || Number.isInteger(s),
2197
2197
  default: !0,
2198
2198
  tag: "tag:yaml.org,2002:int",
2199
2199
  format: "TIME",
2200
2200
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
2201
- resolve: (s, e, { intAsBigInt: t }) => Pt(s, t),
2202
- stringify: Fs
2203
- }, Ys = {
2201
+ resolve: (s, e, { intAsBigInt: t }) => Dt(s, t),
2202
+ stringify: Vs
2203
+ }, Hs = {
2204
2204
  identify: (s) => typeof s == "number",
2205
2205
  default: !0,
2206
2206
  tag: "tag:yaml.org,2002:float",
2207
2207
  format: "TIME",
2208
2208
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
2209
- resolve: (s) => Pt(s, !1),
2210
- stringify: Fs
2211
- }, nt = {
2209
+ resolve: (s) => Dt(s, !1),
2210
+ stringify: Vs
2211
+ }, it = {
2212
2212
  identify: (s) => s instanceof Date,
2213
2213
  default: !0,
2214
2214
  tag: "tag:yaml.org,2002:timestamp",
@@ -2217,76 +2217,76 @@ const Us = {
2217
2217
  // assumed to be 00:00:00Z (start of day, UTC).
2218
2218
  test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
2219
2219
  resolve(s) {
2220
- const e = s.match(nt.test);
2220
+ const e = s.match(it.test);
2221
2221
  if (!e)
2222
2222
  throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
2223
2223
  const [, t, n, i, r, o, a] = e.map(Number), l = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
2224
2224
  let c = Date.UTC(t, n - 1, i, r || 0, o || 0, a || 0, l);
2225
2225
  const u = e[8];
2226
2226
  if (u && u !== "Z") {
2227
- let f = Pt(u, !1);
2227
+ let f = Dt(u, !1);
2228
2228
  Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
2229
2229
  }
2230
2230
  return new Date(c);
2231
2231
  },
2232
2232
  stringify: ({ value: s }) => (s == null ? void 0 : s.toISOString().replace(/(T00:00:00)?\.000Z$/, "")) ?? ""
2233
- }, Wt = [
2234
- ge,
2235
- ye,
2236
- xe,
2233
+ }, Xt = [
2234
+ we,
2235
+ ke,
2237
2236
  et,
2238
- Ks,
2239
- qs,
2240
- ti,
2241
- si,
2237
+ tt,
2238
+ Fs,
2239
+ Ys,
2240
+ oi,
2241
+ ai,
2242
+ li,
2243
+ ci,
2242
2244
  ni,
2243
2245
  ii,
2244
- Zn,
2245
- xn,
2246
- ei,
2247
- Ot,
2246
+ ri,
2247
+ vt,
2248
2248
  Q,
2249
+ Ct,
2249
2250
  Lt,
2250
- vt,
2251
- _t,
2252
- Us,
2253
- Ys,
2254
- nt
2255
- ], Qt = /* @__PURE__ */ new Map([
2256
- ["core", Wn],
2257
- ["failsafe", [ge, ye, xe]],
2258
- ["json", Xn],
2259
- ["yaml11", Wt],
2260
- ["yaml-1.1", Wt]
2261
- ]), zt = {
2262
- binary: Ot,
2263
- bool: Tt,
2264
- float: Cs,
2265
- floatExp: Ls,
2266
- floatNaN: vs,
2267
- floatTime: Ys,
2268
- int: Ds,
2269
- intHex: js,
2270
- intOct: Ps,
2271
- intTime: Us,
2272
- map: ge,
2251
+ Pt,
2252
+ Gs,
2253
+ Hs,
2254
+ it
2255
+ ], Zt = /* @__PURE__ */ new Map([
2256
+ ["core", xn],
2257
+ ["failsafe", [we, ke, et]],
2258
+ ["json", si],
2259
+ ["yaml11", Xt],
2260
+ ["yaml-1.1", Xt]
2261
+ ]), xt = {
2262
+ binary: vt,
2263
+ bool: At,
2264
+ float: Ds,
2265
+ floatExp: Ps,
2266
+ floatNaN: _s,
2267
+ floatTime: Hs,
2268
+ int: Ms,
2269
+ intHex: Bs,
2270
+ intOct: Rs,
2271
+ intTime: Gs,
2272
+ map: we,
2273
2273
  merge: Q,
2274
- null: et,
2275
- omap: Lt,
2276
- pairs: vt,
2277
- seq: ye,
2278
- set: _t,
2279
- timestamp: nt
2280
- }, ri = {
2281
- "tag:yaml.org,2002:binary": Ot,
2274
+ null: tt,
2275
+ omap: Ct,
2276
+ pairs: Lt,
2277
+ seq: ke,
2278
+ set: Pt,
2279
+ timestamp: it
2280
+ }, fi = {
2281
+ "tag:yaml.org,2002:binary": vt,
2282
2282
  "tag:yaml.org,2002:merge": Q,
2283
- "tag:yaml.org,2002:omap": Lt,
2284
- "tag:yaml.org,2002:pairs": vt,
2285
- "tag:yaml.org,2002:set": _t,
2286
- "tag:yaml.org,2002:timestamp": nt
2283
+ "tag:yaml.org,2002:omap": Ct,
2284
+ "tag:yaml.org,2002:pairs": Lt,
2285
+ "tag:yaml.org,2002:set": Pt,
2286
+ "tag:yaml.org,2002:timestamp": it
2287
2287
  };
2288
- function at(s, e, t) {
2289
- const n = Qt.get(e);
2288
+ function ct(s, e, t) {
2289
+ const n = Zt.get(e);
2290
2290
  if (n && !s)
2291
2291
  return t && !n.includes(Q) ? n.concat(Q) : n.slice();
2292
2292
  let i = n;
@@ -2294,7 +2294,7 @@ function at(s, e, t) {
2294
2294
  if (Array.isArray(s))
2295
2295
  i = [];
2296
2296
  else {
2297
- const r = Array.from(Qt.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2297
+ const r = Array.from(Zt.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2298
2298
  throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`);
2299
2299
  }
2300
2300
  if (Array.isArray(s))
@@ -2302,25 +2302,25 @@ function at(s, e, t) {
2302
2302
  i = i.concat(r);
2303
2303
  else typeof s == "function" && (i = s(i.slice()));
2304
2304
  return t && (i = i.concat(Q)), i.reduce((r, o) => {
2305
- const a = typeof o == "string" ? zt[o] : o;
2305
+ const a = typeof o == "string" ? xt[o] : o;
2306
2306
  if (!a) {
2307
- const l = JSON.stringify(o), c = Object.keys(zt).map((u) => JSON.stringify(u)).join(", ");
2307
+ const l = JSON.stringify(o), c = Object.keys(xt).map((u) => JSON.stringify(u)).join(", ");
2308
2308
  throw new Error(`Unknown custom tag ${l}; use one of ${c}`);
2309
2309
  }
2310
2310
  return r.includes(a) || r.push(a), r;
2311
2311
  }, []);
2312
2312
  }
2313
- const oi = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2314
- class Dt {
2313
+ const ui = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2314
+ class jt {
2315
2315
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: a }) {
2316
- this.compat = Array.isArray(e) ? at(e, "compat") : e ? at(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? ri : {}, this.tags = at(t, this.name, n), this.toStringOptions = a ?? null, Object.defineProperty(this, Z, { value: ge }), Object.defineProperty(this, H, { value: xe }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? oi : null;
2316
+ this.compat = Array.isArray(e) ? ct(e, "compat") : e ? ct(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? fi : {}, this.tags = ct(t, this.name, n), this.toStringOptions = a ?? null, Object.defineProperty(this, Z, { value: we }), Object.defineProperty(this, H, { value: et }), Object.defineProperty(this, ge, { value: ke }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ui : null;
2317
2317
  }
2318
2318
  clone() {
2319
- const e = Object.create(Dt.prototype, Object.getOwnPropertyDescriptors(this));
2319
+ const e = Object.create(jt.prototype, Object.getOwnPropertyDescriptors(this));
2320
2320
  return e.tags = this.tags.slice(), e;
2321
2321
  }
2322
2322
  }
2323
- function ai(s, e) {
2323
+ function di(s, e) {
2324
2324
  var l;
2325
2325
  const t = [];
2326
2326
  let n = e.directives === !0;
@@ -2329,7 +2329,7 @@ function ai(s, e) {
2329
2329
  c ? (t.push(c), n = !0) : s.directives.docStart && (n = !0);
2330
2330
  }
2331
2331
  n && t.push("---");
2332
- const i = Ns(s, e), { commentString: r } = i.options;
2332
+ const i = Ts(s, e), { commentString: r } = i.options;
2333
2333
  if (s.commentBefore) {
2334
2334
  t.length !== 1 && t.unshift("");
2335
2335
  const c = r(s.commentBefore);
@@ -2345,10 +2345,10 @@ function ai(s, e) {
2345
2345
  i.forceBlockIndent = !!s.comment, a = s.contents.comment;
2346
2346
  }
2347
2347
  const c = a ? void 0 : () => o = !0;
2348
- let u = ue(s.contents, i, () => a = null, c);
2348
+ let u = he(s.contents, i, () => a = null, c);
2349
2349
  a && (u += te(u, "", r(a))), (u[0] === "|" || u[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${u}` : t.push(u);
2350
2350
  } else
2351
- t.push(ue(s.contents, i));
2351
+ t.push(he(s.contents, i));
2352
2352
  if ((l = s.directives) != null && l.docEnd)
2353
2353
  if (s.comment) {
2354
2354
  const c = r(s.comment);
@@ -2364,9 +2364,9 @@ function ai(s, e) {
2364
2364
  `) + `
2365
2365
  `;
2366
2366
  }
2367
- class _e {
2367
+ class je {
2368
2368
  constructor(e, t, n) {
2369
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, B, { value: ht });
2369
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, B, { value: mt });
2370
2370
  let i = null;
2371
2371
  typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2372
2372
  const r = Object.assign({
@@ -2389,18 +2389,18 @@ class _e {
2389
2389
  * Custom Node values that inherit from `Object` still refer to their original instances.
2390
2390
  */
2391
2391
  clone() {
2392
- const e = Object.create(_e.prototype, {
2393
- [B]: { value: ht }
2392
+ const e = Object.create(je.prototype, {
2393
+ [B]: { value: mt }
2394
2394
  });
2395
2395
  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 = C(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
2396
2396
  }
2397
2397
  /** Adds a value to the document. */
2398
2398
  add(e) {
2399
- ie(this.contents) && this.contents.add(e);
2399
+ re(this.contents) && this.contents.add(e);
2400
2400
  }
2401
2401
  /** Adds a value to the document. */
2402
2402
  addIn(e, t) {
2403
- ie(this.contents) && this.contents.addIn(e, t);
2403
+ re(this.contents) && this.contents.addIn(e, t);
2404
2404
  }
2405
2405
  /**
2406
2406
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -2413,11 +2413,11 @@ class _e {
2413
2413
  */
2414
2414
  createAlias(e, t) {
2415
2415
  if (!e.anchor) {
2416
- const n = bs(this);
2416
+ const n = Ss(this);
2417
2417
  e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2418
- !t || n.has(t) ? ws(t || "a", n) : t;
2418
+ !t || n.has(t) ? Es(t || "a", n) : t;
2419
2419
  }
2420
- return new Nt(e.anchor);
2420
+ return new $t(e.anchor);
2421
2421
  }
2422
2422
  createNode(e, t, n) {
2423
2423
  let i;
@@ -2427,7 +2427,7 @@ class _e {
2427
2427
  const m = (w) => typeof w == "number" || w instanceof String || w instanceof Number, y = t.filter(m).map(String);
2428
2428
  y.length > 0 && (t = t.concat(y)), i = t;
2429
2429
  } else n === void 0 && t && (n = t, t = void 0);
2430
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: a, keepUndefined: l, onTagObj: c, tag: u } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: p } = jn(
2430
+ const { aliasDuplicateObjects: r, anchorPrefix: o, flow: a, keepUndefined: l, onTagObj: c, tag: u } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: p } = qn(
2431
2431
  this,
2432
2432
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2433
2433
  o || "a"
@@ -2439,7 +2439,7 @@ class _e {
2439
2439
  replacer: i,
2440
2440
  schema: this.schema,
2441
2441
  sourceObjects: p
2442
- }, h = $e(e, u, g);
2442
+ }, h = Ae(e, u, g);
2443
2443
  return a && L(h) && (h.flow = !0), d(), h;
2444
2444
  }
2445
2445
  /**
@@ -2455,14 +2455,14 @@ class _e {
2455
2455
  * @returns `true` if the item was found and removed.
2456
2456
  */
2457
2457
  delete(e) {
2458
- return ie(this.contents) ? this.contents.delete(e) : !1;
2458
+ return re(this.contents) ? this.contents.delete(e) : !1;
2459
2459
  }
2460
2460
  /**
2461
2461
  * Removes a value from the document.
2462
2462
  * @returns `true` if the item was found and removed.
2463
2463
  */
2464
2464
  deleteIn(e) {
2465
- return ke(e) ? this.contents == null ? !1 : (this.contents = null, !0) : ie(this.contents) ? this.contents.deleteIn(e) : !1;
2465
+ return Ne(e) ? this.contents == null ? !1 : (this.contents = null, !0) : re(this.contents) ? this.contents.deleteIn(e) : !1;
2466
2466
  }
2467
2467
  /**
2468
2468
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -2478,7 +2478,7 @@ class _e {
2478
2478
  * `true` (collections are always returned intact).
2479
2479
  */
2480
2480
  getIn(e, t) {
2481
- return ke(e) ? !t && O(this.contents) ? this.contents.value : this.contents : L(this.contents) ? this.contents.getIn(e, t) : void 0;
2481
+ return Ne(e) ? !t && O(this.contents) ? this.contents.value : this.contents : L(this.contents) ? this.contents.getIn(e, t) : void 0;
2482
2482
  }
2483
2483
  /**
2484
2484
  * Checks if the document includes a value with the key `key`.
@@ -2490,21 +2490,21 @@ class _e {
2490
2490
  * Checks if the document includes a value at `path`.
2491
2491
  */
2492
2492
  hasIn(e) {
2493
- return ke(e) ? this.contents !== void 0 : L(this.contents) ? this.contents.hasIn(e) : !1;
2493
+ return Ne(e) ? this.contents !== void 0 : L(this.contents) ? this.contents.hasIn(e) : !1;
2494
2494
  }
2495
2495
  /**
2496
2496
  * Sets a value in this document. For `!!set`, `value` needs to be a
2497
2497
  * boolean to add/remove the item from the set.
2498
2498
  */
2499
2499
  set(e, t) {
2500
- this.contents == null ? this.contents = Ge(this.schema, [e], t) : ie(this.contents) && this.contents.set(e, t);
2500
+ this.contents == null ? this.contents = Je(this.schema, [e], t) : re(this.contents) && this.contents.set(e, t);
2501
2501
  }
2502
2502
  /**
2503
2503
  * Sets a value in this document. For `!!set`, `value` needs to be a
2504
2504
  * boolean to add/remove the item from the set.
2505
2505
  */
2506
2506
  setIn(e, t) {
2507
- ke(e) ? this.contents = t : this.contents == null ? this.contents = Ge(this.schema, Array.from(e), t) : ie(this.contents) && this.contents.setIn(e, t);
2507
+ Ne(e) ? this.contents = t : this.contents == null ? this.contents = Je(this.schema, Array.from(e), t) : re(this.contents) && this.contents.setIn(e, t);
2508
2508
  }
2509
2509
  /**
2510
2510
  * Change the YAML version and schema used by the document.
@@ -2535,7 +2535,7 @@ class _e {
2535
2535
  if (t.schema instanceof Object)
2536
2536
  this.schema = t.schema;
2537
2537
  else if (n)
2538
- this.schema = new Dt(Object.assign(n, t));
2538
+ this.schema = new jt(Object.assign(n, t));
2539
2539
  else
2540
2540
  throw new Error("With a null YAML version, the { schema: Schema } option is required");
2541
2541
  }
@@ -2552,7 +2552,7 @@ class _e {
2552
2552
  if (typeof r == "function")
2553
2553
  for (const { count: c, res: u } of a.anchors.values())
2554
2554
  r(u, c);
2555
- return typeof o == "function" ? ae(o, { "": l }, "", l) : l;
2555
+ return typeof o == "function" ? le(o, { "": l }, "", l) : l;
2556
2556
  }
2557
2557
  /**
2558
2558
  * A JSON representation of the document `contents`.
@@ -2571,30 +2571,30 @@ class _e {
2571
2571
  const t = JSON.stringify(e.indent);
2572
2572
  throw new Error(`"indent" option must be a positive integer, not ${t}`);
2573
2573
  }
2574
- return ai(this, e);
2574
+ return di(this, e);
2575
2575
  }
2576
2576
  }
2577
- function ie(s) {
2577
+ function re(s) {
2578
2578
  if (L(s))
2579
2579
  return !0;
2580
2580
  throw new Error("Expected a YAML collection as document contents");
2581
2581
  }
2582
- class Vs extends Error {
2582
+ class Js extends Error {
2583
2583
  constructor(e, t, n, i) {
2584
2584
  super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2585
2585
  }
2586
2586
  }
2587
- class Se extends Vs {
2587
+ class $e extends Js {
2588
2588
  constructor(e, t, n) {
2589
2589
  super("YAMLParseError", e, t, n);
2590
2590
  }
2591
2591
  }
2592
- class li extends Vs {
2592
+ class hi extends Js {
2593
2593
  constructor(e, t, n) {
2594
2594
  super("YAMLWarning", e, t, n);
2595
2595
  }
2596
2596
  }
2597
- const Xt = (s, e) => (t) => {
2597
+ const es = (s, e) => (t) => {
2598
2598
  if (t.pos[0] === -1)
2599
2599
  return;
2600
2600
  t.linePos = t.pos.map((a) => e.linePos(a));
@@ -2622,7 +2622,7 @@ ${c}
2622
2622
  `;
2623
2623
  }
2624
2624
  };
2625
- function de(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: a }) {
2625
+ function pe(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: a }) {
2626
2626
  let l = !1, c = a, u = a, f = "", d = "", p = !1, g = !1, h = null, m = null, y = null, w = null, E = null, S = null, N = null;
2627
2627
  for (const k of s)
2628
2628
  switch (g && (k.type !== "space" && k.type !== "newline" && k.type !== "comma" && r(k.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), g = !1), h && (c && k.type !== "comment" && k.type !== "newline" && r(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), h = null), k.type) {
@@ -2656,7 +2656,7 @@ function de(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
2656
2656
  default:
2657
2657
  r(k, "UNEXPECTED_TOKEN", `Unexpected ${k.type} token`), c = !1, u = !1;
2658
2658
  }
2659
- const T = s[s.length - 1], $ = T ? T.offset + T.source.length : i;
2659
+ const T = s[s.length - 1], I = T ? T.offset + T.source.length : i;
2660
2660
  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"), h && (c && h.indent <= o || (n == null ? void 0 : n.type) === "block-map" || (n == null ? void 0 : n.type) === "block-seq") && r(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2661
2661
  comma: E,
2662
2662
  found: S,
@@ -2666,11 +2666,11 @@ function de(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
2666
2666
  anchor: m,
2667
2667
  tag: y,
2668
2668
  newlineAfterProp: w,
2669
- end: $,
2670
- start: N ?? $
2669
+ end: I,
2670
+ start: N ?? I
2671
2671
  };
2672
2672
  }
2673
- function Te(s) {
2673
+ function Oe(s) {
2674
2674
  if (!s)
2675
2675
  return null;
2676
2676
  switch (s.type) {
@@ -2697,7 +2697,7 @@ function Te(s) {
2697
2697
  if (t.type === "newline")
2698
2698
  return !0;
2699
2699
  }
2700
- if (Te(e.key) || Te(e.value))
2700
+ if (Oe(e.key) || Oe(e.value))
2701
2701
  return !0;
2702
2702
  }
2703
2703
  return !1;
@@ -2705,27 +2705,27 @@ function Te(s) {
2705
2705
  return !0;
2706
2706
  }
2707
2707
  }
2708
- function yt(s, e, t) {
2708
+ function wt(s, e, t) {
2709
2709
  if ((e == null ? void 0 : e.type) === "flow-collection") {
2710
2710
  const n = e.end[0];
2711
- n.indent === s && (n.source === "]" || n.source === "}") && Te(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2711
+ n.indent === s && (n.source === "]" || n.source === "}") && Oe(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2712
2712
  }
2713
2713
  }
2714
- function Gs(s, e, t) {
2714
+ function Ws(s, e, t) {
2715
2715
  const { uniqueKeys: n } = s.options;
2716
2716
  if (n === !1)
2717
2717
  return !1;
2718
2718
  const i = typeof n == "function" ? n : (r, o) => r === o || O(r) && O(o) && r.value === o.value;
2719
2719
  return e.some((r) => i(r.key, t));
2720
2720
  }
2721
- const Zt = "All mapping items must start at the same column";
2722
- function ci({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2721
+ const ts = "All mapping items must start at the same column";
2722
+ function pi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2723
2723
  var u;
2724
2724
  const o = (r == null ? void 0 : r.nodeClass) ?? R, a = new o(t.schema);
2725
2725
  t.atRoot && (t.atRoot = !1);
2726
2726
  let l = n.offset, c = null;
2727
2727
  for (const f of n.items) {
2728
- const { start: d, key: p, sep: g, value: h } = f, m = de(d, {
2728
+ const { start: d, key: p, sep: g, value: h } = f, m = pe(d, {
2729
2729
  indicator: "explicit-key-ind",
2730
2730
  next: p ?? (g == null ? void 0 : g[0]),
2731
2731
  offset: l,
@@ -2734,17 +2734,17 @@ function ci({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2734
2734
  startOnNewline: !0
2735
2735
  }), y = !m.found;
2736
2736
  if (y) {
2737
- if (p && (p.type === "block-seq" ? i(l, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in p && p.indent !== n.indent && i(l, "BAD_INDENT", Zt)), !m.anchor && !m.tag && !g) {
2737
+ if (p && (p.type === "block-seq" ? i(l, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in p && p.indent !== n.indent && i(l, "BAD_INDENT", ts)), !m.anchor && !m.tag && !g) {
2738
2738
  c = m.end, m.comment && (a.comment ? a.comment += `
2739
2739
  ` + m.comment : a.comment = m.comment);
2740
2740
  continue;
2741
2741
  }
2742
- (m.newlineAfterProp || Te(p)) && i(p ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2743
- } else ((u = m.found) == null ? void 0 : u.indent) !== n.indent && i(l, "BAD_INDENT", Zt);
2742
+ (m.newlineAfterProp || Oe(p)) && i(p ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2743
+ } else ((u = m.found) == null ? void 0 : u.indent) !== n.indent && i(l, "BAD_INDENT", ts);
2744
2744
  t.atKey = !0;
2745
2745
  const w = m.end, E = p ? s(t, p, m, i) : e(t, w, d, null, m, i);
2746
- t.schema.compat && yt(n.indent, p, i), t.atKey = !1, Gs(t, a.items, E) && i(w, "DUPLICATE_KEY", "Map keys must be unique");
2747
- const S = de(g ?? [], {
2746
+ t.schema.compat && wt(n.indent, p, i), t.atKey = !1, Ws(t, a.items, E) && i(w, "DUPLICATE_KEY", "Map keys must be unique");
2747
+ const S = pe(g ?? [], {
2748
2748
  indicator: "map-value-ind",
2749
2749
  next: h,
2750
2750
  offset: E.range[2],
@@ -2755,7 +2755,7 @@ function ci({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2755
2755
  if (l = S.end, S.found) {
2756
2756
  y && ((h == null ? void 0 : h.type) === "block-map" && !S.hasNewline && i(l, "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"));
2757
2757
  const N = h ? s(t, h, S, i) : e(t, l, g, null, S, i);
2758
- t.schema.compat && yt(n.indent, h, i), l = N.range[2];
2758
+ t.schema.compat && wt(n.indent, h, i), l = N.range[2];
2759
2759
  const T = new j(E, N);
2760
2760
  t.options.keepSourceTokens && (T.srcToken = f), a.items.push(T);
2761
2761
  } else {
@@ -2767,12 +2767,12 @@ function ci({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2767
2767
  }
2768
2768
  return c && c < l && i(c, "IMPOSSIBLE", "Map comment with trailing content"), a.range = [n.offset, l, c ?? l], a;
2769
2769
  }
2770
- function fi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2770
+ function mi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2771
2771
  const o = (r == null ? void 0 : r.nodeClass) ?? ne, a = new o(t.schema);
2772
2772
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2773
2773
  let l = n.offset, c = null;
2774
2774
  for (const { start: u, value: f } of n.items) {
2775
- const d = de(u, {
2775
+ const d = pe(u, {
2776
2776
  indicator: "seq-item-ind",
2777
2777
  next: f,
2778
2778
  offset: l,
@@ -2788,11 +2788,11 @@ function fi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2788
2788
  continue;
2789
2789
  }
2790
2790
  const p = f ? s(t, f, d, i) : e(t, d.end, u, null, d, i);
2791
- t.schema.compat && yt(n.indent, f, i), l = p.range[2], a.items.push(p);
2791
+ t.schema.compat && wt(n.indent, f, i), l = p.range[2], a.items.push(p);
2792
2792
  }
2793
2793
  return a.range = [n.offset, l, c ?? l], a;
2794
2794
  }
2795
- function Pe(s, e, t, n) {
2795
+ function Re(s, e, t, n) {
2796
2796
  let i = "";
2797
2797
  if (s) {
2798
2798
  let r = !1, o = "";
@@ -2819,8 +2819,8 @@ function Pe(s, e, t, n) {
2819
2819
  }
2820
2820
  return { comment: i, offset: e };
2821
2821
  }
2822
- const lt = "Block collections are not allowed within flow collections", ct = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2823
- function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2822
+ const ft = "Block collections are not allowed within flow collections", ut = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2823
+ function gi({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2824
2824
  var m;
2825
2825
  const o = n.start.source === "{", a = o ? "flow map" : "flow sequence", l = (r == null ? void 0 : r.nodeClass) ?? (o ? R : ne), c = new l(t.schema);
2826
2826
  c.flow = !0;
@@ -2828,7 +2828,7 @@ function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2828
2828
  u && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2829
2829
  let f = n.offset + n.start.source.length;
2830
2830
  for (let y = 0; y < n.items.length; ++y) {
2831
- const w = n.items[y], { start: E, key: S, sep: N, value: T } = w, $ = de(E, {
2831
+ const w = n.items[y], { start: E, key: S, sep: N, value: T } = w, I = pe(E, {
2832
2832
  flow: a,
2833
2833
  indicator: "explicit-key-ind",
2834
2834
  next: S ?? (N == null ? void 0 : N[0]),
@@ -2837,13 +2837,13 @@ function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2837
2837
  parentIndent: n.indent,
2838
2838
  startOnNewline: !1
2839
2839
  });
2840
- if (!$.found) {
2841
- if (!$.anchor && !$.tag && !N && !T) {
2842
- 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 && (c.comment ? c.comment += `
2843
- ` + $.comment : c.comment = $.comment), f = $.end;
2840
+ if (!I.found) {
2841
+ if (!I.anchor && !I.tag && !N && !T) {
2842
+ y === 0 && I.comma ? i(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`) : y < n.items.length - 1 && i(I.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${a}`), I.comment && (c.comment ? c.comment += `
2843
+ ` + I.comment : c.comment = I.comment), f = I.end;
2844
2844
  continue;
2845
2845
  }
2846
- !o && t.options.strict && Te(S) && i(
2846
+ !o && t.options.strict && Oe(S) && i(
2847
2847
  S,
2848
2848
  // checked by containsNewline()
2849
2849
  "MULTILINE_IMPLICIT_KEY",
@@ -2851,8 +2851,8 @@ function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2851
2851
  );
2852
2852
  }
2853
2853
  if (y === 0)
2854
- $.comma && i($.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`);
2855
- else if ($.comma || i($.start, "MISSING_CHAR", `Missing , between ${a} items`), $.comment) {
2854
+ I.comma && i(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${a}`);
2855
+ else if (I.comma || i(I.start, "MISSING_CHAR", `Missing , between ${a} items`), I.comment) {
2856
2856
  let k = "";
2857
2857
  e: for (const A of E)
2858
2858
  switch (A.type) {
@@ -2868,17 +2868,17 @@ function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2868
2868
  if (k) {
2869
2869
  let A = c.items[c.items.length - 1];
2870
2870
  _(A) && (A = A.value ?? A.key), A.comment ? A.comment += `
2871
- ` + k : A.comment = k, $.comment = $.comment.substring(k.length + 1);
2871
+ ` + k : A.comment = k, I.comment = I.comment.substring(k.length + 1);
2872
2872
  }
2873
2873
  }
2874
- if (!o && !N && !$.found) {
2875
- const k = T ? s(t, T, $, i) : e(t, $.end, N, null, $, i);
2876
- c.items.push(k), f = k.range[2], ct(T) && i(k.range, "BLOCK_IN_FLOW", lt);
2874
+ if (!o && !N && !I.found) {
2875
+ const k = T ? s(t, T, I, i) : e(t, I.end, N, null, I, i);
2876
+ c.items.push(k), f = k.range[2], ut(T) && i(k.range, "BLOCK_IN_FLOW", ft);
2877
2877
  } else {
2878
2878
  t.atKey = !0;
2879
- const k = $.end, A = S ? s(t, S, $, i) : e(t, k, E, null, $, i);
2880
- ct(S) && i(A.range, "BLOCK_IN_FLOW", lt), t.atKey = !1;
2881
- const P = de(N ?? [], {
2879
+ const k = I.end, A = S ? s(t, S, I, i) : e(t, k, E, null, I, i);
2880
+ ut(S) && i(A.range, "BLOCK_IN_FLOW", ft), t.atKey = !1;
2881
+ const P = pe(N ?? [], {
2882
2882
  flow: a,
2883
2883
  indicator: "map-value-ind",
2884
2884
  next: T,
@@ -2888,31 +2888,31 @@ function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2888
2888
  startOnNewline: !1
2889
2889
  });
2890
2890
  if (P.found) {
2891
- if (!o && !$.found && t.options.strict) {
2891
+ if (!o && !I.found && t.options.strict) {
2892
2892
  if (N)
2893
- for (const q of N) {
2894
- if (q === P.found)
2893
+ for (const U of N) {
2894
+ if (U === P.found)
2895
2895
  break;
2896
- if (q.type === "newline") {
2897
- i(q, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2896
+ if (U.type === "newline") {
2897
+ i(U, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2898
2898
  break;
2899
2899
  }
2900
2900
  }
2901
- $.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");
2901
+ I.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");
2902
2902
  }
2903
2903
  } else T && ("source" in T && ((m = T.source) == null ? void 0 : m[0]) === ":" ? i(T, "MISSING_CHAR", `Missing space after : in ${a}`) : i(P.start, "MISSING_CHAR", `Missing , or : between ${a} items`));
2904
2904
  const J = T ? s(t, T, P, i) : P.found ? e(t, P.end, N, null, P, i) : null;
2905
- J ? ct(T) && i(J.range, "BLOCK_IN_FLOW", lt) : P.comment && (A.comment ? A.comment += `
2905
+ J ? ut(T) && i(J.range, "BLOCK_IN_FLOW", ft) : P.comment && (A.comment ? A.comment += `
2906
2906
  ` + P.comment : A.comment = P.comment);
2907
- const K = new j(A, J);
2908
- if (t.options.keepSourceTokens && (K.srcToken = w), o) {
2909
- const q = c;
2910
- Gs(t, q.items, A) && i(k, "DUPLICATE_KEY", "Map keys must be unique"), q.items.push(K);
2907
+ const q = new j(A, J);
2908
+ if (t.options.keepSourceTokens && (q.srcToken = w), o) {
2909
+ const U = c;
2910
+ Ws(t, U.items, A) && i(k, "DUPLICATE_KEY", "Map keys must be unique"), U.items.push(q);
2911
2911
  } else {
2912
- const q = new R(t.schema);
2913
- q.flow = !0, q.items.push(K);
2914
- const Yt = (J ?? A).range;
2915
- q.range = [A.range[0], Yt[1], Yt[2]], c.items.push(q);
2912
+ const U = new R(t.schema);
2913
+ U.flow = !0, U.items.push(q);
2914
+ const Ht = (J ?? A).range;
2915
+ U.range = [A.range[0], Ht[1], Ht[2]], c.items.push(U);
2916
2916
  }
2917
2917
  f = J ? J.range[2] : P.end;
2918
2918
  }
@@ -2926,18 +2926,18 @@ function ui({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2926
2926
  i(f, u ? "MISSING_CHAR" : "BAD_INDENT", w), p && p.source.length !== 1 && g.unshift(p);
2927
2927
  }
2928
2928
  if (g.length > 0) {
2929
- const y = Pe(g, h, t.options.strict, i);
2929
+ const y = Re(g, h, t.options.strict, i);
2930
2930
  y.comment && (c.comment ? c.comment += `
2931
2931
  ` + y.comment : c.comment = y.comment), c.range = [n.offset, h, y.offset];
2932
2932
  } else
2933
2933
  c.range = [n.offset, h, h];
2934
2934
  return c;
2935
2935
  }
2936
- function ft(s, e, t, n, i, r) {
2937
- const o = t.type === "block-map" ? ci(s, e, t, n, r) : t.type === "block-seq" ? fi(s, e, t, n, r) : ui(s, e, t, n, r), a = o.constructor;
2936
+ function dt(s, e, t, n, i, r) {
2937
+ const o = t.type === "block-map" ? pi(s, e, t, n, r) : t.type === "block-seq" ? mi(s, e, t, n, r) : gi(s, e, t, n, r), a = o.constructor;
2938
2938
  return i === "!" || i === a.tagName ? (o.tag = a.tagName, o) : (i && (o.tag = i), o);
2939
2939
  }
2940
- function di(s, e, t, n, i) {
2940
+ function yi(s, e, t, n, i) {
2941
2941
  var d;
2942
2942
  const r = n.tag, o = r ? e.directives.tagName(r.source, (p) => i(r, "TAG_RESOLVE_FAILED", p)) : null;
2943
2943
  if (t.type === "block-seq") {
@@ -2946,23 +2946,23 @@ function di(s, e, t, n, i) {
2946
2946
  }
2947
2947
  const a = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2948
2948
  if (!r || !o || o === "!" || o === R.tagName && a === "map" || o === ne.tagName && a === "seq")
2949
- return ft(s, e, t, i, o);
2949
+ return dt(s, e, t, i, o);
2950
2950
  let l = e.schema.tags.find((p) => p.tag === o && p.collection === a);
2951
2951
  if (!l) {
2952
2952
  const p = e.schema.knownTags[o];
2953
2953
  if ((p == null ? void 0 : p.collection) === a)
2954
2954
  e.schema.tags.push(Object.assign({}, p, { default: !1 })), l = p;
2955
2955
  else
2956
- return p ? i(r, "BAD_COLLECTION_TYPE", `${p.tag} used for ${a} collection, but expects ${p.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), ft(s, e, t, i, o);
2956
+ return p ? i(r, "BAD_COLLECTION_TYPE", `${p.tag} used for ${a} collection, but expects ${p.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), dt(s, e, t, i, o);
2957
2957
  }
2958
- const c = ft(s, e, t, i, o, l), u = ((d = l.resolve) == null ? void 0 : d.call(l, c, (p) => i(r, "TAG_RESOLVE_FAILED", p), e.options)) ?? c, f = C(u) ? u : new I(u);
2958
+ const c = dt(s, e, t, i, o, l), u = ((d = l.resolve) == null ? void 0 : d.call(l, c, (p) => i(r, "TAG_RESOLVE_FAILED", p), e.options)) ?? c, f = C(u) ? u : new $(u);
2959
2959
  return f.range = c.range, f.tag = o, l != null && l.format && (f.format = l.format), f;
2960
2960
  }
2961
- function hi(s, e, t) {
2962
- const n = e.offset, i = pi(e, s.options.strict, t);
2961
+ function bi(s, e, t) {
2962
+ const n = e.offset, i = wi(e, s.options.strict, t);
2963
2963
  if (!i)
2964
2964
  return { value: "", type: null, comment: "", range: [n, n, n] };
2965
- const r = i.mode === ">" ? I.BLOCK_FOLDED : I.BLOCK_LITERAL, o = e.source ? mi(e.source) : [];
2965
+ const r = i.mode === ">" ? $.BLOCK_FOLDED : $.BLOCK_LITERAL, o = e.source ? ki(e.source) : [];
2966
2966
  let a = o.length;
2967
2967
  for (let h = o.length - 1; h >= 0; --h) {
2968
2968
  const m = o[h][1];
@@ -3002,7 +3002,7 @@ function hi(s, e, t) {
3002
3002
  const S = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
3003
3003
  t(c - y.length - (w ? 2 : 1), "BAD_INDENT", S), m = "";
3004
3004
  }
3005
- r === I.BLOCK_LITERAL ? (f += d + m.slice(l) + y, d = `
3005
+ r === $.BLOCK_LITERAL ? (f += d + m.slice(l) + y, d = `
3006
3006
  `) : m.length > l || y[0] === " " ? (d === " " ? d = `
3007
3007
  ` : !p && d === `
3008
3008
  ` && (d = `
@@ -3031,7 +3031,7 @@ function hi(s, e, t) {
3031
3031
  const g = n + i.length + e.source.length;
3032
3032
  return { value: f, type: r, comment: i.comment, range: [n, g, g] };
3033
3033
  }
3034
- function pi({ offset: s, props: e }, t, n) {
3034
+ function wi({ offset: s, props: e }, t, n) {
3035
3035
  if (e[0].type !== "block-scalar-header")
3036
3036
  return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
3037
3037
  const { source: i } = e[0], r = i[0];
@@ -3071,25 +3071,25 @@ function pi({ offset: s, props: e }, t, n) {
3071
3071
  }
3072
3072
  return { mode: r, indent: o, chomp: a, comment: u, length: f };
3073
3073
  }
3074
- function mi(s) {
3074
+ function ki(s) {
3075
3075
  const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
3076
3076
  for (let o = 1; o < e.length; o += 2)
3077
3077
  r.push([e[o], e[o + 1]]);
3078
3078
  return r;
3079
3079
  }
3080
- function gi(s, e, t) {
3080
+ function Si(s, e, t) {
3081
3081
  const { offset: n, type: i, source: r, end: o } = s;
3082
3082
  let a, l;
3083
3083
  const c = (d, p, g) => t(n + d, p, g);
3084
3084
  switch (i) {
3085
3085
  case "scalar":
3086
- a = I.PLAIN, l = yi(r, c);
3086
+ a = $.PLAIN, l = Ei(r, c);
3087
3087
  break;
3088
3088
  case "single-quoted-scalar":
3089
- a = I.QUOTE_SINGLE, l = bi(r, c);
3089
+ a = $.QUOTE_SINGLE, l = Ni(r, c);
3090
3090
  break;
3091
3091
  case "double-quoted-scalar":
3092
- a = I.QUOTE_DOUBLE, l = wi(r, c);
3092
+ a = $.QUOTE_DOUBLE, l = $i(r, c);
3093
3093
  break;
3094
3094
  default:
3095
3095
  return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
@@ -3099,7 +3099,7 @@ function gi(s, e, t) {
3099
3099
  range: [n, n + r.length, n + r.length]
3100
3100
  };
3101
3101
  }
3102
- const u = n + r.length, f = Pe(o, u, e, t);
3102
+ const u = n + r.length, f = Re(o, u, e, t);
3103
3103
  return {
3104
3104
  value: l,
3105
3105
  type: a,
@@ -3107,7 +3107,7 @@ function gi(s, e, t) {
3107
3107
  range: [n, u, f.offset]
3108
3108
  };
3109
3109
  }
3110
- function yi(s, e) {
3110
+ function Ei(s, e) {
3111
3111
  let t = "";
3112
3112
  switch (s[0]) {
3113
3113
  case " ":
@@ -3130,12 +3130,12 @@ function yi(s, e) {
3130
3130
  break;
3131
3131
  }
3132
3132
  }
3133
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Hs(s);
3133
+ return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Qs(s);
3134
3134
  }
3135
- function bi(s, e) {
3136
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Hs(s.slice(1, -1)).replace(/''/g, "'");
3135
+ function Ni(s, e) {
3136
+ return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Qs(s.slice(1, -1)).replace(/''/g, "'");
3137
3137
  }
3138
- function Hs(s) {
3138
+ function Qs(s) {
3139
3139
  let e, t;
3140
3140
  try {
3141
3141
  e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
@@ -3155,7 +3155,7 @@ function Hs(s) {
3155
3155
  const a = /[ \t]*(.*)/sy;
3156
3156
  return a.lastIndex = o, n = a.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
3157
3157
  }
3158
- function wi(s, e) {
3158
+ function $i(s, e) {
3159
3159
  let t = "";
3160
3160
  for (let n = 1; n < s.length - 1; ++n) {
3161
3161
  const i = s[n];
@@ -3163,11 +3163,11 @@ function wi(s, e) {
3163
3163
  `))
3164
3164
  if (i === `
3165
3165
  `) {
3166
- const { fold: r, offset: o } = ki(s, n);
3166
+ const { fold: r, offset: o } = Ii(s, n);
3167
3167
  t += r, n = o;
3168
3168
  } else if (i === "\\") {
3169
3169
  let r = s[++n];
3170
- const o = Si[r];
3170
+ const o = Ti[r];
3171
3171
  if (o)
3172
3172
  t += o;
3173
3173
  else if (r === `
@@ -3180,7 +3180,7 @@ function wi(s, e) {
3180
3180
  r = s[++n + 1];
3181
3181
  else if (r === "x" || r === "u" || r === "U") {
3182
3182
  const a = r === "x" ? 2 : r === "u" ? 4 : 8;
3183
- t += Ei(s, n + 1, a, e), n += a;
3183
+ t += Ai(s, n + 1, a, e), n += a;
3184
3184
  } else {
3185
3185
  const a = s.substr(n - 1, 2);
3186
3186
  e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${a}`), t += a;
@@ -3198,7 +3198,7 @@ function wi(s, e) {
3198
3198
  }
3199
3199
  return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
3200
3200
  }
3201
- function ki(s, e) {
3201
+ function Ii(s, e) {
3202
3202
  let t = "", n = s[e + 1];
3203
3203
  for (; (n === " " || n === " " || n === `
3204
3204
  ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
@@ -3208,7 +3208,7 @@ function ki(s, e) {
3208
3208
  `), e += 1, n = s[e + 1];
3209
3209
  return t || (t = " "), { fold: t, offset: e };
3210
3210
  }
3211
- const Si = {
3211
+ const Ti = {
3212
3212
  0: "\0",
3213
3213
  // null character
3214
3214
  a: "\x07",
@@ -3242,7 +3242,7 @@ const Si = {
3242
3242
  "\\": "\\",
3243
3243
  " ": " "
3244
3244
  };
3245
- function Ei(s, e, t, n) {
3245
+ function Ai(s, e, t, n) {
3246
3246
  const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
3247
3247
  try {
3248
3248
  return String.fromCodePoint(o);
@@ -3251,21 +3251,21 @@ function Ei(s, e, t, n) {
3251
3251
  return n(e - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${a}`), a;
3252
3252
  }
3253
3253
  }
3254
- function Js(s, e, t, n) {
3255
- const { value: i, type: r, comment: o, range: a } = e.type === "block-scalar" ? hi(s, e, n) : gi(e, s.options.strict, n), l = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3254
+ function zs(s, e, t, n) {
3255
+ const { value: i, type: r, comment: o, range: a } = e.type === "block-scalar" ? bi(s, e, n) : Si(e, s.options.strict, n), l = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3256
3256
  let c;
3257
- s.options.stringKeys && s.atKey ? c = s.schema[H] : l ? c = Ni(s.schema, i, l, t, n) : e.type === "scalar" ? c = Ii(s, i, e, n) : c = s.schema[H];
3257
+ s.options.stringKeys && s.atKey ? c = s.schema[H] : l ? c = Oi(s.schema, i, l, t, n) : e.type === "scalar" ? c = vi(s, i, e, n) : c = s.schema[H];
3258
3258
  let u;
3259
3259
  try {
3260
3260
  const f = c.resolve(i, (d) => n(t ?? e, "TAG_RESOLVE_FAILED", d), s.options);
3261
- u = O(f) ? f : new I(f);
3261
+ u = O(f) ? f : new $(f);
3262
3262
  } catch (f) {
3263
3263
  const d = f instanceof Error ? f.message : String(f);
3264
- n(t ?? e, "TAG_RESOLVE_FAILED", d), u = new I(i);
3264
+ n(t ?? e, "TAG_RESOLVE_FAILED", d), u = new $(i);
3265
3265
  }
3266
3266
  return u.range = a, u.source = i, r && (u.type = r), l && (u.tag = l), c.format && (u.format = c.format), o && (u.comment = o), u;
3267
3267
  }
3268
- function Ni(s, e, t, n, i) {
3268
+ function Oi(s, e, t, n, i) {
3269
3269
  var a;
3270
3270
  if (t === "!")
3271
3271
  return s[H];
@@ -3282,7 +3282,7 @@ function Ni(s, e, t, n, i) {
3282
3282
  const o = s.knownTags[t];
3283
3283
  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]);
3284
3284
  }
3285
- function Ii({ atKey: s, directives: e, schema: t }, n, i, r) {
3285
+ function vi({ atKey: s, directives: e, schema: t }, n, i, r) {
3286
3286
  const o = t.tags.find((a) => {
3287
3287
  var l;
3288
3288
  return (a.default === !0 || s && a.default === "key") && ((l = a.test) == null ? void 0 : l.test(n));
@@ -3299,7 +3299,7 @@ function Ii({ atKey: s, directives: e, schema: t }, n, i, r) {
3299
3299
  }
3300
3300
  return o;
3301
3301
  }
3302
- function $i(s, e, t) {
3302
+ function Li(s, e, t) {
3303
3303
  if (e) {
3304
3304
  t ?? (t = e.length);
3305
3305
  for (let n = t - 1; n >= 0; --n) {
@@ -3318,25 +3318,25 @@ function $i(s, e, t) {
3318
3318
  }
3319
3319
  return s;
3320
3320
  }
3321
- const Ti = { composeNode: Ws, composeEmptyNode: jt };
3322
- function Ws(s, e, t, n) {
3321
+ const Ci = { composeNode: Xs, composeEmptyNode: Rt };
3322
+ function Xs(s, e, t, n) {
3323
3323
  const i = s.atKey, { spaceBefore: r, comment: o, anchor: a, tag: l } = t;
3324
3324
  let c, u = !0;
3325
3325
  switch (e.type) {
3326
3326
  case "alias":
3327
- c = Ai(s, e, n), (a || l) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3327
+ c = _i(s, e, n), (a || l) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3328
3328
  break;
3329
3329
  case "scalar":
3330
3330
  case "single-quoted-scalar":
3331
3331
  case "double-quoted-scalar":
3332
3332
  case "block-scalar":
3333
- c = Js(s, e, l, n), a && (c.anchor = a.source.substring(1));
3333
+ c = zs(s, e, l, n), a && (c.anchor = a.source.substring(1));
3334
3334
  break;
3335
3335
  case "block-map":
3336
3336
  case "block-seq":
3337
3337
  case "flow-collection":
3338
3338
  try {
3339
- c = di(Ti, s, e, t, n), a && (c.anchor = a.source.substring(1));
3339
+ c = yi(Ci, s, e, t, n), a && (c.anchor = a.source.substring(1));
3340
3340
  } catch (f) {
3341
3341
  const d = f instanceof Error ? f.message : String(f);
3342
3342
  n(e, "RESOURCE_EXHAUSTION", d);
@@ -3347,31 +3347,31 @@ function Ws(s, e, t, n) {
3347
3347
  n(e, "UNEXPECTED_TOKEN", f), u = !1;
3348
3348
  }
3349
3349
  }
3350
- return c ?? (c = jt(s, e.offset, void 0, null, t, n)), a && c.anchor === "" && n(a, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!O(c) || typeof c.value != "string" || c.tag && c.tag !== "tag:yaml.org,2002:str") && n(l ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (c.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? c.comment = o : c.commentBefore = o), s.options.keepSourceTokens && u && (c.srcToken = e), c;
3350
+ return c ?? (c = Rt(s, e.offset, void 0, null, t, n)), a && c.anchor === "" && n(a, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!O(c) || typeof c.value != "string" || c.tag && c.tag !== "tag:yaml.org,2002:str") && n(l ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (c.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? c.comment = o : c.commentBefore = o), s.options.keepSourceTokens && u && (c.srcToken = e), c;
3351
3351
  }
3352
- function jt(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: a, end: l }, c) {
3352
+ function Rt(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: a, end: l }, c) {
3353
3353
  const u = {
3354
3354
  type: "scalar",
3355
- offset: $i(e, t, n),
3355
+ offset: Li(e, t, n),
3356
3356
  indent: -1,
3357
3357
  source: ""
3358
- }, f = Js(s, u, a, c);
3358
+ }, f = zs(s, u, a, c);
3359
3359
  return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = l), f;
3360
3360
  }
3361
- function Ai({ options: s }, { offset: e, source: t, end: n }, i) {
3362
- const r = new Nt(t.substring(1));
3361
+ function _i({ options: s }, { offset: e, source: t, end: n }, i) {
3362
+ const r = new $t(t.substring(1));
3363
3363
  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);
3364
- const o = e + t.length, a = Pe(n, o, s.strict, i);
3364
+ const o = e + t.length, a = Re(n, o, s.strict, i);
3365
3365
  return r.range = [e, o, a.offset], a.comment && (r.comment = a.comment), r;
3366
3366
  }
3367
- function Oi(s, e, { offset: t, start: n, value: i, end: r }, o) {
3368
- const a = Object.assign({ _directives: e }, s), l = new _e(void 0, a), c = {
3367
+ function Pi(s, e, { offset: t, start: n, value: i, end: r }, o) {
3368
+ const a = Object.assign({ _directives: e }, s), l = new je(void 0, a), c = {
3369
3369
  atKey: !1,
3370
3370
  atRoot: !0,
3371
3371
  directives: l.directives,
3372
3372
  options: l.options,
3373
3373
  schema: l.schema
3374
- }, u = de(n, {
3374
+ }, u = pe(n, {
3375
3375
  indicator: "doc-start",
3376
3376
  next: i ?? (r == null ? void 0 : r[0]),
3377
3377
  offset: t,
@@ -3379,11 +3379,11 @@ function Oi(s, e, { offset: t, start: n, value: i, end: r }, o) {
3379
3379
  parentIndent: 0,
3380
3380
  startOnNewline: !0
3381
3381
  });
3382
- u.found && (l.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")), l.contents = i ? Ws(c, i, u, o) : jt(c, u.end, n, null, u, o);
3383
- const f = l.contents.range[2], d = Pe(r, f, !1, o);
3382
+ u.found && (l.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")), l.contents = i ? Xs(c, i, u, o) : Rt(c, u.end, n, null, u, o);
3383
+ const f = l.contents.range[2], d = Re(r, f, !1, o);
3384
3384
  return d.comment && (l.comment = d.comment), l.range = [t, f, d.offset], l;
3385
3385
  }
3386
- function we(s) {
3386
+ function Ee(s) {
3387
3387
  if (typeof s == "number")
3388
3388
  return [s, s + 1];
3389
3389
  if (Array.isArray(s))
@@ -3391,7 +3391,7 @@ function we(s) {
3391
3391
  const { offset: e, source: t } = s;
3392
3392
  return [e, e + (typeof t == "string" ? t.length : 1)];
3393
3393
  }
3394
- function xt(s) {
3394
+ function ss(s) {
3395
3395
  var i;
3396
3396
  let e = "", t = !1, n = !1;
3397
3397
  for (let r = 0; r < s.length; ++r) {
@@ -3412,15 +3412,15 @@ function xt(s) {
3412
3412
  }
3413
3413
  return { comment: e, afterEmptyLine: n };
3414
3414
  }
3415
- class vi {
3415
+ class Di {
3416
3416
  constructor(e = {}) {
3417
3417
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3418
- const o = we(t);
3419
- r ? this.warnings.push(new li(o, n, i)) : this.errors.push(new Se(o, n, i));
3418
+ const o = Ee(t);
3419
+ r ? this.warnings.push(new hi(o, n, i)) : this.errors.push(new $e(o, n, i));
3420
3420
  }, this.directives = new D({ version: e.version || "1.2" }), this.options = e;
3421
3421
  }
3422
3422
  decorate(e, t) {
3423
- const { comment: n, afterEmptyLine: i } = xt(this.prelude);
3423
+ const { comment: n, afterEmptyLine: i } = ss(this.prelude);
3424
3424
  if (n) {
3425
3425
  const r = e.contents;
3426
3426
  if (t)
@@ -3456,7 +3456,7 @@ ${o}` : n;
3456
3456
  */
3457
3457
  streamInfo() {
3458
3458
  return {
3459
- comment: xt(this.prelude).comment,
3459
+ comment: ss(this.prelude).comment,
3460
3460
  directives: this.directives,
3461
3461
  errors: this.errors,
3462
3462
  warnings: this.warnings
@@ -3478,12 +3478,12 @@ ${o}` : n;
3478
3478
  switch (e.type) {
3479
3479
  case "directive":
3480
3480
  this.directives.add(e.source, (t, n, i) => {
3481
- const r = we(e);
3481
+ const r = Ee(e);
3482
3482
  r[0] += t, this.onError(r, "BAD_DIRECTIVE", n, i);
3483
3483
  }), this.prelude.push(e.source), this.atDirectives = !0;
3484
3484
  break;
3485
3485
  case "document": {
3486
- const t = Oi(this.options, this.directives, e, this.onError);
3486
+ const t = Pi(this.options, this.directives, e, this.onError);
3487
3487
  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;
3488
3488
  break;
3489
3489
  }
@@ -3495,18 +3495,18 @@ ${o}` : n;
3495
3495
  this.prelude.push(e.source);
3496
3496
  break;
3497
3497
  case "error": {
3498
- const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new Se(we(e), "UNEXPECTED_TOKEN", t);
3498
+ const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new $e(Ee(e), "UNEXPECTED_TOKEN", t);
3499
3499
  this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
3500
3500
  break;
3501
3501
  }
3502
3502
  case "doc-end": {
3503
3503
  if (!this.doc) {
3504
3504
  const n = "Unexpected doc-end without preceding document";
3505
- this.errors.push(new Se(we(e), "UNEXPECTED_TOKEN", n));
3505
+ this.errors.push(new $e(Ee(e), "UNEXPECTED_TOKEN", n));
3506
3506
  break;
3507
3507
  }
3508
3508
  this.doc.directives.docEnd = !0;
3509
- const t = Pe(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
3509
+ const t = Re(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
3510
3510
  if (this.decorate(this.doc, !0), t.comment) {
3511
3511
  const n = this.doc.comment;
3512
3512
  this.doc.comment = n ? `${n}
@@ -3516,7 +3516,7 @@ ${t.comment}` : t.comment;
3516
3516
  break;
3517
3517
  }
3518
3518
  default:
3519
- this.errors.push(new Se(we(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3519
+ this.errors.push(new $e(Ee(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3520
3520
  }
3521
3521
  }
3522
3522
  /**
@@ -3529,21 +3529,21 @@ ${t.comment}` : t.comment;
3529
3529
  if (this.doc)
3530
3530
  this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3531
3531
  else if (e) {
3532
- const n = Object.assign({ _directives: this.directives }, this.options), i = new _e(void 0, n);
3532
+ const n = Object.assign({ _directives: this.directives }, this.options), i = new je(void 0, n);
3533
3533
  this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3534
3534
  }
3535
3535
  }
3536
3536
  }
3537
- const Qs = "\uFEFF", zs = "", Xs = "", bt = "";
3538
- function Li(s) {
3537
+ const Zs = "\uFEFF", xs = "", en = "", kt = "";
3538
+ function ji(s) {
3539
3539
  switch (s) {
3540
- case Qs:
3540
+ case Zs:
3541
3541
  return "byte-order-mark";
3542
- case zs:
3542
+ case xs:
3543
3543
  return "doc-mode";
3544
- case Xs:
3544
+ case en:
3545
3545
  return "flow-error-end";
3546
- case bt:
3546
+ case kt:
3547
3547
  return "scalar";
3548
3548
  case "---":
3549
3549
  return "doc-start";
@@ -3609,9 +3609,9 @@ function F(s) {
3609
3609
  return !1;
3610
3610
  }
3611
3611
  }
3612
- const es = new Set("0123456789ABCDEFabcdef"), Ci = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Be = new Set(",[]{}"), _i = new Set(` ,[]{}
3613
- \r `), ut = (s) => !s || _i.has(s);
3614
- class Pi {
3612
+ const ns = new Set("0123456789ABCDEFabcdef"), Ri = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), qe = new Set(",[]{}"), Mi = new Set(` ,[]{}
3613
+ \r `), ht = (s) => !s || Mi.has(s);
3614
+ class Bi {
3615
3615
  constructor() {
3616
3616
  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;
3617
3617
  }
@@ -3703,7 +3703,7 @@ class Pi {
3703
3703
  let e = this.getLine();
3704
3704
  if (e === null)
3705
3705
  return this.setNext("stream");
3706
- if (e[0] === Qs && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3706
+ if (e[0] === Zs && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3707
3707
  let t = e.length, n = e.indexOf("#");
3708
3708
  for (; n !== -1; ) {
3709
3709
  const r = e[n - 1];
@@ -3727,7 +3727,7 @@ class Pi {
3727
3727
  const t = yield* this.pushSpaces(!0);
3728
3728
  return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3729
3729
  }
3730
- return yield zs, yield* this.parseLineStart();
3730
+ return yield xs, yield* this.parseLineStart();
3731
3731
  }
3732
3732
  *parseLineStart() {
3733
3733
  const e = this.charAt(0);
@@ -3770,7 +3770,7 @@ class Pi {
3770
3770
  case "]":
3771
3771
  return yield* this.pushCount(1), "doc";
3772
3772
  case "*":
3773
- return yield* this.pushUntil(ut), "doc";
3773
+ return yield* this.pushUntil(ht), "doc";
3774
3774
  case '"':
3775
3775
  case "'":
3776
3776
  return yield* this.parseQuotedScalar();
@@ -3790,7 +3790,7 @@ class Pi {
3790
3790
  if (i === null)
3791
3791
  return this.setNext("flow");
3792
3792
  if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && F(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
3793
- return this.flowLevel = 0, yield Xs, yield* this.parseLineStart();
3793
+ return this.flowLevel = 0, yield en, yield* this.parseLineStart();
3794
3794
  let r = 0;
3795
3795
  for (; i[r] === ","; )
3796
3796
  r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
@@ -3806,7 +3806,7 @@ class Pi {
3806
3806
  case "]":
3807
3807
  return yield* this.pushCount(1), this.flowKey = !0, this.flowLevel -= 1, this.flowLevel ? "flow" : "doc";
3808
3808
  case "*":
3809
- return yield* this.pushUntil(ut), "flow";
3809
+ return yield* this.pushUntil(ht), "flow";
3810
3810
  case '"':
3811
3811
  case "'":
3812
3812
  return this.flowKey = !0, yield* this.parseQuotedScalar();
@@ -3928,7 +3928,7 @@ class Pi {
3928
3928
  else
3929
3929
  break;
3930
3930
  } while (!0);
3931
- return yield bt, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3931
+ return yield kt, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3932
3932
  }
3933
3933
  *parsePlainScalar() {
3934
3934
  const e = this.flowLevel > 0;
@@ -3936,14 +3936,14 @@ class Pi {
3936
3936
  for (; i = this.buffer[++n]; )
3937
3937
  if (i === ":") {
3938
3938
  const r = this.buffer[n + 1];
3939
- if (F(r) || e && Be.has(r))
3939
+ if (F(r) || e && qe.has(r))
3940
3940
  break;
3941
3941
  t = n;
3942
3942
  } else if (F(i)) {
3943
3943
  let r = this.buffer[n + 1];
3944
3944
  if (i === "\r" && (r === `
3945
3945
  ` ? (n += 1, i = `
3946
- `, r = this.buffer[n + 1]) : t = n), r === "#" || e && Be.has(r))
3946
+ `, r = this.buffer[n + 1]) : t = n), r === "#" || e && qe.has(r))
3947
3947
  break;
3948
3948
  if (i === `
3949
3949
  `) {
@@ -3953,11 +3953,11 @@ class Pi {
3953
3953
  n = Math.max(n, o - 2);
3954
3954
  }
3955
3955
  } else {
3956
- if (e && Be.has(i))
3956
+ if (e && qe.has(i))
3957
3957
  break;
3958
3958
  t = n;
3959
3959
  }
3960
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield bt, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3960
+ return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield kt, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3961
3961
  }
3962
3962
  *pushCount(e) {
3963
3963
  return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
@@ -3974,13 +3974,13 @@ class Pi {
3974
3974
  e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
3975
3975
  continue e;
3976
3976
  case "&":
3977
- e += yield* this.pushUntil(ut), e += yield* this.pushSpaces(!0);
3977
+ e += yield* this.pushUntil(ht), e += yield* this.pushSpaces(!0);
3978
3978
  continue e;
3979
3979
  case "-":
3980
3980
  case "?":
3981
3981
  case ":": {
3982
3982
  const t = this.flowLevel > 0, n = this.charAt(1);
3983
- if (F(n) || t && Be.has(n)) {
3983
+ if (F(n) || t && qe.has(n)) {
3984
3984
  t ? this.flowKey && (this.flowKey = !1) : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
3985
3985
  continue e;
3986
3986
  }
@@ -3999,9 +3999,9 @@ class Pi {
3999
3999
  } else {
4000
4000
  let e = this.pos + 1, t = this.buffer[e];
4001
4001
  for (; t; )
4002
- if (Ci.has(t))
4002
+ if (Ri.has(t))
4003
4003
  t = this.buffer[++e];
4004
- else if (t === "%" && es.has(this.buffer[e + 1]) && es.has(this.buffer[e + 2]))
4004
+ else if (t === "%" && ns.has(this.buffer[e + 1]) && ns.has(this.buffer[e + 2]))
4005
4005
  t = this.buffer[e += 3];
4006
4006
  else
4007
4007
  break;
@@ -4029,7 +4029,7 @@ class Pi {
4029
4029
  return yield* this.pushToIndex(t, !1);
4030
4030
  }
4031
4031
  }
4032
- class Di {
4032
+ class Ki {
4033
4033
  constructor() {
4034
4034
  this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4035
4035
  let t = 0, n = this.lineStarts.length;
@@ -4052,7 +4052,7 @@ function z(s, e) {
4052
4052
  return !0;
4053
4053
  return !1;
4054
4054
  }
4055
- function ts(s) {
4055
+ function is(s) {
4056
4056
  for (let e = 0; e < s.length; ++e)
4057
4057
  switch (s[e].type) {
4058
4058
  case "space":
@@ -4064,7 +4064,7 @@ function ts(s) {
4064
4064
  }
4065
4065
  return -1;
4066
4066
  }
4067
- function Zs(s) {
4067
+ function tn(s) {
4068
4068
  switch (s == null ? void 0 : s.type) {
4069
4069
  case "alias":
4070
4070
  case "scalar":
@@ -4076,7 +4076,7 @@ function Zs(s) {
4076
4076
  return !1;
4077
4077
  }
4078
4078
  }
4079
- function Ke(s) {
4079
+ function Ue(s) {
4080
4080
  switch (s.type) {
4081
4081
  case "document":
4082
4082
  return s.start;
@@ -4090,7 +4090,7 @@ function Ke(s) {
4090
4090
  return [];
4091
4091
  }
4092
4092
  }
4093
- function re(s) {
4093
+ function oe(s) {
4094
4094
  var t;
4095
4095
  if (s.length === 0)
4096
4096
  return [];
@@ -4108,25 +4108,25 @@ function re(s) {
4108
4108
  ;
4109
4109
  return s.splice(e, s.length);
4110
4110
  }
4111
- function Je(s, e) {
4111
+ function Qe(s, e) {
4112
4112
  if (e.length < 1e5)
4113
4113
  Array.prototype.push.apply(s, e);
4114
4114
  else
4115
4115
  for (let t = 0; t < e.length; ++t)
4116
4116
  s.push(e[t]);
4117
4117
  }
4118
- function ss(s) {
4118
+ function rs(s) {
4119
4119
  if (s.start.type === "flow-seq-start")
4120
4120
  for (const e of s.items)
4121
- e.sep && !e.value && !z(e.start, "explicit-key-ind") && !z(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, Zs(e.value) ? e.value.end ? Je(e.value.end, e.sep) : e.value.end = e.sep : Je(e.start, e.sep), delete e.sep);
4121
+ e.sep && !e.value && !z(e.start, "explicit-key-ind") && !z(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, tn(e.value) ? e.value.end ? Qe(e.value.end, e.sep) : e.value.end = e.sep : Qe(e.start, e.sep), delete e.sep);
4122
4122
  }
4123
- class ji {
4123
+ class qi {
4124
4124
  /**
4125
4125
  * @param onNewLine - If defined, called separately with the start position of
4126
4126
  * each new line (in `parse()`, including the start of input).
4127
4127
  */
4128
4128
  constructor(e) {
4129
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Pi(), this.onNewLine = e;
4129
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Bi(), this.onNewLine = e;
4130
4130
  }
4131
4131
  /**
4132
4132
  * Parse `source` as a YAML stream.
@@ -4150,7 +4150,7 @@ class ji {
4150
4150
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
4151
4151
  return;
4152
4152
  }
4153
- const t = Li(e);
4153
+ const t = ji(e);
4154
4154
  if (t)
4155
4155
  if (t === "scalar")
4156
4156
  this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
@@ -4239,7 +4239,7 @@ class ji {
4239
4239
  yield t;
4240
4240
  else {
4241
4241
  const n = this.peek(1);
4242
- 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" && ss(t), n.type) {
4242
+ 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" && rs(t), n.type) {
4243
4243
  case "document":
4244
4244
  n.value = t;
4245
4245
  break;
@@ -4274,7 +4274,7 @@ class ji {
4274
4274
  }
4275
4275
  if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4276
4276
  const i = t.items[t.items.length - 1];
4277
- i && !i.sep && !i.value && i.start.length > 0 && ts(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));
4277
+ i && !i.sep && !i.value && i.start.length > 0 && is(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));
4278
4278
  }
4279
4279
  }
4280
4280
  }
@@ -4312,7 +4312,7 @@ class ji {
4312
4312
  return yield* this.lineEnd(e);
4313
4313
  switch (this.type) {
4314
4314
  case "doc-start": {
4315
- ts(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4315
+ is(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4316
4316
  return;
4317
4317
  }
4318
4318
  case "anchor":
@@ -4333,7 +4333,7 @@ class ji {
4333
4333
  }
4334
4334
  *scalar(e) {
4335
4335
  if (this.type === "map-value-ind") {
4336
- const t = Ke(this.peek(2)), n = re(t);
4336
+ const t = Ue(this.peek(2)), n = oe(t);
4337
4337
  let i;
4338
4338
  e.end ? (i = e.end, i.push(this.sourceToken), delete e.end) : i = [this.sourceToken];
4339
4339
  const r = {
@@ -4387,7 +4387,7 @@ class ji {
4387
4387
  if (this.atIndentedComment(t.start, e.indent)) {
4388
4388
  const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4389
4389
  if (Array.isArray(r)) {
4390
- Je(r, t.start), r.push(this.sourceToken), e.items.pop();
4390
+ Qe(r, t.start), r.push(this.sourceToken), e.items.pop();
4391
4391
  return;
4392
4392
  }
4393
4393
  }
@@ -4442,8 +4442,8 @@ class ji {
4442
4442
  indent: this.indent,
4443
4443
  items: [{ start: o, key: null, sep: [this.sourceToken] }]
4444
4444
  });
4445
- else if (Zs(t.key) && !z(t.sep, "newline")) {
4446
- const a = re(t.start), l = t.key, c = t.sep;
4445
+ else if (tn(t.key) && !z(t.sep, "newline")) {
4446
+ const a = oe(t.start), l = t.key, c = t.sep;
4447
4447
  c.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4448
4448
  type: "block-map",
4449
4449
  offset: this.offset,
@@ -4454,7 +4454,7 @@ class ji {
4454
4454
  else if (z(t.start, "newline"))
4455
4455
  Object.assign(t, { key: null, sep: [this.sourceToken] });
4456
4456
  else {
4457
- const a = re(t.start);
4457
+ const a = oe(t.start);
4458
4458
  this.stack.push({
4459
4459
  type: "block-map",
4460
4460
  offset: this.offset,
@@ -4520,7 +4520,7 @@ class ji {
4520
4520
  if (this.atIndentedComment(t.start, e.indent)) {
4521
4521
  const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4522
4522
  if (Array.isArray(r)) {
4523
- Je(r, t.start), r.push(this.sourceToken), e.items.pop();
4523
+ Qe(r, t.start), r.push(this.sourceToken), e.items.pop();
4524
4524
  return;
4525
4525
  }
4526
4526
  }
@@ -4591,8 +4591,8 @@ class ji {
4591
4591
  if (n.type === "block-map" && (this.type === "map-value-ind" && n.indent === e.indent || this.type === "newline" && !n.items[n.items.length - 1].sep))
4592
4592
  yield* this.pop(), yield* this.step();
4593
4593
  else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4594
- const i = Ke(n), r = re(i);
4595
- ss(e);
4594
+ const i = Ue(n), r = oe(i);
4595
+ rs(e);
4596
4596
  const o = e.end.splice(1, e.end.length);
4597
4597
  o.push(this.sourceToken);
4598
4598
  const a = {
@@ -4655,7 +4655,7 @@ class ji {
4655
4655
  };
4656
4656
  case "explicit-key-ind": {
4657
4657
  this.onKeyLine = !0;
4658
- const t = Ke(e), n = re(t);
4658
+ const t = Ue(e), n = oe(t);
4659
4659
  return n.push(this.sourceToken), {
4660
4660
  type: "block-map",
4661
4661
  offset: this.offset,
@@ -4665,7 +4665,7 @@ class ji {
4665
4665
  }
4666
4666
  case "map-value-ind": {
4667
4667
  this.onKeyLine = !0;
4668
- const t = Ke(e), n = re(t);
4668
+ const t = Ue(e), n = oe(t);
4669
4669
  return {
4670
4670
  type: "block-map",
4671
4671
  offset: this.offset,
@@ -4701,54 +4701,54 @@ class ji {
4701
4701
  }
4702
4702
  }
4703
4703
  }
4704
- function Ri(s) {
4704
+ function Ui(s) {
4705
4705
  const e = s.prettyErrors !== !1;
4706
- return { lineCounter: s.lineCounter || e && new Di() || null, prettyErrors: e };
4706
+ return { lineCounter: s.lineCounter || e && new Ki() || null, prettyErrors: e };
4707
4707
  }
4708
- function Mi(s, e = {}) {
4709
- const { lineCounter: t, prettyErrors: n } = Ri(e), i = new ji(t == null ? void 0 : t.addNewLine), r = new vi(e);
4708
+ function Fi(s, e = {}) {
4709
+ const { lineCounter: t, prettyErrors: n } = Ui(e), i = new qi(t == null ? void 0 : t.addNewLine), r = new Di(e);
4710
4710
  let o = null;
4711
4711
  for (const a of r.compose(i.parse(s), !0, s.length))
4712
4712
  if (!o)
4713
4713
  o = a;
4714
4714
  else if (o.options.logLevel !== "silent") {
4715
- o.errors.push(new Se(a.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4715
+ o.errors.push(new $e(a.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4716
4716
  break;
4717
4717
  }
4718
- return n && t && (o.errors.forEach(Xt(s, t)), o.warnings.forEach(Xt(s, t))), o;
4718
+ return n && t && (o.errors.forEach(es(s, t)), o.warnings.forEach(es(s, t))), o;
4719
4719
  }
4720
- function Bi(s, e, t) {
4720
+ function Yi(s, e, t) {
4721
4721
  let n;
4722
- const i = Mi(s, t);
4722
+ const i = Fi(s, t);
4723
4723
  if (!i)
4724
4724
  return null;
4725
- if (i.warnings.forEach((r) => Is(i.options.logLevel, r)), i.errors.length > 0) {
4725
+ if (i.warnings.forEach((r) => As(i.options.logLevel, r)), i.errors.length > 0) {
4726
4726
  if (i.options.logLevel !== "silent")
4727
4727
  throw i.errors[0];
4728
4728
  i.errors = [];
4729
4729
  }
4730
4730
  return i.toJS(Object.assign({ reviver: n }, t));
4731
4731
  }
4732
- function Ki(s, e, t) {
4732
+ function Vi(s, e, t) {
4733
4733
  let n = null;
4734
4734
  if (Array.isArray(e) && (n = e), s === void 0) {
4735
4735
  const { keepUndefined: i } = {};
4736
4736
  if (!i)
4737
4737
  return;
4738
4738
  }
4739
- return Oe(s) && !n ? s.toString(t) : new _e(s, n, t).toString(t);
4739
+ return Ce(s) && !n ? s.toString(t) : new je(s, n, t).toString(t);
4740
4740
  }
4741
- const qi = /^#{2,3}\s+/, ns = /^[-*]\s+\[([ xX])\]\s+(.*)$/, Fi = /^\[review\]\s+(.*)$/, Ui = /^-\s+(\d{4}-\d{2}-\d{2}):\s*(.*)$/;
4742
- function Yi(s, e, t) {
4741
+ const Gi = /^#{2,3}\s+/, os = /^[-*]\s+\[([ xX])\]\s+(.*)$/, Hi = /^\[review\]\s+(.*)$/, Ji = /^-\s+(\d{4}-\d{2}-\d{2}):\s*(.*)$/;
4742
+ function Wi(s, e, t) {
4743
4743
  const n = [];
4744
4744
  let i = e;
4745
4745
  for (; i < t; ) {
4746
- const r = s[i].match(ns);
4746
+ const r = s[i].match(os);
4747
4747
  if (r) {
4748
- const o = r[1].toLowerCase() === "x", a = r[2].trim(), l = a.match(Fi), c = l ? l[1].trim() : a, u = l ? "review" : void 0, f = [];
4748
+ const o = r[1].toLowerCase() === "x", a = r[2].trim(), l = a.match(Hi), c = l ? l[1].trim() : a, u = l ? "review" : void 0, f = [];
4749
4749
  for (i++; i < t; ) {
4750
4750
  const d = s[i];
4751
- if (d.trim() === "" || ns.test(d) || qi.test(d)) break;
4751
+ if (d.trim() === "" || os.test(d) || Gi.test(d)) break;
4752
4752
  if (/^\s/.test(d))
4753
4753
  f.push(d.trimStart()), i++;
4754
4754
  else
@@ -4766,15 +4766,15 @@ function Yi(s, e, t) {
4766
4766
  }
4767
4767
  return n;
4768
4768
  }
4769
- function xs(s, e, t) {
4769
+ function sn(s, e, t) {
4770
4770
  const n = [];
4771
4771
  for (let i = e; i < t; i++) {
4772
- const r = s[i].match(Ui);
4772
+ const r = s[i].match(Ji);
4773
4773
  r && n.push({ date: r[1], text: r[2].trim() });
4774
4774
  }
4775
4775
  return n;
4776
4776
  }
4777
- function Vi(s) {
4777
+ function Qi(s) {
4778
4778
  const e = ["### Phases"];
4779
4779
  for (const t of s) {
4780
4780
  const n = t.source === "review" ? `[review] ${t.text}` : t.text;
@@ -4784,59 +4784,59 @@ function Vi(s) {
4784
4784
  }
4785
4785
  return e;
4786
4786
  }
4787
- function en(s, e) {
4787
+ function nn(s, e) {
4788
4788
  return [s, ...e.map((t) => `- ${t.date}: ${t.text}`)];
4789
4789
  }
4790
- const it = {
4790
+ const rt = {
4791
4791
  headingRe: /^#{2,3}\s+Phases\s*$/i,
4792
- parseEntries: Yi,
4793
- formatLines: Vi
4794
- }, be = {
4792
+ parseEntries: Wi,
4793
+ formatLines: Qi
4794
+ }, Se = {
4795
4795
  headingRe: /^#{2,3}\s+Log\s*$/i,
4796
- parseEntries: xs,
4797
- formatLines: (s) => en("### Log", s)
4798
- }, rt = {
4796
+ parseEntries: sn,
4797
+ formatLines: (s) => nn("### Log", s)
4798
+ }, ot = {
4799
4799
  headingRe: /^#{2,3}\s+Clarifications\s*$/i,
4800
- parseEntries: xs,
4801
- formatLines: (s) => en("### Clarifications", s)
4802
- }, qe = b.preprocess(
4800
+ parseEntries: sn,
4801
+ formatLines: (s) => nn("### Clarifications", s)
4802
+ }, Fe = b.preprocess(
4803
4803
  (s) => typeof s == "string" ? { agent: s } : s,
4804
4804
  b.object({
4805
- agent: b.enum(Ae),
4805
+ agent: b.enum(Le),
4806
4806
  model: b.string().optional(),
4807
4807
  effort: b.string().optional()
4808
4808
  })
4809
- ), G = b.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD"), Gi = b.object({
4809
+ ), G = b.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD"), zi = b.object({
4810
4810
  status: b.enum(["idea", "planned", "in-progress", "review", "done", "dropped"]),
4811
4811
  kind: b.enum(["feat", "fix", "chore", "docs", "refactor"]).optional(),
4812
4812
  id: b.string().optional(),
4813
4813
  idea: b.string().optional(),
4814
- agent: b.enum(Ae).optional(),
4814
+ agent: b.enum(Le).optional(),
4815
4815
  created: G,
4816
4816
  updated: G.optional(),
4817
4817
  tags: b.string().optional()
4818
- }), Hi = b.object({
4818
+ }), Xi = b.object({
4819
4819
  date: G,
4820
4820
  status: b.enum(["decided", "superseded"]),
4821
4821
  "superseded-by": b.string().optional()
4822
- }), Ji = b.object({
4822
+ }), Zi = b.object({
4823
4823
  status: b.enum(["open", "resolved"]),
4824
4824
  raised: G,
4825
4825
  "resolved-by": b.string().optional(),
4826
4826
  blocks: b.string().optional()
4827
- }), Wi = b.object({
4827
+ }), xi = b.object({
4828
4828
  id: b.string().describe("Permanent plan ID, e.g. FEAT-24"),
4829
4829
  title: b.string().describe('Human-readable plan name, e.g. "Plan storage architecture"'),
4830
4830
  kind: b.enum(["feat", "fix", "chore", "docs", "refactor"]).describe("Plan kind matching Conventional Commits types"),
4831
4831
  status: b.enum(["idea", "planned", "in-progress", "review", "done", "dropped"]).describe("Current lifecycle status"),
4832
4832
  idea: b.string().optional().describe("IDEA-N backlink if this plan grew out of an idea"),
4833
- agent: b.enum(Ae).optional().describe("Per-plan agent override"),
4833
+ agent: b.enum(Le).optional().describe("Per-plan agent override"),
4834
4834
  created: G.describe("Creation date (YYYY-MM-DD)"),
4835
4835
  updated: G.optional().describe("Last significant update date (YYYY-MM-DD)"),
4836
4836
  audited: G.optional().describe("Date of last successful convergence audit (YYYY-MM-DD)"),
4837
4837
  "audited-hash": b.string().optional().describe("Content hash of the plan at last audit, used to detect edits regardless of mtime"),
4838
4838
  tags: b.array(b.string()).optional().describe("Tagging categories")
4839
- }), Qi = b.object({
4839
+ }), er = b.object({
4840
4840
  id: b.string().describe("Permanent idea ID, e.g. IDEA-20"),
4841
4841
  title: b.string().describe("Short idea headline (3-6 words)"),
4842
4842
  kind: b.enum(["idea", "note"]).optional().describe('"note" for ideas that never need a plan; omitted means a plan-bearing idea'),
@@ -4844,7 +4844,7 @@ const it = {
4844
4844
  }).refine((s) => s.status === void 0 || s.kind === "note", {
4845
4845
  message: "status is only valid on ideas with kind: note",
4846
4846
  path: ["status"]
4847
- }), zi = b.object({
4847
+ }), tr = b.object({
4848
4848
  id: b.string().describe("Permanent lifetime entity ID, e.g. IDEA-45 — never changes"),
4849
4849
  title: b.string().describe("Human-readable entity name"),
4850
4850
  type: b.enum(["feat", "fix", "chore", "docs", "refactor"]).optional().describe(
@@ -4854,7 +4854,7 @@ const it = {
4854
4854
  status: b.enum(["idea", "planned", "in-progress", "review", "done", "dropped", "open"]).optional().describe(
4855
4855
  "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."
4856
4856
  ),
4857
- agent: b.enum(Ae).optional().describe("Per-entity agent override"),
4857
+ agent: b.enum(Le).optional().describe("Per-entity agent override"),
4858
4858
  created: G.describe("Creation date (YYYY-MM-DD)"),
4859
4859
  updated: G.optional().describe("Last significant update date (YYYY-MM-DD)"),
4860
4860
  audited: G.optional().describe("Date of last successful convergence audit (YYYY-MM-DD)"),
@@ -4873,7 +4873,7 @@ const it = {
4873
4873
  ).refine((s) => s.kind === "note" || s.status !== "open", {
4874
4874
  message: "status open is only valid on entities with kind: note",
4875
4875
  path: ["status"]
4876
- }), Xi = b.object({
4876
+ }), sr = b.object({
4877
4877
  version: b.string(),
4878
4878
  projectName: b.string(),
4879
4879
  initializedAt: b.string(),
@@ -4887,21 +4887,21 @@ const it = {
4887
4887
  docs: b.number().optional(),
4888
4888
  refactor: b.number().optional()
4889
4889
  }).optional(),
4890
- defaultAgent: b.enum(Ae).optional(),
4890
+ defaultAgent: b.enum(Le).optional(),
4891
4891
  defaultAgents: b.object({
4892
- phase: qe,
4893
- planDraft: qe,
4894
- ideaExtend: qe,
4895
- commitSuggest: qe
4892
+ phase: Fe,
4893
+ planDraft: Fe,
4894
+ ideaExtend: Fe,
4895
+ commitSuggest: Fe
4896
4896
  }).optional()
4897
- }), is = /^##\s+(.+?)\s*$/, Zi = /^\*\*([A-Za-z][A-Za-z-]*):\*\*\s*(.*)$/, xi = /^#{2,3}\s+/;
4898
- function Ve(s, e) {
4897
+ }), as = /^##\s+(.+?)\s*$/, nr = /^\*\*([A-Za-z][A-Za-z-]*):\*\*\s*(.*)$/, ir = /^#{2,3}\s+/;
4898
+ function He(s, e) {
4899
4899
  const t = s.split(`
4900
4900
  `), n = t.findIndex((a) => e.headingRe.test(a));
4901
4901
  if (n === -1) return { body: s, entries: [] };
4902
4902
  let i = t.length;
4903
4903
  for (let a = n + 1; a < t.length; a++)
4904
- if (xi.test(t[a])) {
4904
+ if (ir.test(t[a])) {
4905
4905
  i = a;
4906
4906
  break;
4907
4907
  }
@@ -4909,8 +4909,8 @@ function Ve(s, e) {
4909
4909
  return { body: [...t.slice(0, n), ...t.slice(i)].join(`
4910
4910
  `).trim(), entries: r };
4911
4911
  }
4912
- function Rt(s) {
4913
- const e = Ve(s, it), t = Ve(e.body, be), n = Ve(t.body, rt);
4912
+ function Mt(s) {
4913
+ const e = He(s, rt), t = He(e.body, Se), n = He(t.body, ot);
4914
4914
  return {
4915
4915
  body: n.body,
4916
4916
  phases: e.entries,
@@ -4918,33 +4918,33 @@ function Rt(s) {
4918
4918
  clarifications: n.entries
4919
4919
  };
4920
4920
  }
4921
- function Mt(s) {
4921
+ function Bt(s) {
4922
4922
  const e = s.split(`
4923
4923
  `), t = [];
4924
4924
  for (let i = 0; i < e.length; i++)
4925
- is.test(e[i]) && t.push(i);
4925
+ as.test(e[i]) && t.push(i);
4926
4926
  const n = [];
4927
4927
  for (let i = 0; i < t.length; i++) {
4928
- const r = t[i], o = i + 1 < t.length ? t[i + 1] : e.length, a = e[r].match(is)[1], l = e.slice(r + 1, o);
4928
+ const r = t[i], o = i + 1 < t.length ? t[i + 1] : e.length, a = e[r].match(as)[1], l = e.slice(r + 1, o);
4929
4929
  let c = 0;
4930
4930
  for (; c < l.length && l[c].trim() === ""; ) c++;
4931
4931
  const u = {};
4932
4932
  for (; c < l.length; ) {
4933
- const m = l[c].match(Zi);
4933
+ const m = l[c].match(nr);
4934
4934
  if (!m) break;
4935
4935
  u[m[1].toLowerCase()] = m[2].trim(), c++;
4936
4936
  }
4937
4937
  for (; c < l.length && l[c].trim() === ""; ) c++;
4938
4938
  const f = l.slice(c).join(`
4939
- `).trim(), { body: d, phases: p, log: g, clarifications: h } = Rt(f);
4939
+ `).trim(), { body: d, phases: p, log: g, clarifications: h } = Mt(f);
4940
4940
  n.push({ title: a, fields: u, body: d, phases: p, log: g, clarifications: h });
4941
4941
  }
4942
4942
  return n;
4943
4943
  }
4944
- function Zr(s) {
4944
+ function ro(s) {
4945
4945
  const e = [], t = [];
4946
- for (const n of Mt(s)) {
4947
- const i = Gi.safeParse(n.fields);
4946
+ for (const n of Bt(s)) {
4947
+ const i = zi.safeParse(n.fields);
4948
4948
  if (!i.success) {
4949
4949
  t.push({
4950
4950
  title: n.title,
@@ -4971,10 +4971,10 @@ function Zr(s) {
4971
4971
  }
4972
4972
  return { entries: e, warnings: t };
4973
4973
  }
4974
- function er(s) {
4974
+ function rr(s) {
4975
4975
  const e = [], t = [];
4976
- for (const n of Mt(s)) {
4977
- const i = Hi.safeParse(n.fields);
4976
+ for (const n of Bt(s)) {
4977
+ const i = Xi.safeParse(n.fields);
4978
4978
  if (!i.success) {
4979
4979
  t.push({
4980
4980
  title: n.title,
@@ -4993,10 +4993,10 @@ function er(s) {
4993
4993
  }
4994
4994
  return { entries: e, warnings: t };
4995
4995
  }
4996
- function tr(s) {
4996
+ function or(s) {
4997
4997
  const e = [], t = [];
4998
- for (const n of Mt(s)) {
4999
- const i = Ji.safeParse(n.fields);
4998
+ for (const n of Bt(s)) {
4999
+ const i = Zi.safeParse(n.fields);
5000
5000
  if (!i.success) {
5001
5001
  t.push({
5002
5002
  title: n.title,
@@ -5016,15 +5016,15 @@ function tr(s) {
5016
5016
  }
5017
5017
  return { entries: e, warnings: t };
5018
5018
  }
5019
- const sr = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/;
5020
- function Bt(s, e) {
5021
- const t = [], n = s.match(sr);
5019
+ const ar = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/;
5020
+ function Kt(s, e) {
5021
+ const t = [], n = s.match(ar);
5022
5022
  if (!n)
5023
5023
  return { data: null, body: s.trim(), warnings: t };
5024
5024
  const i = n[1], r = s.slice(n[0].length).trim();
5025
5025
  let o;
5026
5026
  try {
5027
- o = Bi(i);
5027
+ o = Yi(i);
5028
5028
  } catch (l) {
5029
5029
  return t.push({
5030
5030
  title: "(frontmatter)",
@@ -5046,15 +5046,15 @@ function Bt(s, e) {
5046
5046
  }
5047
5047
  return { data: a.data, body: r, warnings: t };
5048
5048
  }
5049
- function tn(s) {
5049
+ function rn(s) {
5050
5050
  const e = [], {
5051
5051
  data: t,
5052
5052
  body: n,
5053
5053
  warnings: i
5054
- } = Bt(s, zi);
5054
+ } = Kt(s, tr);
5055
5055
  if (e.push(...i), !t)
5056
5056
  return { entries: [], warnings: e };
5057
- const { body: r, phases: o, log: a, clarifications: l } = Rt(n);
5057
+ const { body: r, phases: o, log: a, clarifications: l } = Mt(n);
5058
5058
  return t.kind === "note" && o.length > 0 && e.push({
5059
5059
  title: t.title,
5060
5060
  message: "note entities must not carry a Phases section — kept, but fix the file"
@@ -5078,15 +5078,15 @@ function tn(s) {
5078
5078
  clarifications: l
5079
5079
  }], warnings: e };
5080
5080
  }
5081
- function xr(s) {
5081
+ function oo(s) {
5082
5082
  const e = [], {
5083
5083
  data: t,
5084
5084
  body: n,
5085
5085
  warnings: i
5086
- } = Bt(s, Wi);
5086
+ } = Kt(s, xi);
5087
5087
  if (e.push(...i), !t)
5088
5088
  return { entries: [], warnings: e };
5089
- const { body: r, phases: o, log: a, clarifications: l } = Rt(n);
5089
+ const { body: r, phases: o, log: a, clarifications: l } = Mt(n);
5090
5090
  return { entries: [{
5091
5091
  title: t.title,
5092
5092
  status: t.status,
@@ -5105,15 +5105,15 @@ function xr(s) {
5105
5105
  clarifications: l
5106
5106
  }], warnings: e };
5107
5107
  }
5108
- function eo(s) {
5108
+ function ao(s) {
5109
5109
  const {
5110
5110
  data: e,
5111
5111
  body: t,
5112
5112
  warnings: n
5113
- } = Bt(s, Qi);
5113
+ } = Kt(s, er);
5114
5114
  if (!e)
5115
5115
  return { entries: [], warnings: n };
5116
- const { body: i, entries: r } = Ve(t, be);
5116
+ const { body: i, entries: r } = He(t, Se);
5117
5117
  return { entries: [{
5118
5118
  id: e.id,
5119
5119
  title: e.title,
@@ -5123,16 +5123,16 @@ function eo(s) {
5123
5123
  ...r.length > 0 && { log: r }
5124
5124
  }], warnings: n };
5125
5125
  }
5126
- const nr = /^(IDEA-\d+):\s*/, ir = /\n---+\n/;
5127
- function to(s) {
5128
- return s.split(ir).filter(Boolean).map((t) => {
5126
+ const lr = /^(IDEA-\d+):\s*/, cr = /\n---+\n/;
5127
+ function lo(s) {
5128
+ return s.split(cr).filter(Boolean).map((t) => {
5129
5129
  var l;
5130
5130
  const n = t.match(/^#{1,3}\s+(.+)/m), i = n ? n[1].trim() : ((l = t.trim().split(`
5131
- `)[0]) == null ? void 0 : l.trim()) ?? "Untitled", r = i.match(nr), o = (r == null ? void 0 : r[1]) ?? null, a = o ? i.slice(r[0].length) : i;
5131
+ `)[0]) == null ? void 0 : l.trim()) ?? "Untitled", r = i.match(lr), o = (r == null ? void 0 : r[1]) ?? null, a = o ? i.slice(r[0].length) : i;
5132
5132
  return { id: o, title: a, body: t.trim() };
5133
5133
  });
5134
5134
  }
5135
- function rr(s, e, t) {
5135
+ function fr(s, e, t) {
5136
5136
  const n = new Set(s.map((r) => r.title)), i = [];
5137
5137
  for (const r of s)
5138
5138
  r.supersededBy && !n.has(r.supersededBy) && i.push({
@@ -5159,20 +5159,20 @@ function rr(s, e, t) {
5159
5159
  }
5160
5160
  return i;
5161
5161
  }
5162
- const rs = /^##\s+(\d{4}-\d{2}-\d{2})\s*$/, or = /^[-*]\s+(.*)$/;
5163
- function so(s) {
5162
+ const ls = /^##\s+(\d{4}-\d{2}-\d{2})\s*$/, ur = /^[-*]\s+(.*)$/;
5163
+ function co(s) {
5164
5164
  const e = s.split(`
5165
5165
  `), t = [];
5166
5166
  for (let i = 0; i < e.length; i++)
5167
- rs.test(e[i]) && t.push(i);
5167
+ ls.test(e[i]) && t.push(i);
5168
5168
  const n = [];
5169
5169
  for (let i = 0; i < t.length; i++) {
5170
- const r = t[i], o = i + 1 < t.length ? t[i + 1] : e.length, a = e[r].match(rs)[1], l = e.slice(r + 1, o).map((c) => c.match(or)).filter((c) => c !== null).map((c) => c[1].trim());
5170
+ const r = t[i], o = i + 1 < t.length ? t[i + 1] : e.length, a = e[r].match(ls)[1], l = e.slice(r + 1, o).map((c) => c.match(ur)).filter((c) => c !== null).map((c) => c[1].trim());
5171
5171
  n.push({ date: a, items: l });
5172
5172
  }
5173
5173
  return n;
5174
5174
  }
5175
- function no(s) {
5175
+ function fo(s) {
5176
5176
  const e = [];
5177
5177
  for (const t of s.split(`
5178
5178
  `)) {
@@ -5185,51 +5185,51 @@ function no(s) {
5185
5185
  }
5186
5186
  return e;
5187
5187
  }
5188
- const sn = /^-\s+(\d{4}-\d{2}-\d{2}):\s+(.+?)\s+—\s+(.*)$/;
5189
- function io(s) {
5188
+ const on = /^-\s+(\d{4}-\d{2}-\d{2}):\s+(.+?)\s+—\s+(.*)$/;
5189
+ function uo(s) {
5190
5190
  const e = [];
5191
5191
  for (const t of s.split(`
5192
5192
  `)) {
5193
- const n = t.match(sn);
5193
+ const n = t.match(on);
5194
5194
  n && e.push({ date: n[1], title: n[2].trim(), description: n[3].trim() });
5195
5195
  }
5196
5196
  return e;
5197
5197
  }
5198
- function ar(s) {
5198
+ function dr(s) {
5199
5199
  return s.phases.length > 0 && s.phases.every((e) => e.done);
5200
5200
  }
5201
- function Kt(s, e, t) {
5202
- return s.kind === "note" || s.status === "dropped" ? s.status : e ? e.state === "merged" ? "done" : e.state === "closed" ? "dropped" : ar(s) ? "review" : "in-progress" : t ? s.status === "done" ? "done" : s.phases.length > 0 ? "planned" : "idea" : s.status ?? (s.phases.length > 0 ? "planned" : "idea");
5201
+ function qt(s, e, t) {
5202
+ return s.kind === "note" || s.status === "dropped" ? s.status : e ? e.state === "merged" ? "done" : e.state === "closed" ? "dropped" : dr(s) ? "review" : "in-progress" : t ? s.status === "done" ? "done" : s.phases.length > 0 ? "planned" : "idea" : s.status ?? (s.phases.length > 0 ? "planned" : "idea");
5203
5203
  }
5204
- function lr(s, e) {
5204
+ function hr(s, e) {
5205
5205
  if (s.kind === "note" || s.archived || (e == null ? void 0 : e.state) !== "merged") return !1;
5206
- const t = Kt(s, e, !0);
5206
+ const t = qt(s, e, !0);
5207
5207
  return t === "review" || t === "done";
5208
5208
  }
5209
- async function cr(s) {
5209
+ async function pr(s) {
5210
5210
  try {
5211
- return await un(s);
5211
+ return await mn(s);
5212
5212
  } catch {
5213
5213
  return [];
5214
5214
  }
5215
5215
  }
5216
- async function fr(s) {
5216
+ async function mr(s) {
5217
5217
  try {
5218
5218
  return await x(s, "utf-8");
5219
5219
  } catch {
5220
5220
  return "";
5221
5221
  }
5222
5222
  }
5223
- async function qt(s) {
5223
+ async function Ut(s) {
5224
5224
  const e = [], t = [];
5225
5225
  let n = 0;
5226
5226
  for (const i of [s, v(s, "archive")]) {
5227
- const r = i !== s, o = (await cr(i)).filter((l) => l.endsWith(".md") && l !== "index.md");
5227
+ const r = i !== s, o = (await pr(i)).filter((l) => l.endsWith(".md") && l !== "index.md");
5228
5228
  n += o.length;
5229
5229
  const a = await Promise.all(
5230
5230
  o.map(async (l) => {
5231
- const c = await fr(v(i, l));
5232
- return c ? tn(c) : { warnings: [{ title: l, message: "Could not read entity file" }] };
5231
+ const c = await mr(v(i, l));
5232
+ return c ? rn(c) : { warnings: [{ title: l, message: "Could not read entity file" }] };
5233
5233
  })
5234
5234
  );
5235
5235
  for (const l of a)
@@ -5237,11 +5237,11 @@ async function qt(s) {
5237
5237
  }
5238
5238
  return { entries: e, warnings: t, fileCount: n };
5239
5239
  }
5240
- function nn(s, e, t = !1) {
5240
+ function an(s, e, t = !1) {
5241
5241
  return {
5242
5242
  title: s.title,
5243
5243
  // Non-note entities can't carry the note-only 'open' (schema-enforced).
5244
- status: Kt(s, e, t),
5244
+ status: qt(s, e, t),
5245
5245
  kind: s.type,
5246
5246
  id: s.id,
5247
5247
  agent: s.agent,
@@ -5259,7 +5259,7 @@ function nn(s, e, t = !1) {
5259
5259
  pr: e
5260
5260
  };
5261
5261
  }
5262
- function ur(s) {
5262
+ function gr(s) {
5263
5263
  return {
5264
5264
  id: s.id,
5265
5265
  title: s.title,
@@ -5273,38 +5273,38 @@ function ur(s) {
5273
5273
  };
5274
5274
  }
5275
5275
  async function Ft(s) {
5276
- const { entries: e, warnings: t } = await qt(s), n = await On(v(s, "..", ".."));
5276
+ const { entries: e, warnings: t } = await Ut(s), n = await Pn(v(s, "..", ".."));
5277
5277
  return { entries: e, warnings: t, prs: n, resolved: n !== void 0 };
5278
5278
  }
5279
- async function ro(s) {
5279
+ async function ho(s) {
5280
5280
  const { entries: e, warnings: t, prs: n, resolved: i } = await Ft(s);
5281
5281
  return { entries: e.map((o) => ({
5282
5282
  ...o,
5283
- status: Kt(o, n == null ? void 0 : n.get(o.id), i)
5283
+ status: qt(o, n == null ? void 0 : n.get(o.id), i)
5284
5284
  })), warnings: t };
5285
5285
  }
5286
- async function oo(s) {
5286
+ async function po(s) {
5287
5287
  const { entries: e, warnings: t, prs: n, resolved: i } = await Ft(s);
5288
5288
  return {
5289
- entries: e.filter((r) => r.kind !== "note").map((r) => nn(r, n == null ? void 0 : n.get(r.id), i)),
5289
+ entries: e.filter((r) => r.kind !== "note").map((r) => an(r, n == null ? void 0 : n.get(r.id), i)),
5290
5290
  warnings: t
5291
5291
  };
5292
5292
  }
5293
- async function ao(s) {
5293
+ async function mo(s) {
5294
5294
  const { entries: e, prs: t } = await Ft(s);
5295
5295
  return e.flatMap((n) => {
5296
5296
  const i = t == null ? void 0 : t.get(n.id);
5297
- return i && lr(n, i) ? [{ id: n.id, title: n.title, pr: i }] : [];
5297
+ return i && hr(n, i) ? [{ id: n.id, title: n.title, pr: i }] : [];
5298
5298
  });
5299
5299
  }
5300
- async function lo(s) {
5301
- const { entries: e, warnings: t } = await qt(s);
5300
+ async function go(s) {
5301
+ const { entries: e, warnings: t } = await Ut(s);
5302
5302
  return {
5303
- entries: e.filter((n) => n.kind === "note").map(ur),
5303
+ entries: e.filter((n) => n.kind === "note").map(gr),
5304
5304
  warnings: t
5305
5305
  };
5306
5306
  }
5307
- function dr(s) {
5307
+ function yr(s) {
5308
5308
  const e = JSON.stringify({
5309
5309
  body: s.body,
5310
5310
  phases: s.phases.map((t) => ({
@@ -5314,9 +5314,9 @@ function dr(s) {
5314
5314
  source: t.source ?? null
5315
5315
  }))
5316
5316
  });
5317
- return mn("sha256").update(e).digest("hex");
5317
+ return kn("sha256").update(e).digest("hex");
5318
5318
  }
5319
- const hr = /* @__PURE__ */ new Set([
5319
+ const Yt = /* @__PURE__ */ new Set([
5320
5320
  "core",
5321
5321
  "cli",
5322
5322
  "app",
@@ -5336,12 +5336,15 @@ const hr = /* @__PURE__ */ new Set([
5336
5336
  "release",
5337
5337
  "main"
5338
5338
  ]);
5339
- function pr(s, e) {
5339
+ function br(s, e) {
5340
+ return (s == null ? void 0 : s.find((t) => Yt.has(t))) ?? e;
5341
+ }
5342
+ function ln(s, e) {
5340
5343
  return new Promise((t) => {
5341
5344
  var r, o;
5342
- const n = U(
5345
+ const n = K(
5343
5346
  "gh",
5344
- ["pr", "view", e, "--json", "body,headRefName,labels,isDraft,state,url,comments"],
5347
+ ["pr", "view", e, "--json", "title,body,headRefName,labels,isDraft,state,url,comments"],
5345
5348
  {
5346
5349
  cwd: s,
5347
5350
  stdio: ["ignore", "pipe", "pipe"]
@@ -5364,48 +5367,48 @@ function pr(s, e) {
5364
5367
  }), n.on("error", () => t(void 0));
5365
5368
  });
5366
5369
  }
5367
- async function mr(s, e) {
5370
+ async function wr(s, e) {
5368
5371
  for (const t of ["ideas", v("ideas", "archive")]) {
5369
5372
  const n = v(s, "papercamp", t, `${e}.md`);
5370
5373
  try {
5371
- return await dn(n), n;
5374
+ return await gn(n), n;
5372
5375
  } catch {
5373
5376
  }
5374
5377
  }
5375
5378
  return null;
5376
5379
  }
5377
- async function De(s, e) {
5378
- const t = await pr(s, e), n = fs(t == null ? void 0 : t.body, (t == null ? void 0 : t.headRefName) ?? e);
5380
+ async function ie(s, e) {
5381
+ const t = await ln(s, e), n = hs(t == null ? void 0 : t.body, (t == null ? void 0 : t.headRefName) ?? e);
5379
5382
  if (!n) return;
5380
- const i = await mr(s, n);
5383
+ const i = await wr(s, n);
5381
5384
  if (!i) return;
5382
- const { entries: r } = tn(await x(i, "utf-8")), o = r[0];
5385
+ const { entries: r } = rn(await x(i, "utf-8")), o = r[0];
5383
5386
  if (o)
5384
5387
  return { id: n, view: t, entry: o };
5385
5388
  }
5386
- async function co(s, e) {
5387
- const t = await De(s, e);
5389
+ async function yo(s, e) {
5390
+ const t = await ie(s, e);
5388
5391
  if (!t) return;
5389
5392
  const { id: n, entry: i } = t;
5390
5393
  return { id: n, kind: i.type, tags: i.tags, phases: i.phases };
5391
5394
  }
5392
- const rn = "<!-- papercamp:phases:start -->", on = "<!-- papercamp:phases:end -->", os = new RegExp(`${rn}[\\s\\S]*?${on}`);
5393
- function gr(s, e) {
5395
+ const cn = "<!-- papercamp:phases:start -->", fn = "<!-- papercamp:phases:end -->", cs = new RegExp(`${cn}[\\s\\S]*?${fn}`);
5396
+ function kr(s, e) {
5394
5397
  const t = e.map((r) => `- [${r.done ? "x" : " "}] ${r.text}`).join(`
5395
- `), n = `${rn}
5398
+ `), n = `${cn}
5396
5399
  ### Phases
5397
5400
  ${t}
5398
- ${on}`;
5399
- if (os.test(s)) return s.replace(os, () => n);
5401
+ ${fn}`;
5402
+ if (cs.test(s)) return s.replace(cs, () => n);
5400
5403
  const i = s.trimEnd();
5401
5404
  return i.length > 0 ? `${i}
5402
5405
 
5403
5406
  ${n}` : n;
5404
5407
  }
5405
- function yr(s, e, t) {
5408
+ function Sr(s, e, t) {
5406
5409
  return new Promise((n) => {
5407
5410
  var r, o;
5408
- const i = U("gh", ["pr", "edit", e, "--body-file", "-"], {
5411
+ const i = K("gh", ["pr", "edit", e, "--body-file", "-"], {
5409
5412
  cwd: s,
5410
5413
  stdio: ["pipe", "ignore", "pipe"]
5411
5414
  });
@@ -5413,23 +5416,23 @@ function yr(s, e, t) {
5413
5416
  }), i.on("close", (a) => n(a === 0)), i.on("error", () => n(!1)), (o = i.stdin) == null || o.end(t);
5414
5417
  });
5415
5418
  }
5416
- async function fo(s, e) {
5417
- const t = await De(s, e);
5419
+ async function bo(s, e) {
5420
+ const t = await ie(s, e);
5418
5421
  if (!(t != null && t.view)) return "unresolved";
5419
- const { view: n, entry: i } = t, r = gr(n.body, i.phases);
5420
- return r === n.body ? "unchanged" : await yr(s, e, r) ? "updated" : "unresolved";
5422
+ const { view: n, entry: i } = t, r = kr(n.body, i.phases);
5423
+ return r === n.body ? "unchanged" : await Sr(s, e, r) ? "updated" : "unresolved";
5421
5424
  }
5422
- function br(s) {
5425
+ function Er(s) {
5423
5426
  const e = /* @__PURE__ */ new Set();
5424
5427
  s.kind && e.add(s.kind);
5425
5428
  for (const t of s.tags)
5426
- hr.has(t) && e.add(t);
5429
+ Yt.has(t) && e.add(t);
5427
5430
  return [...e];
5428
5431
  }
5429
- function wr(s) {
5432
+ function Nr(s) {
5430
5433
  return new Promise((e) => {
5431
5434
  var i, r;
5432
- const t = U("gh", ["label", "list", "--limit", "200", "--json", "name"], {
5435
+ const t = K("gh", ["label", "list", "--limit", "200", "--json", "name"], {
5433
5436
  cwd: s,
5434
5437
  stdio: ["ignore", "pipe", "pipe"]
5435
5438
  });
@@ -5451,10 +5454,10 @@ function wr(s) {
5451
5454
  }), t.on("error", () => e(void 0));
5452
5455
  });
5453
5456
  }
5454
- function kr(s, e) {
5457
+ function $r(s, e) {
5455
5458
  return new Promise((t) => {
5456
5459
  var i;
5457
- const n = U("gh", ["label", "create", e, "--color", "ededed"], {
5460
+ const n = K("gh", ["label", "create", e, "--color", "ededed"], {
5458
5461
  cwd: s,
5459
5462
  stdio: ["ignore", "ignore", "pipe"]
5460
5463
  });
@@ -5462,10 +5465,10 @@ function kr(s, e) {
5462
5465
  }), n.on("close", (r) => t(r === 0)), n.on("error", () => t(!1));
5463
5466
  });
5464
5467
  }
5465
- function Sr(s, e, t) {
5468
+ function Ir(s, e, t) {
5466
5469
  return new Promise((n) => {
5467
5470
  var r;
5468
- const i = U("gh", ["pr", "edit", e, "--add-label", t.join(",")], {
5471
+ const i = K("gh", ["pr", "edit", e, "--add-label", t.join(",")], {
5469
5472
  cwd: s,
5470
5473
  stdio: ["ignore", "ignore", "pipe"]
5471
5474
  });
@@ -5473,23 +5476,55 @@ function Sr(s, e, t) {
5473
5476
  }), i.on("close", (o) => n(o === 0)), i.on("error", () => n(!1));
5474
5477
  });
5475
5478
  }
5476
- async function uo(s, e) {
5477
- const t = await De(s, e);
5479
+ async function wo(s, e) {
5480
+ const t = await ie(s, e);
5478
5481
  if (!(t != null && t.view)) return "unresolved";
5479
- const { view: n, entry: i } = t, r = br({ kind: i.type, tags: i.tags }), o = new Set((n.labels ?? []).map((u) => u.name)), a = r.filter((u) => !o.has(u));
5482
+ const { view: n, entry: i } = t, r = Er({ kind: i.type, tags: i.tags }), o = new Set((n.labels ?? []).map((u) => u.name)), a = r.filter((u) => !o.has(u));
5480
5483
  if (a.length === 0) return "unchanged";
5481
- const l = await wr(s);
5484
+ const l = await Nr(s);
5482
5485
  if (l) {
5483
5486
  const u = a.filter((f) => !l.has(f));
5484
5487
  for (const f of u)
5485
- await kr(s, f);
5488
+ await $r(s, f);
5486
5489
  }
5487
- return await Sr(s, e, a) ? "updated" : "unresolved";
5490
+ return await Ir(s, e, a) ? "updated" : "unresolved";
5491
+ }
5492
+ function un(s, e) {
5493
+ const t = e.type ?? "feat", n = br(e.tags, "repo");
5494
+ return `${t}(${n}): ${e.title} (${s})`;
5495
+ }
5496
+ const Tr = new RegExp(`^(${wn.join("|")})\\(([a-z-]+)\\): .+$`);
5497
+ function Ar(s) {
5498
+ const e = s.match(Tr);
5499
+ return !!e && Yt.has(e[2]);
5500
+ }
5501
+ function Or(s, e, t) {
5502
+ return new Promise((n) => {
5503
+ var r;
5504
+ const i = K("gh", ["pr", "edit", e, "--title", t], {
5505
+ cwd: s,
5506
+ stdio: ["ignore", "ignore", "pipe"]
5507
+ });
5508
+ (r = i.stderr) == null || r.on("data", () => {
5509
+ }), i.on("close", (o) => n(o === 0)), i.on("error", () => n(!1));
5510
+ });
5511
+ }
5512
+ async function ko(s, e) {
5513
+ const t = await ie(s, e);
5514
+ if (!(t != null && t.view)) return "unresolved";
5515
+ const { id: n, view: i, entry: r } = t, o = un(n, r);
5516
+ return i.title === o ? "unchanged" : await Or(s, e, o) ? "updated" : "unresolved";
5488
5517
  }
5489
- function Er(s, e) {
5518
+ async function So(s, e) {
5519
+ const t = await ln(s, e);
5520
+ if (!t) return "no-pr";
5521
+ const n = await ie(s, e);
5522
+ return n ? t.title === un(n.id, n.entry) ? "valid" : "invalid" : Ar(t.title) ? "valid" : "invalid";
5523
+ }
5524
+ function vr(s, e) {
5490
5525
  return new Promise((t) => {
5491
5526
  var i;
5492
- const n = U("gh", ["pr", "ready", e], {
5527
+ const n = K("gh", ["pr", "ready", e], {
5493
5528
  cwd: s,
5494
5529
  stdio: ["ignore", "ignore", "pipe"]
5495
5530
  });
@@ -5497,10 +5532,10 @@ function Er(s, e) {
5497
5532
  }), n.on("close", (r) => t(r === 0)), n.on("error", () => t(!1));
5498
5533
  });
5499
5534
  }
5500
- function Nr(s, e) {
5535
+ function Lr(s, e) {
5501
5536
  return new Promise((t) => {
5502
5537
  var i;
5503
- const n = U("gh", ["pr", "close", e], {
5538
+ const n = K("gh", ["pr", "close", e], {
5504
5539
  cwd: s,
5505
5540
  stdio: ["ignore", "ignore", "pipe"]
5506
5541
  });
@@ -5508,14 +5543,14 @@ function Nr(s, e) {
5508
5543
  }), n.on("close", (r) => t(r === 0)), n.on("error", () => t(!1));
5509
5544
  });
5510
5545
  }
5511
- async function ho(s, e) {
5512
- const t = await De(s, e);
5546
+ async function Eo(s, e) {
5547
+ const t = await ie(s, e);
5513
5548
  if (!(t != null && t.view)) return "unresolved";
5514
5549
  const { view: n, entry: i } = t;
5515
- return i.status === "dropped" ? n.state !== "OPEN" ? "unchanged" : await Nr(s, e) ? "closed" : "unresolved" : !(i.phases.length > 0 && i.phases.every((a) => a.done)) || !n.isDraft ? "unchanged" : await Er(s, e) ? "ready" : "unresolved";
5550
+ return i.status === "dropped" ? n.state !== "OPEN" ? "unchanged" : await Lr(s, e) ? "closed" : "unresolved" : !(i.phases.length > 0 && i.phases.every((a) => a.done)) || !n.isDraft ? "unchanged" : await vr(s, e) ? "ready" : "unresolved";
5516
5551
  }
5517
- const an = "<!-- papercamp:consistency:start -->", Ir = "<!-- papercamp:consistency:end -->";
5518
- function $r(s, e) {
5552
+ const dn = "<!-- papercamp:consistency:start -->", Cr = "<!-- papercamp:consistency:end -->";
5553
+ function _r(s, e) {
5519
5554
  const t = ["### Paper Camp checks", ""];
5520
5555
  if (s.length === 0)
5521
5556
  t.push("No consistency issues found.");
@@ -5524,15 +5559,15 @@ function $r(s, e) {
5524
5559
  t.push(`- **${n.kind}** (${n.section}): ${n.message}`);
5525
5560
  return e && (t.push(""), t.push(
5526
5561
  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.`
5527
- )), `${an}
5562
+ )), `${dn}
5528
5563
  ${t.join(`
5529
5564
  `)}
5530
- ${Ir}`;
5565
+ ${Cr}`;
5531
5566
  }
5532
- function Tr(s, e, t) {
5567
+ function Pr(s, e, t) {
5533
5568
  return new Promise((n) => {
5534
5569
  var r, o;
5535
- const i = U("gh", ["pr", "comment", e, "--body-file", "-"], {
5570
+ const i = K("gh", ["pr", "comment", e, "--body-file", "-"], {
5536
5571
  cwd: s,
5537
5572
  stdio: ["pipe", "ignore", "pipe"]
5538
5573
  });
@@ -5540,10 +5575,10 @@ function Tr(s, e, t) {
5540
5575
  }), i.on("close", (a) => n(a === 0)), i.on("error", () => n(!1)), (o = i.stdin) == null || o.end(t);
5541
5576
  });
5542
5577
  }
5543
- function Ar(s, e, t, n, i) {
5578
+ function Dr(s, e, t, n, i) {
5544
5579
  return new Promise((r) => {
5545
5580
  var a, l;
5546
- const o = U(
5581
+ const o = K(
5547
5582
  "gh",
5548
5583
  [
5549
5584
  "api",
@@ -5559,192 +5594,40 @@ function Ar(s, e, t, n, i) {
5559
5594
  }), o.on("close", (c) => r(c === 0)), o.on("error", () => r(!1)), (l = o.stdin) == null || l.end(i);
5560
5595
  });
5561
5596
  }
5562
- async function po(s, e) {
5597
+ async function No(s, e) {
5563
5598
  var g, h;
5564
- const t = await De(s, e);
5599
+ const t = await ie(s, e);
5565
5600
  if (!((g = t == null ? void 0 : t.view) != null && g.url)) return "unresolved";
5566
5601
  const { view: n, entry: i } = t, [r, o, { entries: a }] = await Promise.all([
5567
5602
  x(v(s, "papercamp", "decisions.md"), "utf-8").catch(() => ""),
5568
5603
  x(v(s, "papercamp", "open-questions.md"), "utf-8").catch(() => ""),
5569
- qt(v(s, "papercamp", "ideas"))
5570
- ]), l = a.filter((m) => m.kind !== "note").map((m) => nn(m)), c = rr(
5571
- er(r).entries,
5572
- tr(o).entries,
5604
+ Ut(v(s, "papercamp", "ideas"))
5605
+ ]), l = a.filter((m) => m.kind !== "note").map((m) => an(m)), c = fr(
5606
+ rr(r).entries,
5607
+ or(o).entries,
5573
5608
  l
5574
5609
  ), u = i.audited && i.auditedHash ? {
5575
5610
  audited: i.audited,
5576
- stale: dr(i) !== i.auditedHash
5577
- } : void 0, f = $r(c, u), d = (n.comments ?? []).find((m) => m.body.includes(an));
5611
+ stale: yr(i) !== i.auditedHash
5612
+ } : void 0, f = _r(c, u), d = (n.comments ?? []).find((m) => m.body.includes(dn));
5578
5613
  if (d) {
5579
5614
  if (d.body === f) return "unchanged";
5580
- const m = kt(n.url), y = (h = d.url.match(/issuecomment-(\d+)/)) == null ? void 0 : h[1];
5581
- return !m || !y ? "unresolved" : await Ar(s, m.owner, m.repo, y, f) ? "updated" : "unresolved";
5615
+ const m = St(n.url), y = (h = d.url.match(/issuecomment-(\d+)/)) == null ? void 0 : h[1];
5616
+ return !m || !y ? "unresolved" : await Dr(s, m.owner, m.repo, y, f) ? "updated" : "unresolved";
5582
5617
  }
5583
- return await Tr(s, e, f) ? "created" : "unresolved";
5618
+ return await Pr(s, e, f) ? "created" : "unresolved";
5584
5619
  }
5585
- function mo(s, e, t) {
5620
+ function $o(s, e, t) {
5586
5621
  if (!s) return;
5587
5622
  const n = (e ?? "feat").toLowerCase(), i = t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
5588
5623
  return `${n}/${s.toLowerCase()}-${i}`;
5589
5624
  }
5590
- const Or = `---
5591
- name: paper-camp
5592
- description: Work inside a project that has a papercamp/ folder — its unified idea entities (each holding its plan as a section), decisions log, open questions, and progress log. Use this whenever the working directory contains papercamp/ (papercamp/ideas/, papercamp/decisions.md, papercamp/open-questions.md, papercamp/progress.md), 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".
5593
- ---
5594
-
5595
- # Paper Camp
5596
-
5597
- Paper Camp is this project's planning methodology: plans, ideas, decisions, and
5598
- open questions live as markdown files under \`papercamp/\`, and an append-only
5599
- \`papercamp/progress.md\` is the changelog. This skill tells you how to read that
5600
- state before acting and how to keep it honest as you work.
5601
-
5602
- If a \`papercamp\` MCP server is connected in this session, prefer its tools
5603
- (list/get plans, update phase, append progress, etc.) over raw file access —
5604
- they enforce the same guards (id allocation, branch conflicts) that the file
5605
- grammar below assumes. Everything in this skill still applies conceptually;
5606
- only the mechanism changes.
5607
-
5608
- ## Before doing any work
5609
-
5610
- Read, in this order, whatever exists:
5611
-
5612
- 1. \`papercamp/ideas/index.md\` — every entity's id/title/type/status/tags, at
5613
- a glance. Ideas and plans are one thing: an entity is an *idea* for its
5614
- whole life, and its plan is a \`### Phases\` section inside the same file.
5615
- 2. The specific entity file at \`papercamp/ideas/<ID>.md\` (e.g. \`IDEA-43.md\`)
5616
- for the work you're about to do — YAML frontmatter (\`id\`, \`title\`,
5617
- \`type\`, \`status\`, \`tags\`, ...) plus prose rationale, then optionally a
5618
- \`### Phases\` list of \`- [ ]\`/\`- [x]\` checkboxes with an indented
5619
- description under each. Done/dropped entities live in
5620
- \`papercamp/ideas/archive/\`.
5621
- 3. \`papercamp/decisions.md\` — settled calls that constrain your approach.
5622
- Don't re-litigate a logged decision without flagging it to the user first.
5623
- 4. \`papercamp/open-questions.md\` — unresolved questions that might block or
5624
- redirect the work you're about to start.
5625
- 5. The last handful of entries in \`papercamp/progress.md\` for recent context
5626
- on what just happened.
5627
-
5628
- Skip files that don't exist yet (a fresh project may have empty logs).
5629
-
5630
- ## While working
5631
-
5632
- - Work one plan phase at a time unless told otherwise — don't cascade into
5633
- later phases just because they look quick.
5634
- - If a phase's boundary or intent is unclear, ask before continuing.
5635
- - Prose in plans and ideas is more current than your memory of past
5636
- conversations. If they conflict, the files win — say so and resync.
5637
-
5638
- ## Keep the project current as you go
5639
-
5640
- - **Plan phases**: when you finish a phase, flip its checkbox from \`- [ ]\` to
5641
- \`- [x]\` in the plan's frontmatter file. Change only that line — don't touch
5642
- other phases or prose.
5643
- - **Plan status**: keep the plan's \`status:\` frontmatter honest
5644
- (\`planned\` / \`in-progress\` / \`review\` / \`done\`). When every phase is
5645
- checked, set status to \`review\` — never \`done\`. \`done\` is a human-only
5646
- promotion after review; an agent finishing the last phase does not close
5647
- the plan itself.
5648
- - **Progress log**: add one bullet describing what you did under today's
5649
- \`## YYYY-MM-DD\` heading at the top of \`papercamp/progress.md\` (newest day
5650
- first; create the heading if today's isn't there yet). Be specific enough
5651
- that a future read of the log alone explains what changed and why, without
5652
- needing to re-read the diff.
5653
- - **Decisions / open questions**: if you settle something ambiguous while
5654
- working, log it in \`papercamp/decisions.md\`; if you surface a question you
5655
- can't resolve yourself, add it to \`papercamp/open-questions.md\` rather than
5656
- guessing silently.
5657
-
5658
- ## What this skill deliberately does not do
5659
-
5660
- It does not maintain a separate "current focus" file — that's derived at
5661
- session start from live plan/progress data, not hand-maintained here. It does
5662
- not define the file formats in full; treat the existing files under
5663
- \`papercamp/\` as the grammar reference (mirror their structure exactly rather
5664
- than inventing a new shape).
5665
- `, as = "$CLAUDE_PROJECT_DIR/node_modules/.bin/paper-camp", vr = `${JSON.stringify(
5666
- {
5667
- hooks: {
5668
- SessionStart: [
5669
- {
5670
- matcher: "*",
5671
- hooks: [{ type: "command", command: `"${as}" session-focus` }]
5672
- }
5673
- ],
5674
- PostToolUse: [
5675
- {
5676
- matcher: "Write",
5677
- hooks: [{ type: "command", command: `"${as}" post-tool-use-log` }]
5678
- }
5679
- ]
5680
- }
5681
- },
5682
- null,
5683
- 2
5684
- )}
5685
- `, Lr = "0.1.0";
5686
- class Cr extends Error {
5687
- constructor(e) {
5688
- super(`Paper Camp is already initialized in ${e} (papercamp/config.json exists).`);
5689
- }
5690
- }
5691
- async function Ie(s) {
5692
- try {
5693
- return await hn(s), !0;
5694
- } catch {
5695
- return !1;
5696
- }
5697
- }
5698
- const _r = ["progress.md", "decisions.md", "open-questions.md", "suggestions.md"];
5699
- async function go(s, e) {
5700
- const t = v(s, "papercamp"), n = v(t, "config.json");
5701
- if (await Ie(n))
5702
- throw new Cr(s);
5703
- const i = {
5704
- version: Lr,
5705
- projectName: e.projectName,
5706
- initializedAt: (/* @__PURE__ */ new Date()).toISOString(),
5707
- nextId: { idea: 1 }
5708
- };
5709
- Xi.parse(i), await X(t, { recursive: !0 });
5710
- const r = v(t, "ideas");
5711
- await X(r, { recursive: !0 });
5712
- const o = v(r, "archive");
5713
- await X(o, { recursive: !0 });
5714
- const a = v(r, "index.md");
5715
- if (!await Ie(a)) {
5716
- const l = e.intent ? `# ${e.projectName}
5717
-
5718
- ${e.intent}
5719
- ` : `# ${e.projectName}
5720
-
5721
- What are you building, and why?
5722
- `;
5723
- await V(a, l, "utf-8");
5724
- }
5725
- for (const l of _r) {
5726
- const c = v(t, l);
5727
- await Ie(c) || await V(c, "", "utf-8");
5728
- }
5729
- await V(n, `${JSON.stringify(i, null, 2)}
5730
- `, "utf-8"), await Pr(s);
5731
- }
5732
- async function Pr(s) {
5733
- const e = v(s, ".claude", "skills", "paper-camp");
5734
- await X(e, { recursive: !0 });
5735
- const t = v(e, "SKILL.md");
5736
- await Ie(t) || await V(t, Or, "utf-8");
5737
- const n = v(s, ".claude");
5738
- await X(n, { recursive: !0 });
5739
- const i = v(n, "settings.json");
5740
- await Ie(i) || await V(i, vr, "utf-8");
5741
- }
5742
- function Dr() {
5625
+ function hn() {
5743
5626
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
5744
5627
  }
5745
- let We = Promise.resolve();
5628
+ let ze = Promise.resolve();
5746
5629
  async function jr(s, e) {
5747
- const t = We.then(async () => {
5630
+ const t = ze.then(async () => {
5748
5631
  let n = null;
5749
5632
  try {
5750
5633
  n = JSON.parse(await x(s, "utf-8"));
@@ -5753,18 +5636,18 @@ async function jr(s, e) {
5753
5636
  }
5754
5637
  if (!(n != null && n.nextId)) return;
5755
5638
  const i = n.nextId[e] ?? 1, r = `${e.toUpperCase()}-${i}`;
5756
- return n.nextId[e] = i + 1, await V(s, `${JSON.stringify(n, null, 2)}
5639
+ return n.nextId[e] = i + 1, await Y(s, `${JSON.stringify(n, null, 2)}
5757
5640
  `), r;
5758
5641
  });
5759
- return We = t.catch(() => {
5642
+ return ze = t.catch(() => {
5760
5643
  }), t;
5761
5644
  }
5762
5645
  function Rr(s) {
5763
5646
  const e = [`## ${s.title}`, "", `**Status:** ${s.status}`];
5764
- return 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(", ")}`), e.push(""), s.body && e.push(s.body, ""), s.clarifications && s.clarifications.length > 0 && e.push(...rt.formatLines(s.clarifications), ""), s.phases && s.phases.length > 0 && e.push(...it.formatLines(s.phases)), s.log && s.log.length > 0 && e.push("", ...be.formatLines(s.log)), e.join(`
5647
+ return 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(", ")}`), e.push(""), s.body && e.push(s.body, ""), s.clarifications && s.clarifications.length > 0 && e.push(...ot.formatLines(s.clarifications), ""), s.phases && s.phases.length > 0 && e.push(...rt.formatLines(s.phases)), s.log && s.log.length > 0 && e.push("", ...Se.formatLines(s.log)), e.join(`
5765
5648
  `).trimEnd();
5766
5649
  }
5767
- function yo(s) {
5650
+ function Io(s) {
5768
5651
  const e = [`## ${s.title}`, "", `**Date:** ${s.date}`, `**Status:** ${s.status}`];
5769
5652
  return s.supersededBy && e.push(`**Superseded-by:** ${s.supersededBy}`), e.push(""), s.body && e.push(s.body), e.join(`
5770
5653
  `).trimEnd();
@@ -5779,21 +5662,21 @@ function Mr(s) {
5779
5662
  return s.resolvedBy && e.push(`**Resolved-by:** ${s.resolvedBy}`), s.blocks && e.push(`**Blocks:** ${s.blocks}`), e.push(""), s.body && e.push(s.body), e.join(`
5780
5663
  `).trimEnd();
5781
5664
  }
5782
- function bo(s, e) {
5665
+ function To(s, e) {
5783
5666
  return [`## ${s}`, ...e.map((t) => `- ${t}`)].join(`
5784
5667
  `);
5785
5668
  }
5786
- async function wo(s, e) {
5787
- const t = `## ${Dr()}`;
5669
+ async function Ao(s, e) {
5670
+ const t = `## ${hn()}`;
5788
5671
  let n = "";
5789
5672
  try {
5790
5673
  n = await x(s, "utf-8");
5791
5674
  } catch (i) {
5792
5675
  if (i.code !== "ENOENT") throw i;
5793
5676
  }
5794
- if (await X(ls(s), { recursive: !0 }), n.startsWith(`${t}
5677
+ if (await X(us(s), { recursive: !0 }), n.startsWith(`${t}
5795
5678
  `))
5796
- await V(
5679
+ await Y(
5797
5680
  s,
5798
5681
  `${t}
5799
5682
  - ${e}
@@ -5808,23 +5691,23 @@ ${i}
5808
5691
  ` : `${t}
5809
5692
  - ${e}
5810
5693
  `;
5811
- await V(s, r, "utf-8");
5694
+ await Y(s, r, "utf-8");
5812
5695
  }
5813
5696
  }
5814
- function ko(s) {
5697
+ function Oo(s) {
5815
5698
  return s.length === 0 ? "" : `${s.map((e) => Rr(e)).join(`
5816
5699
 
5817
5700
  `)}
5818
5701
  `;
5819
5702
  }
5820
- function So(s) {
5703
+ function vo(s) {
5821
5704
  return s.length === 0 ? "" : `${s.map((e) => Mr(e)).join(`
5822
5705
 
5823
5706
  `)}
5824
5707
  `;
5825
5708
  }
5826
- async function Eo(s, e) {
5827
- await X(ls(s), { recursive: !0 });
5709
+ async function Lo(s, e) {
5710
+ await X(us(s), { recursive: !0 });
5828
5711
  let t = "";
5829
5712
  try {
5830
5713
  t = await x(s, "utf-8");
@@ -5836,14 +5719,14 @@ async function Eo(s, e) {
5836
5719
  ${e}
5837
5720
  ` : `${e}
5838
5721
  `;
5839
- await V(s, i, "utf-8");
5722
+ await Y(s, i, "utf-8");
5840
5723
  }
5841
- function Ut(s) {
5724
+ function Vt(s) {
5842
5725
  return `---
5843
- ${Ki(s).trimEnd()}
5726
+ ${Vi(s).trimEnd()}
5844
5727
  ---`;
5845
5728
  }
5846
- function No(s) {
5729
+ function Co(s) {
5847
5730
  const e = {
5848
5731
  id: s.id,
5849
5732
  title: s.title,
@@ -5852,33 +5735,33 @@ function No(s) {
5852
5735
  created: s.created
5853
5736
  };
5854
5737
  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);
5855
- const t = [Ut(e)];
5856
- return s.body && t.push(s.body), s.clarifications && s.clarifications.length > 0 && t.push(rt.formatLines(s.clarifications).join(`
5857
- `)), s.phases && s.phases.length > 0 && t.push(it.formatLines(s.phases).join(`
5858
- `)), s.log && s.log.length > 0 && t.push(be.formatLines(s.log).join(`
5738
+ const t = [Vt(e)];
5739
+ return s.body && t.push(s.body), s.clarifications && s.clarifications.length > 0 && t.push(ot.formatLines(s.clarifications).join(`
5740
+ `)), s.phases && s.phases.length > 0 && t.push(rt.formatLines(s.phases).join(`
5741
+ `)), s.log && s.log.length > 0 && t.push(Se.formatLines(s.log).join(`
5859
5742
  `)), t.join(`
5860
5743
 
5861
5744
  `).trimEnd();
5862
5745
  }
5863
- function Io(s) {
5746
+ function Br(s) {
5864
5747
  const e = {
5865
5748
  id: s.id,
5866
5749
  title: s.title
5867
5750
  };
5868
5751
  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.tags && s.tags.length > 0 && (e.tags = s.tags), s.subject && (e.subject = s.subject), s.order !== void 0 && (e.order = s.order);
5869
- const t = [Ut(e)];
5870
- return s.body && t.push(s.body), s.clarifications && s.clarifications.length > 0 && t.push(rt.formatLines(s.clarifications).join(`
5871
- `)), s.phases && s.phases.length > 0 && t.push(it.formatLines(s.phases).join(`
5872
- `)), s.log && s.log.length > 0 && t.push(be.formatLines(s.log).join(`
5752
+ const t = [Vt(e)];
5753
+ return s.body && t.push(s.body), s.clarifications && s.clarifications.length > 0 && t.push(ot.formatLines(s.clarifications).join(`
5754
+ `)), s.phases && s.phases.length > 0 && t.push(rt.formatLines(s.phases).join(`
5755
+ `)), s.log && s.log.length > 0 && t.push(Se.formatLines(s.log).join(`
5873
5756
  `)), t.join(`
5874
5757
 
5875
5758
  `).trimEnd();
5876
5759
  }
5877
- async function $o(s) {
5760
+ async function _o(s) {
5878
5761
  return jr(s, "idea");
5879
5762
  }
5880
- async function To(s, e) {
5881
- const t = We.then(async () => {
5763
+ async function Po(s, e) {
5764
+ const t = ze.then(async () => {
5882
5765
  let n = null;
5883
5766
  try {
5884
5767
  n = JSON.parse(await x(s, "utf-8"));
@@ -5886,42 +5769,42 @@ async function To(s, e) {
5886
5769
  return;
5887
5770
  }
5888
5771
  const i = n.subjects ?? [];
5889
- i.includes(e) || (n.subjects = [...i, e], await V(s, `${JSON.stringify(n, null, 2)}
5772
+ i.includes(e) || (n.subjects = [...i, e], await Y(s, `${JSON.stringify(n, null, 2)}
5890
5773
  `));
5891
5774
  });
5892
- return We = t.catch(() => {
5775
+ return ze = t.catch(() => {
5893
5776
  }), t;
5894
5777
  }
5895
- function Ao(s) {
5778
+ function Do(s) {
5896
5779
  const e = {
5897
5780
  id: s.id,
5898
5781
  title: s.title
5899
5782
  };
5900
5783
  s.kind && (e.kind = s.kind), s.status && (e.status = s.status);
5901
- const t = [Ut(e)], n = `## ${s.id}: ${s.title}`;
5784
+ const t = [Vt(e)], n = `## ${s.id}: ${s.title}`;
5902
5785
  return t.push(s.body ? `${n}
5903
5786
 
5904
- ${s.body}` : n), s.log && s.log.length > 0 && t.push(be.formatLines(s.log).join(`
5787
+ ${s.body}` : n), s.log && s.log.length > 0 && t.push(Se.formatLines(s.log).join(`
5905
5788
  `)), t.join(`
5906
5789
 
5907
5790
  `).trimEnd();
5908
5791
  }
5909
- async function Oo(s, e) {
5792
+ async function jo(s, e) {
5910
5793
  const t = v(s, "papercamp", "ideas"), n = v(t, "archive"), i = v(t, `${e}.md`), r = v(n, `${e}.md`);
5911
5794
  await X(n, { recursive: !0 });
5912
5795
  try {
5913
- return await pn(i, r), !0;
5796
+ return await yn(i, r), !0;
5914
5797
  } catch (o) {
5915
5798
  if (o.code === "ENOENT") return !1;
5916
5799
  throw o;
5917
5800
  }
5918
5801
  }
5919
- function vo(s, e) {
5802
+ function Ro(s, e) {
5920
5803
  let t = !1;
5921
5804
  const n = s.split(`
5922
5805
  `).filter((i) => {
5923
5806
  if (!t) {
5924
- const r = i.match(sn);
5807
+ const r = i.match(on);
5925
5808
  if (r && r[1] === e.date && r[2].trim() === e.title && r[3].trim() === e.description)
5926
5809
  return t = !0, !1;
5927
5810
  }
@@ -5930,7 +5813,7 @@ function vo(s, e) {
5930
5813
  return t ? n.join(`
5931
5814
  `) : s;
5932
5815
  }
5933
- function Lo(s) {
5816
+ function Mo(s) {
5934
5817
  return s.length === 0 ? `# Ideas
5935
5818
 
5936
5819
  No ideas yet.
@@ -5947,71 +5830,237 @@ ${[...s].sort((n, i) => {
5947
5830
  `)}
5948
5831
  `;
5949
5832
  }
5950
- const wt = /^##\s+/, Br = /^##\s+The goal\s*$/i, ln = /^##\s+(Horizon\s+\d+\s*[—-].*)\r?$/i, Qe = /^-\s+\*\*(.+?)\*\*\s+[—-]\s+(.*)\r?$/, cn = /^\s+-\s+(.+?)\r?$/, fn = /^\s+\S/;
5951
- function Kr(s, e, t) {
5833
+ const Kr = `---
5834
+ name: paper-camp
5835
+ description: Work inside a project that has a papercamp/ folder — its unified idea entities (each holding its plan as a section), decisions log, open questions, and progress log. Use this whenever the working directory contains papercamp/ (papercamp/ideas/, papercamp/decisions.md, papercamp/open-questions.md, papercamp/progress.md), 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".
5836
+ ---
5837
+
5838
+ # Paper Camp
5839
+
5840
+ Paper Camp is this project's planning methodology: plans, ideas, decisions, and
5841
+ open questions live as markdown files under \`papercamp/\`, and an append-only
5842
+ \`papercamp/progress.md\` is the changelog. This skill tells you how to read that
5843
+ state before acting and how to keep it honest as you work.
5844
+
5845
+ If a \`papercamp\` MCP server is connected in this session, prefer its tools
5846
+ (list/get plans, update phase, append progress, etc.) over raw file access —
5847
+ they enforce the same guards (id allocation, branch conflicts) that the file
5848
+ grammar below assumes. Everything in this skill still applies conceptually;
5849
+ only the mechanism changes.
5850
+
5851
+ ## Before doing any work
5852
+
5853
+ Read, in this order, whatever exists:
5854
+
5855
+ 1. \`papercamp/ideas/index.md\` — every entity's id/title/type/status/tags, at
5856
+ a glance. Ideas and plans are one thing: an entity is an *idea* for its
5857
+ whole life, and its plan is a \`### Phases\` section inside the same file.
5858
+ 2. The specific entity file at \`papercamp/ideas/<ID>.md\` (e.g. \`IDEA-43.md\`)
5859
+ for the work you're about to do — YAML frontmatter (\`id\`, \`title\`,
5860
+ \`type\`, \`status\`, \`tags\`, ...) plus prose rationale, then optionally a
5861
+ \`### Phases\` list of \`- [ ]\`/\`- [x]\` checkboxes with an indented
5862
+ description under each. Done/dropped entities live in
5863
+ \`papercamp/ideas/archive/\`.
5864
+ 3. \`papercamp/decisions.md\` — settled calls that constrain your approach.
5865
+ Don't re-litigate a logged decision without flagging it to the user first.
5866
+ 4. \`papercamp/open-questions.md\` — unresolved questions that might block or
5867
+ redirect the work you're about to start.
5868
+ 5. The last handful of entries in \`papercamp/progress.md\` for recent context
5869
+ on what just happened.
5870
+
5871
+ Skip files that don't exist yet (a fresh project may have empty logs).
5872
+
5873
+ ## While working
5874
+
5875
+ - Work one plan phase at a time unless told otherwise — don't cascade into
5876
+ later phases just because they look quick.
5877
+ - If a phase's boundary or intent is unclear, ask before continuing.
5878
+ - Prose in plans and ideas is more current than your memory of past
5879
+ conversations. If they conflict, the files win — say so and resync.
5880
+
5881
+ ## Keep the project current as you go
5882
+
5883
+ - **Plan phases**: when you finish a phase, flip its checkbox from \`- [ ]\` to
5884
+ \`- [x]\` in the plan's frontmatter file. Change only that line — don't touch
5885
+ other phases or prose.
5886
+ - **Plan status**: keep the plan's \`status:\` frontmatter honest
5887
+ (\`planned\` / \`in-progress\` / \`review\` / \`done\`). When every phase is
5888
+ checked, set status to \`review\` — never \`done\`. \`done\` is a human-only
5889
+ promotion after review; an agent finishing the last phase does not close
5890
+ the plan itself.
5891
+ - **Progress log**: add one bullet describing what you did under today's
5892
+ \`## YYYY-MM-DD\` heading at the top of \`papercamp/progress.md\` (newest day
5893
+ first; create the heading if today's isn't there yet). Be specific enough
5894
+ that a future read of the log alone explains what changed and why, without
5895
+ needing to re-read the diff.
5896
+ - **Decisions / open questions**: if you settle something ambiguous while
5897
+ working, log it in \`papercamp/decisions.md\`; if you surface a question you
5898
+ can't resolve yourself, add it to \`papercamp/open-questions.md\` rather than
5899
+ guessing silently.
5900
+
5901
+ ## What this skill deliberately does not do
5902
+
5903
+ It does not maintain a separate "current focus" file — that's derived at
5904
+ session start from live plan/progress data, not hand-maintained here. It does
5905
+ not define the file formats in full; treat the existing files under
5906
+ \`papercamp/\` as the grammar reference (mirror their structure exactly rather
5907
+ than inventing a new shape).
5908
+ `, fs = "$CLAUDE_PROJECT_DIR/node_modules/.bin/paper-camp", qr = `${JSON.stringify(
5909
+ {
5910
+ hooks: {
5911
+ SessionStart: [
5912
+ {
5913
+ matcher: "*",
5914
+ hooks: [{ type: "command", command: `"${fs}" session-focus` }]
5915
+ }
5916
+ ],
5917
+ PostToolUse: [
5918
+ {
5919
+ matcher: "Write",
5920
+ hooks: [{ type: "command", command: `"${fs}" post-tool-use-log` }]
5921
+ }
5922
+ ]
5923
+ }
5924
+ },
5925
+ null,
5926
+ 2
5927
+ )}
5928
+ `, Ur = "0.1.0";
5929
+ class Fr extends Error {
5930
+ constructor(e) {
5931
+ super(`Paper Camp is already initialized in ${e} (papercamp/config.json exists).`);
5932
+ }
5933
+ }
5934
+ async function fe(s) {
5935
+ try {
5936
+ return await bn(s), !0;
5937
+ } catch {
5938
+ return !1;
5939
+ }
5940
+ }
5941
+ const Yr = ["progress.md", "decisions.md", "open-questions.md", "suggestions.md"];
5942
+ async function Bo(s, e) {
5943
+ const t = v(s, "papercamp"), n = v(t, "config.json");
5944
+ if (await fe(n))
5945
+ throw new Fr(s);
5946
+ const i = {
5947
+ version: Ur,
5948
+ projectName: e.projectName,
5949
+ initializedAt: (/* @__PURE__ */ new Date()).toISOString(),
5950
+ nextId: { idea: 2 }
5951
+ };
5952
+ sr.parse(i), await X(t, { recursive: !0 });
5953
+ const r = v(t, "ideas");
5954
+ await X(r, { recursive: !0 });
5955
+ const o = v(r, "archive");
5956
+ await X(o, { recursive: !0 });
5957
+ const a = v(r, "index.md");
5958
+ if (!await fe(a)) {
5959
+ const c = e.intent ? `# ${e.projectName}
5960
+
5961
+ ${e.intent}
5962
+ ` : `# ${e.projectName}
5963
+
5964
+ What are you building, and why?
5965
+ `;
5966
+ await Y(a, c, "utf-8");
5967
+ }
5968
+ const l = v(r, "IDEA-1.md");
5969
+ if (!await fe(l)) {
5970
+ const c = Br({
5971
+ id: "IDEA-1",
5972
+ title: "Capture your first idea",
5973
+ status: "idea",
5974
+ created: hn(),
5975
+ 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.
5976
+
5977
+ Use the New idea button to capture what you're building next, or ask an agent for suggestions.`
5978
+ });
5979
+ await Y(l, `${c}
5980
+ `, "utf-8");
5981
+ }
5982
+ for (const c of Yr) {
5983
+ const u = v(t, c);
5984
+ await fe(u) || await Y(u, "", "utf-8");
5985
+ }
5986
+ await Y(n, `${JSON.stringify(i, null, 2)}
5987
+ `, "utf-8"), await Vr(s);
5988
+ }
5989
+ async function Vr(s) {
5990
+ const e = v(s, ".claude", "skills", "paper-camp");
5991
+ await X(e, { recursive: !0 });
5992
+ const t = v(e, "SKILL.md");
5993
+ await fe(t) || await Y(t, Kr, "utf-8");
5994
+ const n = v(s, ".claude");
5995
+ await X(n, { recursive: !0 });
5996
+ const i = v(n, "settings.json");
5997
+ await fe(i) || await Y(i, qr, "utf-8");
5998
+ }
5999
+ const ve = /^##\s+/, Gr = /^##\s+The goal\s*$/i, at = /^##\s+(Horizon\s+\d+\s*[—-].*)\r?$/i, me = /^-\s+\*\*(.+?)\*\*\s+[—-]\s+(.*)\r?$/, pn = /^\s+-\s+(.+?)\r?$/, Gt = /^\s+\S/;
6000
+ function Hr(s, e, t) {
5952
6001
  const n = [];
5953
6002
  let i = e;
5954
6003
  for (; i < t; ) {
5955
- const r = s[i].match(Qe);
6004
+ const r = s[i].match(me);
5956
6005
  if (!r) {
5957
6006
  i++;
5958
6007
  continue;
5959
6008
  }
5960
6009
  const o = [r[2].trim()], a = [];
5961
- for (i++; i < t && !Qe.test(s[i]); ) {
5962
- const l = s[i].match(cn);
6010
+ for (i++; i < t && !me.test(s[i]); ) {
6011
+ const l = s[i].match(pn);
5963
6012
  if (l) {
5964
6013
  a.push(l[1].trim()), i++;
5965
6014
  continue;
5966
6015
  }
5967
- if (!fn.test(s[i])) break;
6016
+ if (!Gt.test(s[i])) break;
5968
6017
  o.push(s[i].trim()), i++;
5969
6018
  }
5970
6019
  n.push({ name: r[1].trim(), description: o.join(" "), candidates: a });
5971
6020
  }
5972
6021
  return n;
5973
6022
  }
5974
- function Co(s) {
6023
+ function Ko(s) {
5975
6024
  const e = s.split(`
5976
6025
  `);
5977
6026
  let t = "";
5978
6027
  const n = [];
5979
6028
  for (let i = 0; i < e.length; i++) {
5980
- if (Br.test(e[i])) {
6029
+ if (Gr.test(e[i])) {
5981
6030
  let o = i + 1;
5982
- for (; o < e.length && !wt.test(e[o]); ) o++;
6031
+ for (; o < e.length && !ve.test(e[o]); ) o++;
5983
6032
  t = e.slice(i + 1, o).join(`
5984
6033
  `).trim(), i = o - 1;
5985
6034
  continue;
5986
6035
  }
5987
- const r = e[i].match(ln);
6036
+ const r = e[i].match(at);
5988
6037
  if (r) {
5989
6038
  let o = i + 1;
5990
- for (; o < e.length && !wt.test(e[o]); ) o++;
5991
- n.push({ title: r[1].trim(), items: Kr(e, i + 1, o) }), i = o - 1;
6039
+ for (; o < e.length && !ve.test(e[o]); ) o++;
6040
+ n.push({ title: r[1].trim(), items: Hr(e, i + 1, o) }), i = o - 1;
5992
6041
  }
5993
6042
  }
5994
6043
  return { goal: t, horizons: n };
5995
6044
  }
5996
- function _o(s, e, t, n) {
6045
+ function qo(s, e, t, n) {
5997
6046
  const i = s.split(`
5998
6047
  `);
5999
6048
  for (let r = 0; r < i.length; r++) {
6000
- const o = i[r].match(ln);
6049
+ const o = i[r].match(at);
6001
6050
  if (!o || o[1].trim() !== e) continue;
6002
6051
  let a = r + 1;
6003
- for (; a < i.length && !wt.test(i[a]); ) a++;
6052
+ for (; a < i.length && !ve.test(i[a]); ) a++;
6004
6053
  for (let l = r + 1; l < a; l++) {
6005
- const c = i[l].match(Qe);
6054
+ const c = i[l].match(me);
6006
6055
  if (!c || c[1].trim() !== t) continue;
6007
6056
  let u = l + 1;
6008
- for (; u < a && !Qe.test(i[u]) && fn.test(i[u]); )
6057
+ for (; u < a && !me.test(i[u]) && Gt.test(i[u]); )
6009
6058
  u++;
6010
6059
  if (n === void 0)
6011
6060
  return i.splice(l, u - l), i.join(`
6012
6061
  `);
6013
6062
  for (let f = l + 1; f < u; f++) {
6014
- const d = i[f].match(cn);
6063
+ const d = i[f].match(pn);
6015
6064
  if (d && d[1].trim() === n)
6016
6065
  return i.splice(f, 1), i.join(`
6017
6066
  `);
@@ -6022,80 +6071,122 @@ function _o(s, e, t, n) {
6022
6071
  }
6023
6072
  return s;
6024
6073
  }
6074
+ function Uo(s, e, t, n) {
6075
+ const i = s.split(`
6076
+ `);
6077
+ for (let r = 0; r < i.length; r++) {
6078
+ const o = i[r].match(at);
6079
+ if (!o || o[1].trim() !== e) continue;
6080
+ let a = r + 1;
6081
+ for (; a < i.length && !ve.test(i[a]); ) a++;
6082
+ for (; a > r + 1 && i[a - 1].trim() === ""; ) a--;
6083
+ return i.splice(a, 0, `- **${t}** — ${n}`), i.join(`
6084
+ `);
6085
+ }
6086
+ return s;
6087
+ }
6088
+ function Fo(s, e, t, n) {
6089
+ const i = s.split(`
6090
+ `);
6091
+ for (let r = 0; r < i.length; r++) {
6092
+ const o = i[r].match(at);
6093
+ if (!o || o[1].trim() !== e) continue;
6094
+ let a = r + 1;
6095
+ for (; a < i.length && !ve.test(i[a]); ) a++;
6096
+ for (let l = r + 1; l < a; l++) {
6097
+ const c = i[l].match(me);
6098
+ if (!c || c[1].trim() !== t) continue;
6099
+ let u = l + 1;
6100
+ for (; u < a && !me.test(i[u]) && Gt.test(i[u]); )
6101
+ u++;
6102
+ return i.splice(u, 0, ` - ${n}`), i.join(`
6103
+ `);
6104
+ }
6105
+ return s;
6106
+ }
6107
+ return s;
6108
+ }
6025
6109
  export {
6026
- Gi as $,
6027
- Cr as A,
6028
- So as B,
6029
- vr as C,
6030
- Rr as D,
6031
- No as E,
6032
- ko as F,
6033
- bo as G,
6034
- Qi as H,
6035
- go as I,
6036
- Ji as J,
6037
- Xi as K,
6038
- er as L,
6039
- tn as M,
6040
- Hr as N,
6041
- Bt as O,
6042
- Lr as P,
6043
- eo as Q,
6044
- to as R,
6045
- Or as S,
6046
- tr as T,
6047
- xr as U,
6048
- Zr as V,
6049
- so as W,
6050
- Mt as X,
6051
- Co as Y,
6052
- io as Z,
6053
- no as _,
6054
- hr as a,
6055
- Wi as a0,
6056
- wo as a1,
6057
- qt as a2,
6058
- ro as a3,
6059
- lo as a4,
6060
- oo as a5,
6061
- _o as a6,
6062
- vo as a7,
6063
- $r as a8,
6064
- gr as a9,
6065
- zr as aa,
6066
- co as ab,
6067
- On as ac,
6068
- Qr as ad,
6069
- Ut as ae,
6070
- po as af,
6071
- fo as ag,
6072
- uo as ah,
6073
- ho as ai,
6074
- Dr as aj,
6075
- sn as b,
6076
- qe as c,
6077
- Eo as d,
6078
- Jr as e,
6079
- Oo as f,
6080
- $o as g,
6081
- jr as h,
6082
- mo as i,
6083
- Xr as j,
6084
- dr as k,
6085
- G as l,
6086
- Hi as m,
6087
- br as n,
6088
- To as o,
6089
- zi as p,
6090
- ur as q,
6091
- nn as r,
6092
- Wr as s,
6093
- ao as t,
6094
- rr as u,
6095
- yo as v,
6096
- Lo as w,
6097
- Io as x,
6098
- Ao as y,
6099
- Mr as z
6110
+ Bt as $,
6111
+ Fr as A,
6112
+ Br as B,
6113
+ qr as C,
6114
+ Do as D,
6115
+ Mr as E,
6116
+ vo as F,
6117
+ Rr as G,
6118
+ Co as H,
6119
+ Oo as I,
6120
+ To as J,
6121
+ er as K,
6122
+ Bo as L,
6123
+ Ar as M,
6124
+ Zi as N,
6125
+ sr as O,
6126
+ Ur as P,
6127
+ rr as Q,
6128
+ rn as R,
6129
+ Kr as S,
6130
+ xr as T,
6131
+ Kt as U,
6132
+ ao as V,
6133
+ lo as W,
6134
+ or as X,
6135
+ oo as Y,
6136
+ ro as Z,
6137
+ co as _,
6138
+ Yt as a,
6139
+ Ko as a0,
6140
+ uo as a1,
6141
+ fo as a2,
6142
+ zi as a3,
6143
+ xi as a4,
6144
+ Ao as a5,
6145
+ Ut as a6,
6146
+ ho as a7,
6147
+ go as a8,
6148
+ po as a9,
6149
+ qo as aa,
6150
+ Ro as ab,
6151
+ _r as ac,
6152
+ kr as ad,
6153
+ no as ae,
6154
+ yo as af,
6155
+ br as ag,
6156
+ Pn as ah,
6157
+ so as ai,
6158
+ Vt as aj,
6159
+ No as ak,
6160
+ bo as al,
6161
+ wo as am,
6162
+ Eo as an,
6163
+ ko as ao,
6164
+ hn as ap,
6165
+ So as aq,
6166
+ on as b,
6167
+ Fo as c,
6168
+ Uo as d,
6169
+ Fe as e,
6170
+ Lo as f,
6171
+ eo as g,
6172
+ jo as h,
6173
+ _o as i,
6174
+ jr as j,
6175
+ $o as k,
6176
+ io as l,
6177
+ yr as m,
6178
+ un as n,
6179
+ G as o,
6180
+ Xi as p,
6181
+ Er as q,
6182
+ Po as r,
6183
+ tr as s,
6184
+ gr as t,
6185
+ an as u,
6186
+ to as v,
6187
+ mo as w,
6188
+ fr as x,
6189
+ Io as y,
6190
+ Mo as z
6100
6191
  };
6101
- //# sourceMappingURL=roadmap.C0AQ6pUX.js.map
6192
+ //# sourceMappingURL=roadmap.HCld8rN3.js.map