@ea-lab/reactive-json 0.6.0 → 0.7.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/dist/VariablesDebug-1UzZWgD7.js +17782 -0
- package/dist/{lodash-CYNxjS-I.js → alterData-CjaFWyAA.js} +1368 -1348
- package/dist/component/action/HashChangeListener.js +1 -1
- package/dist/component/action/MessageListener.js +2 -2
- package/dist/component/action/Popover.js +1 -1
- package/dist/component/action/ReactOnEvent.js +1 -1
- package/dist/component/action/Redirect.js +1 -1
- package/dist/component/action/SetAttributeValue.js +1 -1
- package/dist/component/action/ToggleAttributeValue.js +1 -1
- package/dist/component/action/Tooltip.js +1 -1
- package/dist/component/action/UnsetAttribute.js +1 -1
- package/dist/component/action/UnsetAttributeValue.js +1 -1
- package/dist/component/action/index.js +1 -1
- package/dist/component/dataMapping/index.js +1 -1
- package/dist/component/dataMapping/simpleMapping.js +1 -1
- package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +6 -6
- package/dist/component/element/debug/VariablesDebug/utils.js +1 -3
- package/dist/component/element/debug/index.js +1 -1
- package/dist/component/element/form/CheckBoxField.js +1 -1
- package/dist/component/element/form/DateField.js +1 -1
- package/dist/component/element/form/NumberField.js +1 -1
- package/dist/component/element/form/SelectField.js +2 -2
- package/dist/component/element/form/TextAreaField.js +1 -1
- package/dist/component/element/form/TextField.js +1 -1
- package/dist/component/element/form/formElementsCommon.js +1 -1
- package/dist/component/element/form/index.js +1 -1
- package/dist/component/element/html/AccordionItem.js +1 -1
- package/dist/component/element/html/FolderSortableTree.js +4 -5
- package/dist/component/element/html/FormatNumeral.js +2 -2
- package/dist/component/element/html/Html.js +1 -1
- package/dist/component/element/html/LabelFromValue.js +1 -1
- package/dist/component/element/html/Modal.js +1 -1
- package/dist/component/element/html/PreformattedMarkup.js +2 -3
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +1 -1
- package/dist/component/element/html/Tabs.js +1 -1
- package/dist/component/element/html/index.js +1 -1
- package/dist/component/element/index.js +29 -30
- package/dist/component/element/special/BootstrapElement.js +1 -1
- package/dist/component/element/special/Count.js +4 -5
- package/dist/component/element/special/DataFilter.js +1 -1
- package/dist/component/element/special/DelayedActions.js +1 -1
- package/dist/component/element/special/Phantom.js +1 -1
- package/dist/component/element/special/ReactiveJsonSubroot.js +4 -5
- package/dist/component/element/special/Switch.js +1 -1
- package/dist/component/element/special/index.js +1 -1
- package/dist/component/index.js +36 -37
- package/dist/component/reaction/addData.js +2 -2
- package/dist/component/reaction/fetchData.js +1 -1
- package/dist/component/reaction/index.js +1 -1
- package/dist/component/reaction/moveData.js +1 -1
- package/dist/component/reaction/postMessage.js +1 -1
- package/dist/component/reaction/redirectNow.js +1 -1
- package/dist/component/reaction/removeData.js +1 -1
- package/dist/component/reaction/setClipboardData.js +1 -1
- package/dist/component/reaction/setData.js +2 -2
- package/dist/component/reaction/submitData.js +1 -1
- package/dist/component/reaction/utility/httpRequestCommon.js +3 -3
- package/dist/component/reaction/utility/index.js +1 -1
- package/dist/coreComponentsPlugin.js +1 -1
- package/dist/engine/Actions.js +4 -5
- package/dist/engine/ReactiveJsonRoot.js +3 -5
- package/dist/engine/TemplateSystem.js +1 -1
- package/dist/engine/View.js +5 -6
- package/dist/engine/index.js +4 -4
- package/dist/engine/utility/alterData.js +2 -21
- package/dist/engine/utility/analyzeDataOverrideReferences.js +1 -1
- package/dist/engine/utility/formatString.js +1 -1
- package/dist/engine/utility/index.js +4 -4
- package/dist/engine/utility/parseRjBuild.js +1002 -23
- package/dist/main.js +72 -73
- package/package.json +1 -1
- package/dist/HashChangeListener-CZjn9YZy.js +0 -8550
- package/dist/VariablesDebug-DgS3E2aX.js +0 -9305
- package/dist/js-yaml-Bw0KO4XO.js +0 -983
|
@@ -1,43 +1,1022 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
2
|
+
function J(i) {
|
|
3
|
+
return typeof i > "u" || i === null;
|
|
4
|
+
}
|
|
5
|
+
function ti(i) {
|
|
6
|
+
return typeof i == "object" && i !== null;
|
|
7
|
+
}
|
|
8
|
+
function ai(i) {
|
|
9
|
+
return Array.isArray(i) ? i : J(i) ? [] : [i];
|
|
10
|
+
}
|
|
11
|
+
function pi(i, n) {
|
|
12
|
+
var e, l, r, u;
|
|
13
|
+
if (n)
|
|
14
|
+
for (u = Object.keys(n), e = 0, l = u.length; e < l; e += 1)
|
|
15
|
+
r = u[e], i[r] = n[r];
|
|
16
|
+
return i;
|
|
17
|
+
}
|
|
18
|
+
function hi(i, n) {
|
|
19
|
+
var e = "", l;
|
|
20
|
+
for (l = 0; l < n; l += 1)
|
|
21
|
+
e += i;
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function si(i) {
|
|
25
|
+
return i === 0 && Number.NEGATIVE_INFINITY === 1 / i;
|
|
26
|
+
}
|
|
27
|
+
var di = J, mi = ti, xi = ai, gi = hi, Ai = si, vi = pi, b = {
|
|
28
|
+
isNothing: di,
|
|
29
|
+
isObject: mi,
|
|
30
|
+
toArray: xi,
|
|
31
|
+
repeat: gi,
|
|
32
|
+
isNegativeZero: Ai,
|
|
33
|
+
extend: vi
|
|
34
|
+
};
|
|
35
|
+
function Q(i, n) {
|
|
36
|
+
var e = "", l = i.reason || "(unknown reason)";
|
|
37
|
+
return i.mark ? (i.mark.name && (e += 'in "' + i.mark.name + '" '), e += "(" + (i.mark.line + 1) + ":" + (i.mark.column + 1) + ")", !n && i.mark.snippet && (e += `
|
|
38
|
+
|
|
39
|
+
` + i.mark.snippet), l + " " + e) : l;
|
|
40
|
+
}
|
|
41
|
+
function L(i, n) {
|
|
42
|
+
Error.call(this), this.name = "YAMLException", this.reason = i, this.mark = n, this.message = Q(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
43
|
+
}
|
|
44
|
+
L.prototype = Object.create(Error.prototype);
|
|
45
|
+
L.prototype.constructor = L;
|
|
46
|
+
L.prototype.toString = function(n) {
|
|
47
|
+
return this.name + ": " + Q(this, n);
|
|
48
|
+
};
|
|
49
|
+
var k = L;
|
|
50
|
+
function P(i, n, e, l, r) {
|
|
51
|
+
var u = "", o = "", c = Math.floor(r / 2) - 1;
|
|
52
|
+
return l - n > c && (u = " ... ", n = l - c + u.length), e - l > c && (o = " ...", e = l + c - o.length), {
|
|
53
|
+
str: u + i.slice(n, e).replace(/\t/g, "→") + o,
|
|
54
|
+
pos: l - n + u.length
|
|
55
|
+
// relative position
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function B(i, n) {
|
|
59
|
+
return b.repeat(" ", n - i.length) + i;
|
|
60
|
+
}
|
|
61
|
+
function yi(i, n) {
|
|
62
|
+
if (n = Object.create(n || null), !i.buffer) return null;
|
|
63
|
+
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
64
|
+
for (var e = /\r?\n|\r|\0/g, l = [0], r = [], u, o = -1; u = e.exec(i.buffer); )
|
|
65
|
+
r.push(u.index), l.push(u.index + u[0].length), i.position <= u.index && o < 0 && (o = l.length - 2);
|
|
66
|
+
o < 0 && (o = l.length - 1);
|
|
67
|
+
var c = "", f, h, s = Math.min(i.line + n.linesAfter, r.length).toString().length, t = n.maxLength - (n.indent + s + 3);
|
|
68
|
+
for (f = 1; f <= n.linesBefore && !(o - f < 0); f++)
|
|
69
|
+
h = P(
|
|
70
|
+
i.buffer,
|
|
71
|
+
l[o - f],
|
|
72
|
+
r[o - f],
|
|
73
|
+
i.position - (l[o] - l[o - f]),
|
|
74
|
+
t
|
|
75
|
+
), c = b.repeat(" ", n.indent) + B((i.line - f + 1).toString(), s) + " | " + h.str + `
|
|
76
|
+
` + c;
|
|
77
|
+
for (h = P(i.buffer, l[o], r[o], i.position, t), c += b.repeat(" ", n.indent) + B((i.line + 1).toString(), s) + " | " + h.str + `
|
|
78
|
+
`, c += b.repeat("-", n.indent + s + 3 + h.pos) + `^
|
|
79
|
+
`, f = 1; f <= n.linesAfter && !(o + f >= r.length); f++)
|
|
80
|
+
h = P(
|
|
81
|
+
i.buffer,
|
|
82
|
+
l[o + f],
|
|
83
|
+
r[o + f],
|
|
84
|
+
i.position - (l[o] - l[o + f]),
|
|
85
|
+
t
|
|
86
|
+
), c += b.repeat(" ", n.indent) + B((i.line + f + 1).toString(), s) + " | " + h.str + `
|
|
87
|
+
`;
|
|
88
|
+
return c.replace(/\n$/, "");
|
|
89
|
+
}
|
|
90
|
+
var bi = yi, wi = [
|
|
91
|
+
"kind",
|
|
92
|
+
"multi",
|
|
93
|
+
"resolve",
|
|
94
|
+
"construct",
|
|
95
|
+
"instanceOf",
|
|
96
|
+
"predicate",
|
|
97
|
+
"represent",
|
|
98
|
+
"representName",
|
|
99
|
+
"defaultStyle",
|
|
100
|
+
"styleAliases"
|
|
101
|
+
], Ci = [
|
|
102
|
+
"scalar",
|
|
103
|
+
"sequence",
|
|
104
|
+
"mapping"
|
|
105
|
+
];
|
|
106
|
+
function _i(i) {
|
|
107
|
+
var n = {};
|
|
108
|
+
return i !== null && Object.keys(i).forEach(function(e) {
|
|
109
|
+
i[e].forEach(function(l) {
|
|
110
|
+
n[String(l)] = e;
|
|
111
|
+
});
|
|
112
|
+
}), n;
|
|
113
|
+
}
|
|
114
|
+
function ki(i, n) {
|
|
115
|
+
if (n = n || {}, Object.keys(n).forEach(function(e) {
|
|
116
|
+
if (wi.indexOf(e) === -1)
|
|
117
|
+
throw new k('Unknown option "' + e + '" is met in definition of "' + i + '" YAML type.');
|
|
118
|
+
}), this.options = n, this.tag = i, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
119
|
+
return !0;
|
|
120
|
+
}, this.construct = n.construct || function(e) {
|
|
121
|
+
return e;
|
|
122
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = _i(n.styleAliases || null), Ci.indexOf(this.kind) === -1)
|
|
123
|
+
throw new k('Unknown kind "' + this.kind + '" is specified for "' + i + '" YAML type.');
|
|
124
|
+
}
|
|
125
|
+
var y = ki;
|
|
126
|
+
function $(i, n) {
|
|
127
|
+
var e = [];
|
|
128
|
+
return i[n].forEach(function(l) {
|
|
129
|
+
var r = e.length;
|
|
130
|
+
e.forEach(function(u, o) {
|
|
131
|
+
u.tag === l.tag && u.kind === l.kind && u.multi === l.multi && (r = o);
|
|
132
|
+
}), e[r] = l;
|
|
133
|
+
}), e;
|
|
134
|
+
}
|
|
135
|
+
function Si() {
|
|
136
|
+
var i = {
|
|
137
|
+
scalar: {},
|
|
138
|
+
sequence: {},
|
|
139
|
+
mapping: {},
|
|
140
|
+
fallback: {},
|
|
141
|
+
multi: {
|
|
142
|
+
scalar: [],
|
|
143
|
+
sequence: [],
|
|
144
|
+
mapping: [],
|
|
145
|
+
fallback: []
|
|
146
|
+
}
|
|
147
|
+
}, n, e;
|
|
148
|
+
function l(r) {
|
|
149
|
+
r.multi ? (i.multi[r.kind].push(r), i.multi.fallback.push(r)) : i[r.kind][r.tag] = i.fallback[r.tag] = r;
|
|
150
|
+
}
|
|
151
|
+
for (n = 0, e = arguments.length; n < e; n += 1)
|
|
152
|
+
arguments[n].forEach(l);
|
|
153
|
+
return i;
|
|
154
|
+
}
|
|
155
|
+
function U(i) {
|
|
156
|
+
return this.extend(i);
|
|
157
|
+
}
|
|
158
|
+
U.prototype.extend = function(n) {
|
|
159
|
+
var e = [], l = [];
|
|
160
|
+
if (n instanceof y)
|
|
161
|
+
l.push(n);
|
|
162
|
+
else if (Array.isArray(n))
|
|
163
|
+
l = l.concat(n);
|
|
164
|
+
else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit)))
|
|
165
|
+
n.implicit && (e = e.concat(n.implicit)), n.explicit && (l = l.concat(n.explicit));
|
|
166
|
+
else
|
|
167
|
+
throw new k("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
168
|
+
e.forEach(function(u) {
|
|
169
|
+
if (!(u instanceof y))
|
|
170
|
+
throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
171
|
+
if (u.loadKind && u.loadKind !== "scalar")
|
|
172
|
+
throw new k("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
173
|
+
if (u.multi)
|
|
174
|
+
throw new k("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
175
|
+
}), l.forEach(function(u) {
|
|
176
|
+
if (!(u instanceof y))
|
|
177
|
+
throw new k("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
178
|
+
});
|
|
179
|
+
var r = Object.create(U.prototype);
|
|
180
|
+
return r.implicit = (this.implicit || []).concat(e), r.explicit = (this.explicit || []).concat(l), r.compiledImplicit = $(r, "implicit"), r.compiledExplicit = $(r, "explicit"), r.compiledTypeMap = Si(r.compiledImplicit, r.compiledExplicit), r;
|
|
181
|
+
};
|
|
182
|
+
var Ii = U, Ti = new y("tag:yaml.org,2002:str", {
|
|
183
|
+
kind: "scalar",
|
|
184
|
+
construct: function(i) {
|
|
185
|
+
return i !== null ? i : "";
|
|
186
|
+
}
|
|
187
|
+
}), Fi = new y("tag:yaml.org,2002:seq", {
|
|
188
|
+
kind: "sequence",
|
|
189
|
+
construct: function(i) {
|
|
190
|
+
return i !== null ? i : [];
|
|
191
|
+
}
|
|
192
|
+
}), Oi = new y("tag:yaml.org,2002:map", {
|
|
193
|
+
kind: "mapping",
|
|
194
|
+
construct: function(i) {
|
|
195
|
+
return i !== null ? i : {};
|
|
196
|
+
}
|
|
197
|
+
}), Ei = new Ii({
|
|
198
|
+
explicit: [
|
|
199
|
+
Ti,
|
|
200
|
+
Fi,
|
|
201
|
+
Oi
|
|
202
|
+
]
|
|
203
|
+
});
|
|
204
|
+
function Ni(i) {
|
|
205
|
+
if (i === null) return !0;
|
|
206
|
+
var n = i.length;
|
|
207
|
+
return n === 1 && i === "~" || n === 4 && (i === "null" || i === "Null" || i === "NULL");
|
|
208
|
+
}
|
|
209
|
+
function Li() {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
function Mi(i) {
|
|
213
|
+
return i === null;
|
|
214
|
+
}
|
|
215
|
+
var Di = new y("tag:yaml.org,2002:null", {
|
|
216
|
+
kind: "scalar",
|
|
217
|
+
resolve: Ni,
|
|
218
|
+
construct: Li,
|
|
219
|
+
predicate: Mi,
|
|
220
|
+
represent: {
|
|
221
|
+
canonical: function() {
|
|
222
|
+
return "~";
|
|
223
|
+
},
|
|
224
|
+
lowercase: function() {
|
|
225
|
+
return "null";
|
|
226
|
+
},
|
|
227
|
+
uppercase: function() {
|
|
228
|
+
return "NULL";
|
|
229
|
+
},
|
|
230
|
+
camelcase: function() {
|
|
231
|
+
return "Null";
|
|
232
|
+
},
|
|
233
|
+
empty: function() {
|
|
234
|
+
return "";
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
defaultStyle: "lowercase"
|
|
238
|
+
});
|
|
239
|
+
function ji(i) {
|
|
240
|
+
if (i === null) return !1;
|
|
241
|
+
var n = i.length;
|
|
242
|
+
return n === 4 && (i === "true" || i === "True" || i === "TRUE") || n === 5 && (i === "false" || i === "False" || i === "FALSE");
|
|
243
|
+
}
|
|
244
|
+
function Yi(i) {
|
|
245
|
+
return i === "true" || i === "True" || i === "TRUE";
|
|
246
|
+
}
|
|
247
|
+
function Pi(i) {
|
|
248
|
+
return Object.prototype.toString.call(i) === "[object Boolean]";
|
|
249
|
+
}
|
|
250
|
+
var Bi = new y("tag:yaml.org,2002:bool", {
|
|
251
|
+
kind: "scalar",
|
|
252
|
+
resolve: ji,
|
|
253
|
+
construct: Yi,
|
|
254
|
+
predicate: Pi,
|
|
255
|
+
represent: {
|
|
256
|
+
lowercase: function(i) {
|
|
257
|
+
return i ? "true" : "false";
|
|
258
|
+
},
|
|
259
|
+
uppercase: function(i) {
|
|
260
|
+
return i ? "TRUE" : "FALSE";
|
|
261
|
+
},
|
|
262
|
+
camelcase: function(i) {
|
|
263
|
+
return i ? "True" : "False";
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
defaultStyle: "lowercase"
|
|
267
|
+
});
|
|
268
|
+
function Ri(i) {
|
|
269
|
+
return 48 <= i && i <= 57 || 65 <= i && i <= 70 || 97 <= i && i <= 102;
|
|
270
|
+
}
|
|
271
|
+
function Ui(i) {
|
|
272
|
+
return 48 <= i && i <= 55;
|
|
273
|
+
}
|
|
274
|
+
function qi(i) {
|
|
275
|
+
return 48 <= i && i <= 57;
|
|
276
|
+
}
|
|
277
|
+
function Gi(i) {
|
|
278
|
+
if (i === null) return !1;
|
|
279
|
+
var n = i.length, e = 0, l = !1, r;
|
|
280
|
+
if (!n) return !1;
|
|
281
|
+
if (r = i[e], (r === "-" || r === "+") && (r = i[++e]), r === "0") {
|
|
282
|
+
if (e + 1 === n) return !0;
|
|
283
|
+
if (r = i[++e], r === "b") {
|
|
284
|
+
for (e++; e < n; e++)
|
|
285
|
+
if (r = i[e], r !== "_") {
|
|
286
|
+
if (r !== "0" && r !== "1") return !1;
|
|
287
|
+
l = !0;
|
|
288
|
+
}
|
|
289
|
+
return l && r !== "_";
|
|
290
|
+
}
|
|
291
|
+
if (r === "x") {
|
|
292
|
+
for (e++; e < n; e++)
|
|
293
|
+
if (r = i[e], r !== "_") {
|
|
294
|
+
if (!Ri(i.charCodeAt(e))) return !1;
|
|
295
|
+
l = !0;
|
|
296
|
+
}
|
|
297
|
+
return l && r !== "_";
|
|
298
|
+
}
|
|
299
|
+
if (r === "o") {
|
|
300
|
+
for (e++; e < n; e++)
|
|
301
|
+
if (r = i[e], r !== "_") {
|
|
302
|
+
if (!Ui(i.charCodeAt(e))) return !1;
|
|
303
|
+
l = !0;
|
|
304
|
+
}
|
|
305
|
+
return l && r !== "_";
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if (r === "_") return !1;
|
|
309
|
+
for (; e < n; e++)
|
|
310
|
+
if (r = i[e], r !== "_") {
|
|
311
|
+
if (!qi(i.charCodeAt(e)))
|
|
312
|
+
return !1;
|
|
313
|
+
l = !0;
|
|
314
|
+
}
|
|
315
|
+
return !(!l || r === "_");
|
|
316
|
+
}
|
|
317
|
+
function Wi(i) {
|
|
318
|
+
var n = i, e = 1, l;
|
|
319
|
+
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), l = n[0], (l === "-" || l === "+") && (l === "-" && (e = -1), n = n.slice(1), l = n[0]), n === "0") return 0;
|
|
320
|
+
if (l === "0") {
|
|
321
|
+
if (n[1] === "b") return e * parseInt(n.slice(2), 2);
|
|
322
|
+
if (n[1] === "x") return e * parseInt(n.slice(2), 16);
|
|
323
|
+
if (n[1] === "o") return e * parseInt(n.slice(2), 8);
|
|
324
|
+
}
|
|
325
|
+
return e * parseInt(n, 10);
|
|
326
|
+
}
|
|
327
|
+
function $i(i) {
|
|
328
|
+
return Object.prototype.toString.call(i) === "[object Number]" && i % 1 === 0 && !b.isNegativeZero(i);
|
|
329
|
+
}
|
|
330
|
+
var Hi = new y("tag:yaml.org,2002:int", {
|
|
331
|
+
kind: "scalar",
|
|
332
|
+
resolve: Gi,
|
|
333
|
+
construct: Wi,
|
|
334
|
+
predicate: $i,
|
|
335
|
+
represent: {
|
|
336
|
+
binary: function(i) {
|
|
337
|
+
return i >= 0 ? "0b" + i.toString(2) : "-0b" + i.toString(2).slice(1);
|
|
338
|
+
},
|
|
339
|
+
octal: function(i) {
|
|
340
|
+
return i >= 0 ? "0o" + i.toString(8) : "-0o" + i.toString(8).slice(1);
|
|
341
|
+
},
|
|
342
|
+
decimal: function(i) {
|
|
343
|
+
return i.toString(10);
|
|
344
|
+
},
|
|
345
|
+
/* eslint-disable max-len */
|
|
346
|
+
hexadecimal: function(i) {
|
|
347
|
+
return i >= 0 ? "0x" + i.toString(16).toUpperCase() : "-0x" + i.toString(16).toUpperCase().slice(1);
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
defaultStyle: "decimal",
|
|
351
|
+
styleAliases: {
|
|
352
|
+
binary: [2, "bin"],
|
|
353
|
+
octal: [8, "oct"],
|
|
354
|
+
decimal: [10, "dec"],
|
|
355
|
+
hexadecimal: [16, "hex"]
|
|
356
|
+
}
|
|
357
|
+
}), Ki = new RegExp(
|
|
358
|
+
// 2.5e4, 2.5 and integers
|
|
359
|
+
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
360
|
+
);
|
|
361
|
+
function Zi(i) {
|
|
362
|
+
return !(i === null || !Ki.test(i) || // Quick hack to not allow integers end with `_`
|
|
363
|
+
// Probably should update regexp & check speed
|
|
364
|
+
i[i.length - 1] === "_");
|
|
365
|
+
}
|
|
366
|
+
function Vi(i) {
|
|
367
|
+
var n, e;
|
|
368
|
+
return n = i.replace(/_/g, "").toLowerCase(), e = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? e === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : e * parseFloat(n, 10);
|
|
369
|
+
}
|
|
370
|
+
var Xi = /^[-+]?[0-9]+e/;
|
|
371
|
+
function zi(i, n) {
|
|
372
|
+
var e;
|
|
373
|
+
if (isNaN(i))
|
|
374
|
+
switch (n) {
|
|
375
|
+
case "lowercase":
|
|
376
|
+
return ".nan";
|
|
377
|
+
case "uppercase":
|
|
378
|
+
return ".NAN";
|
|
379
|
+
case "camelcase":
|
|
380
|
+
return ".NaN";
|
|
381
|
+
}
|
|
382
|
+
else if (Number.POSITIVE_INFINITY === i)
|
|
383
|
+
switch (n) {
|
|
384
|
+
case "lowercase":
|
|
385
|
+
return ".inf";
|
|
386
|
+
case "uppercase":
|
|
387
|
+
return ".INF";
|
|
388
|
+
case "camelcase":
|
|
389
|
+
return ".Inf";
|
|
390
|
+
}
|
|
391
|
+
else if (Number.NEGATIVE_INFINITY === i)
|
|
392
|
+
switch (n) {
|
|
393
|
+
case "lowercase":
|
|
394
|
+
return "-.inf";
|
|
395
|
+
case "uppercase":
|
|
396
|
+
return "-.INF";
|
|
397
|
+
case "camelcase":
|
|
398
|
+
return "-.Inf";
|
|
399
|
+
}
|
|
400
|
+
else if (b.isNegativeZero(i))
|
|
401
|
+
return "-0.0";
|
|
402
|
+
return e = i.toString(10), Xi.test(e) ? e.replace("e", ".e") : e;
|
|
403
|
+
}
|
|
404
|
+
function Ji(i) {
|
|
405
|
+
return Object.prototype.toString.call(i) === "[object Number]" && (i % 1 !== 0 || b.isNegativeZero(i));
|
|
406
|
+
}
|
|
407
|
+
var Qi = new y("tag:yaml.org,2002:float", {
|
|
408
|
+
kind: "scalar",
|
|
409
|
+
resolve: Zi,
|
|
410
|
+
construct: Vi,
|
|
411
|
+
predicate: Ji,
|
|
412
|
+
represent: zi,
|
|
413
|
+
defaultStyle: "lowercase"
|
|
414
|
+
}), nn = Ei.extend({
|
|
415
|
+
implicit: [
|
|
416
|
+
Di,
|
|
417
|
+
Bi,
|
|
418
|
+
Hi,
|
|
419
|
+
Qi
|
|
420
|
+
]
|
|
421
|
+
}), en = nn, ii = new RegExp(
|
|
422
|
+
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
423
|
+
), ni = new RegExp(
|
|
424
|
+
"^([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]))?))?$"
|
|
425
|
+
);
|
|
426
|
+
function rn(i) {
|
|
427
|
+
return i === null ? !1 : ii.exec(i) !== null || ni.exec(i) !== null;
|
|
428
|
+
}
|
|
429
|
+
function ln(i) {
|
|
430
|
+
var n, e, l, r, u, o, c, f = 0, h = null, s, t, g;
|
|
431
|
+
if (n = ii.exec(i), n === null && (n = ni.exec(i)), n === null) throw new Error("Date resolve error");
|
|
432
|
+
if (e = +n[1], l = +n[2] - 1, r = +n[3], !n[4])
|
|
433
|
+
return new Date(Date.UTC(e, l, r));
|
|
434
|
+
if (u = +n[4], o = +n[5], c = +n[6], n[7]) {
|
|
435
|
+
for (f = n[7].slice(0, 3); f.length < 3; )
|
|
436
|
+
f += "0";
|
|
437
|
+
f = +f;
|
|
438
|
+
}
|
|
439
|
+
return n[9] && (s = +n[10], t = +(n[11] || 0), h = (s * 60 + t) * 6e4, n[9] === "-" && (h = -h)), g = new Date(Date.UTC(e, l, r, u, o, c, f)), h && g.setTime(g.getTime() - h), g;
|
|
440
|
+
}
|
|
441
|
+
function on(i) {
|
|
442
|
+
return i.toISOString();
|
|
443
|
+
}
|
|
444
|
+
var un = new y("tag:yaml.org,2002:timestamp", {
|
|
445
|
+
kind: "scalar",
|
|
446
|
+
resolve: rn,
|
|
447
|
+
construct: ln,
|
|
448
|
+
instanceOf: Date,
|
|
449
|
+
represent: on
|
|
450
|
+
});
|
|
451
|
+
function cn(i) {
|
|
452
|
+
return i === "<<" || i === null;
|
|
453
|
+
}
|
|
454
|
+
var fn = new y("tag:yaml.org,2002:merge", {
|
|
455
|
+
kind: "scalar",
|
|
456
|
+
resolve: cn
|
|
457
|
+
}), q = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
458
|
+
\r`;
|
|
459
|
+
function tn(i) {
|
|
460
|
+
if (i === null) return !1;
|
|
461
|
+
var n, e, l = 0, r = i.length, u = q;
|
|
462
|
+
for (e = 0; e < r; e++)
|
|
463
|
+
if (n = u.indexOf(i.charAt(e)), !(n > 64)) {
|
|
464
|
+
if (n < 0) return !1;
|
|
465
|
+
l += 6;
|
|
466
|
+
}
|
|
467
|
+
return l % 8 === 0;
|
|
468
|
+
}
|
|
469
|
+
function an(i) {
|
|
470
|
+
var n, e, l = i.replace(/[\r\n=]/g, ""), r = l.length, u = q, o = 0, c = [];
|
|
471
|
+
for (n = 0; n < r; n++)
|
|
472
|
+
n % 4 === 0 && n && (c.push(o >> 16 & 255), c.push(o >> 8 & 255), c.push(o & 255)), o = o << 6 | u.indexOf(l.charAt(n));
|
|
473
|
+
return e = r % 4 * 6, e === 0 ? (c.push(o >> 16 & 255), c.push(o >> 8 & 255), c.push(o & 255)) : e === 18 ? (c.push(o >> 10 & 255), c.push(o >> 2 & 255)) : e === 12 && c.push(o >> 4 & 255), new Uint8Array(c);
|
|
474
|
+
}
|
|
475
|
+
function pn(i) {
|
|
476
|
+
var n = "", e = 0, l, r, u = i.length, o = q;
|
|
477
|
+
for (l = 0; l < u; l++)
|
|
478
|
+
l % 3 === 0 && l && (n += o[e >> 18 & 63], n += o[e >> 12 & 63], n += o[e >> 6 & 63], n += o[e & 63]), e = (e << 8) + i[l];
|
|
479
|
+
return r = u % 3, r === 0 ? (n += o[e >> 18 & 63], n += o[e >> 12 & 63], n += o[e >> 6 & 63], n += o[e & 63]) : r === 2 ? (n += o[e >> 10 & 63], n += o[e >> 4 & 63], n += o[e << 2 & 63], n += o[64]) : r === 1 && (n += o[e >> 2 & 63], n += o[e << 4 & 63], n += o[64], n += o[64]), n;
|
|
480
|
+
}
|
|
481
|
+
function hn(i) {
|
|
482
|
+
return Object.prototype.toString.call(i) === "[object Uint8Array]";
|
|
483
|
+
}
|
|
484
|
+
var sn = new y("tag:yaml.org,2002:binary", {
|
|
485
|
+
kind: "scalar",
|
|
486
|
+
resolve: tn,
|
|
487
|
+
construct: an,
|
|
488
|
+
predicate: hn,
|
|
489
|
+
represent: pn
|
|
490
|
+
}), dn = Object.prototype.hasOwnProperty, mn = Object.prototype.toString;
|
|
491
|
+
function xn(i) {
|
|
492
|
+
if (i === null) return !0;
|
|
493
|
+
var n = [], e, l, r, u, o, c = i;
|
|
494
|
+
for (e = 0, l = c.length; e < l; e += 1) {
|
|
495
|
+
if (r = c[e], o = !1, mn.call(r) !== "[object Object]") return !1;
|
|
496
|
+
for (u in r)
|
|
497
|
+
if (dn.call(r, u))
|
|
498
|
+
if (!o) o = !0;
|
|
499
|
+
else return !1;
|
|
500
|
+
if (!o) return !1;
|
|
501
|
+
if (n.indexOf(u) === -1) n.push(u);
|
|
502
|
+
else return !1;
|
|
503
|
+
}
|
|
504
|
+
return !0;
|
|
505
|
+
}
|
|
506
|
+
function gn(i) {
|
|
507
|
+
return i !== null ? i : [];
|
|
508
|
+
}
|
|
509
|
+
var An = new y("tag:yaml.org,2002:omap", {
|
|
510
|
+
kind: "sequence",
|
|
511
|
+
resolve: xn,
|
|
512
|
+
construct: gn
|
|
513
|
+
}), vn = Object.prototype.toString;
|
|
514
|
+
function yn(i) {
|
|
515
|
+
if (i === null) return !0;
|
|
516
|
+
var n, e, l, r, u, o = i;
|
|
517
|
+
for (u = new Array(o.length), n = 0, e = o.length; n < e; n += 1) {
|
|
518
|
+
if (l = o[n], vn.call(l) !== "[object Object]" || (r = Object.keys(l), r.length !== 1)) return !1;
|
|
519
|
+
u[n] = [r[0], l[r[0]]];
|
|
520
|
+
}
|
|
521
|
+
return !0;
|
|
522
|
+
}
|
|
523
|
+
function bn(i) {
|
|
524
|
+
if (i === null) return [];
|
|
525
|
+
var n, e, l, r, u, o = i;
|
|
526
|
+
for (u = new Array(o.length), n = 0, e = o.length; n < e; n += 1)
|
|
527
|
+
l = o[n], r = Object.keys(l), u[n] = [r[0], l[r[0]]];
|
|
528
|
+
return u;
|
|
529
|
+
}
|
|
530
|
+
var wn = new y("tag:yaml.org,2002:pairs", {
|
|
531
|
+
kind: "sequence",
|
|
532
|
+
resolve: yn,
|
|
533
|
+
construct: bn
|
|
534
|
+
}), Cn = Object.prototype.hasOwnProperty;
|
|
535
|
+
function _n(i) {
|
|
536
|
+
if (i === null) return !0;
|
|
537
|
+
var n, e = i;
|
|
538
|
+
for (n in e)
|
|
539
|
+
if (Cn.call(e, n) && e[n] !== null)
|
|
540
|
+
return !1;
|
|
541
|
+
return !0;
|
|
542
|
+
}
|
|
543
|
+
function kn(i) {
|
|
544
|
+
return i !== null ? i : {};
|
|
545
|
+
}
|
|
546
|
+
var Sn = new y("tag:yaml.org,2002:set", {
|
|
547
|
+
kind: "mapping",
|
|
548
|
+
resolve: _n,
|
|
549
|
+
construct: kn
|
|
550
|
+
}), In = en.extend({
|
|
551
|
+
implicit: [
|
|
552
|
+
un,
|
|
553
|
+
fn
|
|
554
|
+
],
|
|
555
|
+
explicit: [
|
|
556
|
+
sn,
|
|
557
|
+
An,
|
|
558
|
+
wn,
|
|
559
|
+
Sn
|
|
560
|
+
]
|
|
561
|
+
}), I = Object.prototype.hasOwnProperty, M = 1, ei = 2, ri = 3, D = 4, R = 1, Tn = 2, H = 3, Fn = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, On = /[\x85\u2028\u2029]/, En = /[,\[\]\{\}]/, li = /^(?:!|!!|![a-z\-]+!)$/i, oi = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
562
|
+
function K(i) {
|
|
563
|
+
return Object.prototype.toString.call(i);
|
|
564
|
+
}
|
|
565
|
+
function _(i) {
|
|
566
|
+
return i === 10 || i === 13;
|
|
567
|
+
}
|
|
568
|
+
function T(i) {
|
|
569
|
+
return i === 9 || i === 32;
|
|
570
|
+
}
|
|
571
|
+
function w(i) {
|
|
572
|
+
return i === 9 || i === 32 || i === 10 || i === 13;
|
|
573
|
+
}
|
|
574
|
+
function O(i) {
|
|
575
|
+
return i === 44 || i === 91 || i === 93 || i === 123 || i === 125;
|
|
576
|
+
}
|
|
577
|
+
function Nn(i) {
|
|
578
|
+
var n;
|
|
579
|
+
return 48 <= i && i <= 57 ? i - 48 : (n = i | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
580
|
+
}
|
|
581
|
+
function Ln(i) {
|
|
582
|
+
return i === 120 ? 2 : i === 117 ? 4 : i === 85 ? 8 : 0;
|
|
583
|
+
}
|
|
584
|
+
function Mn(i) {
|
|
585
|
+
return 48 <= i && i <= 57 ? i - 48 : -1;
|
|
586
|
+
}
|
|
587
|
+
function Z(i) {
|
|
588
|
+
return i === 48 ? "\0" : i === 97 ? "\x07" : i === 98 ? "\b" : i === 116 || i === 9 ? " " : i === 110 ? `
|
|
589
|
+
` : i === 118 ? "\v" : i === 102 ? "\f" : i === 114 ? "\r" : i === 101 ? "\x1B" : i === 32 ? " " : i === 34 ? '"' : i === 47 ? "/" : i === 92 ? "\\" : i === 78 ? "
" : i === 95 ? " " : i === 76 ? "\u2028" : i === 80 ? "\u2029" : "";
|
|
590
|
+
}
|
|
591
|
+
function Dn(i) {
|
|
592
|
+
return i <= 65535 ? String.fromCharCode(i) : String.fromCharCode(
|
|
593
|
+
(i - 65536 >> 10) + 55296,
|
|
594
|
+
(i - 65536 & 1023) + 56320
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
var ui = new Array(256), ci = new Array(256);
|
|
598
|
+
for (var F = 0; F < 256; F++)
|
|
599
|
+
ui[F] = Z(F) ? 1 : 0, ci[F] = Z(F);
|
|
600
|
+
function jn(i, n) {
|
|
601
|
+
this.input = i, this.filename = n.filename || null, this.schema = n.schema || In, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = i.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
602
|
+
}
|
|
603
|
+
function fi(i, n) {
|
|
604
|
+
var e = {
|
|
605
|
+
name: i.filename,
|
|
606
|
+
buffer: i.input.slice(0, -1),
|
|
607
|
+
// omit trailing \0
|
|
608
|
+
position: i.position,
|
|
609
|
+
line: i.line,
|
|
610
|
+
column: i.position - i.lineStart
|
|
611
|
+
};
|
|
612
|
+
return e.snippet = bi(e), new k(n, e);
|
|
613
|
+
}
|
|
614
|
+
function a(i, n) {
|
|
615
|
+
throw fi(i, n);
|
|
616
|
+
}
|
|
617
|
+
function j(i, n) {
|
|
618
|
+
i.onWarning && i.onWarning.call(null, fi(i, n));
|
|
619
|
+
}
|
|
620
|
+
var V = {
|
|
621
|
+
YAML: function(n, e, l) {
|
|
622
|
+
var r, u, o;
|
|
623
|
+
n.version !== null && a(n, "duplication of %YAML directive"), l.length !== 1 && a(n, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(l[0]), r === null && a(n, "ill-formed argument of the YAML directive"), u = parseInt(r[1], 10), o = parseInt(r[2], 10), u !== 1 && a(n, "unacceptable YAML version of the document"), n.version = l[0], n.checkLineBreaks = o < 2, o !== 1 && o !== 2 && j(n, "unsupported YAML version of the document");
|
|
624
|
+
},
|
|
625
|
+
TAG: function(n, e, l) {
|
|
626
|
+
var r, u;
|
|
627
|
+
l.length !== 2 && a(n, "TAG directive accepts exactly two arguments"), r = l[0], u = l[1], li.test(r) || a(n, "ill-formed tag handle (first argument) of the TAG directive"), I.call(n.tagMap, r) && a(n, 'there is a previously declared suffix for "' + r + '" tag handle'), oi.test(u) || a(n, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
628
|
+
try {
|
|
629
|
+
u = decodeURIComponent(u);
|
|
630
|
+
} catch {
|
|
631
|
+
a(n, "tag prefix is malformed: " + u);
|
|
632
|
+
}
|
|
633
|
+
n.tagMap[r] = u;
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
function S(i, n, e, l) {
|
|
637
|
+
var r, u, o, c;
|
|
638
|
+
if (n < e) {
|
|
639
|
+
if (c = i.input.slice(n, e), l)
|
|
640
|
+
for (r = 0, u = c.length; r < u; r += 1)
|
|
641
|
+
o = c.charCodeAt(r), o === 9 || 32 <= o && o <= 1114111 || a(i, "expected valid JSON character");
|
|
642
|
+
else Fn.test(c) && a(i, "the stream contains non-printable characters");
|
|
643
|
+
i.result += c;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
function X(i, n, e, l) {
|
|
647
|
+
var r, u, o, c;
|
|
648
|
+
for (b.isObject(e) || a(i, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(e), o = 0, c = r.length; o < c; o += 1)
|
|
649
|
+
u = r[o], I.call(n, u) || (n[u] = e[u], l[u] = !0);
|
|
650
|
+
}
|
|
651
|
+
function E(i, n, e, l, r, u, o, c, f) {
|
|
652
|
+
var h, s;
|
|
653
|
+
if (Array.isArray(r))
|
|
654
|
+
for (r = Array.prototype.slice.call(r), h = 0, s = r.length; h < s; h += 1)
|
|
655
|
+
Array.isArray(r[h]) && a(i, "nested arrays are not supported inside keys"), typeof r == "object" && K(r[h]) === "[object Object]" && (r[h] = "[object Object]");
|
|
656
|
+
if (typeof r == "object" && K(r) === "[object Object]" && (r = "[object Object]"), r = String(r), n === null && (n = {}), l === "tag:yaml.org,2002:merge")
|
|
657
|
+
if (Array.isArray(u))
|
|
658
|
+
for (h = 0, s = u.length; h < s; h += 1)
|
|
659
|
+
X(i, n, u[h], e);
|
|
660
|
+
else
|
|
661
|
+
X(i, n, u, e);
|
|
662
|
+
else
|
|
663
|
+
!i.json && !I.call(e, r) && I.call(n, r) && (i.line = o || i.line, i.lineStart = c || i.lineStart, i.position = f || i.position, a(i, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(n, r, {
|
|
664
|
+
configurable: !0,
|
|
665
|
+
enumerable: !0,
|
|
666
|
+
writable: !0,
|
|
667
|
+
value: u
|
|
668
|
+
}) : n[r] = u, delete e[r];
|
|
669
|
+
return n;
|
|
670
|
+
}
|
|
671
|
+
function G(i) {
|
|
672
|
+
var n;
|
|
673
|
+
n = i.input.charCodeAt(i.position), n === 10 ? i.position++ : n === 13 ? (i.position++, i.input.charCodeAt(i.position) === 10 && i.position++) : a(i, "a line break is expected"), i.line += 1, i.lineStart = i.position, i.firstTabInLine = -1;
|
|
674
|
+
}
|
|
675
|
+
function v(i, n, e) {
|
|
676
|
+
for (var l = 0, r = i.input.charCodeAt(i.position); r !== 0; ) {
|
|
677
|
+
for (; T(r); )
|
|
678
|
+
r === 9 && i.firstTabInLine === -1 && (i.firstTabInLine = i.position), r = i.input.charCodeAt(++i.position);
|
|
679
|
+
if (n && r === 35)
|
|
680
|
+
do
|
|
681
|
+
r = i.input.charCodeAt(++i.position);
|
|
682
|
+
while (r !== 10 && r !== 13 && r !== 0);
|
|
683
|
+
if (_(r))
|
|
684
|
+
for (G(i), r = i.input.charCodeAt(i.position), l++, i.lineIndent = 0; r === 32; )
|
|
685
|
+
i.lineIndent++, r = i.input.charCodeAt(++i.position);
|
|
686
|
+
else
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
return e !== -1 && l !== 0 && i.lineIndent < e && j(i, "deficient indentation"), l;
|
|
690
|
+
}
|
|
691
|
+
function Y(i) {
|
|
692
|
+
var n = i.position, e;
|
|
693
|
+
return e = i.input.charCodeAt(n), !!((e === 45 || e === 46) && e === i.input.charCodeAt(n + 1) && e === i.input.charCodeAt(n + 2) && (n += 3, e = i.input.charCodeAt(n), e === 0 || w(e)));
|
|
694
|
+
}
|
|
695
|
+
function W(i, n) {
|
|
696
|
+
n === 1 ? i.result += " " : n > 1 && (i.result += b.repeat(`
|
|
697
|
+
`, n - 1));
|
|
698
|
+
}
|
|
699
|
+
function Yn(i, n, e) {
|
|
700
|
+
var l, r, u, o, c, f, h, s, t = i.kind, g = i.result, p;
|
|
701
|
+
if (p = i.input.charCodeAt(i.position), w(p) || O(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (r = i.input.charCodeAt(i.position + 1), w(r) || e && O(r)))
|
|
702
|
+
return !1;
|
|
703
|
+
for (i.kind = "scalar", i.result = "", u = o = i.position, c = !1; p !== 0; ) {
|
|
704
|
+
if (p === 58) {
|
|
705
|
+
if (r = i.input.charCodeAt(i.position + 1), w(r) || e && O(r))
|
|
706
|
+
break;
|
|
707
|
+
} else if (p === 35) {
|
|
708
|
+
if (l = i.input.charCodeAt(i.position - 1), w(l))
|
|
709
|
+
break;
|
|
710
|
+
} else {
|
|
711
|
+
if (i.position === i.lineStart && Y(i) || e && O(p))
|
|
712
|
+
break;
|
|
713
|
+
if (_(p))
|
|
714
|
+
if (f = i.line, h = i.lineStart, s = i.lineIndent, v(i, !1, -1), i.lineIndent >= n) {
|
|
715
|
+
c = !0, p = i.input.charCodeAt(i.position);
|
|
716
|
+
continue;
|
|
717
|
+
} else {
|
|
718
|
+
i.position = o, i.line = f, i.lineStart = h, i.lineIndent = s;
|
|
719
|
+
break;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
c && (S(i, u, o, !1), W(i, i.line - f), u = o = i.position, c = !1), T(p) || (o = i.position + 1), p = i.input.charCodeAt(++i.position);
|
|
723
|
+
}
|
|
724
|
+
return S(i, u, o, !1), i.result ? !0 : (i.kind = t, i.result = g, !1);
|
|
725
|
+
}
|
|
726
|
+
function Pn(i, n) {
|
|
727
|
+
var e, l, r;
|
|
728
|
+
if (e = i.input.charCodeAt(i.position), e !== 39)
|
|
729
|
+
return !1;
|
|
730
|
+
for (i.kind = "scalar", i.result = "", i.position++, l = r = i.position; (e = i.input.charCodeAt(i.position)) !== 0; )
|
|
731
|
+
if (e === 39)
|
|
732
|
+
if (S(i, l, i.position, !0), e = i.input.charCodeAt(++i.position), e === 39)
|
|
733
|
+
l = i.position, i.position++, r = i.position;
|
|
734
|
+
else
|
|
735
|
+
return !0;
|
|
736
|
+
else _(e) ? (S(i, l, r, !0), W(i, v(i, !1, n)), l = r = i.position) : i.position === i.lineStart && Y(i) ? a(i, "unexpected end of the document within a single quoted scalar") : (i.position++, r = i.position);
|
|
737
|
+
a(i, "unexpected end of the stream within a single quoted scalar");
|
|
738
|
+
}
|
|
739
|
+
function Bn(i, n) {
|
|
740
|
+
var e, l, r, u, o, c;
|
|
741
|
+
if (c = i.input.charCodeAt(i.position), c !== 34)
|
|
742
|
+
return !1;
|
|
743
|
+
for (i.kind = "scalar", i.result = "", i.position++, e = l = i.position; (c = i.input.charCodeAt(i.position)) !== 0; ) {
|
|
744
|
+
if (c === 34)
|
|
745
|
+
return S(i, e, i.position, !0), i.position++, !0;
|
|
746
|
+
if (c === 92) {
|
|
747
|
+
if (S(i, e, i.position, !0), c = i.input.charCodeAt(++i.position), _(c))
|
|
748
|
+
v(i, !1, n);
|
|
749
|
+
else if (c < 256 && ui[c])
|
|
750
|
+
i.result += ci[c], i.position++;
|
|
751
|
+
else if ((o = Ln(c)) > 0) {
|
|
752
|
+
for (r = o, u = 0; r > 0; r--)
|
|
753
|
+
c = i.input.charCodeAt(++i.position), (o = Nn(c)) >= 0 ? u = (u << 4) + o : a(i, "expected hexadecimal character");
|
|
754
|
+
i.result += Dn(u), i.position++;
|
|
755
|
+
} else
|
|
756
|
+
a(i, "unknown escape sequence");
|
|
757
|
+
e = l = i.position;
|
|
758
|
+
} else _(c) ? (S(i, e, l, !0), W(i, v(i, !1, n)), e = l = i.position) : i.position === i.lineStart && Y(i) ? a(i, "unexpected end of the document within a double quoted scalar") : (i.position++, l = i.position);
|
|
759
|
+
}
|
|
760
|
+
a(i, "unexpected end of the stream within a double quoted scalar");
|
|
761
|
+
}
|
|
762
|
+
function Rn(i, n) {
|
|
763
|
+
var e = !0, l, r, u, o = i.tag, c, f = i.anchor, h, s, t, g, p, m = /* @__PURE__ */ Object.create(null), A, x, C, d;
|
|
764
|
+
if (d = i.input.charCodeAt(i.position), d === 91)
|
|
765
|
+
s = 93, p = !1, c = [];
|
|
766
|
+
else if (d === 123)
|
|
767
|
+
s = 125, p = !0, c = {};
|
|
768
|
+
else
|
|
769
|
+
return !1;
|
|
770
|
+
for (i.anchor !== null && (i.anchorMap[i.anchor] = c), d = i.input.charCodeAt(++i.position); d !== 0; ) {
|
|
771
|
+
if (v(i, !0, n), d = i.input.charCodeAt(i.position), d === s)
|
|
772
|
+
return i.position++, i.tag = o, i.anchor = f, i.kind = p ? "mapping" : "sequence", i.result = c, !0;
|
|
773
|
+
e ? d === 44 && a(i, "expected the node content, but found ','") : a(i, "missed comma between flow collection entries"), x = A = C = null, t = g = !1, d === 63 && (h = i.input.charCodeAt(i.position + 1), w(h) && (t = g = !0, i.position++, v(i, !0, n))), l = i.line, r = i.lineStart, u = i.position, N(i, n, M, !1, !0), x = i.tag, A = i.result, v(i, !0, n), d = i.input.charCodeAt(i.position), (g || i.line === l) && d === 58 && (t = !0, d = i.input.charCodeAt(++i.position), v(i, !0, n), N(i, n, M, !1, !0), C = i.result), p ? E(i, c, m, x, A, C, l, r, u) : t ? c.push(E(i, null, m, x, A, C, l, r, u)) : c.push(A), v(i, !0, n), d = i.input.charCodeAt(i.position), d === 44 ? (e = !0, d = i.input.charCodeAt(++i.position)) : e = !1;
|
|
774
|
+
}
|
|
775
|
+
a(i, "unexpected end of the stream within a flow collection");
|
|
776
|
+
}
|
|
777
|
+
function Un(i, n) {
|
|
778
|
+
var e, l, r = R, u = !1, o = !1, c = n, f = 0, h = !1, s, t;
|
|
779
|
+
if (t = i.input.charCodeAt(i.position), t === 124)
|
|
780
|
+
l = !1;
|
|
781
|
+
else if (t === 62)
|
|
782
|
+
l = !0;
|
|
783
|
+
else
|
|
784
|
+
return !1;
|
|
785
|
+
for (i.kind = "scalar", i.result = ""; t !== 0; )
|
|
786
|
+
if (t = i.input.charCodeAt(++i.position), t === 43 || t === 45)
|
|
787
|
+
R === r ? r = t === 43 ? H : Tn : a(i, "repeat of a chomping mode identifier");
|
|
788
|
+
else if ((s = Mn(t)) >= 0)
|
|
789
|
+
s === 0 ? a(i, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? a(i, "repeat of an indentation width identifier") : (c = n + s - 1, o = !0);
|
|
790
|
+
else
|
|
791
|
+
break;
|
|
792
|
+
if (T(t)) {
|
|
793
|
+
do
|
|
794
|
+
t = i.input.charCodeAt(++i.position);
|
|
795
|
+
while (T(t));
|
|
796
|
+
if (t === 35)
|
|
797
|
+
do
|
|
798
|
+
t = i.input.charCodeAt(++i.position);
|
|
799
|
+
while (!_(t) && t !== 0);
|
|
800
|
+
}
|
|
801
|
+
for (; t !== 0; ) {
|
|
802
|
+
for (G(i), i.lineIndent = 0, t = i.input.charCodeAt(i.position); (!o || i.lineIndent < c) && t === 32; )
|
|
803
|
+
i.lineIndent++, t = i.input.charCodeAt(++i.position);
|
|
804
|
+
if (!o && i.lineIndent > c && (c = i.lineIndent), _(t)) {
|
|
805
|
+
f++;
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
if (i.lineIndent < c) {
|
|
809
|
+
r === H ? i.result += b.repeat(`
|
|
810
|
+
`, u ? 1 + f : f) : r === R && u && (i.result += `
|
|
811
|
+
`);
|
|
812
|
+
break;
|
|
813
|
+
}
|
|
814
|
+
for (l ? T(t) ? (h = !0, i.result += b.repeat(`
|
|
815
|
+
`, u ? 1 + f : f)) : h ? (h = !1, i.result += b.repeat(`
|
|
816
|
+
`, f + 1)) : f === 0 ? u && (i.result += " ") : i.result += b.repeat(`
|
|
817
|
+
`, f) : i.result += b.repeat(`
|
|
818
|
+
`, u ? 1 + f : f), u = !0, o = !0, f = 0, e = i.position; !_(t) && t !== 0; )
|
|
819
|
+
t = i.input.charCodeAt(++i.position);
|
|
820
|
+
S(i, e, i.position, !1);
|
|
821
|
+
}
|
|
822
|
+
return !0;
|
|
823
|
+
}
|
|
824
|
+
function z(i, n) {
|
|
825
|
+
var e, l = i.tag, r = i.anchor, u = [], o, c = !1, f;
|
|
826
|
+
if (i.firstTabInLine !== -1) return !1;
|
|
827
|
+
for (i.anchor !== null && (i.anchorMap[i.anchor] = u), f = i.input.charCodeAt(i.position); f !== 0 && (i.firstTabInLine !== -1 && (i.position = i.firstTabInLine, a(i, "tab characters must not be used in indentation")), !(f !== 45 || (o = i.input.charCodeAt(i.position + 1), !w(o)))); ) {
|
|
828
|
+
if (c = !0, i.position++, v(i, !0, -1) && i.lineIndent <= n) {
|
|
829
|
+
u.push(null), f = i.input.charCodeAt(i.position);
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
if (e = i.line, N(i, n, ri, !1, !0), u.push(i.result), v(i, !0, -1), f = i.input.charCodeAt(i.position), (i.line === e || i.lineIndent > n) && f !== 0)
|
|
833
|
+
a(i, "bad indentation of a sequence entry");
|
|
834
|
+
else if (i.lineIndent < n)
|
|
835
|
+
break;
|
|
836
|
+
}
|
|
837
|
+
return c ? (i.tag = l, i.anchor = r, i.kind = "sequence", i.result = u, !0) : !1;
|
|
838
|
+
}
|
|
839
|
+
function qn(i, n, e) {
|
|
840
|
+
var l, r, u, o, c, f, h = i.tag, s = i.anchor, t = {}, g = /* @__PURE__ */ Object.create(null), p = null, m = null, A = null, x = !1, C = !1, d;
|
|
841
|
+
if (i.firstTabInLine !== -1) return !1;
|
|
842
|
+
for (i.anchor !== null && (i.anchorMap[i.anchor] = t), d = i.input.charCodeAt(i.position); d !== 0; ) {
|
|
843
|
+
if (!x && i.firstTabInLine !== -1 && (i.position = i.firstTabInLine, a(i, "tab characters must not be used in indentation")), l = i.input.charCodeAt(i.position + 1), u = i.line, (d === 63 || d === 58) && w(l))
|
|
844
|
+
d === 63 ? (x && (E(i, t, g, p, m, null, o, c, f), p = m = A = null), C = !0, x = !0, r = !0) : x ? (x = !1, r = !0) : a(i, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), i.position += 1, d = l;
|
|
845
|
+
else {
|
|
846
|
+
if (o = i.line, c = i.lineStart, f = i.position, !N(i, e, ei, !1, !0))
|
|
847
|
+
break;
|
|
848
|
+
if (i.line === u) {
|
|
849
|
+
for (d = i.input.charCodeAt(i.position); T(d); )
|
|
850
|
+
d = i.input.charCodeAt(++i.position);
|
|
851
|
+
if (d === 58)
|
|
852
|
+
d = i.input.charCodeAt(++i.position), w(d) || a(i, "a whitespace character is expected after the key-value separator within a block mapping"), x && (E(i, t, g, p, m, null, o, c, f), p = m = A = null), C = !0, x = !1, r = !1, p = i.tag, m = i.result;
|
|
853
|
+
else if (C)
|
|
854
|
+
a(i, "can not read an implicit mapping pair; a colon is missed");
|
|
855
|
+
else
|
|
856
|
+
return i.tag = h, i.anchor = s, !0;
|
|
857
|
+
} else if (C)
|
|
858
|
+
a(i, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
859
|
+
else
|
|
860
|
+
return i.tag = h, i.anchor = s, !0;
|
|
861
|
+
}
|
|
862
|
+
if ((i.line === u || i.lineIndent > n) && (x && (o = i.line, c = i.lineStart, f = i.position), N(i, n, D, !0, r) && (x ? m = i.result : A = i.result), x || (E(i, t, g, p, m, A, o, c, f), p = m = A = null), v(i, !0, -1), d = i.input.charCodeAt(i.position)), (i.line === u || i.lineIndent > n) && d !== 0)
|
|
863
|
+
a(i, "bad indentation of a mapping entry");
|
|
864
|
+
else if (i.lineIndent < n)
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
return x && E(i, t, g, p, m, null, o, c, f), C && (i.tag = h, i.anchor = s, i.kind = "mapping", i.result = t), C;
|
|
868
|
+
}
|
|
869
|
+
function Gn(i) {
|
|
870
|
+
var n, e = !1, l = !1, r, u, o;
|
|
871
|
+
if (o = i.input.charCodeAt(i.position), o !== 33) return !1;
|
|
872
|
+
if (i.tag !== null && a(i, "duplication of a tag property"), o = i.input.charCodeAt(++i.position), o === 60 ? (e = !0, o = i.input.charCodeAt(++i.position)) : o === 33 ? (l = !0, r = "!!", o = i.input.charCodeAt(++i.position)) : r = "!", n = i.position, e) {
|
|
873
|
+
do
|
|
874
|
+
o = i.input.charCodeAt(++i.position);
|
|
875
|
+
while (o !== 0 && o !== 62);
|
|
876
|
+
i.position < i.length ? (u = i.input.slice(n, i.position), o = i.input.charCodeAt(++i.position)) : a(i, "unexpected end of the stream within a verbatim tag");
|
|
877
|
+
} else {
|
|
878
|
+
for (; o !== 0 && !w(o); )
|
|
879
|
+
o === 33 && (l ? a(i, "tag suffix cannot contain exclamation marks") : (r = i.input.slice(n - 1, i.position + 1), li.test(r) || a(i, "named tag handle cannot contain such characters"), l = !0, n = i.position + 1)), o = i.input.charCodeAt(++i.position);
|
|
880
|
+
u = i.input.slice(n, i.position), En.test(u) && a(i, "tag suffix cannot contain flow indicator characters");
|
|
881
|
+
}
|
|
882
|
+
u && !oi.test(u) && a(i, "tag name cannot contain such characters: " + u);
|
|
883
|
+
try {
|
|
884
|
+
u = decodeURIComponent(u);
|
|
885
|
+
} catch {
|
|
886
|
+
a(i, "tag name is malformed: " + u);
|
|
887
|
+
}
|
|
888
|
+
return e ? i.tag = u : I.call(i.tagMap, r) ? i.tag = i.tagMap[r] + u : r === "!" ? i.tag = "!" + u : r === "!!" ? i.tag = "tag:yaml.org,2002:" + u : a(i, 'undeclared tag handle "' + r + '"'), !0;
|
|
889
|
+
}
|
|
890
|
+
function Wn(i) {
|
|
891
|
+
var n, e;
|
|
892
|
+
if (e = i.input.charCodeAt(i.position), e !== 38) return !1;
|
|
893
|
+
for (i.anchor !== null && a(i, "duplication of an anchor property"), e = i.input.charCodeAt(++i.position), n = i.position; e !== 0 && !w(e) && !O(e); )
|
|
894
|
+
e = i.input.charCodeAt(++i.position);
|
|
895
|
+
return i.position === n && a(i, "name of an anchor node must contain at least one character"), i.anchor = i.input.slice(n, i.position), !0;
|
|
896
|
+
}
|
|
897
|
+
function $n(i) {
|
|
898
|
+
var n, e, l;
|
|
899
|
+
if (l = i.input.charCodeAt(i.position), l !== 42) return !1;
|
|
900
|
+
for (l = i.input.charCodeAt(++i.position), n = i.position; l !== 0 && !w(l) && !O(l); )
|
|
901
|
+
l = i.input.charCodeAt(++i.position);
|
|
902
|
+
return i.position === n && a(i, "name of an alias node must contain at least one character"), e = i.input.slice(n, i.position), I.call(i.anchorMap, e) || a(i, 'unidentified alias "' + e + '"'), i.result = i.anchorMap[e], v(i, !0, -1), !0;
|
|
903
|
+
}
|
|
904
|
+
function N(i, n, e, l, r) {
|
|
905
|
+
var u, o, c, f = 1, h = !1, s = !1, t, g, p, m, A, x;
|
|
906
|
+
if (i.listener !== null && i.listener("open", i), i.tag = null, i.anchor = null, i.kind = null, i.result = null, u = o = c = D === e || ri === e, l && v(i, !0, -1) && (h = !0, i.lineIndent > n ? f = 1 : i.lineIndent === n ? f = 0 : i.lineIndent < n && (f = -1)), f === 1)
|
|
907
|
+
for (; Gn(i) || Wn(i); )
|
|
908
|
+
v(i, !0, -1) ? (h = !0, c = u, i.lineIndent > n ? f = 1 : i.lineIndent === n ? f = 0 : i.lineIndent < n && (f = -1)) : c = !1;
|
|
909
|
+
if (c && (c = h || r), (f === 1 || D === e) && (M === e || ei === e ? A = n : A = n + 1, x = i.position - i.lineStart, f === 1 ? c && (z(i, x) || qn(i, x, A)) || Rn(i, A) ? s = !0 : (o && Un(i, A) || Pn(i, A) || Bn(i, A) ? s = !0 : $n(i) ? (s = !0, (i.tag !== null || i.anchor !== null) && a(i, "alias node should not have any properties")) : Yn(i, A, M === e) && (s = !0, i.tag === null && (i.tag = "?")), i.anchor !== null && (i.anchorMap[i.anchor] = i.result)) : f === 0 && (s = c && z(i, x))), i.tag === null)
|
|
910
|
+
i.anchor !== null && (i.anchorMap[i.anchor] = i.result);
|
|
911
|
+
else if (i.tag === "?") {
|
|
912
|
+
for (i.result !== null && i.kind !== "scalar" && a(i, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + i.kind + '"'), t = 0, g = i.implicitTypes.length; t < g; t += 1)
|
|
913
|
+
if (m = i.implicitTypes[t], m.resolve(i.result)) {
|
|
914
|
+
i.result = m.construct(i.result), i.tag = m.tag, i.anchor !== null && (i.anchorMap[i.anchor] = i.result);
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
} else if (i.tag !== "!") {
|
|
918
|
+
if (I.call(i.typeMap[i.kind || "fallback"], i.tag))
|
|
919
|
+
m = i.typeMap[i.kind || "fallback"][i.tag];
|
|
920
|
+
else
|
|
921
|
+
for (m = null, p = i.typeMap.multi[i.kind || "fallback"], t = 0, g = p.length; t < g; t += 1)
|
|
922
|
+
if (i.tag.slice(0, p[t].tag.length) === p[t].tag) {
|
|
923
|
+
m = p[t];
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
m || a(i, "unknown tag !<" + i.tag + ">"), i.result !== null && m.kind !== i.kind && a(i, "unacceptable node kind for !<" + i.tag + '> tag; it should be "' + m.kind + '", not "' + i.kind + '"'), m.resolve(i.result, i.tag) ? (i.result = m.construct(i.result, i.tag), i.anchor !== null && (i.anchorMap[i.anchor] = i.result)) : a(i, "cannot resolve a node with !<" + i.tag + "> explicit tag");
|
|
927
|
+
}
|
|
928
|
+
return i.listener !== null && i.listener("close", i), i.tag !== null || i.anchor !== null || s;
|
|
929
|
+
}
|
|
930
|
+
function Hn(i) {
|
|
931
|
+
var n = i.position, e, l, r, u = !1, o;
|
|
932
|
+
for (i.version = null, i.checkLineBreaks = i.legacy, i.tagMap = /* @__PURE__ */ Object.create(null), i.anchorMap = /* @__PURE__ */ Object.create(null); (o = i.input.charCodeAt(i.position)) !== 0 && (v(i, !0, -1), o = i.input.charCodeAt(i.position), !(i.lineIndent > 0 || o !== 37)); ) {
|
|
933
|
+
for (u = !0, o = i.input.charCodeAt(++i.position), e = i.position; o !== 0 && !w(o); )
|
|
934
|
+
o = i.input.charCodeAt(++i.position);
|
|
935
|
+
for (l = i.input.slice(e, i.position), r = [], l.length < 1 && a(i, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
936
|
+
for (; T(o); )
|
|
937
|
+
o = i.input.charCodeAt(++i.position);
|
|
938
|
+
if (o === 35) {
|
|
939
|
+
do
|
|
940
|
+
o = i.input.charCodeAt(++i.position);
|
|
941
|
+
while (o !== 0 && !_(o));
|
|
942
|
+
break;
|
|
943
|
+
}
|
|
944
|
+
if (_(o)) break;
|
|
945
|
+
for (e = i.position; o !== 0 && !w(o); )
|
|
946
|
+
o = i.input.charCodeAt(++i.position);
|
|
947
|
+
r.push(i.input.slice(e, i.position));
|
|
948
|
+
}
|
|
949
|
+
o !== 0 && G(i), I.call(V, l) ? V[l](i, l, r) : j(i, 'unknown document directive "' + l + '"');
|
|
950
|
+
}
|
|
951
|
+
if (v(i, !0, -1), i.lineIndent === 0 && i.input.charCodeAt(i.position) === 45 && i.input.charCodeAt(i.position + 1) === 45 && i.input.charCodeAt(i.position + 2) === 45 ? (i.position += 3, v(i, !0, -1)) : u && a(i, "directives end mark is expected"), N(i, i.lineIndent - 1, D, !1, !0), v(i, !0, -1), i.checkLineBreaks && On.test(i.input.slice(n, i.position)) && j(i, "non-ASCII line breaks are interpreted as content"), i.documents.push(i.result), i.position === i.lineStart && Y(i)) {
|
|
952
|
+
i.input.charCodeAt(i.position) === 46 && (i.position += 3, v(i, !0, -1));
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
if (i.position < i.length - 1)
|
|
956
|
+
a(i, "end of the stream or a document separator is expected");
|
|
957
|
+
else
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
function Kn(i, n) {
|
|
961
|
+
i = String(i), n = n || {}, i.length !== 0 && (i.charCodeAt(i.length - 1) !== 10 && i.charCodeAt(i.length - 1) !== 13 && (i += `
|
|
962
|
+
`), i.charCodeAt(0) === 65279 && (i = i.slice(1)));
|
|
963
|
+
var e = new jn(i, n), l = i.indexOf("\0");
|
|
964
|
+
for (l !== -1 && (e.position = l, a(e, "null byte is not allowed in input")), e.input += "\0"; e.input.charCodeAt(e.position) === 32; )
|
|
965
|
+
e.lineIndent += 1, e.position += 1;
|
|
966
|
+
for (; e.position < e.length - 1; )
|
|
967
|
+
Hn(e);
|
|
968
|
+
return e.documents;
|
|
969
|
+
}
|
|
970
|
+
function Zn(i, n) {
|
|
971
|
+
var e = Kn(i, n);
|
|
972
|
+
if (e.length !== 0) {
|
|
973
|
+
if (e.length === 1)
|
|
974
|
+
return e[0];
|
|
975
|
+
throw new k("expected a single document in the stream, but found more");
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
var Vn = Zn, Xn = {
|
|
979
|
+
load: Vn
|
|
980
|
+
}, zn = Xn.load;
|
|
981
|
+
const Jn = (i) => {
|
|
3
982
|
try {
|
|
4
|
-
return { success: !0, format: "json", data: JSON.parse(
|
|
5
|
-
} catch (
|
|
6
|
-
const e = /at position (\d+)/.exec(
|
|
983
|
+
return { success: !0, format: "json", data: JSON.parse(i) };
|
|
984
|
+
} catch (n) {
|
|
985
|
+
const e = /at position (\d+)/.exec(n.message), l = e ? Number(e[1]) : null;
|
|
7
986
|
return {
|
|
8
|
-
error:
|
|
987
|
+
error: n,
|
|
9
988
|
success: !1,
|
|
10
989
|
format: "json",
|
|
11
|
-
position:
|
|
990
|
+
position: l
|
|
12
991
|
};
|
|
13
992
|
}
|
|
14
|
-
},
|
|
15
|
-
var
|
|
993
|
+
}, Qn = (i) => {
|
|
994
|
+
var n, e;
|
|
16
995
|
try {
|
|
17
|
-
return { success: !0, format: "yaml", data:
|
|
18
|
-
} catch (
|
|
19
|
-
const
|
|
996
|
+
return { success: !0, format: "yaml", data: zn(i) };
|
|
997
|
+
} catch (l) {
|
|
998
|
+
const r = ((e = (n = l == null ? void 0 : l.source) == null ? void 0 : n.range) == null ? void 0 : e.start) ?? (l == null ? void 0 : l.linePos) ?? null;
|
|
20
999
|
return {
|
|
21
|
-
error:
|
|
1000
|
+
error: l,
|
|
22
1001
|
success: !1,
|
|
23
1002
|
format: "yaml",
|
|
24
|
-
position:
|
|
1003
|
+
position: r
|
|
25
1004
|
};
|
|
26
1005
|
}
|
|
27
|
-
},
|
|
28
|
-
if (typeof
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
32
|
-
const e =
|
|
33
|
-
return e.success || e.position !== null ? e :
|
|
1006
|
+
}, ie = (i) => {
|
|
1007
|
+
if (typeof i != "object") {
|
|
1008
|
+
const n = Jn(i);
|
|
1009
|
+
if (n.success || n.position !== null)
|
|
1010
|
+
return n;
|
|
1011
|
+
const e = Qn(i);
|
|
1012
|
+
return e.success || e.position !== null ? e : i.startsWith("{") || i.startsWith("[") ? n : e;
|
|
34
1013
|
}
|
|
35
1014
|
return {
|
|
36
1015
|
success: !0,
|
|
37
1016
|
format: "JS native object",
|
|
38
|
-
data:
|
|
1017
|
+
data: i
|
|
39
1018
|
};
|
|
40
1019
|
};
|
|
41
1020
|
export {
|
|
42
|
-
|
|
1021
|
+
ie as parseRjBuild
|
|
43
1022
|
};
|