@shopify/cli 3.88.0 → 3.89.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 (96) hide show
  1. package/dist/acorn-45LE5Z2A.js +3016 -0
  2. package/dist/angular-Z5FPQPLR.js +2791 -0
  3. package/dist/babel-TRRZ6QQY.js +7173 -0
  4. package/dist/{chunk-J7U35MPX.js → chunk-2CNWYFWQ.js} +5 -5
  5. package/dist/{chunk-HM34WS7W.js → chunk-2OJBOBH2.js} +3 -3
  6. package/dist/{chunk-4ISFA2N3.js → chunk-2QVJ6J2X.js} +7 -6
  7. package/dist/{chunk-K5F7HNJN.js → chunk-36WMFQ3S.js} +3 -3
  8. package/dist/{chunk-VH47P2IR.js → chunk-5PAHFSKT.js} +3 -3
  9. package/dist/{chunk-6GKJAGTG.js → chunk-6KFJWCTP.js} +2 -2
  10. package/dist/{chunk-GZ3PD27A.js → chunk-6YASM3HI.js} +5 -5
  11. package/dist/{chunk-UBFTWR2L.js → chunk-B5Q2Q4B3.js} +3 -3
  12. package/dist/{chunk-QRIP3SU2.js → chunk-CUCT627W.js} +8 -8
  13. package/dist/{chunk-7U3KXZYU.js → chunk-EAEHP4CZ.js} +4 -4
  14. package/dist/{chunk-JO4W7S44.js → chunk-EQO4QA4E.js} +37 -16
  15. package/dist/{chunk-DGWEIWJA.js → chunk-EYUOBXKH.js} +3 -3
  16. package/dist/{chunk-GZARFYAY.js → chunk-GFYDB5LD.js} +2 -2
  17. package/dist/{chunk-5BHU3PRC.js → chunk-GSUL4KBP.js} +2086 -2216
  18. package/dist/{chunk-YBRRA3G2.js → chunk-GT7PA6E6.js} +2 -2
  19. package/dist/{chunk-LBA6IB72.js → chunk-JYBBGVIM.js} +3 -3
  20. package/dist/{chunk-6XQFNXU3.js → chunk-LJHVLE3R.js} +2 -2
  21. package/dist/{chunk-TQWSBJX3.js → chunk-NJR5IH3H.js} +4 -4
  22. package/dist/{chunk-IVWPL6RQ.js → chunk-P3SM4EEQ.js} +3 -3
  23. package/dist/{chunk-SATLZT2F.js → chunk-PYPPUTUV.js} +2 -2
  24. package/dist/{chunk-4NQZXGUR.js → chunk-R7OKLQB6.js} +4 -4
  25. package/dist/{chunk-TF4AQQB4.js → chunk-TLGBKEEX.js} +6 -6
  26. package/dist/{chunk-ZKOCRU7F.js → chunk-TPPRDIBF.js} +4 -4
  27. package/dist/{chunk-6O34ZV3A.js → chunk-TRR5QJRW.js} +4 -4
  28. package/dist/{chunk-OUR7YOZK.js → chunk-TWYT4DFD.js} +2 -2
  29. package/dist/{chunk-HQJPNVYR.js → chunk-V2ZY6OP3.js} +6 -6
  30. package/dist/{chunk-VLBE545G.js → chunk-WC5EDB4Z.js} +4 -4
  31. package/dist/{chunk-TZSBI4FY.js → chunk-WF5BWNFE.js} +6 -6
  32. package/dist/{chunk-TPVWZRBE.js → chunk-WSX6K4TT.js} +3 -3
  33. package/dist/{chunk-SMXARNZJ.js → chunk-XLMH6DBR.js} +3 -3
  34. package/dist/{chunk-KVDUU7LU.js → chunk-Y2BHJWKT.js} +2 -2
  35. package/dist/{chunk-CCYDP5TC.js → chunk-Y3HY6QD7.js} +5 -5
  36. package/dist/{chunk-5OVH24W5.js → chunk-YETFHMCK.js} +7 -7
  37. package/dist/{chunk-KF76XPVO.js → chunk-ZM543XCR.js} +3 -3
  38. package/dist/cli/commands/auth/login.js +10 -10
  39. package/dist/cli/commands/auth/login.test.js +11 -11
  40. package/dist/cli/commands/auth/logout.js +10 -10
  41. package/dist/cli/commands/auth/logout.test.js +11 -11
  42. package/dist/cli/commands/cache/clear.js +10 -10
  43. package/dist/cli/commands/debug/command-flags.js +10 -10
  44. package/dist/cli/commands/docs/generate.js +10 -10
  45. package/dist/cli/commands/docs/generate.test.js +10 -10
  46. package/dist/cli/commands/help.js +10 -10
  47. package/dist/cli/commands/kitchen-sink/async.js +11 -11
  48. package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
  49. package/dist/cli/commands/kitchen-sink/index.js +13 -13
  50. package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
  51. package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
  52. package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
  53. package/dist/cli/commands/kitchen-sink/static.js +11 -11
  54. package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
  55. package/dist/cli/commands/notifications/generate.js +11 -11
  56. package/dist/cli/commands/notifications/list.js +11 -11
  57. package/dist/cli/commands/search.js +11 -11
  58. package/dist/cli/commands/upgrade.js +11 -11
  59. package/dist/cli/commands/version.js +11 -11
  60. package/dist/cli/commands/version.test.js +11 -11
  61. package/dist/cli/services/commands/notifications.js +8 -8
  62. package/dist/cli/services/commands/search.js +4 -4
  63. package/dist/cli/services/commands/search.test.js +4 -4
  64. package/dist/cli/services/commands/version.js +5 -5
  65. package/dist/cli/services/commands/version.test.js +6 -6
  66. package/dist/cli/services/kitchen-sink/async.js +4 -4
  67. package/dist/cli/services/kitchen-sink/prompts.js +4 -4
  68. package/dist/cli/services/kitchen-sink/static.js +4 -4
  69. package/dist/cli/services/upgrade.js +5 -5
  70. package/dist/cli/services/upgrade.test.js +6 -6
  71. package/dist/{custom-oclif-loader-EAWHI4I3.js → custom-oclif-loader-TLTSWHLS.js} +4 -4
  72. package/dist/{devtools-EVCDECOU.js → devtools-2SG3BFWJ.js} +4 -4
  73. package/dist/{devtools-LDCSRUXB.js → devtools-D47L6HIC.js} +7 -7
  74. package/dist/{error-handler-WZR7CPYT.js → error-handler-JWFNITM6.js} +8 -8
  75. package/dist/estree-PY6WKTNG.js +4490 -0
  76. package/dist/flow-YN54TSCB.js +27513 -0
  77. package/dist/glimmer-RMPUUUDS.js +2781 -0
  78. package/dist/graphql-PPLVYWBL.js +1225 -0
  79. package/dist/hooks/postrun.js +7 -7
  80. package/dist/hooks/prerun.js +8 -8
  81. package/dist/html-3U6QZZZ4.js +2768 -0
  82. package/dist/index.js +9196 -4200
  83. package/dist/{lib-G7Q5M6VX.js → lib-XGN4IWQ3.js} +3 -3
  84. package/dist/{local-P2SS6AIS.js → local-4NMXX5NP.js} +4 -4
  85. package/dist/markdown-RHRQTUMC.js +3269 -0
  86. package/dist/meriyah-7MIMHTWQ.js +2645 -0
  87. package/dist/{node-package-manager-FZWNOAYQ.js → node-package-manager-SHRILTY3.js} +5 -5
  88. package/dist/postcss-MSOPGY7M.js +4796 -0
  89. package/dist/prettier-2ITB6I34.js +13861 -0
  90. package/dist/tsconfig.tsbuildinfo +1 -1
  91. package/dist/typescript-ZSZVUJZX.js +13034 -0
  92. package/dist/{ui-5RSPUMJS.js → ui-MKDRI4FX.js} +4 -4
  93. package/dist/{workerd-K73DK5CH.js → workerd-BHG6KDEK.js} +11 -11
  94. package/dist/yaml-6GALFXQY.js +4077 -0
  95. package/oclif.manifest.json +404 -19
  96. package/package.json +6 -6
