@ingcreators/annot-core 0.3.1 → 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.
- package/CHANGELOG.md +20 -0
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/svg-format.d.ts +28 -0
- package/dist/element-tree/attr-whitelist.d.ts +29 -0
- package/dist/element-tree/index.d.ts +1 -0
- package/dist/{element-tree-Bp-_IB-7.js → element-tree-C0Vl00o2.js} +261 -239
- package/dist/element-tree.js +2 -2
- package/dist/index.js +1 -1
- package/dist/storage/types.d.ts +10 -0
- package/dist/utils/filename.d.ts +19 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/xmp/xmp-browser.d.ts +3 -18
- package/dist/xmp/xmp-bytes.d.ts +42 -2
- package/dist/xmp-bytes.js +103 -91
- package/package.json +3 -4
|
@@ -1,44 +1,66 @@
|
|
|
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
|
|
1
23
|
//#region src/element-tree/types.ts
|
|
2
|
-
function
|
|
24
|
+
function t(e) {
|
|
3
25
|
if (typeof e != "object" || !e) return !1;
|
|
4
26
|
let t = e;
|
|
5
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);
|
|
6
28
|
}
|
|
7
29
|
//#endregion
|
|
8
30
|
//#region src/element-tree/json.ts
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return JSON.stringify(e,
|
|
31
|
+
function n(e, t = {}) {
|
|
32
|
+
let n = t.compact ? void 0 : 2;
|
|
33
|
+
return JSON.stringify(e, r, n);
|
|
12
34
|
}
|
|
13
|
-
function
|
|
35
|
+
function r(e, t) {
|
|
14
36
|
if (!(Array.isArray(t) && t.length === 0) && !(typeof t == "object" && t && !Array.isArray(t) && Object.keys(t).length === 0)) return t;
|
|
15
37
|
}
|
|
16
|
-
function
|
|
38
|
+
function i(e) {
|
|
17
39
|
let t;
|
|
18
40
|
try {
|
|
19
41
|
t = JSON.parse(e);
|
|
20
42
|
} catch (e) {
|
|
21
43
|
throw Error(`ElementTree JSON parse failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
22
44
|
}
|
|
23
|
-
return
|
|
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;
|
|
45
|
+
return a(t);
|
|
29
46
|
}
|
|
30
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) {
|
|
31
53
|
if (typeof e.kind != "string" || e.kind.length === 0) throw Error("ElementTree.source.kind must be a non-empty string");
|
|
32
54
|
if (typeof e.capturedAt != "string" || e.capturedAt.length === 0) throw Error("ElementTree.source.capturedAt must be a non-empty ISO 8601 string");
|
|
33
55
|
if (e.agent !== void 0 && typeof e.agent != "string") throw Error("ElementTree.source.agent, when present, must be a string");
|
|
34
56
|
if (e.url !== void 0 && typeof e.url != "string") throw Error("ElementTree.source.url, when present, must be a string");
|
|
35
57
|
}
|
|
36
|
-
function
|
|
58
|
+
function s(e) {
|
|
37
59
|
if (typeof e.width != "number" || !Number.isFinite(e.width)) throw Error("ElementTree.viewport.width must be a finite number");
|
|
38
60
|
if (typeof e.height != "number" || !Number.isFinite(e.height)) throw Error("ElementTree.viewport.height must be a finite number");
|
|
39
61
|
if (typeof e.scale != "number" || !Number.isFinite(e.scale)) throw Error("ElementTree.viewport.scale must be a finite number");
|
|
40
62
|
}
|
|
41
|
-
function
|
|
63
|
+
function c(e, t) {
|
|
42
64
|
if (typeof e != "object" || !e) throw Error(`ElementTree node at ${t} is not an object`);
|
|
43
65
|
let n = e;
|
|
44
66
|
if (typeof n.role != "string" || n.role.length === 0) throw Error(`ElementTree node at ${t} missing required role`);
|
|
@@ -64,48 +86,48 @@ function s(e, t) {
|
|
|
64
86
|
}
|
|
65
87
|
if (n.children !== void 0) {
|
|
66
88
|
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())
|
|
89
|
+
for (let [e, r] of n.children.entries()) c(r, `${t}.children[${e}]`);
|
|
68
90
|
}
|
|
69
91
|
}
|
|
70
92
|
//#endregion
|
|
71
93
|
//#region src/element-tree/walk.ts
|
|
72
|
-
function
|
|
73
|
-
|
|
94
|
+
function l(e, t) {
|
|
95
|
+
u(e.root, [], t);
|
|
74
96
|
}
|
|
75
|
-
function
|
|
97
|
+
function u(e, t, n) {
|
|
76
98
|
if (n(e, t) === !1) return !1;
|
|
77
99
|
if (!e.children) return !0;
|
|
78
100
|
let r = [...t, e];
|
|
79
|
-
for (let t of e.children) if (!
|
|
101
|
+
for (let t of e.children) if (!u(t, r, n)) return !1;
|
|
80
102
|
return !0;
|
|
81
103
|
}
|
|
82
|
-
function
|
|
104
|
+
function d(e, t) {
|
|
83
105
|
let n = null;
|
|
84
|
-
return
|
|
106
|
+
return l(e, (e) => {
|
|
85
107
|
if (e.ref === t) return n = e, !1;
|
|
86
108
|
}), n;
|
|
87
109
|
}
|
|
88
|
-
function
|
|
110
|
+
function f(e, t) {
|
|
89
111
|
let n = [];
|
|
90
|
-
return !t.role && !t.name ||
|
|
112
|
+
return !t.role && !t.name || l(e, (e) => {
|
|
91
113
|
t.role !== void 0 && e.role !== t.role || t.name !== void 0 && e.name !== t.name || n.push(e);
|
|
92
114
|
}), n;
|
|
93
115
|
}
|
|
94
|
-
function
|
|
116
|
+
function p(e) {
|
|
95
117
|
let t = [];
|
|
96
|
-
return
|
|
118
|
+
return l(e, (e) => {
|
|
97
119
|
t.push(e);
|
|
98
120
|
}), t;
|
|
99
121
|
}
|
|
100
122
|
//#endregion
|
|
101
123
|
//#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/dist/js-yaml.mjs
|
|
102
|
-
function
|
|
124
|
+
function m(e) {
|
|
103
125
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
104
126
|
}
|
|
105
|
-
var
|
|
106
|
-
function
|
|
107
|
-
if (
|
|
108
|
-
|
|
127
|
+
var h = {}, g = {}, _ = {}, v;
|
|
128
|
+
function y() {
|
|
129
|
+
if (v) return _;
|
|
130
|
+
v = 1;
|
|
109
131
|
function e(e) {
|
|
110
132
|
return e == null;
|
|
111
133
|
}
|
|
@@ -133,12 +155,12 @@ function v() {
|
|
|
133
155
|
function a(e) {
|
|
134
156
|
return e === 0 && 1 / e == -Infinity;
|
|
135
157
|
}
|
|
136
|
-
return
|
|
158
|
+
return _.isNothing = e, _.isObject = t, _.toArray = n, _.repeat = i, _.isNegativeZero = a, _.extend = r, _;
|
|
137
159
|
}
|
|
138
|
-
var
|
|
139
|
-
function
|
|
140
|
-
if (
|
|
141
|
-
|
|
160
|
+
var b, x;
|
|
161
|
+
function S() {
|
|
162
|
+
if (x) return b;
|
|
163
|
+
x = 1;
|
|
142
164
|
function e(e, t) {
|
|
143
165
|
let n = "", r = e.reason || "(unknown reason)";
|
|
144
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;
|
|
@@ -148,13 +170,13 @@ function x() {
|
|
|
148
170
|
}
|
|
149
171
|
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t.prototype.toString = function(t) {
|
|
150
172
|
return this.name + ": " + e(this, t);
|
|
151
|
-
},
|
|
173
|
+
}, b = t, b;
|
|
152
174
|
}
|
|
153
|
-
var
|
|
175
|
+
var C, w;
|
|
154
176
|
function ee() {
|
|
155
|
-
if (
|
|
156
|
-
|
|
157
|
-
let e =
|
|
177
|
+
if (w) return C;
|
|
178
|
+
w = 1;
|
|
179
|
+
let e = y();
|
|
158
180
|
function t(e, t, n, r, i) {
|
|
159
181
|
let a = "", o = "", s = Math.floor(i / 2) - 1;
|
|
160
182
|
return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), {
|
|
@@ -184,13 +206,13 @@ function ee() {
|
|
|
184
206
|
}
|
|
185
207
|
return u.replace(/\n$/, "");
|
|
186
208
|
}
|
|
187
|
-
return
|
|
209
|
+
return C = r, C;
|
|
188
210
|
}
|
|
189
|
-
var
|
|
190
|
-
function
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
let e =
|
|
211
|
+
var T, E;
|
|
212
|
+
function D() {
|
|
213
|
+
if (E) return T;
|
|
214
|
+
E = 1;
|
|
215
|
+
let e = S(), t = [
|
|
194
216
|
"kind",
|
|
195
217
|
"multi",
|
|
196
218
|
"resolve",
|
|
@@ -223,13 +245,13 @@ function E() {
|
|
|
223
245
|
return e;
|
|
224
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.");
|
|
225
247
|
}
|
|
226
|
-
return
|
|
248
|
+
return T = i, T;
|
|
227
249
|
}
|
|
228
|
-
var
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
let e =
|
|
250
|
+
var O, k;
|
|
251
|
+
function A() {
|
|
252
|
+
if (k) return O;
|
|
253
|
+
k = 1;
|
|
254
|
+
let e = S(), t = D();
|
|
233
255
|
function n(e, t) {
|
|
234
256
|
let n = [];
|
|
235
257
|
return e[t].forEach(function(e) {
|
|
@@ -276,48 +298,48 @@ function k() {
|
|
|
276
298
|
});
|
|
277
299
|
let c = Object.create(i.prototype);
|
|
278
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;
|
|
279
|
-
},
|
|
301
|
+
}, O = i, O;
|
|
280
302
|
}
|
|
281
|
-
var
|
|
282
|
-
function
|
|
283
|
-
return
|
|
303
|
+
var j, M;
|
|
304
|
+
function N() {
|
|
305
|
+
return M ? j : (M = 1, j = new (D())("tag:yaml.org,2002:str", {
|
|
284
306
|
kind: "scalar",
|
|
285
307
|
construct: function(e) {
|
|
286
308
|
return e === null ? "" : e;
|
|
287
309
|
}
|
|
288
|
-
}),
|
|
310
|
+
}), j);
|
|
289
311
|
}
|
|
290
|
-
var
|
|
291
|
-
function
|
|
292
|
-
return
|
|
312
|
+
var P, F;
|
|
313
|
+
function I() {
|
|
314
|
+
return F ? P : (F = 1, P = new (D())("tag:yaml.org,2002:seq", {
|
|
293
315
|
kind: "sequence",
|
|
294
316
|
construct: function(e) {
|
|
295
317
|
return e === null ? [] : e;
|
|
296
318
|
}
|
|
297
|
-
}),
|
|
319
|
+
}), P);
|
|
298
320
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
301
|
-
return
|
|
321
|
+
var L, R;
|
|
322
|
+
function z() {
|
|
323
|
+
return R ? L : (R = 1, L = new (D())("tag:yaml.org,2002:map", {
|
|
302
324
|
kind: "mapping",
|
|
303
325
|
construct: function(e) {
|
|
304
326
|
return e === null ? {} : e;
|
|
305
327
|
}
|
|
306
|
-
}),
|
|
328
|
+
}), L);
|
|
307
329
|
}
|
|
308
|
-
var
|
|
309
|
-
function
|
|
310
|
-
return
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
] }),
|
|
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);
|
|
315
337
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
318
|
-
if (
|
|
319
|
-
|
|
320
|
-
let e =
|
|
338
|
+
var U, te;
|
|
339
|
+
function W() {
|
|
340
|
+
if (te) return U;
|
|
341
|
+
te = 1;
|
|
342
|
+
let e = D();
|
|
321
343
|
function t(e) {
|
|
322
344
|
if (e === null) return !0;
|
|
323
345
|
let t = e.length;
|
|
@@ -329,7 +351,7 @@ function te() {
|
|
|
329
351
|
function r(e) {
|
|
330
352
|
return e === null;
|
|
331
353
|
}
|
|
332
|
-
return
|
|
354
|
+
return U = new e("tag:yaml.org,2002:null", {
|
|
333
355
|
kind: "scalar",
|
|
334
356
|
resolve: t,
|
|
335
357
|
construct: n,
|
|
@@ -352,13 +374,13 @@ function te() {
|
|
|
352
374
|
}
|
|
353
375
|
},
|
|
354
376
|
defaultStyle: "lowercase"
|
|
355
|
-
}),
|
|
377
|
+
}), U;
|
|
356
378
|
}
|
|
357
|
-
var
|
|
358
|
-
function
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
let e =
|
|
379
|
+
var G, K;
|
|
380
|
+
function q() {
|
|
381
|
+
if (K) return G;
|
|
382
|
+
K = 1;
|
|
383
|
+
let e = D();
|
|
362
384
|
function t(e) {
|
|
363
385
|
if (e === null) return !1;
|
|
364
386
|
let t = e.length;
|
|
@@ -370,7 +392,7 @@ function K() {
|
|
|
370
392
|
function r(e) {
|
|
371
393
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
372
394
|
}
|
|
373
|
-
return
|
|
395
|
+
return G = new e("tag:yaml.org,2002:bool", {
|
|
374
396
|
kind: "scalar",
|
|
375
397
|
resolve: t,
|
|
376
398
|
construct: n,
|
|
@@ -387,13 +409,13 @@ function K() {
|
|
|
387
409
|
}
|
|
388
410
|
},
|
|
389
411
|
defaultStyle: "lowercase"
|
|
390
|
-
}),
|
|
412
|
+
}), G;
|
|
391
413
|
}
|
|
392
|
-
var
|
|
393
|
-
function
|
|
394
|
-
if (
|
|
395
|
-
|
|
396
|
-
let e =
|
|
414
|
+
var J, Y;
|
|
415
|
+
function ne() {
|
|
416
|
+
if (Y) return J;
|
|
417
|
+
Y = 1;
|
|
418
|
+
let e = y(), t = D();
|
|
397
419
|
function n(e) {
|
|
398
420
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
399
421
|
}
|
|
@@ -454,7 +476,7 @@ function Y() {
|
|
|
454
476
|
function c(t) {
|
|
455
477
|
return Object.prototype.toString.call(t) === "[object Number]" && t % 1 == 0 && !e.isNegativeZero(t);
|
|
456
478
|
}
|
|
457
|
-
return
|
|
479
|
+
return J = new t("tag:yaml.org,2002:int", {
|
|
458
480
|
kind: "scalar",
|
|
459
481
|
resolve: a,
|
|
460
482
|
construct: s,
|
|
@@ -480,13 +502,13 @@ function Y() {
|
|
|
480
502
|
decimal: [10, "dec"],
|
|
481
503
|
hexadecimal: [16, "hex"]
|
|
482
504
|
}
|
|
483
|
-
}),
|
|
505
|
+
}), J;
|
|
484
506
|
}
|
|
485
|
-
var X,
|
|
486
|
-
function
|
|
487
|
-
if (
|
|
488
|
-
|
|
489
|
-
let e =
|
|
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))$");
|
|
490
512
|
function i(e) {
|
|
491
513
|
return e === null || !n.test(e) ? !1 : isFinite(parseFloat(e, 10)) ? !0 : r.test(e);
|
|
492
514
|
}
|
|
@@ -527,24 +549,24 @@ function re() {
|
|
|
527
549
|
defaultStyle: "lowercase"
|
|
528
550
|
}), X;
|
|
529
551
|
}
|
|
530
|
-
var Z,
|
|
531
|
-
function
|
|
532
|
-
return
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
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()
|
|
537
559
|
] }), Z);
|
|
538
560
|
}
|
|
539
|
-
var $,
|
|
540
|
-
function
|
|
541
|
-
return
|
|
561
|
+
var $, oe;
|
|
562
|
+
function se() {
|
|
563
|
+
return oe ? $ : (oe = 1, $ = Q(), $);
|
|
542
564
|
}
|
|
543
|
-
var
|
|
544
|
-
function
|
|
545
|
-
if (
|
|
546
|
-
|
|
547
|
-
let e =
|
|
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]))?))?$");
|
|
548
570
|
function r(e) {
|
|
549
571
|
return e === null ? !1 : t.exec(e) !== null || n.exec(e) !== null;
|
|
550
572
|
}
|
|
@@ -568,32 +590,32 @@ function le() {
|
|
|
568
590
|
function a(e) {
|
|
569
591
|
return e.toISOString();
|
|
570
592
|
}
|
|
571
|
-
return
|
|
593
|
+
return ce = new e("tag:yaml.org,2002:timestamp", {
|
|
572
594
|
kind: "scalar",
|
|
573
595
|
resolve: r,
|
|
574
596
|
construct: i,
|
|
575
597
|
instanceOf: Date,
|
|
576
598
|
represent: a
|
|
577
|
-
}),
|
|
599
|
+
}), ce;
|
|
578
600
|
}
|
|
579
|
-
var
|
|
580
|
-
function
|
|
581
|
-
if (
|
|
582
|
-
|
|
583
|
-
let e =
|
|
601
|
+
var de, fe;
|
|
602
|
+
function pe() {
|
|
603
|
+
if (fe) return de;
|
|
604
|
+
fe = 1;
|
|
605
|
+
let e = D();
|
|
584
606
|
function t(e) {
|
|
585
607
|
return e === "<<" || e === null;
|
|
586
608
|
}
|
|
587
|
-
return
|
|
609
|
+
return de = new e("tag:yaml.org,2002:merge", {
|
|
588
610
|
kind: "scalar",
|
|
589
611
|
resolve: t
|
|
590
|
-
}),
|
|
612
|
+
}), de;
|
|
591
613
|
}
|
|
592
|
-
var
|
|
593
|
-
function
|
|
594
|
-
if (
|
|
595
|
-
|
|
596
|
-
let e =
|
|
614
|
+
var me, he;
|
|
615
|
+
function ge() {
|
|
616
|
+
if (he) return me;
|
|
617
|
+
he = 1;
|
|
618
|
+
let e = D();
|
|
597
619
|
function t(e) {
|
|
598
620
|
if (e === null) return !1;
|
|
599
621
|
let t = 0, n = e.length;
|
|
@@ -621,19 +643,19 @@ function he() {
|
|
|
621
643
|
function i(e) {
|
|
622
644
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
623
645
|
}
|
|
624
|
-
return
|
|
646
|
+
return me = new e("tag:yaml.org,2002:binary", {
|
|
625
647
|
kind: "scalar",
|
|
626
648
|
resolve: t,
|
|
627
649
|
construct: n,
|
|
628
650
|
predicate: i,
|
|
629
651
|
represent: r
|
|
630
|
-
}),
|
|
652
|
+
}), me;
|
|
631
653
|
}
|
|
632
|
-
var
|
|
633
|
-
function
|
|
634
|
-
if (
|
|
635
|
-
|
|
636
|
-
let e =
|
|
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;
|
|
637
659
|
function r(e) {
|
|
638
660
|
if (e === null) return !0;
|
|
639
661
|
let r = [], i = e;
|
|
@@ -652,17 +674,17 @@ function ve() {
|
|
|
652
674
|
function i(e) {
|
|
653
675
|
return e === null ? [] : e;
|
|
654
676
|
}
|
|
655
|
-
return
|
|
677
|
+
return _e = new e("tag:yaml.org,2002:omap", {
|
|
656
678
|
kind: "sequence",
|
|
657
679
|
resolve: r,
|
|
658
680
|
construct: i
|
|
659
|
-
}),
|
|
681
|
+
}), _e;
|
|
660
682
|
}
|
|
661
|
-
var
|
|
662
|
-
function
|
|
663
|
-
if (
|
|
664
|
-
|
|
665
|
-
let e =
|
|
683
|
+
var be, xe;
|
|
684
|
+
function Se() {
|
|
685
|
+
if (xe) return be;
|
|
686
|
+
xe = 1;
|
|
687
|
+
let e = D(), t = Object.prototype.toString;
|
|
666
688
|
function n(e) {
|
|
667
689
|
if (e === null) return !0;
|
|
668
690
|
let n = e, r = Array(n.length);
|
|
@@ -684,17 +706,17 @@ function xe() {
|
|
|
684
706
|
}
|
|
685
707
|
return n;
|
|
686
708
|
}
|
|
687
|
-
return
|
|
709
|
+
return be = new e("tag:yaml.org,2002:pairs", {
|
|
688
710
|
kind: "sequence",
|
|
689
711
|
resolve: n,
|
|
690
712
|
construct: r
|
|
691
|
-
}),
|
|
713
|
+
}), be;
|
|
692
714
|
}
|
|
693
|
-
var
|
|
694
|
-
function
|
|
695
|
-
if (
|
|
696
|
-
|
|
697
|
-
let e =
|
|
715
|
+
var Ce, we;
|
|
716
|
+
function Te() {
|
|
717
|
+
if (we) return Ce;
|
|
718
|
+
we = 1;
|
|
719
|
+
let e = D(), t = Object.prototype.hasOwnProperty;
|
|
698
720
|
function n(e) {
|
|
699
721
|
if (e === null) return !0;
|
|
700
722
|
let n = e;
|
|
@@ -704,29 +726,29 @@ function we() {
|
|
|
704
726
|
function r(e) {
|
|
705
727
|
return e === null ? {} : e;
|
|
706
728
|
}
|
|
707
|
-
return
|
|
729
|
+
return Ce = new e("tag:yaml.org,2002:set", {
|
|
708
730
|
kind: "mapping",
|
|
709
731
|
resolve: n,
|
|
710
732
|
construct: r
|
|
711
|
-
}),
|
|
733
|
+
}), Ce;
|
|
712
734
|
}
|
|
713
|
-
var
|
|
714
|
-
function
|
|
715
|
-
return
|
|
716
|
-
implicit: [
|
|
735
|
+
var Ee, De;
|
|
736
|
+
function Oe() {
|
|
737
|
+
return De ? Ee : (De = 1, Ee = se().extend({
|
|
738
|
+
implicit: [ue(), pe()],
|
|
717
739
|
explicit: [
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
740
|
+
ge(),
|
|
741
|
+
ye(),
|
|
742
|
+
Se(),
|
|
743
|
+
Te()
|
|
722
744
|
]
|
|
723
|
-
}),
|
|
745
|
+
}), Ee);
|
|
724
746
|
}
|
|
725
|
-
var
|
|
726
|
-
function
|
|
727
|
-
if (
|
|
728
|
-
|
|
729
|
-
let e =
|
|
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;
|
|
730
752
|
function u(e) {
|
|
731
753
|
return Object.prototype.toString.call(e);
|
|
732
754
|
}
|
|
@@ -742,7 +764,7 @@ function ke() {
|
|
|
742
764
|
function m(e) {
|
|
743
765
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
744
766
|
}
|
|
745
|
-
function
|
|
767
|
+
function h(e) {
|
|
746
768
|
if (e >= 48 && e <= 57) return e - 48;
|
|
747
769
|
let t = e | 32;
|
|
748
770
|
return t >= 97 && t <= 102 ? t - 97 + 10 : -1;
|
|
@@ -750,7 +772,7 @@ function ke() {
|
|
|
750
772
|
function _(e) {
|
|
751
773
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
752
774
|
}
|
|
753
|
-
function
|
|
775
|
+
function v(e) {
|
|
754
776
|
return e >= 48 && e <= 57 ? e - 48 : -1;
|
|
755
777
|
}
|
|
756
778
|
function b(e) {
|
|
@@ -776,7 +798,7 @@ function ke() {
|
|
|
776
798
|
default: return "";
|
|
777
799
|
}
|
|
778
800
|
}
|
|
779
|
-
function
|
|
801
|
+
function x(e) {
|
|
780
802
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
|
|
781
803
|
}
|
|
782
804
|
function C(e, t, n) {
|
|
@@ -969,8 +991,8 @@ function ke() {
|
|
|
969
991
|
else if (a < 256 && w[a]) e.result += T[a], e.position++;
|
|
970
992
|
else if ((i = _(a)) > 0) {
|
|
971
993
|
let t = i, n = 0;
|
|
972
|
-
for (; t > 0; t--) a = e.input.charCodeAt(++e.position), (i =
|
|
973
|
-
e.result +=
|
|
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++;
|
|
974
996
|
} else O(e, "unknown escape sequence");
|
|
975
997
|
n = r = e.position;
|
|
976
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));
|
|
@@ -983,7 +1005,7 @@ function ke() {
|
|
|
983
1005
|
else return !1;
|
|
984
1006
|
for (e.anchor !== null && A(e, e.anchor, s), v = e.input.charCodeAt(++e.position); v !== 0;) {
|
|
985
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;
|
|
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,
|
|
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;
|
|
987
1009
|
}
|
|
988
1010
|
O(e, "unexpected end of the stream within a flow collection");
|
|
989
1011
|
}
|
|
@@ -993,7 +1015,7 @@ function ke() {
|
|
|
993
1015
|
else if (p === 62) r = !0;
|
|
994
1016
|
else return !1;
|
|
995
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");
|
|
996
|
-
else if ((u =
|
|
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);
|
|
997
1019
|
else break;
|
|
998
1020
|
if (f(p)) {
|
|
999
1021
|
do
|
|
@@ -1031,7 +1053,7 @@ function ke() {
|
|
|
1031
1053
|
continue;
|
|
1032
1054
|
}
|
|
1033
1055
|
let n = e.line;
|
|
1034
|
-
if (
|
|
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");
|
|
1035
1057
|
else if (e.lineIndent < t) break;
|
|
1036
1058
|
}
|
|
1037
1059
|
return a ? (e.tag = n, e.anchor = r, e.kind = "sequence", e.result = i, !0) : !1;
|
|
@@ -1046,7 +1068,7 @@ function ke() {
|
|
|
1046
1068
|
let y = e.input.charCodeAt(e.position + 1), b = e.line;
|
|
1047
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;
|
|
1048
1070
|
else {
|
|
1049
|
-
if (i = e.line, a = e.lineStart, o = e.position, !
|
|
1071
|
+
if (i = e.line, a = e.lineStart, o = e.position, !Z(e, n, 2, !1, !0)) break;
|
|
1050
1072
|
if (e.line === b) {
|
|
1051
1073
|
for (v = e.input.charCodeAt(e.position); f(v);) v = e.input.charCodeAt(++e.position);
|
|
1052
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;
|
|
@@ -1055,12 +1077,12 @@ function ke() {
|
|
|
1055
1077
|
} else if (_) O(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1056
1078
|
else return e.tag = s, e.anchor = c, !0;
|
|
1057
1079
|
}
|
|
1058
|
-
if ((e.line === b || e.lineIndent > t) && (g && (i = e.line, a = e.lineStart, o = e.position),
|
|
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");
|
|
1059
1081
|
else if (e.lineIndent < t) break;
|
|
1060
1082
|
}
|
|
1061
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), _;
|
|
1062
1084
|
}
|
|
1063
|
-
function
|
|
1085
|
+
function ne(e) {
|
|
1064
1086
|
let t = !1, n = !1, r, a, o = e.input.charCodeAt(e.position);
|
|
1065
1087
|
if (o !== 33) return !1;
|
|
1066
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 = "!";
|
|
@@ -1082,7 +1104,7 @@ function ke() {
|
|
|
1082
1104
|
}
|
|
1083
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;
|
|
1084
1106
|
}
|
|
1085
|
-
function
|
|
1107
|
+
function X(e) {
|
|
1086
1108
|
let t = e.input.charCodeAt(e.position);
|
|
1087
1109
|
if (t !== 38) return !1;
|
|
1088
1110
|
e.anchor !== null && O(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position);
|
|
@@ -1100,23 +1122,23 @@ function ke() {
|
|
|
1100
1122
|
let r = e.input.slice(n, e.position);
|
|
1101
1123
|
return i.call(e.anchorMap, r) || O(e, "unidentified alias \"" + r + "\""), e.result = e.anchorMap[r], V(e, !0, -1), !0;
|
|
1102
1124
|
}
|
|
1103
|
-
function
|
|
1125
|
+
function ie(e, t, n, r) {
|
|
1104
1126
|
let i = P(e);
|
|
1105
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);
|
|
1106
1128
|
}
|
|
1107
|
-
function
|
|
1129
|
+
function Z(e, t, n, r, a) {
|
|
1108
1130
|
let o, s, c = 1, l = !1, u = !1, d = null, f, p, m;
|
|
1109
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;
|
|
1110
1132
|
let h = o = s = n === 4 || n === 3;
|
|
1111
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 (;;) {
|
|
1112
1134
|
let n = e.input.charCodeAt(e.position), r = P(e);
|
|
1113
|
-
if (l && (n === 33 && e.tag !== null || n === 38 && e.anchor !== null) || !
|
|
1135
|
+
if (l && (n === 33 && e.tag !== null || n === 38 && e.anchor !== null) || !ne(e) && !X(e)) break;
|
|
1114
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;
|
|
1115
1137
|
}
|
|
1116
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;
|
|
1117
1139
|
else {
|
|
1118
1140
|
let t = e.input.charCodeAt(e.position);
|
|
1119
|
-
d !== null && h && !s && t !== 124 && t !== 62 &&
|
|
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);
|
|
1120
1142
|
}
|
|
1121
1143
|
else c === 0 && (u = s && J(e, m));
|
|
1122
1144
|
if (e.tag === null) e.anchor !== null && A(e, e.anchor, e.result);
|
|
@@ -1140,7 +1162,7 @@ function ke() {
|
|
|
1140
1162
|
}
|
|
1141
1163
|
return e.listener !== null && e.listener("close", e), --e.depth, e.tag !== null || e.anchor !== null || u;
|
|
1142
1164
|
}
|
|
1143
|
-
function
|
|
1165
|
+
function ae(e) {
|
|
1144
1166
|
let t = e.position, n = !1, r;
|
|
1145
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));) {
|
|
1146
1168
|
n = !0, r = e.input.charCodeAt(++e.position);
|
|
@@ -1161,39 +1183,39 @@ function ke() {
|
|
|
1161
1183
|
}
|
|
1162
1184
|
r !== 0 && B(e), i.call(I, a) ? I[a](e, a, o) : k(e, "unknown document directive \"" + a + "\"");
|
|
1163
1185
|
}
|
|
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"),
|
|
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)) {
|
|
1165
1187
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, V(e, !0, -1));
|
|
1166
1188
|
return;
|
|
1167
1189
|
}
|
|
1168
1190
|
e.position < e.length - 1 && O(e, "end of the stream or a document separator is expected");
|
|
1169
1191
|
}
|
|
1170
|
-
function
|
|
1192
|
+
function Q(e, t) {
|
|
1171
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)));
|
|
1172
1194
|
let n = new E(e, t), r = e.indexOf("\0");
|
|
1173
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;
|
|
1174
|
-
for (; n.position < n.length - 1;)
|
|
1196
|
+
for (; n.position < n.length - 1;) ae(n);
|
|
1175
1197
|
return n.documents;
|
|
1176
1198
|
}
|
|
1177
|
-
function
|
|
1199
|
+
function $(e, t, n) {
|
|
1178
1200
|
typeof t == "object" && t && n === void 0 && (n = t, t = null);
|
|
1179
|
-
let r =
|
|
1201
|
+
let r = Q(e, n);
|
|
1180
1202
|
if (typeof t != "function") return r;
|
|
1181
1203
|
for (let e = 0, n = r.length; e < n; e += 1) t(r[e]);
|
|
1182
1204
|
}
|
|
1183
1205
|
function oe(e, n) {
|
|
1184
|
-
let r =
|
|
1206
|
+
let r = Q(e, n);
|
|
1185
1207
|
if (r.length !== 0) {
|
|
1186
1208
|
if (r.length === 1) return r[0];
|
|
1187
1209
|
throw new t("expected a single document in the stream, but found more");
|
|
1188
1210
|
}
|
|
1189
1211
|
}
|
|
1190
|
-
return
|
|
1212
|
+
return g.loadAll = $, g.load = oe, g;
|
|
1191
1213
|
}
|
|
1192
|
-
var
|
|
1193
|
-
function
|
|
1194
|
-
if (
|
|
1195
|
-
|
|
1196
|
-
let e =
|
|
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 = {};
|
|
1197
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";
|
|
1198
1220
|
let s = [
|
|
1199
1221
|
"y",
|
|
@@ -1259,38 +1281,38 @@ function Me() {
|
|
|
1259
1281
|
function _(e) {
|
|
1260
1282
|
return g(e) && e !== a && e !== 13 && e !== 10;
|
|
1261
1283
|
}
|
|
1262
|
-
function
|
|
1284
|
+
function v(e, t, n) {
|
|
1263
1285
|
let r = _(e), i = r && !h(e);
|
|
1264
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;
|
|
1265
1287
|
}
|
|
1266
1288
|
function b(e) {
|
|
1267
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;
|
|
1268
1290
|
}
|
|
1269
|
-
function
|
|
1291
|
+
function x(e) {
|
|
1270
1292
|
return !h(e) && e !== 58;
|
|
1271
1293
|
}
|
|
1272
1294
|
function C(e, t) {
|
|
1273
1295
|
let n = e.charCodeAt(t), r;
|
|
1274
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;
|
|
1275
1297
|
}
|
|
1276
|
-
function
|
|
1298
|
+
function w(e) {
|
|
1277
1299
|
return /^\n* /.test(e);
|
|
1278
1300
|
}
|
|
1279
|
-
function
|
|
1280
|
-
let c, l = 0, u = null, d = !1, f = !1, p = r !== -1, m = -1, h = b(C(e, 0)) &&
|
|
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));
|
|
1281
1303
|
if (t || o) for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
1282
1304
|
if (l = C(e, c), !g(l)) return 5;
|
|
1283
|
-
h &&=
|
|
1305
|
+
h &&= v(l, u, s), u = l;
|
|
1284
1306
|
}
|
|
1285
1307
|
else {
|
|
1286
1308
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
1287
1309
|
if (l = C(e, c), l === 10) d = !0, p && (f ||= c - m - 1 > r && e[m + 1] !== " ", m = c);
|
|
1288
1310
|
else if (!g(l)) return 5;
|
|
1289
|
-
h &&=
|
|
1311
|
+
h &&= v(l, u, s), u = l;
|
|
1290
1312
|
}
|
|
1291
1313
|
f ||= p && c - m - 1 > r && e[m + 1] !== " ";
|
|
1292
1314
|
}
|
|
1293
|
-
return !d && !f ? h && !o && !i(e) ? 1 : a === 2 ? 5 : 2 : n > 9 &&
|
|
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;
|
|
1294
1316
|
}
|
|
1295
1317
|
function T(e, n, r, i, a) {
|
|
1296
1318
|
e.dump = (function() {
|
|
@@ -1300,7 +1322,7 @@ function Me() {
|
|
|
1300
1322
|
function d(t) {
|
|
1301
1323
|
return m(e, t);
|
|
1302
1324
|
}
|
|
1303
|
-
switch (
|
|
1325
|
+
switch (ee(n, u, e.indent, l, d, e.quotingType, e.forceQuotes && !i, a)) {
|
|
1304
1326
|
case 1: return n;
|
|
1305
1327
|
case 2: return "'" + n.replace(/'/g, "''") + "'";
|
|
1306
1328
|
case 3: return "|" + E(n, e.indent) + D(f(n, o));
|
|
@@ -1311,7 +1333,7 @@ function Me() {
|
|
|
1311
1333
|
})();
|
|
1312
1334
|
}
|
|
1313
1335
|
function E(e, t) {
|
|
1314
|
-
let n =
|
|
1336
|
+
let n = w(e) ? String(t) : "", r = e[e.length - 1] === "\n";
|
|
1315
1337
|
return n + (r && (e[e.length - 2] === "\n" || e === "\n") ? "+" : r ? "" : "-") + "\n";
|
|
1316
1338
|
}
|
|
1317
1339
|
function D(e) {
|
|
@@ -1448,39 +1470,39 @@ function Me() {
|
|
|
1448
1470
|
let r = e;
|
|
1449
1471
|
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), I(n, 0, r, !0, !0) ? n.dump + "\n" : "";
|
|
1450
1472
|
}
|
|
1451
|
-
return
|
|
1473
|
+
return je.dump = z, je;
|
|
1452
1474
|
}
|
|
1453
|
-
var
|
|
1454
|
-
function
|
|
1455
|
-
if (
|
|
1456
|
-
|
|
1457
|
-
let e =
|
|
1475
|
+
var Pe;
|
|
1476
|
+
function Fe() {
|
|
1477
|
+
if (Pe) return h;
|
|
1478
|
+
Pe = 1;
|
|
1479
|
+
let e = Ae(), t = Ne();
|
|
1458
1480
|
function n(e, t) {
|
|
1459
1481
|
return function() {
|
|
1460
1482
|
throw Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
1461
1483
|
};
|
|
1462
1484
|
}
|
|
1463
|
-
return
|
|
1464
|
-
binary:
|
|
1465
|
-
float:
|
|
1466
|
-
map:
|
|
1467
|
-
null:
|
|
1468
|
-
pairs:
|
|
1469
|
-
set:
|
|
1470
|
-
timestamp:
|
|
1471
|
-
bool:
|
|
1472
|
-
int:
|
|
1473
|
-
merge:
|
|
1474
|
-
omap:
|
|
1475
|
-
seq:
|
|
1476
|
-
str:
|
|
1477
|
-
},
|
|
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;
|
|
1478
1500
|
}
|
|
1479
|
-
var { Type:
|
|
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());
|
|
1480
1502
|
//#endregion
|
|
1481
1503
|
//#region src/element-tree/yaml.ts
|
|
1482
|
-
function
|
|
1483
|
-
return
|
|
1504
|
+
function Xe(e) {
|
|
1505
|
+
return We(Qe(e), {
|
|
1484
1506
|
indent: 2,
|
|
1485
1507
|
lineWidth: -1,
|
|
1486
1508
|
noRefs: !0,
|
|
@@ -1489,35 +1511,35 @@ function Ye(e) {
|
|
|
1489
1511
|
forceQuotes: !1
|
|
1490
1512
|
});
|
|
1491
1513
|
}
|
|
1492
|
-
function
|
|
1514
|
+
function Ze(e) {
|
|
1493
1515
|
let t;
|
|
1494
1516
|
try {
|
|
1495
|
-
t =
|
|
1517
|
+
t = He(e);
|
|
1496
1518
|
} catch (e) {
|
|
1497
1519
|
throw Error(`ElementTree YAML parse failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
1498
1520
|
}
|
|
1499
|
-
return
|
|
1521
|
+
return a(t);
|
|
1500
1522
|
}
|
|
1501
|
-
function
|
|
1523
|
+
function Qe(e) {
|
|
1502
1524
|
return {
|
|
1503
1525
|
version: e.version,
|
|
1504
|
-
source:
|
|
1505
|
-
viewport:
|
|
1506
|
-
root:
|
|
1526
|
+
source: $e(e.source),
|
|
1527
|
+
viewport: et(e.viewport),
|
|
1528
|
+
root: tt(e.root)
|
|
1507
1529
|
};
|
|
1508
1530
|
}
|
|
1509
|
-
function
|
|
1531
|
+
function $e(e) {
|
|
1510
1532
|
let t = { kind: e.kind };
|
|
1511
1533
|
return e.url !== void 0 && (t.url = e.url), e.agent !== void 0 && (t.agent = e.agent), t.capturedAt = e.capturedAt, t;
|
|
1512
1534
|
}
|
|
1513
|
-
function
|
|
1535
|
+
function et(e) {
|
|
1514
1536
|
return {
|
|
1515
1537
|
width: e.width,
|
|
1516
1538
|
height: e.height,
|
|
1517
1539
|
scale: e.scale
|
|
1518
1540
|
};
|
|
1519
1541
|
}
|
|
1520
|
-
function
|
|
1542
|
+
function tt(e) {
|
|
1521
1543
|
let t = {
|
|
1522
1544
|
ref: e.ref,
|
|
1523
1545
|
role: e.role
|
|
@@ -1535,7 +1557,7 @@ function et(e) {
|
|
|
1535
1557
|
t.attributes = r;
|
|
1536
1558
|
}
|
|
1537
1559
|
}
|
|
1538
|
-
return e.children !== void 0 && e.children.length > 0 && (t.children = e.children.map(
|
|
1560
|
+
return e.children !== void 0 && e.children.length > 0 && (t.children = e.children.map(tt)), t;
|
|
1539
1561
|
}
|
|
1540
1562
|
//#endregion
|
|
1541
|
-
export {
|
|
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 };
|