novelaid-markdown 0.6.3 → 0.7.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/README.md +12 -2
- package/dist/index.css +1 -1
- package/dist/index.js +406 -469
- package/dist/index.umd.cjs +45 -60
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e, { useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
2
2
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
3
|
-
import s,
|
|
3
|
+
import { Map as s, Marker as c, Popup as l } from "react-map-gl/maplibre";
|
|
4
4
|
import * as u from "lucide-react";
|
|
5
5
|
//#region src/registry.ts
|
|
6
6
|
var d = class e {
|
|
@@ -46,7 +46,7 @@ var d = class e {
|
|
|
46
46
|
codeProcessors: [{
|
|
47
47
|
language: "mermaid",
|
|
48
48
|
component: ({ value: e, attributes: n = {} }) => {
|
|
49
|
-
let [r,
|
|
49
|
+
let [r, o] = i(""), { width: s, height: c } = n;
|
|
50
50
|
return t(() => {
|
|
51
51
|
let t = !0, n = () => {
|
|
52
52
|
["dmermaid-debug", "mermaid-error-container"].forEach((e) => {
|
|
@@ -58,11 +58,11 @@ var d = class e {
|
|
|
58
58
|
};
|
|
59
59
|
return (async () => {
|
|
60
60
|
if (!e || e.trim() === "") {
|
|
61
|
-
|
|
61
|
+
o("");
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
let r = e.substring(0, 20).replace(/\n/g, " ");
|
|
65
|
-
|
|
65
|
+
o("<div class=\"mermaid-loading\">Mermaid rendering...</div>");
|
|
66
66
|
let i = (async () => {
|
|
67
67
|
if (await _, t) try {
|
|
68
68
|
let i = new Promise((e, t) => setTimeout(() => t(/* @__PURE__ */ Error("Rendering Timeout (5s)")), 5e3));
|
|
@@ -70,12 +70,12 @@ var d = class e {
|
|
|
70
70
|
let i = await g();
|
|
71
71
|
if (!t || (n(), await i.parse(e), !t)) return;
|
|
72
72
|
console.log(`[Mermaid] Executing render: ${r}...`);
|
|
73
|
-
let a = `mermaid-${Math.random().toString(36).substring(2, 11)}`, { svg:
|
|
74
|
-
t && s
|
|
73
|
+
let a = `mermaid-${Math.random().toString(36).substring(2, 11)}`, { svg: s } = await i.render(a, e);
|
|
74
|
+
t && o(s);
|
|
75
75
|
})(), i]);
|
|
76
76
|
} catch (r) {
|
|
77
77
|
if (!t) return;
|
|
78
|
-
console.error(`[Mermaid] Render failed: ${e}`, r), n(),
|
|
78
|
+
console.error(`[Mermaid] Render failed: ${e}`, r), n(), o(`<pre class="mermaid-error">Mermaid Syntax Error:\n${r instanceof Error ? r.message : "Invalid Mermaid syntax"}</pre>`);
|
|
79
79
|
}
|
|
80
80
|
})();
|
|
81
81
|
_ = (async () => {
|
|
@@ -86,28 +86,16 @@ var d = class e {
|
|
|
86
86
|
})(), () => {
|
|
87
87
|
t = !1;
|
|
88
88
|
};
|
|
89
|
-
}, [e]), /* @__PURE__ */
|
|
89
|
+
}, [e]), /* @__PURE__ */ a("div", {
|
|
90
90
|
className: "mermaid-container",
|
|
91
91
|
style: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
alignItems: "center",
|
|
95
|
-
margin: "1.5em 0",
|
|
96
|
-
maxWidth: "100%",
|
|
97
|
-
overflow: "auto",
|
|
98
|
-
width: c || "100%",
|
|
99
|
-
height: l || "auto"
|
|
92
|
+
width: s || "100%",
|
|
93
|
+
height: c || "auto"
|
|
100
94
|
},
|
|
101
|
-
children:
|
|
102
|
-
|
|
103
|
-
width: "100%",
|
|
104
|
-
height: "100%",
|
|
105
|
-
display: "flex",
|
|
106
|
-
justifyContent: "center",
|
|
107
|
-
alignItems: "center"
|
|
108
|
-
},
|
|
95
|
+
children: /* @__PURE__ */ a("div", {
|
|
96
|
+
className: "mermaid-svg-wrapper",
|
|
109
97
|
dangerouslySetInnerHTML: { __html: r }
|
|
110
|
-
})
|
|
98
|
+
})
|
|
111
99
|
});
|
|
112
100
|
}
|
|
113
101
|
}]
|
|
@@ -425,6 +413,7 @@ var he = class {
|
|
|
425
413
|
} });
|
|
426
414
|
}
|
|
427
415
|
resolve(e, t) {
|
|
416
|
+
if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
|
|
428
417
|
let n;
|
|
429
418
|
t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], N(e, { Node: (e, t) => {
|
|
430
419
|
(T(t) || re(t)) && n.push(t);
|
|
@@ -973,12 +962,13 @@ var Ge = "<<", W = {
|
|
|
973
962
|
stringify: () => Ge
|
|
974
963
|
}, Ke = (e, t) => (W.identify(t) || O(t) && (!t.type || t.type === z.PLAIN) && W.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === W.tag && e.default);
|
|
975
964
|
function qe(e, t, n) {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
else Je(e, t, n);
|
|
965
|
+
let r = Ye(e, n);
|
|
966
|
+
if (ne(r)) for (let n of r.items) Je(e, t, n);
|
|
967
|
+
else if (Array.isArray(r)) for (let n of r) Je(e, t, n);
|
|
968
|
+
else Je(e, t, r);
|
|
979
969
|
}
|
|
980
970
|
function Je(e, t, n) {
|
|
981
|
-
let r = e
|
|
971
|
+
let r = Ye(e, n);
|
|
982
972
|
if (!te(r)) throw Error("Merge sources must be maps or map aliases");
|
|
983
973
|
let i = r.toJSON(null, e, Map);
|
|
984
974
|
for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
|
|
@@ -989,9 +979,12 @@ function Je(e, t, n) {
|
|
|
989
979
|
});
|
|
990
980
|
return t;
|
|
991
981
|
}
|
|
982
|
+
function Ye(e, t) {
|
|
983
|
+
return e && T(t) ? t.resolve(e.doc, e) : t;
|
|
984
|
+
}
|
|
992
985
|
//#endregion
|
|
993
986
|
//#region node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
994
|
-
function
|
|
987
|
+
function Xe(e, t, { key: n, value: r }) {
|
|
995
988
|
if (A(n) && n.addToJSMap) n.addToJSMap(e, t, r);
|
|
996
989
|
else if (Ke(e, n)) qe(e, t, r);
|
|
997
990
|
else {
|
|
@@ -999,7 +992,7 @@ function Ye(e, t, { key: n, value: r }) {
|
|
|
999
992
|
if (t instanceof Map) t.set(i, R(r, i, e));
|
|
1000
993
|
else if (t instanceof Set) t.add(i);
|
|
1001
994
|
else {
|
|
1002
|
-
let a =
|
|
995
|
+
let a = Ze(n, i, e), o = R(r, a, e);
|
|
1003
996
|
a in t ? Object.defineProperty(t, a, {
|
|
1004
997
|
value: o,
|
|
1005
998
|
writable: !0,
|
|
@@ -1010,7 +1003,7 @@ function Ye(e, t, { key: n, value: r }) {
|
|
|
1010
1003
|
}
|
|
1011
1004
|
return t;
|
|
1012
1005
|
}
|
|
1013
|
-
function
|
|
1006
|
+
function Ze(e, t, n) {
|
|
1014
1007
|
if (t === null) return "";
|
|
1015
1008
|
if (typeof t != "object") return String(t);
|
|
1016
1009
|
if (A(e) && n?.doc) {
|
|
@@ -1029,7 +1022,7 @@ function Xe(e, t, n) {
|
|
|
1029
1022
|
}
|
|
1030
1023
|
//#endregion
|
|
1031
1024
|
//#region node_modules/yaml/browser/dist/nodes/Pair.js
|
|
1032
|
-
function
|
|
1025
|
+
function Qe(e, t, n) {
|
|
1033
1026
|
return new G(xe(e, void 0, n), xe(t, void 0, n));
|
|
1034
1027
|
}
|
|
1035
1028
|
var G = class e {
|
|
@@ -1041,7 +1034,7 @@ var G = class e {
|
|
|
1041
1034
|
return A(n) && (n = n.clone(t)), A(r) && (r = r.clone(t)), new e(n, r);
|
|
1042
1035
|
}
|
|
1043
1036
|
toJSON(e, t) {
|
|
1044
|
-
return
|
|
1037
|
+
return Xe(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
|
|
1045
1038
|
}
|
|
1046
1039
|
toString(e, t, n) {
|
|
1047
1040
|
return e?.doc ? Ue(this, e, t, n) : JSON.stringify(this);
|
|
@@ -1049,20 +1042,20 @@ var G = class e {
|
|
|
1049
1042
|
};
|
|
1050
1043
|
//#endregion
|
|
1051
1044
|
//#region node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
1052
|
-
function
|
|
1053
|
-
return (t.inFlow ?? e.flow ?
|
|
1045
|
+
function $e(e, t, n) {
|
|
1046
|
+
return (t.inFlow ?? e.flow ? tt : et)(e, t, n);
|
|
1054
1047
|
}
|
|
1055
|
-
function
|
|
1048
|
+
function et({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
|
|
1056
1049
|
let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
|
|
1057
1050
|
indent: a,
|
|
1058
1051
|
type: null
|
|
1059
1052
|
}), d = !1, f = [];
|
|
1060
1053
|
for (let e = 0; e < t.length; ++e) {
|
|
1061
1054
|
let i = t[e], o = null;
|
|
1062
|
-
if (A(i)) !d && i.spaceBefore && f.push(""),
|
|
1055
|
+
if (A(i)) !d && i.spaceBefore && f.push(""), nt(n, f, i.commentBefore, d), i.comment && (o = i.comment);
|
|
1063
1056
|
else if (D(i)) {
|
|
1064
1057
|
let e = A(i.key) ? i.key : null;
|
|
1065
|
-
e && (!d && e.spaceBefore && f.push(""),
|
|
1058
|
+
e && (!d && e.spaceBefore && f.push(""), nt(n, f, e.commentBefore, d));
|
|
1066
1059
|
}
|
|
1067
1060
|
d = !1;
|
|
1068
1061
|
let s = U(i, u, () => o = null, () => d = !0);
|
|
@@ -1079,7 +1072,7 @@ function $e({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, ite
|
|
|
1079
1072
|
}
|
|
1080
1073
|
return e ? (p += "\n" + B(l(e), c), s && s()) : d && o && o(), p;
|
|
1081
1074
|
}
|
|
1082
|
-
function
|
|
1075
|
+
function tt({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
1083
1076
|
let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
|
|
1084
1077
|
r += a;
|
|
1085
1078
|
let c = Object.assign({}, t, {
|
|
@@ -1089,10 +1082,10 @@ function et({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
|
1089
1082
|
}), l = !1, u = 0, d = [];
|
|
1090
1083
|
for (let n = 0; n < e.length; ++n) {
|
|
1091
1084
|
let i = e[n], a = null;
|
|
1092
|
-
if (A(i)) i.spaceBefore && d.push(""),
|
|
1085
|
+
if (A(i)) i.spaceBefore && d.push(""), nt(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
|
|
1093
1086
|
else if (D(i)) {
|
|
1094
1087
|
let e = A(i.key) ? i.key : null;
|
|
1095
|
-
e && (e.spaceBefore && d.push(""),
|
|
1088
|
+
e && (e.spaceBefore && d.push(""), nt(t, d, e.commentBefore, !1), e.comment && (l = !0));
|
|
1096
1089
|
let n = A(i.value) ? i.value : null;
|
|
1097
1090
|
n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
|
|
1098
1091
|
}
|
|
@@ -1112,7 +1105,7 @@ function et({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
|
1112
1105
|
return `${e}\n${i}${p}`;
|
|
1113
1106
|
} else return `${f}${o}${d.join(" ")}${o}${p}`;
|
|
1114
1107
|
}
|
|
1115
|
-
function
|
|
1108
|
+
function nt({ indent: e, options: { commentString: t } }, n, r, i) {
|
|
1116
1109
|
if (r && i && (r = r.replace(/^\n+/, "")), r) {
|
|
1117
1110
|
let i = B(t(r), e);
|
|
1118
1111
|
n.push(i.trimStart());
|
|
@@ -1135,7 +1128,7 @@ var q = class extends we {
|
|
|
1135
1128
|
let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
|
|
1136
1129
|
if (typeof i == "function") o = i.call(t, e, o);
|
|
1137
1130
|
else if (Array.isArray(i) && !i.includes(e)) return;
|
|
1138
|
-
(o !== void 0 || r) && a.items.push(
|
|
1131
|
+
(o !== void 0 || r) && a.items.push(Qe(e, o, n));
|
|
1139
1132
|
};
|
|
1140
1133
|
if (t instanceof Map) for (let [e, n] of t) o(e, n);
|
|
1141
1134
|
else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
|
|
@@ -1170,13 +1163,13 @@ var q = class extends we {
|
|
|
1170
1163
|
toJSON(e, t, n) {
|
|
1171
1164
|
let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
1172
1165
|
t?.onCreate && t.onCreate(r);
|
|
1173
|
-
for (let e of this.items)
|
|
1166
|
+
for (let e of this.items) Xe(t, r, e);
|
|
1174
1167
|
return r;
|
|
1175
1168
|
}
|
|
1176
1169
|
toString(e, t, n) {
|
|
1177
1170
|
if (!e) return JSON.stringify(this);
|
|
1178
1171
|
for (let e of this.items) if (!D(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
|
|
1179
|
-
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })),
|
|
1172
|
+
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), $e(this, e, {
|
|
1180
1173
|
blockItemPrefix: "",
|
|
1181
1174
|
flowChars: {
|
|
1182
1175
|
start: "{",
|
|
@@ -1207,21 +1200,21 @@ var q = class extends we {
|
|
|
1207
1200
|
this.items.push(e);
|
|
1208
1201
|
}
|
|
1209
1202
|
delete(e) {
|
|
1210
|
-
let t =
|
|
1203
|
+
let t = rt(e);
|
|
1211
1204
|
return typeof t == "number" ? this.items.splice(t, 1).length > 0 : !1;
|
|
1212
1205
|
}
|
|
1213
1206
|
get(e, t) {
|
|
1214
|
-
let n =
|
|
1207
|
+
let n = rt(e);
|
|
1215
1208
|
if (typeof n != "number") return;
|
|
1216
1209
|
let r = this.items[n];
|
|
1217
1210
|
return !t && O(r) ? r.value : r;
|
|
1218
1211
|
}
|
|
1219
1212
|
has(e) {
|
|
1220
|
-
let t =
|
|
1213
|
+
let t = rt(e);
|
|
1221
1214
|
return typeof t == "number" && t < this.items.length;
|
|
1222
1215
|
}
|
|
1223
1216
|
set(e, t) {
|
|
1224
|
-
let n =
|
|
1217
|
+
let n = rt(e);
|
|
1225
1218
|
if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
|
|
1226
1219
|
let r = this.items[n];
|
|
1227
1220
|
O(r) && ve(t) ? r.value = t : this.items[n] = t;
|
|
@@ -1234,7 +1227,7 @@ var q = class extends we {
|
|
|
1234
1227
|
return n;
|
|
1235
1228
|
}
|
|
1236
1229
|
toString(e, t, n) {
|
|
1237
|
-
return e ?
|
|
1230
|
+
return e ? $e(this, e, {
|
|
1238
1231
|
blockItemPrefix: "- ",
|
|
1239
1232
|
flowChars: {
|
|
1240
1233
|
start: "[",
|
|
@@ -1260,7 +1253,7 @@ var q = class extends we {
|
|
|
1260
1253
|
return i;
|
|
1261
1254
|
}
|
|
1262
1255
|
};
|
|
1263
|
-
function
|
|
1256
|
+
function rt(e) {
|
|
1264
1257
|
let t = O(e) ? e.value : e;
|
|
1265
1258
|
return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
|
|
1266
1259
|
}
|
|
@@ -1275,7 +1268,7 @@ var X = {
|
|
|
1275
1268
|
return ne(e) || t("Expected a sequence for this tag"), e;
|
|
1276
1269
|
},
|
|
1277
1270
|
createNode: (e, t, n) => Y.from(e, t, n)
|
|
1278
|
-
},
|
|
1271
|
+
}, it = {
|
|
1279
1272
|
identify: (e) => typeof e == "string",
|
|
1280
1273
|
default: !0,
|
|
1281
1274
|
tag: "tag:yaml.org,2002:str",
|
|
@@ -1283,22 +1276,22 @@ var X = {
|
|
|
1283
1276
|
stringify(e, t, n, r) {
|
|
1284
1277
|
return t = Object.assign({ actualString: !0 }, t), ze(e, t, n, r);
|
|
1285
1278
|
}
|
|
1286
|
-
},
|
|
1279
|
+
}, at = {
|
|
1287
1280
|
identify: (e) => e == null,
|
|
1288
1281
|
createNode: () => new z(null),
|
|
1289
1282
|
default: !0,
|
|
1290
1283
|
tag: "tag:yaml.org,2002:null",
|
|
1291
1284
|
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
1292
1285
|
resolve: () => new z(null),
|
|
1293
|
-
stringify: ({ source: e }, t) => typeof e == "string" &&
|
|
1294
|
-
},
|
|
1286
|
+
stringify: ({ source: e }, t) => typeof e == "string" && at.test.test(e) ? e : t.options.nullStr
|
|
1287
|
+
}, ot = {
|
|
1295
1288
|
identify: (e) => typeof e == "boolean",
|
|
1296
1289
|
default: !0,
|
|
1297
1290
|
tag: "tag:yaml.org,2002:bool",
|
|
1298
1291
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
1299
1292
|
resolve: (e) => new z(e[0] === "t" || e[0] === "T"),
|
|
1300
1293
|
stringify({ source: e, value: t }, n) {
|
|
1301
|
-
return e &&
|
|
1294
|
+
return e && ot.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
|
|
1302
1295
|
}
|
|
1303
1296
|
};
|
|
1304
1297
|
//#endregion
|
|
@@ -1308,7 +1301,7 @@ function Z({ format: e, minFractionDigits: t, tag: n, value: r }) {
|
|
|
1308
1301
|
let i = typeof r == "number" ? r : Number(r);
|
|
1309
1302
|
if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
|
|
1310
1303
|
let a = Object.is(r, -0) ? "-0" : JSON.stringify(r);
|
|
1311
|
-
if (!e && t && (!n || n === "tag:yaml.org,2002:float") &&
|
|
1304
|
+
if (!e && t && (!n || n === "tag:yaml.org,2002:float") && /^-?\d/.test(a) && !a.includes("e")) {
|
|
1312
1305
|
let e = a.indexOf(".");
|
|
1313
1306
|
e < 0 && (e = a.length, a += ".");
|
|
1314
1307
|
let n = t - (a.length - e - 1);
|
|
@@ -1318,14 +1311,14 @@ function Z({ format: e, minFractionDigits: t, tag: n, value: r }) {
|
|
|
1318
1311
|
}
|
|
1319
1312
|
//#endregion
|
|
1320
1313
|
//#region node_modules/yaml/browser/dist/schema/core/float.js
|
|
1321
|
-
var
|
|
1314
|
+
var st = {
|
|
1322
1315
|
identify: (e) => typeof e == "number",
|
|
1323
1316
|
default: !0,
|
|
1324
1317
|
tag: "tag:yaml.org,2002:float",
|
|
1325
1318
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1326
1319
|
resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
|
|
1327
1320
|
stringify: Z
|
|
1328
|
-
},
|
|
1321
|
+
}, ct = {
|
|
1329
1322
|
identify: (e) => typeof e == "number",
|
|
1330
1323
|
default: !0,
|
|
1331
1324
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1336,7 +1329,7 @@ var ot = {
|
|
|
1336
1329
|
let t = Number(e.value);
|
|
1337
1330
|
return isFinite(t) ? t.toExponential() : Z(e);
|
|
1338
1331
|
}
|
|
1339
|
-
},
|
|
1332
|
+
}, lt = {
|
|
1340
1333
|
identify: (e) => typeof e == "number",
|
|
1341
1334
|
default: !0,
|
|
1342
1335
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1346,59 +1339,59 @@ var ot = {
|
|
|
1346
1339
|
return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
|
|
1347
1340
|
},
|
|
1348
1341
|
stringify: Z
|
|
1349
|
-
},
|
|
1350
|
-
function
|
|
1342
|
+
}, ut = (e) => typeof e == "bigint" || Number.isInteger(e), dt = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
|
|
1343
|
+
function ft(e, t, n) {
|
|
1351
1344
|
let { value: r } = e;
|
|
1352
|
-
return
|
|
1345
|
+
return ut(r) && r >= 0 ? n + r.toString(t) : Z(e);
|
|
1353
1346
|
}
|
|
1354
|
-
var
|
|
1355
|
-
identify: (e) =>
|
|
1347
|
+
var pt = {
|
|
1348
|
+
identify: (e) => ut(e) && e >= 0,
|
|
1356
1349
|
default: !0,
|
|
1357
1350
|
tag: "tag:yaml.org,2002:int",
|
|
1358
1351
|
format: "OCT",
|
|
1359
1352
|
test: /^0o[0-7]+$/,
|
|
1360
|
-
resolve: (e, t, n) =>
|
|
1361
|
-
stringify: (e) =>
|
|
1362
|
-
},
|
|
1363
|
-
identify:
|
|
1353
|
+
resolve: (e, t, n) => dt(e, 2, 8, n),
|
|
1354
|
+
stringify: (e) => ft(e, 8, "0o")
|
|
1355
|
+
}, mt = {
|
|
1356
|
+
identify: ut,
|
|
1364
1357
|
default: !0,
|
|
1365
1358
|
tag: "tag:yaml.org,2002:int",
|
|
1366
1359
|
test: /^[-+]?[0-9]+$/,
|
|
1367
|
-
resolve: (e, t, n) =>
|
|
1360
|
+
resolve: (e, t, n) => dt(e, 0, 10, n),
|
|
1368
1361
|
stringify: Z
|
|
1369
|
-
},
|
|
1370
|
-
identify: (e) =>
|
|
1362
|
+
}, ht = {
|
|
1363
|
+
identify: (e) => ut(e) && e >= 0,
|
|
1371
1364
|
default: !0,
|
|
1372
1365
|
tag: "tag:yaml.org,2002:int",
|
|
1373
1366
|
format: "HEX",
|
|
1374
1367
|
test: /^0x[0-9a-fA-F]+$/,
|
|
1375
|
-
resolve: (e, t, n) =>
|
|
1376
|
-
stringify: (e) =>
|
|
1377
|
-
},
|
|
1368
|
+
resolve: (e, t, n) => dt(e, 2, 16, n),
|
|
1369
|
+
stringify: (e) => ft(e, 16, "0x")
|
|
1370
|
+
}, gt = [
|
|
1378
1371
|
J,
|
|
1379
1372
|
X,
|
|
1380
|
-
rt,
|
|
1381
1373
|
it,
|
|
1382
1374
|
at,
|
|
1383
|
-
|
|
1375
|
+
ot,
|
|
1384
1376
|
pt,
|
|
1385
1377
|
mt,
|
|
1386
|
-
|
|
1378
|
+
ht,
|
|
1387
1379
|
st,
|
|
1388
|
-
ct
|
|
1380
|
+
ct,
|
|
1381
|
+
lt
|
|
1389
1382
|
];
|
|
1390
1383
|
//#endregion
|
|
1391
1384
|
//#region node_modules/yaml/browser/dist/schema/json/schema.js
|
|
1392
|
-
function
|
|
1385
|
+
function _t(e) {
|
|
1393
1386
|
return typeof e == "bigint" || Number.isInteger(e);
|
|
1394
1387
|
}
|
|
1395
|
-
var
|
|
1388
|
+
var vt = ({ value: e }) => JSON.stringify(e), yt = [
|
|
1396
1389
|
{
|
|
1397
1390
|
identify: (e) => typeof e == "string",
|
|
1398
1391
|
default: !0,
|
|
1399
1392
|
tag: "tag:yaml.org,2002:str",
|
|
1400
1393
|
resolve: (e) => e,
|
|
1401
|
-
stringify:
|
|
1394
|
+
stringify: vt
|
|
1402
1395
|
},
|
|
1403
1396
|
{
|
|
1404
1397
|
identify: (e) => e == null,
|
|
@@ -1407,7 +1400,7 @@ var _t = ({ value: e }) => JSON.stringify(e), vt = [
|
|
|
1407
1400
|
tag: "tag:yaml.org,2002:null",
|
|
1408
1401
|
test: /^null$/,
|
|
1409
1402
|
resolve: () => null,
|
|
1410
|
-
stringify:
|
|
1403
|
+
stringify: vt
|
|
1411
1404
|
},
|
|
1412
1405
|
{
|
|
1413
1406
|
identify: (e) => typeof e == "boolean",
|
|
@@ -1415,15 +1408,15 @@ var _t = ({ value: e }) => JSON.stringify(e), vt = [
|
|
|
1415
1408
|
tag: "tag:yaml.org,2002:bool",
|
|
1416
1409
|
test: /^true$|^false$/,
|
|
1417
1410
|
resolve: (e) => e === "true",
|
|
1418
|
-
stringify:
|
|
1411
|
+
stringify: vt
|
|
1419
1412
|
},
|
|
1420
1413
|
{
|
|
1421
|
-
identify:
|
|
1414
|
+
identify: _t,
|
|
1422
1415
|
default: !0,
|
|
1423
1416
|
tag: "tag:yaml.org,2002:int",
|
|
1424
1417
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
1425
1418
|
resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
|
|
1426
|
-
stringify: ({ value: e }) =>
|
|
1419
|
+
stringify: ({ value: e }) => _t(e) ? e.toString() : JSON.stringify(e)
|
|
1427
1420
|
},
|
|
1428
1421
|
{
|
|
1429
1422
|
identify: (e) => typeof e == "number",
|
|
@@ -1431,16 +1424,16 @@ var _t = ({ value: e }) => JSON.stringify(e), vt = [
|
|
|
1431
1424
|
tag: "tag:yaml.org,2002:float",
|
|
1432
1425
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
1433
1426
|
resolve: (e) => parseFloat(e),
|
|
1434
|
-
stringify:
|
|
1427
|
+
stringify: vt
|
|
1435
1428
|
}
|
|
1436
|
-
],
|
|
1429
|
+
], bt = [J, X].concat(yt, {
|
|
1437
1430
|
default: !0,
|
|
1438
1431
|
tag: "",
|
|
1439
1432
|
test: /^/,
|
|
1440
1433
|
resolve(e, t) {
|
|
1441
1434
|
return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
|
|
1442
1435
|
}
|
|
1443
|
-
}),
|
|
1436
|
+
}), xt = {
|
|
1444
1437
|
identify: (e) => e instanceof Uint8Array,
|
|
1445
1438
|
default: !1,
|
|
1446
1439
|
tag: "tag:yaml.org,2002:binary",
|
|
@@ -1473,7 +1466,7 @@ var _t = ({ value: e }) => JSON.stringify(e), vt = [
|
|
|
1473
1466
|
};
|
|
1474
1467
|
//#endregion
|
|
1475
1468
|
//#region node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
1476
|
-
function
|
|
1469
|
+
function St(e, t) {
|
|
1477
1470
|
if (ne(e)) for (let n = 0; n < e.items.length; ++n) {
|
|
1478
1471
|
let r = e.items[n];
|
|
1479
1472
|
if (!D(r)) {
|
|
@@ -1492,7 +1485,7 @@ function xt(e, t) {
|
|
|
1492
1485
|
else t("Expected a sequence for this tag");
|
|
1493
1486
|
return e;
|
|
1494
1487
|
}
|
|
1495
|
-
function
|
|
1488
|
+
function Ct(e, t, n) {
|
|
1496
1489
|
let { replacer: r } = n, i = new Y(e);
|
|
1497
1490
|
i.tag = "tag:yaml.org,2002:pairs";
|
|
1498
1491
|
let a = 0;
|
|
@@ -1506,17 +1499,17 @@ function St(e, t, n) {
|
|
|
1506
1499
|
if (t.length === 1) o = t[0], s = e[o];
|
|
1507
1500
|
else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
|
|
1508
1501
|
} else o = e;
|
|
1509
|
-
i.items.push(
|
|
1502
|
+
i.items.push(Qe(o, s, n));
|
|
1510
1503
|
}
|
|
1511
1504
|
return i;
|
|
1512
1505
|
}
|
|
1513
|
-
var
|
|
1506
|
+
var wt = {
|
|
1514
1507
|
collection: "seq",
|
|
1515
1508
|
default: !1,
|
|
1516
1509
|
tag: "tag:yaml.org,2002:pairs",
|
|
1517
|
-
resolve:
|
|
1518
|
-
createNode:
|
|
1519
|
-
},
|
|
1510
|
+
resolve: St,
|
|
1511
|
+
createNode: Ct
|
|
1512
|
+
}, Tt = class e extends Y {
|
|
1520
1513
|
constructor() {
|
|
1521
1514
|
super(), this.add = q.prototype.add.bind(this), this.delete = q.prototype.delete.bind(this), this.get = q.prototype.get.bind(this), this.has = q.prototype.has.bind(this), this.set = q.prototype.set.bind(this), this.tag = e.tag;
|
|
1522
1515
|
}
|
|
@@ -1532,51 +1525,51 @@ var Ct = {
|
|
|
1532
1525
|
return n;
|
|
1533
1526
|
}
|
|
1534
1527
|
static from(e, t, n) {
|
|
1535
|
-
let r =
|
|
1528
|
+
let r = Ct(e, t, n), i = new this();
|
|
1536
1529
|
return i.items = r.items, i;
|
|
1537
1530
|
}
|
|
1538
1531
|
};
|
|
1539
|
-
|
|
1540
|
-
var
|
|
1532
|
+
Tt.tag = "tag:yaml.org,2002:omap";
|
|
1533
|
+
var Et = {
|
|
1541
1534
|
collection: "seq",
|
|
1542
1535
|
identify: (e) => e instanceof Map,
|
|
1543
|
-
nodeClass:
|
|
1536
|
+
nodeClass: Tt,
|
|
1544
1537
|
default: !1,
|
|
1545
1538
|
tag: "tag:yaml.org,2002:omap",
|
|
1546
1539
|
resolve(e, t) {
|
|
1547
|
-
let n =
|
|
1540
|
+
let n = St(e, t), r = [];
|
|
1548
1541
|
for (let { key: e } of n.items) O(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
|
|
1549
|
-
return Object.assign(new
|
|
1542
|
+
return Object.assign(new Tt(), n);
|
|
1550
1543
|
},
|
|
1551
|
-
createNode: (e, t, n) =>
|
|
1544
|
+
createNode: (e, t, n) => Tt.from(e, t, n)
|
|
1552
1545
|
};
|
|
1553
1546
|
//#endregion
|
|
1554
1547
|
//#region node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
|
|
1555
|
-
function
|
|
1556
|
-
return t && (e ?
|
|
1548
|
+
function Dt({ value: e, source: t }, n) {
|
|
1549
|
+
return t && (e ? Ot : kt).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
|
|
1557
1550
|
}
|
|
1558
|
-
var
|
|
1551
|
+
var Ot = {
|
|
1559
1552
|
identify: (e) => e === !0,
|
|
1560
1553
|
default: !0,
|
|
1561
1554
|
tag: "tag:yaml.org,2002:bool",
|
|
1562
1555
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
1563
1556
|
resolve: () => new z(!0),
|
|
1564
|
-
stringify:
|
|
1565
|
-
},
|
|
1557
|
+
stringify: Dt
|
|
1558
|
+
}, kt = {
|
|
1566
1559
|
identify: (e) => e === !1,
|
|
1567
1560
|
default: !0,
|
|
1568
1561
|
tag: "tag:yaml.org,2002:bool",
|
|
1569
1562
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
1570
1563
|
resolve: () => new z(!1),
|
|
1571
|
-
stringify:
|
|
1572
|
-
},
|
|
1564
|
+
stringify: Dt
|
|
1565
|
+
}, At = {
|
|
1573
1566
|
identify: (e) => typeof e == "number",
|
|
1574
1567
|
default: !0,
|
|
1575
1568
|
tag: "tag:yaml.org,2002:float",
|
|
1576
1569
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1577
1570
|
resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
|
|
1578
1571
|
stringify: Z
|
|
1579
|
-
},
|
|
1572
|
+
}, jt = {
|
|
1580
1573
|
identify: (e) => typeof e == "number",
|
|
1581
1574
|
default: !0,
|
|
1582
1575
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1587,7 +1580,7 @@ var Dt = {
|
|
|
1587
1580
|
let t = Number(e.value);
|
|
1588
1581
|
return isFinite(t) ? t.toExponential() : Z(e);
|
|
1589
1582
|
}
|
|
1590
|
-
},
|
|
1583
|
+
}, Mt = {
|
|
1591
1584
|
identify: (e) => typeof e == "number",
|
|
1592
1585
|
default: !0,
|
|
1593
1586
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1601,8 +1594,8 @@ var Dt = {
|
|
|
1601
1594
|
return t;
|
|
1602
1595
|
},
|
|
1603
1596
|
stringify: Z
|
|
1604
|
-
},
|
|
1605
|
-
function
|
|
1597
|
+
}, Nt = (e) => typeof e == "bigint" || Number.isInteger(e);
|
|
1598
|
+
function Pt(e, t, n, { intAsBigInt: r }) {
|
|
1606
1599
|
let i = e[0];
|
|
1607
1600
|
if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
|
|
1608
1601
|
switch (n) {
|
|
@@ -1622,46 +1615,46 @@ function Nt(e, t, n, { intAsBigInt: r }) {
|
|
|
1622
1615
|
let a = parseInt(e, n);
|
|
1623
1616
|
return i === "-" ? -1 * a : a;
|
|
1624
1617
|
}
|
|
1625
|
-
function
|
|
1618
|
+
function Ft(e, t, n) {
|
|
1626
1619
|
let { value: r } = e;
|
|
1627
|
-
if (
|
|
1620
|
+
if (Nt(r)) {
|
|
1628
1621
|
let e = r.toString(t);
|
|
1629
1622
|
return r < 0 ? "-" + n + e.substr(1) : n + e;
|
|
1630
1623
|
}
|
|
1631
1624
|
return Z(e);
|
|
1632
1625
|
}
|
|
1633
|
-
var
|
|
1634
|
-
identify:
|
|
1626
|
+
var It = {
|
|
1627
|
+
identify: Nt,
|
|
1635
1628
|
default: !0,
|
|
1636
1629
|
tag: "tag:yaml.org,2002:int",
|
|
1637
1630
|
format: "BIN",
|
|
1638
1631
|
test: /^[-+]?0b[0-1_]+$/,
|
|
1639
|
-
resolve: (e, t, n) =>
|
|
1640
|
-
stringify: (e) =>
|
|
1641
|
-
},
|
|
1642
|
-
identify:
|
|
1632
|
+
resolve: (e, t, n) => Pt(e, 2, 2, n),
|
|
1633
|
+
stringify: (e) => Ft(e, 2, "0b")
|
|
1634
|
+
}, Lt = {
|
|
1635
|
+
identify: Nt,
|
|
1643
1636
|
default: !0,
|
|
1644
1637
|
tag: "tag:yaml.org,2002:int",
|
|
1645
1638
|
format: "OCT",
|
|
1646
1639
|
test: /^[-+]?0[0-7_]+$/,
|
|
1647
|
-
resolve: (e, t, n) =>
|
|
1648
|
-
stringify: (e) =>
|
|
1649
|
-
},
|
|
1650
|
-
identify:
|
|
1640
|
+
resolve: (e, t, n) => Pt(e, 1, 8, n),
|
|
1641
|
+
stringify: (e) => Ft(e, 8, "0")
|
|
1642
|
+
}, Rt = {
|
|
1643
|
+
identify: Nt,
|
|
1651
1644
|
default: !0,
|
|
1652
1645
|
tag: "tag:yaml.org,2002:int",
|
|
1653
1646
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
1654
|
-
resolve: (e, t, n) =>
|
|
1647
|
+
resolve: (e, t, n) => Pt(e, 0, 10, n),
|
|
1655
1648
|
stringify: Z
|
|
1656
|
-
},
|
|
1657
|
-
identify:
|
|
1649
|
+
}, zt = {
|
|
1650
|
+
identify: Nt,
|
|
1658
1651
|
default: !0,
|
|
1659
1652
|
tag: "tag:yaml.org,2002:int",
|
|
1660
1653
|
format: "HEX",
|
|
1661
1654
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
1662
|
-
resolve: (e, t, n) =>
|
|
1663
|
-
stringify: (e) =>
|
|
1664
|
-
},
|
|
1655
|
+
resolve: (e, t, n) => Pt(e, 2, 16, n),
|
|
1656
|
+
stringify: (e) => Ft(e, 16, "0x")
|
|
1657
|
+
}, Bt = class e extends q {
|
|
1665
1658
|
constructor(t) {
|
|
1666
1659
|
super(t), this.tag = e.tag;
|
|
1667
1660
|
}
|
|
@@ -1688,21 +1681,21 @@ var Ft = {
|
|
|
1688
1681
|
}
|
|
1689
1682
|
static from(e, t, n) {
|
|
1690
1683
|
let { replacer: r } = n, i = new this(e);
|
|
1691
|
-
if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(
|
|
1684
|
+
if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Qe(e, null, n));
|
|
1692
1685
|
return i;
|
|
1693
1686
|
}
|
|
1694
1687
|
};
|
|
1695
|
-
|
|
1696
|
-
var
|
|
1688
|
+
Bt.tag = "tag:yaml.org,2002:set";
|
|
1689
|
+
var Vt = {
|
|
1697
1690
|
collection: "map",
|
|
1698
1691
|
identify: (e) => e instanceof Set,
|
|
1699
|
-
nodeClass:
|
|
1692
|
+
nodeClass: Bt,
|
|
1700
1693
|
default: !1,
|
|
1701
1694
|
tag: "tag:yaml.org,2002:set",
|
|
1702
|
-
createNode: (e, t, n) =>
|
|
1695
|
+
createNode: (e, t, n) => Bt.from(e, t, n),
|
|
1703
1696
|
resolve(e, t) {
|
|
1704
1697
|
if (te(e)) {
|
|
1705
|
-
if (e.hasAllNullValues(!0)) return Object.assign(new
|
|
1698
|
+
if (e.hasAllNullValues(!0)) return Object.assign(new Bt(), e);
|
|
1706
1699
|
t("Set items must all have null values");
|
|
1707
1700
|
} else t("Expected a mapping for this tag");
|
|
1708
1701
|
return e;
|
|
@@ -1710,11 +1703,11 @@ var Bt = {
|
|
|
1710
1703
|
};
|
|
1711
1704
|
//#endregion
|
|
1712
1705
|
//#region node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
1713
|
-
function
|
|
1706
|
+
function Ht(e, t) {
|
|
1714
1707
|
let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
|
|
1715
1708
|
return n === "-" ? i(-1) * a : a;
|
|
1716
1709
|
}
|
|
1717
|
-
function
|
|
1710
|
+
function Ut(e) {
|
|
1718
1711
|
let { value: t } = e, n = (e) => e;
|
|
1719
1712
|
if (typeof t == "bigint") n = (e) => BigInt(e);
|
|
1720
1713
|
else if (isNaN(t) || !isFinite(t)) return Z(e);
|
|
@@ -1723,112 +1716,112 @@ function Ht(e) {
|
|
|
1723
1716
|
let i = n(60), a = [t % i];
|
|
1724
1717
|
return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
|
|
1725
1718
|
}
|
|
1726
|
-
var
|
|
1719
|
+
var Wt = {
|
|
1727
1720
|
identify: (e) => typeof e == "bigint" || Number.isInteger(e),
|
|
1728
1721
|
default: !0,
|
|
1729
1722
|
tag: "tag:yaml.org,2002:int",
|
|
1730
1723
|
format: "TIME",
|
|
1731
1724
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
1732
|
-
resolve: (e, t, { intAsBigInt: n }) =>
|
|
1733
|
-
stringify:
|
|
1734
|
-
},
|
|
1725
|
+
resolve: (e, t, { intAsBigInt: n }) => Ht(e, n),
|
|
1726
|
+
stringify: Ut
|
|
1727
|
+
}, Gt = {
|
|
1735
1728
|
identify: (e) => typeof e == "number",
|
|
1736
1729
|
default: !0,
|
|
1737
1730
|
tag: "tag:yaml.org,2002:float",
|
|
1738
1731
|
format: "TIME",
|
|
1739
1732
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
1740
|
-
resolve: (e) =>
|
|
1741
|
-
stringify:
|
|
1742
|
-
},
|
|
1733
|
+
resolve: (e) => Ht(e, !1),
|
|
1734
|
+
stringify: Ut
|
|
1735
|
+
}, Kt = {
|
|
1743
1736
|
identify: (e) => e instanceof Date,
|
|
1744
1737
|
default: !0,
|
|
1745
1738
|
tag: "tag:yaml.org,2002:timestamp",
|
|
1746
1739
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
1747
1740
|
resolve(e) {
|
|
1748
|
-
let t = e.match(
|
|
1741
|
+
let t = e.match(Kt.test);
|
|
1749
1742
|
if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
1750
1743
|
let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
|
|
1751
1744
|
if (u && u !== "Z") {
|
|
1752
|
-
let e =
|
|
1745
|
+
let e = Ht(u, !1);
|
|
1753
1746
|
Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
|
|
1754
1747
|
}
|
|
1755
1748
|
return new Date(l);
|
|
1756
1749
|
},
|
|
1757
1750
|
stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
1758
|
-
},
|
|
1751
|
+
}, qt = [
|
|
1759
1752
|
J,
|
|
1760
1753
|
X,
|
|
1761
|
-
rt,
|
|
1762
1754
|
it,
|
|
1763
|
-
|
|
1755
|
+
at,
|
|
1764
1756
|
Ot,
|
|
1765
|
-
|
|
1757
|
+
kt,
|
|
1766
1758
|
It,
|
|
1767
1759
|
Lt,
|
|
1768
1760
|
Rt,
|
|
1769
|
-
|
|
1761
|
+
zt,
|
|
1770
1762
|
At,
|
|
1771
1763
|
jt,
|
|
1772
|
-
|
|
1764
|
+
Mt,
|
|
1765
|
+
xt,
|
|
1773
1766
|
W,
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
Ut,
|
|
1767
|
+
Et,
|
|
1768
|
+
wt,
|
|
1769
|
+
Vt,
|
|
1778
1770
|
Wt,
|
|
1779
|
-
Gt
|
|
1780
|
-
|
|
1781
|
-
|
|
1771
|
+
Gt,
|
|
1772
|
+
Kt
|
|
1773
|
+
], Jt = new Map([
|
|
1774
|
+
["core", gt],
|
|
1782
1775
|
["failsafe", [
|
|
1783
1776
|
J,
|
|
1784
1777
|
X,
|
|
1785
|
-
|
|
1778
|
+
it
|
|
1786
1779
|
]],
|
|
1787
|
-
["json",
|
|
1788
|
-
["yaml11",
|
|
1789
|
-
["yaml-1.1",
|
|
1790
|
-
]),
|
|
1791
|
-
binary:
|
|
1792
|
-
bool:
|
|
1793
|
-
float:
|
|
1794
|
-
floatExp:
|
|
1795
|
-
floatNaN:
|
|
1796
|
-
floatTime:
|
|
1797
|
-
int:
|
|
1798
|
-
intHex:
|
|
1799
|
-
intOct:
|
|
1800
|
-
intTime:
|
|
1780
|
+
["json", bt],
|
|
1781
|
+
["yaml11", qt],
|
|
1782
|
+
["yaml-1.1", qt]
|
|
1783
|
+
]), Yt = {
|
|
1784
|
+
binary: xt,
|
|
1785
|
+
bool: ot,
|
|
1786
|
+
float: lt,
|
|
1787
|
+
floatExp: ct,
|
|
1788
|
+
floatNaN: st,
|
|
1789
|
+
floatTime: Gt,
|
|
1790
|
+
int: mt,
|
|
1791
|
+
intHex: ht,
|
|
1792
|
+
intOct: pt,
|
|
1793
|
+
intTime: Wt,
|
|
1801
1794
|
map: J,
|
|
1802
1795
|
merge: W,
|
|
1803
|
-
null:
|
|
1804
|
-
omap:
|
|
1805
|
-
pairs:
|
|
1796
|
+
null: at,
|
|
1797
|
+
omap: Et,
|
|
1798
|
+
pairs: wt,
|
|
1806
1799
|
seq: X,
|
|
1807
|
-
set:
|
|
1808
|
-
timestamp:
|
|
1809
|
-
},
|
|
1810
|
-
"tag:yaml.org,2002:binary":
|
|
1800
|
+
set: Vt,
|
|
1801
|
+
timestamp: Kt
|
|
1802
|
+
}, Xt = {
|
|
1803
|
+
"tag:yaml.org,2002:binary": xt,
|
|
1811
1804
|
"tag:yaml.org,2002:merge": W,
|
|
1812
|
-
"tag:yaml.org,2002:omap":
|
|
1813
|
-
"tag:yaml.org,2002:pairs":
|
|
1814
|
-
"tag:yaml.org,2002:set":
|
|
1815
|
-
"tag:yaml.org,2002:timestamp":
|
|
1805
|
+
"tag:yaml.org,2002:omap": Et,
|
|
1806
|
+
"tag:yaml.org,2002:pairs": wt,
|
|
1807
|
+
"tag:yaml.org,2002:set": Vt,
|
|
1808
|
+
"tag:yaml.org,2002:timestamp": Kt
|
|
1816
1809
|
};
|
|
1817
|
-
function
|
|
1818
|
-
let r =
|
|
1810
|
+
function Zt(e, t, n) {
|
|
1811
|
+
let r = Jt.get(t);
|
|
1819
1812
|
if (r && !e) return n && !r.includes(W) ? r.concat(W) : r.slice();
|
|
1820
1813
|
let i = r;
|
|
1821
1814
|
if (!i) if (Array.isArray(e)) i = [];
|
|
1822
1815
|
else {
|
|
1823
|
-
let e = Array.from(
|
|
1816
|
+
let e = Array.from(Jt.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
|
|
1824
1817
|
throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
|
|
1825
1818
|
}
|
|
1826
1819
|
if (Array.isArray(e)) for (let t of e) i = i.concat(t);
|
|
1827
1820
|
else typeof e == "function" && (i = e(i.slice()));
|
|
1828
1821
|
return n && (i = i.concat(W)), i.reduce((e, t) => {
|
|
1829
|
-
let n = typeof t == "string" ?
|
|
1822
|
+
let n = typeof t == "string" ? Yt[t] : t;
|
|
1830
1823
|
if (!n) {
|
|
1831
|
-
let e = JSON.stringify(t), n = Object.keys(
|
|
1824
|
+
let e = JSON.stringify(t), n = Object.keys(Yt).map((e) => JSON.stringify(e)).join(", ");
|
|
1832
1825
|
throw Error(`Unknown custom tag ${e}; use one of ${n}`);
|
|
1833
1826
|
}
|
|
1834
1827
|
return e.includes(n) || e.push(n), e;
|
|
@@ -1836,9 +1829,9 @@ function Xt(e, t, n) {
|
|
|
1836
1829
|
}
|
|
1837
1830
|
//#endregion
|
|
1838
1831
|
//#region node_modules/yaml/browser/dist/schema/Schema.js
|
|
1839
|
-
var
|
|
1832
|
+
var Qt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), $t = class e {
|
|
1840
1833
|
constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
|
|
1841
|
-
this.compat = Array.isArray(e) ?
|
|
1834
|
+
this.compat = Array.isArray(e) ? Zt(e, "compat") : e ? Zt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? Xt : {}, this.tags = Zt(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, x, { value: J }), Object.defineProperty(this, C, { value: it }), Object.defineProperty(this, ee, { value: X }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Qt : null;
|
|
1842
1835
|
}
|
|
1843
1836
|
clone() {
|
|
1844
1837
|
let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
|
|
@@ -1847,7 +1840,7 @@ var Zt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Qt = class e {
|
|
|
1847
1840
|
};
|
|
1848
1841
|
//#endregion
|
|
1849
1842
|
//#region node_modules/yaml/browser/dist/stringify/stringifyDocument.js
|
|
1850
|
-
function
|
|
1843
|
+
function en(e, t) {
|
|
1851
1844
|
let n = [], r = t.directives === !0;
|
|
1852
1845
|
if (t.directives !== !1 && e.directives) {
|
|
1853
1846
|
let t = e.directives.toString(e);
|
|
@@ -1884,7 +1877,7 @@ function $t(e, t) {
|
|
|
1884
1877
|
}
|
|
1885
1878
|
//#endregion
|
|
1886
1879
|
//#region node_modules/yaml/browser/dist/doc/Document.js
|
|
1887
|
-
var
|
|
1880
|
+
var tn = class e {
|
|
1888
1881
|
constructor(e, t, n) {
|
|
1889
1882
|
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, w, { value: b });
|
|
1890
1883
|
let r = null;
|
|
@@ -1908,10 +1901,10 @@ var en = class e {
|
|
|
1908
1901
|
return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = A(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
|
|
1909
1902
|
}
|
|
1910
1903
|
add(e) {
|
|
1911
|
-
|
|
1904
|
+
nn(this.contents) && this.contents.add(e);
|
|
1912
1905
|
}
|
|
1913
1906
|
addIn(e, t) {
|
|
1914
|
-
|
|
1907
|
+
nn(this.contents) && this.contents.addIn(e, t);
|
|
1915
1908
|
}
|
|
1916
1909
|
createAlias(e, t) {
|
|
1917
1910
|
if (!e.anchor) {
|
|
@@ -1942,10 +1935,10 @@ var en = class e {
|
|
|
1942
1935
|
return new G(this.createNode(e, null, n), this.createNode(t, null, n));
|
|
1943
1936
|
}
|
|
1944
1937
|
delete(e) {
|
|
1945
|
-
return
|
|
1938
|
+
return nn(this.contents) ? this.contents.delete(e) : !1;
|
|
1946
1939
|
}
|
|
1947
1940
|
deleteIn(e) {
|
|
1948
|
-
return Ce(e) ? this.contents == null ? !1 : (this.contents = null, !0) :
|
|
1941
|
+
return Ce(e) ? this.contents == null ? !1 : (this.contents = null, !0) : nn(this.contents) ? this.contents.deleteIn(e) : !1;
|
|
1949
1942
|
}
|
|
1950
1943
|
get(e, t) {
|
|
1951
1944
|
return k(this.contents) ? this.contents.get(e, t) : void 0;
|
|
@@ -1960,10 +1953,10 @@ var en = class e {
|
|
|
1960
1953
|
return Ce(e) ? this.contents !== void 0 : k(this.contents) ? this.contents.hasIn(e) : !1;
|
|
1961
1954
|
}
|
|
1962
1955
|
set(e, t) {
|
|
1963
|
-
this.contents == null ? this.contents = Se(this.schema, [e], t) :
|
|
1956
|
+
this.contents == null ? this.contents = Se(this.schema, [e], t) : nn(this.contents) && this.contents.set(e, t);
|
|
1964
1957
|
}
|
|
1965
1958
|
setIn(e, t) {
|
|
1966
|
-
Ce(e) ? this.contents = t : this.contents == null ? this.contents = Se(this.schema, Array.from(e), t) :
|
|
1959
|
+
Ce(e) ? this.contents = t : this.contents == null ? this.contents = Se(this.schema, Array.from(e), t) : nn(this.contents) && this.contents.setIn(e, t);
|
|
1967
1960
|
}
|
|
1968
1961
|
setSchema(e, t = {}) {
|
|
1969
1962
|
typeof e == "number" && (e = String(e));
|
|
@@ -1991,7 +1984,7 @@ var en = class e {
|
|
|
1991
1984
|
}
|
|
1992
1985
|
}
|
|
1993
1986
|
if (t.schema instanceof Object) this.schema = t.schema;
|
|
1994
|
-
else if (n) this.schema = new
|
|
1987
|
+
else if (n) this.schema = new $t(Object.assign(n, t));
|
|
1995
1988
|
else throw Error("With a null YAML version, the { schema: Schema } option is required");
|
|
1996
1989
|
}
|
|
1997
1990
|
toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
|
|
@@ -2020,28 +2013,28 @@ var en = class e {
|
|
|
2020
2013
|
let t = JSON.stringify(e.indent);
|
|
2021
2014
|
throw Error(`"indent" option must be a positive integer, not ${t}`);
|
|
2022
2015
|
}
|
|
2023
|
-
return
|
|
2016
|
+
return en(this, e);
|
|
2024
2017
|
}
|
|
2025
2018
|
};
|
|
2026
|
-
function
|
|
2019
|
+
function nn(e) {
|
|
2027
2020
|
if (k(e)) return !0;
|
|
2028
2021
|
throw Error("Expected a YAML collection as document contents");
|
|
2029
2022
|
}
|
|
2030
2023
|
//#endregion
|
|
2031
2024
|
//#region node_modules/yaml/browser/dist/errors.js
|
|
2032
|
-
var
|
|
2025
|
+
var rn = class extends Error {
|
|
2033
2026
|
constructor(e, t, n, r) {
|
|
2034
2027
|
super(), this.name = e, this.code = n, this.message = r, this.pos = t;
|
|
2035
2028
|
}
|
|
2036
|
-
},
|
|
2029
|
+
}, an = class extends rn {
|
|
2037
2030
|
constructor(e, t, n) {
|
|
2038
2031
|
super("YAMLParseError", e, t, n);
|
|
2039
2032
|
}
|
|
2040
|
-
},
|
|
2033
|
+
}, on = class extends rn {
|
|
2041
2034
|
constructor(e, t, n) {
|
|
2042
2035
|
super("YAMLWarning", e, t, n);
|
|
2043
2036
|
}
|
|
2044
|
-
},
|
|
2037
|
+
}, sn = (e, t) => (n) => {
|
|
2045
2038
|
if (n.pos[0] === -1) return;
|
|
2046
2039
|
n.linePos = n.pos.map((e) => t.linePos(e));
|
|
2047
2040
|
let { line: r, col: i } = n.linePos[0];
|
|
@@ -2064,7 +2057,7 @@ var nn = class extends Error {
|
|
|
2064
2057
|
};
|
|
2065
2058
|
//#endregion
|
|
2066
2059
|
//#region node_modules/yaml/browser/dist/compose/resolve-props.js
|
|
2067
|
-
function
|
|
2060
|
+
function cn(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
|
|
2068
2061
|
let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, b = null, x = null;
|
|
2069
2062
|
for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
|
|
2070
2063
|
case "space":
|
|
@@ -2110,7 +2103,7 @@ function sn(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIn
|
|
|
2110
2103
|
}
|
|
2111
2104
|
//#endregion
|
|
2112
2105
|
//#region node_modules/yaml/browser/dist/compose/util-contains-newline.js
|
|
2113
|
-
function
|
|
2106
|
+
function ln(e) {
|
|
2114
2107
|
if (!e) return null;
|
|
2115
2108
|
switch (e.type) {
|
|
2116
2109
|
case "alias":
|
|
@@ -2128,7 +2121,7 @@ function cn(e) {
|
|
|
2128
2121
|
if (t.sep) {
|
|
2129
2122
|
for (let e of t.sep) if (e.type === "newline") return !0;
|
|
2130
2123
|
}
|
|
2131
|
-
if (
|
|
2124
|
+
if (ln(t.key) || ln(t.value)) return !0;
|
|
2132
2125
|
}
|
|
2133
2126
|
return !1;
|
|
2134
2127
|
default: return !0;
|
|
@@ -2136,15 +2129,15 @@ function cn(e) {
|
|
|
2136
2129
|
}
|
|
2137
2130
|
//#endregion
|
|
2138
2131
|
//#region node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
|
|
2139
|
-
function
|
|
2132
|
+
function un(e, t, n) {
|
|
2140
2133
|
if (t?.type === "flow-collection") {
|
|
2141
2134
|
let r = t.end[0];
|
|
2142
|
-
r.indent === e && (r.source === "]" || r.source === "}") &&
|
|
2135
|
+
r.indent === e && (r.source === "]" || r.source === "}") && ln(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
|
|
2143
2136
|
}
|
|
2144
2137
|
}
|
|
2145
2138
|
//#endregion
|
|
2146
2139
|
//#region node_modules/yaml/browser/dist/compose/util-map-includes.js
|
|
2147
|
-
function
|
|
2140
|
+
function dn(e, t, n) {
|
|
2148
2141
|
let { uniqueKeys: r } = e.options;
|
|
2149
2142
|
if (r === !1) return !1;
|
|
2150
2143
|
let i = typeof r == "function" ? r : (e, t) => e === t || O(e) && O(t) && e.value === t.value;
|
|
@@ -2152,13 +2145,13 @@ function un(e, t, n) {
|
|
|
2152
2145
|
}
|
|
2153
2146
|
//#endregion
|
|
2154
2147
|
//#region node_modules/yaml/browser/dist/compose/resolve-block-map.js
|
|
2155
|
-
var
|
|
2156
|
-
function
|
|
2148
|
+
var fn = "All mapping items must start at the same column";
|
|
2149
|
+
function pn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
2157
2150
|
let o = new (a?.nodeClass ?? q)(n.schema);
|
|
2158
2151
|
n.atRoot &&= !1;
|
|
2159
2152
|
let s = r.offset, c = null;
|
|
2160
2153
|
for (let a of r.items) {
|
|
2161
|
-
let { start: l, key: u, sep: d, value: f } = a, p =
|
|
2154
|
+
let { start: l, key: u, sep: d, value: f } = a, p = cn(l, {
|
|
2162
2155
|
indicator: "explicit-key-ind",
|
|
2163
2156
|
next: u ?? d?.[0],
|
|
2164
2157
|
offset: s,
|
|
@@ -2167,16 +2160,16 @@ function fn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2167
2160
|
startOnNewline: !0
|
|
2168
2161
|
}), m = !p.found;
|
|
2169
2162
|
if (m) {
|
|
2170
|
-
if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT",
|
|
2163
|
+
if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", fn)), !p.anchor && !p.tag && !d) {
|
|
2171
2164
|
c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
|
|
2172
2165
|
continue;
|
|
2173
2166
|
}
|
|
2174
|
-
(p.newlineAfterProp ||
|
|
2175
|
-
} else p.found?.indent !== r.indent && i(s, "BAD_INDENT",
|
|
2167
|
+
(p.newlineAfterProp || ln(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
2168
|
+
} else p.found?.indent !== r.indent && i(s, "BAD_INDENT", fn);
|
|
2176
2169
|
n.atKey = !0;
|
|
2177
2170
|
let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
|
|
2178
|
-
n.schema.compat &&
|
|
2179
|
-
let _ =
|
|
2171
|
+
n.schema.compat && un(r.indent, u, i), n.atKey = !1, dn(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
|
|
2172
|
+
let _ = cn(d ?? [], {
|
|
2180
2173
|
indicator: "map-value-ind",
|
|
2181
2174
|
next: f,
|
|
2182
2175
|
offset: g.range[2],
|
|
@@ -2187,7 +2180,7 @@ function fn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2187
2180
|
if (s = _.end, _.found) {
|
|
2188
2181
|
m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
|
|
2189
2182
|
let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
|
|
2190
|
-
n.schema.compat &&
|
|
2183
|
+
n.schema.compat && un(r.indent, f, i), s = c.range[2];
|
|
2191
2184
|
let l = new G(g, c);
|
|
2192
2185
|
n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
|
|
2193
2186
|
} else {
|
|
@@ -2204,12 +2197,12 @@ function fn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2204
2197
|
}
|
|
2205
2198
|
//#endregion
|
|
2206
2199
|
//#region node_modules/yaml/browser/dist/compose/resolve-block-seq.js
|
|
2207
|
-
function
|
|
2200
|
+
function mn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
2208
2201
|
let o = new (a?.nodeClass ?? Y)(n.schema);
|
|
2209
2202
|
n.atRoot &&= !1, n.atKey &&= !1;
|
|
2210
2203
|
let s = r.offset, c = null;
|
|
2211
2204
|
for (let { start: a, value: l } of r.items) {
|
|
2212
|
-
let u =
|
|
2205
|
+
let u = cn(a, {
|
|
2213
2206
|
indicator: "seq-item-ind",
|
|
2214
2207
|
next: l,
|
|
2215
2208
|
offset: s,
|
|
@@ -2223,7 +2216,7 @@ function pn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2223
2216
|
continue;
|
|
2224
2217
|
}
|
|
2225
2218
|
let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
|
|
2226
|
-
n.schema.compat &&
|
|
2219
|
+
n.schema.compat && un(r.indent, l, i), s = d.range[2], o.items.push(d);
|
|
2227
2220
|
}
|
|
2228
2221
|
return o.range = [
|
|
2229
2222
|
r.offset,
|
|
@@ -2233,7 +2226,7 @@ function pn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2233
2226
|
}
|
|
2234
2227
|
//#endregion
|
|
2235
2228
|
//#region node_modules/yaml/browser/dist/compose/resolve-end.js
|
|
2236
|
-
function
|
|
2229
|
+
function hn(e, t, n, r) {
|
|
2237
2230
|
let i = "";
|
|
2238
2231
|
if (e) {
|
|
2239
2232
|
let a = !1, o = "";
|
|
@@ -2264,15 +2257,15 @@ function mn(e, t, n, r) {
|
|
|
2264
2257
|
}
|
|
2265
2258
|
//#endregion
|
|
2266
2259
|
//#region node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
|
|
2267
|
-
var
|
|
2268
|
-
function
|
|
2260
|
+
var gn = "Block collections are not allowed within flow collections", _n = (e) => e && (e.type === "block-map" || e.type === "block-seq");
|
|
2261
|
+
function vn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
2269
2262
|
let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new (a?.nodeClass ?? (o ? q : Y))(n.schema);
|
|
2270
2263
|
c.flow = !0;
|
|
2271
2264
|
let l = n.atRoot;
|
|
2272
2265
|
l && (n.atRoot = !1), n.atKey &&= !1;
|
|
2273
2266
|
let u = r.offset + r.start.source.length;
|
|
2274
2267
|
for (let a = 0; a < r.items.length; ++a) {
|
|
2275
|
-
let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h =
|
|
2268
|
+
let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = cn(d, {
|
|
2276
2269
|
flow: s,
|
|
2277
2270
|
indicator: "explicit-key-ind",
|
|
2278
2271
|
next: f ?? p?.[0],
|
|
@@ -2286,7 +2279,7 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2286
2279
|
a === 0 && h.comma ? i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(h.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), h.comment && (c.comment ? c.comment += "\n" + h.comment : c.comment = h.comment), u = h.end;
|
|
2287
2280
|
continue;
|
|
2288
2281
|
}
|
|
2289
|
-
!o && n.options.strict &&
|
|
2282
|
+
!o && n.options.strict && ln(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
|
2290
2283
|
}
|
|
2291
2284
|
if (a === 0) h.comma && i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
|
|
2292
2285
|
else if (h.comma || i(h.start, "MISSING_CHAR", `Missing , between ${s} items`), h.comment) {
|
|
@@ -2306,12 +2299,12 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2306
2299
|
}
|
|
2307
2300
|
if (!o && !p && !h.found) {
|
|
2308
2301
|
let r = m ? e(n, m, h, i) : t(n, h.end, p, null, h, i);
|
|
2309
|
-
c.items.push(r), u = r.range[2],
|
|
2302
|
+
c.items.push(r), u = r.range[2], _n(m) && i(r.range, "BLOCK_IN_FLOW", gn);
|
|
2310
2303
|
} else {
|
|
2311
2304
|
n.atKey = !0;
|
|
2312
2305
|
let a = h.end, g = f ? e(n, f, h, i) : t(n, a, d, null, h, i);
|
|
2313
|
-
|
|
2314
|
-
let _ =
|
|
2306
|
+
_n(f) && i(g.range, "BLOCK_IN_FLOW", gn), n.atKey = !1;
|
|
2307
|
+
let _ = cn(p ?? [], {
|
|
2315
2308
|
flow: s,
|
|
2316
2309
|
indicator: "map-value-ind",
|
|
2317
2310
|
next: m,
|
|
@@ -2333,11 +2326,11 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2333
2326
|
}
|
|
2334
2327
|
} else m && ("source" in m && m.source?.[0] === ":" ? i(m, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
|
|
2335
2328
|
let v = m ? e(n, m, _, i) : _.found ? t(n, _.end, p, null, _, i) : null;
|
|
2336
|
-
v ?
|
|
2329
|
+
v ? _n(m) && i(v.range, "BLOCK_IN_FLOW", gn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
|
|
2337
2330
|
let y = new G(g, v);
|
|
2338
2331
|
if (n.options.keepSourceTokens && (y.srcToken = l), o) {
|
|
2339
2332
|
let e = c;
|
|
2340
|
-
|
|
2333
|
+
dn(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
|
|
2341
2334
|
} else {
|
|
2342
2335
|
let e = new q(n.schema);
|
|
2343
2336
|
e.flow = !0, e.items.push(y);
|
|
@@ -2358,7 +2351,7 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2358
2351
|
i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), f && f.source.length !== 1 && p.unshift(f);
|
|
2359
2352
|
}
|
|
2360
2353
|
if (p.length > 0) {
|
|
2361
|
-
let e =
|
|
2354
|
+
let e = hn(p, m, n.options.strict, i);
|
|
2362
2355
|
e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
|
|
2363
2356
|
r.offset,
|
|
2364
2357
|
m,
|
|
@@ -2373,31 +2366,31 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2373
2366
|
}
|
|
2374
2367
|
//#endregion
|
|
2375
2368
|
//#region node_modules/yaml/browser/dist/compose/compose-collection.js
|
|
2376
|
-
function
|
|
2377
|
-
let o = n.type === "block-map" ?
|
|
2369
|
+
function yn(e, t, n, r, i, a) {
|
|
2370
|
+
let o = n.type === "block-map" ? pn(e, t, n, r, a) : n.type === "block-seq" ? mn(e, t, n, r, a) : vn(e, t, n, r, a), s = o.constructor;
|
|
2378
2371
|
return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
|
|
2379
2372
|
}
|
|
2380
|
-
function
|
|
2373
|
+
function bn(e, t, n, r, i) {
|
|
2381
2374
|
let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
|
|
2382
2375
|
if (n.type === "block-seq") {
|
|
2383
2376
|
let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
|
|
2384
2377
|
n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
2385
2378
|
}
|
|
2386
2379
|
let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
|
|
2387
|
-
if (!a || !o || o === "!" || o === q.tagName && s === "map" || o === Y.tagName && s === "seq") return
|
|
2380
|
+
if (!a || !o || o === "!" || o === q.tagName && s === "map" || o === Y.tagName && s === "seq") return yn(e, t, n, i, o);
|
|
2388
2381
|
let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
|
|
2389
2382
|
if (!c) {
|
|
2390
2383
|
let r = t.schema.knownTags[o];
|
|
2391
2384
|
if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
|
|
2392
|
-
else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0),
|
|
2385
|
+
else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), yn(e, t, n, i, o);
|
|
2393
2386
|
}
|
|
2394
|
-
let l =
|
|
2387
|
+
let l = yn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = A(u) ? u : new z(u);
|
|
2395
2388
|
return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
|
|
2396
2389
|
}
|
|
2397
2390
|
//#endregion
|
|
2398
2391
|
//#region node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
|
|
2399
|
-
function
|
|
2400
|
-
let r = t.offset, i =
|
|
2392
|
+
function xn(e, t, n) {
|
|
2393
|
+
let r = t.offset, i = Sn(t, e.options.strict, n);
|
|
2401
2394
|
if (!i) return {
|
|
2402
2395
|
value: "",
|
|
2403
2396
|
type: null,
|
|
@@ -2408,7 +2401,7 @@ function bn(e, t, n) {
|
|
|
2408
2401
|
r
|
|
2409
2402
|
]
|
|
2410
2403
|
};
|
|
2411
|
-
let a = i.mode === ">" ? z.BLOCK_FOLDED : z.BLOCK_LITERAL, o = t.source ?
|
|
2404
|
+
let a = i.mode === ">" ? z.BLOCK_FOLDED : z.BLOCK_LITERAL, o = t.source ? Cn(t.source) : [], s = o.length;
|
|
2412
2405
|
for (let e = o.length - 1; e >= 0; --e) {
|
|
2413
2406
|
let t = o[e][1];
|
|
2414
2407
|
if (t === "" || t === "\r") s = e;
|
|
@@ -2471,7 +2464,7 @@ function bn(e, t, n) {
|
|
|
2471
2464
|
]
|
|
2472
2465
|
};
|
|
2473
2466
|
}
|
|
2474
|
-
function
|
|
2467
|
+
function Sn({ offset: e, props: t }, n, r) {
|
|
2475
2468
|
/* istanbul ignore if should not happen */
|
|
2476
2469
|
if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
|
|
2477
2470
|
let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
|
|
@@ -2514,24 +2507,24 @@ function xn({ offset: e, props: t }, n, r) {
|
|
|
2514
2507
|
length: d
|
|
2515
2508
|
};
|
|
2516
2509
|
}
|
|
2517
|
-
function
|
|
2510
|
+
function Cn(e) {
|
|
2518
2511
|
let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
|
|
2519
2512
|
for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
|
|
2520
2513
|
return i;
|
|
2521
2514
|
}
|
|
2522
2515
|
//#endregion
|
|
2523
2516
|
//#region node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
|
|
2524
|
-
function
|
|
2517
|
+
function wn(e, t, n) {
|
|
2525
2518
|
let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
|
|
2526
2519
|
switch (i) {
|
|
2527
2520
|
case "scalar":
|
|
2528
|
-
s = z.PLAIN, c =
|
|
2521
|
+
s = z.PLAIN, c = Tn(a, l);
|
|
2529
2522
|
break;
|
|
2530
2523
|
case "single-quoted-scalar":
|
|
2531
|
-
s = z.QUOTE_SINGLE, c =
|
|
2524
|
+
s = z.QUOTE_SINGLE, c = En(a, l);
|
|
2532
2525
|
break;
|
|
2533
2526
|
case "double-quoted-scalar":
|
|
2534
|
-
s = z.QUOTE_DOUBLE, c =
|
|
2527
|
+
s = z.QUOTE_DOUBLE, c = On(a, l);
|
|
2535
2528
|
break;
|
|
2536
2529
|
/* istanbul ignore next should not happen */
|
|
2537
2530
|
default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
|
|
@@ -2545,7 +2538,7 @@ function Cn(e, t, n) {
|
|
|
2545
2538
|
]
|
|
2546
2539
|
};
|
|
2547
2540
|
}
|
|
2548
|
-
let u = r + a.length, d =
|
|
2541
|
+
let u = r + a.length, d = hn(o, u, t, n);
|
|
2549
2542
|
return {
|
|
2550
2543
|
value: c,
|
|
2551
2544
|
type: s,
|
|
@@ -2557,7 +2550,7 @@ function Cn(e, t, n) {
|
|
|
2557
2550
|
]
|
|
2558
2551
|
};
|
|
2559
2552
|
}
|
|
2560
|
-
function
|
|
2553
|
+
function Tn(e, t) {
|
|
2561
2554
|
let n = "";
|
|
2562
2555
|
switch (e[0]) {
|
|
2563
2556
|
/* istanbul ignore next should not happen */
|
|
@@ -2579,12 +2572,12 @@ function wn(e, t) {
|
|
|
2579
2572
|
n = `reserved character ${e[0]}`;
|
|
2580
2573
|
break;
|
|
2581
2574
|
}
|
|
2582
|
-
return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`),
|
|
2575
|
+
return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), Dn(e);
|
|
2583
2576
|
}
|
|
2584
|
-
function
|
|
2585
|
-
return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"),
|
|
2577
|
+
function En(e, t) {
|
|
2578
|
+
return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), Dn(e.slice(1, -1)).replace(/''/g, "'");
|
|
2586
2579
|
}
|
|
2587
|
-
function
|
|
2580
|
+
function Dn(e) {
|
|
2588
2581
|
let t, n;
|
|
2589
2582
|
try {
|
|
2590
2583
|
t = /* @__PURE__ */ RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy"), n = /* @__PURE__ */ RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
|
|
@@ -2598,25 +2591,21 @@ function En(e) {
|
|
|
2598
2591
|
let s = /[ \t]*(.*)/sy;
|
|
2599
2592
|
return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
|
|
2600
2593
|
}
|
|
2601
|
-
function
|
|
2594
|
+
function On(e, t) {
|
|
2602
2595
|
let n = "";
|
|
2603
2596
|
for (let r = 1; r < e.length - 1; ++r) {
|
|
2604
2597
|
let i = e[r];
|
|
2605
2598
|
if (!(i === "\r" && e[r + 1] === "\n")) if (i === "\n") {
|
|
2606
|
-
let { fold: t, offset: i } =
|
|
2599
|
+
let { fold: t, offset: i } = kn(e, r);
|
|
2607
2600
|
n += t, r = i;
|
|
2608
2601
|
} else if (i === "\\") {
|
|
2609
|
-
let i = e[++r], a =
|
|
2602
|
+
let i = e[++r], a = An[i];
|
|
2610
2603
|
if (a) n += a;
|
|
2611
2604
|
else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
|
|
2612
2605
|
else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
|
|
2613
2606
|
else if (i === "x" || i === "u" || i === "U") {
|
|
2614
|
-
let a =
|
|
2615
|
-
|
|
2616
|
-
u: 4,
|
|
2617
|
-
U: 8
|
|
2618
|
-
}[i];
|
|
2619
|
-
n += An(e, r + 1, a, t), r += a;
|
|
2607
|
+
let a = i === "x" ? 2 : i === "u" ? 4 : 8;
|
|
2608
|
+
n += jn(e, r + 1, a, t), r += a;
|
|
2620
2609
|
} else {
|
|
2621
2610
|
let i = e.substr(r - 1, 2);
|
|
2622
2611
|
t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
|
|
@@ -2629,7 +2618,7 @@ function Dn(e, t) {
|
|
|
2629
2618
|
}
|
|
2630
2619
|
return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
|
|
2631
2620
|
}
|
|
2632
|
-
function
|
|
2621
|
+
function kn(e, t) {
|
|
2633
2622
|
let n = "", r = e[t + 1];
|
|
2634
2623
|
for (; (r === " " || r === " " || r === "\n" || r === "\r") && !(r === "\r" && e[t + 2] !== "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
|
|
2635
2624
|
return n ||= " ", {
|
|
@@ -2637,7 +2626,7 @@ function On(e, t) {
|
|
|
2637
2626
|
offset: t
|
|
2638
2627
|
};
|
|
2639
2628
|
}
|
|
2640
|
-
var
|
|
2629
|
+
var An = {
|
|
2641
2630
|
0: "\0",
|
|
2642
2631
|
a: "\x07",
|
|
2643
2632
|
b: "\b",
|
|
@@ -2657,19 +2646,20 @@ var kn = {
|
|
|
2657
2646
|
"\\": "\\",
|
|
2658
2647
|
" ": " "
|
|
2659
2648
|
};
|
|
2660
|
-
function
|
|
2649
|
+
function jn(e, t, n, r) {
|
|
2661
2650
|
let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
|
|
2662
|
-
|
|
2651
|
+
try {
|
|
2652
|
+
return String.fromCodePoint(a);
|
|
2653
|
+
} catch {
|
|
2663
2654
|
let i = e.substr(t - 2, n + 2);
|
|
2664
2655
|
return r(t - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), i;
|
|
2665
2656
|
}
|
|
2666
|
-
return String.fromCodePoint(a);
|
|
2667
2657
|
}
|
|
2668
2658
|
//#endregion
|
|
2669
2659
|
//#region node_modules/yaml/browser/dist/compose/compose-scalar.js
|
|
2670
|
-
function
|
|
2671
|
-
let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ?
|
|
2672
|
-
l = e.options.stringKeys && e.atKey ? e.schema[C] : c ?
|
|
2660
|
+
function Mn(e, t, n, r) {
|
|
2661
|
+
let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? xn(e, t, r) : wn(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
|
|
2662
|
+
l = e.options.stringKeys && e.atKey ? e.schema[C] : c ? Nn(e.schema, i, c, n, r) : t.type === "scalar" ? Pn(e, i, t, r) : e.schema[C];
|
|
2673
2663
|
let u;
|
|
2674
2664
|
try {
|
|
2675
2665
|
let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
|
|
@@ -2680,7 +2670,7 @@ function jn(e, t, n, r) {
|
|
|
2680
2670
|
}
|
|
2681
2671
|
return u.range = s, u.source = i, a && (u.type = a), c && (u.tag = c), l.format && (u.format = l.format), o && (u.comment = o), u;
|
|
2682
2672
|
}
|
|
2683
|
-
function
|
|
2673
|
+
function Nn(e, t, n, r, i) {
|
|
2684
2674
|
if (n === "!") return e[C];
|
|
2685
2675
|
let a = [];
|
|
2686
2676
|
for (let t of e.tags) if (!t.collection && t.tag === n) if (t.default && t.test) a.push(t);
|
|
@@ -2692,7 +2682,7 @@ function Mn(e, t, n, r, i) {
|
|
|
2692
2682
|
test: void 0
|
|
2693
2683
|
})), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[C]);
|
|
2694
2684
|
}
|
|
2695
|
-
function
|
|
2685
|
+
function Pn({ atKey: e, directives: t, schema: n }, r, i, a) {
|
|
2696
2686
|
let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[C];
|
|
2697
2687
|
if (n.compat) {
|
|
2698
2688
|
let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[C];
|
|
@@ -2702,7 +2692,7 @@ function Nn({ atKey: e, directives: t, schema: n }, r, i, a) {
|
|
|
2702
2692
|
}
|
|
2703
2693
|
//#endregion
|
|
2704
2694
|
//#region node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
|
|
2705
|
-
function
|
|
2695
|
+
function Fn(e, t, n) {
|
|
2706
2696
|
if (t) {
|
|
2707
2697
|
n ??= t.length;
|
|
2708
2698
|
for (let r = n - 1; r >= 0; --r) {
|
|
@@ -2722,48 +2712,48 @@ function Pn(e, t, n) {
|
|
|
2722
2712
|
}
|
|
2723
2713
|
//#endregion
|
|
2724
2714
|
//#region node_modules/yaml/browser/dist/compose/compose-node.js
|
|
2725
|
-
var
|
|
2726
|
-
composeNode:
|
|
2727
|
-
composeEmptyNode:
|
|
2715
|
+
var In = {
|
|
2716
|
+
composeNode: Ln,
|
|
2717
|
+
composeEmptyNode: Rn
|
|
2728
2718
|
};
|
|
2729
|
-
function
|
|
2719
|
+
function Ln(e, t, n, r) {
|
|
2730
2720
|
let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
|
|
2731
2721
|
switch (t.type) {
|
|
2732
2722
|
case "alias":
|
|
2733
|
-
l =
|
|
2723
|
+
l = zn(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
2734
2724
|
break;
|
|
2735
2725
|
case "scalar":
|
|
2736
2726
|
case "single-quoted-scalar":
|
|
2737
2727
|
case "double-quoted-scalar":
|
|
2738
2728
|
case "block-scalar":
|
|
2739
|
-
l =
|
|
2729
|
+
l = Mn(e, t, c, r), s && (l.anchor = s.source.substring(1));
|
|
2740
2730
|
break;
|
|
2741
2731
|
case "block-map":
|
|
2742
2732
|
case "block-seq":
|
|
2743
2733
|
case "flow-collection":
|
|
2744
2734
|
try {
|
|
2745
|
-
l =
|
|
2735
|
+
l = bn(In, e, t, n, r), s && (l.anchor = s.source.substring(1));
|
|
2746
2736
|
} catch (e) {
|
|
2747
2737
|
r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
|
|
2748
2738
|
}
|
|
2749
2739
|
break;
|
|
2750
2740
|
default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
|
|
2751
2741
|
}
|
|
2752
|
-
return l ??=
|
|
2742
|
+
return l ??= Rn(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!O(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
|
|
2753
2743
|
}
|
|
2754
|
-
function
|
|
2755
|
-
let u =
|
|
2744
|
+
function Rn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
|
|
2745
|
+
let u = Mn(e, {
|
|
2756
2746
|
type: "scalar",
|
|
2757
|
-
offset:
|
|
2747
|
+
offset: Fn(t, n, r),
|
|
2758
2748
|
indent: -1,
|
|
2759
2749
|
source: ""
|
|
2760
2750
|
}, s, l);
|
|
2761
2751
|
return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
|
|
2762
2752
|
}
|
|
2763
|
-
function
|
|
2753
|
+
function zn({ options: e }, { offset: t, source: n, end: r }, i) {
|
|
2764
2754
|
let a = new ge(n.substring(1));
|
|
2765
2755
|
a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
|
|
2766
|
-
let o = t + n.length, s =
|
|
2756
|
+
let o = t + n.length, s = hn(r, o, e.strict, i);
|
|
2767
2757
|
return a.range = [
|
|
2768
2758
|
t,
|
|
2769
2759
|
o,
|
|
@@ -2772,14 +2762,14 @@ function Rn({ options: e }, { offset: t, source: n, end: r }, i) {
|
|
|
2772
2762
|
}
|
|
2773
2763
|
//#endregion
|
|
2774
2764
|
//#region node_modules/yaml/browser/dist/compose/compose-doc.js
|
|
2775
|
-
function
|
|
2776
|
-
let s = new
|
|
2765
|
+
function Bn(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
2766
|
+
let s = new tn(void 0, Object.assign({ _directives: t }, e)), c = {
|
|
2777
2767
|
atKey: !1,
|
|
2778
2768
|
atRoot: !0,
|
|
2779
2769
|
directives: s.directives,
|
|
2780
2770
|
options: s.options,
|
|
2781
2771
|
schema: s.schema
|
|
2782
|
-
}, l =
|
|
2772
|
+
}, l = cn(r, {
|
|
2783
2773
|
indicator: "doc-start",
|
|
2784
2774
|
next: i ?? a?.[0],
|
|
2785
2775
|
offset: n,
|
|
@@ -2787,8 +2777,8 @@ function zn(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
|
2787
2777
|
parentIndent: 0,
|
|
2788
2778
|
startOnNewline: !0
|
|
2789
2779
|
});
|
|
2790
|
-
l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ?
|
|
2791
|
-
let u = s.contents.range[2], d =
|
|
2780
|
+
l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Ln(c, i, l, o) : Rn(c, l.end, r, null, l, o);
|
|
2781
|
+
let u = s.contents.range[2], d = hn(a, u, !1, o);
|
|
2792
2782
|
return d.comment && (s.comment = d.comment), s.range = [
|
|
2793
2783
|
n,
|
|
2794
2784
|
u,
|
|
@@ -2797,13 +2787,13 @@ function zn(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
|
2797
2787
|
}
|
|
2798
2788
|
//#endregion
|
|
2799
2789
|
//#region node_modules/yaml/browser/dist/compose/composer.js
|
|
2800
|
-
function
|
|
2790
|
+
function Vn(e) {
|
|
2801
2791
|
if (typeof e == "number") return [e, e + 1];
|
|
2802
2792
|
if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
|
|
2803
2793
|
let { offset: t, source: n } = e;
|
|
2804
2794
|
return [t, t + (typeof n == "string" ? n.length : 1)];
|
|
2805
2795
|
}
|
|
2806
|
-
function
|
|
2796
|
+
function Hn(e) {
|
|
2807
2797
|
let t = "", n = !1, r = !1;
|
|
2808
2798
|
for (let i = 0; i < e.length; ++i) {
|
|
2809
2799
|
let a = e[i];
|
|
@@ -2822,15 +2812,15 @@ function Vn(e) {
|
|
|
2822
2812
|
afterEmptyLine: r
|
|
2823
2813
|
};
|
|
2824
2814
|
}
|
|
2825
|
-
var
|
|
2815
|
+
var Un = class {
|
|
2826
2816
|
constructor(e = {}) {
|
|
2827
2817
|
this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
|
|
2828
|
-
let i =
|
|
2829
|
-
r ? this.warnings.push(new
|
|
2818
|
+
let i = Vn(e);
|
|
2819
|
+
r ? this.warnings.push(new on(i, t, n)) : this.errors.push(new an(i, t, n));
|
|
2830
2820
|
}, this.directives = new I({ version: e.version || "1.2" }), this.options = e;
|
|
2831
2821
|
}
|
|
2832
2822
|
decorate(e, t) {
|
|
2833
|
-
let { comment: n, afterEmptyLine: r } =
|
|
2823
|
+
let { comment: n, afterEmptyLine: r } = Hn(this.prelude);
|
|
2834
2824
|
if (n) {
|
|
2835
2825
|
let i = e.contents;
|
|
2836
2826
|
if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
|
|
@@ -2849,7 +2839,7 @@ var Hn = class {
|
|
|
2849
2839
|
}
|
|
2850
2840
|
streamInfo() {
|
|
2851
2841
|
return {
|
|
2852
|
-
comment:
|
|
2842
|
+
comment: Hn(this.prelude).comment,
|
|
2853
2843
|
directives: this.directives,
|
|
2854
2844
|
errors: this.errors,
|
|
2855
2845
|
warnings: this.warnings
|
|
@@ -2863,12 +2853,12 @@ var Hn = class {
|
|
|
2863
2853
|
switch (e.type) {
|
|
2864
2854
|
case "directive":
|
|
2865
2855
|
this.directives.add(e.source, (t, n, r) => {
|
|
2866
|
-
let i =
|
|
2856
|
+
let i = Vn(e);
|
|
2867
2857
|
i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
|
|
2868
2858
|
}), this.prelude.push(e.source), this.atDirectives = !0;
|
|
2869
2859
|
break;
|
|
2870
2860
|
case "document": {
|
|
2871
|
-
let t =
|
|
2861
|
+
let t = Bn(this.options, this.directives, e, this.onError);
|
|
2872
2862
|
this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
|
|
2873
2863
|
break;
|
|
2874
2864
|
}
|
|
@@ -2879,17 +2869,17 @@ var Hn = class {
|
|
|
2879
2869
|
this.prelude.push(e.source);
|
|
2880
2870
|
break;
|
|
2881
2871
|
case "error": {
|
|
2882
|
-
let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new
|
|
2872
|
+
let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new an(Vn(e), "UNEXPECTED_TOKEN", t);
|
|
2883
2873
|
this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
|
|
2884
2874
|
break;
|
|
2885
2875
|
}
|
|
2886
2876
|
case "doc-end": {
|
|
2887
2877
|
if (!this.doc) {
|
|
2888
|
-
this.errors.push(new
|
|
2878
|
+
this.errors.push(new an(Vn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
|
|
2889
2879
|
break;
|
|
2890
2880
|
}
|
|
2891
2881
|
this.doc.directives.docEnd = !0;
|
|
2892
|
-
let t =
|
|
2882
|
+
let t = hn(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
|
|
2893
2883
|
if (this.decorate(this.doc, !0), t.comment) {
|
|
2894
2884
|
let e = this.doc.comment;
|
|
2895
2885
|
this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
|
|
@@ -2897,13 +2887,13 @@ var Hn = class {
|
|
|
2897
2887
|
this.doc.range[2] = t.offset;
|
|
2898
2888
|
break;
|
|
2899
2889
|
}
|
|
2900
|
-
default: this.errors.push(new
|
|
2890
|
+
default: this.errors.push(new an(Vn(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
|
|
2901
2891
|
}
|
|
2902
2892
|
}
|
|
2903
2893
|
*end(e = !1, t = -1) {
|
|
2904
2894
|
if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
|
|
2905
2895
|
else if (e) {
|
|
2906
|
-
let e = new
|
|
2896
|
+
let e = new tn(void 0, Object.assign({ _directives: this.directives }, this.options));
|
|
2907
2897
|
this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
|
|
2908
2898
|
0,
|
|
2909
2899
|
t,
|
|
@@ -2911,14 +2901,14 @@ var Hn = class {
|
|
|
2911
2901
|
], this.decorate(e, !1), yield e;
|
|
2912
2902
|
}
|
|
2913
2903
|
}
|
|
2914
|
-
},
|
|
2915
|
-
function
|
|
2904
|
+
}, Wn = Symbol("break visit"), Gn = Symbol("skip children"), Kn = Symbol("remove item");
|
|
2905
|
+
function qn(e, t) {
|
|
2916
2906
|
"type" in e && e.type === "document" && (e = {
|
|
2917
2907
|
start: e.start,
|
|
2918
2908
|
value: e.value
|
|
2919
|
-
}),
|
|
2909
|
+
}), Jn(Object.freeze([]), e, t);
|
|
2920
2910
|
}
|
|
2921
|
-
|
|
2911
|
+
qn.BREAK = Wn, qn.SKIP = Gn, qn.REMOVE = Kn, qn.itemAtPath = (e, t) => {
|
|
2922
2912
|
let n = e;
|
|
2923
2913
|
for (let [e, r] of t) {
|
|
2924
2914
|
let t = n?.[e];
|
|
@@ -2926,29 +2916,29 @@ Kn.BREAK = Un, Kn.SKIP = Wn, Kn.REMOVE = Gn, Kn.itemAtPath = (e, t) => {
|
|
|
2926
2916
|
else return;
|
|
2927
2917
|
}
|
|
2928
2918
|
return n;
|
|
2929
|
-
},
|
|
2930
|
-
let n =
|
|
2919
|
+
}, qn.parentCollection = (e, t) => {
|
|
2920
|
+
let n = qn.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
|
|
2931
2921
|
if (i && "items" in i) return i;
|
|
2932
2922
|
throw Error("Parent collection not found");
|
|
2933
2923
|
};
|
|
2934
|
-
function
|
|
2924
|
+
function Jn(e, t, n) {
|
|
2935
2925
|
let r = n(t, e);
|
|
2936
2926
|
if (typeof r == "symbol") return r;
|
|
2937
2927
|
for (let i of ["key", "value"]) {
|
|
2938
2928
|
let a = t[i];
|
|
2939
2929
|
if (a && "items" in a) {
|
|
2940
2930
|
for (let t = 0; t < a.items.length; ++t) {
|
|
2941
|
-
let r =
|
|
2931
|
+
let r = Jn(Object.freeze(e.concat([[i, t]])), a.items[t], n);
|
|
2942
2932
|
if (typeof r == "number") t = r - 1;
|
|
2943
|
-
else if (r ===
|
|
2944
|
-
else r ===
|
|
2933
|
+
else if (r === Wn) return Wn;
|
|
2934
|
+
else r === Kn && (a.items.splice(t, 1), --t);
|
|
2945
2935
|
}
|
|
2946
2936
|
typeof r == "function" && i === "key" && (r = r(t, e));
|
|
2947
2937
|
}
|
|
2948
2938
|
}
|
|
2949
2939
|
return typeof r == "function" ? r(t, e) : r;
|
|
2950
2940
|
}
|
|
2951
|
-
function
|
|
2941
|
+
function Yn(e) {
|
|
2952
2942
|
switch (e) {
|
|
2953
2943
|
case "": return "byte-order-mark";
|
|
2954
2944
|
case "": return "doc-mode";
|
|
@@ -2995,7 +2985,7 @@ function Q(e) {
|
|
|
2995
2985
|
default: return !1;
|
|
2996
2986
|
}
|
|
2997
2987
|
}
|
|
2998
|
-
var
|
|
2988
|
+
var Xn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Zn = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Qn = /* @__PURE__ */ new Set(",[]{}"), $n = /* @__PURE__ */ new Set(" ,[]{}\n\r "), er = (e) => !e || $n.has(e), tr = class {
|
|
2999
2989
|
constructor() {
|
|
3000
2990
|
this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
|
|
3001
2991
|
}
|
|
@@ -3115,7 +3105,7 @@ var Yn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Xn = /* @__PURE__ */
|
|
|
3115
3105
|
case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
|
|
3116
3106
|
case "}":
|
|
3117
3107
|
case "]": return yield* this.pushCount(1), "doc";
|
|
3118
|
-
case "*": return yield* this.pushUntil(
|
|
3108
|
+
case "*": return yield* this.pushUntil(er), "doc";
|
|
3119
3109
|
case "\"":
|
|
3120
3110
|
case "'": return yield* this.parseQuotedScalar();
|
|
3121
3111
|
case "|":
|
|
@@ -3140,7 +3130,7 @@ var Yn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Xn = /* @__PURE__ */
|
|
|
3140
3130
|
case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
|
|
3141
3131
|
case "}":
|
|
3142
3132
|
case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
|
|
3143
|
-
case "*": return yield* this.pushUntil(
|
|
3133
|
+
case "*": return yield* this.pushUntil(er), "flow";
|
|
3144
3134
|
case "\"":
|
|
3145
3135
|
case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
|
|
3146
3136
|
case ":": {
|
|
@@ -3233,18 +3223,18 @@ var Yn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Xn = /* @__PURE__ */
|
|
|
3233
3223
|
let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
|
|
3234
3224
|
for (; r = this.buffer[++n];) if (r === ":") {
|
|
3235
3225
|
let r = this.buffer[n + 1];
|
|
3236
|
-
if (Q(r) || e &&
|
|
3226
|
+
if (Q(r) || e && Qn.has(r)) break;
|
|
3237
3227
|
t = n;
|
|
3238
3228
|
} else if (Q(r)) {
|
|
3239
3229
|
let i = this.buffer[n + 1];
|
|
3240
|
-
if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e &&
|
|
3230
|
+
if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && Qn.has(i)) break;
|
|
3241
3231
|
if (r === "\n") {
|
|
3242
3232
|
let e = this.continueScalar(n + 1);
|
|
3243
3233
|
if (e === -1) break;
|
|
3244
3234
|
n = Math.max(n, e - 2);
|
|
3245
3235
|
}
|
|
3246
3236
|
} else {
|
|
3247
|
-
if (e &&
|
|
3237
|
+
if (e && Qn.has(r)) break;
|
|
3248
3238
|
t = n;
|
|
3249
3239
|
}
|
|
3250
3240
|
return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
|
|
@@ -3259,12 +3249,12 @@ var Yn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Xn = /* @__PURE__ */
|
|
|
3259
3249
|
*pushIndicators() {
|
|
3260
3250
|
switch (this.charAt(0)) {
|
|
3261
3251
|
case "!": return (yield* this.pushTag()) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
|
|
3262
|
-
case "&": return (yield* this.pushUntil(
|
|
3252
|
+
case "&": return (yield* this.pushUntil(er)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
|
|
3263
3253
|
case "-":
|
|
3264
3254
|
case "?":
|
|
3265
3255
|
case ":": {
|
|
3266
3256
|
let e = this.flowLevel > 0, t = this.charAt(1);
|
|
3267
|
-
if (Q(t) || e &&
|
|
3257
|
+
if (Q(t) || e && Qn.has(t)) return e ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
|
|
3268
3258
|
}
|
|
3269
3259
|
}
|
|
3270
3260
|
return 0;
|
|
@@ -3276,8 +3266,8 @@ var Yn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Xn = /* @__PURE__ */
|
|
|
3276
3266
|
return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
|
|
3277
3267
|
} else {
|
|
3278
3268
|
let e = this.pos + 1, t = this.buffer[e];
|
|
3279
|
-
for (; t;) if (
|
|
3280
|
-
else if (t === "%" &&
|
|
3269
|
+
for (; t;) if (Zn.has(t)) t = this.buffer[++e];
|
|
3270
|
+
else if (t === "%" && Xn.has(this.buffer[e + 1]) && Xn.has(this.buffer[e + 2])) t = this.buffer[e += 3];
|
|
3281
3271
|
else break;
|
|
3282
3272
|
return yield* this.pushToIndex(e, !1);
|
|
3283
3273
|
}
|
|
@@ -3299,7 +3289,7 @@ var Yn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Xn = /* @__PURE__ */
|
|
|
3299
3289
|
for (; !e(n);) n = this.buffer[++t];
|
|
3300
3290
|
return yield* this.pushToIndex(t, !1);
|
|
3301
3291
|
}
|
|
3302
|
-
},
|
|
3292
|
+
}, nr = class {
|
|
3303
3293
|
constructor() {
|
|
3304
3294
|
this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
|
|
3305
3295
|
let t = 0, n = this.lineStarts.length;
|
|
@@ -3329,7 +3319,7 @@ function $(e, t) {
|
|
|
3329
3319
|
for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
|
|
3330
3320
|
return !1;
|
|
3331
3321
|
}
|
|
3332
|
-
function
|
|
3322
|
+
function rr(e) {
|
|
3333
3323
|
for (let t = 0; t < e.length; ++t) switch (e[t].type) {
|
|
3334
3324
|
case "space":
|
|
3335
3325
|
case "comment":
|
|
@@ -3338,7 +3328,7 @@ function nr(e) {
|
|
|
3338
3328
|
}
|
|
3339
3329
|
return -1;
|
|
3340
3330
|
}
|
|
3341
|
-
function
|
|
3331
|
+
function ir(e) {
|
|
3342
3332
|
switch (e?.type) {
|
|
3343
3333
|
case "alias":
|
|
3344
3334
|
case "scalar":
|
|
@@ -3348,7 +3338,7 @@ function rr(e) {
|
|
|
3348
3338
|
default: return !1;
|
|
3349
3339
|
}
|
|
3350
3340
|
}
|
|
3351
|
-
function
|
|
3341
|
+
function ar(e) {
|
|
3352
3342
|
switch (e.type) {
|
|
3353
3343
|
case "document": return e.start;
|
|
3354
3344
|
case "block-map": {
|
|
@@ -3360,7 +3350,7 @@ function ir(e) {
|
|
|
3360
3350
|
default: return [];
|
|
3361
3351
|
}
|
|
3362
3352
|
}
|
|
3363
|
-
function
|
|
3353
|
+
function or(e) {
|
|
3364
3354
|
if (e.length === 0) return [];
|
|
3365
3355
|
let t = e.length;
|
|
3366
3356
|
loop: for (; --t >= 0;) switch (e[t].type) {
|
|
@@ -3373,12 +3363,12 @@ function ar(e) {
|
|
|
3373
3363
|
for (; e[++t]?.type === "space";);
|
|
3374
3364
|
return e.splice(t, e.length);
|
|
3375
3365
|
}
|
|
3376
|
-
function
|
|
3377
|
-
if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !$(t.start, "explicit-key-ind") && !$(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key,
|
|
3366
|
+
function sr(e) {
|
|
3367
|
+
if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !$(t.start, "explicit-key-ind") && !$(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, ir(t.value) ? t.value.end ? Array.prototype.push.apply(t.value.end, t.sep) : t.value.end = t.sep : Array.prototype.push.apply(t.start, t.sep), delete t.sep);
|
|
3378
3368
|
}
|
|
3379
|
-
var
|
|
3369
|
+
var cr = class {
|
|
3380
3370
|
constructor(e) {
|
|
3381
|
-
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new
|
|
3371
|
+
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new tr(), this.onNewLine = e;
|
|
3382
3372
|
}
|
|
3383
3373
|
*parse(e, t = !1) {
|
|
3384
3374
|
this.onNewLine && this.offset === 0 && this.onNewLine(0);
|
|
@@ -3390,7 +3380,7 @@ var sr = class {
|
|
|
3390
3380
|
this.atScalar = !1, yield* this.step(), this.offset += e.length;
|
|
3391
3381
|
return;
|
|
3392
3382
|
}
|
|
3393
|
-
let t =
|
|
3383
|
+
let t = Yn(e);
|
|
3394
3384
|
if (!t) {
|
|
3395
3385
|
let t = `Not a YAML token: ${e}`;
|
|
3396
3386
|
yield* this.pop({
|
|
@@ -3473,7 +3463,7 @@ var sr = class {
|
|
|
3473
3463
|
else if (this.stack.length === 0) yield t;
|
|
3474
3464
|
else {
|
|
3475
3465
|
let e = this.peek(1);
|
|
3476
|
-
switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" &&
|
|
3466
|
+
switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && sr(t), e.type) {
|
|
3477
3467
|
case "document":
|
|
3478
3468
|
e.value = t;
|
|
3479
3469
|
break;
|
|
@@ -3524,7 +3514,7 @@ var sr = class {
|
|
|
3524
3514
|
}
|
|
3525
3515
|
if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
|
|
3526
3516
|
let n = t.items[t.items.length - 1];
|
|
3527
|
-
n && !n.sep && !n.value && n.start.length > 0 &&
|
|
3517
|
+
n && !n.sep && !n.value && n.start.length > 0 && rr(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
|
|
3528
3518
|
}
|
|
3529
3519
|
}
|
|
3530
3520
|
}
|
|
@@ -3565,7 +3555,7 @@ var sr = class {
|
|
|
3565
3555
|
if (e.value) return yield* this.lineEnd(e);
|
|
3566
3556
|
switch (this.type) {
|
|
3567
3557
|
case "doc-start":
|
|
3568
|
-
|
|
3558
|
+
rr(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
|
|
3569
3559
|
return;
|
|
3570
3560
|
case "anchor":
|
|
3571
3561
|
case "tag":
|
|
@@ -3585,7 +3575,7 @@ var sr = class {
|
|
|
3585
3575
|
}
|
|
3586
3576
|
*scalar(e) {
|
|
3587
3577
|
if (this.type === "map-value-ind") {
|
|
3588
|
-
let t = ar(
|
|
3578
|
+
let t = or(ar(this.peek(2))), n;
|
|
3589
3579
|
e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
|
|
3590
3580
|
let r = {
|
|
3591
3581
|
type: "block-map",
|
|
@@ -3687,7 +3677,7 @@ var sr = class {
|
|
|
3687
3677
|
sep: [this.sourceToken]
|
|
3688
3678
|
});
|
|
3689
3679
|
else {
|
|
3690
|
-
let e =
|
|
3680
|
+
let e = or(t.start);
|
|
3691
3681
|
this.stack.push({
|
|
3692
3682
|
type: "block-map",
|
|
3693
3683
|
offset: this.offset,
|
|
@@ -3714,8 +3704,8 @@ var sr = class {
|
|
|
3714
3704
|
sep: [this.sourceToken]
|
|
3715
3705
|
}]
|
|
3716
3706
|
});
|
|
3717
|
-
else if (
|
|
3718
|
-
let e =
|
|
3707
|
+
else if (ir(t.key) && !$(t.sep, "newline")) {
|
|
3708
|
+
let e = or(t.start), n = t.key, r = t.sep;
|
|
3719
3709
|
r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
|
|
3720
3710
|
type: "block-map",
|
|
3721
3711
|
offset: this.offset,
|
|
@@ -3882,8 +3872,8 @@ var sr = class {
|
|
|
3882
3872
|
let t = this.peek(2);
|
|
3883
3873
|
if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
|
|
3884
3874
|
else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
|
|
3885
|
-
let n = ar(
|
|
3886
|
-
|
|
3875
|
+
let n = or(ar(t));
|
|
3876
|
+
sr(e);
|
|
3887
3877
|
let r = e.end.splice(1, e.end.length);
|
|
3888
3878
|
r.push(this.sourceToken);
|
|
3889
3879
|
let i = {
|
|
@@ -3942,7 +3932,7 @@ var sr = class {
|
|
|
3942
3932
|
};
|
|
3943
3933
|
case "explicit-key-ind": {
|
|
3944
3934
|
this.onKeyLine = !0;
|
|
3945
|
-
let t = ar(
|
|
3935
|
+
let t = or(ar(e));
|
|
3946
3936
|
return t.push(this.sourceToken), {
|
|
3947
3937
|
type: "block-map",
|
|
3948
3938
|
offset: this.offset,
|
|
@@ -3955,7 +3945,7 @@ var sr = class {
|
|
|
3955
3945
|
}
|
|
3956
3946
|
case "map-value-ind": {
|
|
3957
3947
|
this.onKeyLine = !0;
|
|
3958
|
-
let t = ar(
|
|
3948
|
+
let t = or(ar(e));
|
|
3959
3949
|
return {
|
|
3960
3950
|
type: "block-map",
|
|
3961
3951
|
offset: this.offset,
|
|
@@ -3993,26 +3983,26 @@ var sr = class {
|
|
|
3993
3983
|
};
|
|
3994
3984
|
//#endregion
|
|
3995
3985
|
//#region node_modules/yaml/browser/dist/public-api.js
|
|
3996
|
-
function
|
|
3986
|
+
function lr(e) {
|
|
3997
3987
|
let t = e.prettyErrors !== !1;
|
|
3998
3988
|
return {
|
|
3999
|
-
lineCounter: e.lineCounter || t && new
|
|
3989
|
+
lineCounter: e.lineCounter || t && new nr() || null,
|
|
4000
3990
|
prettyErrors: t
|
|
4001
3991
|
};
|
|
4002
3992
|
}
|
|
4003
|
-
function
|
|
4004
|
-
let { lineCounter: n, prettyErrors: r } =
|
|
3993
|
+
function ur(e, t = {}) {
|
|
3994
|
+
let { lineCounter: n, prettyErrors: r } = lr(t), i = new cr(n?.addNewLine), a = new Un(t), o = null;
|
|
4005
3995
|
for (let t of a.compose(i.parse(e), !0, e.length)) if (!o) o = t;
|
|
4006
3996
|
else if (o.options.logLevel !== "silent") {
|
|
4007
|
-
o.errors.push(new
|
|
3997
|
+
o.errors.push(new an(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
4008
3998
|
break;
|
|
4009
3999
|
}
|
|
4010
|
-
return r && n && (o.errors.forEach(
|
|
4000
|
+
return r && n && (o.errors.forEach(sn(e, n)), o.warnings.forEach(sn(e, n))), o;
|
|
4011
4001
|
}
|
|
4012
|
-
function
|
|
4002
|
+
function dr(e, t, n) {
|
|
4013
4003
|
let r;
|
|
4014
4004
|
typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
|
|
4015
|
-
let i =
|
|
4005
|
+
let i = ur(e, n);
|
|
4016
4006
|
if (!i) return null;
|
|
4017
4007
|
if (i.warnings.forEach((e) => We(i.options.logLevel, e)), i.errors.length > 0) {
|
|
4018
4008
|
if (i.options.logLevel !== "silent") throw i.errors[0];
|
|
@@ -4020,7 +4010,7 @@ function ur(e, t, n) {
|
|
|
4020
4010
|
}
|
|
4021
4011
|
return i.toJS(Object.assign({ reviver: r }, n));
|
|
4022
4012
|
}
|
|
4023
|
-
function
|
|
4013
|
+
function fr(e, t, n) {
|
|
4024
4014
|
let r = null;
|
|
4025
4015
|
if (typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t), typeof n == "string" && (n = n.length), typeof n == "number") {
|
|
4026
4016
|
let e = Math.round(n);
|
|
@@ -4030,16 +4020,16 @@ function dr(e, t, n) {
|
|
|
4030
4020
|
let { keepUndefined: e } = n ?? t ?? {};
|
|
4031
4021
|
if (!e) return;
|
|
4032
4022
|
}
|
|
4033
|
-
return E(e) && !r ? e.toString(n) : new
|
|
4023
|
+
return E(e) && !r ? e.toString(n) : new tn(e, r, n).toString(n);
|
|
4034
4024
|
}
|
|
4035
4025
|
//#endregion
|
|
4036
|
-
//#region src/plugins/map
|
|
4037
|
-
var
|
|
4026
|
+
//#region src/plugins/map/MapComponent.tsx
|
|
4027
|
+
var pr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("")] || u.MapPin, mr = ({ value: e, attributes: t = {} }) => {
|
|
4038
4028
|
let [r, u] = i(null);
|
|
4039
4029
|
console.log("MapComponent render");
|
|
4040
4030
|
let d = n(() => {
|
|
4041
4031
|
try {
|
|
4042
|
-
return
|
|
4032
|
+
return dr(e) || {};
|
|
4043
4033
|
} catch {
|
|
4044
4034
|
return {};
|
|
4045
4035
|
}
|
|
@@ -4085,14 +4075,7 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4085
4075
|
className: "novelaid-map-container",
|
|
4086
4076
|
style: {
|
|
4087
4077
|
height: h,
|
|
4088
|
-
width: g
|
|
4089
|
-
margin: "1.5em 0",
|
|
4090
|
-
borderRadius: "8px",
|
|
4091
|
-
overflow: "hidden",
|
|
4092
|
-
boxShadow: "0 4px 12px rgba(0,0,0,0.1)",
|
|
4093
|
-
border: "1px solid var(--border-color, #ccc)",
|
|
4094
|
-
position: "relative",
|
|
4095
|
-
backgroundColor: "#f0f0f0"
|
|
4078
|
+
width: g
|
|
4096
4079
|
},
|
|
4097
4080
|
children: /* @__PURE__ */ o(s, {
|
|
4098
4081
|
initialViewState: {
|
|
@@ -4119,17 +4102,13 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4119
4102
|
}]
|
|
4120
4103
|
},
|
|
4121
4104
|
children: [_.map((e, t) => {
|
|
4122
|
-
let n =
|
|
4105
|
+
let n = pr(e.type);
|
|
4123
4106
|
return /* @__PURE__ */ a(c, {
|
|
4124
4107
|
longitude: e.long,
|
|
4125
4108
|
latitude: e.lat,
|
|
4126
4109
|
anchor: "bottom",
|
|
4127
4110
|
children: /* @__PURE__ */ a("div", {
|
|
4128
|
-
|
|
4129
|
-
cursor: "pointer",
|
|
4130
|
-
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.3))",
|
|
4131
|
-
zIndex: 10
|
|
4132
|
-
},
|
|
4111
|
+
className: "novelaid-map-marker",
|
|
4133
4112
|
onMouseEnter: () => u(e),
|
|
4134
4113
|
onMouseLeave: () => u(null),
|
|
4135
4114
|
children: /* @__PURE__ */ a(n, {
|
|
@@ -4147,54 +4126,42 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4147
4126
|
closeButton: !1,
|
|
4148
4127
|
closeOnClick: !1,
|
|
4149
4128
|
children: /* @__PURE__ */ o("div", {
|
|
4150
|
-
|
|
4151
|
-
color: "#333",
|
|
4152
|
-
fontSize: "12px",
|
|
4153
|
-
padding: "2px 4px",
|
|
4154
|
-
whiteSpace: "pre-wrap",
|
|
4155
|
-
maxWidth: "200px"
|
|
4156
|
-
},
|
|
4129
|
+
className: "novelaid-map-popup-content",
|
|
4157
4130
|
children: [r.description && /* @__PURE__ */ a("div", {
|
|
4158
|
-
|
|
4159
|
-
fontWeight: "bold",
|
|
4160
|
-
marginBottom: "2px"
|
|
4161
|
-
},
|
|
4131
|
+
className: "novelaid-map-popup-description",
|
|
4162
4132
|
children: r.description
|
|
4163
4133
|
}), r.link && /* @__PURE__ */ a("div", {
|
|
4164
|
-
|
|
4165
|
-
fontSize: "11px",
|
|
4166
|
-
color: "#666"
|
|
4167
|
-
},
|
|
4134
|
+
className: "novelaid-map-popup-link",
|
|
4168
4135
|
children: r.link
|
|
4169
4136
|
})]
|
|
4170
4137
|
})
|
|
4171
4138
|
})]
|
|
4172
4139
|
})
|
|
4173
4140
|
}, `${f}-${p}-${m}-${h}-${g}`);
|
|
4174
|
-
},
|
|
4141
|
+
}, hr = {
|
|
4175
4142
|
name: "map",
|
|
4176
4143
|
codeProcessors: [
|
|
4177
4144
|
{
|
|
4178
4145
|
language: "carto-paw",
|
|
4179
|
-
component:
|
|
4146
|
+
component: mr
|
|
4180
4147
|
},
|
|
4181
4148
|
{
|
|
4182
4149
|
language: "map",
|
|
4183
|
-
component:
|
|
4150
|
+
component: mr
|
|
4184
4151
|
},
|
|
4185
4152
|
{
|
|
4186
4153
|
language: "leaflet",
|
|
4187
|
-
component:
|
|
4154
|
+
component: mr
|
|
4188
4155
|
}
|
|
4189
4156
|
]
|
|
4190
|
-
},
|
|
4157
|
+
}, gr = null, _r = null, vr = async () => gr || (_r ||= (async () => {
|
|
4191
4158
|
try {
|
|
4192
4159
|
let { D2: e } = await import("@terrastruct/d2");
|
|
4193
|
-
return
|
|
4160
|
+
return gr = new e(), await gr.ready, gr;
|
|
4194
4161
|
} catch (e) {
|
|
4195
|
-
throw
|
|
4162
|
+
throw _r = null, e;
|
|
4196
4163
|
}
|
|
4197
|
-
})(),
|
|
4164
|
+
})(), _r), yr = Promise.resolve(), br = (e) => {
|
|
4198
4165
|
if (typeof e == "string") return e;
|
|
4199
4166
|
if (!e) return "";
|
|
4200
4167
|
if (e instanceof Uint8Array || e.buffer && e.byteLength !== void 0) try {
|
|
@@ -4213,7 +4180,7 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4213
4180
|
}
|
|
4214
4181
|
}
|
|
4215
4182
|
return String(e);
|
|
4216
|
-
},
|
|
4183
|
+
}, xr = (e) => {
|
|
4217
4184
|
if (e instanceof Error) return e.message;
|
|
4218
4185
|
if (typeof e == "string") return e;
|
|
4219
4186
|
try {
|
|
@@ -4222,7 +4189,7 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4222
4189
|
} catch {
|
|
4223
4190
|
return "Unknown D2 error";
|
|
4224
4191
|
}
|
|
4225
|
-
},
|
|
4192
|
+
}, Sr = {
|
|
4226
4193
|
name: "d2",
|
|
4227
4194
|
codeProcessors: [{
|
|
4228
4195
|
language: "d2",
|
|
@@ -4230,9 +4197,9 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4230
4197
|
let s = "dark", [c, l] = i(""), [u, d] = i(null), [f, p] = i(!0), m = r(null), { width: h, height: g, pad: _ } = n;
|
|
4231
4198
|
return t(() => {
|
|
4232
4199
|
let t = !0, n = async () => {
|
|
4233
|
-
e && (p(!0), d(null),
|
|
4200
|
+
e && (p(!0), d(null), yr = yr.catch(() => {}).then(async () => {
|
|
4234
4201
|
if (t) try {
|
|
4235
|
-
let n = await
|
|
4202
|
+
let n = await vr(), r = await n.compile(e);
|
|
4236
4203
|
if (r && r.errors && r.errors.length > 0) throw Error(r.errors[0].message || "D2 Syntax Error");
|
|
4237
4204
|
let i = s === "dark" ? 200 : 0, a = {
|
|
4238
4205
|
...r.renderOptions,
|
|
@@ -4241,12 +4208,12 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4241
4208
|
pad: _ === void 0 ? 20 : parseInt(String(_), 10)
|
|
4242
4209
|
}, o = await n.render(r.diagram, a);
|
|
4243
4210
|
if (t) {
|
|
4244
|
-
let e =
|
|
4211
|
+
let e = br(o);
|
|
4245
4212
|
if (!e || e.startsWith("[object Object]")) throw Error("D2 rendering failed to produce a valid SVG string");
|
|
4246
4213
|
l(e), p(!1), d(null);
|
|
4247
4214
|
}
|
|
4248
4215
|
} catch (e) {
|
|
4249
|
-
console.error("D2 rendering failed:", e), t && (d(
|
|
4216
|
+
console.error("D2 rendering failed:", e), t && (d(xr(e)), p(!1));
|
|
4250
4217
|
}
|
|
4251
4218
|
}));
|
|
4252
4219
|
}, r = setTimeout(() => {
|
|
@@ -4259,61 +4226,31 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4259
4226
|
className: "d2-container",
|
|
4260
4227
|
ref: m,
|
|
4261
4228
|
style: {
|
|
4262
|
-
display: "flex",
|
|
4263
|
-
flexDirection: "column",
|
|
4264
|
-
alignItems: "center",
|
|
4265
|
-
margin: "1.5em 0",
|
|
4266
|
-
maxWidth: "100%",
|
|
4267
|
-
overflow: "auto",
|
|
4268
4229
|
width: h || "100%",
|
|
4269
4230
|
height: g || "auto",
|
|
4270
4231
|
minHeight: f ? "100px" : "auto"
|
|
4271
4232
|
},
|
|
4272
|
-
children: [
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
}
|
|
4281
|
-
|
|
4282
|
-
className: "d2-error",
|
|
4283
|
-
style: {
|
|
4284
|
-
color: "#f44336",
|
|
4285
|
-
padding: "1em",
|
|
4286
|
-
border: "1px solid #f44336",
|
|
4287
|
-
borderRadius: "4px",
|
|
4288
|
-
maxWidth: "100%",
|
|
4289
|
-
overflow: "auto",
|
|
4290
|
-
whiteSpace: "pre-wrap",
|
|
4291
|
-
wordBreak: "break-all"
|
|
4292
|
-
},
|
|
4293
|
-
children: ["D2 Error: ", u]
|
|
4294
|
-
}) : /* @__PURE__ */ a("div", {
|
|
4295
|
-
dangerouslySetInnerHTML: { __html: c },
|
|
4296
|
-
style: {
|
|
4297
|
-
width: "100%",
|
|
4298
|
-
flex: 1,
|
|
4299
|
-
minHeight: 0,
|
|
4300
|
-
display: "flex",
|
|
4301
|
-
justifyContent: "center",
|
|
4302
|
-
alignItems: "center"
|
|
4303
|
-
}
|
|
4304
|
-
})
|
|
4305
|
-
]
|
|
4233
|
+
children: [f && !u && /* @__PURE__ */ a("div", {
|
|
4234
|
+
className: "d2-loading",
|
|
4235
|
+
children: "Rendering D2 diagram..."
|
|
4236
|
+
}), u ? /* @__PURE__ */ o("pre", {
|
|
4237
|
+
className: "d2-error",
|
|
4238
|
+
children: ["D2 Error: ", u]
|
|
4239
|
+
}) : /* @__PURE__ */ a("div", {
|
|
4240
|
+
className: "d2-svg-wrapper",
|
|
4241
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
4242
|
+
})]
|
|
4306
4243
|
});
|
|
4307
4244
|
}
|
|
4308
4245
|
}]
|
|
4309
|
-
},
|
|
4246
|
+
}, Cr = {
|
|
4310
4247
|
name: "novelaid-radar",
|
|
4311
4248
|
codePreprocessors: [{
|
|
4312
4249
|
languages: ["novelaid-radar", "radar"],
|
|
4313
4250
|
preprocess: ({ code: e, attributes: t }) => {
|
|
4314
4251
|
try {
|
|
4315
4252
|
let n = e.trim().split(/^---$/m).map((e) => e.trim()).filter((e) => e !== ""), r = {}, i = {};
|
|
4316
|
-
n.length >= 2 ? (r =
|
|
4253
|
+
n.length >= 2 ? (r = dr(n[0]) || {}, i = dr(n[1]) || {}) : n.length === 1 && (i = dr(n[0]) || {});
|
|
4317
4254
|
let a = { ...r }, o = { config: a.config || {} };
|
|
4318
4255
|
delete a.config, o.config.themeVariables || (o.config.themeVariables = {}), o.config.themeVariables.radar || (o.config.themeVariables.radar = {}), (a.title || a.タイトル) && (o.title = a.title || a.タイトル), delete a.title, delete a.タイトル;
|
|
4319
4256
|
let s = a.theme || a.テーマ;
|
|
@@ -4327,7 +4264,7 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4327
4264
|
let d = a.name || a.名前 || "";
|
|
4328
4265
|
delete a.name, delete a.名前, a.最小 !== void 0 && (a.min = a.最小, delete a.最小), a.最大 !== void 0 && (a.max = a.最大, delete a.最大), a.graticule === void 0 && (a.graticule = "polygon"), a.showLegend === void 0 && (a.showLegend = !1);
|
|
4329
4266
|
let f = "";
|
|
4330
|
-
Object.keys(o).length > 0 && (f += `---\n${
|
|
4267
|
+
Object.keys(o).length > 0 && (f += `---\n${fr(o)}---\n`), f += "radar-beta\n";
|
|
4331
4268
|
let p = Object.keys(i);
|
|
4332
4269
|
if (p.length > 0) {
|
|
4333
4270
|
let e = p.map((e, t) => `a${t + 1}["${e}"]`).join(", ");
|
|
@@ -4354,10 +4291,10 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4354
4291
|
}
|
|
4355
4292
|
}
|
|
4356
4293
|
}]
|
|
4357
|
-
},
|
|
4294
|
+
}, wr = class {
|
|
4358
4295
|
registry;
|
|
4359
4296
|
constructor() {
|
|
4360
|
-
this.registry = new d(), this.registry.register(p), this.registry.register(v), this.registry.register(
|
|
4297
|
+
this.registry = new d(), this.registry.register(p), this.registry.register(v), this.registry.register(hr), this.registry.register(Sr), this.registry.register(Cr);
|
|
4361
4298
|
}
|
|
4362
4299
|
registerPlugin(e) {
|
|
4363
4300
|
this.registry.register(e);
|
|
@@ -4373,27 +4310,27 @@ var fr = (e) => !e || e === "default" ? u.MapPin : u[e.split(/[-_ ]+/).map((e) =
|
|
|
4373
4310
|
getCodeProcessors() {
|
|
4374
4311
|
return this.registry.getCodeProcessors();
|
|
4375
4312
|
}
|
|
4376
|
-
},
|
|
4313
|
+
}, Tr = new wr();
|
|
4377
4314
|
//#endregion
|
|
4378
4315
|
//#region src/utils/attribute-parser.ts
|
|
4379
|
-
function
|
|
4316
|
+
function Er(e) {
|
|
4380
4317
|
return e.replace(/-([a-z])/g, (e) => e[1].toUpperCase());
|
|
4381
4318
|
}
|
|
4382
|
-
function
|
|
4319
|
+
function Dr(e) {
|
|
4383
4320
|
let t = {};
|
|
4384
4321
|
if (!e) return t;
|
|
4385
4322
|
let n = e.trim();
|
|
4386
4323
|
n.startsWith("{") && n.endsWith("}") ? n = n.substring(1, n.length - 1).trim() : n.startsWith("{") && (n = n.substring(1).trim());
|
|
4387
4324
|
let r = /([a-zA-Z0-9_-]+)(?:=([^"'\r\n\t ,{}]+|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'))?/g, i;
|
|
4388
4325
|
for (; (i = r.exec(n)) !== null;) {
|
|
4389
|
-
let e = i[1], n = i[2], r =
|
|
4326
|
+
let e = i[1], n = i[2], r = Er(e);
|
|
4390
4327
|
n === void 0 ? t[r] = !0 : ((n.startsWith("\"") && n.endsWith("\"") || n.startsWith("'") && n.endsWith("'")) && (n = n.substring(1, n.length - 1)), (r === "width" || r === "height") && /^\d+$/.test(n) && (n = `${n}px`), t[r] = n);
|
|
4391
4328
|
}
|
|
4392
4329
|
return t;
|
|
4393
4330
|
}
|
|
4394
4331
|
//#endregion
|
|
4395
4332
|
//#region src/renderer/NovelaidMarkdown.tsx
|
|
4396
|
-
function
|
|
4333
|
+
function Or({ src: e, alt: t, filePath: n, title: r }) {
|
|
4397
4334
|
let i = e, o = t, s, c;
|
|
4398
4335
|
if (o && o.includes("|")) {
|
|
4399
4336
|
let e = o.lastIndexOf("|"), t = o.substring(e + 1).trim();
|
|
@@ -4417,7 +4354,7 @@ function Dr({ src: e, alt: t, filePath: n, title: r }) {
|
|
|
4417
4354
|
height: c
|
|
4418
4355
|
});
|
|
4419
4356
|
}
|
|
4420
|
-
var
|
|
4357
|
+
var kr = class extends e.Component {
|
|
4421
4358
|
constructor(e) {
|
|
4422
4359
|
super(e), this.state = { hasError: !1 };
|
|
4423
4360
|
}
|
|
@@ -4440,7 +4377,7 @@ var Or = class extends e.Component {
|
|
|
4440
4377
|
}) : this.props.children;
|
|
4441
4378
|
}
|
|
4442
4379
|
};
|
|
4443
|
-
function
|
|
4380
|
+
function Ar({ content: e, filePath: r, className: o = "", onLinkClick: s }) {
|
|
4444
4381
|
let [c, l] = i(null), [u, d] = i(null), [f, p] = i(null);
|
|
4445
4382
|
t(() => {
|
|
4446
4383
|
Promise.all([
|
|
@@ -4452,7 +4389,7 @@ function kr({ content: e, filePath: r, className: o = "", onLinkClick: s }) {
|
|
|
4452
4389
|
});
|
|
4453
4390
|
}, []);
|
|
4454
4391
|
let m = n(() => ({
|
|
4455
|
-
img: (e) => /* @__PURE__ */ a(
|
|
4392
|
+
img: (e) => /* @__PURE__ */ a(Or, {
|
|
4456
4393
|
...e,
|
|
4457
4394
|
filePath: r
|
|
4458
4395
|
}),
|
|
@@ -4471,7 +4408,7 @@ function kr({ content: e, filePath: r, className: o = "", onLinkClick: s }) {
|
|
|
4471
4408
|
let e = s.indexOf("{");
|
|
4472
4409
|
c = s.substring(0, e), l ||= s.substring(e);
|
|
4473
4410
|
}
|
|
4474
|
-
let u =
|
|
4411
|
+
let u = Dr(l), d = c || "", f = String(t).replace(/\n$/, ""), p = { ...u }, m = Tr.getCodePreprocessors();
|
|
4475
4412
|
for (let e of m) if (e.languages.includes(d) || e.languages.includes("*")) {
|
|
4476
4413
|
let t = e.preprocess({
|
|
4477
4414
|
language: d,
|
|
@@ -4480,7 +4417,7 @@ function kr({ content: e, filePath: r, className: o = "", onLinkClick: s }) {
|
|
|
4480
4417
|
});
|
|
4481
4418
|
d = t.language, f = t.code, p = t.attributes;
|
|
4482
4419
|
}
|
|
4483
|
-
let h =
|
|
4420
|
+
let h = Tr.getCodeProcessors().find((e) => e.language === d);
|
|
4484
4421
|
if (h) {
|
|
4485
4422
|
let e = h.component;
|
|
4486
4423
|
return /* @__PURE__ */ a(e, {
|
|
@@ -4498,10 +4435,10 @@ function kr({ content: e, filePath: r, className: o = "", onLinkClick: s }) {
|
|
|
4498
4435
|
}
|
|
4499
4436
|
}), [r, s]);
|
|
4500
4437
|
if (!c || !u || !f) return /* @__PURE__ */ a("div", { children: "Loading preview..." });
|
|
4501
|
-
let h =
|
|
4438
|
+
let h = Tr.preprocess(e);
|
|
4502
4439
|
return /* @__PURE__ */ a("div", {
|
|
4503
4440
|
className: o,
|
|
4504
|
-
children: /* @__PURE__ */ a(
|
|
4441
|
+
children: /* @__PURE__ */ a(kr, {
|
|
4505
4442
|
content: h,
|
|
4506
4443
|
filePath: r,
|
|
4507
4444
|
children: /* @__PURE__ */ a(c, {
|
|
@@ -4514,4 +4451,4 @@ function kr({ content: e, filePath: r, className: o = "", onLinkClick: s }) {
|
|
|
4514
4451
|
});
|
|
4515
4452
|
}
|
|
4516
4453
|
//#endregion
|
|
4517
|
-
export {
|
|
4454
|
+
export { Ar as NovelaidMarkdown, wr as NovelaidMarkdownProcessor, Tr as defaultProcessor };
|