@@ -0,0 +1,4077 @@
1
+ import {
2
+ __esm,
3
+ init_cjs_shims
4
+ } from "./chunk-PKR7KJ6P.js";
5
+
6
+ // ../../node_modules/.pnpm/prettier@3.7.4/node_modules/prettier/plugins/yaml.mjs
7
+ function Ri(t) {
8
+ return this[t < 0 ? this.length + t : t];
9
+ }
10
+ function Fi(t) {
11
+ if (typeof t == "string") return Qe;
12
+ if (Array.isArray(t)) return Ge;
13
+ if (!t) return;
14
+ let { type: e } = t;
15
+ if (bt.has(e)) return e;
16
+ }
17
+ function Ui(t) {
18
+ let e = t === null ? "null" : typeof t;
19
+ if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
20
+ Expected it to be 'string' or 'object'.`;
21
+ if (Nt(t)) throw new Error("doc is valid.");
22
+ let n = Object.prototype.toString.call(t);
23
+ if (n !== "[object Object]") return `Unexpected doc '${n}'.`;
24
+ let r = qi([...bt].map((s) => `'${s}'`));
25
+ return `Unexpected doc.type '${t.type}'.
26
+ Expected it to be ${r}.`;
27
+ }
28
+ function Vi(t, e) {
29
+ if (typeof t == "string") return e(t);
30
+ let n = /* @__PURE__ */ new Map();
31
+ return r(t);
32
+ function r(i) {
33
+ if (n.has(i)) return n.get(i);
34
+ let o = s(i);
35
+ return n.set(i, o), o;
36
+ }
37
+ function s(i) {
38
+ switch (Nt(i)) {
39
+ case Ge:
40
+ return e(i.map(r));
41
+ case Te:
42
+ return e({ ...i, parts: i.parts.map(r) });
43
+ case Ce:
44
+ return e({ ...i, breakContents: r(i.breakContents), flatContents: r(i.flatContents) });
45
+ case Le: {
46
+ let { expandedStates: o, contents: a } = i;
47
+ return o ? (o = o.map(r), a = o[0]) : a = r(a), e({ ...i, contents: a, expandedStates: o });
48
+ }
49
+ case Ae:
50
+ case gt:
51
+ case Et:
52
+ case wt:
53
+ case Me:
54
+ return e({ ...i, contents: r(i.contents) });
55
+ case Qe:
56
+ case dt:
57
+ case yt:
58
+ case St:
59
+ case re:
60
+ case ke:
61
+ return e(i);
62
+ default:
63
+ throw new ar(i);
64
+ }
65
+ }
66
+ }
67
+ function cr(t, e = He) {
68
+ return Vi(t, (n) => typeof n == "string" ? v(e, n.split(`
69
+ `)) : n);
70
+ }
71
+ function Je(t, e) {
72
+ return fr(t), Z(e), { type: Ae, contents: e, n: t };
73
+ }
74
+ function cn(t) {
75
+ return Je(Number.NEGATIVE_INFINITY, t);
76
+ }
77
+ function ur(t) {
78
+ return Je({ type: "root" }, t);
79
+ }
80
+ function pr(t) {
81
+ return Je(-1, t);
82
+ }
83
+ function At(t) {
84
+ return lr(t), { type: Te, parts: t };
85
+ }
86
+ function Pe(t, e = {}) {
87
+ return Z(t), Ot(e.expandedStates, !0), { type: Le, id: e.id, contents: t, break: !!e.shouldBreak, expandedStates: e.expandedStates };
88
+ }
89
+ function ln(t, e) {
90
+ return Pe(t[0], { ...e, expandedStates: t });
91
+ }
92
+ function ze(t, e = "", n = {}) {
93
+ return Z(t), e !== "" && Z(e), { type: Ce, breakContents: t, flatContents: e, groupId: n.groupId };
94
+ }
95
+ function v(t, e) {
96
+ Z(t), Ot(e);
97
+ let n = [];
98
+ for (let r = 0; r < e.length; r++) r !== 0 && n.push(t), n.push(e[r]);
99
+ return n;
100
+ }
101
+ function mr(t) {
102
+ return Z(t), { type: Me, contents: t };
103
+ }
104
+ function Tt(t) {
105
+ return (e, n, r) => {
106
+ let s = !!r?.backwards;
107
+ if (n === !1) return !1;
108
+ let { length: i } = e, o = n;
109
+ for (; o >= 0 && o < i; ) {
110
+ let a = e.charAt(o);
111
+ if (t instanceof RegExp) {
112
+ if (!t.test(a)) return o;
113
+ } else if (!t.includes(a)) return o;
114
+ s ? o-- : o++;
115
+ }
116
+ return o === -1 || o === i ? o : !1;
117
+ };
118
+ }
119
+ function ji(t, e, n) {
120
+ let r = !!n?.backwards;
121
+ if (e === !1) return !1;
122
+ let s = t.charAt(e);
123
+ if (r) {
124
+ if (t.charAt(e - 1) === "\r" && s === `
125
+ `) return e - 2;
126
+ if (hr(s)) return e - 1;
127
+ } else {
128
+ if (s === "\r" && t.charAt(e + 1) === `
129
+ `) return e + 2;
130
+ if (hr(s)) return e + 1;
131
+ }
132
+ return e;
133
+ }
134
+ function Qi(t, e) {
135
+ let n = e - 1;
136
+ n = fn(t, n, { backwards: !0 }), n = un(t, n, { backwards: !0 }), n = fn(t, n, { backwards: !0 });
137
+ let r = un(t, n, { backwards: !0 });
138
+ return n !== r;
139
+ }
140
+ function Ar(t, e) {
141
+ switch (t.type) {
142
+ case "comment":
143
+ if (wr(t.value)) return null;
144
+ break;
145
+ case "quoteDouble":
146
+ case "quoteSingle":
147
+ e.type = "quote";
148
+ break;
149
+ case "document":
150
+ e.directivesEndMarker || delete e.directivesEndMarker, e.documentEndMarker || delete e.documentEndMarker;
151
+ break;
152
+ }
153
+ }
154
+ function Tr(t, e) {
155
+ let { node: n } = t;
156
+ if (n.type === "root" && e.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath)) return async (r) => {
157
+ let s = await r(e.originalText, { parser: "json" });
158
+ return s ? [s, N] : void 0;
159
+ };
160
+ }
161
+ function et(t) {
162
+ if (Ze !== null && typeof Ze.property) {
163
+ let e = Ze;
164
+ return Ze = et.prototype = null, e;
165
+ }
166
+ return Ze = et.prototype = t ?? /* @__PURE__ */ Object.create(null), new et();
167
+ }
168
+ function hn(t) {
169
+ return et(t);
170
+ }
171
+ function Hi(t, e = "type") {
172
+ hn(t);
173
+ function n(r) {
174
+ let s = r[e], i = t[s];
175
+ if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: r });
176
+ return i;
177
+ }
178
+ return n;
179
+ }
180
+ function Xi(t) {
181
+ return Array.isArray(t) && t.length > 0;
182
+ }
183
+ function W(t, e) {
184
+ return typeof t?.type == "string" && e.includes(t.type);
185
+ }
186
+ function dn(t, e, n) {
187
+ return e("children" in t ? { ...t, children: t.children.map((r) => dn(r, e, t)) } : t, n);
188
+ }
189
+ function Ie(t, e, n) {
190
+ Object.defineProperty(t, e, { get: n, enumerable: !1 });
191
+ }
192
+ function _r(t, e) {
193
+ let n = 0, r = e.length;
194
+ for (let s = t.position.end.offset - 1; s < r; s++) {
195
+ let i = e[s];
196
+ if (i === `
197
+ ` && n++, n === 1 && /\S/u.test(i)) return !1;
198
+ if (n === 2) return !0;
199
+ }
200
+ return !1;
201
+ }
202
+ function Ct(t) {
203
+ let { node: e } = t;
204
+ switch (e.type) {
205
+ case "tag":
206
+ case "anchor":
207
+ case "comment":
208
+ return !1;
209
+ }
210
+ let n = t.stack.length;
211
+ for (let r = 1; r < n; r++) {
212
+ let s = t.stack[r], i = t.stack[r - 1];
213
+ if (Array.isArray(i) && typeof s == "number" && s !== i.length - 1) return !1;
214
+ }
215
+ return !0;
216
+ }
217
+ function Mt(t) {
218
+ return ve(t.children) ? Mt(D(0, t.children, -1)) : t;
219
+ }
220
+ function Ir(t) {
221
+ return t.value.trim() === "prettier-ignore";
222
+ }
223
+ function xr(t) {
224
+ let { node: e } = t;
225
+ if (e.type === "documentBody") {
226
+ let n = t.parent.head;
227
+ return I(n) && Ir(D(0, n.endComments, -1));
228
+ }
229
+ return te(e) && Ir(D(0, e.leadingComments, -1));
230
+ }
231
+ function _e(t) {
232
+ return !ve(t.children) && !zi(t);
233
+ }
234
+ function zi(t) {
235
+ return te(t) || ae(t) || gn(t) || K(t) || I(t);
236
+ }
237
+ function te(t) {
238
+ return ve(t?.leadingComments);
239
+ }
240
+ function ae(t) {
241
+ return ve(t?.middleComments);
242
+ }
243
+ function gn(t) {
244
+ return t?.indicatorComment;
245
+ }
246
+ function K(t) {
247
+ return t?.trailingComment;
248
+ }
249
+ function I(t) {
250
+ return ve(t?.endComments);
251
+ }
252
+ function Rr(t) {
253
+ return t ? t.split(/(?<!^| ) (?! |$)/u) : [];
254
+ }
255
+ function Dr(t, e, n) {
256
+ let r = e.split(`
257
+ `).map((i, o, a) => o === 0 && o === a.length - 1 ? i : o !== 0 && o !== a.length - 1 ? i.trim() : o === 0 ? i.trimEnd() : i.trimStart());
258
+ if (n.proseWrap === "preserve") return r.map((i) => i ? [i] : []);
259
+ let s = [];
260
+ for (let [i, o] of r.entries()) {
261
+ let a = Rr(o);
262
+ i > 0 && r[i - 1].length > 0 && a.length > 0 && !(t === "quoteDouble" && D(0, D(0, s, -1), -1).endsWith("\\")) ? s[s.length - 1] = [...D(0, s, -1), ...a] : s.push(a);
263
+ }
264
+ return n.proseWrap === "never" ? s.map((i) => [i.join(" ")]) : s;
265
+ }
266
+ function $r(t, { parentIndent: e, isLastDescendant: n, options: r }) {
267
+ let s = t.position.start.line === t.position.end.line ? "" : r.originalText.slice(t.position.start.offset, t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1], i;
268
+ if (t.indent === null) {
269
+ let l = s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);
270
+ i = l ? l.groups.leadingSpace.length : Number.POSITIVE_INFINITY;
271
+ } else i = t.indent - 1 + e;
272
+ let o = s.split(`
273
+ `).map((l) => l.slice(i));
274
+ if (r.proseWrap === "preserve" || t.type === "blockLiteral") return c(o.map((l) => l ? [l] : []));
275
+ let a = [];
276
+ for (let [l, f] of o.entries()) {
277
+ let m = Rr(f);
278
+ l > 0 && m.length > 0 && o[l - 1].length > 0 && !/^\s/u.test(m[0]) && !/^\s|\s$/u.test(D(0, a, -1)) ? a[a.length - 1] = [...D(0, a, -1), ...m] : a.push(m);
279
+ }
280
+ return a = a.map((l) => {
281
+ let f = [];
282
+ for (let m of l) f.length > 0 && /\s$/u.test(D(0, f, -1)) ? f[f.length - 1] += " " + m : f.push(m);
283
+ return f;
284
+ }), r.proseWrap === "never" && (a = a.map((l) => [l.join(" ")])), c(a);
285
+ function c(l) {
286
+ if (t.chomping === "keep") return D(0, l, -1).length === 0 ? l.slice(0, -1) : l;
287
+ let f = 0;
288
+ for (let m = l.length - 1; m >= 0 && l[m].length === 0; m--) f++;
289
+ return f === 0 ? l : f >= 2 && !n ? l.slice(0, -(f - 1)) : l.slice(0, -f);
290
+ }
291
+ }
292
+ function nt(t) {
293
+ if (!t) return !0;
294
+ switch (t.type) {
295
+ case "plain":
296
+ case "quoteDouble":
297
+ case "quoteSingle":
298
+ case "alias":
299
+ case "flowMapping":
300
+ case "flowSequence":
301
+ return !0;
302
+ default:
303
+ return !1;
304
+ }
305
+ }
306
+ function kt(t, e) {
307
+ let { node: n, root: r } = t, s;
308
+ return yn.has(r) ? s = yn.get(r) : (s = /* @__PURE__ */ new Set(), yn.set(r, s)), !s.has(n.position.end.line) && (s.add(n.position.end.line), _r(n, e) && !En(t.parent)) ? Lt : "";
309
+ }
310
+ function En(t) {
311
+ return I(t) && !W(t, ["documentHead", "documentBody", "flowMapping", "flowSequence"]);
312
+ }
313
+ function _(t, e) {
314
+ return Je(" ".repeat(t), e);
315
+ }
316
+ function Zi(t, e, n) {
317
+ let { node: r } = t, s = t.ancestors.filter((l) => l.type === "sequence" || l.type === "mapping").length, i = Ct(t), o = [r.type === "blockFolded" ? ">" : "|"];
318
+ r.indent !== null && o.push(r.indent.toString()), r.chomping !== "clip" && o.push(r.chomping === "keep" ? "+" : "-"), gn(r) && o.push(" ", n("indicatorComment"));
319
+ let a = $r(r, { parentIndent: s, isLastDescendant: i, options: e }), c = [];
320
+ for (let [l, f] of a.entries()) l === 0 && c.push(N), c.push(At(v(se, f))), l !== a.length - 1 ? c.push(f.length === 0 ? N : ur(He)) : r.chomping === "keep" && i && c.push(cn(f.length === 0 ? N : He));
321
+ return r.indent === null ? o.push(pr(_(e.tabWidth, c))) : o.push(cn(_(r.indent - 1 + s, c))), o;
322
+ }
323
+ function Pt(t, e, n) {
324
+ let { node: r } = t, s = r.type === "flowMapping", i = s ? "{" : "[", o = s ? "}" : "]", a = Lt;
325
+ s && r.children.length > 0 && e.bracketSpacing && (a = se);
326
+ let c = D(0, r.children, -1), l = c?.type === "flowMappingItem" && _e(c.key) && _e(c.value);
327
+ return [i, _(e.tabWidth, [a, eo(t, e, n), e.trailingComma === "none" ? "" : ze(","), I(r) ? [N, v(N, t.map(n, "endComments"))] : ""]), l ? "" : a, o];
328
+ }
329
+ function eo(t, e, n) {
330
+ return t.map(({ isLast: r, node: s, next: i }) => [n(), r ? "" : [",", se, s.position.start.line !== i.position.start.line ? kt(t, e.originalText) : ""]], "children");
331
+ }
332
+ function to(t, e, n) {
333
+ let { node: r, parent: s } = t, { key: i, value: o } = r, a = _e(i), c = _e(o);
334
+ if (a && c) return ": ";
335
+ let l = n("key"), f = no(r) ? " " : "";
336
+ if (c) return r.type === "flowMappingItem" && s.type === "flowMapping" ? l : r.type === "mappingItem" && Sn(i.content, e) && !K(i.content) && s.tag?.value !== "tag:yaml.org,2002:set" ? [l, f, ":"] : ["? ", _(2, l)];
337
+ let m = n("value");
338
+ if (a) return [": ", _(2, m)];
339
+ if (te(o) || !nt(i.content)) return ["? ", _(2, l), N, ...t.map(() => [n(), N], "value", "leadingComments"), ": ", _(2, m)];
340
+ if (ro(i.content) && !te(i.content) && !ae(i.content) && !K(i.content) && !I(i) && !te(o.content) && !ae(o.content) && !I(o) && Sn(o.content, e)) return [l, f, ": ", m];
341
+ let g = Symbol("mappingKey"), y = Pe([ze("? "), Pe(_(2, l), { id: g })]), h = [N, ": ", _(2, m)], d = [f, ":"];
342
+ I(o) && o.content && W(o.content, ["flowMapping", "flowSequence"]) && o.content.children.length === 0 ? d.push(" ") : te(o.content) || I(o) && o.content && !W(o.content, ["mapping", "sequence"]) || s.type === "mapping" && K(i.content) && nt(o.content) || W(o.content, ["mapping", "sequence"]) && o.content.tag === null && o.content.anchor === null ? d.push(N) : o.content ? d.push(se) : K(o) && d.push(" "), d.push(m);
343
+ let w = _(e.tabWidth, d);
344
+ return Sn(i.content, e) && !te(i.content) && !ae(i.content) && !K(i.content) && !I(i) ? ln([[l, w]]) : ln([[y, ze(h, w, { groupId: g })]]);
345
+ }
346
+ function Sn(t, e) {
347
+ if (!t) return !0;
348
+ switch (t.type) {
349
+ case "plain":
350
+ case "quoteSingle":
351
+ case "quoteDouble":
352
+ break;
353
+ case "alias":
354
+ return !0;
355
+ default:
356
+ return !1;
357
+ }
358
+ if (e.proseWrap === "preserve") return t.position.start.line === t.position.end.line;
359
+ if (/\\$/mu.test(e.originalText.slice(t.position.start.offset, t.position.end.offset))) return !1;
360
+ switch (e.proseWrap) {
361
+ case "never":
362
+ return !t.value.includes(`
363
+ `);
364
+ case "always":
365
+ return !/[\n ]/u.test(t.value);
366
+ default:
367
+ return !1;
368
+ }
369
+ }
370
+ function no(t) {
371
+ return t.key.content?.type === "alias";
372
+ }
373
+ function ro(t) {
374
+ if (!t) return !0;
375
+ switch (t.type) {
376
+ case "plain":
377
+ case "quoteDouble":
378
+ case "quoteSingle":
379
+ return t.position.start.line === t.position.end.line;
380
+ case "alias":
381
+ return !0;
382
+ default:
383
+ return !1;
384
+ }
385
+ }
386
+ function so(t) {
387
+ return dn(t, io);
388
+ }
389
+ function io(t) {
390
+ switch (t.type) {
391
+ case "document":
392
+ Ie(t, "head", () => t.children[0]), Ie(t, "body", () => t.children[1]);
393
+ break;
394
+ case "documentBody":
395
+ case "sequenceItem":
396
+ case "flowSequenceItem":
397
+ case "mappingKey":
398
+ case "mappingValue":
399
+ Ie(t, "content", () => t.children[0]);
400
+ break;
401
+ case "mappingItem":
402
+ case "flowMappingItem":
403
+ Ie(t, "key", () => t.children[0]), Ie(t, "value", () => t.children[1]);
404
+ break;
405
+ }
406
+ return t;
407
+ }
408
+ function oo(t, e, n) {
409
+ let { node: r } = t, s = [];
410
+ r.type !== "mappingValue" && te(r) && s.push([v(N, t.map(n, "leadingComments")), N]);
411
+ let { tag: i, anchor: o } = r;
412
+ i && s.push(n("tag")), i && o && s.push(" "), o && s.push(n("anchor"));
413
+ let a = "";
414
+ return W(r, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !Ct(t) && (a = kt(t, e.originalText)), (i || o) && (W(r, ["sequence", "mapping"]) && !ae(r) ? s.push(N) : s.push(" ")), ae(r) && s.push([r.middleComments.length === 1 ? "" : N, v(N, t.map(n, "middleComments")), N]), xr(t) ? s.push(cr(e.originalText.slice(r.position.start.offset, r.position.end.offset).trimEnd())) : s.push(Pe(ao(t, e, n))), K(r) && !W(r, ["document", "documentHead"]) && s.push(mr([r.type === "mappingValue" && !r.content ? "" : " ", t.parent.type === "mappingKey" && t.getParentNode(2).type === "mapping" && nt(r) ? "" : Xe, n("trailingComment")])), En(r) && s.push(_(r.type === "sequenceItem" ? 2 : 0, [N, v(N, t.map(({ node: c }) => [pn(e.originalText, tt(c)) ? N : "", n()], "endComments"))])), s.push(a), s;
415
+ }
416
+ function ao(t, e, n) {
417
+ let { node: r } = t;
418
+ switch (r.type) {
419
+ case "root": {
420
+ let s = Mt(r), i = !(W(s, ["blockLiteral", "blockFolded"]) && s.chomping === "keep"), o = [];
421
+ return t.each(({ node: a, isFirst: c }) => {
422
+ c || o.push(N), o.push(n()), lo(t) && (i && o.push(N), o.push("..."), K(a) && o.push(" ", n("trailingComment")));
423
+ }, "children"), i && o.push(N), o;
424
+ }
425
+ case "document": {
426
+ let s = [];
427
+ return fo(t) && ((r.head.children.length > 0 || r.head.endComments.length > 0) && s.push(n("head")), K(r.head) ? s.push(["---", " ", n(["head", "trailingComment"])]) : s.push("---")), co(r) && s.push(n("body")), v(N, s);
428
+ }
429
+ case "documentHead":
430
+ return v(N, [...t.map(n, "children"), ...t.map(n, "endComments")]);
431
+ case "documentBody": {
432
+ let { children: s, endComments: i } = r, o = "";
433
+ if (s.length > 0 && i.length > 0) {
434
+ let a = Mt(r);
435
+ if (W(a, ["blockFolded", "blockLiteral"])) a.chomping !== "keep" && (o = [N, N]);
436
+ else {
437
+ let c = D(0, s, -1);
438
+ o = W(c, ["mapping"]) && pn(e.originalText, tt(i[0])) ? [N, N] : N;
439
+ }
440
+ }
441
+ return [v(N, t.map(n, "children")), o, v(N, t.map(n, "endComments"))];
442
+ }
443
+ case "directive":
444
+ return ["%", v(" ", [r.name, ...r.parameters])];
445
+ case "comment":
446
+ return ["#", r.value];
447
+ case "alias":
448
+ return ["*", r.value];
449
+ case "tag":
450
+ return e.originalText.slice(r.position.start.offset, r.position.end.offset);
451
+ case "anchor":
452
+ return ["&", r.value];
453
+ case "plain":
454
+ return rt(r.type, e.originalText.slice(r.position.start.offset, r.position.end.offset), e);
455
+ case "quoteDouble":
456
+ case "quoteSingle": {
457
+ let o = e.originalText.slice(r.position.start.offset + 1, r.position.end.offset - 1);
458
+ if (r.type === "quoteSingle" && o.includes("\\") || r.type === "quoteDouble" && /\\[^"]/u.test(o)) {
459
+ let c = r.type === "quoteDouble" ? '"' : "'";
460
+ return [c, rt(r.type, o, e), c];
461
+ }
462
+ if (o.includes('"')) return ["'", rt(r.type, r.type === "quoteDouble" ? ht(0, ht(0, o, '\\"', '"'), "'", "'".repeat(2)) : o, e), "'"];
463
+ if (o.includes("'")) return ['"', rt(r.type, r.type === "quoteSingle" ? ht(0, o, "''", "'") : o, e), '"'];
464
+ let a = e.singleQuote ? "'" : '"';
465
+ return [a, rt(r.type, o, e), a];
466
+ }
467
+ case "blockFolded":
468
+ case "blockLiteral":
469
+ return Yr(t, e, n);
470
+ case "mapping":
471
+ case "sequence":
472
+ return v(N, t.map(n, "children"));
473
+ case "sequenceItem":
474
+ return ["- ", _(2, r.content ? n("content") : "")];
475
+ case "mappingKey":
476
+ case "mappingValue":
477
+ return r.content ? n("content") : "";
478
+ case "mappingItem":
479
+ case "flowMappingItem":
480
+ return Br(t, e, n);
481
+ case "flowMapping":
482
+ return Pt(t, e, n);
483
+ case "flowSequence":
484
+ return Pt(t, e, n);
485
+ case "flowSequenceItem":
486
+ return n("content");
487
+ default:
488
+ throw new dr(r, "YAML");
489
+ }
490
+ }
491
+ function co(t) {
492
+ return t.body.children.length > 0 || I(t.body);
493
+ }
494
+ function lo(t) {
495
+ let e = t.node;
496
+ if (e.documentEndMarker || K(e)) return !0;
497
+ if (t.isLast) return !1;
498
+ let n = t.next;
499
+ return n.head.children.length > 0 || I(n.head);
500
+ }
501
+ function fo(t) {
502
+ let e = t.node;
503
+ return e.directivesEndMarker || e.head.children.length > 0 || I(e.head) || K(e.head);
504
+ }
505
+ function rt(t, e, n) {
506
+ let r = Dr(t, e, n);
507
+ return v(N, r.map((s) => At(v(se, s))));
508
+ }
509
+ function F(t, e = null) {
510
+ "children" in t && t.children.forEach((n) => F(n, t)), "anchor" in t && t.anchor && F(t.anchor, t), "tag" in t && t.tag && F(t.tag, t), "leadingComments" in t && t.leadingComments.forEach((n) => F(n, t)), "middleComments" in t && t.middleComments.forEach((n) => F(n, t)), "indicatorComment" in t && t.indicatorComment && F(t.indicatorComment, t), "trailingComment" in t && t.trailingComment && F(t.trailingComment, t), "endComments" in t && t.endComments.forEach((n) => F(n, t)), Object.defineProperty(t, "_parent", { value: e, enumerable: !1 });
511
+ }
512
+ function Oe(t) {
513
+ return `${t.line}:${t.column}`;
514
+ }
515
+ function Is(t) {
516
+ F(t);
517
+ let e = _a(t), n = t.children.slice();
518
+ t.comments.sort((r, s) => r.position.start.offset - s.position.end.offset).filter((r) => !r._parent).forEach((r) => {
519
+ for (; n.length > 1 && r.position.start.line > n[0].position.end.line; ) n.shift();
520
+ xa(r, e, n[0]);
521
+ });
522
+ }
523
+ function _a(t) {
524
+ let e = Array.from(new Array(t.position.end.line), () => ({}));
525
+ for (let n of t.comments) e[n.position.start.line - 1].comment = n;
526
+ return _s(e, t), e;
527
+ }
528
+ function _s(t, e) {
529
+ if (e.position.start.offset !== e.position.end.offset) {
530
+ if ("leadingComments" in e) {
531
+ let { start: n } = e.position, { leadingAttachableNode: r } = t[n.line - 1];
532
+ (!r || n.column < r.position.start.column) && (t[n.line - 1].leadingAttachableNode = e);
533
+ }
534
+ if ("trailingComment" in e && e.position.end.column > 1 && e.type !== "document" && e.type !== "documentHead") {
535
+ let { end: n } = e.position, { trailingAttachableNode: r } = t[n.line - 1];
536
+ (!r || n.column >= r.position.end.column) && (t[n.line - 1].trailingAttachableNode = e);
537
+ }
538
+ if (e.type !== "root" && e.type !== "document" && e.type !== "documentHead" && e.type !== "documentBody") {
539
+ let { start: n, end: r } = e.position, s = [r.line].concat(n.line === r.line ? [] : n.line);
540
+ for (let i of s) {
541
+ let o = t[i - 1].trailingNode;
542
+ (!o || r.column >= o.position.end.column) && (t[i - 1].trailingNode = e);
543
+ }
544
+ }
545
+ "children" in e && e.children.forEach((n) => {
546
+ _s(t, n);
547
+ });
548
+ }
549
+ }
550
+ function xa(t, e, n) {
551
+ let r = t.position.start.line, { trailingAttachableNode: s } = e[r - 1];
552
+ if (s) {
553
+ if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${Oe(t.position.start)}`);
554
+ F(t, s), s.trailingComment = t;
555
+ return;
556
+ }
557
+ for (let o = r; o >= n.position.start.line; o--) {
558
+ let { trailingNode: a } = e[o - 1], c;
559
+ if (a) c = a;
560
+ else if (o !== r && e[o - 1].comment) c = e[o - 1].comment._parent;
561
+ else continue;
562
+ if ((c.type === "sequence" || c.type === "mapping") && (c = c.children[0]), c.type === "mappingItem") {
563
+ let [l, f] = c.children;
564
+ c = xs(l) ? l : f;
565
+ }
566
+ for (; ; ) {
567
+ if (Ra(c, t)) {
568
+ F(t, c), c.endComments.push(t);
569
+ return;
570
+ }
571
+ if (!c._parent) break;
572
+ c = c._parent;
573
+ }
574
+ break;
575
+ }
576
+ for (let o = r + 1; o <= n.position.end.line; o++) {
577
+ let { leadingAttachableNode: a } = e[o - 1];
578
+ if (a) {
579
+ F(t, a), a.leadingComments.push(t);
580
+ return;
581
+ }
582
+ }
583
+ let i = n.children[1];
584
+ F(t, i), i.endComments.push(t);
585
+ }
586
+ function Ra(t, e) {
587
+ if (t.position.start.offset < e.position.start.offset && t.position.end.offset > e.position.end.offset) switch (t.type) {
588
+ case "flowMapping":
589
+ case "flowSequence":
590
+ return t.children.length === 0 || e.position.start.line > t.children[t.children.length - 1].position.end.line;
591
+ }
592
+ if (e.position.end.offset < t.position.end.offset) return !1;
593
+ switch (t.type) {
594
+ case "sequenceItem":
595
+ return e.position.start.column > t.position.start.column;
596
+ case "mappingKey":
597
+ case "mappingValue":
598
+ return e.position.start.column > t._parent.position.start.column && (t.children.length === 0 || t.children.length === 1 && t.children[0].type !== "blockFolded" && t.children[0].type !== "blockLiteral") && (t.type === "mappingValue" || xs(t));
599
+ default:
600
+ return !1;
601
+ }
602
+ }
603
+ function xs(t) {
604
+ return t.position.start !== t.position.end && (t.children.length === 0 || t.position.start.offset !== t.children[0].position.start.offset);
605
+ }
606
+ function b(t, e) {
607
+ return { type: t, position: e };
608
+ }
609
+ function Rs(t, e, n) {
610
+ return { ...b("root", t), children: e, comments: n };
611
+ }
612
+ function pt(t) {
613
+ switch (t.type) {
614
+ case "DOCUMENT":
615
+ for (let e = t.contents.length - 1; e >= 0; e--) t.contents[e].type === "BLANK_LINE" ? t.contents.splice(e, 1) : pt(t.contents[e]);
616
+ for (let e = t.directives.length - 1; e >= 0; e--) t.directives[e].type === "BLANK_LINE" && t.directives.splice(e, 1);
617
+ break;
618
+ case "FLOW_MAP":
619
+ case "FLOW_SEQ":
620
+ case "MAP":
621
+ case "SEQ":
622
+ for (let e = t.items.length - 1; e >= 0; e--) {
623
+ let n = t.items[e];
624
+ "char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) : pt(n));
625
+ }
626
+ break;
627
+ case "MAP_KEY":
628
+ case "MAP_VALUE":
629
+ case "SEQ_ITEM":
630
+ t.node && pt(t.node);
631
+ break;
632
+ case "ALIAS":
633
+ case "BLANK_LINE":
634
+ case "BLOCK_FOLDED":
635
+ case "BLOCK_LITERAL":
636
+ case "COMMENT":
637
+ case "DIRECTIVE":
638
+ case "PLAIN":
639
+ case "QUOTE_DOUBLE":
640
+ case "QUOTE_SINGLE":
641
+ break;
642
+ default:
643
+ throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`);
644
+ }
645
+ }
646
+ function X(t, e) {
647
+ return { start: t, end: e };
648
+ }
649
+ function Hn(t) {
650
+ return { start: t, end: t };
651
+ }
652
+ function Ds(t, e) {
653
+ return { ...b("anchor", t), value: e };
654
+ }
655
+ function Ve(t, e) {
656
+ return { ...b("comment", t), value: e };
657
+ }
658
+ function $s(t, e, n) {
659
+ return { anchor: e, tag: t, middleComments: n };
660
+ }
661
+ function Ys(t, e) {
662
+ return { ...b("tag", t), value: e };
663
+ }
664
+ function Ht(t, e, n = () => !1) {
665
+ let r = t.cstNode, s = [], i = null, o = null, a = null;
666
+ for (let c of r.props) {
667
+ let l = e.text[c.origStart];
668
+ switch (l) {
669
+ case me.Tag:
670
+ i = i || c, o = Ys(e.transformRange(c), t.tag);
671
+ break;
672
+ case me.Anchor:
673
+ i = i || c, a = Ds(e.transformRange(c), r.anchor);
674
+ break;
675
+ case me.Comment: {
676
+ let f = Ve(e.transformRange(c), e.text.slice(c.origStart + 1, c.origEnd));
677
+ e.comments.push(f), !n(f) && i && i.origEnd <= c.origStart && c.origEnd <= r.valueRange.origStart && s.push(f);
678
+ break;
679
+ }
680
+ default:
681
+ throw new Error(`Unexpected leading character ${JSON.stringify(l)}`);
682
+ }
683
+ }
684
+ return $s(o, a, s);
685
+ }
686
+ function z() {
687
+ return { leadingComments: [] };
688
+ }
689
+ function he(t = null) {
690
+ return { trailingComment: t };
691
+ }
692
+ function q() {
693
+ return { ...z(), ...he() };
694
+ }
695
+ function Bs(t, e, n) {
696
+ return { ...b("alias", t), ...q(), ...e, value: n };
697
+ }
698
+ function Fs(t, e) {
699
+ let n = t.cstNode;
700
+ return Bs(e.transformRange({ origStart: n.valueRange.origStart - 1, origEnd: n.valueRange.origEnd }), e.transformContent(t), n.rawValue);
701
+ }
702
+ function qs(t) {
703
+ return { ...t, type: "blockFolded" };
704
+ }
705
+ function Us(t, e, n, r, s, i) {
706
+ return { ...b("blockValue", t), ...z(), ...e, chomping: n, indent: r, value: s, indicatorComment: i };
707
+ }
708
+ function Jt(t, e) {
709
+ let n = t.cstNode, r = 1, s = n.chomping === "CLIP" ? 0 : 1, o = n.header.origEnd - n.header.origStart - r - s !== 0, a = e.transformRange({ origStart: n.header.origStart, origEnd: n.valueRange.origEnd }), c = null, l = Ht(t, e, (f) => {
710
+ if (!(a.start.offset < f.position.start.offset && f.position.end.offset < a.end.offset)) return !1;
711
+ if (c) throw new Error(`Unexpected multiple indicator comments at ${Oe(f.position.start)}`);
712
+ return c = f, !0;
713
+ });
714
+ return Us(a, l, Jn[n.chomping], o ? n.blockIndent : null, n.strValue, c);
715
+ }
716
+ function Vs(t, e) {
717
+ return qs(Jt(t, e));
718
+ }
719
+ function Ws(t) {
720
+ return { ...t, type: "blockLiteral" };
721
+ }
722
+ function Ks(t, e) {
723
+ return Ws(Jt(t, e));
724
+ }
725
+ function js(t, e) {
726
+ return Ve(e.transformRange(t.range), t.comment);
727
+ }
728
+ function Qs(t, e, n) {
729
+ return { ...b("directive", t), ...q(), name: e, parameters: n };
730
+ }
731
+ function We(t, e) {
732
+ for (let n of t.props) {
733
+ let r = e.text[n.origStart];
734
+ switch (r) {
735
+ case me.Comment:
736
+ e.comments.push(Ve(e.transformRange(n), e.text.slice(n.origStart + 1, n.origEnd)));
737
+ break;
738
+ default:
739
+ throw new Error(`Unexpected leading character ${JSON.stringify(r)}`);
740
+ }
741
+ }
742
+ }
743
+ function Gs(t, e) {
744
+ return We(t, e), Qs(e.transformRange(t.range), t.name, t.parameters);
745
+ }
746
+ function Hs(t, e, n, r, s, i) {
747
+ return { ...b("document", t), ...he(i), directivesEndMarker: e, documentEndMarker: n, children: [r, s] };
748
+ }
749
+ function U(t = []) {
750
+ return { endComments: t };
751
+ }
752
+ function Js(t, e, n) {
753
+ return { ...b("documentBody", t), ...U(n), children: e ? [e] : [] };
754
+ }
755
+ function V(t) {
756
+ return t[t.length - 1];
757
+ }
758
+ function Xt(t, e) {
759
+ let n = t.match(e);
760
+ return n ? n.index : -1;
761
+ }
762
+ function Xs(t, e, n) {
763
+ let r = t.cstNode, { comments: s, endComments: i, documentTrailingComment: o, documentHeadTrailingComment: a } = Da(r, e, n), c = e.transformNode(t.contents), { position: l, documentEndPoint: f } = $a(r, c, e);
764
+ return e.comments.push(...s, ...i), { documentBody: Js(l, c, i), documentEndPoint: f, documentTrailingComment: o, documentHeadTrailingComment: a };
765
+ }
766
+ function Da(t, e, n) {
767
+ let r = [], s = [], i = [], o = [], a = !1;
768
+ for (let c = t.contents.length - 1; c >= 0; c--) {
769
+ let l = t.contents[c];
770
+ if (l.type === "COMMENT") {
771
+ let f = e.transformNode(l);
772
+ n && n.line === f.position.start.line ? o.unshift(f) : a ? r.unshift(f) : f.position.start.offset >= t.valueRange.origEnd ? i.unshift(f) : r.unshift(f);
773
+ } else a = !0;
774
+ }
775
+ if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${Oe(i[1].position.start)}`);
776
+ if (o.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${Oe(o[1].position.start)}`);
777
+ return { comments: r, endComments: s, documentTrailingComment: V(i) || null, documentHeadTrailingComment: V(o) || null };
778
+ }
779
+ function $a(t, e, n) {
780
+ let r = Xt(n.text.slice(t.valueRange.origEnd), /^\.\.\./), s = r === -1 ? t.valueRange.origEnd : Math.max(0, t.valueRange.origEnd - 1);
781
+ n.text[s - 1] === "\r" && s--;
782
+ let i = n.transformRange({ origStart: e !== null ? e.position.start.offset : s, origEnd: s }), o = r === -1 ? i.end : n.transformOffset(t.valueRange.origEnd + 3);
783
+ return { position: i, documentEndPoint: o };
784
+ }
785
+ function zs(t, e, n, r) {
786
+ return { ...b("documentHead", t), ...U(n), ...he(r), children: e };
787
+ }
788
+ function Zs(t, e) {
789
+ let n = t.cstNode, { directives: r, comments: s, endComments: i } = Ya(n, e), { position: o, documentEndMarkererPoint: a } = Ba(n, r, e);
790
+ return e.comments.push(...s, ...i), { createDocumentHeadWithTrailingComment: (l) => (l && e.comments.push(l), zs(o, r, i, l)), documentHeadEndMarkerPoint: a };
791
+ }
792
+ function Ya(t, e) {
793
+ let n = [], r = [], s = [], i = !1;
794
+ for (let o = t.directives.length - 1; o >= 0; o--) {
795
+ let a = e.transformNode(t.directives[o]);
796
+ a.type === "comment" ? i ? r.unshift(a) : s.unshift(a) : (i = !0, n.unshift(a));
797
+ }
798
+ return { directives: n, comments: r, endComments: s };
799
+ }
800
+ function Ba(t, e, n) {
801
+ let r = Xt(n.text.slice(0, t.valueRange.origStart), /---\s*$/);
802
+ r > 0 && !/[\r\n]/.test(n.text[r - 1]) && (r = -1);
803
+ let s = r === -1 ? { origStart: t.valueRange.origStart, origEnd: t.valueRange.origStart } : { origStart: r, origEnd: r + 3 };
804
+ return e.length !== 0 && (s.origStart = e[0].position.start.offset), { position: n.transformRange(s), documentEndMarkererPoint: r === -1 ? null : n.transformOffset(r) };
805
+ }
806
+ function ei(t, e) {
807
+ let { createDocumentHeadWithTrailingComment: n, documentHeadEndMarkerPoint: r } = Zs(t, e), { documentBody: s, documentEndPoint: i, documentTrailingComment: o, documentHeadTrailingComment: a } = Xs(t, e, r), c = n(a);
808
+ o && e.comments.push(o);
809
+ let l = t.cstNode;
810
+ return Hs(X(c.position.start, i), !!l.directivesEndMarker, !!l.documentEndMarker, c, s, o);
811
+ }
812
+ function zt(t, e, n) {
813
+ return { ...b("flowCollection", t), ...q(), ...U(), ...e, children: n };
814
+ }
815
+ function ti(t, e, n) {
816
+ return { ...zt(t, e, n), type: "flowMapping" };
817
+ }
818
+ function Zt(t, e, n) {
819
+ return { ...b("flowMappingItem", t), ...z(), children: [e, n] };
820
+ }
821
+ function de(t, e) {
822
+ let n = [];
823
+ for (let r of t) r && "type" in r && r.type === "COMMENT" ? e.comments.push(e.transformNode(r)) : n.push(r);
824
+ return n;
825
+ }
826
+ function en(t) {
827
+ let [e, n] = ["?", ":"].map((r) => {
828
+ let s = t.find((i) => "char" in i && i.char === r);
829
+ return s ? { origStart: s.origOffset, origEnd: s.origOffset + 1 } : null;
830
+ });
831
+ return { additionalKeyRange: e, additionalValueRange: n };
832
+ }
833
+ function tn(t, e) {
834
+ let n = e;
835
+ return (r) => t.slice(n, n = r);
836
+ }
837
+ function nn(t) {
838
+ let e = [], n = tn(t, 1), r = !1;
839
+ for (let s = 1; s < t.length - 1; s++) {
840
+ let i = t[s];
841
+ if ("char" in i && i.char === ",") {
842
+ e.push(n(s)), n(s + 1), r = !1;
843
+ continue;
844
+ }
845
+ r = !0;
846
+ }
847
+ return r && e.push(n(t.length - 1)), e;
848
+ }
849
+ function Xn(t, e) {
850
+ return { ...b("mappingKey", t), ...he(), ...U(), children: e ? [e] : [] };
851
+ }
852
+ function zn(t, e) {
853
+ return { ...b("mappingValue", t), ...q(), ...U(), children: e ? [e] : [] };
854
+ }
855
+ function Ke(t, e, n, r, s) {
856
+ let i = e.transformNode(t.key), o = e.transformNode(t.value), a = i || r ? Xn(e.transformRange({ origStart: r ? r.origStart : i.position.start.offset, origEnd: i ? i.position.end.offset : r.origStart + 1 }), i) : null, c = o || s ? zn(e.transformRange({ origStart: s ? s.origStart : o.position.start.offset, origEnd: o ? o.position.end.offset : s.origStart + 1 }), o) : null;
857
+ return n(X(a ? a.position.start : c.position.start, c ? c.position.end : a.position.end), a || Xn(Hn(c.position.start), null), c || zn(Hn(a.position.end), null));
858
+ }
859
+ function ni(t, e) {
860
+ let n = de(t.cstNode.items, e), r = nn(n), s = t.items.map((a, c) => {
861
+ let l = r[c], { additionalKeyRange: f, additionalValueRange: m } = en(l);
862
+ return Ke(a, e, Zt, f, m);
863
+ }), i = n[0], o = V(n);
864
+ return ti(e.transformRange({ origStart: i.origOffset, origEnd: o.origOffset + 1 }), e.transformContent(t), s);
865
+ }
866
+ function ri(t, e, n) {
867
+ return { ...zt(t, e, n), type: "flowSequence" };
868
+ }
869
+ function si(t, e) {
870
+ return { ...b("flowSequenceItem", t), children: [e] };
871
+ }
872
+ function ii(t, e) {
873
+ let n = de(t.cstNode.items, e), r = nn(n), s = t.items.map((a, c) => {
874
+ if (a.type !== "PAIR") {
875
+ let l = e.transformNode(a);
876
+ return si(X(l.position.start, l.position.end), l);
877
+ } else {
878
+ let l = r[c], { additionalKeyRange: f, additionalValueRange: m } = en(l);
879
+ return Ke(a, e, Zt, f, m);
880
+ }
881
+ }), i = n[0], o = V(n);
882
+ return ri(e.transformRange({ origStart: i.origOffset, origEnd: o.origOffset + 1 }), e.transformContent(t), s);
883
+ }
884
+ function oi(t, e, n) {
885
+ return { ...b("mapping", t), ...z(), ...e, children: n };
886
+ }
887
+ function ai(t, e, n) {
888
+ return { ...b("mappingItem", t), ...z(), children: [e, n] };
889
+ }
890
+ function ci(t, e) {
891
+ let n = t.cstNode;
892
+ n.items.filter((o) => o.type === "MAP_KEY" || o.type === "MAP_VALUE").forEach((o) => We(o, e));
893
+ let r = de(n.items, e), s = Fa(r), i = t.items.map((o, a) => {
894
+ let c = s[a], [l, f] = c[0].type === "MAP_VALUE" ? [null, c[0].range] : [c[0].range, c.length === 1 ? null : c[1].range];
895
+ return Ke(o, e, ai, l, f);
896
+ });
897
+ return oi(X(i[0].position.start, V(i).position.end), e.transformContent(t), i);
898
+ }
899
+ function Fa(t) {
900
+ let e = [], n = tn(t, 0), r = !1;
901
+ for (let s = 0; s < t.length; s++) {
902
+ if (t[s].type === "MAP_VALUE") {
903
+ e.push(n(s + 1)), r = !1;
904
+ continue;
905
+ }
906
+ r && e.push(n(s)), r = !0;
907
+ }
908
+ return r && e.push(n(1 / 0)), e;
909
+ }
910
+ function li(t, e, n) {
911
+ return { ...b("plain", t), ...q(), ...e, value: n };
912
+ }
913
+ function fi(t, e, n) {
914
+ for (let r = e; r >= 0; r--) if (n.test(t[r])) return r;
915
+ return -1;
916
+ }
917
+ function ui(t, e) {
918
+ let n = t.cstNode;
919
+ return li(e.transformRange({ origStart: n.valueRange.origStart, origEnd: fi(e.text, n.valueRange.origEnd - 1, /\S/) + 1 }), e.transformContent(t), n.strValue);
920
+ }
921
+ function pi(t) {
922
+ return { ...t, type: "quoteDouble" };
923
+ }
924
+ function mi(t, e, n) {
925
+ return { ...b("quoteValue", t), ...e, ...q(), value: n };
926
+ }
927
+ function rn(t, e) {
928
+ let n = t.cstNode;
929
+ return mi(e.transformRange(n.valueRange), e.transformContent(t), n.strValue);
930
+ }
931
+ function hi(t, e) {
932
+ return pi(rn(t, e));
933
+ }
934
+ function di(t) {
935
+ return { ...t, type: "quoteSingle" };
936
+ }
937
+ function gi(t, e) {
938
+ return di(rn(t, e));
939
+ }
940
+ function yi(t, e, n) {
941
+ return { ...b("sequence", t), ...z(), ...U(), ...e, children: n };
942
+ }
943
+ function Ei(t, e) {
944
+ return { ...b("sequenceItem", t), ...q(), ...U(), children: e ? [e] : [] };
945
+ }
946
+ function Si(t, e) {
947
+ let r = de(t.cstNode.items, e).map((s, i) => {
948
+ We(s, e);
949
+ let o = e.transformNode(t.items[i]);
950
+ return Ei(X(e.transformOffset(s.valueRange.origStart), o === null ? e.transformOffset(s.valueRange.origStart + 1) : o.position.end), o);
951
+ });
952
+ return yi(X(r[0].position.start, V(r).position.end), e.transformContent(t), r);
953
+ }
954
+ function wi(t, e) {
955
+ if (t === null || t.type === void 0 && t.value === null) return null;
956
+ switch (t.type) {
957
+ case "ALIAS":
958
+ return Fs(t, e);
959
+ case "BLOCK_FOLDED":
960
+ return Vs(t, e);
961
+ case "BLOCK_LITERAL":
962
+ return Ks(t, e);
963
+ case "COMMENT":
964
+ return js(t, e);
965
+ case "DIRECTIVE":
966
+ return Gs(t, e);
967
+ case "DOCUMENT":
968
+ return ei(t, e);
969
+ case "FLOW_MAP":
970
+ return ni(t, e);
971
+ case "FLOW_SEQ":
972
+ return ii(t, e);
973
+ case "MAP":
974
+ return ci(t, e);
975
+ case "PLAIN":
976
+ return ui(t, e);
977
+ case "QUOTE_DOUBLE":
978
+ return hi(t, e);
979
+ case "QUOTE_SINGLE":
980
+ return gi(t, e);
981
+ case "SEQ":
982
+ return Si(t, e);
983
+ default:
984
+ throw new Error(`Unexpected node type ${t.type}`);
985
+ }
986
+ }
987
+ function Ni(t, e, n) {
988
+ let r = new SyntaxError(t);
989
+ return r.name = "YAMLSyntaxError", r.source = e, r.position = n, r;
990
+ }
991
+ function Oi(t, e) {
992
+ let n = t.source.range || t.source.valueRange;
993
+ return Ni(t.message, e.text, e.transformRange(n));
994
+ }
995
+ function tr(t) {
996
+ if ("children" in t) {
997
+ if (t.children.length === 1) {
998
+ let e = t.children[0];
999
+ if (e.type === "plain" && e.tag === null && e.anchor === null && e.value === "") return t.children.splice(0, 1), t;
1000
+ }
1001
+ t.children.forEach(tr);
1002
+ }
1003
+ return t;
1004
+ }
1005
+ function nr(t, e, n, r) {
1006
+ let s = e(t);
1007
+ return (i) => {
1008
+ r(s, i) && n(t, s = i);
1009
+ };
1010
+ }
1011
+ function rr(t) {
1012
+ if (t === null || !("children" in t)) return;
1013
+ let e = t.children;
1014
+ if (e.forEach(rr), t.type === "document") {
1015
+ let [i, o] = t.children;
1016
+ i.position.start.offset === i.position.end.offset ? i.position.start = i.position.end = o.position.start : o.position.start.offset === o.position.end.offset && (o.position.start = o.position.end = i.position.end);
1017
+ }
1018
+ let n = nr(t.position, qa, Ua, Ka), r = nr(t.position, Va, Wa, ja);
1019
+ "endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), r(V(t.endComments).position.end));
1020
+ let s = e.filter((i) => i !== null);
1021
+ if (s.length !== 0) {
1022
+ let i = s[0], o = V(s);
1023
+ n(i.position.start), r(o.position.end), "leadingComments" in i && i.leadingComments.length !== 0 && n(i.leadingComments[0].position.start), "tag" in i && i.tag && n(i.tag.position.start), "anchor" in i && i.anchor && n(i.anchor.position.start), "trailingComment" in o && o.trailingComment && r(o.trailingComment.position.end);
1024
+ }
1025
+ }
1026
+ function qa(t) {
1027
+ return t.start;
1028
+ }
1029
+ function Ua(t, e) {
1030
+ t.start = e;
1031
+ }
1032
+ function Va(t) {
1033
+ return t.end;
1034
+ }
1035
+ function Wa(t, e) {
1036
+ t.end = e;
1037
+ }
1038
+ function Ka(t, e) {
1039
+ return e.offset < t.offset;
1040
+ }
1041
+ function ja(t, e) {
1042
+ return e.offset > t.offset;
1043
+ }
1044
+ function Ai(t) {
1045
+ let e = sr.default.parseCST(t), n = new bi(e, t);
1046
+ n.setOrigRanges();
1047
+ let r = e.map((i) => new sr.default.Document({ merge: !1, keepCstNodes: !0 }).parse(i));
1048
+ for (let i of r) for (let o of i.errors) if (!(o instanceof vs && o.message === 'Map keys must be unique; "<<" is repeated')) throw Oi(o, n);
1049
+ r.forEach((i) => pt(i.cstNode));
1050
+ let s = Rs(n.transformRange({ origStart: 0, origEnd: t.length }), r.map((i) => n.transformNode(i)), n.comments);
1051
+ return Is(s), rr(s), tr(s), s;
1052
+ }
1053
+ function Qa(t, e) {
1054
+ let n = new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
1055
+ return Object.assign(n, e);
1056
+ }
1057
+ function Ga(t) {
1058
+ try {
1059
+ let e = Ai(t);
1060
+ return delete e.comments, e;
1061
+ } catch (e) {
1062
+ throw e?.position ? Li(e.message, { loc: e.position, cause: e }) : e;
1063
+ }
1064
+ }
1065
+ var ki, sn, Pi, vi, Ii, _i, ne, or, xi, on, ce, Qr, De, qn, Kn, Ls, Ms, Gn, Ps, Ci, mt, Di, D, $i, Yi, ht, Bi, je, Qe, Ge, dt, gt, Ae, yt, Le, Te, Ce, Et, Me, St, re, wt, ke, bt, Nt, qi, an, ar, Z, Ot, lr, fr, Xe, se, Lt, Wi, N, Ki, He, sl, fn, il, ol, hr, un, pn, mn, dr, gr, yr, Er, Sr, wr, br, Nr, Or, Lr, Cr, Ze, Gi, Mr, k, kr, Ji, Pr, tt, vr, ve, yn, Yr, Br, Fr, uo, qr, Ur, vt, po, Vr, ir, sr, J, Cf, Mf, kf, Pf, vf, If, _f, xf, Rf, vs, Df, $f, me, Jn, Zn, er, bi, Li, Ha, Ja, Ti, Xa, init_yaml = __esm({
1066
+ "../../node_modules/.pnpm/prettier@3.7.4/node_modules/prettier/plugins/yaml.mjs"() {
1067
+ init_cjs_shims();
1068
+ ki = Object.create, sn = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, vi = Object.getOwnPropertyNames, Ii = Object.getPrototypeOf, _i = Object.prototype.hasOwnProperty, ne = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), or = (t, e) => {
1069
+ for (var n in e) sn(t, n, { get: e[n], enumerable: !0 });
1070
+ }, xi = (t, e, n, r) => {
1071
+ if (e && typeof e == "object" || typeof e == "function") for (let s of vi(e)) !_i.call(t, s) && s !== n && sn(t, s, { get: () => e[s], enumerable: !(r = Pi(e, s)) || r.enumerable });
1072
+ return t;
1073
+ }, on = (t, e, n) => (n = t != null ? ki(Ii(t)) : {}, xi(e || !t || !t.__esModule ? sn(n, "default", { value: t, enumerable: !0 }) : n, t)), ce = ne((B) => {
1074
+ "use strict";
1075
+ var ie = { ANCHOR: "&", COMMENT: "#", TAG: "!", DIRECTIVES_END: "-", DOCUMENT_END: "." }, st = { ALIAS: "ALIAS", BLANK_LINE: "BLANK_LINE", BLOCK_FOLDED: "BLOCK_FOLDED", BLOCK_LITERAL: "BLOCK_LITERAL", COMMENT: "COMMENT", DIRECTIVE: "DIRECTIVE", DOCUMENT: "DOCUMENT", FLOW_MAP: "FLOW_MAP", FLOW_SEQ: "FLOW_SEQ", MAP: "MAP", MAP_KEY: "MAP_KEY", MAP_VALUE: "MAP_VALUE", PLAIN: "PLAIN", QUOTE_DOUBLE: "QUOTE_DOUBLE", QUOTE_SINGLE: "QUOTE_SINGLE", SEQ: "SEQ", SEQ_ITEM: "SEQ_ITEM" }, mo = "tag:yaml.org,2002:", ho = { MAP: "tag:yaml.org,2002:map", SEQ: "tag:yaml.org,2002:seq", STR: "tag:yaml.org,2002:str" };
1076
+ function Wr(t) {
1077
+ let e = [0], n = t.indexOf(`
1078
+ `);
1079
+ for (; n !== -1; ) n += 1, e.push(n), n = t.indexOf(`
1080
+ `, n);
1081
+ return e;
1082
+ }
1083
+ function Kr(t) {
1084
+ let e, n;
1085
+ return typeof t == "string" ? (e = Wr(t), n = t) : (Array.isArray(t) && (t = t[0]), t && t.context && (t.lineStarts || (t.lineStarts = Wr(t.context.src)), e = t.lineStarts, n = t.context.src)), { lineStarts: e, src: n };
1086
+ }
1087
+ function wn(t, e) {
1088
+ if (typeof t != "number" || t < 0) return null;
1089
+ let { lineStarts: n, src: r } = Kr(e);
1090
+ if (!n || !r || t > r.length) return null;
1091
+ for (let i = 0; i < n.length; ++i) {
1092
+ let o = n[i];
1093
+ if (t < o) return { line: i, col: t - n[i - 1] + 1 };
1094
+ if (t === o) return { line: i + 1, col: 1 };
1095
+ }
1096
+ let s = n.length;
1097
+ return { line: s, col: t - n[s - 1] + 1 };
1098
+ }
1099
+ function go(t, e) {
1100
+ let { lineStarts: n, src: r } = Kr(e);
1101
+ if (!n || !(t >= 1) || t > n.length) return null;
1102
+ let s = n[t - 1], i = n[t];
1103
+ for (; i && i > s && r[i - 1] === `
1104
+ `; ) --i;
1105
+ return r.slice(s, i);
1106
+ }
1107
+ function yo({ start: t, end: e }, n, r = 80) {
1108
+ let s = go(t.line, n);
1109
+ if (!s) return null;
1110
+ let { col: i } = t;
1111
+ if (s.length > r) if (i <= r - 10) s = s.substr(0, r - 1) + "\u2026";
1112
+ else {
1113
+ let f = Math.round(r / 2);
1114
+ s.length > i + f && (s = s.substr(0, i + f - 1) + "\u2026"), i -= s.length - r, s = "\u2026" + s.substr(1 - r);
1115
+ }
1116
+ let o = 1, a = "";
1117
+ e && (e.line === t.line && i + (e.col - t.col) <= r + 1 ? o = e.col - t.col : (o = Math.min(s.length + 1, r) - i, a = "\u2026"));
1118
+ let c = i > 1 ? " ".repeat(i - 1) : "", l = "^".repeat(o);
1119
+ return `${s}
1120
+ ${c}${l}${a}`;
1121
+ }
1122
+ var xe = class t {
1123
+ static copy(e) {
1124
+ return new t(e.start, e.end);
1125
+ }
1126
+ constructor(e, n) {
1127
+ this.start = e, this.end = n || e;
1128
+ }
1129
+ isEmpty() {
1130
+ return typeof this.start != "number" || !this.end || this.end <= this.start;
1131
+ }
1132
+ setOrigRange(e, n) {
1133
+ let { start: r, end: s } = this;
1134
+ if (e.length === 0 || s <= e[0]) return this.origStart = r, this.origEnd = s, n;
1135
+ let i = n;
1136
+ for (; i < e.length && !(e[i] > r); ) ++i;
1137
+ this.origStart = r + i;
1138
+ let o = i;
1139
+ for (; i < e.length && !(e[i] >= s); ) ++i;
1140
+ return this.origEnd = s + i, o;
1141
+ }
1142
+ }, oe = class t {
1143
+ static addStringTerminator(e, n, r) {
1144
+ if (r[r.length - 1] === `
1145
+ `) return r;
1146
+ let s = t.endOfWhiteSpace(e, n);
1147
+ return s >= e.length || e[s] === `
1148
+ ` ? r + `
1149
+ ` : r;
1150
+ }
1151
+ static atDocumentBoundary(e, n, r) {
1152
+ let s = e[n];
1153
+ if (!s) return !0;
1154
+ let i = e[n - 1];
1155
+ if (i && i !== `
1156
+ `) return !1;
1157
+ if (r) {
1158
+ if (s !== r) return !1;
1159
+ } else if (s !== ie.DIRECTIVES_END && s !== ie.DOCUMENT_END) return !1;
1160
+ let o = e[n + 1], a = e[n + 2];
1161
+ if (o !== s || a !== s) return !1;
1162
+ let c = e[n + 3];
1163
+ return !c || c === `
1164
+ ` || c === " " || c === " ";
1165
+ }
1166
+ static endOfIdentifier(e, n) {
1167
+ let r = e[n], s = r === "<", i = s ? [`
1168
+ `, " ", " ", ">"] : [`
1169
+ `, " ", " ", "[", "]", "{", "}", ","];
1170
+ for (; r && i.indexOf(r) === -1; ) r = e[n += 1];
1171
+ return s && r === ">" && (n += 1), n;
1172
+ }
1173
+ static endOfIndent(e, n) {
1174
+ let r = e[n];
1175
+ for (; r === " "; ) r = e[n += 1];
1176
+ return n;
1177
+ }
1178
+ static endOfLine(e, n) {
1179
+ let r = e[n];
1180
+ for (; r && r !== `
1181
+ `; ) r = e[n += 1];
1182
+ return n;
1183
+ }
1184
+ static endOfWhiteSpace(e, n) {
1185
+ let r = e[n];
1186
+ for (; r === " " || r === " "; ) r = e[n += 1];
1187
+ return n;
1188
+ }
1189
+ static startOfLine(e, n) {
1190
+ let r = e[n - 1];
1191
+ if (r === `
1192
+ `) return n;
1193
+ for (; r && r !== `
1194
+ `; ) r = e[n -= 1];
1195
+ return n + 1;
1196
+ }
1197
+ static endOfBlockIndent(e, n, r) {
1198
+ let s = t.endOfIndent(e, r);
1199
+ if (s > r + n) return s;
1200
+ {
1201
+ let i = t.endOfWhiteSpace(e, s), o = e[i];
1202
+ if (!o || o === `
1203
+ `) return i;
1204
+ }
1205
+ return null;
1206
+ }
1207
+ static atBlank(e, n, r) {
1208
+ let s = e[n];
1209
+ return s === `
1210
+ ` || s === " " || s === " " || r && !s;
1211
+ }
1212
+ static nextNodeIsIndented(e, n, r) {
1213
+ return !e || n < 0 ? !1 : n > 0 ? !0 : r && e === "-";
1214
+ }
1215
+ static normalizeOffset(e, n) {
1216
+ let r = e[n];
1217
+ return r ? r !== `
1218
+ ` && e[n - 1] === `
1219
+ ` ? n - 1 : t.endOfWhiteSpace(e, n) : n;
1220
+ }
1221
+ static foldNewline(e, n, r) {
1222
+ let s = 0, i = !1, o = "", a = e[n + 1];
1223
+ for (; a === " " || a === " " || a === `
1224
+ `; ) {
1225
+ switch (a) {
1226
+ case `
1227
+ `:
1228
+ s = 0, n += 1, o += `
1229
+ `;
1230
+ break;
1231
+ case " ":
1232
+ s <= r && (i = !0), n = t.endOfWhiteSpace(e, n + 2) - 1;
1233
+ break;
1234
+ case " ":
1235
+ s += 1, n += 1;
1236
+ break;
1237
+ }
1238
+ a = e[n + 1];
1239
+ }
1240
+ return o || (o = " "), a && s <= r && (i = !0), { fold: o, offset: n, error: i };
1241
+ }
1242
+ constructor(e, n, r) {
1243
+ Object.defineProperty(this, "context", { value: r || null, writable: !0 }), this.error = null, this.range = null, this.valueRange = null, this.props = n || [], this.type = e, this.value = null;
1244
+ }
1245
+ getPropValue(e, n, r) {
1246
+ if (!this.context) return null;
1247
+ let { src: s } = this.context, i = this.props[e];
1248
+ return i && s[i.start] === n ? s.slice(i.start + (r ? 1 : 0), i.end) : null;
1249
+ }
1250
+ get anchor() {
1251
+ for (let e = 0; e < this.props.length; ++e) {
1252
+ let n = this.getPropValue(e, ie.ANCHOR, !0);
1253
+ if (n != null) return n;
1254
+ }
1255
+ return null;
1256
+ }
1257
+ get comment() {
1258
+ let e = [];
1259
+ for (let n = 0; n < this.props.length; ++n) {
1260
+ let r = this.getPropValue(n, ie.COMMENT, !0);
1261
+ r != null && e.push(r);
1262
+ }
1263
+ return e.length > 0 ? e.join(`
1264
+ `) : null;
1265
+ }
1266
+ commentHasRequiredWhitespace(e) {
1267
+ let { src: n } = this.context;
1268
+ if (this.header && e === this.header.end || !this.valueRange) return !1;
1269
+ let { end: r } = this.valueRange;
1270
+ return e !== r || t.atBlank(n, r - 1);
1271
+ }
1272
+ get hasComment() {
1273
+ if (this.context) {
1274
+ let { src: e } = this.context;
1275
+ for (let n = 0; n < this.props.length; ++n) if (e[this.props[n].start] === ie.COMMENT) return !0;
1276
+ }
1277
+ return !1;
1278
+ }
1279
+ get hasProps() {
1280
+ if (this.context) {
1281
+ let { src: e } = this.context;
1282
+ for (let n = 0; n < this.props.length; ++n) if (e[this.props[n].start] !== ie.COMMENT) return !0;
1283
+ }
1284
+ return !1;
1285
+ }
1286
+ get includesTrailingLines() {
1287
+ return !1;
1288
+ }
1289
+ get jsonLike() {
1290
+ return [st.FLOW_MAP, st.FLOW_SEQ, st.QUOTE_DOUBLE, st.QUOTE_SINGLE].indexOf(this.type) !== -1;
1291
+ }
1292
+ get rangeAsLinePos() {
1293
+ if (!this.range || !this.context) return;
1294
+ let e = wn(this.range.start, this.context.root);
1295
+ if (!e) return;
1296
+ let n = wn(this.range.end, this.context.root);
1297
+ return { start: e, end: n };
1298
+ }
1299
+ get rawValue() {
1300
+ if (!this.valueRange || !this.context) return null;
1301
+ let { start: e, end: n } = this.valueRange;
1302
+ return this.context.src.slice(e, n);
1303
+ }
1304
+ get tag() {
1305
+ for (let e = 0; e < this.props.length; ++e) {
1306
+ let n = this.getPropValue(e, ie.TAG, !1);
1307
+ if (n != null) {
1308
+ if (n[1] === "<") return { verbatim: n.slice(2, -1) };
1309
+ {
1310
+ let [r, s, i] = n.match(/^(.*!)([^!]*)$/);
1311
+ return { handle: s, suffix: i };
1312
+ }
1313
+ }
1314
+ }
1315
+ return null;
1316
+ }
1317
+ get valueRangeContainsNewline() {
1318
+ if (!this.valueRange || !this.context) return !1;
1319
+ let { start: e, end: n } = this.valueRange, { src: r } = this.context;
1320
+ for (let s = e; s < n; ++s) if (r[s] === `
1321
+ `) return !0;
1322
+ return !1;
1323
+ }
1324
+ parseComment(e) {
1325
+ let { src: n } = this.context;
1326
+ if (n[e] === ie.COMMENT) {
1327
+ let r = t.endOfLine(n, e + 1), s = new xe(e, r);
1328
+ return this.props.push(s), r;
1329
+ }
1330
+ return e;
1331
+ }
1332
+ setOrigRanges(e, n) {
1333
+ return this.range && (n = this.range.setOrigRange(e, n)), this.valueRange && this.valueRange.setOrigRange(e, n), this.props.forEach((r) => r.setOrigRange(e, n)), n;
1334
+ }
1335
+ toString() {
1336
+ let { context: { src: e }, range: n, value: r } = this;
1337
+ if (r != null) return r;
1338
+ let s = e.slice(n.start, n.end);
1339
+ return t.addStringTerminator(e, n.end, s);
1340
+ }
1341
+ }, ge = class extends Error {
1342
+ constructor(e, n, r) {
1343
+ if (!r || !(n instanceof oe)) throw new Error(`Invalid arguments for new ${e}`);
1344
+ super(), this.name = e, this.message = r, this.source = n;
1345
+ }
1346
+ makePretty() {
1347
+ if (!this.source) return;
1348
+ this.nodeType = this.source.type;
1349
+ let e = this.source.context && this.source.context.root;
1350
+ if (typeof this.offset == "number") {
1351
+ this.range = new xe(this.offset, this.offset + 1);
1352
+ let n = e && wn(this.offset, e);
1353
+ if (n) {
1354
+ let r = { line: n.line, col: n.col + 1 };
1355
+ this.linePos = { start: n, end: r };
1356
+ }
1357
+ delete this.offset;
1358
+ } else this.range = this.source.range, this.linePos = this.source.rangeAsLinePos;
1359
+ if (this.linePos) {
1360
+ let { line: n, col: r } = this.linePos.start;
1361
+ this.message += ` at line ${n}, column ${r}`;
1362
+ let s = e && yo(this.linePos, e);
1363
+ s && (this.message += `:
1364
+
1365
+ ${s}
1366
+ `);
1367
+ }
1368
+ delete this.source;
1369
+ }
1370
+ }, bn = class extends ge {
1371
+ constructor(e, n) {
1372
+ super("YAMLReferenceError", e, n);
1373
+ }
1374
+ }, it = class extends ge {
1375
+ constructor(e, n) {
1376
+ super("YAMLSemanticError", e, n);
1377
+ }
1378
+ }, Nn = class extends ge {
1379
+ constructor(e, n) {
1380
+ super("YAMLSyntaxError", e, n);
1381
+ }
1382
+ }, On = class extends ge {
1383
+ constructor(e, n) {
1384
+ super("YAMLWarning", e, n);
1385
+ }
1386
+ };
1387
+ function Eo(t, e, n) {
1388
+ return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
1389
+ }
1390
+ var An = class t extends oe {
1391
+ static endOfLine(e, n, r) {
1392
+ let s = e[n], i = n;
1393
+ for (; s && s !== `
1394
+ ` && !(r && (s === "[" || s === "]" || s === "{" || s === "}" || s === ",")); ) {
1395
+ let o = e[i + 1];
1396
+ if (s === ":" && (!o || o === `
1397
+ ` || o === " " || o === " " || r && o === ",") || (s === " " || s === " ") && o === "#") break;
1398
+ i += 1, s = o;
1399
+ }
1400
+ return i;
1401
+ }
1402
+ get strValue() {
1403
+ if (!this.valueRange || !this.context) return null;
1404
+ let { start: e, end: n } = this.valueRange, { src: r } = this.context, s = r[n - 1];
1405
+ for (; e < n && (s === `
1406
+ ` || s === " " || s === " "); ) s = r[--n - 1];
1407
+ let i = "";
1408
+ for (let a = e; a < n; ++a) {
1409
+ let c = r[a];
1410
+ if (c === `
1411
+ `) {
1412
+ let { fold: l, offset: f } = oe.foldNewline(r, a, -1);
1413
+ i += l, a = f;
1414
+ } else if (c === " " || c === " ") {
1415
+ let l = a, f = r[a + 1];
1416
+ for (; a < n && (f === " " || f === " "); ) a += 1, f = r[a + 1];
1417
+ f !== `
1418
+ ` && (i += a > l ? r.slice(l, a + 1) : c);
1419
+ } else i += c;
1420
+ }
1421
+ let o = r[e];
1422
+ switch (o) {
1423
+ case " ": {
1424
+ let a = "Plain value cannot start with a tab character";
1425
+ return { errors: [new it(this, a)], str: i };
1426
+ }
1427
+ case "@":
1428
+ case "`": {
1429
+ let a = `Plain value cannot start with reserved character ${o}`;
1430
+ return { errors: [new it(this, a)], str: i };
1431
+ }
1432
+ default:
1433
+ return i;
1434
+ }
1435
+ }
1436
+ parseBlockValue(e) {
1437
+ let { indent: n, inFlow: r, src: s } = this.context, i = e, o = e;
1438
+ for (let a = s[i]; a === `
1439
+ ` && !oe.atDocumentBoundary(s, i + 1); a = s[i]) {
1440
+ let c = oe.endOfBlockIndent(s, n, i + 1);
1441
+ if (c === null || s[c] === "#") break;
1442
+ s[c] === `
1443
+ ` ? i = c : (o = t.endOfLine(s, c, r), i = o);
1444
+ }
1445
+ return this.valueRange.isEmpty() && (this.valueRange.start = e), this.valueRange.end = o, o;
1446
+ }
1447
+ parse(e, n) {
1448
+ this.context = e;
1449
+ let { inFlow: r, src: s } = e, i = n, o = s[i];
1450
+ return o && o !== "#" && o !== `
1451
+ ` && (i = t.endOfLine(s, n, r)), this.valueRange = new xe(n, i), i = oe.endOfWhiteSpace(s, i), i = this.parseComment(i), (!this.hasComment || this.valueRange.isEmpty()) && (i = this.parseBlockValue(i)), i;
1452
+ }
1453
+ };
1454
+ B.Char = ie, B.Node = oe, B.PlainValue = An, B.Range = xe, B.Type = st, B.YAMLError = ge, B.YAMLReferenceError = bn, B.YAMLSemanticError = it, B.YAMLSyntaxError = Nn, B.YAMLWarning = On, B._defineProperty = Eo, B.defaultTagPrefix = mo, B.defaultTags = ho;
1455
+ }), Qr = ne((jr) => {
1456
+ "use strict";
1457
+ var u = ce(), Ee = class extends u.Node {
1458
+ constructor() {
1459
+ super(u.Type.BLANK_LINE);
1460
+ }
1461
+ get includesTrailingLines() {
1462
+ return !0;
1463
+ }
1464
+ parse(e, n) {
1465
+ return this.context = e, this.range = new u.Range(n, n + 1), n + 1;
1466
+ }
1467
+ }, ot = class extends u.Node {
1468
+ constructor(e, n) {
1469
+ super(e, n), this.node = null;
1470
+ }
1471
+ get includesTrailingLines() {
1472
+ return !!this.node && this.node.includesTrailingLines;
1473
+ }
1474
+ parse(e, n) {
1475
+ this.context = e;
1476
+ let { parseNode: r, src: s } = e, { atLineStart: i, lineStart: o } = e;
1477
+ !i && this.type === u.Type.SEQ_ITEM && (this.error = new u.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line"));
1478
+ let a = i ? n - o : e.indent, c = u.Node.endOfWhiteSpace(s, n + 1), l = s[c], f = l === "#", m = [], g = null;
1479
+ for (; l === `
1480
+ ` || l === "#"; ) {
1481
+ if (l === "#") {
1482
+ let h = u.Node.endOfLine(s, c + 1);
1483
+ m.push(new u.Range(c, h)), c = h;
1484
+ } else {
1485
+ i = !0, o = c + 1;
1486
+ let h = u.Node.endOfWhiteSpace(s, o);
1487
+ s[h] === `
1488
+ ` && m.length === 0 && (g = new Ee(), o = g.parse({ src: s }, o)), c = u.Node.endOfIndent(s, o);
1489
+ }
1490
+ l = s[c];
1491
+ }
1492
+ if (u.Node.nextNodeIsIndented(l, c - (o + a), this.type !== u.Type.SEQ_ITEM) ? this.node = r({ atLineStart: i, inCollection: !1, indent: a, lineStart: o, parent: this }, c) : l && o > n + 1 && (c = o - 1), this.node) {
1493
+ if (g) {
1494
+ let h = e.parent.items || e.parent.contents;
1495
+ h && h.push(g);
1496
+ }
1497
+ m.length && Array.prototype.push.apply(this.props, m), c = this.node.range.end;
1498
+ } else if (f) {
1499
+ let h = m[0];
1500
+ this.props.push(h), c = h.end;
1501
+ } else c = u.Node.endOfLine(s, n + 1);
1502
+ let y = this.node ? this.node.valueRange.end : c;
1503
+ return this.valueRange = new u.Range(n, y), c;
1504
+ }
1505
+ setOrigRanges(e, n) {
1506
+ return n = super.setOrigRanges(e, n), this.node ? this.node.setOrigRanges(e, n) : n;
1507
+ }
1508
+ toString() {
1509
+ let { context: { src: e }, node: n, range: r, value: s } = this;
1510
+ if (s != null) return s;
1511
+ let i = n ? e.slice(r.start, n.range.start) + String(n) : e.slice(r.start, r.end);
1512
+ return u.Node.addStringTerminator(e, r.end, i);
1513
+ }
1514
+ }, ye = class extends u.Node {
1515
+ constructor() {
1516
+ super(u.Type.COMMENT);
1517
+ }
1518
+ parse(e, n) {
1519
+ this.context = e;
1520
+ let r = this.parseComment(n);
1521
+ return this.range = new u.Range(n, r), r;
1522
+ }
1523
+ };
1524
+ function Ln(t) {
1525
+ let e = t;
1526
+ for (; e instanceof ot; ) e = e.node;
1527
+ if (!(e instanceof It)) return null;
1528
+ let n = e.items.length, r = -1;
1529
+ for (let o = n - 1; o >= 0; --o) {
1530
+ let a = e.items[o];
1531
+ if (a.type === u.Type.COMMENT) {
1532
+ let { indent: c, lineStart: l } = a.context;
1533
+ if (c > 0 && a.range.start >= l + c) break;
1534
+ r = o;
1535
+ } else if (a.type === u.Type.BLANK_LINE) r = o;
1536
+ else break;
1537
+ }
1538
+ if (r === -1) return null;
1539
+ let s = e.items.splice(r, n - r), i = s[0].range.start;
1540
+ for (; e.range.end = i, e.valueRange && e.valueRange.end > i && (e.valueRange.end = i), e !== t; ) e = e.context.parent;
1541
+ return s;
1542
+ }
1543
+ var It = class t extends u.Node {
1544
+ static nextContentHasIndent(e, n, r) {
1545
+ let s = u.Node.endOfLine(e, n) + 1;
1546
+ n = u.Node.endOfWhiteSpace(e, s);
1547
+ let i = e[n];
1548
+ return i ? n >= s + r ? !0 : i !== "#" && i !== `
1549
+ ` ? !1 : t.nextContentHasIndent(e, n, r) : !1;
1550
+ }
1551
+ constructor(e) {
1552
+ super(e.type === u.Type.SEQ_ITEM ? u.Type.SEQ : u.Type.MAP);
1553
+ for (let r = e.props.length - 1; r >= 0; --r) if (e.props[r].start < e.context.lineStart) {
1554
+ this.props = e.props.slice(0, r + 1), e.props = e.props.slice(r + 1);
1555
+ let s = e.props[0] || e.valueRange;
1556
+ e.range.start = s.start;
1557
+ break;
1558
+ }
1559
+ this.items = [e];
1560
+ let n = Ln(e);
1561
+ n && Array.prototype.push.apply(this.items, n);
1562
+ }
1563
+ get includesTrailingLines() {
1564
+ return this.items.length > 0;
1565
+ }
1566
+ parse(e, n) {
1567
+ this.context = e;
1568
+ let { parseNode: r, src: s } = e, i = u.Node.startOfLine(s, n), o = this.items[0];
1569
+ o.context.parent = this, this.valueRange = u.Range.copy(o.valueRange);
1570
+ let a = o.range.start - o.context.lineStart, c = n;
1571
+ c = u.Node.normalizeOffset(s, c);
1572
+ let l = s[c], f = u.Node.endOfWhiteSpace(s, i) === c, m = !1;
1573
+ for (; l; ) {
1574
+ for (; l === `
1575
+ ` || l === "#"; ) {
1576
+ if (f && l === `
1577
+ ` && !m) {
1578
+ let h = new Ee();
1579
+ if (c = h.parse({ src: s }, c), this.valueRange.end = c, c >= s.length) {
1580
+ l = null;
1581
+ break;
1582
+ }
1583
+ this.items.push(h), c -= 1;
1584
+ } else if (l === "#") {
1585
+ if (c < i + a && !t.nextContentHasIndent(s, c, a)) return c;
1586
+ let h = new ye();
1587
+ if (c = h.parse({ indent: a, lineStart: i, src: s }, c), this.items.push(h), this.valueRange.end = c, c >= s.length) {
1588
+ l = null;
1589
+ break;
1590
+ }
1591
+ }
1592
+ if (i = c + 1, c = u.Node.endOfIndent(s, i), u.Node.atBlank(s, c)) {
1593
+ let h = u.Node.endOfWhiteSpace(s, c), d = s[h];
1594
+ (!d || d === `
1595
+ ` || d === "#") && (c = h);
1596
+ }
1597
+ l = s[c], f = !0;
1598
+ }
1599
+ if (!l) break;
1600
+ if (c !== i + a && (f || l !== ":")) {
1601
+ if (c < i + a) {
1602
+ i > n && (c = i);
1603
+ break;
1604
+ } else if (!this.error) {
1605
+ let h = "All collection items must start at the same column";
1606
+ this.error = new u.YAMLSyntaxError(this, h);
1607
+ }
1608
+ }
1609
+ if (o.type === u.Type.SEQ_ITEM) {
1610
+ if (l !== "-") {
1611
+ i > n && (c = i);
1612
+ break;
1613
+ }
1614
+ } else if (l === "-" && !this.error) {
1615
+ let h = s[c + 1];
1616
+ if (!h || h === `
1617
+ ` || h === " " || h === " ") {
1618
+ let d = "A collection cannot be both a mapping and a sequence";
1619
+ this.error = new u.YAMLSyntaxError(this, d);
1620
+ }
1621
+ }
1622
+ let g = r({ atLineStart: f, inCollection: !0, indent: a, lineStart: i, parent: this }, c);
1623
+ if (!g) return c;
1624
+ if (this.items.push(g), this.valueRange.end = g.valueRange.end, c = u.Node.normalizeOffset(s, g.range.end), l = s[c], f = !1, m = g.includesTrailingLines, l) {
1625
+ let h = c - 1, d = s[h];
1626
+ for (; d === " " || d === " "; ) d = s[--h];
1627
+ d === `
1628
+ ` && (i = h + 1, f = !0);
1629
+ }
1630
+ let y = Ln(g);
1631
+ y && Array.prototype.push.apply(this.items, y);
1632
+ }
1633
+ return c;
1634
+ }
1635
+ setOrigRanges(e, n) {
1636
+ return n = super.setOrigRanges(e, n), this.items.forEach((r) => {
1637
+ n = r.setOrigRanges(e, n);
1638
+ }), n;
1639
+ }
1640
+ toString() {
1641
+ let { context: { src: e }, items: n, range: r, value: s } = this;
1642
+ if (s != null) return s;
1643
+ let i = e.slice(r.start, n[0].range.start) + String(n[0]);
1644
+ for (let o = 1; o < n.length; ++o) {
1645
+ let a = n[o], { atLineStart: c, indent: l } = a.context;
1646
+ if (c) for (let f = 0; f < l; ++f) i += " ";
1647
+ i += String(a);
1648
+ }
1649
+ return u.Node.addStringTerminator(e, r.end, i);
1650
+ }
1651
+ }, Tn = class extends u.Node {
1652
+ constructor() {
1653
+ super(u.Type.DIRECTIVE), this.name = null;
1654
+ }
1655
+ get parameters() {
1656
+ let e = this.rawValue;
1657
+ return e ? e.trim().split(/[ \t]+/) : [];
1658
+ }
1659
+ parseName(e) {
1660
+ let { src: n } = this.context, r = e, s = n[r];
1661
+ for (; s && s !== `
1662
+ ` && s !== " " && s !== " "; ) s = n[r += 1];
1663
+ return this.name = n.slice(e, r), r;
1664
+ }
1665
+ parseParameters(e) {
1666
+ let { src: n } = this.context, r = e, s = n[r];
1667
+ for (; s && s !== `
1668
+ ` && s !== "#"; ) s = n[r += 1];
1669
+ return this.valueRange = new u.Range(e, r), r;
1670
+ }
1671
+ parse(e, n) {
1672
+ this.context = e;
1673
+ let r = this.parseName(n + 1);
1674
+ return r = this.parseParameters(r), r = this.parseComment(r), this.range = new u.Range(n, r), r;
1675
+ }
1676
+ }, Cn = class t extends u.Node {
1677
+ static startCommentOrEndBlankLine(e, n) {
1678
+ let r = u.Node.endOfWhiteSpace(e, n), s = e[r];
1679
+ return s === "#" || s === `
1680
+ ` ? r : n;
1681
+ }
1682
+ constructor() {
1683
+ super(u.Type.DOCUMENT), this.directives = null, this.contents = null, this.directivesEndMarker = null, this.documentEndMarker = null;
1684
+ }
1685
+ parseDirectives(e) {
1686
+ let { src: n } = this.context;
1687
+ this.directives = [];
1688
+ let r = !0, s = !1, i = e;
1689
+ for (; !u.Node.atDocumentBoundary(n, i, u.Char.DIRECTIVES_END); ) switch (i = t.startCommentOrEndBlankLine(n, i), n[i]) {
1690
+ case `
1691
+ `:
1692
+ if (r) {
1693
+ let o = new Ee();
1694
+ i = o.parse({ src: n }, i), i < n.length && this.directives.push(o);
1695
+ } else i += 1, r = !0;
1696
+ break;
1697
+ case "#":
1698
+ {
1699
+ let o = new ye();
1700
+ i = o.parse({ src: n }, i), this.directives.push(o), r = !1;
1701
+ }
1702
+ break;
1703
+ case "%":
1704
+ {
1705
+ let o = new Tn();
1706
+ i = o.parse({ parent: this, src: n }, i), this.directives.push(o), s = !0, r = !1;
1707
+ }
1708
+ break;
1709
+ default:
1710
+ return s ? this.error = new u.YAMLSemanticError(this, "Missing directives-end indicator line") : this.directives.length > 0 && (this.contents = this.directives, this.directives = []), i;
1711
+ }
1712
+ return n[i] ? (this.directivesEndMarker = new u.Range(i, i + 3), i + 3) : (s ? this.error = new u.YAMLSemanticError(this, "Missing directives-end indicator line") : this.directives.length > 0 && (this.contents = this.directives, this.directives = []), i);
1713
+ }
1714
+ parseContents(e) {
1715
+ let { parseNode: n, src: r } = this.context;
1716
+ this.contents || (this.contents = []);
1717
+ let s = e;
1718
+ for (; r[s - 1] === "-"; ) s -= 1;
1719
+ let i = u.Node.endOfWhiteSpace(r, e), o = s === e;
1720
+ for (this.valueRange = new u.Range(i); !u.Node.atDocumentBoundary(r, i, u.Char.DOCUMENT_END); ) {
1721
+ switch (r[i]) {
1722
+ case `
1723
+ `:
1724
+ if (o) {
1725
+ let a = new Ee();
1726
+ i = a.parse({ src: r }, i), i < r.length && this.contents.push(a);
1727
+ } else i += 1, o = !0;
1728
+ s = i;
1729
+ break;
1730
+ case "#":
1731
+ {
1732
+ let a = new ye();
1733
+ i = a.parse({ src: r }, i), this.contents.push(a), o = !1;
1734
+ }
1735
+ break;
1736
+ default: {
1737
+ let a = u.Node.endOfIndent(r, i), l = n({ atLineStart: o, indent: -1, inFlow: !1, inCollection: !1, lineStart: s, parent: this }, a);
1738
+ if (!l) return this.valueRange.end = a;
1739
+ this.contents.push(l), i = l.range.end, o = !1;
1740
+ let f = Ln(l);
1741
+ f && Array.prototype.push.apply(this.contents, f);
1742
+ }
1743
+ }
1744
+ i = t.startCommentOrEndBlankLine(r, i);
1745
+ }
1746
+ if (this.valueRange.end = i, r[i] && (this.documentEndMarker = new u.Range(i, i + 3), i += 3, r[i])) {
1747
+ if (i = u.Node.endOfWhiteSpace(r, i), r[i] === "#") {
1748
+ let a = new ye();
1749
+ i = a.parse({ src: r }, i), this.contents.push(a);
1750
+ }
1751
+ switch (r[i]) {
1752
+ case `
1753
+ `:
1754
+ i += 1;
1755
+ break;
1756
+ case void 0:
1757
+ break;
1758
+ default:
1759
+ this.error = new u.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix");
1760
+ }
1761
+ }
1762
+ return i;
1763
+ }
1764
+ parse(e, n) {
1765
+ e.root = this, this.context = e;
1766
+ let { src: r } = e, s = r.charCodeAt(n) === 65279 ? n + 1 : n;
1767
+ return s = this.parseDirectives(s), s = this.parseContents(s), s;
1768
+ }
1769
+ setOrigRanges(e, n) {
1770
+ return n = super.setOrigRanges(e, n), this.directives.forEach((r) => {
1771
+ n = r.setOrigRanges(e, n);
1772
+ }), this.directivesEndMarker && (n = this.directivesEndMarker.setOrigRange(e, n)), this.contents.forEach((r) => {
1773
+ n = r.setOrigRanges(e, n);
1774
+ }), this.documentEndMarker && (n = this.documentEndMarker.setOrigRange(e, n)), n;
1775
+ }
1776
+ toString() {
1777
+ let { contents: e, directives: n, value: r } = this;
1778
+ if (r != null) return r;
1779
+ let s = n.join("");
1780
+ return e.length > 0 && ((n.length > 0 || e[0].type === u.Type.COMMENT) && (s += `---
1781
+ `), s += e.join("")), s[s.length - 1] !== `
1782
+ ` && (s += `
1783
+ `), s;
1784
+ }
1785
+ }, Mn = class extends u.Node {
1786
+ parse(e, n) {
1787
+ this.context = e;
1788
+ let { src: r } = e, s = u.Node.endOfIdentifier(r, n + 1);
1789
+ return this.valueRange = new u.Range(n + 1, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
1790
+ }
1791
+ }, le = { CLIP: "CLIP", KEEP: "KEEP", STRIP: "STRIP" }, kn = class extends u.Node {
1792
+ constructor(e, n) {
1793
+ super(e, n), this.blockIndent = null, this.chomping = le.CLIP, this.header = null;
1794
+ }
1795
+ get includesTrailingLines() {
1796
+ return this.chomping === le.KEEP;
1797
+ }
1798
+ get strValue() {
1799
+ if (!this.valueRange || !this.context) return null;
1800
+ let { start: e, end: n } = this.valueRange, { indent: r, src: s } = this.context;
1801
+ if (this.valueRange.isEmpty()) return "";
1802
+ let i = null, o = s[n - 1];
1803
+ for (; o === `
1804
+ ` || o === " " || o === " "; ) {
1805
+ if (n -= 1, n <= e) {
1806
+ if (this.chomping === le.KEEP) break;
1807
+ return "";
1808
+ }
1809
+ o === `
1810
+ ` && (i = n), o = s[n - 1];
1811
+ }
1812
+ let a = n + 1;
1813
+ i && (this.chomping === le.KEEP ? (a = i, n = this.valueRange.end) : n = i);
1814
+ let c = r + this.blockIndent, l = this.type === u.Type.BLOCK_FOLDED, f = !0, m = "", g = "", y = !1;
1815
+ for (let h = e; h < n; ++h) {
1816
+ for (let w = 0; w < c && s[h] === " "; ++w) h += 1;
1817
+ let d = s[h];
1818
+ if (d === `
1819
+ `) g === `
1820
+ ` ? m += `
1821
+ ` : g = `
1822
+ `;
1823
+ else {
1824
+ let w = u.Node.endOfLine(s, h), P = s.slice(h, w);
1825
+ h = w, l && (d === " " || d === " ") && h < a ? (g === " " ? g = `
1826
+ ` : !y && !f && g === `
1827
+ ` && (g = `
1828
+
1829
+ `), m += g + P, g = w < n && s[w] || "", y = !0) : (m += g + P, g = l && h < a ? " " : `
1830
+ `, y = !1), f && P !== "" && (f = !1);
1831
+ }
1832
+ }
1833
+ return this.chomping === le.STRIP ? m : m + `
1834
+ `;
1835
+ }
1836
+ parseBlockHeader(e) {
1837
+ let { src: n } = this.context, r = e + 1, s = "";
1838
+ for (; ; ) {
1839
+ let i = n[r];
1840
+ switch (i) {
1841
+ case "-":
1842
+ this.chomping = le.STRIP;
1843
+ break;
1844
+ case "+":
1845
+ this.chomping = le.KEEP;
1846
+ break;
1847
+ case "0":
1848
+ case "1":
1849
+ case "2":
1850
+ case "3":
1851
+ case "4":
1852
+ case "5":
1853
+ case "6":
1854
+ case "7":
1855
+ case "8":
1856
+ case "9":
1857
+ s += i;
1858
+ break;
1859
+ default:
1860
+ return this.blockIndent = Number(s) || null, this.header = new u.Range(e, r), r;
1861
+ }
1862
+ r += 1;
1863
+ }
1864
+ }
1865
+ parseBlockValue(e) {
1866
+ let { indent: n, src: r } = this.context, s = !!this.blockIndent, i = e, o = e, a = 1;
1867
+ for (let c = r[i]; c === `
1868
+ ` && (i += 1, !u.Node.atDocumentBoundary(r, i)); c = r[i]) {
1869
+ let l = u.Node.endOfBlockIndent(r, n, i);
1870
+ if (l === null) break;
1871
+ let f = r[l], m = l - (i + n);
1872
+ if (this.blockIndent) {
1873
+ if (f && f !== `
1874
+ ` && m < this.blockIndent) {
1875
+ if (r[l] === "#") break;
1876
+ if (!this.error) {
1877
+ let y = `Block scalars must not be less indented than their ${s ? "explicit indentation indicator" : "first line"}`;
1878
+ this.error = new u.YAMLSemanticError(this, y);
1879
+ }
1880
+ }
1881
+ } else if (r[l] !== `
1882
+ `) {
1883
+ if (m < a) {
1884
+ let g = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator";
1885
+ this.error = new u.YAMLSemanticError(this, g);
1886
+ }
1887
+ this.blockIndent = m;
1888
+ } else m > a && (a = m);
1889
+ r[l] === `
1890
+ ` ? i = l : i = o = u.Node.endOfLine(r, l);
1891
+ }
1892
+ return this.chomping !== le.KEEP && (i = r[o] ? o + 1 : o), this.valueRange = new u.Range(e + 1, i), i;
1893
+ }
1894
+ parse(e, n) {
1895
+ this.context = e;
1896
+ let { src: r } = e, s = this.parseBlockHeader(n);
1897
+ return s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s = this.parseBlockValue(s), s;
1898
+ }
1899
+ setOrigRanges(e, n) {
1900
+ return n = super.setOrigRanges(e, n), this.header ? this.header.setOrigRange(e, n) : n;
1901
+ }
1902
+ }, Pn = class extends u.Node {
1903
+ constructor(e, n) {
1904
+ super(e, n), this.items = null;
1905
+ }
1906
+ prevNodeIsJsonLike(e = this.items.length) {
1907
+ let n = this.items[e - 1];
1908
+ return !!n && (n.jsonLike || n.type === u.Type.COMMENT && this.prevNodeIsJsonLike(e - 1));
1909
+ }
1910
+ parse(e, n) {
1911
+ this.context = e;
1912
+ let { parseNode: r, src: s } = e, { indent: i, lineStart: o } = e, a = s[n];
1913
+ this.items = [{ char: a, offset: n }];
1914
+ let c = u.Node.endOfWhiteSpace(s, n + 1);
1915
+ for (a = s[c]; a && a !== "]" && a !== "}"; ) {
1916
+ switch (a) {
1917
+ case `
1918
+ `:
1919
+ {
1920
+ o = c + 1;
1921
+ let l = u.Node.endOfWhiteSpace(s, o);
1922
+ if (s[l] === `
1923
+ `) {
1924
+ let f = new Ee();
1925
+ o = f.parse({ src: s }, o), this.items.push(f);
1926
+ }
1927
+ if (c = u.Node.endOfIndent(s, o), c <= o + i && (a = s[c], c < o + i || a !== "]" && a !== "}")) {
1928
+ let f = "Insufficient indentation in flow collection";
1929
+ this.error = new u.YAMLSemanticError(this, f);
1930
+ }
1931
+ }
1932
+ break;
1933
+ case ",":
1934
+ this.items.push({ char: a, offset: c }), c += 1;
1935
+ break;
1936
+ case "#":
1937
+ {
1938
+ let l = new ye();
1939
+ c = l.parse({ src: s }, c), this.items.push(l);
1940
+ }
1941
+ break;
1942
+ case "?":
1943
+ case ":": {
1944
+ let l = s[c + 1];
1945
+ if (l === `
1946
+ ` || l === " " || l === " " || l === "," || a === ":" && this.prevNodeIsJsonLike()) {
1947
+ this.items.push({ char: a, offset: c }), c += 1;
1948
+ break;
1949
+ }
1950
+ }
1951
+ default: {
1952
+ let l = r({ atLineStart: !1, inCollection: !1, inFlow: !0, indent: -1, lineStart: o, parent: this }, c);
1953
+ if (!l) return this.valueRange = new u.Range(n, c), c;
1954
+ this.items.push(l), c = u.Node.normalizeOffset(s, l.range.end);
1955
+ }
1956
+ }
1957
+ c = u.Node.endOfWhiteSpace(s, c), a = s[c];
1958
+ }
1959
+ return this.valueRange = new u.Range(n, c + 1), a && (this.items.push({ char: a, offset: c }), c = u.Node.endOfWhiteSpace(s, c + 1), c = this.parseComment(c)), c;
1960
+ }
1961
+ setOrigRanges(e, n) {
1962
+ return n = super.setOrigRanges(e, n), this.items.forEach((r) => {
1963
+ if (r instanceof u.Node) n = r.setOrigRanges(e, n);
1964
+ else if (e.length === 0) r.origOffset = r.offset;
1965
+ else {
1966
+ let s = n;
1967
+ for (; s < e.length && !(e[s] > r.offset); ) ++s;
1968
+ r.origOffset = r.offset + s, n = s;
1969
+ }
1970
+ }), n;
1971
+ }
1972
+ toString() {
1973
+ let { context: { src: e }, items: n, range: r, value: s } = this;
1974
+ if (s != null) return s;
1975
+ let i = n.filter((c) => c instanceof u.Node), o = "", a = r.start;
1976
+ return i.forEach((c) => {
1977
+ let l = e.slice(a, c.range.start);
1978
+ a = c.range.end, o += l + String(c), o[o.length - 1] === `
1979
+ ` && e[a - 1] !== `
1980
+ ` && e[a] === `
1981
+ ` && (a += 1);
1982
+ }), o += e.slice(a, r.end), u.Node.addStringTerminator(e, r.end, o);
1983
+ }
1984
+ }, vn = class t extends u.Node {
1985
+ static endOfQuote(e, n) {
1986
+ let r = e[n];
1987
+ for (; r && r !== '"'; ) n += r === "\\" ? 2 : 1, r = e[n];
1988
+ return n + 1;
1989
+ }
1990
+ get strValue() {
1991
+ if (!this.valueRange || !this.context) return null;
1992
+ let e = [], { start: n, end: r } = this.valueRange, { indent: s, src: i } = this.context;
1993
+ i[r - 1] !== '"' && e.push(new u.YAMLSyntaxError(this, 'Missing closing "quote'));
1994
+ let o = "";
1995
+ for (let a = n + 1; a < r - 1; ++a) {
1996
+ let c = i[a];
1997
+ if (c === `
1998
+ `) {
1999
+ u.Node.atDocumentBoundary(i, a + 1) && e.push(new u.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values"));
2000
+ let { fold: l, offset: f, error: m } = u.Node.foldNewline(i, a, s);
2001
+ o += l, a = f, m && e.push(new u.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented"));
2002
+ } else if (c === "\\") switch (a += 1, i[a]) {
2003
+ case "0":
2004
+ o += "\0";
2005
+ break;
2006
+ case "a":
2007
+ o += "\x07";
2008
+ break;
2009
+ case "b":
2010
+ o += "\b";
2011
+ break;
2012
+ case "e":
2013
+ o += "\x1B";
2014
+ break;
2015
+ case "f":
2016
+ o += "\f";
2017
+ break;
2018
+ case "n":
2019
+ o += `
2020
+ `;
2021
+ break;
2022
+ case "r":
2023
+ o += "\r";
2024
+ break;
2025
+ case "t":
2026
+ o += " ";
2027
+ break;
2028
+ case "v":
2029
+ o += "\v";
2030
+ break;
2031
+ case "N":
2032
+ o += "\x85";
2033
+ break;
2034
+ case "_":
2035
+ o += "\xA0";
2036
+ break;
2037
+ case "L":
2038
+ o += "\u2028";
2039
+ break;
2040
+ case "P":
2041
+ o += "\u2029";
2042
+ break;
2043
+ case " ":
2044
+ o += " ";
2045
+ break;
2046
+ case '"':
2047
+ o += '"';
2048
+ break;
2049
+ case "/":
2050
+ o += "/";
2051
+ break;
2052
+ case "\\":
2053
+ o += "\\";
2054
+ break;
2055
+ case " ":
2056
+ o += " ";
2057
+ break;
2058
+ case "x":
2059
+ o += this.parseCharCode(a + 1, 2, e), a += 2;
2060
+ break;
2061
+ case "u":
2062
+ o += this.parseCharCode(a + 1, 4, e), a += 4;
2063
+ break;
2064
+ case "U":
2065
+ o += this.parseCharCode(a + 1, 8, e), a += 8;
2066
+ break;
2067
+ case `
2068
+ `:
2069
+ for (; i[a + 1] === " " || i[a + 1] === " "; ) a += 1;
2070
+ break;
2071
+ default:
2072
+ e.push(new u.YAMLSyntaxError(this, `Invalid escape sequence ${i.substr(a - 1, 2)}`)), o += "\\" + i[a];
2073
+ }
2074
+ else if (c === " " || c === " ") {
2075
+ let l = a, f = i[a + 1];
2076
+ for (; f === " " || f === " "; ) a += 1, f = i[a + 1];
2077
+ f !== `
2078
+ ` && (o += a > l ? i.slice(l, a + 1) : c);
2079
+ } else o += c;
2080
+ }
2081
+ return e.length > 0 ? { errors: e, str: o } : o;
2082
+ }
2083
+ parseCharCode(e, n, r) {
2084
+ let { src: s } = this.context, i = s.substr(e, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
2085
+ return isNaN(a) ? (r.push(new u.YAMLSyntaxError(this, `Invalid escape sequence ${s.substr(e - 2, n + 2)}`)), s.substr(e - 2, n + 2)) : String.fromCodePoint(a);
2086
+ }
2087
+ parse(e, n) {
2088
+ this.context = e;
2089
+ let { src: r } = e, s = t.endOfQuote(r, n + 1);
2090
+ return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
2091
+ }
2092
+ }, In = class t extends u.Node {
2093
+ static endOfQuote(e, n) {
2094
+ let r = e[n];
2095
+ for (; r; ) if (r === "'") {
2096
+ if (e[n + 1] !== "'") break;
2097
+ r = e[n += 2];
2098
+ } else r = e[n += 1];
2099
+ return n + 1;
2100
+ }
2101
+ get strValue() {
2102
+ if (!this.valueRange || !this.context) return null;
2103
+ let e = [], { start: n, end: r } = this.valueRange, { indent: s, src: i } = this.context;
2104
+ i[r - 1] !== "'" && e.push(new u.YAMLSyntaxError(this, "Missing closing 'quote"));
2105
+ let o = "";
2106
+ for (let a = n + 1; a < r - 1; ++a) {
2107
+ let c = i[a];
2108
+ if (c === `
2109
+ `) {
2110
+ u.Node.atDocumentBoundary(i, a + 1) && e.push(new u.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values"));
2111
+ let { fold: l, offset: f, error: m } = u.Node.foldNewline(i, a, s);
2112
+ o += l, a = f, m && e.push(new u.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented"));
2113
+ } else if (c === "'") o += c, a += 1, i[a] !== "'" && e.push(new u.YAMLSyntaxError(this, "Unescaped single quote? This should not happen."));
2114
+ else if (c === " " || c === " ") {
2115
+ let l = a, f = i[a + 1];
2116
+ for (; f === " " || f === " "; ) a += 1, f = i[a + 1];
2117
+ f !== `
2118
+ ` && (o += a > l ? i.slice(l, a + 1) : c);
2119
+ } else o += c;
2120
+ }
2121
+ return e.length > 0 ? { errors: e, str: o } : o;
2122
+ }
2123
+ parse(e, n) {
2124
+ this.context = e;
2125
+ let { src: r } = e, s = t.endOfQuote(r, n + 1);
2126
+ return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
2127
+ }
2128
+ };
2129
+ function So(t, e) {
2130
+ switch (t) {
2131
+ case u.Type.ALIAS:
2132
+ return new Mn(t, e);
2133
+ case u.Type.BLOCK_FOLDED:
2134
+ case u.Type.BLOCK_LITERAL:
2135
+ return new kn(t, e);
2136
+ case u.Type.FLOW_MAP:
2137
+ case u.Type.FLOW_SEQ:
2138
+ return new Pn(t, e);
2139
+ case u.Type.MAP_KEY:
2140
+ case u.Type.MAP_VALUE:
2141
+ case u.Type.SEQ_ITEM:
2142
+ return new ot(t, e);
2143
+ case u.Type.COMMENT:
2144
+ case u.Type.PLAIN:
2145
+ return new u.PlainValue(t, e);
2146
+ case u.Type.QUOTE_DOUBLE:
2147
+ return new vn(t, e);
2148
+ case u.Type.QUOTE_SINGLE:
2149
+ return new In(t, e);
2150
+ default:
2151
+ return null;
2152
+ }
2153
+ }
2154
+ var _n = class t {
2155
+ static parseType(e, n, r) {
2156
+ switch (e[n]) {
2157
+ case "*":
2158
+ return u.Type.ALIAS;
2159
+ case ">":
2160
+ return u.Type.BLOCK_FOLDED;
2161
+ case "|":
2162
+ return u.Type.BLOCK_LITERAL;
2163
+ case "{":
2164
+ return u.Type.FLOW_MAP;
2165
+ case "[":
2166
+ return u.Type.FLOW_SEQ;
2167
+ case "?":
2168
+ return !r && u.Node.atBlank(e, n + 1, !0) ? u.Type.MAP_KEY : u.Type.PLAIN;
2169
+ case ":":
2170
+ return !r && u.Node.atBlank(e, n + 1, !0) ? u.Type.MAP_VALUE : u.Type.PLAIN;
2171
+ case "-":
2172
+ return !r && u.Node.atBlank(e, n + 1, !0) ? u.Type.SEQ_ITEM : u.Type.PLAIN;
2173
+ case '"':
2174
+ return u.Type.QUOTE_DOUBLE;
2175
+ case "'":
2176
+ return u.Type.QUOTE_SINGLE;
2177
+ default:
2178
+ return u.Type.PLAIN;
2179
+ }
2180
+ }
2181
+ constructor(e = {}, { atLineStart: n, inCollection: r, inFlow: s, indent: i, lineStart: o, parent: a } = {}) {
2182
+ u._defineProperty(this, "parseNode", (c, l) => {
2183
+ if (u.Node.atDocumentBoundary(this.src, l)) return null;
2184
+ let f = new t(this, c), { props: m, type: g, valueStart: y } = f.parseProps(l), h = So(g, m), d = h.parse(f, y);
2185
+ if (h.range = new u.Range(l, d), d <= l && (h.error = new Error("Node#parse consumed no characters"), h.error.parseEnd = d, h.error.source = h, h.range.end = l + 1), f.nodeStartsCollection(h)) {
2186
+ !h.error && !f.atLineStart && f.parent.type === u.Type.DOCUMENT && (h.error = new u.YAMLSyntaxError(h, "Block collection must not have preceding content here (e.g. directives-end indicator)"));
2187
+ let w = new It(h);
2188
+ return d = w.parse(new t(f), d), w.range = new u.Range(l, d), w;
2189
+ }
2190
+ return h;
2191
+ }), this.atLineStart = n ?? (e.atLineStart || !1), this.inCollection = r ?? (e.inCollection || !1), this.inFlow = s ?? (e.inFlow || !1), this.indent = i ?? e.indent, this.lineStart = o ?? e.lineStart, this.parent = a ?? (e.parent || {}), this.root = e.root, this.src = e.src;
2192
+ }
2193
+ nodeStartsCollection(e) {
2194
+ let { inCollection: n, inFlow: r, src: s } = this;
2195
+ if (n || r) return !1;
2196
+ if (e instanceof ot) return !0;
2197
+ let i = e.range.end;
2198
+ return s[i] === `
2199
+ ` || s[i - 1] === `
2200
+ ` ? !1 : (i = u.Node.endOfWhiteSpace(s, i), s[i] === ":");
2201
+ }
2202
+ parseProps(e) {
2203
+ let { inFlow: n, parent: r, src: s } = this, i = [], o = !1;
2204
+ e = this.atLineStart ? u.Node.endOfIndent(s, e) : u.Node.endOfWhiteSpace(s, e);
2205
+ let a = s[e];
2206
+ for (; a === u.Char.ANCHOR || a === u.Char.COMMENT || a === u.Char.TAG || a === `
2207
+ `; ) {
2208
+ if (a === `
2209
+ `) {
2210
+ let l = e, f;
2211
+ do
2212
+ f = l + 1, l = u.Node.endOfIndent(s, f);
2213
+ while (s[l] === `
2214
+ `);
2215
+ let m = l - (f + this.indent), g = r.type === u.Type.SEQ_ITEM && r.context.atLineStart;
2216
+ if (s[l] !== "#" && !u.Node.nextNodeIsIndented(s[l], m, !g)) break;
2217
+ this.atLineStart = !0, this.lineStart = f, o = !1, e = l;
2218
+ } else if (a === u.Char.COMMENT) {
2219
+ let l = u.Node.endOfLine(s, e + 1);
2220
+ i.push(new u.Range(e, l)), e = l;
2221
+ } else {
2222
+ let l = u.Node.endOfIdentifier(s, e + 1);
2223
+ a === u.Char.TAG && s[l] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e + 1, l + 13)) && (l = u.Node.endOfIdentifier(s, l + 5)), i.push(new u.Range(e, l)), o = !0, e = u.Node.endOfWhiteSpace(s, l);
2224
+ }
2225
+ a = s[e];
2226
+ }
2227
+ o && a === ":" && u.Node.atBlank(s, e + 1, !0) && (e -= 1);
2228
+ let c = t.parseType(s, e, n);
2229
+ return { props: i, type: c, valueStart: e };
2230
+ }
2231
+ };
2232
+ function wo(t) {
2233
+ let e = [];
2234
+ t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, (s, i) => (s.length > 1 && e.push(i), `
2235
+ `)));
2236
+ let n = [], r = 0;
2237
+ do {
2238
+ let s = new Cn(), i = new _n({ src: t });
2239
+ r = s.parse(i, r), n.push(s);
2240
+ } while (r < t.length);
2241
+ return n.setOrigRanges = () => {
2242
+ if (e.length === 0) return !1;
2243
+ for (let i = 1; i < e.length; ++i) e[i] -= i;
2244
+ let s = 0;
2245
+ for (let i = 0; i < n.length; ++i) s = n[i].setOrigRanges(e, s);
2246
+ return e.splice(0, e.length), !0;
2247
+ }, n.toString = () => n.join(`...
2248
+ `), n;
2249
+ }
2250
+ jr.parse = wo;
2251
+ }), De = ne((M) => {
2252
+ "use strict";
2253
+ var p = ce();
2254
+ function bo(t, e, n) {
2255
+ return n ? `#${n.replace(/[\s\S]^/gm, `$&${e}#`)}
2256
+ ${e}${t}` : t;
2257
+ }
2258
+ function Re(t, e, n) {
2259
+ return n ? n.indexOf(`
2260
+ `) === -1 ? `${t} #${n}` : `${t}
2261
+ ` + n.replace(/^/gm, `${e || ""}#`) : t;
2262
+ }
2263
+ var j = class {
2264
+ };
2265
+ function fe(t, e, n) {
2266
+ if (Array.isArray(t)) return t.map((r, s) => fe(r, String(s), n));
2267
+ if (t && typeof t.toJSON == "function") {
2268
+ let r = n && n.anchors && n.anchors.get(t);
2269
+ r && (n.onCreate = (i) => {
2270
+ r.res = i, delete n.onCreate;
2271
+ });
2272
+ let s = t.toJSON(e, n);
2273
+ return r && n.onCreate && n.onCreate(s), s;
2274
+ }
2275
+ return (!n || !n.keep) && typeof t == "bigint" ? Number(t) : t;
2276
+ }
2277
+ var x = class extends j {
2278
+ constructor(e) {
2279
+ super(), this.value = e;
2280
+ }
2281
+ toJSON(e, n) {
2282
+ return n && n.keep ? this.value : fe(this.value, e, n);
2283
+ }
2284
+ toString() {
2285
+ return String(this.value);
2286
+ }
2287
+ };
2288
+ function Gr(t, e, n) {
2289
+ let r = n;
2290
+ for (let s = e.length - 1; s >= 0; --s) {
2291
+ let i = e[s];
2292
+ if (Number.isInteger(i) && i >= 0) {
2293
+ let o = [];
2294
+ o[i] = r, r = o;
2295
+ } else {
2296
+ let o = {};
2297
+ Object.defineProperty(o, i, { value: r, writable: !0, enumerable: !0, configurable: !0 }), r = o;
2298
+ }
2299
+ }
2300
+ return t.createNode(r, !1);
2301
+ }
2302
+ var Xr = (t) => t == null || typeof t == "object" && t[Symbol.iterator]().next().done, Q = class t extends j {
2303
+ constructor(e) {
2304
+ super(), p._defineProperty(this, "items", []), this.schema = e;
2305
+ }
2306
+ addIn(e, n) {
2307
+ if (Xr(e)) this.add(n);
2308
+ else {
2309
+ let [r, ...s] = e, i = this.get(r, !0);
2310
+ if (i instanceof t) i.addIn(s, n);
2311
+ else if (i === void 0 && this.schema) this.set(r, Gr(this.schema, s, n));
2312
+ else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`);
2313
+ }
2314
+ }
2315
+ deleteIn([e, ...n]) {
2316
+ if (n.length === 0) return this.delete(e);
2317
+ let r = this.get(e, !0);
2318
+ if (r instanceof t) return r.deleteIn(n);
2319
+ throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`);
2320
+ }
2321
+ getIn([e, ...n], r) {
2322
+ let s = this.get(e, !0);
2323
+ return n.length === 0 ? !r && s instanceof x ? s.value : s : s instanceof t ? s.getIn(n, r) : void 0;
2324
+ }
2325
+ hasAllNullValues() {
2326
+ return this.items.every((e) => {
2327
+ if (!e || e.type !== "PAIR") return !1;
2328
+ let n = e.value;
2329
+ return n == null || n instanceof x && n.value == null && !n.commentBefore && !n.comment && !n.tag;
2330
+ });
2331
+ }
2332
+ hasIn([e, ...n]) {
2333
+ if (n.length === 0) return this.has(e);
2334
+ let r = this.get(e, !0);
2335
+ return r instanceof t ? r.hasIn(n) : !1;
2336
+ }
2337
+ setIn([e, ...n], r) {
2338
+ if (n.length === 0) this.set(e, r);
2339
+ else {
2340
+ let s = this.get(e, !0);
2341
+ if (s instanceof t) s.setIn(n, r);
2342
+ else if (s === void 0 && this.schema) this.set(e, Gr(this.schema, n, r));
2343
+ else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`);
2344
+ }
2345
+ }
2346
+ toJSON() {
2347
+ return null;
2348
+ }
2349
+ toString(e, { blockItem: n, flowChars: r, isMap: s, itemIndent: i }, o, a) {
2350
+ let { indent: c, indentStep: l, stringify: f } = e, m = this.type === p.Type.FLOW_MAP || this.type === p.Type.FLOW_SEQ || e.inFlow;
2351
+ m && (i += l);
2352
+ let g = s && this.hasAllNullValues();
2353
+ e = Object.assign({}, e, { allNullValues: g, indent: i, inFlow: m, type: null });
2354
+ let y = !1, h = !1, d = this.items.reduce((P, A, C) => {
2355
+ let L;
2356
+ A && (!y && A.spaceBefore && P.push({ type: "comment", str: "" }), A.commentBefore && A.commentBefore.match(/^.*$/gm).forEach((Mi) => {
2357
+ P.push({ type: "comment", str: `#${Mi}` });
2358
+ }), A.comment && (L = A.comment), m && (!y && A.spaceBefore || A.commentBefore || A.comment || A.key && (A.key.commentBefore || A.key.comment) || A.value && (A.value.commentBefore || A.value.comment)) && (h = !0)), y = !1;
2359
+ let R = f(A, e, () => L = null, () => y = !0);
2360
+ return m && !h && R.includes(`
2361
+ `) && (h = !0), m && C < this.items.length - 1 && (R += ","), R = Re(R, i, L), y && (L || m) && (y = !1), P.push({ type: "item", str: R }), P;
2362
+ }, []), w;
2363
+ if (d.length === 0) w = r.start + r.end;
2364
+ else if (m) {
2365
+ let { start: P, end: A } = r, C = d.map((L) => L.str);
2366
+ if (h || C.reduce((L, R) => L + R.length + 2, 2) > t.maxFlowStringSingleLineLength) {
2367
+ w = P;
2368
+ for (let L of C) w += L ? `
2369
+ ${l}${c}${L}` : `
2370
+ `;
2371
+ w += `
2372
+ ${c}${A}`;
2373
+ } else w = `${P} ${C.join(" ")} ${A}`;
2374
+ } else {
2375
+ let P = d.map(n);
2376
+ w = P.shift();
2377
+ for (let A of P) w += A ? `
2378
+ ${c}${A}` : `
2379
+ `;
2380
+ }
2381
+ return this.comment ? (w += `
2382
+ ` + this.comment.replace(/^/gm, `${c}#`), o && o()) : y && a && a(), w;
2383
+ }
2384
+ };
2385
+ p._defineProperty(Q, "maxFlowStringSingleLineLength", 60);
2386
+ function _t(t) {
2387
+ let e = t instanceof x ? t.value : t;
2388
+ return e && typeof e == "string" && (e = Number(e)), Number.isInteger(e) && e >= 0 ? e : null;
2389
+ }
2390
+ var ue = class extends Q {
2391
+ add(e) {
2392
+ this.items.push(e);
2393
+ }
2394
+ delete(e) {
2395
+ let n = _t(e);
2396
+ return typeof n != "number" ? !1 : this.items.splice(n, 1).length > 0;
2397
+ }
2398
+ get(e, n) {
2399
+ let r = _t(e);
2400
+ if (typeof r != "number") return;
2401
+ let s = this.items[r];
2402
+ return !n && s instanceof x ? s.value : s;
2403
+ }
2404
+ has(e) {
2405
+ let n = _t(e);
2406
+ return typeof n == "number" && n < this.items.length;
2407
+ }
2408
+ set(e, n) {
2409
+ let r = _t(e);
2410
+ if (typeof r != "number") throw new Error(`Expected a valid index, not ${e}.`);
2411
+ this.items[r] = n;
2412
+ }
2413
+ toJSON(e, n) {
2414
+ let r = [];
2415
+ n && n.onCreate && n.onCreate(r);
2416
+ let s = 0;
2417
+ for (let i of this.items) r.push(fe(i, String(s++), n));
2418
+ return r;
2419
+ }
2420
+ toString(e, n, r) {
2421
+ return e ? super.toString(e, { blockItem: (s) => s.type === "comment" ? s.str : `- ${s.str}`, flowChars: { start: "[", end: "]" }, isMap: !1, itemIndent: (e.indent || "") + " " }, n, r) : JSON.stringify(this);
2422
+ }
2423
+ }, No = (t, e, n) => e === null ? "" : typeof e != "object" ? String(e) : t instanceof j && n && n.doc ? t.toString({ anchors: /* @__PURE__ */ Object.create(null), doc: n.doc, indent: "", indentStep: n.indentStep, inFlow: !0, inStringifyKey: !0, stringify: n.stringify }) : JSON.stringify(e), T = class t extends j {
2424
+ constructor(e, n = null) {
2425
+ super(), this.key = e, this.value = n, this.type = t.Type.PAIR;
2426
+ }
2427
+ get commentBefore() {
2428
+ return this.key instanceof j ? this.key.commentBefore : void 0;
2429
+ }
2430
+ set commentBefore(e) {
2431
+ if (this.key == null && (this.key = new x(null)), this.key instanceof j) this.key.commentBefore = e;
2432
+ else {
2433
+ let n = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";
2434
+ throw new Error(n);
2435
+ }
2436
+ }
2437
+ addToJSMap(e, n) {
2438
+ let r = fe(this.key, "", e);
2439
+ if (n instanceof Map) {
2440
+ let s = fe(this.value, r, e);
2441
+ n.set(r, s);
2442
+ } else if (n instanceof Set) n.add(r);
2443
+ else {
2444
+ let s = No(this.key, r, e), i = fe(this.value, s, e);
2445
+ s in n ? Object.defineProperty(n, s, { value: i, writable: !0, enumerable: !0, configurable: !0 }) : n[s] = i;
2446
+ }
2447
+ return n;
2448
+ }
2449
+ toJSON(e, n) {
2450
+ let r = n && n.mapAsMap ? /* @__PURE__ */ new Map() : {};
2451
+ return this.addToJSMap(n, r);
2452
+ }
2453
+ toString(e, n, r) {
2454
+ if (!e || !e.doc) return JSON.stringify(this);
2455
+ let { indent: s, indentSeq: i, simpleKeys: o } = e.doc.options, { key: a, value: c } = this, l = a instanceof j && a.comment;
2456
+ if (o) {
2457
+ if (l) throw new Error("With simple keys, key nodes cannot have comments");
2458
+ if (a instanceof Q) {
2459
+ let R = "With simple keys, collection cannot be used as a key value";
2460
+ throw new Error(R);
2461
+ }
2462
+ }
2463
+ let f = !o && (!a || l || (a instanceof j ? a instanceof Q || a.type === p.Type.BLOCK_FOLDED || a.type === p.Type.BLOCK_LITERAL : typeof a == "object")), { doc: m, indent: g, indentStep: y, stringify: h } = e;
2464
+ e = Object.assign({}, e, { implicitKey: !f, indent: g + y });
2465
+ let d = !1, w = h(a, e, () => l = null, () => d = !0);
2466
+ if (w = Re(w, e.indent, l), !f && w.length > 1024) {
2467
+ if (o) throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
2468
+ f = !0;
2469
+ }
2470
+ if (e.allNullValues && !o) return this.comment ? (w = Re(w, e.indent, this.comment), n && n()) : d && !l && r && r(), e.inFlow && !f ? w : `? ${w}`;
2471
+ w = f ? `? ${w}
2472
+ ${g}:` : `${w}:`, this.comment && (w = Re(w, e.indent, this.comment), n && n());
2473
+ let P = "", A = null;
2474
+ if (c instanceof j) {
2475
+ if (c.spaceBefore && (P = `
2476
+ `), c.commentBefore) {
2477
+ let R = c.commentBefore.replace(/^/gm, `${e.indent}#`);
2478
+ P += `
2479
+ ${R}`;
2480
+ }
2481
+ A = c.comment;
2482
+ } else c && typeof c == "object" && (c = m.schema.createNode(c, !0));
2483
+ e.implicitKey = !1, !f && !this.comment && c instanceof x && (e.indentAtStart = w.length + 1), d = !1, !i && s >= 2 && !e.inFlow && !f && c instanceof ue && c.type !== p.Type.FLOW_SEQ && !c.tag && !m.anchors.getName(c) && (e.indent = e.indent.substr(2));
2484
+ let C = h(c, e, () => A = null, () => d = !0), L = " ";
2485
+ return P || this.comment ? L = `${P}
2486
+ ${e.indent}` : !f && c instanceof Q ? (!(C[0] === "[" || C[0] === "{") || C.includes(`
2487
+ `)) && (L = `
2488
+ ${e.indent}`) : C[0] === `
2489
+ ` && (L = ""), d && !A && r && r(), Re(w + L + C, e.indent, A);
2490
+ }
2491
+ };
2492
+ p._defineProperty(T, "Type", { PAIR: "PAIR", MERGE_PAIR: "MERGE_PAIR" });
2493
+ var xt = (t, e) => {
2494
+ if (t instanceof we) {
2495
+ let n = e.get(t.source);
2496
+ return n.count * n.aliasCount;
2497
+ } else if (t instanceof Q) {
2498
+ let n = 0;
2499
+ for (let r of t.items) {
2500
+ let s = xt(r, e);
2501
+ s > n && (n = s);
2502
+ }
2503
+ return n;
2504
+ } else if (t instanceof T) {
2505
+ let n = xt(t.key, e), r = xt(t.value, e);
2506
+ return Math.max(n, r);
2507
+ }
2508
+ return 1;
2509
+ }, we = class t extends j {
2510
+ static stringify({ range: e, source: n }, { anchors: r, doc: s, implicitKey: i, inStringifyKey: o }) {
2511
+ let a = Object.keys(r).find((l) => r[l] === n);
2512
+ if (!a && o && (a = s.anchors.getName(n) || s.anchors.newName()), a) return `*${a}${i ? " " : ""}`;
2513
+ let c = s.anchors.getName(n) ? "Alias node must be after source node" : "Source node not found for alias node";
2514
+ throw new Error(`${c} [${e}]`);
2515
+ }
2516
+ constructor(e) {
2517
+ super(), this.source = e, this.type = p.Type.ALIAS;
2518
+ }
2519
+ set tag(e) {
2520
+ throw new Error("Alias nodes cannot have tags");
2521
+ }
2522
+ toJSON(e, n) {
2523
+ if (!n) return fe(this.source, e, n);
2524
+ let { anchors: r, maxAliasCount: s } = n, i = r.get(this.source);
2525
+ if (!i || i.res === void 0) {
2526
+ let o = "This should not happen: Alias anchor was not resolved?";
2527
+ throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : new ReferenceError(o);
2528
+ }
2529
+ if (s >= 0 && (i.count += 1, i.aliasCount === 0 && (i.aliasCount = xt(this.source, r)), i.count * i.aliasCount > s)) {
2530
+ let o = "Excessive alias count indicates a resource exhaustion attack";
2531
+ throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : new ReferenceError(o);
2532
+ }
2533
+ return i.res;
2534
+ }
2535
+ toString(e) {
2536
+ return t.stringify(this, e);
2537
+ }
2538
+ };
2539
+ p._defineProperty(we, "default", !0);
2540
+ function at(t, e) {
2541
+ let n = e instanceof x ? e.value : e;
2542
+ for (let r of t) if (r instanceof T && (r.key === e || r.key === n || r.key && r.key.value === n)) return r;
2543
+ }
2544
+ var ct = class extends Q {
2545
+ add(e, n) {
2546
+ e ? e instanceof T || (e = new T(e.key || e, e.value)) : e = new T(e);
2547
+ let r = at(this.items, e.key), s = this.schema && this.schema.sortMapEntries;
2548
+ if (r) if (n) r.value = e.value;
2549
+ else throw new Error(`Key ${e.key} already set`);
2550
+ else if (s) {
2551
+ let i = this.items.findIndex((o) => s(e, o) < 0);
2552
+ i === -1 ? this.items.push(e) : this.items.splice(i, 0, e);
2553
+ } else this.items.push(e);
2554
+ }
2555
+ delete(e) {
2556
+ let n = at(this.items, e);
2557
+ return n ? this.items.splice(this.items.indexOf(n), 1).length > 0 : !1;
2558
+ }
2559
+ get(e, n) {
2560
+ let r = at(this.items, e), s = r && r.value;
2561
+ return !n && s instanceof x ? s.value : s;
2562
+ }
2563
+ has(e) {
2564
+ return !!at(this.items, e);
2565
+ }
2566
+ set(e, n) {
2567
+ this.add(new T(e, n), !0);
2568
+ }
2569
+ toJSON(e, n, r) {
2570
+ let s = r ? new r() : n && n.mapAsMap ? /* @__PURE__ */ new Map() : {};
2571
+ n && n.onCreate && n.onCreate(s);
2572
+ for (let i of this.items) i.addToJSMap(n, s);
2573
+ return s;
2574
+ }
2575
+ toString(e, n, r) {
2576
+ if (!e) return JSON.stringify(this);
2577
+ for (let s of this.items) if (!(s instanceof T)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);
2578
+ return super.toString(e, { blockItem: (s) => s.str, flowChars: { start: "{", end: "}" }, isMap: !0, itemIndent: e.indent || "" }, n, r);
2579
+ }
2580
+ }, zr = "<<", $t = class extends T {
2581
+ constructor(e) {
2582
+ if (e instanceof T) {
2583
+ let n = e.value;
2584
+ n instanceof ue || (n = new ue(), n.items.push(e.value), n.range = e.value.range), super(e.key, n), this.range = e.range;
2585
+ } else super(new x(zr), new ue());
2586
+ this.type = T.Type.MERGE_PAIR;
2587
+ }
2588
+ addToJSMap(e, n) {
2589
+ for (let { source: r } of this.value.items) {
2590
+ if (!(r instanceof ct)) throw new Error("Merge sources must be maps");
2591
+ let s = r.toJSON(null, e, Map);
2592
+ for (let [i, o] of s) n instanceof Map ? n.has(i) || n.set(i, o) : n instanceof Set ? n.add(i) : Object.prototype.hasOwnProperty.call(n, i) || Object.defineProperty(n, i, { value: o, writable: !0, enumerable: !0, configurable: !0 });
2593
+ }
2594
+ return n;
2595
+ }
2596
+ toString(e, n) {
2597
+ let r = this.value;
2598
+ if (r.items.length > 1) return super.toString(e, n);
2599
+ this.value = r.items[0];
2600
+ let s = super.toString(e, n);
2601
+ return this.value = r, s;
2602
+ }
2603
+ }, Oo = { defaultType: p.Type.BLOCK_LITERAL, lineWidth: 76 }, Ao = { trueStr: "true", falseStr: "false" }, Lo = { asBigInt: !1 }, To = { nullStr: "null" }, be = { defaultType: p.Type.PLAIN, doubleQuoted: { jsonEncoding: !1, minMultiLineLength: 40 }, fold: { lineWidth: 80, minContentWidth: 20 } };
2604
+ function Rn(t, e, n) {
2605
+ for (let { format: r, test: s, resolve: i } of e) if (s) {
2606
+ let o = t.match(s);
2607
+ if (o) {
2608
+ let a = i.apply(null, o);
2609
+ return a instanceof x || (a = new x(a)), r && (a.format = r), a;
2610
+ }
2611
+ }
2612
+ return n && (t = n(t)), new x(t);
2613
+ }
2614
+ var Zr = "flow", xn = "block", Rt = "quoted", Hr = (t, e) => {
2615
+ let n = t[e + 1];
2616
+ for (; n === " " || n === " "; ) {
2617
+ do
2618
+ n = t[e += 1];
2619
+ while (n && n !== `
2620
+ `);
2621
+ n = t[e + 1];
2622
+ }
2623
+ return e;
2624
+ };
2625
+ function Yt(t, e, n, { indentAtStart: r, lineWidth: s = 80, minContentWidth: i = 20, onFold: o, onOverflow: a }) {
2626
+ if (!s || s < 0) return t;
2627
+ let c = Math.max(1 + i, 1 + s - e.length);
2628
+ if (t.length <= c) return t;
2629
+ let l = [], f = {}, m = s - e.length;
2630
+ typeof r == "number" && (r > s - Math.max(2, i) ? l.push(0) : m = s - r);
2631
+ let g, y, h = !1, d = -1, w = -1, P = -1;
2632
+ n === xn && (d = Hr(t, d), d !== -1 && (m = d + c));
2633
+ for (let C; C = t[d += 1]; ) {
2634
+ if (n === Rt && C === "\\") {
2635
+ switch (w = d, t[d + 1]) {
2636
+ case "x":
2637
+ d += 3;
2638
+ break;
2639
+ case "u":
2640
+ d += 5;
2641
+ break;
2642
+ case "U":
2643
+ d += 9;
2644
+ break;
2645
+ default:
2646
+ d += 1;
2647
+ }
2648
+ P = d;
2649
+ }
2650
+ if (C === `
2651
+ `) n === xn && (d = Hr(t, d)), m = d + c, g = void 0;
2652
+ else {
2653
+ if (C === " " && y && y !== " " && y !== `
2654
+ ` && y !== " ") {
2655
+ let L = t[d + 1];
2656
+ L && L !== " " && L !== `
2657
+ ` && L !== " " && (g = d);
2658
+ }
2659
+ if (d >= m) if (g) l.push(g), m = g + c, g = void 0;
2660
+ else if (n === Rt) {
2661
+ for (; y === " " || y === " "; ) y = C, C = t[d += 1], h = !0;
2662
+ let L = d > P + 1 ? d - 2 : w - 1;
2663
+ if (f[L]) return t;
2664
+ l.push(L), f[L] = !0, m = L + c, g = void 0;
2665
+ } else h = !0;
2666
+ }
2667
+ y = C;
2668
+ }
2669
+ if (h && a && a(), l.length === 0) return t;
2670
+ o && o();
2671
+ let A = t.slice(0, l[0]);
2672
+ for (let C = 0; C < l.length; ++C) {
2673
+ let L = l[C], R = l[C + 1] || t.length;
2674
+ L === 0 ? A = `
2675
+ ${e}${t.slice(0, R)}` : (n === Rt && f[L] && (A += `${t[L]}\\`), A += `
2676
+ ${e}${t.slice(L + 1, R)}`);
2677
+ }
2678
+ return A;
2679
+ }
2680
+ var Dn = ({ indentAtStart: t }) => t ? Object.assign({ indentAtStart: t }, be.fold) : be.fold, Bt = (t) => /^(%|---|\.\.\.)/m.test(t);
2681
+ function Co(t, e, n) {
2682
+ if (!e || e < 0) return !1;
2683
+ let r = e - n, s = t.length;
2684
+ if (s <= r) return !1;
2685
+ for (let i = 0, o = 0; i < s; ++i) if (t[i] === `
2686
+ `) {
2687
+ if (i - o > r) return !0;
2688
+ if (o = i + 1, s - o <= r) return !1;
2689
+ }
2690
+ return !0;
2691
+ }
2692
+ function Se(t, e) {
2693
+ let { implicitKey: n } = e, { jsonEncoding: r, minMultiLineLength: s } = be.doubleQuoted, i = JSON.stringify(t);
2694
+ if (r) return i;
2695
+ let o = e.indent || (Bt(t) ? " " : ""), a = "", c = 0;
2696
+ for (let l = 0, f = i[l]; f; f = i[++l]) if (f === " " && i[l + 1] === "\\" && i[l + 2] === "n" && (a += i.slice(c, l) + "\\ ", l += 1, c = l, f = "\\"), f === "\\") switch (i[l + 1]) {
2697
+ case "u":
2698
+ {
2699
+ a += i.slice(c, l);
2700
+ let m = i.substr(l + 2, 4);
2701
+ switch (m) {
2702
+ case "0000":
2703
+ a += "\\0";
2704
+ break;
2705
+ case "0007":
2706
+ a += "\\a";
2707
+ break;
2708
+ case "000b":
2709
+ a += "\\v";
2710
+ break;
2711
+ case "001b":
2712
+ a += "\\e";
2713
+ break;
2714
+ case "0085":
2715
+ a += "\\N";
2716
+ break;
2717
+ case "00a0":
2718
+ a += "\\_";
2719
+ break;
2720
+ case "2028":
2721
+ a += "\\L";
2722
+ break;
2723
+ case "2029":
2724
+ a += "\\P";
2725
+ break;
2726
+ default:
2727
+ m.substr(0, 2) === "00" ? a += "\\x" + m.substr(2) : a += i.substr(l, 6);
2728
+ }
2729
+ l += 5, c = l + 1;
2730
+ }
2731
+ break;
2732
+ case "n":
2733
+ if (n || i[l + 2] === '"' || i.length < s) l += 1;
2734
+ else {
2735
+ for (a += i.slice(c, l) + `
2736
+
2737
+ `; i[l + 2] === "\\" && i[l + 3] === "n" && i[l + 4] !== '"'; ) a += `
2738
+ `, l += 2;
2739
+ a += o, i[l + 2] === " " && (a += "\\"), l += 1, c = l + 1;
2740
+ }
2741
+ break;
2742
+ default:
2743
+ l += 1;
2744
+ }
2745
+ return a = c ? a + i.slice(c) : i, n ? a : Yt(a, o, Rt, Dn(e));
2746
+ }
2747
+ function es(t, e) {
2748
+ if (e.implicitKey) {
2749
+ if (/\n/.test(t)) return Se(t, e);
2750
+ } else if (/[ \t]\n|\n[ \t]/.test(t)) return Se(t, e);
2751
+ let n = e.indent || (Bt(t) ? " " : ""), r = "'" + t.replace(/'/g, "''").replace(/\n+/g, `$&
2752
+ ${n}`) + "'";
2753
+ return e.implicitKey ? r : Yt(r, n, Zr, Dn(e));
2754
+ }
2755
+ function Dt({ comment: t, type: e, value: n }, r, s, i) {
2756
+ if (/\n[\t ]+$/.test(n) || /^\s*$/.test(n)) return Se(n, r);
2757
+ let o = r.indent || (r.forceBlockIndent || Bt(n) ? " " : ""), a = o ? "2" : "1", c = e === p.Type.BLOCK_FOLDED ? !1 : e === p.Type.BLOCK_LITERAL ? !0 : !Co(n, be.fold.lineWidth, o.length), l = c ? "|" : ">";
2758
+ if (!n) return l + `
2759
+ `;
2760
+ let f = "", m = "";
2761
+ if (n = n.replace(/[\n\t ]*$/, (y) => {
2762
+ let h = y.indexOf(`
2763
+ `);
2764
+ return h === -1 ? l += "-" : (n === y || h !== y.length - 1) && (l += "+", i && i()), m = y.replace(/\n$/, ""), "";
2765
+ }).replace(/^[\n ]*/, (y) => {
2766
+ y.indexOf(" ") !== -1 && (l += a);
2767
+ let h = y.match(/ +$/);
2768
+ return h ? (f = y.slice(0, -h[0].length), h[0]) : (f = y, "");
2769
+ }), m && (m = m.replace(/\n+(?!\n|$)/g, `$&${o}`)), f && (f = f.replace(/\n+/g, `$&${o}`)), t && (l += " #" + t.replace(/ ?[\r\n]+/g, " "), s && s()), !n) return `${l}${a}
2770
+ ${o}${m}`;
2771
+ if (c) return n = n.replace(/\n+/g, `$&${o}`), `${l}
2772
+ ${o}${f}${n}${m}`;
2773
+ n = n.replace(/\n+/g, `
2774
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${o}`);
2775
+ let g = Yt(`${f}${n}${m}`, o, xn, be.fold);
2776
+ return `${l}
2777
+ ${o}${g}`;
2778
+ }
2779
+ function Mo(t, e, n, r) {
2780
+ let { comment: s, type: i, value: o } = t, { actualString: a, implicitKey: c, indent: l, inFlow: f } = e;
2781
+ if (c && /[\n[\]{},]/.test(o) || f && /[[\]{},]/.test(o)) return Se(o, e);
2782
+ if (!o || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o)) return c || f || o.indexOf(`
2783
+ `) === -1 ? o.indexOf('"') !== -1 && o.indexOf("'") === -1 ? es(o, e) : Se(o, e) : Dt(t, e, n, r);
2784
+ if (!c && !f && i !== p.Type.PLAIN && o.indexOf(`
2785
+ `) !== -1) return Dt(t, e, n, r);
2786
+ if (l === "" && Bt(o)) return e.forceBlockIndent = !0, Dt(t, e, n, r);
2787
+ let m = o.replace(/\n+/g, `$&
2788
+ ${l}`);
2789
+ if (a) {
2790
+ let { tags: y } = e.doc.schema;
2791
+ if (typeof Rn(m, y, y.scalarFallback).value != "string") return Se(o, e);
2792
+ }
2793
+ let g = c ? m : Yt(m, l, Zr, Dn(e));
2794
+ return s && !f && (g.indexOf(`
2795
+ `) !== -1 || s.indexOf(`
2796
+ `) !== -1) ? (n && n(), bo(g, l, s)) : g;
2797
+ }
2798
+ function ko(t, e, n, r) {
2799
+ let { defaultType: s } = be, { implicitKey: i, inFlow: o } = e, { type: a, value: c } = t;
2800
+ typeof c != "string" && (c = String(c), t = Object.assign({}, t, { value: c }));
2801
+ let l = (m) => {
2802
+ switch (m) {
2803
+ case p.Type.BLOCK_FOLDED:
2804
+ case p.Type.BLOCK_LITERAL:
2805
+ return Dt(t, e, n, r);
2806
+ case p.Type.QUOTE_DOUBLE:
2807
+ return Se(c, e);
2808
+ case p.Type.QUOTE_SINGLE:
2809
+ return es(c, e);
2810
+ case p.Type.PLAIN:
2811
+ return Mo(t, e, n, r);
2812
+ default:
2813
+ return null;
2814
+ }
2815
+ };
2816
+ (a !== p.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c) || (i || o) && (a === p.Type.BLOCK_FOLDED || a === p.Type.BLOCK_LITERAL)) && (a = p.Type.QUOTE_DOUBLE);
2817
+ let f = l(a);
2818
+ if (f === null && (f = l(s), f === null)) throw new Error(`Unsupported default string type ${s}`);
2819
+ return f;
2820
+ }
2821
+ function Po({ format: t, minFractionDigits: e, tag: n, value: r }) {
2822
+ if (typeof r == "bigint") return String(r);
2823
+ if (!isFinite(r)) return isNaN(r) ? ".nan" : r < 0 ? "-.inf" : ".inf";
2824
+ let s = JSON.stringify(r);
2825
+ if (!t && e && (!n || n === "tag:yaml.org,2002:float") && /^\d/.test(s)) {
2826
+ let i = s.indexOf(".");
2827
+ i < 0 && (i = s.length, s += ".");
2828
+ let o = e - (s.length - i - 1);
2829
+ for (; o-- > 0; ) s += "0";
2830
+ }
2831
+ return s;
2832
+ }
2833
+ function ts(t, e) {
2834
+ let n, r;
2835
+ switch (e.type) {
2836
+ case p.Type.FLOW_MAP:
2837
+ n = "}", r = "flow map";
2838
+ break;
2839
+ case p.Type.FLOW_SEQ:
2840
+ n = "]", r = "flow sequence";
2841
+ break;
2842
+ default:
2843
+ t.push(new p.YAMLSemanticError(e, "Not a flow collection!?"));
2844
+ return;
2845
+ }
2846
+ let s;
2847
+ for (let i = e.items.length - 1; i >= 0; --i) {
2848
+ let o = e.items[i];
2849
+ if (!o || o.type !== p.Type.COMMENT) {
2850
+ s = o;
2851
+ break;
2852
+ }
2853
+ }
2854
+ if (s && s.char !== n) {
2855
+ let i = `Expected ${r} to end with ${n}`, o;
2856
+ typeof s.offset == "number" ? (o = new p.YAMLSemanticError(e, i), o.offset = s.offset + 1) : (o = new p.YAMLSemanticError(s, i), s.range && s.range.end && (o.offset = s.range.end - s.range.start)), t.push(o);
2857
+ }
2858
+ }
2859
+ function ns(t, e) {
2860
+ let n = e.context.src[e.range.start - 1];
2861
+ if (n !== `
2862
+ ` && n !== " " && n !== " ") {
2863
+ let r = "Comments must be separated from other tokens by white space characters";
2864
+ t.push(new p.YAMLSemanticError(e, r));
2865
+ }
2866
+ }
2867
+ function rs(t, e) {
2868
+ let n = String(e), r = n.substr(0, 8) + "..." + n.substr(-8);
2869
+ return new p.YAMLSemanticError(t, `The "${r}" key is too long`);
2870
+ }
2871
+ function ss(t, e) {
2872
+ for (let { afterKey: n, before: r, comment: s } of e) {
2873
+ let i = t.items[r];
2874
+ i ? (n && i.value && (i = i.value), s === void 0 ? (n || !i.commentBefore) && (i.spaceBefore = !0) : i.commentBefore ? i.commentBefore += `
2875
+ ` + s : i.commentBefore = s) : s !== void 0 && (t.comment ? t.comment += `
2876
+ ` + s : t.comment = s);
2877
+ }
2878
+ }
2879
+ function $n(t, e) {
2880
+ let n = e.strValue;
2881
+ return n ? typeof n == "string" ? n : (n.errors.forEach((r) => {
2882
+ r.source || (r.source = e), t.errors.push(r);
2883
+ }), n.str) : "";
2884
+ }
2885
+ function vo(t, e) {
2886
+ let { handle: n, suffix: r } = e.tag, s = t.tagPrefixes.find((i) => i.handle === n);
2887
+ if (!s) {
2888
+ let i = t.getDefaults().tagPrefixes;
2889
+ if (i && (s = i.find((o) => o.handle === n)), !s) throw new p.YAMLSemanticError(e, `The ${n} tag handle is non-default and was not declared.`);
2890
+ }
2891
+ if (!r) throw new p.YAMLSemanticError(e, `The ${n} tag has no suffix.`);
2892
+ if (n === "!" && (t.version || t.options.version) === "1.0") {
2893
+ if (r[0] === "^") return t.warnings.push(new p.YAMLWarning(e, "YAML 1.0 ^ tag expansion is not supported")), r;
2894
+ if (/[:/]/.test(r)) {
2895
+ let i = r.match(/^([a-z0-9-]+)\/(.*)/i);
2896
+ return i ? `tag:${i[1]}.yaml.org,2002:${i[2]}` : `tag:${r}`;
2897
+ }
2898
+ }
2899
+ return s.prefix + decodeURIComponent(r);
2900
+ }
2901
+ function Io(t, e) {
2902
+ let { tag: n, type: r } = e, s = !1;
2903
+ if (n) {
2904
+ let { handle: i, suffix: o, verbatim: a } = n;
2905
+ if (a) {
2906
+ if (a !== "!" && a !== "!!") return a;
2907
+ let c = `Verbatim tags aren't resolved, so ${a} is invalid.`;
2908
+ t.errors.push(new p.YAMLSemanticError(e, c));
2909
+ } else if (i === "!" && !o) s = !0;
2910
+ else try {
2911
+ return vo(t, e);
2912
+ } catch (c) {
2913
+ t.errors.push(c);
2914
+ }
2915
+ }
2916
+ switch (r) {
2917
+ case p.Type.BLOCK_FOLDED:
2918
+ case p.Type.BLOCK_LITERAL:
2919
+ case p.Type.QUOTE_DOUBLE:
2920
+ case p.Type.QUOTE_SINGLE:
2921
+ return p.defaultTags.STR;
2922
+ case p.Type.FLOW_MAP:
2923
+ case p.Type.MAP:
2924
+ return p.defaultTags.MAP;
2925
+ case p.Type.FLOW_SEQ:
2926
+ case p.Type.SEQ:
2927
+ return p.defaultTags.SEQ;
2928
+ case p.Type.PLAIN:
2929
+ return s ? p.defaultTags.STR : null;
2930
+ default:
2931
+ return null;
2932
+ }
2933
+ }
2934
+ function Jr(t, e, n) {
2935
+ let { tags: r } = t.schema, s = [];
2936
+ for (let o of r) if (o.tag === n) if (o.test) s.push(o);
2937
+ else {
2938
+ let a = o.resolve(t, e);
2939
+ return a instanceof Q ? a : new x(a);
2940
+ }
2941
+ let i = $n(t, e);
2942
+ return typeof i == "string" && s.length > 0 ? Rn(i, s, r.scalarFallback) : null;
2943
+ }
2944
+ function _o({ type: t }) {
2945
+ switch (t) {
2946
+ case p.Type.FLOW_MAP:
2947
+ case p.Type.MAP:
2948
+ return p.defaultTags.MAP;
2949
+ case p.Type.FLOW_SEQ:
2950
+ case p.Type.SEQ:
2951
+ return p.defaultTags.SEQ;
2952
+ default:
2953
+ return p.defaultTags.STR;
2954
+ }
2955
+ }
2956
+ function xo(t, e, n) {
2957
+ try {
2958
+ let r = Jr(t, e, n);
2959
+ if (r) return n && e.tag && (r.tag = n), r;
2960
+ } catch (r) {
2961
+ return r.source || (r.source = e), t.errors.push(r), null;
2962
+ }
2963
+ try {
2964
+ let r = _o(e);
2965
+ if (!r) throw new Error(`The tag ${n} is unavailable`);
2966
+ let s = `The tag ${n} is unavailable, falling back to ${r}`;
2967
+ t.warnings.push(new p.YAMLWarning(e, s));
2968
+ let i = Jr(t, e, r);
2969
+ return i.tag = n, i;
2970
+ } catch (r) {
2971
+ let s = new p.YAMLReferenceError(e, r.message);
2972
+ return s.stack = r.stack, t.errors.push(s), null;
2973
+ }
2974
+ }
2975
+ var Ro = (t) => {
2976
+ if (!t) return !1;
2977
+ let { type: e } = t;
2978
+ return e === p.Type.MAP_KEY || e === p.Type.MAP_VALUE || e === p.Type.SEQ_ITEM;
2979
+ };
2980
+ function Do(t, e) {
2981
+ let n = { before: [], after: [] }, r = !1, s = !1, i = Ro(e.context.parent) ? e.context.parent.props.concat(e.props) : e.props;
2982
+ for (let { start: o, end: a } of i) switch (e.context.src[o]) {
2983
+ case p.Char.COMMENT: {
2984
+ if (!e.commentHasRequiredWhitespace(o)) {
2985
+ let m = "Comments must be separated from other tokens by white space characters";
2986
+ t.push(new p.YAMLSemanticError(e, m));
2987
+ }
2988
+ let { header: c, valueRange: l } = e;
2989
+ (l && (o > l.start || c && o > c.start) ? n.after : n.before).push(e.context.src.slice(o + 1, a));
2990
+ break;
2991
+ }
2992
+ case p.Char.ANCHOR:
2993
+ if (r) {
2994
+ let c = "A node can have at most one anchor";
2995
+ t.push(new p.YAMLSemanticError(e, c));
2996
+ }
2997
+ r = !0;
2998
+ break;
2999
+ case p.Char.TAG:
3000
+ if (s) {
3001
+ let c = "A node can have at most one tag";
3002
+ t.push(new p.YAMLSemanticError(e, c));
3003
+ }
3004
+ s = !0;
3005
+ break;
3006
+ }
3007
+ return { comments: n, hasAnchor: r, hasTag: s };
3008
+ }
3009
+ function $o(t, e) {
3010
+ let { anchors: n, errors: r, schema: s } = t;
3011
+ if (e.type === p.Type.ALIAS) {
3012
+ let o = e.rawValue, a = n.getNode(o);
3013
+ if (!a) {
3014
+ let l = `Aliased anchor not found: ${o}`;
3015
+ return r.push(new p.YAMLReferenceError(e, l)), null;
3016
+ }
3017
+ let c = new we(a);
3018
+ return n._cstAliases.push(c), c;
3019
+ }
3020
+ let i = Io(t, e);
3021
+ if (i) return xo(t, e, i);
3022
+ if (e.type !== p.Type.PLAIN) {
3023
+ let o = `Failed to resolve ${e.type} node here`;
3024
+ return r.push(new p.YAMLSyntaxError(e, o)), null;
3025
+ }
3026
+ try {
3027
+ let o = $n(t, e);
3028
+ return Rn(o, s.tags, s.tags.scalarFallback);
3029
+ } catch (o) {
3030
+ return o.source || (o.source = e), r.push(o), null;
3031
+ }
3032
+ }
3033
+ function pe(t, e) {
3034
+ if (!e) return null;
3035
+ e.error && t.errors.push(e.error);
3036
+ let { comments: n, hasAnchor: r, hasTag: s } = Do(t.errors, e);
3037
+ if (r) {
3038
+ let { anchors: o } = t, a = e.anchor, c = o.getNode(a);
3039
+ c && (o.map[o.newName(a)] = c), o.map[a] = e;
3040
+ }
3041
+ if (e.type === p.Type.ALIAS && (r || s)) {
3042
+ let o = "An alias node must not specify any properties";
3043
+ t.errors.push(new p.YAMLSemanticError(e, o));
3044
+ }
3045
+ let i = $o(t, e);
3046
+ if (i) {
3047
+ i.range = [e.range.start, e.range.end], t.options.keepCstNodes && (i.cstNode = e), t.options.keepNodeTypes && (i.type = e.type);
3048
+ let o = n.before.join(`
3049
+ `);
3050
+ o && (i.commentBefore = i.commentBefore ? `${i.commentBefore}
3051
+ ${o}` : o);
3052
+ let a = n.after.join(`
3053
+ `);
3054
+ a && (i.comment = i.comment ? `${i.comment}
3055
+ ${a}` : a);
3056
+ }
3057
+ return e.resolved = i;
3058
+ }
3059
+ function Yo(t, e) {
3060
+ if (e.type !== p.Type.MAP && e.type !== p.Type.FLOW_MAP) {
3061
+ let o = `A ${e.type} node cannot be resolved as a mapping`;
3062
+ return t.errors.push(new p.YAMLSyntaxError(e, o)), null;
3063
+ }
3064
+ let { comments: n, items: r } = e.type === p.Type.FLOW_MAP ? Uo(t, e) : qo(t, e), s = new ct();
3065
+ s.items = r, ss(s, n);
3066
+ let i = !1;
3067
+ for (let o = 0; o < r.length; ++o) {
3068
+ let { key: a } = r[o];
3069
+ if (a instanceof Q && (i = !0), t.schema.merge && a && a.value === zr) {
3070
+ r[o] = new $t(r[o]);
3071
+ let c = r[o].value.items, l = null;
3072
+ c.some((f) => {
3073
+ if (f instanceof we) {
3074
+ let { type: m } = f.source;
3075
+ return m === p.Type.MAP || m === p.Type.FLOW_MAP ? !1 : l = "Merge nodes aliases can only point to maps";
3076
+ }
3077
+ return l = "Merge nodes can only have Alias nodes as values";
3078
+ }), l && t.errors.push(new p.YAMLSemanticError(e, l));
3079
+ } else for (let c = o + 1; c < r.length; ++c) {
3080
+ let { key: l } = r[c];
3081
+ if (a === l || a && l && Object.prototype.hasOwnProperty.call(a, "value") && a.value === l.value) {
3082
+ let f = `Map keys must be unique; "${a}" is repeated`;
3083
+ t.errors.push(new p.YAMLSemanticError(e, f));
3084
+ break;
3085
+ }
3086
+ }
3087
+ }
3088
+ if (i && !t.options.mapAsMap) {
3089
+ let o = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
3090
+ t.warnings.push(new p.YAMLWarning(e, o));
3091
+ }
3092
+ return e.resolved = s, s;
3093
+ }
3094
+ var Bo = ({ context: { lineStart: t, node: e, src: n }, props: r }) => {
3095
+ if (r.length === 0) return !1;
3096
+ let { start: s } = r[0];
3097
+ if (e && s > e.valueRange.start || n[s] !== p.Char.COMMENT) return !1;
3098
+ for (let i = t; i < s; ++i) if (n[i] === `
3099
+ `) return !1;
3100
+ return !0;
3101
+ };
3102
+ function Fo(t, e) {
3103
+ if (!Bo(t)) return;
3104
+ let n = t.getPropValue(0, p.Char.COMMENT, !0), r = !1, s = e.value.commentBefore;
3105
+ if (s && s.startsWith(n)) e.value.commentBefore = s.substr(n.length + 1), r = !0;
3106
+ else {
3107
+ let i = e.value.comment;
3108
+ !t.node && i && i.startsWith(n) && (e.value.comment = i.substr(n.length + 1), r = !0);
3109
+ }
3110
+ r && (e.comment = n);
3111
+ }
3112
+ function qo(t, e) {
3113
+ let n = [], r = [], s, i = null;
3114
+ for (let o = 0; o < e.items.length; ++o) {
3115
+ let a = e.items[o];
3116
+ switch (a.type) {
3117
+ case p.Type.BLANK_LINE:
3118
+ n.push({ afterKey: !!s, before: r.length });
3119
+ break;
3120
+ case p.Type.COMMENT:
3121
+ n.push({ afterKey: !!s, before: r.length, comment: a.comment });
3122
+ break;
3123
+ case p.Type.MAP_KEY:
3124
+ s !== void 0 && r.push(new T(s)), a.error && t.errors.push(a.error), s = pe(t, a.node), i = null;
3125
+ break;
3126
+ case p.Type.MAP_VALUE:
3127
+ {
3128
+ if (s === void 0 && (s = null), a.error && t.errors.push(a.error), !a.context.atLineStart && a.node && a.node.type === p.Type.MAP && !a.node.context.atLineStart) {
3129
+ let f = "Nested mappings are not allowed in compact mappings";
3130
+ t.errors.push(new p.YAMLSemanticError(a.node, f));
3131
+ }
3132
+ let c = a.node;
3133
+ if (!c && a.props.length > 0) {
3134
+ c = new p.PlainValue(p.Type.PLAIN, []), c.context = { parent: a, src: a.context.src };
3135
+ let f = a.range.start + 1;
3136
+ if (c.range = { start: f, end: f }, c.valueRange = { start: f, end: f }, typeof a.range.origStart == "number") {
3137
+ let m = a.range.origStart + 1;
3138
+ c.range.origStart = c.range.origEnd = m, c.valueRange.origStart = c.valueRange.origEnd = m;
3139
+ }
3140
+ }
3141
+ let l = new T(s, pe(t, c));
3142
+ Fo(a, l), r.push(l), s && typeof i == "number" && a.range.start > i + 1024 && t.errors.push(rs(e, s)), s = void 0, i = null;
3143
+ }
3144
+ break;
3145
+ default:
3146
+ s !== void 0 && r.push(new T(s)), s = pe(t, a), i = a.range.start, a.error && t.errors.push(a.error);
3147
+ e: for (let c = o + 1; ; ++c) {
3148
+ let l = e.items[c];
3149
+ switch (l && l.type) {
3150
+ case p.Type.BLANK_LINE:
3151
+ case p.Type.COMMENT:
3152
+ continue e;
3153
+ case p.Type.MAP_VALUE:
3154
+ break e;
3155
+ default: {
3156
+ let f = "Implicit map keys need to be followed by map values";
3157
+ t.errors.push(new p.YAMLSemanticError(a, f));
3158
+ break e;
3159
+ }
3160
+ }
3161
+ }
3162
+ if (a.valueRangeContainsNewline) {
3163
+ let c = "Implicit map keys need to be on a single line";
3164
+ t.errors.push(new p.YAMLSemanticError(a, c));
3165
+ }
3166
+ }
3167
+ }
3168
+ return s !== void 0 && r.push(new T(s)), { comments: n, items: r };
3169
+ }
3170
+ function Uo(t, e) {
3171
+ let n = [], r = [], s, i = !1, o = "{";
3172
+ for (let a = 0; a < e.items.length; ++a) {
3173
+ let c = e.items[a];
3174
+ if (typeof c.char == "string") {
3175
+ let { char: l, offset: f } = c;
3176
+ if (l === "?" && s === void 0 && !i) {
3177
+ i = !0, o = ":";
3178
+ continue;
3179
+ }
3180
+ if (l === ":") {
3181
+ if (s === void 0 && (s = null), o === ":") {
3182
+ o = ",";
3183
+ continue;
3184
+ }
3185
+ } else if (i && (s === void 0 && l !== "," && (s = null), i = !1), s !== void 0 && (r.push(new T(s)), s = void 0, l === ",")) {
3186
+ o = ":";
3187
+ continue;
3188
+ }
3189
+ if (l === "}") {
3190
+ if (a === e.items.length - 1) continue;
3191
+ } else if (l === o) {
3192
+ o = ":";
3193
+ continue;
3194
+ }
3195
+ let m = `Flow map contains an unexpected ${l}`, g = new p.YAMLSyntaxError(e, m);
3196
+ g.offset = f, t.errors.push(g);
3197
+ } else c.type === p.Type.BLANK_LINE ? n.push({ afterKey: !!s, before: r.length }) : c.type === p.Type.COMMENT ? (ns(t.errors, c), n.push({ afterKey: !!s, before: r.length, comment: c.comment })) : s === void 0 ? (o === "," && t.errors.push(new p.YAMLSemanticError(c, "Separator , missing in flow map")), s = pe(t, c)) : (o !== "," && t.errors.push(new p.YAMLSemanticError(c, "Indicator : missing in flow map entry")), r.push(new T(s, pe(t, c))), s = void 0, i = !1);
3198
+ }
3199
+ return ts(t.errors, e), s !== void 0 && r.push(new T(s)), { comments: n, items: r };
3200
+ }
3201
+ function Vo(t, e) {
3202
+ if (e.type !== p.Type.SEQ && e.type !== p.Type.FLOW_SEQ) {
3203
+ let i = `A ${e.type} node cannot be resolved as a sequence`;
3204
+ return t.errors.push(new p.YAMLSyntaxError(e, i)), null;
3205
+ }
3206
+ let { comments: n, items: r } = e.type === p.Type.FLOW_SEQ ? Ko(t, e) : Wo(t, e), s = new ue();
3207
+ if (s.items = r, ss(s, n), !t.options.mapAsMap && r.some((i) => i instanceof T && i.key instanceof Q)) {
3208
+ let i = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
3209
+ t.warnings.push(new p.YAMLWarning(e, i));
3210
+ }
3211
+ return e.resolved = s, s;
3212
+ }
3213
+ function Wo(t, e) {
3214
+ let n = [], r = [];
3215
+ for (let s = 0; s < e.items.length; ++s) {
3216
+ let i = e.items[s];
3217
+ switch (i.type) {
3218
+ case p.Type.BLANK_LINE:
3219
+ n.push({ before: r.length });
3220
+ break;
3221
+ case p.Type.COMMENT:
3222
+ n.push({ comment: i.comment, before: r.length });
3223
+ break;
3224
+ case p.Type.SEQ_ITEM:
3225
+ if (i.error && t.errors.push(i.error), r.push(pe(t, i.node)), i.hasProps) {
3226
+ let o = "Sequence items cannot have tags or anchors before the - indicator";
3227
+ t.errors.push(new p.YAMLSemanticError(i, o));
3228
+ }
3229
+ break;
3230
+ default:
3231
+ i.error && t.errors.push(i.error), t.errors.push(new p.YAMLSyntaxError(i, `Unexpected ${i.type} node in sequence`));
3232
+ }
3233
+ }
3234
+ return { comments: n, items: r };
3235
+ }
3236
+ function Ko(t, e) {
3237
+ let n = [], r = [], s = !1, i, o = null, a = "[", c = null;
3238
+ for (let l = 0; l < e.items.length; ++l) {
3239
+ let f = e.items[l];
3240
+ if (typeof f.char == "string") {
3241
+ let { char: m, offset: g } = f;
3242
+ if (m !== ":" && (s || i !== void 0) && (s && i === void 0 && (i = a ? r.pop() : null), r.push(new T(i)), s = !1, i = void 0, o = null), m === a) a = null;
3243
+ else if (!a && m === "?") s = !0;
3244
+ else if (a !== "[" && m === ":" && i === void 0) {
3245
+ if (a === ",") {
3246
+ if (i = r.pop(), i instanceof T) {
3247
+ let y = "Chaining flow sequence pairs is invalid", h = new p.YAMLSemanticError(e, y);
3248
+ h.offset = g, t.errors.push(h);
3249
+ }
3250
+ if (!s && typeof o == "number") {
3251
+ let y = f.range ? f.range.start : f.offset;
3252
+ y > o + 1024 && t.errors.push(rs(e, i));
3253
+ let { src: h } = c.context;
3254
+ for (let d = o; d < y; ++d) if (h[d] === `
3255
+ `) {
3256
+ let w = "Implicit keys of flow sequence pairs need to be on a single line";
3257
+ t.errors.push(new p.YAMLSemanticError(c, w));
3258
+ break;
3259
+ }
3260
+ }
3261
+ } else i = null;
3262
+ o = null, s = !1, a = null;
3263
+ } else if (a === "[" || m !== "]" || l < e.items.length - 1) {
3264
+ let y = `Flow sequence contains an unexpected ${m}`, h = new p.YAMLSyntaxError(e, y);
3265
+ h.offset = g, t.errors.push(h);
3266
+ }
3267
+ } else if (f.type === p.Type.BLANK_LINE) n.push({ before: r.length });
3268
+ else if (f.type === p.Type.COMMENT) ns(t.errors, f), n.push({ comment: f.comment, before: r.length });
3269
+ else {
3270
+ if (a) {
3271
+ let g = `Expected a ${a} in flow sequence`;
3272
+ t.errors.push(new p.YAMLSemanticError(f, g));
3273
+ }
3274
+ let m = pe(t, f);
3275
+ i === void 0 ? (r.push(m), c = f) : (r.push(new T(i, m)), i = void 0), o = f.range.start, a = ",";
3276
+ }
3277
+ }
3278
+ return ts(t.errors, e), i !== void 0 && r.push(new T(i)), { comments: n, items: r };
3279
+ }
3280
+ M.Alias = we, M.Collection = Q, M.Merge = $t, M.Node = j, M.Pair = T, M.Scalar = x, M.YAMLMap = ct, M.YAMLSeq = ue, M.addComment = Re, M.binaryOptions = Oo, M.boolOptions = Ao, M.findPair = at, M.intOptions = Lo, M.isEmptyPath = Xr, M.nullOptions = To, M.resolveMap = Yo, M.resolveNode = pe, M.resolveSeq = Vo, M.resolveString = $n, M.strOptions = be, M.stringifyNumber = Po, M.stringifyString = ko, M.toJSON = fe;
3281
+ }), qn = ne((ee) => {
3282
+ "use strict";
3283
+ var G = ce(), O = De(), jo = { identify: (t) => t instanceof Uint8Array, default: !1, tag: "tag:yaml.org,2002:binary", resolve: (t, e) => {
3284
+ let n = O.resolveString(t, e);
3285
+ if (typeof Buffer == "function") return Buffer.from(n, "base64");
3286
+ if (typeof atob == "function") {
3287
+ let r = atob(n.replace(/[\n\r]/g, "")), s = new Uint8Array(r.length);
3288
+ for (let i = 0; i < r.length; ++i) s[i] = r.charCodeAt(i);
3289
+ return s;
3290
+ } else {
3291
+ let r = "This environment does not support reading binary tags; either Buffer or atob is required";
3292
+ return t.errors.push(new G.YAMLReferenceError(e, r)), null;
3293
+ }
3294
+ }, options: O.binaryOptions, stringify: ({ comment: t, type: e, value: n }, r, s, i) => {
3295
+ let o;
3296
+ if (typeof Buffer == "function") o = n instanceof Buffer ? n.toString("base64") : Buffer.from(n.buffer).toString("base64");
3297
+ else if (typeof btoa == "function") {
3298
+ let a = "";
3299
+ for (let c = 0; c < n.length; ++c) a += String.fromCharCode(n[c]);
3300
+ o = btoa(a);
3301
+ } else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
3302
+ if (e || (e = O.binaryOptions.defaultType), e === G.Type.QUOTE_DOUBLE) n = o;
3303
+ else {
3304
+ let { lineWidth: a } = O.binaryOptions, c = Math.ceil(o.length / a), l = new Array(c);
3305
+ for (let f = 0, m = 0; f < c; ++f, m += a) l[f] = o.substr(m, a);
3306
+ n = l.join(e === G.Type.BLOCK_LITERAL ? `
3307
+ ` : " ");
3308
+ }
3309
+ return O.stringifyString({ comment: t, type: e, value: n }, r, s, i);
3310
+ } };
3311
+ function os(t, e) {
3312
+ let n = O.resolveSeq(t, e);
3313
+ for (let r = 0; r < n.items.length; ++r) {
3314
+ let s = n.items[r];
3315
+ if (!(s instanceof O.Pair)) {
3316
+ if (s instanceof O.YAMLMap) {
3317
+ if (s.items.length > 1) {
3318
+ let o = "Each pair must have its own sequence indicator";
3319
+ throw new G.YAMLSemanticError(e, o);
3320
+ }
3321
+ let i = s.items[0] || new O.Pair();
3322
+ s.commentBefore && (i.commentBefore = i.commentBefore ? `${s.commentBefore}
3323
+ ${i.commentBefore}` : s.commentBefore), s.comment && (i.comment = i.comment ? `${s.comment}
3324
+ ${i.comment}` : s.comment), s = i;
3325
+ }
3326
+ n.items[r] = s instanceof O.Pair ? s : new O.Pair(s);
3327
+ }
3328
+ }
3329
+ return n;
3330
+ }
3331
+ function as(t, e, n) {
3332
+ let r = new O.YAMLSeq(t);
3333
+ r.tag = "tag:yaml.org,2002:pairs";
3334
+ for (let s of e) {
3335
+ let i, o;
3336
+ if (Array.isArray(s)) if (s.length === 2) i = s[0], o = s[1];
3337
+ else throw new TypeError(`Expected [key, value] tuple: ${s}`);
3338
+ else if (s && s instanceof Object) {
3339
+ let c = Object.keys(s);
3340
+ if (c.length === 1) i = c[0], o = s[i];
3341
+ else throw new TypeError(`Expected { key: value } tuple: ${s}`);
3342
+ } else i = s;
3343
+ let a = t.createPair(i, o, n);
3344
+ r.items.push(a);
3345
+ }
3346
+ return r;
3347
+ }
3348
+ var Qo = { default: !1, tag: "tag:yaml.org,2002:pairs", resolve: os, createNode: as }, $e = class t extends O.YAMLSeq {
3349
+ constructor() {
3350
+ super(), G._defineProperty(this, "add", O.YAMLMap.prototype.add.bind(this)), G._defineProperty(this, "delete", O.YAMLMap.prototype.delete.bind(this)), G._defineProperty(this, "get", O.YAMLMap.prototype.get.bind(this)), G._defineProperty(this, "has", O.YAMLMap.prototype.has.bind(this)), G._defineProperty(this, "set", O.YAMLMap.prototype.set.bind(this)), this.tag = t.tag;
3351
+ }
3352
+ toJSON(e, n) {
3353
+ let r = /* @__PURE__ */ new Map();
3354
+ n && n.onCreate && n.onCreate(r);
3355
+ for (let s of this.items) {
3356
+ let i, o;
3357
+ if (s instanceof O.Pair ? (i = O.toJSON(s.key, "", n), o = O.toJSON(s.value, i, n)) : i = O.toJSON(s, "", n), r.has(i)) throw new Error("Ordered maps must not include duplicate keys");
3358
+ r.set(i, o);
3359
+ }
3360
+ return r;
3361
+ }
3362
+ };
3363
+ G._defineProperty($e, "tag", "tag:yaml.org,2002:omap");
3364
+ function Go(t, e) {
3365
+ let n = os(t, e), r = [];
3366
+ for (let { key: s } of n.items) if (s instanceof O.Scalar) if (r.includes(s.value)) {
3367
+ let i = "Ordered maps must not include duplicate keys";
3368
+ throw new G.YAMLSemanticError(e, i);
3369
+ } else r.push(s.value);
3370
+ return Object.assign(new $e(), n);
3371
+ }
3372
+ function Ho(t, e, n) {
3373
+ let r = as(t, e, n), s = new $e();
3374
+ return s.items = r.items, s;
3375
+ }
3376
+ var Jo = { identify: (t) => t instanceof Map, nodeClass: $e, default: !1, tag: "tag:yaml.org,2002:omap", resolve: Go, createNode: Ho }, Ye = class t extends O.YAMLMap {
3377
+ constructor() {
3378
+ super(), this.tag = t.tag;
3379
+ }
3380
+ add(e) {
3381
+ let n = e instanceof O.Pair ? e : new O.Pair(e);
3382
+ O.findPair(this.items, n.key) || this.items.push(n);
3383
+ }
3384
+ get(e, n) {
3385
+ let r = O.findPair(this.items, e);
3386
+ return !n && r instanceof O.Pair ? r.key instanceof O.Scalar ? r.key.value : r.key : r;
3387
+ }
3388
+ set(e, n) {
3389
+ if (typeof n != "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);
3390
+ let r = O.findPair(this.items, e);
3391
+ r && !n ? this.items.splice(this.items.indexOf(r), 1) : !r && n && this.items.push(new O.Pair(e));
3392
+ }
3393
+ toJSON(e, n) {
3394
+ return super.toJSON(e, n, Set);
3395
+ }
3396
+ toString(e, n, r) {
3397
+ if (!e) return JSON.stringify(this);
3398
+ if (this.hasAllNullValues()) return super.toString(e, n, r);
3399
+ throw new Error("Set items must all have null values");
3400
+ }
3401
+ };
3402
+ G._defineProperty(Ye, "tag", "tag:yaml.org,2002:set");
3403
+ function Xo(t, e) {
3404
+ let n = O.resolveMap(t, e);
3405
+ if (!n.hasAllNullValues()) throw new G.YAMLSemanticError(e, "Set items must all have null values");
3406
+ return Object.assign(new Ye(), n);
3407
+ }
3408
+ function zo(t, e, n) {
3409
+ let r = new Ye();
3410
+ for (let s of e) r.items.push(t.createPair(s, null, n));
3411
+ return r;
3412
+ }
3413
+ var Zo = { identify: (t) => t instanceof Set, nodeClass: Ye, default: !1, tag: "tag:yaml.org,2002:set", resolve: Xo, createNode: zo }, Yn = (t, e) => {
3414
+ let n = e.split(":").reduce((r, s) => r * 60 + Number(s), 0);
3415
+ return t === "-" ? -n : n;
3416
+ }, cs = ({ value: t }) => {
3417
+ if (isNaN(t) || !isFinite(t)) return O.stringifyNumber(t);
3418
+ let e = "";
3419
+ t < 0 && (e = "-", t = Math.abs(t));
3420
+ let n = [t % 60];
3421
+ return t < 60 ? n.unshift(0) : (t = Math.round((t - n[0]) / 60), n.unshift(t % 60), t >= 60 && (t = Math.round((t - n[0]) / 60), n.unshift(t))), e + n.map((r) => r < 10 ? "0" + String(r) : String(r)).join(":").replace(/000000\d*$/, "");
3422
+ }, ea = { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:int", format: "TIME", test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, resolve: (t, e, n) => Yn(e, n.replace(/_/g, "")), stringify: cs }, ta = { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", format: "TIME", test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, resolve: (t, e, n) => Yn(e, n.replace(/_/g, "")), stringify: cs }, na = { identify: (t) => t instanceof Date, default: !0, tag: "tag:yaml.org,2002:timestamp", 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})?))?)?)$"), resolve: (t, e, n, r, s, i, o, a, c) => {
3423
+ a && (a = (a + "00").substr(1, 3));
3424
+ let l = Date.UTC(e, n - 1, r, s || 0, i || 0, o || 0, a || 0);
3425
+ if (c && c !== "Z") {
3426
+ let f = Yn(c[0], c.slice(1));
3427
+ Math.abs(f) < 30 && (f *= 60), l -= 6e4 * f;
3428
+ }
3429
+ return new Date(l);
3430
+ }, stringify: ({ value: t }) => t.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") };
3431
+ function Bn(t) {
3432
+ let e = {};
3433
+ return t ? typeof YAML_SILENCE_DEPRECATION_WARNINGS < "u" ? !YAML_SILENCE_DEPRECATION_WARNINGS : !e.YAML_SILENCE_DEPRECATION_WARNINGS : typeof YAML_SILENCE_WARNINGS < "u" ? !YAML_SILENCE_WARNINGS : !e.YAML_SILENCE_WARNINGS;
3434
+ }
3435
+ function Fn(t, e) {
3436
+ Bn(!1) && console.warn(e ? `${e}: ${t}` : t);
3437
+ }
3438
+ function ra(t) {
3439
+ if (Bn(!0)) {
3440
+ let e = t.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/");
3441
+ Fn(`The endpoint 'yaml/${e}' will be removed in a future release.`, "DeprecationWarning");
3442
+ }
3443
+ }
3444
+ var is = {};
3445
+ function sa(t, e) {
3446
+ if (!is[t] && Bn(!0)) {
3447
+ is[t] = !0;
3448
+ let n = `The option '${t}' will be removed in a future release`;
3449
+ n += e ? `, use '${e}' instead.` : ".", Fn(n, "DeprecationWarning");
3450
+ }
3451
+ }
3452
+ ee.binary = jo, ee.floatTime = ta, ee.intTime = ea, ee.omap = Jo, ee.pairs = Qo, ee.set = Zo, ee.timestamp = na, ee.warn = Fn, ee.warnFileDeprecation = ra, ee.warnOptionDeprecation = sa;
3453
+ }), Kn = ne((bs) => {
3454
+ "use strict";
3455
+ var Ut = ce(), E = De(), $ = qn();
3456
+ function ia(t, e, n) {
3457
+ let r = new E.YAMLMap(t);
3458
+ if (e instanceof Map) for (let [s, i] of e) r.items.push(t.createPair(s, i, n));
3459
+ else if (e && typeof e == "object") for (let s of Object.keys(e)) r.items.push(t.createPair(s, e[s], n));
3460
+ return typeof t.sortMapEntries == "function" && r.items.sort(t.sortMapEntries), r;
3461
+ }
3462
+ var ft = { createNode: ia, default: !0, nodeClass: E.YAMLMap, tag: "tag:yaml.org,2002:map", resolve: E.resolveMap };
3463
+ function oa(t, e, n) {
3464
+ let r = new E.YAMLSeq(t);
3465
+ if (e && e[Symbol.iterator]) for (let s of e) {
3466
+ let i = t.createNode(s, n.wrapScalars, null, n);
3467
+ r.items.push(i);
3468
+ }
3469
+ return r;
3470
+ }
3471
+ var Vt = { createNode: oa, default: !0, nodeClass: E.YAMLSeq, tag: "tag:yaml.org,2002:seq", resolve: E.resolveSeq }, aa = { identify: (t) => typeof t == "string", default: !0, tag: "tag:yaml.org,2002:str", resolve: E.resolveString, stringify(t, e, n, r) {
3472
+ return e = Object.assign({ actualString: !0 }, e), E.stringifyString(t, e, n, r);
3473
+ }, options: E.strOptions }, Vn = [ft, Vt, aa], Wt = (t) => typeof t == "bigint" || Number.isInteger(t), Wn = (t, e, n) => E.intOptions.asBigInt ? BigInt(t) : parseInt(e, n);
3474
+ function us(t, e, n) {
3475
+ let { value: r } = t;
3476
+ return Wt(r) && r >= 0 ? n + r.toString(e) : E.stringifyNumber(t);
3477
+ }
3478
+ var ps = { identify: (t) => t == null, createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, default: !0, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => null, options: E.nullOptions, stringify: () => E.nullOptions.nullStr }, ms = { identify: (t) => typeof t == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, resolve: (t) => t[0] === "t" || t[0] === "T", options: E.boolOptions, stringify: ({ value: t }) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr }, hs = { identify: (t) => Wt(t) && t >= 0, default: !0, tag: "tag:yaml.org,2002:int", format: "OCT", test: /^0o([0-7]+)$/, resolve: (t, e) => Wn(t, e, 8), options: E.intOptions, stringify: (t) => us(t, 8, "0o") }, ds = { identify: Wt, default: !0, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9]+$/, resolve: (t) => Wn(t, t, 10), options: E.intOptions, stringify: E.stringifyNumber }, gs = { identify: (t) => Wt(t) && t >= 0, default: !0, tag: "tag:yaml.org,2002:int", format: "HEX", test: /^0x([0-9a-fA-F]+)$/, resolve: (t, e) => Wn(t, e, 16), options: E.intOptions, stringify: (t) => us(t, 16, "0x") }, ys = { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.inf|(\.nan))$/i, resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: E.stringifyNumber }, Es = { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, resolve: (t) => parseFloat(t), stringify: ({ value: t }) => Number(t).toExponential() }, Ss = { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, resolve(t, e, n) {
3479
+ let r = e || n, s = new E.Scalar(parseFloat(t));
3480
+ return r && r[r.length - 1] === "0" && (s.minFractionDigits = r.length), s;
3481
+ }, stringify: E.stringifyNumber }, ca = Vn.concat([ps, ms, hs, ds, gs, ys, Es, Ss]), ls = (t) => typeof t == "bigint" || Number.isInteger(t), Ft = ({ value: t }) => JSON.stringify(t), ws = [ft, Vt, { identify: (t) => typeof t == "string", default: !0, tag: "tag:yaml.org,2002:str", resolve: E.resolveString, stringify: Ft }, { identify: (t) => t == null, createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, default: !0, tag: "tag:yaml.org,2002:null", test: /^null$/, resolve: () => null, stringify: Ft }, { identify: (t) => typeof t == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^true|false$/, resolve: (t) => t === "true", stringify: Ft }, { identify: ls, default: !0, tag: "tag:yaml.org,2002:int", test: /^-?(?:0|[1-9][0-9]*)$/, resolve: (t) => E.intOptions.asBigInt ? BigInt(t) : parseInt(t, 10), stringify: ({ value: t }) => ls(t) ? t.toString() : JSON.stringify(t) }, { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, resolve: (t) => parseFloat(t), stringify: Ft }];
3482
+ ws.scalarFallback = (t) => {
3483
+ throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`);
3484
+ };
3485
+ var fs = ({ value: t }) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr, lt = (t) => typeof t == "bigint" || Number.isInteger(t);
3486
+ function qt(t, e, n) {
3487
+ let r = e.replace(/_/g, "");
3488
+ if (E.intOptions.asBigInt) {
3489
+ switch (n) {
3490
+ case 2:
3491
+ r = `0b${r}`;
3492
+ break;
3493
+ case 8:
3494
+ r = `0o${r}`;
3495
+ break;
3496
+ case 16:
3497
+ r = `0x${r}`;
3498
+ break;
3499
+ }
3500
+ let i = BigInt(r);
3501
+ return t === "-" ? BigInt(-1) * i : i;
3502
+ }
3503
+ let s = parseInt(r, n);
3504
+ return t === "-" ? -1 * s : s;
3505
+ }
3506
+ function Un(t, e, n) {
3507
+ let { value: r } = t;
3508
+ if (lt(r)) {
3509
+ let s = r.toString(e);
3510
+ return r < 0 ? "-" + n + s.substr(1) : n + s;
3511
+ }
3512
+ return E.stringifyNumber(t);
3513
+ }
3514
+ var la = Vn.concat([{ identify: (t) => t == null, createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, default: !0, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => null, options: E.nullOptions, stringify: () => E.nullOptions.nullStr }, { identify: (t) => typeof t == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, resolve: () => !0, options: E.boolOptions, stringify: fs }, { identify: (t) => typeof t == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, resolve: () => !1, options: E.boolOptions, stringify: fs }, { identify: lt, default: !0, tag: "tag:yaml.org,2002:int", format: "BIN", test: /^([-+]?)0b([0-1_]+)$/, resolve: (t, e, n) => qt(e, n, 2), stringify: (t) => Un(t, 2, "0b") }, { identify: lt, default: !0, tag: "tag:yaml.org,2002:int", format: "OCT", test: /^([-+]?)0([0-7_]+)$/, resolve: (t, e, n) => qt(e, n, 8), stringify: (t) => Un(t, 8, "0") }, { identify: lt, default: !0, tag: "tag:yaml.org,2002:int", test: /^([-+]?)([0-9][0-9_]*)$/, resolve: (t, e, n) => qt(e, n, 10), stringify: E.stringifyNumber }, { identify: lt, default: !0, tag: "tag:yaml.org,2002:int", format: "HEX", test: /^([-+]?)0x([0-9a-fA-F_]+)$/, resolve: (t, e, n) => qt(e, n, 16), stringify: (t) => Un(t, 16, "0x") }, { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.inf|(\.nan))$/i, resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: E.stringifyNumber }, { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, resolve: (t) => parseFloat(t.replace(/_/g, "")), stringify: ({ value: t }) => Number(t).toExponential() }, { identify: (t) => typeof t == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, resolve(t, e) {
3515
+ let n = new E.Scalar(parseFloat(t.replace(/_/g, "")));
3516
+ if (e) {
3517
+ let r = e.replace(/_/g, "");
3518
+ r[r.length - 1] === "0" && (n.minFractionDigits = r.length);
3519
+ }
3520
+ return n;
3521
+ }, stringify: E.stringifyNumber }], $.binary, $.omap, $.pairs, $.set, $.intTime, $.floatTime, $.timestamp), fa = { core: ca, failsafe: Vn, json: ws, yaml11: la }, ua = { binary: $.binary, bool: ms, float: Ss, floatExp: Es, floatNaN: ys, floatTime: $.floatTime, int: ds, intHex: gs, intOct: hs, intTime: $.intTime, map: ft, null: ps, omap: $.omap, pairs: $.pairs, seq: Vt, set: $.set, timestamp: $.timestamp };
3522
+ function pa(t, e, n) {
3523
+ if (e) {
3524
+ let r = n.filter((i) => i.tag === e), s = r.find((i) => !i.format) || r[0];
3525
+ if (!s) throw new Error(`Tag ${e} not found`);
3526
+ return s;
3527
+ }
3528
+ return n.find((r) => (r.identify && r.identify(t) || r.class && t instanceof r.class) && !r.format);
3529
+ }
3530
+ function ma(t, e, n) {
3531
+ if (t instanceof E.Node) return t;
3532
+ let { defaultPrefix: r, onTagObj: s, prevObjects: i, schema: o, wrapScalars: a } = n;
3533
+ e && e.startsWith("!!") && (e = r + e.slice(2));
3534
+ let c = pa(t, e, o.tags);
3535
+ if (!c) {
3536
+ if (typeof t.toJSON == "function" && (t = t.toJSON()), !t || typeof t != "object") return a ? new E.Scalar(t) : t;
3537
+ c = t instanceof Map ? ft : t[Symbol.iterator] ? Vt : ft;
3538
+ }
3539
+ s && (s(c), delete n.onTagObj);
3540
+ let l = { value: void 0, node: void 0 };
3541
+ if (t && typeof t == "object" && i) {
3542
+ let f = i.get(t);
3543
+ if (f) {
3544
+ let m = new E.Alias(f);
3545
+ return n.aliasNodes.push(m), m;
3546
+ }
3547
+ l.value = t, i.set(t, l);
3548
+ }
3549
+ return l.node = c.createNode ? c.createNode(n.schema, t, n) : a ? new E.Scalar(t) : t, e && l.node instanceof E.Node && (l.node.tag = e), l.node;
3550
+ }
3551
+ function ha(t, e, n, r) {
3552
+ let s = t[r.replace(/\W/g, "")];
3553
+ if (!s) {
3554
+ let i = Object.keys(t).map((o) => JSON.stringify(o)).join(", ");
3555
+ throw new Error(`Unknown schema "${r}"; use one of ${i}`);
3556
+ }
3557
+ if (Array.isArray(n)) for (let i of n) s = s.concat(i);
3558
+ else typeof n == "function" && (s = n(s.slice()));
3559
+ for (let i = 0; i < s.length; ++i) {
3560
+ let o = s[i];
3561
+ if (typeof o == "string") {
3562
+ let a = e[o];
3563
+ if (!a) {
3564
+ let c = Object.keys(e).map((l) => JSON.stringify(l)).join(", ");
3565
+ throw new Error(`Unknown custom tag "${o}"; use one of ${c}`);
3566
+ }
3567
+ s[i] = a;
3568
+ }
3569
+ }
3570
+ return s;
3571
+ }
3572
+ var da = (t, e) => t.key < e.key ? -1 : t.key > e.key ? 1 : 0, ut = class t {
3573
+ constructor({ customTags: e, merge: n, schema: r, sortMapEntries: s, tags: i }) {
3574
+ this.merge = !!n, this.name = r, this.sortMapEntries = s === !0 ? da : s || null, !e && i && $.warnOptionDeprecation("tags", "customTags"), this.tags = ha(fa, ua, e || i, r);
3575
+ }
3576
+ createNode(e, n, r, s) {
3577
+ let i = { defaultPrefix: t.defaultPrefix, schema: this, wrapScalars: n }, o = s ? Object.assign(s, i) : i;
3578
+ return ma(e, r, o);
3579
+ }
3580
+ createPair(e, n, r) {
3581
+ r || (r = { wrapScalars: !0 });
3582
+ let s = this.createNode(e, r.wrapScalars, null, r), i = this.createNode(n, r.wrapScalars, null, r);
3583
+ return new E.Pair(s, i);
3584
+ }
3585
+ };
3586
+ Ut._defineProperty(ut, "defaultPrefix", Ut.defaultTagPrefix), Ut._defineProperty(ut, "defaultTags", Ut.defaultTags), bs.Schema = ut;
3587
+ }), Ls = ne((Gt) => {
3588
+ "use strict";
3589
+ var Y = ce(), S = De(), Ns = Kn(), ga = { anchorPrefix: "a", customTags: null, indent: 2, indentSeq: !0, keepCstNodes: !1, keepNodeTypes: !0, keepBlobsInJSON: !0, mapAsMap: !1, maxAliasCount: 100, prettyErrors: !1, simpleKeys: !1, version: "1.2" }, ya = { get binary() {
3590
+ return S.binaryOptions;
3591
+ }, set binary(t) {
3592
+ Object.assign(S.binaryOptions, t);
3593
+ }, get bool() {
3594
+ return S.boolOptions;
3595
+ }, set bool(t) {
3596
+ Object.assign(S.boolOptions, t);
3597
+ }, get int() {
3598
+ return S.intOptions;
3599
+ }, set int(t) {
3600
+ Object.assign(S.intOptions, t);
3601
+ }, get null() {
3602
+ return S.nullOptions;
3603
+ }, set null(t) {
3604
+ Object.assign(S.nullOptions, t);
3605
+ }, get str() {
3606
+ return S.strOptions;
3607
+ }, set str(t) {
3608
+ Object.assign(S.strOptions, t);
3609
+ } }, As = { "1.0": { schema: "yaml-1.1", merge: !0, tagPrefixes: [{ handle: "!", prefix: Y.defaultTagPrefix }, { handle: "!!", prefix: "tag:private.yaml.org,2002:" }] }, 1.1: { schema: "yaml-1.1", merge: !0, tagPrefixes: [{ handle: "!", prefix: "!" }, { handle: "!!", prefix: Y.defaultTagPrefix }] }, 1.2: { schema: "core", merge: !1, tagPrefixes: [{ handle: "!", prefix: "!" }, { handle: "!!", prefix: Y.defaultTagPrefix }] } };
3610
+ function Os(t, e) {
3611
+ if ((t.version || t.options.version) === "1.0") {
3612
+ let s = e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
3613
+ if (s) return "!" + s[1];
3614
+ let i = e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);
3615
+ return i ? `!${i[1]}/${i[2]}` : `!${e.replace(/^tag:/, "")}`;
3616
+ }
3617
+ let n = t.tagPrefixes.find((s) => e.indexOf(s.prefix) === 0);
3618
+ if (!n) {
3619
+ let s = t.getDefaults().tagPrefixes;
3620
+ n = s && s.find((i) => e.indexOf(i.prefix) === 0);
3621
+ }
3622
+ if (!n) return e[0] === "!" ? e : `!<${e}>`;
3623
+ let r = e.substr(n.prefix.length).replace(/[!,[\]{}]/g, (s) => ({ "!": "%21", ",": "%2C", "[": "%5B", "]": "%5D", "{": "%7B", "}": "%7D" })[s]);
3624
+ return n.handle + r;
3625
+ }
3626
+ function Ea(t, e) {
3627
+ if (e instanceof S.Alias) return S.Alias;
3628
+ if (e.tag) {
3629
+ let s = t.filter((i) => i.tag === e.tag);
3630
+ if (s.length > 0) return s.find((i) => i.format === e.format) || s[0];
3631
+ }
3632
+ let n, r;
3633
+ if (e instanceof S.Scalar) {
3634
+ r = e.value;
3635
+ let s = t.filter((i) => i.identify && i.identify(r) || i.class && r instanceof i.class);
3636
+ n = s.find((i) => i.format === e.format) || s.find((i) => !i.format);
3637
+ } else r = e, n = t.find((s) => s.nodeClass && r instanceof s.nodeClass);
3638
+ if (!n) {
3639
+ let s = r && r.constructor ? r.constructor.name : typeof r;
3640
+ throw new Error(`Tag not resolved for ${s} value`);
3641
+ }
3642
+ return n;
3643
+ }
3644
+ function Sa(t, e, { anchors: n, doc: r }) {
3645
+ let s = [], i = r.anchors.getName(t);
3646
+ return i && (n[i] = t, s.push(`&${i}`)), t.tag ? s.push(Os(r, t.tag)) : e.default || s.push(Os(r, e.tag)), s.join(" ");
3647
+ }
3648
+ function Kt(t, e, n, r) {
3649
+ let { anchors: s, schema: i } = e.doc, o;
3650
+ if (!(t instanceof S.Node)) {
3651
+ let l = { aliasNodes: [], onTagObj: (f) => o = f, prevObjects: /* @__PURE__ */ new Map() };
3652
+ t = i.createNode(t, !0, null, l);
3653
+ for (let f of l.aliasNodes) {
3654
+ f.source = f.source.node;
3655
+ let m = s.getName(f.source);
3656
+ m || (m = s.newName(), s.map[m] = f.source);
3657
+ }
3658
+ }
3659
+ if (t instanceof S.Pair) return t.toString(e, n, r);
3660
+ o || (o = Ea(i.tags, t));
3661
+ let a = Sa(t, o, e);
3662
+ a.length > 0 && (e.indentAtStart = (e.indentAtStart || 0) + a.length + 1);
3663
+ let c = typeof o.stringify == "function" ? o.stringify(t, e, n, r) : t instanceof S.Scalar ? S.stringifyString(t, e, n, r) : t.toString(e, n, r);
3664
+ return a ? t instanceof S.Scalar || c[0] === "{" || c[0] === "[" ? `${a} ${c}` : `${a}
3665
+ ${e.indent}${c}` : c;
3666
+ }
3667
+ var jn = class t {
3668
+ static validAnchorNode(e) {
3669
+ return e instanceof S.Scalar || e instanceof S.YAMLSeq || e instanceof S.YAMLMap;
3670
+ }
3671
+ constructor(e) {
3672
+ Y._defineProperty(this, "map", /* @__PURE__ */ Object.create(null)), this.prefix = e;
3673
+ }
3674
+ createAlias(e, n) {
3675
+ return this.setAnchor(e, n), new S.Alias(e);
3676
+ }
3677
+ createMergePair(...e) {
3678
+ let n = new S.Merge();
3679
+ return n.value.items = e.map((r) => {
3680
+ if (r instanceof S.Alias) {
3681
+ if (r.source instanceof S.YAMLMap) return r;
3682
+ } else if (r instanceof S.YAMLMap) return this.createAlias(r);
3683
+ throw new Error("Merge sources must be Map nodes or their Aliases");
3684
+ }), n;
3685
+ }
3686
+ getName(e) {
3687
+ let { map: n } = this;
3688
+ return Object.keys(n).find((r) => n[r] === e);
3689
+ }
3690
+ getNames() {
3691
+ return Object.keys(this.map);
3692
+ }
3693
+ getNode(e) {
3694
+ return this.map[e];
3695
+ }
3696
+ newName(e) {
3697
+ e || (e = this.prefix);
3698
+ let n = Object.keys(this.map);
3699
+ for (let r = 1; ; ++r) {
3700
+ let s = `${e}${r}`;
3701
+ if (!n.includes(s)) return s;
3702
+ }
3703
+ }
3704
+ resolveNodes() {
3705
+ let { map: e, _cstAliases: n } = this;
3706
+ Object.keys(e).forEach((r) => {
3707
+ e[r] = e[r].resolved;
3708
+ }), n.forEach((r) => {
3709
+ r.source = r.source.resolved;
3710
+ }), delete this._cstAliases;
3711
+ }
3712
+ setAnchor(e, n) {
3713
+ if (e != null && !t.validAnchorNode(e)) throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");
3714
+ if (n && /[\x00-\x19\s,[\]{}]/.test(n)) throw new Error("Anchor names must not contain whitespace or control characters");
3715
+ let { map: r } = this, s = e && Object.keys(r).find((i) => r[i] === e);
3716
+ if (s) if (n) s !== n && (delete r[s], r[n] = e);
3717
+ else return s;
3718
+ else {
3719
+ if (!n) {
3720
+ if (!e) return null;
3721
+ n = this.newName();
3722
+ }
3723
+ r[n] = e;
3724
+ }
3725
+ return n;
3726
+ }
3727
+ }, jt = (t, e) => {
3728
+ if (t && typeof t == "object") {
3729
+ let { tag: n } = t;
3730
+ t instanceof S.Collection ? (n && (e[n] = !0), t.items.forEach((r) => jt(r, e))) : t instanceof S.Pair ? (jt(t.key, e), jt(t.value, e)) : t instanceof S.Scalar && n && (e[n] = !0);
3731
+ }
3732
+ return e;
3733
+ }, wa = (t) => Object.keys(jt(t, {}));
3734
+ function ba(t, e) {
3735
+ let n = { before: [], after: [] }, r, s = !1;
3736
+ for (let i of e) if (i.valueRange) {
3737
+ if (r !== void 0) {
3738
+ let a = "Document contains trailing content not separated by a ... or --- line";
3739
+ t.errors.push(new Y.YAMLSyntaxError(i, a));
3740
+ break;
3741
+ }
3742
+ let o = S.resolveNode(t, i);
3743
+ s && (o.spaceBefore = !0, s = !1), r = o;
3744
+ } else i.comment !== null ? (r === void 0 ? n.before : n.after).push(i.comment) : i.type === Y.Type.BLANK_LINE && (s = !0, r === void 0 && n.before.length > 0 && !t.commentBefore && (t.commentBefore = n.before.join(`
3745
+ `), n.before = []));
3746
+ if (t.contents = r || null, !r) t.comment = n.before.concat(n.after).join(`
3747
+ `) || null;
3748
+ else {
3749
+ let i = n.before.join(`
3750
+ `);
3751
+ if (i) {
3752
+ let o = r instanceof S.Collection && r.items[0] ? r.items[0] : r;
3753
+ o.commentBefore = o.commentBefore ? `${i}
3754
+ ${o.commentBefore}` : i;
3755
+ }
3756
+ t.comment = n.after.join(`
3757
+ `) || null;
3758
+ }
3759
+ }
3760
+ function Na({ tagPrefixes: t }, e) {
3761
+ let [n, r] = e.parameters;
3762
+ if (!n || !r) {
3763
+ let s = "Insufficient parameters given for %TAG directive";
3764
+ throw new Y.YAMLSemanticError(e, s);
3765
+ }
3766
+ if (t.some((s) => s.handle === n)) {
3767
+ let s = "The %TAG directive must only be given at most once per handle in the same document.";
3768
+ throw new Y.YAMLSemanticError(e, s);
3769
+ }
3770
+ return { handle: n, prefix: r };
3771
+ }
3772
+ function Oa(t, e) {
3773
+ let [n] = e.parameters;
3774
+ if (e.name === "YAML:1.0" && (n = "1.0"), !n) {
3775
+ let r = "Insufficient parameters given for %YAML directive";
3776
+ throw new Y.YAMLSemanticError(e, r);
3777
+ }
3778
+ if (!As[n]) {
3779
+ let s = `Document will be parsed as YAML ${t.version || t.options.version} rather than YAML ${n}`;
3780
+ t.warnings.push(new Y.YAMLWarning(e, s));
3781
+ }
3782
+ return n;
3783
+ }
3784
+ function Aa(t, e, n) {
3785
+ let r = [], s = !1;
3786
+ for (let i of e) {
3787
+ let { comment: o, name: a } = i;
3788
+ switch (a) {
3789
+ case "TAG":
3790
+ try {
3791
+ t.tagPrefixes.push(Na(t, i));
3792
+ } catch (c) {
3793
+ t.errors.push(c);
3794
+ }
3795
+ s = !0;
3796
+ break;
3797
+ case "YAML":
3798
+ case "YAML:1.0":
3799
+ if (t.version) {
3800
+ let c = "The %YAML directive must only be given at most once per document.";
3801
+ t.errors.push(new Y.YAMLSemanticError(i, c));
3802
+ }
3803
+ try {
3804
+ t.version = Oa(t, i);
3805
+ } catch (c) {
3806
+ t.errors.push(c);
3807
+ }
3808
+ s = !0;
3809
+ break;
3810
+ default:
3811
+ if (a) {
3812
+ let c = `YAML only supports %TAG and %YAML directives, and not %${a}`;
3813
+ t.warnings.push(new Y.YAMLWarning(i, c));
3814
+ }
3815
+ }
3816
+ o && r.push(o);
3817
+ }
3818
+ if (n && !s && (t.version || n.version || t.options.version) === "1.1") {
3819
+ let i = ({ handle: o, prefix: a }) => ({ handle: o, prefix: a });
3820
+ t.tagPrefixes = n.tagPrefixes.map(i), t.version = n.version;
3821
+ }
3822
+ t.commentBefore = r.join(`
3823
+ `) || null;
3824
+ }
3825
+ function Be(t) {
3826
+ if (t instanceof S.Collection) return !0;
3827
+ throw new Error("Expected a YAML collection as document contents");
3828
+ }
3829
+ var Qt = class t {
3830
+ constructor(e) {
3831
+ this.anchors = new jn(e.anchorPrefix), this.commentBefore = null, this.comment = null, this.contents = null, this.directivesEndMarker = null, this.errors = [], this.options = e, this.schema = null, this.tagPrefixes = [], this.version = null, this.warnings = [];
3832
+ }
3833
+ add(e) {
3834
+ return Be(this.contents), this.contents.add(e);
3835
+ }
3836
+ addIn(e, n) {
3837
+ Be(this.contents), this.contents.addIn(e, n);
3838
+ }
3839
+ delete(e) {
3840
+ return Be(this.contents), this.contents.delete(e);
3841
+ }
3842
+ deleteIn(e) {
3843
+ return S.isEmptyPath(e) ? this.contents == null ? !1 : (this.contents = null, !0) : (Be(this.contents), this.contents.deleteIn(e));
3844
+ }
3845
+ getDefaults() {
3846
+ return t.defaults[this.version] || t.defaults[this.options.version] || {};
3847
+ }
3848
+ get(e, n) {
3849
+ return this.contents instanceof S.Collection ? this.contents.get(e, n) : void 0;
3850
+ }
3851
+ getIn(e, n) {
3852
+ return S.isEmptyPath(e) ? !n && this.contents instanceof S.Scalar ? this.contents.value : this.contents : this.contents instanceof S.Collection ? this.contents.getIn(e, n) : void 0;
3853
+ }
3854
+ has(e) {
3855
+ return this.contents instanceof S.Collection ? this.contents.has(e) : !1;
3856
+ }
3857
+ hasIn(e) {
3858
+ return S.isEmptyPath(e) ? this.contents !== void 0 : this.contents instanceof S.Collection ? this.contents.hasIn(e) : !1;
3859
+ }
3860
+ set(e, n) {
3861
+ Be(this.contents), this.contents.set(e, n);
3862
+ }
3863
+ setIn(e, n) {
3864
+ S.isEmptyPath(e) ? this.contents = n : (Be(this.contents), this.contents.setIn(e, n));
3865
+ }
3866
+ setSchema(e, n) {
3867
+ if (!e && !n && this.schema) return;
3868
+ typeof e == "number" && (e = e.toFixed(1)), e === "1.0" || e === "1.1" || e === "1.2" ? (this.version ? this.version = e : this.options.version = e, delete this.options.schema) : e && typeof e == "string" && (this.options.schema = e), Array.isArray(n) && (this.options.customTags = n);
3869
+ let r = Object.assign({}, this.getDefaults(), this.options);
3870
+ this.schema = new Ns.Schema(r);
3871
+ }
3872
+ parse(e, n) {
3873
+ this.options.keepCstNodes && (this.cstNode = e), this.options.keepNodeTypes && (this.type = "DOCUMENT");
3874
+ let { directives: r = [], contents: s = [], directivesEndMarker: i, error: o, valueRange: a } = e;
3875
+ if (o && (o.source || (o.source = this), this.errors.push(o)), Aa(this, r, n), i && (this.directivesEndMarker = !0), this.range = a ? [a.start, a.end] : null, this.setSchema(), this.anchors._cstAliases = [], ba(this, s), this.anchors.resolveNodes(), this.options.prettyErrors) {
3876
+ for (let c of this.errors) c instanceof Y.YAMLError && c.makePretty();
3877
+ for (let c of this.warnings) c instanceof Y.YAMLError && c.makePretty();
3878
+ }
3879
+ return this;
3880
+ }
3881
+ listNonDefaultTags() {
3882
+ return wa(this.contents).filter((e) => e.indexOf(Ns.Schema.defaultPrefix) !== 0);
3883
+ }
3884
+ setTagPrefix(e, n) {
3885
+ if (e[0] !== "!" || e[e.length - 1] !== "!") throw new Error("Handle must start and end with !");
3886
+ if (n) {
3887
+ let r = this.tagPrefixes.find((s) => s.handle === e);
3888
+ r ? r.prefix = n : this.tagPrefixes.push({ handle: e, prefix: n });
3889
+ } else this.tagPrefixes = this.tagPrefixes.filter((r) => r.handle !== e);
3890
+ }
3891
+ toJSON(e, n) {
3892
+ let { keepBlobsInJSON: r, mapAsMap: s, maxAliasCount: i } = this.options, o = r && (typeof e != "string" || !(this.contents instanceof S.Scalar)), a = { doc: this, indentStep: " ", keep: o, mapAsMap: o && !!s, maxAliasCount: i, stringify: Kt }, c = Object.keys(this.anchors.map);
3893
+ c.length > 0 && (a.anchors = new Map(c.map((f) => [this.anchors.map[f], { alias: [], aliasCount: 0, count: 1 }])));
3894
+ let l = S.toJSON(this.contents, e, a);
3895
+ if (typeof n == "function" && a.anchors) for (let { count: f, res: m } of a.anchors.values()) n(m, f);
3896
+ return l;
3897
+ }
3898
+ toString() {
3899
+ if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified");
3900
+ let e = this.options.indent;
3901
+ if (!Number.isInteger(e) || e <= 0) {
3902
+ let c = JSON.stringify(e);
3903
+ throw new Error(`"indent" option must be a positive integer, not ${c}`);
3904
+ }
3905
+ this.setSchema();
3906
+ let n = [], r = !1;
3907
+ if (this.version) {
3908
+ let c = "%YAML 1.2";
3909
+ this.schema.name === "yaml-1.1" && (this.version === "1.0" ? c = "%YAML:1.0" : this.version === "1.1" && (c = "%YAML 1.1")), n.push(c), r = !0;
3910
+ }
3911
+ let s = this.listNonDefaultTags();
3912
+ this.tagPrefixes.forEach(({ handle: c, prefix: l }) => {
3913
+ s.some((f) => f.indexOf(l) === 0) && (n.push(`%TAG ${c} ${l}`), r = !0);
3914
+ }), (r || this.directivesEndMarker) && n.push("---"), this.commentBefore && ((r || !this.directivesEndMarker) && n.unshift(""), n.unshift(this.commentBefore.replace(/^/gm, "#")));
3915
+ let i = { anchors: /* @__PURE__ */ Object.create(null), doc: this, indent: "", indentStep: " ".repeat(e), stringify: Kt }, o = !1, a = null;
3916
+ if (this.contents) {
3917
+ this.contents instanceof S.Node && (this.contents.spaceBefore && (r || this.directivesEndMarker) && n.push(""), this.contents.commentBefore && n.push(this.contents.commentBefore.replace(/^/gm, "#")), i.forceBlockIndent = !!this.comment, a = this.contents.comment);
3918
+ let c = a ? null : () => o = !0, l = Kt(this.contents, i, () => a = null, c);
3919
+ n.push(S.addComment(l, "", a));
3920
+ } else this.contents !== void 0 && n.push(Kt(this.contents, i));
3921
+ return this.comment && ((!o || a) && n[n.length - 1] !== "" && n.push(""), n.push(this.comment.replace(/^/gm, "#"))), n.join(`
3922
+ `) + `
3923
+ `;
3924
+ }
3925
+ };
3926
+ Y._defineProperty(Qt, "defaults", As), Gt.Document = Qt, Gt.defaultOptions = ga, Gt.scalarOptions = ya;
3927
+ }), Ms = ne((Cs) => {
3928
+ "use strict";
3929
+ var Qn = Qr(), Ne = Ls(), La = Kn(), Ta = ce(), Ca = qn();
3930
+ De();
3931
+ function Ma(t, e = !0, n) {
3932
+ n === void 0 && typeof e == "string" && (n = e, e = !0);
3933
+ let r = Object.assign({}, Ne.Document.defaults[Ne.defaultOptions.version], Ne.defaultOptions);
3934
+ return new La.Schema(r).createNode(t, e, n);
3935
+ }
3936
+ var Fe = class extends Ne.Document {
3937
+ constructor(e) {
3938
+ super(Object.assign({}, Ne.defaultOptions, e));
3939
+ }
3940
+ };
3941
+ function ka(t, e) {
3942
+ let n = [], r;
3943
+ for (let s of Qn.parse(t)) {
3944
+ let i = new Fe(e);
3945
+ i.parse(s, r), n.push(i), r = i;
3946
+ }
3947
+ return n;
3948
+ }
3949
+ function Ts(t, e) {
3950
+ let n = Qn.parse(t), r = new Fe(e).parse(n[0]);
3951
+ if (n.length > 1) {
3952
+ let s = "Source contains multiple documents; please use YAML.parseAllDocuments()";
3953
+ r.errors.unshift(new Ta.YAMLSemanticError(n[1], s));
3954
+ }
3955
+ return r;
3956
+ }
3957
+ function Pa(t, e) {
3958
+ let n = Ts(t, e);
3959
+ if (n.warnings.forEach((r) => Ca.warn(r)), n.errors.length > 0) throw n.errors[0];
3960
+ return n.toJSON();
3961
+ }
3962
+ function va(t, e) {
3963
+ let n = new Fe(e);
3964
+ return n.contents = t, String(n);
3965
+ }
3966
+ var Ia = { createNode: Ma, defaultOptions: Ne.defaultOptions, Document: Fe, parse: Pa, parseAllDocuments: ka, parseCST: Qn.parse, parseDocument: Ts, scalarOptions: Ne.scalarOptions, stringify: va };
3967
+ Cs.YAML = Ia;
3968
+ }), Gn = ne((Lf, ks) => {
3969
+ ks.exports = Ms().YAML;
3970
+ }), Ps = ne((H) => {
3971
+ "use strict";
3972
+ var qe = De(), Ue = ce();
3973
+ H.findPair = qe.findPair, H.parseMap = qe.resolveMap, H.parseSeq = qe.resolveSeq, H.stringifyNumber = qe.stringifyNumber, H.stringifyString = qe.stringifyString, H.toJSON = qe.toJSON, H.Type = Ue.Type, H.YAMLError = Ue.YAMLError, H.YAMLReferenceError = Ue.YAMLReferenceError, H.YAMLSemanticError = Ue.YAMLSemanticError, H.YAMLSyntaxError = Ue.YAMLSyntaxError, H.YAMLWarning = Ue.YAMLWarning;
3974
+ }), Ci = {};
3975
+ or(Ci, { __parsePrettierYamlConfig: () => Xa, languages: () => Ur, options: () => Vr, parsers: () => ir, printers: () => Ja });
3976
+ mt = (t, e) => (n, r, ...s) => n | 1 && r == null ? void 0 : (e.call(r) ?? r[t]).apply(r, s);
3977
+ Di = mt("at", function() {
3978
+ if (Array.isArray(this) || typeof this == "string") return Ri;
3979
+ }), D = Di, $i = String.prototype.replaceAll ?? function(t, e) {
3980
+ return t.global ? this.replace(t, e) : this.split(t).join(e);
3981
+ }, Yi = mt("replaceAll", function() {
3982
+ if (typeof this == "string") return $i;
3983
+ }), ht = Yi, Bi = () => {
3984
+ }, je = Bi, Qe = "string", Ge = "array", dt = "cursor", gt = "indent", Ae = "align", yt = "trim", Le = "group", Te = "fill", Ce = "if-break", Et = "indent-if-break", Me = "line-suffix", St = "line-suffix-boundary", re = "line", wt = "label", ke = "break-parent", bt = /* @__PURE__ */ new Set([dt, gt, Ae, yt, Le, Te, Ce, Et, Me, St, re, wt, ke]);
3985
+ Nt = Fi, qi = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t);
3986
+ an = class extends Error {
3987
+ name = "InvalidDocError";
3988
+ constructor(e) {
3989
+ super(Ui(e)), this.doc = e;
3990
+ }
3991
+ }, ar = an;
3992
+ Z = je, Ot = je, lr = je, fr = je;
3993
+ Xe = { type: ke };
3994
+ se = { type: re }, Lt = { type: re, soft: !0 }, Wi = { type: re, hard: !0 }, N = [Wi, Xe], Ki = { type: re, hard: !0, literal: !0 }, He = [Ki, Xe];
3995
+ sl = Tt(/\s/u), fn = Tt(" "), il = Tt(",; "), ol = Tt(/[^\n\r]/u), hr = (t) => t === `
3996
+ ` || t === "\r" || t === "\u2028" || t === "\u2029";
3997
+ un = ji;
3998
+ pn = Qi, mn = class extends Error {
3999
+ name = "UnexpectedNodeError";
4000
+ constructor(e, n, r = "type") {
4001
+ super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`), this.node = e;
4002
+ }
4003
+ }, dr = mn, gr = "format", yr = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u, Er = /^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u, Sr = /^\s*@(?:format|prettier)\s*$/u, wr = (t) => Sr.test(t), br = (t) => Er.test(t), Nr = (t) => yr.test(t), Or = (t) => `# @${gr}
4004
+
4005
+ ${t}`;
4006
+ Ar.ignoredProperties = /* @__PURE__ */ new Set(["position"]);
4007
+ Lr = Ar;
4008
+ Tr.getVisitorKeys = () => [];
4009
+ Cr = Tr, Ze = null;
4010
+ Gi = 10;
4011
+ for (let t = 0; t <= Gi; t++) et();
4012
+ Mr = Hi, k = [["children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["key", "value", "children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["content", "children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"]], kr = { root: k[0], document: ["head", "body", "children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], documentHead: k[0], documentBody: k[0], directive: k[1], alias: k[1], blockLiteral: k[1], blockFolded: k[0], plain: k[0], quoteSingle: k[1], quoteDouble: k[1], mapping: k[0], mappingItem: k[2], mappingKey: k[3], mappingValue: k[3], sequence: k[0], sequenceItem: k[3], flowMapping: k[0], flowMappingItem: k[2], flowSequence: k[0], flowSequenceItem: k[3], comment: k[1], tag: k[4], anchor: k[4] }, Ji = Mr(kr), Pr = Ji, tt = (t) => t.position.start.offset, vr = (t) => t.position.end.offset;
4013
+ ve = Xi;
4014
+ yn = /* @__PURE__ */ new WeakMap();
4015
+ Yr = Zi;
4016
+ Br = to;
4017
+ Fr = so;
4018
+ uo = { preprocess: Fr, embed: Cr, print: oo, massageAstNode: Lr, insertPragma: Or, getVisitorKeys: Pr }, qr = uo, Ur = [{ name: "YAML", type: "data", aceMode: "yaml", extensions: [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"], filenames: [".clang-format", ".clang-tidy", ".clangd", ".gemrc", "CITATION.cff", "glide.lock", "pixi.lock", ".prettierrc", ".stylelintrc", ".lintstagedrc"], tmScope: "source.yaml", aliases: ["yml"], codemirrorMode: "yaml", codemirrorMimeType: "text/x-yaml", parsers: ["yaml"], vscodeLanguageIds: ["yaml", "ansible", "dockercompose", "github-actions-workflow", "home-assistant"], linguistLanguageId: 407 }], vt = { bracketSpacing: { category: "Common", type: "boolean", default: !0, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, objectWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap object literals.", choices: [{ value: "preserve", description: "Keep as multi-line, if there is a newline between the opening brace and first property." }, { value: "collapse", description: "Fit to a single line when possible." }] }, singleQuote: { category: "Common", type: "boolean", default: !1, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { category: "Common", type: "boolean", default: !1, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: !1, description: "Enforce single attribute per line in HTML, Vue and JSX." } }, po = { bracketSpacing: vt.bracketSpacing, singleQuote: vt.singleQuote, proseWrap: vt.proseWrap }, Vr = po, ir = {};
4019
+ or(ir, { yaml: () => Ha });
4020
+ sr = on(Gn(), 1), J = on(Ps(), 1), Cf = J.default.findPair, Mf = J.default.toJSON, kf = J.default.parseMap, Pf = J.default.parseSeq, vf = J.default.stringifyNumber, If = J.default.stringifyString, _f = J.default.Type, xf = J.default.YAMLError, Rf = J.default.YAMLReferenceError, vs = J.default.YAMLSemanticError, Df = J.default.YAMLSyntaxError, $f = J.default.YAMLWarning;
4021
+ (function(t) {
4022
+ t.Tag = "!", t.Anchor = "&", t.Comment = "#";
4023
+ })(me || (me = {}));
4024
+ (function(t) {
4025
+ t.CLIP = "clip", t.STRIP = "strip", t.KEEP = "keep";
4026
+ })(Jn || (Jn = {}));
4027
+ er = class {
4028
+ text;
4029
+ comments = [];
4030
+ #e;
4031
+ #t;
4032
+ constructor(e, n) {
4033
+ this.text = n, this.#e = e;
4034
+ }
4035
+ setOrigRanges() {
4036
+ if (!this.#e.setOrigRanges()) for (let e of this.#e) e.setOrigRanges([], 0);
4037
+ }
4038
+ #n(e) {
4039
+ if (!Zn) {
4040
+ let [o] = this.#e, a = Object.getPrototypeOf(Object.getPrototypeOf(o));
4041
+ Zn = Object.getOwnPropertyDescriptor(a, "rangeAsLinePos").get;
4042
+ }
4043
+ if (this.#t ?? (this.#t = { root: { context: { src: this.text } } }), this.text === "" && e.origStart === 0 && e.origEnd === 0) return { start: { offset: 0, line: 1, column: 1 }, end: { offset: 0, line: 1, column: 1 } };
4044
+ let { start: { line: n, col: r }, end: { line: s, col: i } } = Zn.call({ range: { start: this.#r(e.origStart), end: this.#r(e.origEnd) }, context: this.#t });
4045
+ return { start: { offset: e.origStart, line: n, column: r }, end: { offset: e.origEnd, line: s, column: i } };
4046
+ }
4047
+ #r(e) {
4048
+ return e < 0 ? 0 : e > this.text.length ? this.text.length : e;
4049
+ }
4050
+ transformOffset(e) {
4051
+ return this.#n({ origStart: e, origEnd: e }).start;
4052
+ }
4053
+ transformRange(e) {
4054
+ let { start: n, end: r } = this.#n(e);
4055
+ return X(n, r);
4056
+ }
4057
+ transformNode(e) {
4058
+ return wi(e, this);
4059
+ }
4060
+ transformContent(e) {
4061
+ return Ht(e, this);
4062
+ }
4063
+ }, bi = er;
4064
+ Li = Qa;
4065
+ Ha = { astFormat: "yaml", parse: Ga, hasPragma: br, hasIgnorePragma: Nr, locStart: tt, locEnd: vr }, Ja = { yaml: qr }, Ti = on(Gn(), 1), Xa = Ti.default.parse;
4066
+ }
4067
+ });
4068
+ init_yaml();
4069
+ export {
4070
+ Xa as __parsePrettierYamlConfig,
4071
+ Ci as default,
4072
+ Ur as languages,
4073
+ Vr as options,
4074
+ ir as parsers,
4075
+ Ja as printers
4076
+ };
4077
+ //# sourceMappingURL=yaml-6GALFXQY.js.map