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