@ingcreators/annot-core 0.3.0 → 0.4.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.
@@ -0,0 +1,1563 @@
1
+ //#region src/element-tree/attr-whitelist.ts
2
+ var e = [
3
+ "id",
4
+ "name",
5
+ "type",
6
+ "href",
7
+ "placeholder",
8
+ "value",
9
+ "required",
10
+ "disabled",
11
+ "readonly",
12
+ "checked",
13
+ "maxlength",
14
+ "minlength",
15
+ "pattern",
16
+ "min",
17
+ "max",
18
+ "step",
19
+ "data-testid",
20
+ "data-test-id"
21
+ ];
22
+ //#endregion
23
+ //#region src/element-tree/types.ts
24
+ function t(e) {
25
+ if (typeof e != "object" || !e) return !1;
26
+ let t = e;
27
+ return !(t.version !== 1 || typeof t.source != "object" || t.source === null || typeof t.viewport != "object" || t.viewport === null || typeof t.root != "object" || t.root === null);
28
+ }
29
+ //#endregion
30
+ //#region src/element-tree/json.ts
31
+ function n(e, t = {}) {
32
+ let n = t.compact ? void 0 : 2;
33
+ return JSON.stringify(e, r, n);
34
+ }
35
+ function r(e, t) {
36
+ if (!(Array.isArray(t) && t.length === 0) && !(typeof t == "object" && t && !Array.isArray(t) && Object.keys(t).length === 0)) return t;
37
+ }
38
+ function i(e) {
39
+ let t;
40
+ try {
41
+ t = JSON.parse(e);
42
+ } catch (e) {
43
+ throw Error(`ElementTree JSON parse failed: ${e instanceof Error ? e.message : String(e)}`);
44
+ }
45
+ return a(t);
46
+ }
47
+ function a(e) {
48
+ if (!t(e)) throw Error("ElementTree payload missing required top-level keys (version, source, viewport, root)");
49
+ let n = e;
50
+ return o(n.source), s(n.viewport), c(n.root, "root"), n;
51
+ }
52
+ function o(e) {
53
+ if (typeof e.kind != "string" || e.kind.length === 0) throw Error("ElementTree.source.kind must be a non-empty string");
54
+ if (typeof e.capturedAt != "string" || e.capturedAt.length === 0) throw Error("ElementTree.source.capturedAt must be a non-empty ISO 8601 string");
55
+ if (e.agent !== void 0 && typeof e.agent != "string") throw Error("ElementTree.source.agent, when present, must be a string");
56
+ if (e.url !== void 0 && typeof e.url != "string") throw Error("ElementTree.source.url, when present, must be a string");
57
+ }
58
+ function s(e) {
59
+ if (typeof e.width != "number" || !Number.isFinite(e.width)) throw Error("ElementTree.viewport.width must be a finite number");
60
+ if (typeof e.height != "number" || !Number.isFinite(e.height)) throw Error("ElementTree.viewport.height must be a finite number");
61
+ if (typeof e.scale != "number" || !Number.isFinite(e.scale)) throw Error("ElementTree.viewport.scale must be a finite number");
62
+ }
63
+ function c(e, t) {
64
+ if (typeof e != "object" || !e) throw Error(`ElementTree node at ${t} is not an object`);
65
+ let n = e;
66
+ if (typeof n.role != "string" || n.role.length === 0) throw Error(`ElementTree node at ${t} missing required role`);
67
+ if (typeof n.ref != "string" || !/^e\d+$/.test(n.ref)) throw Error(`ElementTree node at ${t} has invalid ref (expected "e<n>")`);
68
+ if (n.name !== void 0 && typeof n.name != "string") throw Error(`ElementTree node at ${t} has non-string name`);
69
+ if (n.text !== void 0 && typeof n.text != "string") throw Error(`ElementTree node at ${t} has non-string text`);
70
+ if (n.bbox !== void 0) {
71
+ let e = n.bbox;
72
+ for (let n of [
73
+ "x",
74
+ "y",
75
+ "width",
76
+ "height"
77
+ ]) if (typeof e[n] != "number" || !Number.isFinite(e[n])) throw Error(`ElementTree node at ${t} bbox.${n} must be a finite number`);
78
+ }
79
+ if (n.states !== void 0) {
80
+ if (!Array.isArray(n.states)) throw Error(`ElementTree node at ${t} states must be an array`);
81
+ for (let [e, r] of n.states.entries()) if (typeof r != "string") throw Error(`ElementTree node at ${t} states[${e}] must be a string`);
82
+ }
83
+ if (n.attributes !== void 0) {
84
+ if (typeof n.attributes != "object" || n.attributes === null) throw Error(`ElementTree node at ${t} attributes must be an object`);
85
+ for (let [e, r] of Object.entries(n.attributes)) if (typeof r != "string") throw Error(`ElementTree node at ${t} attributes[${e}] must be a string (got ${typeof r})`);
86
+ }
87
+ if (n.children !== void 0) {
88
+ if (!Array.isArray(n.children)) throw Error(`ElementTree node at ${t} children must be an array`);
89
+ for (let [e, r] of n.children.entries()) c(r, `${t}.children[${e}]`);
90
+ }
91
+ }
92
+ //#endregion
93
+ //#region src/element-tree/walk.ts
94
+ function l(e, t) {
95
+ u(e.root, [], t);
96
+ }
97
+ function u(e, t, n) {
98
+ if (n(e, t) === !1) return !1;
99
+ if (!e.children) return !0;
100
+ let r = [...t, e];
101
+ for (let t of e.children) if (!u(t, r, n)) return !1;
102
+ return !0;
103
+ }
104
+ function d(e, t) {
105
+ let n = null;
106
+ return l(e, (e) => {
107
+ if (e.ref === t) return n = e, !1;
108
+ }), n;
109
+ }
110
+ function f(e, t) {
111
+ let n = [];
112
+ return !t.role && !t.name || l(e, (e) => {
113
+ t.role !== void 0 && e.role !== t.role || t.name !== void 0 && e.name !== t.name || n.push(e);
114
+ }), n;
115
+ }
116
+ function p(e) {
117
+ let t = [];
118
+ return l(e, (e) => {
119
+ t.push(e);
120
+ }), t;
121
+ }
122
+ //#endregion
123
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/dist/js-yaml.mjs
124
+ function m(e) {
125
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
126
+ }
127
+ var h = {}, g = {}, _ = {}, v;
128
+ function y() {
129
+ if (v) return _;
130
+ v = 1;
131
+ function e(e) {
132
+ return e == null;
133
+ }
134
+ function t(e) {
135
+ return typeof e == "object" && !!e;
136
+ }
137
+ function n(t) {
138
+ return Array.isArray(t) ? t : e(t) ? [] : [t];
139
+ }
140
+ function r(e, t) {
141
+ if (t) {
142
+ let n = Object.keys(t);
143
+ for (let r = 0, i = n.length; r < i; r += 1) {
144
+ let i = n[r];
145
+ e[i] = t[i];
146
+ }
147
+ }
148
+ return e;
149
+ }
150
+ function i(e, t) {
151
+ let n = "";
152
+ for (let r = 0; r < t; r += 1) n += e;
153
+ return n;
154
+ }
155
+ function a(e) {
156
+ return e === 0 && 1 / e == -Infinity;
157
+ }
158
+ return _.isNothing = e, _.isObject = t, _.toArray = n, _.repeat = i, _.isNegativeZero = a, _.extend = r, _;
159
+ }
160
+ var b, x;
161
+ function S() {
162
+ if (x) return b;
163
+ x = 1;
164
+ function e(e, t) {
165
+ let n = "", r = e.reason || "(unknown reason)";
166
+ return e.mark ? (e.mark.name && (n += "in \"" + e.mark.name + "\" "), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += "\n\n" + e.mark.snippet), r + " " + n) : r;
167
+ }
168
+ function t(t, n) {
169
+ Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = n, this.message = e(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack || "";
170
+ }
171
+ return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t.prototype.toString = function(t) {
172
+ return this.name + ": " + e(this, t);
173
+ }, b = t, b;
174
+ }
175
+ var C, w;
176
+ function ee() {
177
+ if (w) return C;
178
+ w = 1;
179
+ let e = y();
180
+ function t(e, t, n, r, i) {
181
+ let a = "", o = "", s = Math.floor(i / 2) - 1;
182
+ return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), {
183
+ str: a + e.slice(t, n).replace(/\t/g, "→") + o,
184
+ pos: r - t + a.length
185
+ };
186
+ }
187
+ function n(t, n) {
188
+ return e.repeat(" ", n - t.length) + t;
189
+ }
190
+ function r(r, i) {
191
+ if (i = Object.create(i || null), !r.buffer) return null;
192
+ i.maxLength ||= 79, typeof i.indent != "number" && (i.indent = 1), typeof i.linesBefore != "number" && (i.linesBefore = 3), typeof i.linesAfter != "number" && (i.linesAfter = 2);
193
+ let a = /\r?\n|\r|\0/g, o = [0], s = [], c, l = -1;
194
+ for (; c = a.exec(r.buffer);) s.push(c.index), o.push(c.index + c[0].length), r.position <= c.index && l < 0 && (l = o.length - 2);
195
+ l < 0 && (l = o.length - 1);
196
+ let u = "", d = Math.min(r.line + i.linesAfter, s.length).toString().length, f = i.maxLength - (i.indent + d + 3);
197
+ for (let a = 1; a <= i.linesBefore && !(l - a < 0); a++) {
198
+ let c = t(r.buffer, o[l - a], s[l - a], r.position - (o[l] - o[l - a]), f);
199
+ u = e.repeat(" ", i.indent) + n((r.line - a + 1).toString(), d) + " | " + c.str + "\n" + u;
200
+ }
201
+ let p = t(r.buffer, o[l], s[l], r.position, f);
202
+ u += e.repeat(" ", i.indent) + n((r.line + 1).toString(), d) + " | " + p.str + "\n", u += e.repeat("-", i.indent + d + 3 + p.pos) + "^\n";
203
+ for (let a = 1; a <= i.linesAfter && !(l + a >= s.length); a++) {
204
+ let c = t(r.buffer, o[l + a], s[l + a], r.position - (o[l] - o[l + a]), f);
205
+ u += e.repeat(" ", i.indent) + n((r.line + a + 1).toString(), d) + " | " + c.str + "\n";
206
+ }
207
+ return u.replace(/\n$/, "");
208
+ }
209
+ return C = r, C;
210
+ }
211
+ var T, E;
212
+ function D() {
213
+ if (E) return T;
214
+ E = 1;
215
+ let e = S(), t = [
216
+ "kind",
217
+ "multi",
218
+ "resolve",
219
+ "construct",
220
+ "instanceOf",
221
+ "predicate",
222
+ "represent",
223
+ "representName",
224
+ "defaultStyle",
225
+ "styleAliases"
226
+ ], n = [
227
+ "scalar",
228
+ "sequence",
229
+ "mapping"
230
+ ];
231
+ function r(e) {
232
+ let t = {};
233
+ return e !== null && Object.keys(e).forEach(function(n) {
234
+ e[n].forEach(function(e) {
235
+ t[String(e)] = n;
236
+ });
237
+ }), t;
238
+ }
239
+ function i(i, a) {
240
+ if (a ||= {}, Object.keys(a).forEach(function(n) {
241
+ if (t.indexOf(n) === -1) throw new e("Unknown option \"" + n + "\" is met in definition of \"" + i + "\" YAML type.");
242
+ }), this.options = a, this.tag = i, this.kind = a.kind || null, this.resolve = a.resolve || function() {
243
+ return !0;
244
+ }, this.construct = a.construct || function(e) {
245
+ return e;
246
+ }, this.instanceOf = a.instanceOf || null, this.predicate = a.predicate || null, this.represent = a.represent || null, this.representName = a.representName || null, this.defaultStyle = a.defaultStyle || null, this.multi = a.multi || !1, this.styleAliases = r(a.styleAliases || null), n.indexOf(this.kind) === -1) throw new e("Unknown kind \"" + this.kind + "\" is specified for \"" + i + "\" YAML type.");
247
+ }
248
+ return T = i, T;
249
+ }
250
+ var O, k;
251
+ function A() {
252
+ if (k) return O;
253
+ k = 1;
254
+ let e = S(), t = D();
255
+ function n(e, t) {
256
+ let n = [];
257
+ return e[t].forEach(function(e) {
258
+ let t = n.length;
259
+ n.forEach(function(n, r) {
260
+ n.tag === e.tag && n.kind === e.kind && n.multi === e.multi && (t = r);
261
+ }), n[t] = e;
262
+ }), n;
263
+ }
264
+ function r() {
265
+ let e = {
266
+ scalar: {},
267
+ sequence: {},
268
+ mapping: {},
269
+ fallback: {},
270
+ multi: {
271
+ scalar: [],
272
+ sequence: [],
273
+ mapping: [],
274
+ fallback: []
275
+ }
276
+ };
277
+ function t(t) {
278
+ t.multi ? (e.multi[t.kind].push(t), e.multi.fallback.push(t)) : e[t.kind][t.tag] = e.fallback[t.tag] = t;
279
+ }
280
+ for (let e = 0, n = arguments.length; e < n; e += 1) arguments[e].forEach(t);
281
+ return e;
282
+ }
283
+ function i(e) {
284
+ return this.extend(e);
285
+ }
286
+ return i.prototype.extend = function(a) {
287
+ let o = [], s = [];
288
+ if (a instanceof t) s.push(a);
289
+ else if (Array.isArray(a)) s = s.concat(a);
290
+ else if (a && (Array.isArray(a.implicit) || Array.isArray(a.explicit))) a.implicit && (o = o.concat(a.implicit)), a.explicit && (s = s.concat(a.explicit));
291
+ else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
292
+ o.forEach(function(n) {
293
+ if (!(n instanceof t)) throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");
294
+ if (n.loadKind && n.loadKind !== "scalar") throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
295
+ if (n.multi) throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
296
+ }), s.forEach(function(n) {
297
+ if (!(n instanceof t)) throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");
298
+ });
299
+ let c = Object.create(i.prototype);
300
+ return c.implicit = (this.implicit || []).concat(o), c.explicit = (this.explicit || []).concat(s), c.compiledImplicit = n(c, "implicit"), c.compiledExplicit = n(c, "explicit"), c.compiledTypeMap = r(c.compiledImplicit, c.compiledExplicit), c;
301
+ }, O = i, O;
302
+ }
303
+ var j, M;
304
+ function N() {
305
+ return M ? j : (M = 1, j = new (D())("tag:yaml.org,2002:str", {
306
+ kind: "scalar",
307
+ construct: function(e) {
308
+ return e === null ? "" : e;
309
+ }
310
+ }), j);
311
+ }
312
+ var P, F;
313
+ function I() {
314
+ return F ? P : (F = 1, P = new (D())("tag:yaml.org,2002:seq", {
315
+ kind: "sequence",
316
+ construct: function(e) {
317
+ return e === null ? [] : e;
318
+ }
319
+ }), P);
320
+ }
321
+ var L, R;
322
+ function z() {
323
+ return R ? L : (R = 1, L = new (D())("tag:yaml.org,2002:map", {
324
+ kind: "mapping",
325
+ construct: function(e) {
326
+ return e === null ? {} : e;
327
+ }
328
+ }), L);
329
+ }
330
+ var B, V;
331
+ function H() {
332
+ return V ? B : (V = 1, B = new (A())({ explicit: [
333
+ N(),
334
+ I(),
335
+ z()
336
+ ] }), B);
337
+ }
338
+ var U, te;
339
+ function W() {
340
+ if (te) return U;
341
+ te = 1;
342
+ let e = D();
343
+ function t(e) {
344
+ if (e === null) return !0;
345
+ let t = e.length;
346
+ return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
347
+ }
348
+ function n() {
349
+ return null;
350
+ }
351
+ function r(e) {
352
+ return e === null;
353
+ }
354
+ return U = new e("tag:yaml.org,2002:null", {
355
+ kind: "scalar",
356
+ resolve: t,
357
+ construct: n,
358
+ predicate: r,
359
+ represent: {
360
+ canonical: function() {
361
+ return "~";
362
+ },
363
+ lowercase: function() {
364
+ return "null";
365
+ },
366
+ uppercase: function() {
367
+ return "NULL";
368
+ },
369
+ camelcase: function() {
370
+ return "Null";
371
+ },
372
+ empty: function() {
373
+ return "";
374
+ }
375
+ },
376
+ defaultStyle: "lowercase"
377
+ }), U;
378
+ }
379
+ var G, K;
380
+ function q() {
381
+ if (K) return G;
382
+ K = 1;
383
+ let e = D();
384
+ function t(e) {
385
+ if (e === null) return !1;
386
+ let t = e.length;
387
+ return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
388
+ }
389
+ function n(e) {
390
+ return e === "true" || e === "True" || e === "TRUE";
391
+ }
392
+ function r(e) {
393
+ return Object.prototype.toString.call(e) === "[object Boolean]";
394
+ }
395
+ return G = new e("tag:yaml.org,2002:bool", {
396
+ kind: "scalar",
397
+ resolve: t,
398
+ construct: n,
399
+ predicate: r,
400
+ represent: {
401
+ lowercase: function(e) {
402
+ return e ? "true" : "false";
403
+ },
404
+ uppercase: function(e) {
405
+ return e ? "TRUE" : "FALSE";
406
+ },
407
+ camelcase: function(e) {
408
+ return e ? "True" : "False";
409
+ }
410
+ },
411
+ defaultStyle: "lowercase"
412
+ }), G;
413
+ }
414
+ var J, Y;
415
+ function ne() {
416
+ if (Y) return J;
417
+ Y = 1;
418
+ let e = y(), t = D();
419
+ function n(e) {
420
+ return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
421
+ }
422
+ function r(e) {
423
+ return e >= 48 && e <= 55;
424
+ }
425
+ function i(e) {
426
+ return e >= 48 && e <= 57;
427
+ }
428
+ function a(e) {
429
+ if (e === null) return !1;
430
+ let t = e.length, a = 0, s = !1;
431
+ if (!t) return !1;
432
+ let c = e[a];
433
+ if ((c === "-" || c === "+") && (c = e[++a]), c === "0") {
434
+ if (a + 1 === t) return !0;
435
+ if (c = e[++a], c === "b") {
436
+ for (a++; a < t; a++) {
437
+ if (c = e[a], c !== "0" && c !== "1") return !1;
438
+ s = !0;
439
+ }
440
+ return s && isFinite(o(e));
441
+ }
442
+ if (c === "x") {
443
+ for (a++; a < t; a++) {
444
+ if (!n(e.charCodeAt(a))) return !1;
445
+ s = !0;
446
+ }
447
+ return s && isFinite(o(e));
448
+ }
449
+ if (c === "o") {
450
+ for (a++; a < t; a++) {
451
+ if (!r(e.charCodeAt(a))) return !1;
452
+ s = !0;
453
+ }
454
+ return s && isFinite(o(e));
455
+ }
456
+ }
457
+ for (; a < t; a++) {
458
+ if (!i(e.charCodeAt(a))) return !1;
459
+ s = !0;
460
+ }
461
+ return s ? isFinite(o(e)) : !1;
462
+ }
463
+ function o(e) {
464
+ let t = e, n = 1, r = t[0];
465
+ if ((r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0") return 0;
466
+ if (r === "0") {
467
+ if (t[1] === "b") return n * parseInt(t.slice(2), 2);
468
+ if (t[1] === "x") return n * parseInt(t.slice(2), 16);
469
+ if (t[1] === "o") return n * parseInt(t.slice(2), 8);
470
+ }
471
+ return n * parseInt(t, 10);
472
+ }
473
+ function s(e) {
474
+ return o(e);
475
+ }
476
+ function c(t) {
477
+ return Object.prototype.toString.call(t) === "[object Number]" && t % 1 == 0 && !e.isNegativeZero(t);
478
+ }
479
+ return J = new t("tag:yaml.org,2002:int", {
480
+ kind: "scalar",
481
+ resolve: a,
482
+ construct: s,
483
+ predicate: c,
484
+ represent: {
485
+ binary: function(e) {
486
+ return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
487
+ },
488
+ octal: function(e) {
489
+ return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
490
+ },
491
+ decimal: function(e) {
492
+ return e.toString(10);
493
+ },
494
+ hexadecimal: function(e) {
495
+ return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
496
+ }
497
+ },
498
+ defaultStyle: "decimal",
499
+ styleAliases: {
500
+ binary: [2, "bin"],
501
+ octal: [8, "oct"],
502
+ decimal: [10, "dec"],
503
+ hexadecimal: [16, "hex"]
504
+ }
505
+ }), J;
506
+ }
507
+ var X, re;
508
+ function ie() {
509
+ if (re) return X;
510
+ re = 1;
511
+ let e = y(), t = D(), n = /* @__PURE__ */ RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), r = /* @__PURE__ */ RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
512
+ function i(e) {
513
+ return e === null || !n.test(e) ? !1 : isFinite(parseFloat(e, 10)) ? !0 : r.test(e);
514
+ }
515
+ function a(e) {
516
+ let t = e.toLowerCase(), n = t[0] === "-" ? -1 : 1;
517
+ return "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Infinity : -Infinity : t === ".nan" ? NaN : n * parseFloat(t, 10);
518
+ }
519
+ let o = /^[-+]?[0-9]+e/;
520
+ function s(t, n) {
521
+ if (isNaN(t)) switch (n) {
522
+ case "lowercase": return ".nan";
523
+ case "uppercase": return ".NAN";
524
+ case "camelcase": return ".NaN";
525
+ }
526
+ else if (t === Infinity) switch (n) {
527
+ case "lowercase": return ".inf";
528
+ case "uppercase": return ".INF";
529
+ case "camelcase": return ".Inf";
530
+ }
531
+ else if (t === -Infinity) switch (n) {
532
+ case "lowercase": return "-.inf";
533
+ case "uppercase": return "-.INF";
534
+ case "camelcase": return "-.Inf";
535
+ }
536
+ else if (e.isNegativeZero(t)) return "-0.0";
537
+ let r = t.toString(10);
538
+ return o.test(r) ? r.replace("e", ".e") : r;
539
+ }
540
+ function c(t) {
541
+ return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 != 0 || e.isNegativeZero(t));
542
+ }
543
+ return X = new t("tag:yaml.org,2002:float", {
544
+ kind: "scalar",
545
+ resolve: i,
546
+ construct: a,
547
+ predicate: c,
548
+ represent: s,
549
+ defaultStyle: "lowercase"
550
+ }), X;
551
+ }
552
+ var Z, ae;
553
+ function Q() {
554
+ return ae ? Z : (ae = 1, Z = H().extend({ implicit: [
555
+ W(),
556
+ q(),
557
+ ne(),
558
+ ie()
559
+ ] }), Z);
560
+ }
561
+ var $, oe;
562
+ function se() {
563
+ return oe ? $ : (oe = 1, $ = Q(), $);
564
+ }
565
+ var ce, le;
566
+ function ue() {
567
+ if (le) return ce;
568
+ le = 1;
569
+ let e = D(), t = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), n = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
570
+ function r(e) {
571
+ return e === null ? !1 : t.exec(e) !== null || n.exec(e) !== null;
572
+ }
573
+ function i(e) {
574
+ let r = 0, i = null, a = t.exec(e);
575
+ if (a === null && (a = n.exec(e)), a === null) throw Error("Date resolve error");
576
+ let o = +a[1], s = a[2] - 1, c = +a[3];
577
+ if (!a[4]) return new Date(Date.UTC(o, s, c));
578
+ let l = +a[4], u = +a[5], d = +a[6];
579
+ if (a[7]) {
580
+ for (r = a[7].slice(0, 3); r.length < 3;) r += "0";
581
+ r = +r;
582
+ }
583
+ if (a[9]) {
584
+ let e = +a[10], t = +(a[11] || 0);
585
+ i = (e * 60 + t) * 6e4, a[9] === "-" && (i = -i);
586
+ }
587
+ let f = new Date(Date.UTC(o, s, c, l, u, d, r));
588
+ return i && f.setTime(f.getTime() - i), f;
589
+ }
590
+ function a(e) {
591
+ return e.toISOString();
592
+ }
593
+ return ce = new e("tag:yaml.org,2002:timestamp", {
594
+ kind: "scalar",
595
+ resolve: r,
596
+ construct: i,
597
+ instanceOf: Date,
598
+ represent: a
599
+ }), ce;
600
+ }
601
+ var de, fe;
602
+ function pe() {
603
+ if (fe) return de;
604
+ fe = 1;
605
+ let e = D();
606
+ function t(e) {
607
+ return e === "<<" || e === null;
608
+ }
609
+ return de = new e("tag:yaml.org,2002:merge", {
610
+ kind: "scalar",
611
+ resolve: t
612
+ }), de;
613
+ }
614
+ var me, he;
615
+ function ge() {
616
+ if (he) return me;
617
+ he = 1;
618
+ let e = D();
619
+ function t(e) {
620
+ if (e === null) return !1;
621
+ let t = 0, n = e.length;
622
+ for (let r = 0; r < n; r++) {
623
+ let n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r".indexOf(e.charAt(r));
624
+ if (!(n > 64)) {
625
+ if (n < 0) return !1;
626
+ t += 6;
627
+ }
628
+ }
629
+ return t % 8 == 0;
630
+ }
631
+ function n(e) {
632
+ let t = e.replace(/[\r\n=]/g, ""), n = t.length, r = 0, i = [];
633
+ for (let e = 0; e < n; e++) e % 4 == 0 && e && (i.push(r >> 16 & 255), i.push(r >> 8 & 255), i.push(r & 255)), r = r << 6 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r".indexOf(t.charAt(e));
634
+ let a = n % 4 * 6;
635
+ return a === 0 ? (i.push(r >> 16 & 255), i.push(r >> 8 & 255), i.push(r & 255)) : a === 18 ? (i.push(r >> 10 & 255), i.push(r >> 2 & 255)) : a === 12 && i.push(r >> 4 & 255), new Uint8Array(i);
636
+ }
637
+ function r(e) {
638
+ let t = "", n = 0, r = e.length, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
639
+ for (let a = 0; a < r; a++) a % 3 == 0 && a && (t += i[n >> 18 & 63], t += i[n >> 12 & 63], t += i[n >> 6 & 63], t += i[n & 63]), n = (n << 8) + e[a];
640
+ let a = r % 3;
641
+ return a === 0 ? (t += i[n >> 18 & 63], t += i[n >> 12 & 63], t += i[n >> 6 & 63], t += i[n & 63]) : a === 2 ? (t += i[n >> 10 & 63], t += i[n >> 4 & 63], t += i[n << 2 & 63], t += i[64]) : a === 1 && (t += i[n >> 2 & 63], t += i[n << 4 & 63], t += i[64], t += i[64]), t;
642
+ }
643
+ function i(e) {
644
+ return Object.prototype.toString.call(e) === "[object Uint8Array]";
645
+ }
646
+ return me = new e("tag:yaml.org,2002:binary", {
647
+ kind: "scalar",
648
+ resolve: t,
649
+ construct: n,
650
+ predicate: i,
651
+ represent: r
652
+ }), me;
653
+ }
654
+ var _e, ve;
655
+ function ye() {
656
+ if (ve) return _e;
657
+ ve = 1;
658
+ let e = D(), t = Object.prototype.hasOwnProperty, n = Object.prototype.toString;
659
+ function r(e) {
660
+ if (e === null) return !0;
661
+ let r = [], i = e;
662
+ for (let e = 0, a = i.length; e < a; e += 1) {
663
+ let a = i[e], o = !1;
664
+ if (n.call(a) !== "[object Object]") return !1;
665
+ let s;
666
+ for (s in a) if (t.call(a, s)) if (!o) o = !0;
667
+ else return !1;
668
+ if (!o) return !1;
669
+ if (r.indexOf(s) === -1) r.push(s);
670
+ else return !1;
671
+ }
672
+ return !0;
673
+ }
674
+ function i(e) {
675
+ return e === null ? [] : e;
676
+ }
677
+ return _e = new e("tag:yaml.org,2002:omap", {
678
+ kind: "sequence",
679
+ resolve: r,
680
+ construct: i
681
+ }), _e;
682
+ }
683
+ var be, xe;
684
+ function Se() {
685
+ if (xe) return be;
686
+ xe = 1;
687
+ let e = D(), t = Object.prototype.toString;
688
+ function n(e) {
689
+ if (e === null) return !0;
690
+ let n = e, r = Array(n.length);
691
+ for (let e = 0, i = n.length; e < i; e += 1) {
692
+ let i = n[e];
693
+ if (t.call(i) !== "[object Object]") return !1;
694
+ let a = Object.keys(i);
695
+ if (a.length !== 1) return !1;
696
+ r[e] = [a[0], i[a[0]]];
697
+ }
698
+ return !0;
699
+ }
700
+ function r(e) {
701
+ if (e === null) return [];
702
+ let t = e, n = Array(t.length);
703
+ for (let e = 0, r = t.length; e < r; e += 1) {
704
+ let r = t[e], i = Object.keys(r);
705
+ n[e] = [i[0], r[i[0]]];
706
+ }
707
+ return n;
708
+ }
709
+ return be = new e("tag:yaml.org,2002:pairs", {
710
+ kind: "sequence",
711
+ resolve: n,
712
+ construct: r
713
+ }), be;
714
+ }
715
+ var Ce, we;
716
+ function Te() {
717
+ if (we) return Ce;
718
+ we = 1;
719
+ let e = D(), t = Object.prototype.hasOwnProperty;
720
+ function n(e) {
721
+ if (e === null) return !0;
722
+ let n = e;
723
+ for (let e in n) if (t.call(n, e) && n[e] !== null) return !1;
724
+ return !0;
725
+ }
726
+ function r(e) {
727
+ return e === null ? {} : e;
728
+ }
729
+ return Ce = new e("tag:yaml.org,2002:set", {
730
+ kind: "mapping",
731
+ resolve: n,
732
+ construct: r
733
+ }), Ce;
734
+ }
735
+ var Ee, De;
736
+ function Oe() {
737
+ return De ? Ee : (De = 1, Ee = se().extend({
738
+ implicit: [ue(), pe()],
739
+ explicit: [
740
+ ge(),
741
+ ye(),
742
+ Se(),
743
+ Te()
744
+ ]
745
+ }), Ee);
746
+ }
747
+ var ke;
748
+ function Ae() {
749
+ if (ke) return g;
750
+ ke = 1;
751
+ let e = y(), t = S(), n = ee(), r = Oe(), i = Object.prototype.hasOwnProperty, a = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, o = /[\x85\u2028\u2029]/, s = /[,\[\]{}]/, c = /^(?:!|!!|![0-9A-Za-z-]+!)$/, l = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
752
+ function u(e) {
753
+ return Object.prototype.toString.call(e);
754
+ }
755
+ function d(e) {
756
+ return e === 10 || e === 13;
757
+ }
758
+ function f(e) {
759
+ return e === 9 || e === 32;
760
+ }
761
+ function p(e) {
762
+ return e === 9 || e === 32 || e === 10 || e === 13;
763
+ }
764
+ function m(e) {
765
+ return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
766
+ }
767
+ function h(e) {
768
+ if (e >= 48 && e <= 57) return e - 48;
769
+ let t = e | 32;
770
+ return t >= 97 && t <= 102 ? t - 97 + 10 : -1;
771
+ }
772
+ function _(e) {
773
+ return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
774
+ }
775
+ function v(e) {
776
+ return e >= 48 && e <= 57 ? e - 48 : -1;
777
+ }
778
+ function b(e) {
779
+ switch (e) {
780
+ case 48: return "\0";
781
+ case 97: return "\x07";
782
+ case 98: return "\b";
783
+ case 116: return " ";
784
+ case 9: return " ";
785
+ case 110: return "\n";
786
+ case 118: return "\v";
787
+ case 102: return "\f";
788
+ case 114: return "\r";
789
+ case 101: return "\x1B";
790
+ case 32: return " ";
791
+ case 34: return "\"";
792
+ case 47: return "/";
793
+ case 92: return "\\";
794
+ case 78: return "…";
795
+ case 95: return "\xA0";
796
+ case 76: return "\u2028";
797
+ case 80: return "\u2029";
798
+ default: return "";
799
+ }
800
+ }
801
+ function x(e) {
802
+ return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
803
+ }
804
+ function C(e, t, n) {
805
+ t === "__proto__" ? Object.defineProperty(e, t, {
806
+ configurable: !0,
807
+ enumerable: !0,
808
+ writable: !0,
809
+ value: n
810
+ }) : e[t] = n;
811
+ }
812
+ let w = Array(256), T = Array(256);
813
+ for (let e = 0; e < 256; e++) w[e] = +!!b(e), T[e] = b(e);
814
+ function E(e, t) {
815
+ this.input = e, this.filename = t.filename || null, this.schema = t.schema || r, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : 100, this.maxTotalMergeKeys = typeof t.maxTotalMergeKeys == "number" ? t.maxTotalMergeKeys : 1e4, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.depth = 0, this.totalMergeKeys = 0, this.firstTabInLine = -1, this.documents = [], this.anchorMapTransactions = [];
816
+ }
817
+ function D(e, r) {
818
+ let i = {
819
+ name: e.filename,
820
+ buffer: e.input.slice(0, -1),
821
+ position: e.position,
822
+ line: e.line,
823
+ column: e.position - e.lineStart
824
+ };
825
+ return i.snippet = n(i), new t(r, i);
826
+ }
827
+ function O(e, t) {
828
+ throw D(e, t);
829
+ }
830
+ function k(e, t) {
831
+ e.onWarning && e.onWarning.call(null, D(e, t));
832
+ }
833
+ function A(e, t, n) {
834
+ let r = e.anchorMapTransactions;
835
+ if (r.length !== 0) {
836
+ let n = r[r.length - 1];
837
+ i.call(n, t) || (n[t] = {
838
+ existed: i.call(e.anchorMap, t),
839
+ value: e.anchorMap[t]
840
+ });
841
+ }
842
+ e.anchorMap[t] = n;
843
+ }
844
+ function j(e) {
845
+ e.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
846
+ }
847
+ function M(e) {
848
+ let t = e.anchorMapTransactions.pop(), n = e.anchorMapTransactions;
849
+ if (n.length === 0) return;
850
+ let r = n[n.length - 1], a = Object.keys(t);
851
+ for (let e = 0, n = a.length; e < n; e += 1) {
852
+ let n = a[e];
853
+ i.call(r, n) || (r[n] = t[n]);
854
+ }
855
+ }
856
+ function N(e) {
857
+ let t = e.anchorMapTransactions.pop(), n = Object.keys(t);
858
+ for (let r = n.length - 1; r >= 0; --r) {
859
+ let i = t[n[r]];
860
+ i.existed ? e.anchorMap[n[r]] = i.value : delete e.anchorMap[n[r]];
861
+ }
862
+ }
863
+ function P(e) {
864
+ return {
865
+ position: e.position,
866
+ line: e.line,
867
+ lineStart: e.lineStart,
868
+ lineIndent: e.lineIndent,
869
+ firstTabInLine: e.firstTabInLine,
870
+ tag: e.tag,
871
+ anchor: e.anchor,
872
+ kind: e.kind,
873
+ result: e.result
874
+ };
875
+ }
876
+ function F(e, t) {
877
+ e.position = t.position, e.line = t.line, e.lineStart = t.lineStart, e.lineIndent = t.lineIndent, e.firstTabInLine = t.firstTabInLine, e.tag = t.tag, e.anchor = t.anchor, e.kind = t.kind, e.result = t.result;
878
+ }
879
+ let I = {
880
+ YAML: function(e, t, n) {
881
+ e.version !== null && O(e, "duplication of %YAML directive"), n.length !== 1 && O(e, "YAML directive accepts exactly one argument");
882
+ let r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]);
883
+ r === null && O(e, "ill-formed argument of the YAML directive");
884
+ let i = parseInt(r[1], 10), a = parseInt(r[2], 10);
885
+ i !== 1 && O(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && k(e, "unsupported YAML version of the document");
886
+ },
887
+ TAG: function(e, t, n) {
888
+ let r;
889
+ n.length !== 2 && O(e, "TAG directive accepts exactly two arguments");
890
+ let a = n[0];
891
+ r = n[1], c.test(a) || O(e, "ill-formed tag handle (first argument) of the TAG directive"), i.call(e.tagMap, a) && O(e, "there is a previously declared suffix for \"" + a + "\" tag handle"), l.test(r) || O(e, "ill-formed tag prefix (second argument) of the TAG directive");
892
+ try {
893
+ r = decodeURIComponent(r);
894
+ } catch {
895
+ O(e, "tag prefix is malformed: " + r);
896
+ }
897
+ e.tagMap[a] = r;
898
+ }
899
+ };
900
+ function L(e, t, n, r) {
901
+ if (t < n) {
902
+ let i = e.input.slice(t, n);
903
+ if (r) for (let t = 0, n = i.length; t < n; t += 1) {
904
+ let n = i.charCodeAt(t);
905
+ n === 9 || n >= 32 && n <= 1114111 || O(e, "expected valid JSON character");
906
+ }
907
+ else a.test(i) && O(e, "the stream contains non-printable characters");
908
+ e.result += i;
909
+ }
910
+ }
911
+ function R(t, n, r, a) {
912
+ e.isObject(r) || O(t, "cannot merge mappings; the provided source object is unacceptable");
913
+ let o = Object.keys(r);
914
+ for (let e = 0, s = o.length; e < s; e += 1) {
915
+ let s = o[e];
916
+ t.maxTotalMergeKeys !== -1 && ++t.totalMergeKeys > t.maxTotalMergeKeys && O(t, "merge keys exceeded maxTotalMergeKeys (" + t.maxTotalMergeKeys + ")"), i.call(n, s) || (C(n, s, r[s]), a[s] = !0);
917
+ }
918
+ }
919
+ function z(e, t, n, r, a, o, s, c, l) {
920
+ if (Array.isArray(a)) {
921
+ a = Array.prototype.slice.call(a);
922
+ for (let t = 0, n = a.length; t < n; t += 1) Array.isArray(a[t]) && O(e, "nested arrays are not supported inside keys"), typeof a == "object" && u(a[t]) === "[object Object]" && (a[t] = "[object Object]");
923
+ }
924
+ if (typeof a == "object" && u(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge") if (Array.isArray(o)) for (let r = 0, i = o.length; r < i; r += 1) R(e, t, o[r], n);
925
+ else R(e, t, o, n);
926
+ else !e.json && !i.call(n, a) && i.call(t, a) && (e.line = s || e.line, e.lineStart = c || e.lineStart, e.position = l || e.position, O(e, "duplicated mapping key")), C(t, a, o), delete n[a];
927
+ return t;
928
+ }
929
+ function B(e) {
930
+ let t = e.input.charCodeAt(e.position);
931
+ t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : O(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
932
+ }
933
+ function V(e, t, n) {
934
+ let r = 0, i = e.input.charCodeAt(e.position);
935
+ for (; i !== 0;) {
936
+ for (; f(i);) i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
937
+ if (t && i === 35) do
938
+ i = e.input.charCodeAt(++e.position);
939
+ while (i !== 10 && i !== 13 && i !== 0);
940
+ if (d(i)) for (B(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32;) e.lineIndent++, i = e.input.charCodeAt(++e.position);
941
+ else break;
942
+ }
943
+ return n !== -1 && r !== 0 && e.lineIndent < n && k(e, "deficient indentation"), r;
944
+ }
945
+ function H(e) {
946
+ let t = e.position, n = e.input.charCodeAt(t);
947
+ return !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || p(n)));
948
+ }
949
+ function U(t, n) {
950
+ n === 1 ? t.result += " " : n > 1 && (t.result += e.repeat("\n", n - 1));
951
+ }
952
+ function te(e, t, n) {
953
+ let r, i, a, o, s, c, l = e.kind, u = e.result, h = e.input.charCodeAt(e.position);
954
+ if (p(h) || m(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96) return !1;
955
+ if (h === 63 || h === 45) {
956
+ let t = e.input.charCodeAt(e.position + 1);
957
+ if (p(t) || n && m(t)) return !1;
958
+ }
959
+ for (e.kind = "scalar", e.result = "", r = i = e.position, a = !1; h !== 0;) {
960
+ if (h === 58) {
961
+ let t = e.input.charCodeAt(e.position + 1);
962
+ if (p(t) || n && m(t)) break;
963
+ } else if (h === 35) {
964
+ if (p(e.input.charCodeAt(e.position - 1))) break;
965
+ } else if (e.position === e.lineStart && H(e) || n && m(h)) break;
966
+ else if (d(h)) if (o = e.line, s = e.lineStart, c = e.lineIndent, V(e, !1, -1), e.lineIndent >= t) {
967
+ a = !0, h = e.input.charCodeAt(e.position);
968
+ continue;
969
+ } else {
970
+ e.position = i, e.line = o, e.lineStart = s, e.lineIndent = c;
971
+ break;
972
+ }
973
+ a &&= (L(e, r, i, !1), U(e, e.line - o), r = i = e.position, !1), f(h) || (i = e.position + 1), h = e.input.charCodeAt(++e.position);
974
+ }
975
+ return L(e, r, i, !1), e.result ? !0 : (e.kind = l, e.result = u, !1);
976
+ }
977
+ function W(e, t) {
978
+ let n, r, i = e.input.charCodeAt(e.position);
979
+ if (i !== 39) return !1;
980
+ for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (i = e.input.charCodeAt(e.position)) !== 0;) if (i === 39) if (L(e, n, e.position, !0), i = e.input.charCodeAt(++e.position), i === 39) n = e.position, e.position++, r = e.position;
981
+ else return !0;
982
+ else d(i) ? (L(e, n, r, !0), U(e, V(e, !1, t)), n = r = e.position) : e.position === e.lineStart && H(e) ? O(e, "unexpected end of the document within a single quoted scalar") : (e.position++, f(i) || (r = e.position));
983
+ O(e, "unexpected end of the stream within a single quoted scalar");
984
+ }
985
+ function G(e, t) {
986
+ let n, r, i, a = e.input.charCodeAt(e.position);
987
+ if (a !== 34) return !1;
988
+ for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (a = e.input.charCodeAt(e.position)) !== 0;) if (a === 34) return L(e, n, e.position, !0), e.position++, !0;
989
+ else if (a === 92) {
990
+ if (L(e, n, e.position, !0), a = e.input.charCodeAt(++e.position), d(a)) V(e, !1, t);
991
+ else if (a < 256 && w[a]) e.result += T[a], e.position++;
992
+ else if ((i = _(a)) > 0) {
993
+ let t = i, n = 0;
994
+ for (; t > 0; t--) a = e.input.charCodeAt(++e.position), (i = h(a)) >= 0 ? n = (n << 4) + i : O(e, "expected hexadecimal character");
995
+ e.result += x(n), e.position++;
996
+ } else O(e, "unknown escape sequence");
997
+ n = r = e.position;
998
+ } else d(a) ? (L(e, n, r, !0), U(e, V(e, !1, t)), n = r = e.position) : e.position === e.lineStart && H(e) ? O(e, "unexpected end of the document within a double quoted scalar") : (e.position++, f(a) || (r = e.position));
999
+ O(e, "unexpected end of the stream within a double quoted scalar");
1000
+ }
1001
+ function K(e, t) {
1002
+ let n = !0, r, i, a, o = e.tag, s, c = e.anchor, l, u, d, f, m = /* @__PURE__ */ Object.create(null), h, g, _, v = e.input.charCodeAt(e.position);
1003
+ if (v === 91) l = 93, f = !1, s = [];
1004
+ else if (v === 123) l = 125, f = !0, s = {};
1005
+ else return !1;
1006
+ for (e.anchor !== null && A(e, e.anchor, s), v = e.input.charCodeAt(++e.position); v !== 0;) {
1007
+ if (V(e, !0, t), v = e.input.charCodeAt(e.position), v === l) return e.position++, e.tag = o, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
1008
+ n ? v === 44 && O(e, "expected the node content, but found ','") : O(e, "missed comma between flow collection entries"), g = h = _ = null, u = d = !1, v === 63 && p(e.input.charCodeAt(e.position + 1)) && (u = d = !0, e.position++, V(e, !0, t)), r = e.line, i = e.lineStart, a = e.position, Z(e, t, 1, !1, !0), g = e.tag, h = e.result, V(e, !0, t), v = e.input.charCodeAt(e.position), (d || e.line === r) && v === 58 && (u = !0, v = e.input.charCodeAt(++e.position), V(e, !0, t), Z(e, t, 1, !1, !0), _ = e.result), f ? z(e, s, m, g, h, _, r, i, a) : u ? s.push(z(e, null, m, g, h, _, r, i, a)) : s.push(h), V(e, !0, t), v = e.input.charCodeAt(e.position), v === 44 ? (n = !0, v = e.input.charCodeAt(++e.position)) : n = !1;
1009
+ }
1010
+ O(e, "unexpected end of the stream within a flow collection");
1011
+ }
1012
+ function q(t, n) {
1013
+ let r, i = 1, a = !1, o = !1, s = n, c = 0, l = !1, u, p = t.input.charCodeAt(t.position);
1014
+ if (p === 124) r = !1;
1015
+ else if (p === 62) r = !0;
1016
+ else return !1;
1017
+ for (t.kind = "scalar", t.result = ""; p !== 0;) if (p = t.input.charCodeAt(++t.position), p === 43 || p === 45) i === 1 ? i = p === 43 ? 3 : 2 : O(t, "repeat of a chomping mode identifier");
1018
+ else if ((u = v(p)) >= 0) u === 0 ? O(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? O(t, "repeat of an indentation width identifier") : (s = n + u - 1, o = !0);
1019
+ else break;
1020
+ if (f(p)) {
1021
+ do
1022
+ p = t.input.charCodeAt(++t.position);
1023
+ while (f(p));
1024
+ if (p === 35) do
1025
+ p = t.input.charCodeAt(++t.position);
1026
+ while (!d(p) && p !== 0);
1027
+ }
1028
+ for (; p !== 0;) {
1029
+ for (B(t), t.lineIndent = 0, p = t.input.charCodeAt(t.position); (!o || t.lineIndent < s) && p === 32;) t.lineIndent++, p = t.input.charCodeAt(++t.position);
1030
+ if (!o && t.lineIndent > s && (s = t.lineIndent), d(p)) {
1031
+ c++;
1032
+ continue;
1033
+ }
1034
+ if (!o && s === 0 && O(t, "missing indentation for block scalar"), t.lineIndent < s) {
1035
+ i === 3 ? t.result += e.repeat("\n", a ? 1 + c : c) : i === 1 && a && (t.result += "\n");
1036
+ break;
1037
+ }
1038
+ r ? f(p) ? (l = !0, t.result += e.repeat("\n", a ? 1 + c : c)) : l ? (l = !1, t.result += e.repeat("\n", c + 1)) : c === 0 ? a && (t.result += " ") : t.result += e.repeat("\n", c) : t.result += e.repeat("\n", a ? 1 + c : c), a = !0, o = !0, c = 0;
1039
+ let n = t.position;
1040
+ for (; !d(p) && p !== 0;) p = t.input.charCodeAt(++t.position);
1041
+ L(t, n, t.position, !1);
1042
+ }
1043
+ return !0;
1044
+ }
1045
+ function J(e, t) {
1046
+ let n = e.tag, r = e.anchor, i = [], a = !1;
1047
+ if (e.firstTabInLine !== -1) return !1;
1048
+ e.anchor !== null && A(e, e.anchor, i);
1049
+ let o = e.input.charCodeAt(e.position);
1050
+ for (; o !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, O(e, "tab characters must not be used in indentation")), !(o !== 45 || !p(e.input.charCodeAt(e.position + 1))));) {
1051
+ if (a = !0, e.position++, V(e, !0, -1) && e.lineIndent <= t) {
1052
+ i.push(null), o = e.input.charCodeAt(e.position);
1053
+ continue;
1054
+ }
1055
+ let n = e.line;
1056
+ if (Z(e, t, 3, !1, !0), i.push(e.result), V(e, !0, -1), o = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && o !== 0) O(e, "bad indentation of a sequence entry");
1057
+ else if (e.lineIndent < t) break;
1058
+ }
1059
+ return a ? (e.tag = n, e.anchor = r, e.kind = "sequence", e.result = i, !0) : !1;
1060
+ }
1061
+ function Y(e, t, n) {
1062
+ let r, i, a, o, s = e.tag, c = e.anchor, l = {}, u = /* @__PURE__ */ Object.create(null), d = null, m = null, h = null, g = !1, _ = !1;
1063
+ if (e.firstTabInLine !== -1) return !1;
1064
+ e.anchor !== null && A(e, e.anchor, l);
1065
+ let v = e.input.charCodeAt(e.position);
1066
+ for (; v !== 0;) {
1067
+ !g && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, O(e, "tab characters must not be used in indentation"));
1068
+ let y = e.input.charCodeAt(e.position + 1), b = e.line;
1069
+ if ((v === 63 || v === 58) && p(y)) v === 63 ? (g && (z(e, l, u, d, m, null, i, a, o), d = m = h = null), _ = !0, g = !0, r = !0) : g ? (g = !1, r = !0) : O(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = y;
1070
+ else {
1071
+ if (i = e.line, a = e.lineStart, o = e.position, !Z(e, n, 2, !1, !0)) break;
1072
+ if (e.line === b) {
1073
+ for (v = e.input.charCodeAt(e.position); f(v);) v = e.input.charCodeAt(++e.position);
1074
+ if (v === 58) v = e.input.charCodeAt(++e.position), p(v) || O(e, "a whitespace character is expected after the key-value separator within a block mapping"), g && (z(e, l, u, d, m, null, i, a, o), d = m = h = null), _ = !0, g = !1, r = !1, d = e.tag, m = e.result;
1075
+ else if (_) O(e, "can not read an implicit mapping pair; a colon is missed");
1076
+ else return e.tag = s, e.anchor = c, !0;
1077
+ } else if (_) O(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1078
+ else return e.tag = s, e.anchor = c, !0;
1079
+ }
1080
+ if ((e.line === b || e.lineIndent > t) && (g && (i = e.line, a = e.lineStart, o = e.position), Z(e, t, 4, !0, r) && (g ? m = e.result : h = e.result), g || (z(e, l, u, d, m, h, i, a, o), d = m = h = null), V(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === b || e.lineIndent > t) && v !== 0) O(e, "bad indentation of a mapping entry");
1081
+ else if (e.lineIndent < t) break;
1082
+ }
1083
+ return g && z(e, l, u, d, m, null, i, a, o), _ && (e.tag = s, e.anchor = c, e.kind = "mapping", e.result = l), _;
1084
+ }
1085
+ function ne(e) {
1086
+ let t = !1, n = !1, r, a, o = e.input.charCodeAt(e.position);
1087
+ if (o !== 33) return !1;
1088
+ e.tag !== null && O(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (t = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (n = !0, r = "!!", o = e.input.charCodeAt(++e.position)) : r = "!";
1089
+ let u = e.position;
1090
+ if (t) {
1091
+ do
1092
+ o = e.input.charCodeAt(++e.position);
1093
+ while (o !== 0 && o !== 62);
1094
+ e.position < e.length ? (a = e.input.slice(u, e.position), o = e.input.charCodeAt(++e.position)) : O(e, "unexpected end of the stream within a verbatim tag");
1095
+ } else {
1096
+ for (; o !== 0 && !p(o);) o === 33 && (n ? O(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(u - 1, e.position + 1), c.test(r) || O(e, "named tag handle cannot contain such characters"), n = !0, u = e.position + 1)), o = e.input.charCodeAt(++e.position);
1097
+ a = e.input.slice(u, e.position), s.test(a) && O(e, "tag suffix cannot contain flow indicator characters");
1098
+ }
1099
+ a && !l.test(a) && O(e, "tag name cannot contain such characters: " + a);
1100
+ try {
1101
+ a = decodeURIComponent(a);
1102
+ } catch {
1103
+ O(e, "tag name is malformed: " + a);
1104
+ }
1105
+ return t ? e.tag = a : i.call(e.tagMap, r) ? e.tag = e.tagMap[r] + a : r === "!" ? e.tag = "!" + a : r === "!!" ? e.tag = "tag:yaml.org,2002:" + a : O(e, "undeclared tag handle \"" + r + "\""), !0;
1106
+ }
1107
+ function X(e) {
1108
+ let t = e.input.charCodeAt(e.position);
1109
+ if (t !== 38) return !1;
1110
+ e.anchor !== null && O(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position);
1111
+ let n = e.position;
1112
+ for (; t !== 0 && !p(t) && !m(t);) t = e.input.charCodeAt(++e.position);
1113
+ return e.position === n && O(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
1114
+ }
1115
+ function re(e) {
1116
+ let t = e.input.charCodeAt(e.position);
1117
+ if (t !== 42) return !1;
1118
+ t = e.input.charCodeAt(++e.position);
1119
+ let n = e.position;
1120
+ for (; t !== 0 && !p(t) && !m(t);) t = e.input.charCodeAt(++e.position);
1121
+ e.position === n && O(e, "name of an alias node must contain at least one character");
1122
+ let r = e.input.slice(n, e.position);
1123
+ return i.call(e.anchorMap, r) || O(e, "unidentified alias \"" + r + "\""), e.result = e.anchorMap[r], V(e, !0, -1), !0;
1124
+ }
1125
+ function ie(e, t, n, r) {
1126
+ let i = P(e);
1127
+ return j(e), F(e, t), e.tag = null, e.anchor = null, e.kind = null, e.result = null, Y(e, n, r) && e.kind === "mapping" ? (M(e), !0) : (N(e), F(e, i), !1);
1128
+ }
1129
+ function Z(e, t, n, r, a) {
1130
+ let o, s, c = 1, l = !1, u = !1, d = null, f, p, m;
1131
+ e.depth >= e.maxDepth && O(e, "nesting exceeded maxDepth (" + e.maxDepth + ")"), e.depth += 1, e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null;
1132
+ let h = o = s = n === 4 || n === 3;
1133
+ if (r && V(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1) for (;;) {
1134
+ let n = e.input.charCodeAt(e.position), r = P(e);
1135
+ if (l && (n === 33 && e.tag !== null || n === 38 && e.anchor !== null) || !ne(e) && !X(e)) break;
1136
+ d === null && (d = r), V(e, !0, -1) ? (l = !0, s = h, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : s = !1;
1137
+ }
1138
+ if (s &&= l || a, c === 1 || n === 4) if (p = n === 1 || n === 2 ? t : t + 1, m = e.position - e.lineStart, c === 1) if (s && (J(e, m) || Y(e, m, p)) || K(e, p)) u = !0;
1139
+ else {
1140
+ let t = e.input.charCodeAt(e.position);
1141
+ d !== null && h && !s && t !== 124 && t !== 62 && ie(e, d, d.position - d.lineStart, p) || o && q(e, p) || W(e, p) || G(e, p) ? u = !0 : re(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && O(e, "alias node should not have any properties")) : te(e, p, n === 1) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && A(e, e.anchor, e.result);
1142
+ }
1143
+ else c === 0 && (u = s && J(e, m));
1144
+ if (e.tag === null) e.anchor !== null && A(e, e.anchor, e.result);
1145
+ else if (e.tag === "?") {
1146
+ e.result !== null && e.kind !== "scalar" && O(e, "unacceptable node kind for !<?> tag; it should be \"scalar\", not \"" + e.kind + "\"");
1147
+ for (let t = 0, n = e.implicitTypes.length; t < n; t += 1) if (f = e.implicitTypes[t], f.resolve(e.result)) {
1148
+ e.result = f.construct(e.result), e.tag = f.tag, e.anchor !== null && A(e, e.anchor, e.result);
1149
+ break;
1150
+ }
1151
+ } else if (e.tag !== "!") {
1152
+ if (i.call(e.typeMap[e.kind || "fallback"], e.tag)) f = e.typeMap[e.kind || "fallback"][e.tag];
1153
+ else {
1154
+ f = null;
1155
+ let t = e.typeMap.multi[e.kind || "fallback"];
1156
+ for (let n = 0, r = t.length; n < r; n += 1) if (e.tag.slice(0, t[n].tag.length) === t[n].tag) {
1157
+ f = t[n];
1158
+ break;
1159
+ }
1160
+ }
1161
+ f || O(e, "unknown tag !<" + e.tag + ">"), e.result !== null && f.kind !== e.kind && O(e, "unacceptable node kind for !<" + e.tag + "> tag; it should be \"" + f.kind + "\", not \"" + e.kind + "\""), f.resolve(e.result, e.tag) ? (e.result = f.construct(e.result, e.tag), e.anchor !== null && A(e, e.anchor, e.result)) : O(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
1162
+ }
1163
+ return e.listener !== null && e.listener("close", e), --e.depth, e.tag !== null || e.anchor !== null || u;
1164
+ }
1165
+ function ae(e) {
1166
+ let t = e.position, n = !1, r;
1167
+ for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (r = e.input.charCodeAt(e.position)) !== 0 && (V(e, !0, -1), r = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || r !== 37));) {
1168
+ n = !0, r = e.input.charCodeAt(++e.position);
1169
+ let t = e.position;
1170
+ for (; r !== 0 && !p(r);) r = e.input.charCodeAt(++e.position);
1171
+ let a = e.input.slice(t, e.position), o = [];
1172
+ for (a.length < 1 && O(e, "directive name must not be less than one character in length"); r !== 0;) {
1173
+ for (; f(r);) r = e.input.charCodeAt(++e.position);
1174
+ if (r === 35) {
1175
+ do
1176
+ r = e.input.charCodeAt(++e.position);
1177
+ while (r !== 0 && !d(r));
1178
+ break;
1179
+ }
1180
+ if (d(r)) break;
1181
+ for (t = e.position; r !== 0 && !p(r);) r = e.input.charCodeAt(++e.position);
1182
+ o.push(e.input.slice(t, e.position));
1183
+ }
1184
+ r !== 0 && B(e), i.call(I, a) ? I[a](e, a, o) : k(e, "unknown document directive \"" + a + "\"");
1185
+ }
1186
+ if (V(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, V(e, !0, -1)) : n && O(e, "directives end mark is expected"), Z(e, e.lineIndent - 1, 4, !1, !0), V(e, !0, -1), e.checkLineBreaks && o.test(e.input.slice(t, e.position)) && k(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && H(e)) {
1187
+ e.input.charCodeAt(e.position) === 46 && (e.position += 3, V(e, !0, -1));
1188
+ return;
1189
+ }
1190
+ e.position < e.length - 1 && O(e, "end of the stream or a document separator is expected");
1191
+ }
1192
+ function Q(e, t) {
1193
+ e = String(e), t ||= {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += "\n"), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
1194
+ let n = new E(e, t), r = e.indexOf("\0");
1195
+ for (r !== -1 && (n.position = r, O(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32;) n.lineIndent += 1, n.position += 1;
1196
+ for (; n.position < n.length - 1;) ae(n);
1197
+ return n.documents;
1198
+ }
1199
+ function $(e, t, n) {
1200
+ typeof t == "object" && t && n === void 0 && (n = t, t = null);
1201
+ let r = Q(e, n);
1202
+ if (typeof t != "function") return r;
1203
+ for (let e = 0, n = r.length; e < n; e += 1) t(r[e]);
1204
+ }
1205
+ function oe(e, n) {
1206
+ let r = Q(e, n);
1207
+ if (r.length !== 0) {
1208
+ if (r.length === 1) return r[0];
1209
+ throw new t("expected a single document in the stream, but found more");
1210
+ }
1211
+ }
1212
+ return g.loadAll = $, g.load = oe, g;
1213
+ }
1214
+ var je = {}, Me;
1215
+ function Ne() {
1216
+ if (Me) return je;
1217
+ Me = 1;
1218
+ let e = y(), t = S(), n = Oe(), r = Object.prototype.toString, i = Object.prototype.hasOwnProperty, a = 65279, o = {};
1219
+ o[0] = "\\0", o[7] = "\\a", o[8] = "\\b", o[9] = "\\t", o[10] = "\\n", o[11] = "\\v", o[12] = "\\f", o[13] = "\\r", o[27] = "\\e", o[34] = "\\\"", o[92] = "\\\\", o[133] = "\\N", o[160] = "\\_", o[8232] = "\\L", o[8233] = "\\P";
1220
+ let s = [
1221
+ "y",
1222
+ "Y",
1223
+ "yes",
1224
+ "Yes",
1225
+ "YES",
1226
+ "on",
1227
+ "On",
1228
+ "ON",
1229
+ "n",
1230
+ "N",
1231
+ "no",
1232
+ "No",
1233
+ "NO",
1234
+ "off",
1235
+ "Off",
1236
+ "OFF"
1237
+ ], c = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1238
+ function l(e, t) {
1239
+ if (t === null) return {};
1240
+ let n = {}, r = Object.keys(t);
1241
+ for (let a = 0, o = r.length; a < o; a += 1) {
1242
+ let o = r[a], s = String(t[o]);
1243
+ o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2));
1244
+ let c = e.compiledTypeMap.fallback[o];
1245
+ c && i.call(c.styleAliases, s) && (s = c.styleAliases[s]), n[o] = s;
1246
+ }
1247
+ return n;
1248
+ }
1249
+ function u(n) {
1250
+ let r, i, a = n.toString(16).toUpperCase();
1251
+ if (n <= 255) r = "x", i = 2;
1252
+ else if (n <= 65535) r = "u", i = 4;
1253
+ else if (n <= 4294967295) r = "U", i = 8;
1254
+ else throw new t("code point within a string may not be greater than 0xFFFFFFFF");
1255
+ return "\\" + r + e.repeat("0", i - a.length) + a;
1256
+ }
1257
+ function d(t) {
1258
+ this.schema = t.schema || n, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = e.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = l(this.schema, t.styles || null), this.sortKeys = t.sortKeys || !1, this.lineWidth = t.lineWidth || 80, this.noRefs = t.noRefs || !1, this.noCompatMode = t.noCompatMode || !1, this.condenseFlow = t.condenseFlow || !1, this.quotingType = t.quotingType === "\"" ? 2 : 1, this.forceQuotes = t.forceQuotes || !1, this.replacer = typeof t.replacer == "function" ? t.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1259
+ }
1260
+ function f(t, n) {
1261
+ let r = e.repeat(" ", n), i = 0, a = "", o = t.length;
1262
+ for (; i < o;) {
1263
+ let e, n = t.indexOf("\n", i);
1264
+ n === -1 ? (e = t.slice(i), i = o) : (e = t.slice(i, n + 1), i = n + 1), e.length && e !== "\n" && (a += r), a += e;
1265
+ }
1266
+ return a;
1267
+ }
1268
+ function p(t, n) {
1269
+ return "\n" + e.repeat(" ", t.indent * n);
1270
+ }
1271
+ function m(e, t) {
1272
+ for (let n = 0, r = e.implicitTypes.length; n < r; n += 1) if (e.implicitTypes[n].resolve(t)) return !0;
1273
+ return !1;
1274
+ }
1275
+ function h(e) {
1276
+ return e === 32 || e === 9;
1277
+ }
1278
+ function g(e) {
1279
+ return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== a || e >= 65536 && e <= 1114111;
1280
+ }
1281
+ function _(e) {
1282
+ return g(e) && e !== a && e !== 13 && e !== 10;
1283
+ }
1284
+ function v(e, t, n) {
1285
+ let r = _(e), i = r && !h(e);
1286
+ return (n ? r : r && e !== 44 && e !== 91 && e !== 93 && e !== 123 && e !== 125) && e !== 35 && !(t === 58 && !i) || _(t) && !h(t) && e === 35 || t === 58 && i;
1287
+ }
1288
+ function b(e) {
1289
+ return g(e) && e !== a && !h(e) && e !== 45 && e !== 63 && e !== 58 && e !== 44 && e !== 91 && e !== 93 && e !== 123 && e !== 125 && e !== 35 && e !== 38 && e !== 42 && e !== 33 && e !== 124 && e !== 61 && e !== 62 && e !== 39 && e !== 34 && e !== 37 && e !== 64 && e !== 96;
1290
+ }
1291
+ function x(e) {
1292
+ return !h(e) && e !== 58;
1293
+ }
1294
+ function C(e, t) {
1295
+ let n = e.charCodeAt(t), r;
1296
+ return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
1297
+ }
1298
+ function w(e) {
1299
+ return /^\n* /.test(e);
1300
+ }
1301
+ function ee(e, t, n, r, i, a, o, s) {
1302
+ let c, l = 0, u = null, d = !1, f = !1, p = r !== -1, m = -1, h = b(C(e, 0)) && x(C(e, e.length - 1));
1303
+ if (t || o) for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
1304
+ if (l = C(e, c), !g(l)) return 5;
1305
+ h &&= v(l, u, s), u = l;
1306
+ }
1307
+ else {
1308
+ for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
1309
+ if (l = C(e, c), l === 10) d = !0, p && (f ||= c - m - 1 > r && e[m + 1] !== " ", m = c);
1310
+ else if (!g(l)) return 5;
1311
+ h &&= v(l, u, s), u = l;
1312
+ }
1313
+ f ||= p && c - m - 1 > r && e[m + 1] !== " ";
1314
+ }
1315
+ return !d && !f ? h && !o && !i(e) ? 1 : a === 2 ? 5 : 2 : n > 9 && w(e) ? 5 : o ? a === 2 ? 5 : 2 : f ? 4 : 3;
1316
+ }
1317
+ function T(e, n, r, i, a) {
1318
+ e.dump = (function() {
1319
+ if (n.length === 0) return e.quotingType === 2 ? "\"\"" : "''";
1320
+ if (!e.noCompatMode && (s.indexOf(n) !== -1 || c.test(n))) return e.quotingType === 2 ? "\"" + n + "\"" : "'" + n + "'";
1321
+ let o = e.indent * Math.max(1, r), l = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), u = i || e.flowLevel > -1 && r >= e.flowLevel;
1322
+ function d(t) {
1323
+ return m(e, t);
1324
+ }
1325
+ switch (ee(n, u, e.indent, l, d, e.quotingType, e.forceQuotes && !i, a)) {
1326
+ case 1: return n;
1327
+ case 2: return "'" + n.replace(/'/g, "''") + "'";
1328
+ case 3: return "|" + E(n, e.indent) + D(f(n, o));
1329
+ case 4: return ">" + E(n, e.indent) + D(f(O(n, l), o));
1330
+ case 5: return "\"" + A(n) + "\"";
1331
+ default: throw new t("impossible error: invalid scalar style");
1332
+ }
1333
+ })();
1334
+ }
1335
+ function E(e, t) {
1336
+ let n = w(e) ? String(t) : "", r = e[e.length - 1] === "\n";
1337
+ return n + (r && (e[e.length - 2] === "\n" || e === "\n") ? "+" : r ? "" : "-") + "\n";
1338
+ }
1339
+ function D(e) {
1340
+ return e[e.length - 1] === "\n" ? e.slice(0, -1) : e;
1341
+ }
1342
+ function O(e, t) {
1343
+ let n = /(\n+)([^\n]*)/g, r = (function() {
1344
+ let r = e.indexOf("\n");
1345
+ return r = r === -1 ? e.length : r, n.lastIndex = r, k(e.slice(0, r), t);
1346
+ })(), i = e[0] === "\n" || e[0] === " ", a, o;
1347
+ for (; o = n.exec(e);) {
1348
+ let e = o[1], n = o[2];
1349
+ a = n[0] === " ", r += e + (!i && !a && n !== "" ? "\n" : "") + k(n, t), i = a;
1350
+ }
1351
+ return r;
1352
+ }
1353
+ function k(e, t) {
1354
+ if (e === "" || e[0] === " ") return e;
1355
+ let n = / [^ ]/g, r, i = 0, a, o = 0, s = 0, c = "";
1356
+ for (; r = n.exec(e);) s = r.index, s - i > t && (a = o > i ? o : s, c += "\n" + e.slice(i, a), i = a + 1), o = s;
1357
+ return c += "\n", e.length - i > t && o > i ? c += e.slice(i, o) + "\n" + e.slice(o + 1) : c += e.slice(i), c.slice(1);
1358
+ }
1359
+ function A(e) {
1360
+ let t = "", n = 0;
1361
+ for (let r = 0; r < e.length; n >= 65536 ? r += 2 : r++) {
1362
+ n = C(e, r);
1363
+ let i = o[n];
1364
+ !i && g(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || u(n);
1365
+ }
1366
+ return t;
1367
+ }
1368
+ function j(e, t, n) {
1369
+ let r = "", i = e.tag;
1370
+ for (let i = 0, a = n.length; i < a; i += 1) {
1371
+ let a = n[i];
1372
+ e.replacer && (a = e.replacer.call(n, String(i), a)), (I(e, t, a, !1, !1) || a === void 0 && I(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
1373
+ }
1374
+ e.tag = i, e.dump = "[" + r + "]";
1375
+ }
1376
+ function M(e, t, n, r) {
1377
+ let i = "", a = e.tag;
1378
+ for (let a = 0, o = n.length; a < o; a += 1) {
1379
+ let o = n[a];
1380
+ e.replacer && (o = e.replacer.call(n, String(a), o)), (I(e, t + 1, o, !0, !0, !1, !0) || o === void 0 && I(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += p(e, t)), e.dump && e.dump.charCodeAt(0) === 10 ? i += "-" : i += "- ", i += e.dump);
1381
+ }
1382
+ e.tag = a, e.dump = i || "[]";
1383
+ }
1384
+ function N(e, t, n) {
1385
+ let r = "", i = e.tag, a = Object.keys(n);
1386
+ for (let i = 0, o = a.length; i < o; i += 1) {
1387
+ let o = "";
1388
+ r !== "" && (o += ", "), e.condenseFlow && (o += "\"");
1389
+ let s = a[i], c = n[s];
1390
+ e.replacer && (c = e.replacer.call(n, s, c)), I(e, t, s, !1, !1) && (e.dump.length > 1024 && (o += "? "), o += e.dump + (e.condenseFlow ? "\"" : "") + ":" + (e.condenseFlow ? "" : " "), I(e, t, c, !1, !1) && (o += e.dump, r += o));
1391
+ }
1392
+ e.tag = i, e.dump = "{" + r + "}";
1393
+ }
1394
+ function P(e, n, r, i) {
1395
+ let a = "", o = e.tag, s = Object.keys(r);
1396
+ if (e.sortKeys === !0) s.sort();
1397
+ else if (typeof e.sortKeys == "function") s.sort(e.sortKeys);
1398
+ else if (e.sortKeys) throw new t("sortKeys must be a boolean or a function");
1399
+ for (let t = 0, o = s.length; t < o; t += 1) {
1400
+ let o = "";
1401
+ (!i || a !== "") && (o += p(e, n));
1402
+ let c = s[t], l = r[c];
1403
+ if (e.replacer && (l = e.replacer.call(r, c, l)), !I(e, n + 1, c, !0, !0, !0)) continue;
1404
+ let u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024;
1405
+ u && (e.dump && e.dump.charCodeAt(0) === 10 ? o += "?" : o += "? "), o += e.dump, u && (o += p(e, n)), I(e, n + 1, l, !0, u) && (e.dump && e.dump.charCodeAt(0) === 10 ? o += ":" : o += ": ", o += e.dump, a += o);
1406
+ }
1407
+ e.tag = o, e.dump = a || "{}";
1408
+ }
1409
+ function F(e, n, a) {
1410
+ let o = a ? e.explicitTypes : e.implicitTypes;
1411
+ for (let s = 0, c = o.length; s < c; s += 1) {
1412
+ let c = o[s];
1413
+ if ((c.instanceOf || c.predicate) && (!c.instanceOf || typeof n == "object" && n instanceof c.instanceOf) && (!c.predicate || c.predicate(n))) {
1414
+ if (a ? c.multi && c.representName ? e.tag = c.representName(n) : e.tag = c.tag : e.tag = "?", c.represent) {
1415
+ let a = e.styleMap[c.tag] || c.defaultStyle, o;
1416
+ if (r.call(c.represent) === "[object Function]") o = c.represent(n, a);
1417
+ else if (i.call(c.represent, a)) o = c.represent[a](n, a);
1418
+ else throw new t("!<" + c.tag + "> tag resolver accepts not \"" + a + "\" style");
1419
+ e.dump = o;
1420
+ }
1421
+ return !0;
1422
+ }
1423
+ }
1424
+ return !1;
1425
+ }
1426
+ function I(e, n, i, a, o, s, c) {
1427
+ e.tag = null, e.dump = i, F(e, i, !1) || F(e, i, !0);
1428
+ let l = r.call(e.dump), u = a;
1429
+ a &&= e.flowLevel < 0 || e.flowLevel > n;
1430
+ let d = l === "[object Object]" || l === "[object Array]", f, p;
1431
+ if (d && (f = e.duplicates.indexOf(i), p = f !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && n > 0) && (o = !1), p && e.usedDuplicates[f]) e.dump = "*ref_" + f;
1432
+ else {
1433
+ if (d && p && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), l === "[object Object]") a && Object.keys(e.dump).length !== 0 ? (P(e, n, e.dump, o), p && (e.dump = "&ref_" + f + e.dump)) : (N(e, n, e.dump), p && (e.dump = "&ref_" + f + " " + e.dump));
1434
+ else if (l === "[object Array]") a && e.dump.length !== 0 ? (e.noArrayIndent && !c && n > 0 ? M(e, n - 1, e.dump, o) : M(e, n, e.dump, o), p && (e.dump = "&ref_" + f + e.dump)) : (j(e, n, e.dump), p && (e.dump = "&ref_" + f + " " + e.dump));
1435
+ else if (l === "[object String]") e.tag !== "?" && T(e, e.dump, n, s, u);
1436
+ else if (l === "[object Undefined]") return !1;
1437
+ else {
1438
+ if (e.skipInvalid) return !1;
1439
+ throw new t("unacceptable kind of an object to dump " + l);
1440
+ }
1441
+ if (e.tag !== null && e.tag !== "?") {
1442
+ let t = encodeURI(e.tag[0] === "!" ? e.tag.slice(1) : e.tag).replace(/!/g, "%21");
1443
+ t = e.tag[0] === "!" ? "!" + t : t.slice(0, 18) === "tag:yaml.org,2002:" ? "!!" + t.slice(18) : "!<" + t + ">", e.dump = t + " " + e.dump;
1444
+ }
1445
+ }
1446
+ return !0;
1447
+ }
1448
+ function L(e, t) {
1449
+ let n = [], r = [];
1450
+ R(e, n, r);
1451
+ let i = r.length;
1452
+ for (let e = 0; e < i; e += 1) t.duplicates.push(n[r[e]]);
1453
+ t.usedDuplicates = Array(i);
1454
+ }
1455
+ function R(e, t, n) {
1456
+ if (typeof e == "object" && e) {
1457
+ let r = t.indexOf(e);
1458
+ if (r !== -1) n.indexOf(r) === -1 && n.push(r);
1459
+ else if (t.push(e), Array.isArray(e)) for (let r = 0, i = e.length; r < i; r += 1) R(e[r], t, n);
1460
+ else {
1461
+ let r = Object.keys(e);
1462
+ for (let i = 0, a = r.length; i < a; i += 1) R(e[r[i]], t, n);
1463
+ }
1464
+ }
1465
+ }
1466
+ function z(e, t) {
1467
+ t ||= {};
1468
+ let n = new d(t);
1469
+ n.noRefs || L(e, n);
1470
+ let r = e;
1471
+ return n.replacer && (r = n.replacer.call({ "": r }, "", r)), I(n, 0, r, !0, !0) ? n.dump + "\n" : "";
1472
+ }
1473
+ return je.dump = z, je;
1474
+ }
1475
+ var Pe;
1476
+ function Fe() {
1477
+ if (Pe) return h;
1478
+ Pe = 1;
1479
+ let e = Ae(), t = Ne();
1480
+ function n(e, t) {
1481
+ return function() {
1482
+ throw Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
1483
+ };
1484
+ }
1485
+ return h.Type = D(), h.Schema = A(), h.FAILSAFE_SCHEMA = H(), h.JSON_SCHEMA = Q(), h.CORE_SCHEMA = se(), h.DEFAULT_SCHEMA = Oe(), h.load = e.load, h.loadAll = e.loadAll, h.dump = t.dump, h.YAMLException = S(), h.types = {
1486
+ binary: ge(),
1487
+ float: ie(),
1488
+ map: z(),
1489
+ null: W(),
1490
+ pairs: Se(),
1491
+ set: Te(),
1492
+ timestamp: ue(),
1493
+ bool: q(),
1494
+ int: ne(),
1495
+ merge: pe(),
1496
+ omap: ye(),
1497
+ seq: I(),
1498
+ str: N()
1499
+ }, h.safeLoad = n("safeLoad", "load"), h.safeLoadAll = n("safeLoadAll", "loadAll"), h.safeDump = n("safeDump", "dump"), h;
1500
+ }
1501
+ var { Type: Ie, Schema: Le, FAILSAFE_SCHEMA: Re, JSON_SCHEMA: ze, CORE_SCHEMA: Be, DEFAULT_SCHEMA: Ve, load: He, loadAll: Ue, dump: We, YAMLException: Ge, types: Ke, safeLoad: qe, safeLoadAll: Je, safeDump: Ye } = /* @__PURE__ */ m(Fe());
1502
+ //#endregion
1503
+ //#region src/element-tree/yaml.ts
1504
+ function Xe(e) {
1505
+ return We(Qe(e), {
1506
+ indent: 2,
1507
+ lineWidth: -1,
1508
+ noRefs: !0,
1509
+ sortKeys: !1,
1510
+ quotingType: "\"",
1511
+ forceQuotes: !1
1512
+ });
1513
+ }
1514
+ function Ze(e) {
1515
+ let t;
1516
+ try {
1517
+ t = He(e);
1518
+ } catch (e) {
1519
+ throw Error(`ElementTree YAML parse failed: ${e instanceof Error ? e.message : String(e)}`);
1520
+ }
1521
+ return a(t);
1522
+ }
1523
+ function Qe(e) {
1524
+ return {
1525
+ version: e.version,
1526
+ source: $e(e.source),
1527
+ viewport: et(e.viewport),
1528
+ root: tt(e.root)
1529
+ };
1530
+ }
1531
+ function $e(e) {
1532
+ let t = { kind: e.kind };
1533
+ return e.url !== void 0 && (t.url = e.url), e.agent !== void 0 && (t.agent = e.agent), t.capturedAt = e.capturedAt, t;
1534
+ }
1535
+ function et(e) {
1536
+ return {
1537
+ width: e.width,
1538
+ height: e.height,
1539
+ scale: e.scale
1540
+ };
1541
+ }
1542
+ function tt(e) {
1543
+ let t = {
1544
+ ref: e.ref,
1545
+ role: e.role
1546
+ };
1547
+ if (e.name !== void 0 && (t.name = e.name), e.text !== void 0 && (t.text = e.text), e.bbox !== void 0 && (t.bbox = {
1548
+ x: e.bbox.x,
1549
+ y: e.bbox.y,
1550
+ width: e.bbox.width,
1551
+ height: e.bbox.height
1552
+ }), e.states !== void 0 && e.states.length > 0 && (t.states = [...e.states]), e.attributes !== void 0) {
1553
+ let n = Object.keys(e.attributes);
1554
+ if (n.length > 0) {
1555
+ let r = {};
1556
+ for (let t of [...n].sort()) r[t] = e.attributes[t];
1557
+ t.attributes = r;
1558
+ }
1559
+ }
1560
+ return e.children !== void 0 && e.children.length > 0 && (t.children = e.children.map(tt)), t;
1561
+ }
1562
+ //#endregion
1563
+ export { p as a, n as c, e as d, d as i, a as l, Xe as n, l as o, f as r, i as s, Ze as t, t as u };