@redocly/replay 0.28.0-next.2 → 0.28.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{replay-AiChatProvider-D3tGLym7.js → replay-AiChatProvider-BIplPHOS.js} +6 -6
- package/dist/{replay-AiChatProvider-DLZX3ihL.js → replay-AiChatProvider-TF1u9E5L.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-ckjqpV-2.js → replay-AiChatSqliteDBStorage-Bay95FHW.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-yawoZunX.js → replay-AiChatSqliteDBStorage-C-rkQ3jG.js} +1 -1
- package/dist/{replay-AiPanel-CtMW4jHp.js → replay-AiPanel-DU5aVA3q.js} +4 -4
- package/dist/{replay-AiPanel-C2dOENPe.js → replay-AiPanel-DzGN1t86.js} +1 -1
- package/dist/{replay-FileWatcher-sxKCrDRy.js → replay-FileWatcher-XMkIoDEA.js} +1 -1
- package/dist/{replay-FileWatcher-Da7VcNHD.js → replay-FileWatcher-iYbHpwCv.js} +2 -2
- package/dist/{replay-SemanticSearchService-d98JHVBr.js → replay-SemanticSearchService-BWwCFW3F.js} +1 -1
- package/dist/{replay-SemanticSearchService-Z4oXtg1-.js → replay-SemanticSearchService-Dk4UTm2r.js} +1 -1
- package/dist/{replay-SqliteDBStorage-u6WbcK1f.js → replay-SqliteDBStorage-BFdjYsG7.js} +1 -1
- package/dist/{replay-SqliteDBStorage-3VBWw1et.js → replay-SqliteDBStorage-DGQjzDy4.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-CjAHiJt1.js → replay-TauriFileSystemAdapter-C8k9RvT1.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-ICQ2nRWO.js → replay-TauriFileSystemAdapter-CLzYSck7.js} +1 -1
- package/dist/{replay-TauriRootStorage-hW8Tndk0.js → replay-TauriRootStorage-C1MIH5ji.js} +2 -2
- package/dist/{replay-TauriRootStorage-CQj8br8Q.js → replay-TauriRootStorage-CiGY8MO6.js} +1 -1
- package/dist/{replay-agent-loop-B-IEIGri.js → replay-agent-loop-BoEw65rR.js} +3 -3
- package/dist/{replay-agent-loop-B06Jshb3.js → replay-agent-loop-Cm1iS9G2.js} +1 -1
- package/dist/{replay-ai-chat-mappers-B5sjJdrE.js → replay-ai-chat-mappers-Csm9vJrG.js} +1 -1
- package/dist/{replay-ai-chat-mappers-UGovEa4H.js → replay-ai-chat-mappers-IZNFNXug.js} +1 -1
- package/dist/{replay-create-model-lRYWX-0l.js → replay-create-model-BqvD-0wF.js} +3 -3
- package/dist/{replay-create-model-B-KPLEJi.js → replay-create-model-Y9UJSztb.js} +3 -3
- package/dist/{replay-db-00pWKHyY.js → replay-db-BImXgUGU.js} +1 -1
- package/dist/{replay-db-B_wOpXdd.js → replay-db-C7FD3opa.js} +1 -1
- package/dist/{replay-external-resolver-D-h0nPH_.js → replay-external-resolver-Bj3sLTnz.js} +2 -2
- package/dist/{replay-external-resolver-Ds5-nzcf.js → replay-external-resolver-CjM7Da6t.js} +1 -1
- package/dist/{replay-index-C-A7VOiR.js → replay-index-BH8cTSEK.js} +21 -21
- package/dist/{replay-index-C8p-US63.js → replay-index-BuYoH96w.js} +11 -11
- package/dist/{replay-index-9rbZ-mEz.js → replay-index-CKRKzXMt.js} +1 -1
- package/dist/replay-index-Cp06WK82.js +574 -0
- package/dist/{replay-index-DenMrfEa.js → replay-index-DJwfdo0s.js} +1 -1
- package/dist/{replay-index-lxN84rl9.js → replay-index-DlTloE6S.js} +1 -1
- package/dist/replay-index-Dxk-kqkZ.js +1 -0
- package/dist/{replay-index-CtSJHuow.js → replay-index-xheWgsnj.js} +2 -2
- package/dist/{replay-lint-To3OwiOO.js → replay-lint--iBW-6Vj.js} +9461 -13309
- package/dist/replay-lint-BIbkYU09.js +177 -0
- package/dist/{replay-lint-graphql-Bm1aR8BO.js → replay-lint-graphql-2b4GIER6.js} +1 -1
- package/dist/{replay-lint-graphql-k2xF1Dxd.js → replay-lint-graphql-EXBI8I89.js} +1 -1
- package/dist/{replay-resolve-Id-g4Fn5.js → replay-resolve-B5yIfyuT.js} +16 -16
- package/dist/{replay-resolve-uDAWE6Oj.js → replay-resolve-D9BUvjqv.js} +357 -355
- package/dist/{replay-respect-run-BkDXTsm6.js → replay-respect-run-Bx46aUHi.js} +3 -3
- package/dist/{replay-respect-run-B0ZG-ZH7.js → replay-respect-run-DNFoFnJU.js} +1 -1
- package/dist/{replay-tauri-path-BfRUQXOx.js → replay-tauri-path-BVoW6En0.js} +2 -2
- package/dist/{replay-tauri-path-GCN1liZ4.js → replay-tauri-path-C8GiFO5s.js} +1 -1
- package/dist/{replay-useAiChatQueries-CeHqt0jZ.js → replay-useAiChatQueries-BDgjmzz-.js} +1 -1
- package/dist/{replay-useAiChatQueries-cuGEM1L6.js → replay-useAiChatQueries-BTuu2xLG.js} +4 -4
- package/dist/{replay-validate-key-BismpJXJ.js → replay-validate-key-CjcIElmE.js} +2 -2
- package/dist/{replay-validate-key-DYqoWPkp.js → replay-validate-key-D4M7QvCw.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +4 -4
- package/dist/replay-index-BCtyyb1v.js +0 -504
- package/dist/replay-index-DCvqReXK.js +0 -1
- package/dist/replay-lint-BJ5AeIt-.js +0 -184
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as hr, aS as
|
|
1
|
+
import { g as hr, aS as Ve, aT as Re } from "./replay-index-BH8cTSEK.js";
|
|
2
2
|
function gr(e) {
|
|
3
3
|
return !!e;
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@ var Et = {}, Ct, un;
|
|
|
6
6
|
function pt() {
|
|
7
7
|
if (un) return Ct;
|
|
8
8
|
un = 1;
|
|
9
|
-
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`, S = `${r}{1,2}${u}`, m = `(?!${r})`, C = `(?!${c}${S})`, E = `(?!${r}{0,1}${u})`,
|
|
9
|
+
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`, S = `${r}{1,2}${u}`, m = `(?!${r})`, C = `(?!${c}${S})`, E = `(?!${r}{0,1}${u})`, w = `(?!${S})`, M = `[^.${a}]`, N = `${l}*?`, y = {
|
|
10
10
|
DOT_LITERAL: r,
|
|
11
11
|
PLUS_LITERAL: i,
|
|
12
12
|
QMARK_LITERAL: o,
|
|
@@ -18,7 +18,7 @@ function pt() {
|
|
|
18
18
|
NO_DOT: m,
|
|
19
19
|
NO_DOTS: C,
|
|
20
20
|
NO_DOT_SLASH: E,
|
|
21
|
-
NO_DOTS_SLASH:
|
|
21
|
+
NO_DOTS_SLASH: w,
|
|
22
22
|
QMARK_NO_DOT: M,
|
|
23
23
|
STAR: N,
|
|
24
24
|
START_ANCHOR: c,
|
|
@@ -164,9 +164,9 @@ function pt() {
|
|
|
164
164
|
/**
|
|
165
165
|
* Create EXTGLOB_CHARS
|
|
166
166
|
*/
|
|
167
|
-
extglobChars(
|
|
167
|
+
extglobChars(I) {
|
|
168
168
|
return {
|
|
169
|
-
"!": { type: "negate", open: "(?:(?!(?:", close: `))${
|
|
169
|
+
"!": { type: "negate", open: "(?:(?!(?:", close: `))${I.STAR})` },
|
|
170
170
|
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
171
171
|
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
172
172
|
"*": { type: "star", open: "(?:", close: ")*" },
|
|
@@ -176,8 +176,8 @@ function pt() {
|
|
|
176
176
|
/**
|
|
177
177
|
* Create GLOB_CHARS
|
|
178
178
|
*/
|
|
179
|
-
globChars(
|
|
180
|
-
return
|
|
179
|
+
globChars(I) {
|
|
180
|
+
return I === !0 ? R : y;
|
|
181
181
|
}
|
|
182
182
|
}, Ct;
|
|
183
183
|
}
|
|
@@ -245,16 +245,16 @@ function mr() {
|
|
|
245
245
|
/* } */
|
|
246
246
|
CHAR_RIGHT_PARENTHESES: E,
|
|
247
247
|
/* ) */
|
|
248
|
-
CHAR_RIGHT_SQUARE_BRACKET:
|
|
248
|
+
CHAR_RIGHT_SQUARE_BRACKET: w
|
|
249
249
|
/* ] */
|
|
250
250
|
} = /* @__PURE__ */ pt(), M = (y) => y === s || y === r, N = (y) => {
|
|
251
251
|
y.isPrefix !== !0 && (y.depth = y.isGlobstar ? 1 / 0 : 1);
|
|
252
252
|
};
|
|
253
253
|
return Tt = (y, R) => {
|
|
254
|
-
const f = R || {},
|
|
255
|
-
let W = y, L = -1, q = 0, ce = 0, se = !1, de = !1, j = !1, ye = !1,
|
|
256
|
-
const h = () => L >=
|
|
257
|
-
for (; L <
|
|
254
|
+
const f = R || {}, I = y.length - 1, v = f.parts === !0 || f.scanToEnd === !0, A = [], g = [], x = [];
|
|
255
|
+
let W = y, L = -1, q = 0, ce = 0, se = !1, de = !1, j = !1, ye = !1, _e = !1, he = !1, U = !1, ge = !1, we = !1, ne = !1, J = 0, le, $, F = { value: "", depth: 0, isGlob: !1 };
|
|
256
|
+
const h = () => L >= I, ae = () => W.charCodeAt(L + 1), z = () => (le = $, W.charCodeAt(++L));
|
|
257
|
+
for (; L < I; ) {
|
|
258
258
|
$ = z();
|
|
259
259
|
let D;
|
|
260
260
|
if ($ === r) {
|
|
@@ -272,12 +272,12 @@ function mr() {
|
|
|
272
272
|
continue;
|
|
273
273
|
}
|
|
274
274
|
if (he !== !0 && $ === o && ($ = z()) === o) {
|
|
275
|
-
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0,
|
|
275
|
+
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0, v === !0)
|
|
276
276
|
continue;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
if (he !== !0 && $ === i) {
|
|
280
|
-
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0,
|
|
280
|
+
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0, v === !0)
|
|
281
281
|
continue;
|
|
282
282
|
break;
|
|
283
283
|
}
|
|
@@ -286,7 +286,7 @@ function mr() {
|
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
if (
|
|
289
|
+
if (v === !0)
|
|
290
290
|
continue;
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
@@ -300,7 +300,7 @@ function mr() {
|
|
|
300
300
|
continue;
|
|
301
301
|
}
|
|
302
302
|
if (f.noext !== !0 && ($ === S || $ === n || $ === t || $ === m || $ === a) === !0 && ae() === u) {
|
|
303
|
-
if (j = F.isGlob = !0, ye = F.isExtglob = !0, ne = !0, $ === a && L === q && (
|
|
303
|
+
if (j = F.isGlob = !0, ye = F.isExtglob = !0, ne = !0, $ === a && L === q && (we = !0), v === !0) {
|
|
304
304
|
for (; h() !== !0 && ($ = z()); ) {
|
|
305
305
|
if ($ === r) {
|
|
306
306
|
U = F.backslashes = !0, $ = z();
|
|
@@ -316,12 +316,12 @@ function mr() {
|
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
if ($ === t) {
|
|
319
|
-
if (le === t && (
|
|
319
|
+
if (le === t && (_e = F.isGlobstar = !0), j = F.isGlob = !0, ne = !0, v === !0)
|
|
320
320
|
continue;
|
|
321
321
|
break;
|
|
322
322
|
}
|
|
323
323
|
if ($ === m) {
|
|
324
|
-
if (j = F.isGlob = !0, ne = !0,
|
|
324
|
+
if (j = F.isGlob = !0, ne = !0, v === !0)
|
|
325
325
|
continue;
|
|
326
326
|
break;
|
|
327
327
|
}
|
|
@@ -331,12 +331,12 @@ function mr() {
|
|
|
331
331
|
U = F.backslashes = !0, z();
|
|
332
332
|
continue;
|
|
333
333
|
}
|
|
334
|
-
if (D ===
|
|
334
|
+
if (D === w) {
|
|
335
335
|
de = F.isBracket = !0, j = F.isGlob = !0, ne = !0;
|
|
336
336
|
break;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
if (
|
|
339
|
+
if (v === !0)
|
|
340
340
|
continue;
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
@@ -345,7 +345,7 @@ function mr() {
|
|
|
345
345
|
continue;
|
|
346
346
|
}
|
|
347
347
|
if (f.noparen !== !0 && $ === u) {
|
|
348
|
-
if (j = F.isGlob = !0,
|
|
348
|
+
if (j = F.isGlob = !0, v === !0) {
|
|
349
349
|
for (; h() !== !0 && ($ = z()); ) {
|
|
350
350
|
if ($ === u) {
|
|
351
351
|
U = F.backslashes = !0, $ = z();
|
|
@@ -361,7 +361,7 @@ function mr() {
|
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
if (j === !0) {
|
|
364
|
-
if (ne = !0,
|
|
364
|
+
if (ne = !0, v === !0)
|
|
365
365
|
continue;
|
|
366
366
|
break;
|
|
367
367
|
}
|
|
@@ -379,9 +379,9 @@ function mr() {
|
|
|
379
379
|
isBracket: de,
|
|
380
380
|
isGlob: j,
|
|
381
381
|
isExtglob: ye,
|
|
382
|
-
isGlobstar:
|
|
382
|
+
isGlobstar: _e,
|
|
383
383
|
negated: ge,
|
|
384
|
-
negatedExtglob:
|
|
384
|
+
negatedExtglob: we
|
|
385
385
|
};
|
|
386
386
|
if (f.tokens === !0 && (ue.maxDepth = 0, M($) || g.push(F), ue.tokens = g), f.parts === !0 || f.tokens === !0) {
|
|
387
387
|
let D;
|
|
@@ -398,9 +398,9 @@ function mr() {
|
|
|
398
398
|
return ue;
|
|
399
399
|
}, Tt;
|
|
400
400
|
}
|
|
401
|
-
var
|
|
401
|
+
var bt, dn;
|
|
402
402
|
function Ar() {
|
|
403
|
-
if (dn) return
|
|
403
|
+
if (dn) return bt;
|
|
404
404
|
dn = 1;
|
|
405
405
|
const e = /* @__PURE__ */ pt(), t = /* @__PURE__ */ dt(), {
|
|
406
406
|
MAX_LENGTH: n,
|
|
@@ -416,12 +416,12 @@ function Ar() {
|
|
|
416
416
|
try {
|
|
417
417
|
new RegExp(f);
|
|
418
418
|
} catch {
|
|
419
|
-
return y.map((
|
|
419
|
+
return y.map((v) => t.escapeRegex(v)).join("..");
|
|
420
420
|
}
|
|
421
421
|
return f;
|
|
422
422
|
}, l = (y, R) => `Missing ${y}: "${R}" - use "\\\\${R}" to match literal characters`, u = (y) => {
|
|
423
423
|
const R = [];
|
|
424
|
-
let f = 0,
|
|
424
|
+
let f = 0, I = 0, v = 0, A = "", g = !1;
|
|
425
425
|
for (const x of y) {
|
|
426
426
|
if (g === !0) {
|
|
427
427
|
A += x, g = !1;
|
|
@@ -432,20 +432,20 @@ function Ar() {
|
|
|
432
432
|
continue;
|
|
433
433
|
}
|
|
434
434
|
if (x === '"') {
|
|
435
|
-
|
|
435
|
+
v = v === 1 ? 0 : 1, A += x;
|
|
436
436
|
continue;
|
|
437
437
|
}
|
|
438
|
-
if (
|
|
438
|
+
if (v === 0) {
|
|
439
439
|
if (x === "[")
|
|
440
440
|
f++;
|
|
441
441
|
else if (x === "]" && f > 0)
|
|
442
442
|
f--;
|
|
443
443
|
else if (f === 0) {
|
|
444
444
|
if (x === "(")
|
|
445
|
-
|
|
446
|
-
else if (x === ")" &&
|
|
447
|
-
|
|
448
|
-
else if (x === "|" &&
|
|
445
|
+
I++;
|
|
446
|
+
else if (x === ")" && I > 0)
|
|
447
|
+
I--;
|
|
448
|
+
else if (x === "|" && I === 0) {
|
|
449
449
|
R.push(A), A = "";
|
|
450
450
|
continue;
|
|
451
451
|
}
|
|
@@ -478,16 +478,16 @@ function Ar() {
|
|
|
478
478
|
}, m = (y) => {
|
|
479
479
|
const R = y.map(S).filter(Boolean);
|
|
480
480
|
for (let f = 0; f < R.length; f++)
|
|
481
|
-
for (let
|
|
482
|
-
const
|
|
483
|
-
if (!(!g ||
|
|
481
|
+
for (let I = f + 1; I < R.length; I++) {
|
|
482
|
+
const v = R[f], A = R[I], g = v[0];
|
|
483
|
+
if (!(!g || v !== g.repeat(v.length) || A !== g.repeat(A.length)) && (v === A || v.startsWith(A) || A.startsWith(v)))
|
|
484
484
|
return !0;
|
|
485
485
|
}
|
|
486
486
|
return !1;
|
|
487
487
|
}, C = (y, R = !0) => {
|
|
488
488
|
if (y[0] !== "+" && y[0] !== "*" || y[1] !== "(")
|
|
489
489
|
return;
|
|
490
|
-
let f = 0,
|
|
490
|
+
let f = 0, I = 0, v = 0, A = !1;
|
|
491
491
|
for (let g = 1; g < y.length; g++) {
|
|
492
492
|
const x = y[g];
|
|
493
493
|
if (A === !0) {
|
|
@@ -499,10 +499,10 @@ function Ar() {
|
|
|
499
499
|
continue;
|
|
500
500
|
}
|
|
501
501
|
if (x === '"') {
|
|
502
|
-
|
|
502
|
+
v = v === 1 ? 0 : 1;
|
|
503
503
|
continue;
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
505
|
+
if (v !== 1) {
|
|
506
506
|
if (x === "[") {
|
|
507
507
|
f++;
|
|
508
508
|
continue;
|
|
@@ -513,10 +513,10 @@ function Ar() {
|
|
|
513
513
|
}
|
|
514
514
|
if (!(f > 0)) {
|
|
515
515
|
if (x === "(") {
|
|
516
|
-
|
|
516
|
+
I++;
|
|
517
517
|
continue;
|
|
518
518
|
}
|
|
519
|
-
if (x === ")" && (
|
|
519
|
+
if (x === ")" && (I--, I === 0))
|
|
520
520
|
return R === !0 && g !== y.length - 1 ? void 0 : {
|
|
521
521
|
type: y[0],
|
|
522
522
|
body: y.slice(2, g),
|
|
@@ -525,59 +525,59 @@ function Ar() {
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
}, E = (y) => `${y.length === 1 ? t.escapeRegex(y[0]) : `[${y.map((f) => t.escapeRegex(f)).join("")}]`}*`,
|
|
528
|
+
}, E = (y) => `${y.length === 1 ? t.escapeRegex(y[0]) : `[${y.map((f) => t.escapeRegex(f)).join("")}]`}*`, w = (y) => {
|
|
529
529
|
let R = 0;
|
|
530
530
|
const f = [];
|
|
531
531
|
for (; R < y.length; ) {
|
|
532
|
-
const
|
|
533
|
-
if (!
|
|
532
|
+
const I = C(y.slice(R), !1);
|
|
533
|
+
if (!I || I.type !== "*")
|
|
534
534
|
return;
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
535
|
+
const v = u(I.body).map((g) => g.trim());
|
|
536
|
+
if (v.length !== 1)
|
|
537
537
|
return;
|
|
538
|
-
const A = S(
|
|
538
|
+
const A = S(v[0]);
|
|
539
539
|
if (!A || A.length !== 1)
|
|
540
540
|
return;
|
|
541
|
-
f.push(A), R +=
|
|
541
|
+
f.push(A), R += I.end + 1;
|
|
542
542
|
}
|
|
543
543
|
if (!(f.length < 1))
|
|
544
544
|
return f;
|
|
545
545
|
}, M = (y) => {
|
|
546
|
-
let R = 0, f = y.trim(),
|
|
547
|
-
for (;
|
|
548
|
-
R++, f =
|
|
546
|
+
let R = 0, f = y.trim(), I = C(f);
|
|
547
|
+
for (; I; )
|
|
548
|
+
R++, f = I.body.trim(), I = C(f);
|
|
549
549
|
return R;
|
|
550
550
|
}, N = (y, R) => {
|
|
551
551
|
if (R.maxExtglobRecursion === !1)
|
|
552
552
|
return { risky: !1 };
|
|
553
|
-
const f = typeof R.maxExtglobRecursion == "number" ? R.maxExtglobRecursion : e.DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
554
|
-
if (
|
|
553
|
+
const f = typeof R.maxExtglobRecursion == "number" ? R.maxExtglobRecursion : e.DEFAULT_MAX_EXTGLOB_RECURSION, I = u(y).map((x) => x.trim());
|
|
554
|
+
if (I.length > 1 && (I.some((x) => x === "") || I.some((x) => /^[*?]+$/.test(x)) || m(I)))
|
|
555
555
|
return { risky: !0 };
|
|
556
|
-
const
|
|
556
|
+
const v = [];
|
|
557
557
|
let A = !1, g = !0;
|
|
558
|
-
for (const x of
|
|
559
|
-
const W =
|
|
558
|
+
for (const x of I) {
|
|
559
|
+
const W = w(x);
|
|
560
560
|
if (W) {
|
|
561
|
-
A = !0,
|
|
561
|
+
A = !0, v.push(...W);
|
|
562
562
|
continue;
|
|
563
563
|
}
|
|
564
564
|
const L = S(x);
|
|
565
565
|
if (L && L.length === 1) {
|
|
566
|
-
|
|
566
|
+
v.push(L);
|
|
567
567
|
continue;
|
|
568
568
|
}
|
|
569
569
|
if (g = !1, M(x) > f)
|
|
570
570
|
return { risky: !0 };
|
|
571
571
|
}
|
|
572
|
-
return A ? g ? { risky: !0, safeOutput: E([...new Set(
|
|
572
|
+
return A ? g ? { risky: !0, safeOutput: E([...new Set(v)]) } : { risky: !0 } : { risky: !1 };
|
|
573
573
|
}, k = (y, R) => {
|
|
574
574
|
if (typeof y != "string")
|
|
575
575
|
throw new TypeError("Expected a string");
|
|
576
576
|
y = a[y] || y;
|
|
577
|
-
const f = { ...R },
|
|
578
|
-
let
|
|
579
|
-
if (
|
|
580
|
-
throw new SyntaxError(`Input length: ${
|
|
577
|
+
const f = { ...R }, I = typeof f.maxLength == "number" ? Math.min(n, f.maxLength) : n;
|
|
578
|
+
let v = y.length;
|
|
579
|
+
if (v > I)
|
|
580
|
+
throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${I}`);
|
|
581
581
|
const A = { type: "bos", value: "", output: f.prepend || "" }, g = [A], x = f.capture ? "" : "?:", W = e.globChars(f.windows), L = e.extglobChars(W), {
|
|
582
582
|
DOT_LITERAL: q,
|
|
583
583
|
PLUS_LITERAL: ce,
|
|
@@ -585,14 +585,14 @@ function Ar() {
|
|
|
585
585
|
ONE_CHAR: de,
|
|
586
586
|
DOTS_SLASH: j,
|
|
587
587
|
NO_DOT: ye,
|
|
588
|
-
NO_DOT_SLASH:
|
|
588
|
+
NO_DOT_SLASH: _e,
|
|
589
589
|
NO_DOTS_SLASH: he,
|
|
590
590
|
QMARK: U,
|
|
591
591
|
QMARK_NO_DOT: ge,
|
|
592
|
-
STAR:
|
|
592
|
+
STAR: we,
|
|
593
593
|
START_ANCHOR: ne
|
|
594
|
-
} = W, J = (
|
|
595
|
-
let F = f.bash === !0 ? J(f) :
|
|
594
|
+
} = W, J = (b) => `(${x}(?:(?!${ne}${b.dot ? j : q}).)*?)`, le = f.dot ? "" : ye, $ = f.dot ? U : ge;
|
|
595
|
+
let F = f.bash === !0 ? J(f) : we;
|
|
596
596
|
f.capture && (F = `(${F})`), typeof f.noext == "boolean" && (f.noextglob = f.noext);
|
|
597
597
|
const h = {
|
|
598
598
|
input: y,
|
|
@@ -611,61 +611,61 @@ function Ar() {
|
|
|
611
611
|
globstar: !1,
|
|
612
612
|
tokens: g
|
|
613
613
|
};
|
|
614
|
-
y = t.removePrefix(y, h),
|
|
614
|
+
y = t.removePrefix(y, h), v = y.length;
|
|
615
615
|
const ae = [], z = [], X = [];
|
|
616
616
|
let d = A, p;
|
|
617
|
-
const ue = () => h.index ===
|
|
618
|
-
h.consumed +=
|
|
619
|
-
}, Te = (
|
|
620
|
-
h.output +=
|
|
617
|
+
const ue = () => h.index === v - 1, D = h.peek = (b = 1) => y[h.index + b], V = h.advance = () => y[++h.index] || "", Se = () => y.slice(h.index + 1), fe = (b = "", Y = 0) => {
|
|
618
|
+
h.consumed += b, h.index += Y;
|
|
619
|
+
}, Te = (b) => {
|
|
620
|
+
h.output += b.output != null ? b.output : b.value, fe(b.value);
|
|
621
621
|
}, pr = () => {
|
|
622
|
-
let
|
|
622
|
+
let b = 1;
|
|
623
623
|
for (; D() === "!" && (D(2) !== "(" || D(3) === "?"); )
|
|
624
|
-
V(), h.start++,
|
|
625
|
-
return
|
|
626
|
-
},
|
|
627
|
-
h[
|
|
628
|
-
},
|
|
629
|
-
h[
|
|
630
|
-
}, O = (
|
|
624
|
+
V(), h.start++, b++;
|
|
625
|
+
return b % 2 === 0 ? !1 : (h.negated = !0, h.start++, !0);
|
|
626
|
+
}, Je = (b) => {
|
|
627
|
+
h[b]++, X.push(b);
|
|
628
|
+
}, be = (b) => {
|
|
629
|
+
h[b]--, X.pop();
|
|
630
|
+
}, O = (b) => {
|
|
631
631
|
if (d.type === "globstar") {
|
|
632
|
-
const Y = h.braces > 0 && (
|
|
633
|
-
|
|
632
|
+
const Y = h.braces > 0 && (b.type === "comma" || b.type === "brace"), T = b.extglob === !0 || ae.length && (b.type === "pipe" || b.type === "paren");
|
|
633
|
+
b.type !== "slash" && b.type !== "paren" && !Y && !T && (h.output = h.output.slice(0, -d.output.length), d.type = "star", d.value = "*", d.output = F, h.output += d.output);
|
|
634
634
|
}
|
|
635
|
-
if (ae.length &&
|
|
636
|
-
d.output = (d.output || d.value) +
|
|
635
|
+
if (ae.length && b.type !== "paren" && (ae[ae.length - 1].inner += b.value), (b.value || b.output) && Te(b), d && d.type === "text" && b.type === "text") {
|
|
636
|
+
d.output = (d.output || d.value) + b.value, d.value += b.value;
|
|
637
637
|
return;
|
|
638
638
|
}
|
|
639
|
-
|
|
640
|
-
},
|
|
639
|
+
b.prev = d, g.push(b), d = b;
|
|
640
|
+
}, et = (b, Y) => {
|
|
641
641
|
const T = { ...L[Y], conditions: 1, inner: "" };
|
|
642
642
|
T.prev = d, T.parens = h.parens, T.output = h.output, T.startIndex = h.index, T.tokensIndex = g.length;
|
|
643
643
|
const P = (f.capture ? "(" : "") + T.open;
|
|
644
|
-
|
|
645
|
-
}, dr = (
|
|
646
|
-
const Y = y.slice(
|
|
647
|
-
if ((
|
|
648
|
-
const K = P.safeOutput ? (
|
|
644
|
+
Je("parens"), O({ type: b, value: Y, output: h.output ? "" : de }), O({ type: "paren", extglob: !0, value: V(), output: P }), ae.push(T);
|
|
645
|
+
}, dr = (b) => {
|
|
646
|
+
const Y = y.slice(b.startIndex, h.index + 1), T = y.slice(b.startIndex + 2, h.index), P = N(T, f);
|
|
647
|
+
if ((b.type === "plus" || b.type === "star") && P.risky) {
|
|
648
|
+
const K = P.safeOutput ? (b.output ? "" : de) + (f.capture ? `(${P.safeOutput})` : P.safeOutput) : void 0, me = g[b.tokensIndex];
|
|
649
649
|
me.type = "text", me.value = Y, me.output = K || t.escapeRegex(Y);
|
|
650
|
-
for (let Ae =
|
|
650
|
+
for (let Ae = b.tokensIndex + 1; Ae < g.length; Ae++)
|
|
651
651
|
g[Ae].value = "", g[Ae].output = "", delete g[Ae].suffix;
|
|
652
|
-
h.output =
|
|
652
|
+
h.output = b.output + me.output, h.backtrack = !0, O({ type: "paren", extglob: !0, value: p, output: "" }), be("parens");
|
|
653
653
|
return;
|
|
654
654
|
}
|
|
655
|
-
let G =
|
|
656
|
-
if (
|
|
655
|
+
let G = b.close + (f.capture ? ")" : ""), Q;
|
|
656
|
+
if (b.type === "negate") {
|
|
657
657
|
let K = F;
|
|
658
|
-
if (
|
|
658
|
+
if (b.inner && b.inner.length > 1 && b.inner.includes("/") && (K = J(f)), (K !== F || ue() || /^\)+$/.test(Se())) && (G = b.close = `)$))${K}`), b.inner.includes("*") && (Q = Se()) && /^\.[^\\/.]+$/.test(Q)) {
|
|
659
659
|
const me = k(Q, { ...R, fastpaths: !1 }).output;
|
|
660
|
-
G =
|
|
660
|
+
G = b.close = `)${me})${K})`;
|
|
661
661
|
}
|
|
662
|
-
|
|
662
|
+
b.prev.type === "bos" && (h.negatedExtglob = !0);
|
|
663
663
|
}
|
|
664
|
-
O({ type: "paren", extglob: !0, value: p, output: G }),
|
|
664
|
+
O({ type: "paren", extglob: !0, value: p, output: G }), be("parens");
|
|
665
665
|
};
|
|
666
666
|
if (f.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(y)) {
|
|
667
|
-
let
|
|
668
|
-
return
|
|
667
|
+
let b = !1, Y = y.replace(o, (T, P, G, Q, K, me) => Q === "\\" ? (b = !0, T) : Q === "?" ? P ? P + Q + (K ? U.repeat(K.length) : "") : me === 0 ? $ + (K ? U.repeat(K.length) : "") : U.repeat(G.length) : Q === "." ? q.repeat(G.length) : Q === "*" ? P ? P + Q + (K ? F : "") : F : P ? T : `\\${T}`);
|
|
668
|
+
return b === !0 && (f.unescape === !0 ? Y = Y.replace(/\\/g, "") : Y = Y.replace(/\\+/g, (T) => T.length % 2 === 0 ? "\\\\" : T ? "\\" : "")), Y === y && f.contains === !0 ? (h.output = y, h) : (h.output = t.wrapOutput(Y, h, R), h);
|
|
669
669
|
}
|
|
670
670
|
for (; !ue(); ) {
|
|
671
671
|
if (p = V(), p === "\0")
|
|
@@ -708,7 +708,7 @@ function Ar() {
|
|
|
708
708
|
continue;
|
|
709
709
|
}
|
|
710
710
|
if (p === "(") {
|
|
711
|
-
|
|
711
|
+
Je("parens"), O({ type: "paren", value: p });
|
|
712
712
|
continue;
|
|
713
713
|
}
|
|
714
714
|
if (p === ")") {
|
|
@@ -719,7 +719,7 @@ function Ar() {
|
|
|
719
719
|
dr(ae.pop());
|
|
720
720
|
continue;
|
|
721
721
|
}
|
|
722
|
-
O({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }),
|
|
722
|
+
O({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), be("parens");
|
|
723
723
|
continue;
|
|
724
724
|
}
|
|
725
725
|
if (p === "[") {
|
|
@@ -728,7 +728,7 @@ function Ar() {
|
|
|
728
728
|
throw new SyntaxError(l("closing", "]"));
|
|
729
729
|
p = `\\${p}`;
|
|
730
730
|
} else
|
|
731
|
-
|
|
731
|
+
Je("brackets");
|
|
732
732
|
O({ type: "bracket", value: p });
|
|
733
733
|
continue;
|
|
734
734
|
}
|
|
@@ -743,7 +743,7 @@ function Ar() {
|
|
|
743
743
|
O({ type: "text", value: p, output: `\\${p}` });
|
|
744
744
|
continue;
|
|
745
745
|
}
|
|
746
|
-
|
|
746
|
+
be("brackets");
|
|
747
747
|
const T = d.value.slice(1);
|
|
748
748
|
if (d.posix !== !0 && T[0] === "^" && !T.includes("/") && (p = `/${p}`), d.value += p, Te({ value: p }), f.literalBrackets === !1 || t.hasRegexChars(T))
|
|
749
749
|
continue;
|
|
@@ -756,7 +756,7 @@ function Ar() {
|
|
|
756
756
|
continue;
|
|
757
757
|
}
|
|
758
758
|
if (p === "{" && f.nobrace !== !0) {
|
|
759
|
-
|
|
759
|
+
Je("braces");
|
|
760
760
|
const T = {
|
|
761
761
|
type: "brace",
|
|
762
762
|
value: p,
|
|
@@ -786,7 +786,7 @@ function Ar() {
|
|
|
786
786
|
for (const K of Q)
|
|
787
787
|
h.output += K.output || K.value;
|
|
788
788
|
}
|
|
789
|
-
O({ type: "brace", value: p, output: P }),
|
|
789
|
+
O({ type: "brace", value: p, output: P }), be("braces"), z.pop();
|
|
790
790
|
continue;
|
|
791
791
|
}
|
|
792
792
|
if (p === "|") {
|
|
@@ -823,7 +823,7 @@ function Ar() {
|
|
|
823
823
|
}
|
|
824
824
|
if (p === "?") {
|
|
825
825
|
if (!(d && d.value === "(") && f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
826
|
-
|
|
826
|
+
et("qmark", p);
|
|
827
827
|
continue;
|
|
828
828
|
}
|
|
829
829
|
if (d && d.type === "paren") {
|
|
@@ -841,7 +841,7 @@ function Ar() {
|
|
|
841
841
|
}
|
|
842
842
|
if (p === "!") {
|
|
843
843
|
if (f.noextglob !== !0 && D() === "(" && (D(2) !== "?" || !/[!=<:]/.test(D(3)))) {
|
|
844
|
-
|
|
844
|
+
et("negate", p);
|
|
845
845
|
continue;
|
|
846
846
|
}
|
|
847
847
|
if (f.nonegate !== !0 && h.index === 0) {
|
|
@@ -851,7 +851,7 @@ function Ar() {
|
|
|
851
851
|
}
|
|
852
852
|
if (p === "+") {
|
|
853
853
|
if (f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
854
|
-
|
|
854
|
+
et("plus", p);
|
|
855
855
|
continue;
|
|
856
856
|
}
|
|
857
857
|
if (d && d.value === "(" || f.regex === !1) {
|
|
@@ -883,9 +883,9 @@ function Ar() {
|
|
|
883
883
|
d.type = "star", d.star = !0, d.value += p, d.output = F, h.backtrack = !0, h.globstar = !0, fe(p);
|
|
884
884
|
continue;
|
|
885
885
|
}
|
|
886
|
-
let
|
|
887
|
-
if (f.noextglob !== !0 && /^\([^?]/.test(
|
|
888
|
-
|
|
886
|
+
let b = Se();
|
|
887
|
+
if (f.noextglob !== !0 && /^\([^?]/.test(b)) {
|
|
888
|
+
et("star", p);
|
|
889
889
|
continue;
|
|
890
890
|
}
|
|
891
891
|
if (d.type === "star") {
|
|
@@ -894,7 +894,7 @@ function Ar() {
|
|
|
894
894
|
continue;
|
|
895
895
|
}
|
|
896
896
|
const T = d.prev, P = T.prev, G = T.type === "slash" || T.type === "bos", Q = P && (P.type === "star" || P.type === "globstar");
|
|
897
|
-
if (f.bash === !0 && (!G ||
|
|
897
|
+
if (f.bash === !0 && (!G || b[0] && b[0] !== "/")) {
|
|
898
898
|
O({ type: "star", value: p, output: "" });
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
@@ -903,11 +903,11 @@ function Ar() {
|
|
|
903
903
|
O({ type: "star", value: p, output: "" });
|
|
904
904
|
continue;
|
|
905
905
|
}
|
|
906
|
-
for (;
|
|
906
|
+
for (; b.slice(0, 3) === "/**"; ) {
|
|
907
907
|
const Ae = y[h.index + 4];
|
|
908
908
|
if (Ae && Ae !== "/")
|
|
909
909
|
break;
|
|
910
|
-
|
|
910
|
+
b = b.slice(3), fe("/**", 3);
|
|
911
911
|
}
|
|
912
912
|
if (T.type === "bos" && ue()) {
|
|
913
913
|
d.type = "globstar", d.value += p, d.output = J(f), h.output = d.output, h.globstar = !0, fe(p);
|
|
@@ -917,12 +917,12 @@ function Ar() {
|
|
|
917
917
|
h.output = h.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = J(f) + (f.strictSlashes ? ")" : "|$)"), d.value += p, h.globstar = !0, h.output += T.output + d.output, fe(p);
|
|
918
918
|
continue;
|
|
919
919
|
}
|
|
920
|
-
if (T.type === "slash" && T.prev.type !== "bos" &&
|
|
921
|
-
const Ae =
|
|
920
|
+
if (T.type === "slash" && T.prev.type !== "bos" && b[0] === "/") {
|
|
921
|
+
const Ae = b[1] !== void 0 ? "|$" : "";
|
|
922
922
|
h.output = h.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = `${J(f)}${se}|${se}${Ae})`, d.value += p, h.output += T.output + d.output, h.globstar = !0, fe(p + V()), O({ type: "slash", value: "/", output: "" });
|
|
923
923
|
continue;
|
|
924
924
|
}
|
|
925
|
-
if (T.type === "bos" &&
|
|
925
|
+
if (T.type === "bos" && b[0] === "/") {
|
|
926
926
|
d.type = "globstar", d.value += p, d.output = `(?:^|${se}|${J(f)}${se})`, h.output = d.output, h.globstar = !0, fe(p + V()), O({ type: "slash", value: "/", output: "" });
|
|
927
927
|
continue;
|
|
928
928
|
}
|
|
@@ -938,31 +938,31 @@ function Ar() {
|
|
|
938
938
|
Y.output = p, O(Y);
|
|
939
939
|
continue;
|
|
940
940
|
}
|
|
941
|
-
(h.index === h.start || d.type === "slash" || d.type === "dot") && (d.type === "dot" ? (h.output +=
|
|
941
|
+
(h.index === h.start || d.type === "slash" || d.type === "dot") && (d.type === "dot" ? (h.output += _e, d.output += _e) : f.dot === !0 ? (h.output += he, d.output += he) : (h.output += le, d.output += le), D() !== "*" && (h.output += de, d.output += de)), O(Y);
|
|
942
942
|
}
|
|
943
943
|
for (; h.brackets > 0; ) {
|
|
944
944
|
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", "]"));
|
|
945
|
-
h.output = t.escapeLast(h.output, "["),
|
|
945
|
+
h.output = t.escapeLast(h.output, "["), be("brackets");
|
|
946
946
|
}
|
|
947
947
|
for (; h.parens > 0; ) {
|
|
948
948
|
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", ")"));
|
|
949
|
-
h.output = t.escapeLast(h.output, "("),
|
|
949
|
+
h.output = t.escapeLast(h.output, "("), be("parens");
|
|
950
950
|
}
|
|
951
951
|
for (; h.braces > 0; ) {
|
|
952
952
|
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", "}"));
|
|
953
|
-
h.output = t.escapeLast(h.output, "{"),
|
|
953
|
+
h.output = t.escapeLast(h.output, "{"), be("braces");
|
|
954
954
|
}
|
|
955
955
|
if (f.strictSlashes !== !0 && (d.type === "star" || d.type === "bracket") && O({ type: "maybe_slash", value: "", output: `${se}?` }), h.backtrack === !0) {
|
|
956
956
|
h.output = "";
|
|
957
|
-
for (const
|
|
958
|
-
h.output +=
|
|
957
|
+
for (const b of h.tokens)
|
|
958
|
+
h.output += b.output != null ? b.output : b.value, b.suffix && (h.output += b.suffix);
|
|
959
959
|
}
|
|
960
960
|
return h;
|
|
961
961
|
};
|
|
962
962
|
return k.fastpaths = (y, R) => {
|
|
963
|
-
const f = { ...R },
|
|
964
|
-
if (
|
|
965
|
-
throw new SyntaxError(`Input length: ${
|
|
963
|
+
const f = { ...R }, I = typeof f.maxLength == "number" ? Math.min(n, f.maxLength) : n, v = y.length;
|
|
964
|
+
if (v > I)
|
|
965
|
+
throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${I}`);
|
|
966
966
|
y = a[y] || y;
|
|
967
967
|
const {
|
|
968
968
|
DOT_LITERAL: A,
|
|
@@ -974,10 +974,10 @@ function Ar() {
|
|
|
974
974
|
NO_DOTS_SLASH: ce,
|
|
975
975
|
STAR: se,
|
|
976
976
|
START_ANCHOR: de
|
|
977
|
-
} = e.globChars(f.windows), j = f.dot ? q : L, ye = f.dot ? ce : L,
|
|
977
|
+
} = e.globChars(f.windows), j = f.dot ? q : L, ye = f.dot ? ce : L, _e = f.capture ? "" : "?:", he = { negated: !1, prefix: "" };
|
|
978
978
|
let U = f.bash === !0 ? ".*?" : se;
|
|
979
979
|
f.capture && (U = `(${U})`);
|
|
980
|
-
const ge = (le) => le.noglobstar === !0 ? U : `(${
|
|
980
|
+
const ge = (le) => le.noglobstar === !0 ? U : `(${_e}(?:(?!${de}${le.dot ? W : A}).)*?)`, we = (le) => {
|
|
981
981
|
switch (le) {
|
|
982
982
|
case "*":
|
|
983
983
|
return `${j}${x}${U}`;
|
|
@@ -998,18 +998,18 @@ function Ar() {
|
|
|
998
998
|
default: {
|
|
999
999
|
const $ = /^(.*?)\.(\w+)$/.exec(le);
|
|
1000
1000
|
if (!$) return;
|
|
1001
|
-
const F =
|
|
1001
|
+
const F = we($[1]);
|
|
1002
1002
|
return F ? F + A + $[2] : void 0;
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
}, ne = t.removePrefix(y, he);
|
|
1006
|
-
let J =
|
|
1006
|
+
let J = we(ne);
|
|
1007
1007
|
return J && f.strictSlashes !== !0 && (J += `${g}?`), J;
|
|
1008
|
-
},
|
|
1008
|
+
}, bt = k, bt;
|
|
1009
1009
|
}
|
|
1010
|
-
var
|
|
1010
|
+
var vt, hn;
|
|
1011
1011
|
function yr() {
|
|
1012
|
-
if (hn) return
|
|
1012
|
+
if (hn) return vt;
|
|
1013
1013
|
hn = 1;
|
|
1014
1014
|
const e = /* @__PURE__ */ mr(), t = /* @__PURE__ */ Ar(), n = /* @__PURE__ */ dt(), r = /* @__PURE__ */ pt(), i = (a) => a && typeof a == "object" && !Array.isArray(a), o = (a, s, l = !1) => {
|
|
1015
1015
|
if (Array.isArray(a)) {
|
|
@@ -1032,11 +1032,11 @@ function yr() {
|
|
|
1032
1032
|
const M = { ...s, ignore: null, onMatch: null, onResult: null };
|
|
1033
1033
|
E = o(c.ignore, M, l);
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1035
|
+
const w = (M, N = !1) => {
|
|
1036
1036
|
const { isMatch: k, match: y, output: R } = o.test(M, m, s, { glob: a, posix: S }), f = { glob: a, state: C, regex: m, posix: S, input: M, output: R, match: y, isMatch: k };
|
|
1037
1037
|
return typeof c.onResult == "function" && c.onResult(f), k === !1 ? (f.isMatch = !1, N ? f : !1) : E(M) ? (typeof c.onIgnore == "function" && c.onIgnore(f), f.isMatch = !1, N ? f : !1) : (typeof c.onMatch == "function" && c.onMatch(f), N ? f : !0);
|
|
1038
1038
|
};
|
|
1039
|
-
return l && (
|
|
1039
|
+
return l && (w.state = C), w;
|
|
1040
1040
|
};
|
|
1041
1041
|
return o.test = (a, s, l, { glob: u, posix: c } = {}) => {
|
|
1042
1042
|
if (typeof a != "string")
|
|
@@ -1067,7 +1067,7 @@ function yr() {
|
|
|
1067
1067
|
if (s && s.debug === !0) throw l;
|
|
1068
1068
|
return /$^/;
|
|
1069
1069
|
}
|
|
1070
|
-
}, o.constants = r,
|
|
1070
|
+
}, o.constants = r, vt = o, vt;
|
|
1071
1071
|
}
|
|
1072
1072
|
var Rt, gn;
|
|
1073
1073
|
function Sr() {
|
|
@@ -1080,11 +1080,11 @@ function Sr() {
|
|
|
1080
1080
|
return Object.assign(n, e), Rt = n, Rt;
|
|
1081
1081
|
}
|
|
1082
1082
|
var Er = /* @__PURE__ */ Sr();
|
|
1083
|
-
const Cr = /* @__PURE__ */ hr(Er), Tr = typeof window < "u" || typeof process > "u" || process?.platform === "browser",
|
|
1084
|
-
async function
|
|
1083
|
+
const Cr = /* @__PURE__ */ hr(Er), Tr = typeof window < "u" || typeof process > "u" || process?.platform === "browser", br = Tr ? {} : process.env || {};
|
|
1084
|
+
async function vr(e, t) {
|
|
1085
1085
|
const n = {};
|
|
1086
1086
|
for (const i of t.headers)
|
|
1087
|
-
Rr(e, i.matches) && (n[i.name] = i.envVariable !== void 0 ?
|
|
1087
|
+
Rr(e, i.matches) && (n[i.name] = i.envVariable !== void 0 ? br[i.envVariable] || "" : i.value);
|
|
1088
1088
|
const r = await (t.customFetch || fetch)(e, {
|
|
1089
1089
|
headers: n
|
|
1090
1090
|
});
|
|
@@ -1152,16 +1152,16 @@ function Aa(e, t = {}) {
|
|
|
1152
1152
|
function ot(e) {
|
|
1153
1153
|
return typeof e?.name == "string";
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function ve(e, t) {
|
|
1156
1156
|
return e === "" && (e = "#/"), e[e.length - 1] === "/" ? e + t : e + "/" + t;
|
|
1157
1157
|
}
|
|
1158
1158
|
function at(e) {
|
|
1159
1159
|
return Re(e) && typeof e.$ref == "string";
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function xr(e) {
|
|
1162
1162
|
return at(e) && Object.keys(e).length > 1;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function _r(e) {
|
|
1165
1165
|
return Re(e) && typeof e.externalValue == "string";
|
|
1166
1166
|
}
|
|
1167
1167
|
class zt {
|
|
@@ -1171,7 +1171,7 @@ class zt {
|
|
|
1171
1171
|
this.source = t, this.pointer = n;
|
|
1172
1172
|
}
|
|
1173
1173
|
child(t) {
|
|
1174
|
-
return new zt(this.source,
|
|
1174
|
+
return new zt(this.source, ve(this.pointer, (Array.isArray(t) ? t : [t]).map(Fe).join("/")));
|
|
1175
1175
|
}
|
|
1176
1176
|
key() {
|
|
1177
1177
|
return { ...this, reportOnKey: !0 };
|
|
@@ -1180,7 +1180,7 @@ class zt {
|
|
|
1180
1180
|
return this.source.absoluteRef + (this.pointer === "#/" ? "" : this.pointer);
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function wr(e) {
|
|
1184
1184
|
const t = e.indexOf("~") === -1 ? e : e.replaceAll("~1", "/").replaceAll("~0", "~");
|
|
1185
1185
|
try {
|
|
1186
1186
|
return decodeURIComponent(t);
|
|
@@ -1188,10 +1188,10 @@ function Ir(e) {
|
|
|
1188
1188
|
return t;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Fe(e) {
|
|
1192
1192
|
return typeof e == "number" || e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Ir(e) {
|
|
1195
1195
|
const [t, n = ""] = e.split("#/");
|
|
1196
1196
|
return {
|
|
1197
1197
|
uri: (t.endsWith("#") ? t.slice(0, -1) : t) || null,
|
|
@@ -1199,7 +1199,7 @@ function wr(e) {
|
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
1201
|
function Nr(e) {
|
|
1202
|
-
return e.split("/").map(
|
|
1202
|
+
return e.split("/").map(wr).filter(gr);
|
|
1203
1203
|
}
|
|
1204
1204
|
function ya(e) {
|
|
1205
1205
|
const t = e.split("/");
|
|
@@ -1209,22 +1209,22 @@ function Sa(e) {
|
|
|
1209
1209
|
const t = e.split(/[\/\\]/);
|
|
1210
1210
|
return t[t.length - 1].replace(/\.[^.]+$/, "");
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Ne(e) {
|
|
1213
1213
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("file://") || e.startsWith("data:");
|
|
1214
1214
|
}
|
|
1215
1215
|
function Ea(e) {
|
|
1216
|
-
return
|
|
1216
|
+
return Ve.extname(e) ? Ne(e) ? e.substring(0, e.lastIndexOf("/")) : Ve.dirname(e) : e;
|
|
1217
1217
|
}
|
|
1218
1218
|
function Ca(e, t) {
|
|
1219
|
-
return
|
|
1219
|
+
return Ne(e) ? new URL(t, e.endsWith("/") ? e : `${e}/`).href : Ve.resolve(e, t);
|
|
1220
1220
|
}
|
|
1221
1221
|
function Ta(e) {
|
|
1222
|
-
return typeof e == "string" && (e.startsWith("#") ||
|
|
1222
|
+
return typeof e == "string" && (e.startsWith("#") || Ne(e) || e.startsWith("./") || e.startsWith("../") || e.indexOf("/") > -1 || /\.(ya?ml|json)$/i.test(e));
|
|
1223
1223
|
}
|
|
1224
1224
|
function $r(e) {
|
|
1225
1225
|
return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e);
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function ba(e, t, n) {
|
|
1228
1228
|
if (!Re(t.node) && n.parent) {
|
|
1229
1229
|
n.parent[n.key] = t.node;
|
|
1230
1230
|
return;
|
|
@@ -1573,7 +1573,7 @@ function mn(e, t, n, r = 0, i = 0, o = 0, a = 0) {
|
|
|
1573
1573
|
const s = new Date(Date.UTC(e, t, n, r, i, o, a));
|
|
1574
1574
|
return s.setUTCFullYear(e, t, n), s;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function bi(e) {
|
|
1577
1577
|
let t = Ci.exec(e);
|
|
1578
1578
|
if (t === null && (t = Ti.exec(e)), t === null) return H;
|
|
1579
1579
|
const n = +t[1], r = +t[2] - 1, i = +t[3];
|
|
@@ -1599,10 +1599,10 @@ function vi(e) {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
return u;
|
|
1601
1601
|
}
|
|
1602
|
-
var
|
|
1602
|
+
var vi = ee("tag:yaml.org,2002:timestamp", {
|
|
1603
1603
|
implicit: !0,
|
|
1604
1604
|
implicitFirstChars: [..."0123456789"],
|
|
1605
|
-
resolve:
|
|
1605
|
+
resolve: bi,
|
|
1606
1606
|
identify: (e) => e instanceof Date,
|
|
1607
1607
|
represent: (e) => e.toISOString()
|
|
1608
1608
|
}), Ri = Zt("tag:yaml.org,2002:seq", {
|
|
@@ -1649,7 +1649,7 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1649
1649
|
const n = t, r = Object.keys(n);
|
|
1650
1650
|
return r.length !== 1 ? "cannot resolve a pairs item" : (e.push([r[0], n[r[0]]]), "");
|
|
1651
1651
|
}
|
|
1652
|
-
}),
|
|
1652
|
+
}), xi = ht("tag:yaml.org,2002:map", {
|
|
1653
1653
|
create: () => ({}),
|
|
1654
1654
|
identify: gt,
|
|
1655
1655
|
represent: (e) => {
|
|
@@ -1686,21 +1686,21 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1686
1686
|
keys: (e) => e.keys(),
|
|
1687
1687
|
get: () => null
|
|
1688
1688
|
});
|
|
1689
|
-
function
|
|
1689
|
+
function _i() {
|
|
1690
1690
|
return {
|
|
1691
1691
|
scalar: /* @__PURE__ */ Object.create(null),
|
|
1692
1692
|
sequence: /* @__PURE__ */ Object.create(null),
|
|
1693
1693
|
mapping: /* @__PURE__ */ Object.create(null)
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function wi() {
|
|
1697
1697
|
return {
|
|
1698
1698
|
scalar: [],
|
|
1699
1699
|
sequence: [],
|
|
1700
1700
|
mapping: []
|
|
1701
1701
|
};
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function Ii(e) {
|
|
1704
1704
|
const t = [];
|
|
1705
1705
|
for (const n of e) {
|
|
1706
1706
|
let r = t.length;
|
|
@@ -1726,7 +1726,7 @@ var mt = class qn {
|
|
|
1726
1726
|
exact;
|
|
1727
1727
|
prefix;
|
|
1728
1728
|
constructor(t) {
|
|
1729
|
-
const n =
|
|
1729
|
+
const n = Ii(t), r = [], i = _i(), o = wi();
|
|
1730
1730
|
for (const c of n) {
|
|
1731
1731
|
if (c.nodeKind === "scalar" && c.implicit) {
|
|
1732
1732
|
if (c.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
|
|
@@ -1760,7 +1760,7 @@ var mt = class qn {
|
|
|
1760
1760
|
}, Jt = new mt([
|
|
1761
1761
|
kr,
|
|
1762
1762
|
Ri,
|
|
1763
|
-
|
|
1763
|
+
xi
|
|
1764
1764
|
]);
|
|
1765
1765
|
new mt([
|
|
1766
1766
|
...Jt.tags,
|
|
@@ -1781,7 +1781,7 @@ var Gn = new mt([
|
|
|
1781
1781
|
Wr,
|
|
1782
1782
|
Lt,
|
|
1783
1783
|
Ot,
|
|
1784
|
-
|
|
1784
|
+
vi,
|
|
1785
1785
|
Mn,
|
|
1786
1786
|
Bn,
|
|
1787
1787
|
Dn,
|
|
@@ -1846,7 +1846,7 @@ var $i = {
|
|
|
1846
1846
|
linesBefore: 3,
|
|
1847
1847
|
linesAfter: 2
|
|
1848
1848
|
};
|
|
1849
|
-
function
|
|
1849
|
+
function xt(e, t, n, r, i) {
|
|
1850
1850
|
let o = "", a = "";
|
|
1851
1851
|
const s = Math.floor(i / 2) - 1;
|
|
1852
1852
|
return r - t > s && (o = " ... ", t = r - s + o.length), n - r > s && (a = " ...", n = r + s - a.length), {
|
|
@@ -1854,7 +1854,7 @@ function _t(e, t, n, r, i) {
|
|
|
1854
1854
|
pos: r - t + o.length
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function _t(e, t) {
|
|
1858
1858
|
return " ".repeat(Math.max(t - e.length, 0)) + e;
|
|
1859
1859
|
}
|
|
1860
1860
|
function ki(e, t) {
|
|
@@ -1870,17 +1870,17 @@ function ki(e, t) {
|
|
|
1870
1870
|
let l = "";
|
|
1871
1871
|
const u = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + u + 3);
|
|
1872
1872
|
for (let m = 1; m <= n.linesBefore && !(s - m < 0); m++) {
|
|
1873
|
-
const C =
|
|
1874
|
-
l = `${" ".repeat(n.indent)}${
|
|
1873
|
+
const C = xt(e.buffer, i[s - m], o[s - m], e.position - (i[s] - i[s - m]), c);
|
|
1874
|
+
l = `${" ".repeat(n.indent)}${_t((e.line - m + 1).toString(), u)} | ${C.str}
|
|
1875
1875
|
${l}`;
|
|
1876
1876
|
}
|
|
1877
|
-
const S =
|
|
1878
|
-
l += `${" ".repeat(n.indent)}${
|
|
1877
|
+
const S = xt(e.buffer, i[s], o[s], e.position, c);
|
|
1878
|
+
l += `${" ".repeat(n.indent)}${_t((e.line + 1).toString(), u)} | ${S.str}
|
|
1879
1879
|
`, l += `${"-".repeat(n.indent + u + 3 + S.pos)}^
|
|
1880
1880
|
`;
|
|
1881
1881
|
for (let m = 1; m <= n.linesAfter && !(s + m >= o.length); m++) {
|
|
1882
|
-
const C =
|
|
1883
|
-
l += `${" ".repeat(n.indent)}${
|
|
1882
|
+
const C = xt(e.buffer, i[s + m], o[s + m], e.position - (i[s] - i[s + m]), c);
|
|
1883
|
+
l += `${" ".repeat(n.indent)}${_t((e.line + m + 1).toString(), u)} | ${C.str}
|
|
1884
1884
|
`;
|
|
1885
1885
|
}
|
|
1886
1886
|
return l.replace(/\n$/, "");
|
|
@@ -2062,12 +2062,12 @@ function En(e, t, n, r, i, o) {
|
|
|
2062
2062
|
S++;
|
|
2063
2063
|
continue;
|
|
2064
2064
|
}
|
|
2065
|
-
const
|
|
2065
|
+
const w = C.slice(a), M = w.charCodeAt(0);
|
|
2066
2066
|
o ? M === 32 || M === 9 ? (m = !0, u += `
|
|
2067
2067
|
`.repeat(c ? 1 + S : S)) : m ? (m = !1, u += `
|
|
2068
2068
|
`.repeat(S + 1)) : S === 0 ? c && (u += " ") : u += `
|
|
2069
2069
|
`.repeat(S) : u += `
|
|
2070
|
-
`.repeat(c ? 1 + S : S), u +=
|
|
2070
|
+
`.repeat(c ? 1 + S : S), u += w, c = !0, S = 0;
|
|
2071
2071
|
}
|
|
2072
2072
|
return i === 3 ? u += `
|
|
2073
2073
|
`.repeat(c ? 1 + S : S) : i !== 2 && c && (u += `
|
|
@@ -2094,7 +2094,7 @@ var Ui = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
2094
2094
|
"!": "!",
|
|
2095
2095
|
"!!": "tag:yaml.org,2002:"
|
|
2096
2096
|
});
|
|
2097
|
-
function
|
|
2097
|
+
function wt(e) {
|
|
2098
2098
|
return encodeURI(e).replace(/!/g, "%21");
|
|
2099
2099
|
}
|
|
2100
2100
|
function jn(e, t) {
|
|
@@ -2104,7 +2104,7 @@ function jn(e, t) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
function Vn(e) {
|
|
2106
2106
|
let t = e;
|
|
2107
|
-
return t.charCodeAt(0) === 33 ? (t = t.slice(1), `!${
|
|
2107
|
+
return t.charCodeAt(0) === 33 ? (t = t.slice(1), `!${wt(t)}`) : t.slice(0, 18) === "tag:yaml.org,2002:" ? `!!${wt(t.slice(18))}` : `!<${wt(t)}>`;
|
|
2108
2108
|
}
|
|
2109
2109
|
var He = -1, tn = {
|
|
2110
2110
|
filename: "",
|
|
@@ -2209,7 +2209,7 @@ function Wi(e, t, n, r, i) {
|
|
|
2209
2209
|
const o = t.tag.addPair(t.value, n, r);
|
|
2210
2210
|
o && oe(e, o), t.overridable?.delete(n);
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function It(e, t, n) {
|
|
2213
2213
|
const r = e.frames[e.frames.length - 1];
|
|
2214
2214
|
if (r.kind === "document")
|
|
2215
2215
|
r.value = t, r.hasValue = !0;
|
|
@@ -2263,7 +2263,7 @@ function ji(e, t) {
|
|
|
2263
2263
|
break;
|
|
2264
2264
|
case 4: {
|
|
2265
2265
|
const { value: i, tag: o } = Gi(n, r);
|
|
2266
|
-
Nt(n, r, i, o, !0),
|
|
2266
|
+
Nt(n, r, i, o, !0), It(n, i, o);
|
|
2267
2267
|
break;
|
|
2268
2268
|
}
|
|
2269
2269
|
case 2: {
|
|
@@ -2297,7 +2297,7 @@ function ji(e, t) {
|
|
|
2297
2297
|
case 5: {
|
|
2298
2298
|
n.maxAliases !== -1 && ++n.aliasCount > n.maxAliases && oe(n, `aliases exceeded maxAliases (${n.maxAliases})`);
|
|
2299
2299
|
const i = n.source.slice(r.anchorStart, r.anchorEnd), o = n.anchors.get(i);
|
|
2300
|
-
o || oe(n, `unidentified alias "${i}"`), o.isValueFinal || oe(n, `recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),
|
|
2300
|
+
o || oe(n, `unidentified alias "${i}"`), o.isValueFinal || oe(n, `recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`), It(n, o.value, o.tag);
|
|
2301
2301
|
break;
|
|
2302
2302
|
}
|
|
2303
2303
|
case 6: {
|
|
@@ -2305,7 +2305,7 @@ function ji(e, t) {
|
|
|
2305
2305
|
if (i.kind === "mapping" && i.hasKey && (n.position = i.keyPosition, oe(n, "incomplete mapping pair in event stream")), i.kind === "document") n.documents.push(i.value);
|
|
2306
2306
|
else {
|
|
2307
2307
|
const o = i.tag.carrierIsResult ? i.value : Xn(n, i.position, i.tag, i.value);
|
|
2308
|
-
i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0),
|
|
2308
|
+
i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0), It(n, o, i.tag);
|
|
2309
2309
|
}
|
|
2310
2310
|
break;
|
|
2311
2311
|
}
|
|
@@ -2347,7 +2347,7 @@ function Mt(e, t, n, r, i, o, a) {
|
|
|
2347
2347
|
style: a
|
|
2348
2348
|
});
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function bn(e, t) {
|
|
2351
2351
|
e.events.splice(t.eventsLength, 0, {
|
|
2352
2352
|
type: 3,
|
|
2353
2353
|
start: t.position,
|
|
@@ -2386,7 +2386,7 @@ function Me(e) {
|
|
|
2386
2386
|
function re(e) {
|
|
2387
2387
|
qe(e, B, B, B, B, B, B, 1);
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function vn() {
|
|
2390
2390
|
return {
|
|
2391
2391
|
anchorStart: B,
|
|
2392
2392
|
anchorEnd: B,
|
|
@@ -2394,7 +2394,7 @@ function bn() {
|
|
|
2394
2394
|
tagEnd: B
|
|
2395
2395
|
};
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function We(e) {
|
|
2398
2398
|
return {
|
|
2399
2399
|
position: e.position,
|
|
2400
2400
|
line: e.line,
|
|
@@ -2413,16 +2413,16 @@ function _(e, t) {
|
|
|
2413
2413
|
function Z(e) {
|
|
2414
2414
|
return e === 10 || e === 13;
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function Le(e) {
|
|
2417
2417
|
return e === 9 || e === 32;
|
|
2418
2418
|
}
|
|
2419
2419
|
function pe(e) {
|
|
2420
|
-
return
|
|
2420
|
+
return Le(e) || Z(e);
|
|
2421
2421
|
}
|
|
2422
2422
|
function Ee(e) {
|
|
2423
2423
|
return e === 0 || pe(e);
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function Oe(e) {
|
|
2426
2426
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
2427
2427
|
}
|
|
2428
2428
|
function to(e) {
|
|
@@ -2445,7 +2445,7 @@ function ft(e) {
|
|
|
2445
2445
|
function ie(e, t) {
|
|
2446
2446
|
let n = 0, r = e.input.charCodeAt(e.position), i = e.position === e.lineStart || pe(e.input.charCodeAt(e.position - 1));
|
|
2447
2447
|
for (; r !== 0; ) {
|
|
2448
|
-
for (;
|
|
2448
|
+
for (; Le(r); )
|
|
2449
2449
|
i = !0, r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
2450
2450
|
if (t && i && r === 35) do
|
|
2451
2451
|
r = e.input.charCodeAt(++e.position);
|
|
@@ -2456,7 +2456,7 @@ function ie(e, t) {
|
|
|
2456
2456
|
}
|
|
2457
2457
|
return n;
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function $e(e, t = e.position) {
|
|
2460
2460
|
const n = e.input.charCodeAt(t);
|
|
2461
2461
|
if ((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2)) {
|
|
2462
2462
|
const r = e.input.charCodeAt(t + 3);
|
|
@@ -2482,7 +2482,7 @@ function oo(e, t, n) {
|
|
|
2482
2482
|
for (; s !== 0 && s !== 62; ) s = e.input.charCodeAt(++e.position);
|
|
2483
2483
|
s !== 62 && _(e, "unexpected end of the stream within a verbatim tag"), u = e.input.slice(l, e.position), e.position++;
|
|
2484
2484
|
} else {
|
|
2485
|
-
for (; s !== 0 && !pe(s) && !(n &&
|
|
2485
|
+
for (; s !== 0 && !pe(s) && !(n && Oe(s)); )
|
|
2486
2486
|
s === 33 && (o ? _(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(l - 1, e.position + 1), Jn.test(a) || _(e, "named tag handle cannot contain such characters"), o = !0, l = e.position + 1)), s = e.input.charCodeAt(++e.position);
|
|
2487
2487
|
u = e.input.slice(l, e.position), Xi.test(u) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
2488
2488
|
}
|
|
@@ -2492,14 +2492,14 @@ function ao(e, t) {
|
|
|
2492
2492
|
if (e.input.charCodeAt(e.position) !== 38) return !1;
|
|
2493
2493
|
t.anchorStart !== B && _(e, "duplication of an anchor property"), e.position++;
|
|
2494
2494
|
const n = e.position;
|
|
2495
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !
|
|
2495
|
+
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !Oe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2496
2496
|
return e.position === n && _(e, "name of an anchor node must contain at least one character"), t.anchorStart = n, t.anchorEnd = e.position, !0;
|
|
2497
2497
|
}
|
|
2498
2498
|
function so(e, t) {
|
|
2499
2499
|
if (e.input.charCodeAt(e.position) !== 42) return !1;
|
|
2500
2500
|
(t.anchorStart !== B || t.tagStart !== B) && _(e, "alias node should not have any properties"), e.position++;
|
|
2501
2501
|
const n = e.position;
|
|
2502
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !
|
|
2502
|
+
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !Oe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2503
2503
|
return e.position === n && _(e, "name of an alias node must contain at least one character"), eo(e, n, e.position), !0;
|
|
2504
2504
|
}
|
|
2505
2505
|
function Bt(e, t) {
|
|
@@ -2520,7 +2520,7 @@ function lo(e, t, n) {
|
|
|
2520
2520
|
const a = e.position;
|
|
2521
2521
|
return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2, 1, -1, i), !0;
|
|
2522
2522
|
}
|
|
2523
|
-
Z(o) ? (i = !1, Bt(e, t)) : e.position === e.lineStart &&
|
|
2523
|
+
Z(o) ? (i = !1, Bt(e, t)) : e.position === e.lineStart && $e(e) ? _(e, "unexpected end of the document within a single quoted scalar") : o !== 9 && o < 32 ? _(e, "expected valid JSON character") : e.position++;
|
|
2524
2524
|
}
|
|
2525
2525
|
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
2526
2526
|
}
|
|
@@ -2546,7 +2546,7 @@ function co(e, t, n) {
|
|
|
2546
2546
|
e.position++, no(e.input.charCodeAt(e.position)) < 0 && _(e, "expected hexadecimal character");
|
|
2547
2547
|
e.position++;
|
|
2548
2548
|
}
|
|
2549
|
-
} else Z(o) ? (i = !1, Bt(e, t)) : e.position === e.lineStart &&
|
|
2549
|
+
} else Z(o) ? (i = !1, Bt(e, t)) : e.position === e.lineStart && $e(e) ? _(e, "unexpected end of the document within a double quoted scalar") : o !== 9 && o < 32 ? _(e, "expected valid JSON character") : e.position++;
|
|
2550
2550
|
}
|
|
2551
2551
|
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
2552
2552
|
}
|
|
@@ -2564,7 +2564,7 @@ function uo(e, t, n) {
|
|
|
2564
2564
|
else break;
|
|
2565
2565
|
}
|
|
2566
2566
|
let l = !1;
|
|
2567
|
-
for (;
|
|
2567
|
+
for (; Le(e.input.charCodeAt(e.position)); )
|
|
2568
2568
|
l = !0, e.position++;
|
|
2569
2569
|
l && e.input.charCodeAt(e.position) === 35 && Rn(e), Z(e.input.charCodeAt(e.position)) ? ft(e) : e.input.charCodeAt(e.position) !== 0 && _(e, "a line break is expected");
|
|
2570
2570
|
let u = a ? o : -1, c = 0;
|
|
@@ -2574,19 +2574,19 @@ function uo(e, t, n) {
|
|
|
2574
2574
|
const C = e.position;
|
|
2575
2575
|
let E = 0;
|
|
2576
2576
|
for (; e.input.charCodeAt(C + E) === 32; ) E++;
|
|
2577
|
-
const
|
|
2578
|
-
if (
|
|
2577
|
+
const w = e.input.charCodeAt(C + E);
|
|
2578
|
+
if (w === 0) {
|
|
2579
2579
|
u >= 0 ? E > u && (m = C + E) : E > 0 && (m = C + E);
|
|
2580
2580
|
break;
|
|
2581
2581
|
}
|
|
2582
|
-
if (C === e.lineStart &&
|
|
2583
|
-
if (!a && u === -1 && Z(
|
|
2582
|
+
if (C === e.lineStart && $e(e, C)) break;
|
|
2583
|
+
if (!a && u === -1 && Z(w) && (c = Math.max(c, E)), !a && u === -1 && !Z(w) && (w === 9 && E < t && (e.position = C + E, _(e, "tab characters must not be used in indentation")), E < c && (e.position = C + E, _(e, "bad indentation of a mapping entry"))), u === -1 && w !== 0 && !Z(w) && E < t) {
|
|
2584
2584
|
e.lineIndent = E, e.position = C + E;
|
|
2585
2585
|
break;
|
|
2586
2586
|
}
|
|
2587
|
-
!a &&
|
|
2587
|
+
!a && w !== 0 && !Z(w) && u === -1 && (u = E);
|
|
2588
2588
|
const M = u === -1 ? t + 1 : u;
|
|
2589
|
-
if (
|
|
2589
|
+
if (w !== 0 && !Z(w) && E < M) {
|
|
2590
2590
|
e.lineIndent = E, e.position = C + E;
|
|
2591
2591
|
break;
|
|
2592
2592
|
}
|
|
@@ -2596,10 +2596,10 @@ function uo(e, t, n) {
|
|
|
2596
2596
|
}
|
|
2597
2597
|
function fo(e, t) {
|
|
2598
2598
|
const n = e.input.charCodeAt(e.position), r = t === Ue;
|
|
2599
|
-
if (n === 0 || pe(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r &&
|
|
2599
|
+
if (n === 0 || pe(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r && Oe(n)) return !1;
|
|
2600
2600
|
if (n === 63 || n === 45) {
|
|
2601
2601
|
const i = e.input.charCodeAt(e.position + 1);
|
|
2602
|
-
if (Ee(i) || r &&
|
|
2602
|
+
if (Ee(i) || r && Oe(i)) return !1;
|
|
2603
2603
|
}
|
|
2604
2604
|
return !0;
|
|
2605
2605
|
}
|
|
@@ -2609,14 +2609,14 @@ function po(e, t, n, r) {
|
|
|
2609
2609
|
let o = e.position, a = e.input.charCodeAt(e.position);
|
|
2610
2610
|
const s = n === Ue;
|
|
2611
2611
|
let l = !1;
|
|
2612
|
-
for (; a !== 0 && !(e.position === e.lineStart &&
|
|
2612
|
+
for (; a !== 0 && !(e.position === e.lineStart && $e(e)); ) {
|
|
2613
2613
|
if (a === 58) {
|
|
2614
2614
|
const u = e.input.charCodeAt(e.position + 1);
|
|
2615
|
-
if (Ee(u) || s &&
|
|
2615
|
+
if (Ee(u) || s && Oe(u)) break;
|
|
2616
2616
|
} else if (a === 35) {
|
|
2617
2617
|
if (pe(e.input.charCodeAt(e.position - 1))) break;
|
|
2618
2618
|
} else {
|
|
2619
|
-
if (s &&
|
|
2619
|
+
if (s && Oe(a)) break;
|
|
2620
2620
|
if (Z(a)) {
|
|
2621
2621
|
const u = e.position, c = e.line, S = e.lineStart, m = e.lineIndent;
|
|
2622
2622
|
if (ie(e, !1), e.lineIndent >= t) {
|
|
@@ -2627,7 +2627,7 @@ function po(e, t, n, r) {
|
|
|
2627
2627
|
break;
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
|
-
|
|
2630
|
+
Le(a) || (o = e.position + 1), a = e.input.charCodeAt(++e.position);
|
|
2631
2631
|
}
|
|
2632
2632
|
return o === i ? !1 : (nr(e, i, o), qe(e, i, o, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1, 1, -1, !l), !0);
|
|
2633
2633
|
}
|
|
@@ -2648,19 +2648,19 @@ function ho(e, t, n) {
|
|
|
2648
2648
|
a ? l === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries");
|
|
2649
2649
|
let u = !1, c = !1;
|
|
2650
2650
|
l === 63 && pe(e.input.charCodeAt(e.position + 1)) && (u = c = !0, e.position += 1, Ge(e, t));
|
|
2651
|
-
const S = e.line, m =
|
|
2652
|
-
Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line === S) && l === 58 ? (u = !0, e.position++, Ge(e, t), i ||
|
|
2651
|
+
const S = e.line, m = We(e), C = ke(e, t, Ue, !1, !0);
|
|
2652
|
+
Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line === S) && l === 58 ? (u = !0, e.position++, Ge(e, t), i || bn(e, m), C || re(e), ke(e, t, Ue, !1, !0) || re(e), Ge(e, t), i || Me(e)) : i && u ? (C || re(e), re(e)) : i ? re(e) : u && (bn(e, m), C || re(e), re(e), Me(e)), l = e.input.charCodeAt(e.position), l === 44 ? (a = !0, e.position++) : a = !1;
|
|
2653
2653
|
}
|
|
2654
2654
|
_(e, "unexpected end of the stream within a flow collection");
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function xn(e, t, n) {
|
|
2657
2657
|
if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !Ee(e.input.charCodeAt(e.position + 1))) return !1;
|
|
2658
2658
|
for (tr(e, e.position, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 1); e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)); ) {
|
|
2659
2659
|
e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation"));
|
|
2660
2660
|
const r = e.line;
|
|
2661
2661
|
e.position++;
|
|
2662
2662
|
const i = ie(e, !0) > 0;
|
|
2663
|
-
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry"), i && e.lineIndent <= t ? re(e) :
|
|
2663
|
+
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry"), i && e.lineIndent <= t ? re(e) : ke(e, t, Zn, !1, !0), ie(e, !0), e.lineIndent < t || e.position >= e.length) break;
|
|
2664
2664
|
e.lineIndent > t && _(e, "bad indentation of a sequence entry"), e.line === r && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry");
|
|
2665
2665
|
}
|
|
2666
2666
|
return Me(e), !0;
|
|
@@ -2676,13 +2676,13 @@ function $t(e, t, n, r) {
|
|
|
2676
2676
|
a || (Mt(e, e.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0), l === 63 ? (i && re(e), o = !0, i = !0) : (i || (re(e), o = !0), i = !1), e.position += 1, s = !0;
|
|
2677
2677
|
else {
|
|
2678
2678
|
i && (re(e), i = !1);
|
|
2679
|
-
const S =
|
|
2680
|
-
if (
|
|
2679
|
+
const S = We(e);
|
|
2680
|
+
if (!ke(e, n, Ft, !1, !0)) break;
|
|
2681
2681
|
if (e.line === c) {
|
|
2682
|
-
for (l = e.input.charCodeAt(e.position);
|
|
2682
|
+
for (l = e.input.charCodeAt(e.position); Le(l); ) l = e.input.charCodeAt(++e.position);
|
|
2683
2683
|
if (l === 58) {
|
|
2684
2684
|
if (l = e.input.charCodeAt(++e.position), Ee(l) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), !a) {
|
|
2685
|
-
for (Be(e, S), Mt(e, S.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0,
|
|
2685
|
+
for (Be(e, S), Mt(e, S.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0, ke(e, n, Ft, !1, !0), l = e.input.charCodeAt(e.position); Le(l); ) l = e.input.charCodeAt(++e.position);
|
|
2686
2686
|
e.position++;
|
|
2687
2687
|
}
|
|
2688
2688
|
o = !0, i = !1, s = !1;
|
|
@@ -2693,41 +2693,41 @@ function $t(e, t, n, r) {
|
|
|
2693
2693
|
else
|
|
2694
2694
|
return r.anchorStart !== B || r.tagStart !== B ? (Be(e, S), !1) : !0;
|
|
2695
2695
|
}
|
|
2696
|
-
if (
|
|
2696
|
+
if (ke(e, t, ut, !0, s) && (s = !1), i || s && (re(e), s = !1), ie(e, !0), l = e.input.charCodeAt(e.position), (e.line === c || e.lineIndent > t) && l !== 0) _(e, "bad indentation of a mapping entry");
|
|
2697
2697
|
else if (e.lineIndent < t) break;
|
|
2698
2698
|
}
|
|
2699
2699
|
return o ? (i && re(e), a && Me(e), !0) : !1;
|
|
2700
2700
|
}
|
|
2701
|
-
function
|
|
2701
|
+
function ke(e, t, n, r, i, o = !0) {
|
|
2702
2702
|
e.depth >= e.maxDepth && _(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++;
|
|
2703
2703
|
let a = 1, s = !1, l = !1, u = null;
|
|
2704
|
-
const c =
|
|
2704
|
+
const c = vn();
|
|
2705
2705
|
let S = n === ut || n === Zn, m = S;
|
|
2706
2706
|
const C = S;
|
|
2707
2707
|
if (r && ie(e, !0) && (s = !0, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1), a === 1) for (; ; ) {
|
|
2708
|
-
const E = e.input.charCodeAt(e.position),
|
|
2708
|
+
const E = e.input.charCodeAt(e.position), w = We(e);
|
|
2709
2709
|
if (s && a !== 1 && (E === 33 || E === 38)) break;
|
|
2710
2710
|
if (s && C && (c.tagStart !== B || c.anchorStart !== B) && (E === 33 || E === 38)) {
|
|
2711
|
-
const M =
|
|
2711
|
+
const M = We(e), N = t + 1;
|
|
2712
2712
|
if ($t(e, e.position - e.lineStart, N, c) && e.events[M.eventsLength]?.type === 3)
|
|
2713
2713
|
return e.depth--, !0;
|
|
2714
2714
|
Be(e, M);
|
|
2715
2715
|
}
|
|
2716
2716
|
if (s && (E === 33 && c.tagStart !== B || E === 38 && c.anchorStart !== B) || !oo(e, c, n === Ue) && !ao(e, c)) break;
|
|
2717
|
-
u === null && (u =
|
|
2717
|
+
u === null && (u = w), ie(e, !0) ? (s = !0, m = C, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1) : m = !1;
|
|
2718
2718
|
}
|
|
2719
2719
|
if (m && (m = s || i), a === 1 || n === ut) {
|
|
2720
|
-
const E = n === Ue || n === Ft ? t : t + 1,
|
|
2721
|
-
if (a === 1) if (m && (
|
|
2720
|
+
const E = n === Ue || n === Ft ? t : t + 1, w = e.position - e.lineStart;
|
|
2721
|
+
if (a === 1) if (m && (xn(e, w, c) || $t(e, w, E, c)) || ho(e, E, c)) l = !0;
|
|
2722
2722
|
else {
|
|
2723
2723
|
const M = e.input.charCodeAt(e.position);
|
|
2724
2724
|
if (u !== null && o && C && !m && M !== 124 && M !== 62) {
|
|
2725
|
-
const N =
|
|
2726
|
-
Be(e, u), $t(e, k, E,
|
|
2725
|
+
const N = We(e), k = u.position - u.lineStart;
|
|
2726
|
+
Be(e, u), $t(e, k, E, vn()) && e.events[N.eventsLength]?.type === 3 ? l = !0 : Be(e, N);
|
|
2727
2727
|
}
|
|
2728
2728
|
!l && (S && uo(e, E, c) || lo(e, E, c) || co(e, E, c) || so(e, c) || po(e, E, n, c)) && (l = !0);
|
|
2729
2729
|
}
|
|
2730
|
-
else a === 0 && (l = m &&
|
|
2730
|
+
else a === 0 && (l = m && xn(e, w, c));
|
|
2731
2731
|
}
|
|
2732
2732
|
return S = S && !l, !l && (c.anchorStart !== B || c.tagStart !== B || S) && (qe(e, B, B, c.anchorStart, c.anchorEnd, c.tagStart, c.tagEnd, 1), l = !0), e.depth--, l || c.anchorStart !== B || c.tagStart !== B;
|
|
2733
2733
|
}
|
|
@@ -2738,7 +2738,7 @@ function go(e) {
|
|
|
2738
2738
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2739
2739
|
const n = e.input.slice(t, e.position), r = [];
|
|
2740
2740
|
for (n.length === 0 && _(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !Z(e.input.charCodeAt(e.position)); ) {
|
|
2741
|
-
for (;
|
|
2741
|
+
for (; Le(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2742
2742
|
if (e.input.charCodeAt(e.position) === 35 || Z(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break;
|
|
2743
2743
|
const i = e.position;
|
|
2744
2744
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
@@ -2774,16 +2774,16 @@ function mo(e) {
|
|
|
2774
2774
|
e.position += 3, ie(e, !0), i = e.line > s;
|
|
2775
2775
|
} else t && _(e, "directives end mark is expected");
|
|
2776
2776
|
const o = e.events.length;
|
|
2777
|
-
if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 &&
|
|
2777
|
+
if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && $e(e)) {
|
|
2778
2778
|
e.position += 3, ie(e, !0);
|
|
2779
2779
|
return;
|
|
2780
2780
|
}
|
|
2781
|
-
if (Ji(e, n, !1),
|
|
2781
|
+
if (Ji(e, n, !1), ke(e, e.lineIndent - 1, ut, !1, i, i) || re(e), ie(e, !0), e.position === e.lineStart && $e(e) && (r = e.input.charCodeAt(e.position) === 46, r)) {
|
|
2782
2782
|
const s = e.line;
|
|
2783
2783
|
e.position += 3, ie(e, !0), e.line === s && e.position < e.length && _(e, "end of the stream or a document separator is expected");
|
|
2784
2784
|
}
|
|
2785
2785
|
const a = e.events[o];
|
|
2786
|
-
a?.type === 1 && (a.explicitEnd = r), Me(e), !r && e.position < e.length && !(e.position === e.lineStart &&
|
|
2786
|
+
a?.type === 1 && (a.explicitEnd = r), Me(e), !r && e.position < e.length && !(e.position === e.lineStart && $e(e)) && _(e, "end of the stream or a document separator is expected");
|
|
2787
2787
|
}
|
|
2788
2788
|
function Ao(e, t) {
|
|
2789
2789
|
const n = e.length, r = {
|
|
@@ -2828,14 +2828,14 @@ function Eo(e, t, n) {
|
|
|
2828
2828
|
if (r === null) return i;
|
|
2829
2829
|
for (const o of i) r(o);
|
|
2830
2830
|
}
|
|
2831
|
-
var
|
|
2831
|
+
var tt = class {
|
|
2832
2832
|
tagged = !1;
|
|
2833
2833
|
flow = !1;
|
|
2834
2834
|
singleQuoted = !1;
|
|
2835
2835
|
doubleQuoted = !1;
|
|
2836
2836
|
literal = !1;
|
|
2837
2837
|
folded = !1;
|
|
2838
|
-
},
|
|
2838
|
+
}, Ie = /* @__PURE__ */ Symbol("INVALID");
|
|
2839
2839
|
function Co(e) {
|
|
2840
2840
|
const t = new Set([
|
|
2841
2841
|
e.defaultScalarTag,
|
|
@@ -2871,25 +2871,25 @@ function To(e, t) {
|
|
|
2871
2871
|
}
|
|
2872
2872
|
return null;
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function Ye(e, t) {
|
|
2875
2875
|
if (!e.noRefs && t !== null && typeof t == "object") {
|
|
2876
2876
|
const c = e.refs.get(t);
|
|
2877
2877
|
if (c)
|
|
2878
2878
|
return c.anchor === void 0 && (c.anchor = `ref_${e.refCounter++}`), {
|
|
2879
2879
|
kind: "alias",
|
|
2880
2880
|
tag: "",
|
|
2881
|
-
style: new
|
|
2881
|
+
style: new tt(),
|
|
2882
2882
|
anchor: c.anchor
|
|
2883
2883
|
};
|
|
2884
2884
|
}
|
|
2885
2885
|
const n = To(e, t);
|
|
2886
2886
|
if (!n) {
|
|
2887
|
-
if (t === void 0 || e.skipInvalid) return
|
|
2887
|
+
if (t === void 0 || e.skipInvalid) return Ie;
|
|
2888
2888
|
throw new At(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`);
|
|
2889
2889
|
}
|
|
2890
2890
|
const { tag: r, tagName: i, implicitTag: o } = n, a = o ? i : Vn(i);
|
|
2891
2891
|
if (r.nodeKind === "scalar") {
|
|
2892
|
-
const c = new
|
|
2892
|
+
const c = new tt();
|
|
2893
2893
|
return c.tagged = !o, {
|
|
2894
2894
|
kind: "scalar",
|
|
2895
2895
|
tag: a,
|
|
@@ -2898,7 +2898,7 @@ function We(e, t) {
|
|
|
2898
2898
|
};
|
|
2899
2899
|
}
|
|
2900
2900
|
if (r.nodeKind === "sequence") {
|
|
2901
|
-
const c = r.represent(t), S = new
|
|
2901
|
+
const c = r.represent(t), S = new tt();
|
|
2902
2902
|
S.tagged = !o;
|
|
2903
2903
|
const m = {
|
|
2904
2904
|
kind: "sequence",
|
|
@@ -2908,12 +2908,12 @@ function We(e, t) {
|
|
|
2908
2908
|
};
|
|
2909
2909
|
e.noRefs || e.refs.set(t, m);
|
|
2910
2910
|
for (let C = 0, E = c.length; C < E; C += 1) {
|
|
2911
|
-
let
|
|
2912
|
-
|
|
2911
|
+
let w = Ye(e, c[C]);
|
|
2912
|
+
w === Ie && c[C] === void 0 && (w = Ye(e, null)), w !== Ie && m.items.push(w);
|
|
2913
2913
|
}
|
|
2914
2914
|
return m;
|
|
2915
2915
|
}
|
|
2916
|
-
const s = r.represent(t), l = new
|
|
2916
|
+
const s = r.represent(t), l = new tt();
|
|
2917
2917
|
l.tagged = !o;
|
|
2918
2918
|
const u = {
|
|
2919
2919
|
kind: "mapping",
|
|
@@ -2923,18 +2923,18 @@ function We(e, t) {
|
|
|
2923
2923
|
};
|
|
2924
2924
|
e.noRefs || e.refs.set(t, u);
|
|
2925
2925
|
for (const [c, S] of s) {
|
|
2926
|
-
const m =
|
|
2927
|
-
if (m ===
|
|
2928
|
-
const C =
|
|
2929
|
-
C !==
|
|
2926
|
+
const m = Ye(e, c);
|
|
2927
|
+
if (m === Ie) continue;
|
|
2928
|
+
const C = Ye(e, S);
|
|
2929
|
+
C !== Ie && u.items.push({
|
|
2930
2930
|
key: m,
|
|
2931
2931
|
value: C
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
2934
|
return u;
|
|
2935
2935
|
}
|
|
2936
|
-
function
|
|
2937
|
-
const r =
|
|
2936
|
+
function bo(e, t, n = {}) {
|
|
2937
|
+
const r = Ye({
|
|
2938
2938
|
representTypes: Co(t),
|
|
2939
2939
|
noRefs: n.noRefs ?? !1,
|
|
2940
2940
|
skipInvalid: n.skipInvalid ?? !1,
|
|
@@ -2942,14 +2942,14 @@ function vo(e, t, n = {}) {
|
|
|
2942
2942
|
refCounter: 0
|
|
2943
2943
|
}, e);
|
|
2944
2944
|
return [{
|
|
2945
|
-
contents: r ===
|
|
2945
|
+
contents: r === Ie ? null : r,
|
|
2946
2946
|
directives: []
|
|
2947
2947
|
}];
|
|
2948
2948
|
}
|
|
2949
|
-
var
|
|
2949
|
+
var vo = /* @__PURE__ */ Symbol("visit:break"), rr = /* @__PURE__ */ Symbol("visit:skip");
|
|
2950
2950
|
function lt(e, t, n) {
|
|
2951
2951
|
const r = t(e, n);
|
|
2952
|
-
if (r ===
|
|
2952
|
+
if (r === vo) return !0;
|
|
2953
2953
|
if (r === rr) return !1;
|
|
2954
2954
|
const i = n.depth + 1;
|
|
2955
2955
|
switch (e.kind) {
|
|
@@ -2982,7 +2982,7 @@ function Ro(e, t) {
|
|
|
2982
2982
|
isKey: !1
|
|
2983
2983
|
})) return;
|
|
2984
2984
|
}
|
|
2985
|
-
var rn = 65279,
|
|
2985
|
+
var rn = 65279, xo = 9, Pe = 10, ir = 13, _o = 32, wo = 33, or = 34, Dt = 35, Io = 37, No = 38, ar = 39, $o = 42, Ut = 44, on = 45, Xe = 58, ko = 61, Lo = 62, sr = 63, Oo = 64, Kt = 91, qt = 93, Po = 96, Gt = 123, Fo = 124, Yt = 125, te = {};
|
|
2986
2986
|
te[0] = "\\0";
|
|
2987
2987
|
te[7] = "\\a";
|
|
2988
2988
|
te[8] = "\\b";
|
|
@@ -3030,7 +3030,7 @@ function Bo(e) {
|
|
|
3030
3030
|
const t = e.toString(16).toUpperCase(), n = e <= 255 ? "x" : "u", r = e <= 255 ? 2 : 4;
|
|
3031
3031
|
return `\\${n}${"0".repeat(r - t.length)}${t}`;
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3033
|
+
function _n(e, t) {
|
|
3034
3034
|
const n = " ".repeat(t);
|
|
3035
3035
|
let r = 0, i = "";
|
|
3036
3036
|
const o = e.length;
|
|
@@ -3055,7 +3055,7 @@ function Do(e, t) {
|
|
|
3055
3055
|
lineWidth: e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n)
|
|
3056
3056
|
};
|
|
3057
3057
|
}
|
|
3058
|
-
function
|
|
3058
|
+
function wn(e, t) {
|
|
3059
3059
|
for (let n = 0, r = e.implicitResolvers.length; n < r; n += 1) {
|
|
3060
3060
|
const i = e.implicitResolvers[n];
|
|
3061
3061
|
if (i.resolve(t, !1, i.tagName) !== H) return i.tagName;
|
|
@@ -3063,39 +3063,39 @@ function In(e, t) {
|
|
|
3063
3063
|
return e.defaultScalarTagName;
|
|
3064
3064
|
}
|
|
3065
3065
|
function Ke(e) {
|
|
3066
|
-
return e ===
|
|
3066
|
+
return e === _o || e === xo;
|
|
3067
3067
|
}
|
|
3068
3068
|
function Uo(e) {
|
|
3069
3069
|
const t = e.charCodeAt(0);
|
|
3070
3070
|
if (t !== on && t !== 46 || e.charCodeAt(1) !== t || e.charCodeAt(2) !== t) return !1;
|
|
3071
3071
|
if (e.length === 3) return !0;
|
|
3072
3072
|
const n = e.charCodeAt(3);
|
|
3073
|
-
return Ke(n) || n === ir || n ===
|
|
3073
|
+
return Ke(n) || n === ir || n === Pe;
|
|
3074
3074
|
}
|
|
3075
|
-
function
|
|
3075
|
+
function ze(e) {
|
|
3076
3076
|
return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== rn || e >= 65536 && e <= 1114111;
|
|
3077
3077
|
}
|
|
3078
|
-
function
|
|
3079
|
-
return
|
|
3078
|
+
function In(e) {
|
|
3079
|
+
return ze(e) && e !== rn && e !== ir && e !== Pe;
|
|
3080
3080
|
}
|
|
3081
3081
|
function jt(e, t, n) {
|
|
3082
|
-
const r =
|
|
3083
|
-
return (n ? r : r && e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt) && e !== Dt && !(t ===
|
|
3082
|
+
const r = In(e), i = r && !Ke(e);
|
|
3083
|
+
return (n ? r : r && e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt) && e !== Dt && !(t === Xe && !i) || In(t) && !Ke(t) && e === Dt || t === Xe && i && (n || e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt);
|
|
3084
3084
|
}
|
|
3085
3085
|
function Ko(e) {
|
|
3086
|
-
return
|
|
3086
|
+
return ze(e) && e !== rn && !Ke(e) && e !== on && e !== sr && e !== Xe && e !== Ut && e !== Kt && e !== qt && e !== Gt && e !== Yt && e !== Dt && e !== No && e !== $o && e !== wo && e !== Fo && e !== ko && e !== Lo && e !== ar && e !== or && e !== Io && e !== Oo && e !== Po;
|
|
3087
3087
|
}
|
|
3088
3088
|
function qo(e, t) {
|
|
3089
3089
|
const n = De(e, 0);
|
|
3090
3090
|
if (Ko(n)) return !0;
|
|
3091
|
-
if (e.length > 1 && (n === on || n === sr || n ===
|
|
3091
|
+
if (e.length > 1 && (n === on || n === sr || n === Xe)) {
|
|
3092
3092
|
const r = De(e, 1);
|
|
3093
3093
|
return !Ke(r) && jt(r, n, t);
|
|
3094
3094
|
}
|
|
3095
3095
|
return !1;
|
|
3096
3096
|
}
|
|
3097
3097
|
function Go(e) {
|
|
3098
|
-
return !Ke(e) && e !==
|
|
3098
|
+
return !Ke(e) && e !== Xe;
|
|
3099
3099
|
}
|
|
3100
3100
|
function De(e, t) {
|
|
3101
3101
|
const n = e.charCodeAt(t);
|
|
@@ -3105,55 +3105,55 @@ function De(e, t) {
|
|
|
3105
3105
|
function lr(e) {
|
|
3106
3106
|
return /^\n* /.test(e);
|
|
3107
3107
|
}
|
|
3108
|
-
var
|
|
3108
|
+
var Qe = 1, je = 2, sn = 3, ln = 4, xe = 5;
|
|
3109
3109
|
function Yo(e, t, n, r, i, o) {
|
|
3110
3110
|
const { blockIndent: a, lineWidth: s } = n;
|
|
3111
3111
|
let l, u = 0, c = -1, S = !1, m = !1;
|
|
3112
3112
|
const C = s !== -1;
|
|
3113
|
-
let E = -1,
|
|
3113
|
+
let E = -1, w = !Uo(t) && qo(t, o) && Go(De(t, t.length - 1));
|
|
3114
3114
|
if (r || i) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3115
|
-
if (u = De(t, l), !
|
|
3116
|
-
|
|
3115
|
+
if (u = De(t, l), !ze(u)) return xe;
|
|
3116
|
+
w = w && jt(u, c, o), c = u;
|
|
3117
3117
|
}
|
|
3118
3118
|
else {
|
|
3119
3119
|
for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3120
|
-
if (u = De(t, l), u ===
|
|
3121
|
-
S = !0, C && (m = m || l - E - 1 > s && !
|
|
3122
|
-
else if (!
|
|
3123
|
-
|
|
3120
|
+
if (u = De(t, l), u === Pe)
|
|
3121
|
+
S = !0, C && (m = m || l - E - 1 > s && !Ze(t[E + 1]), E = l);
|
|
3122
|
+
else if (!ze(u)) return xe;
|
|
3123
|
+
w = w && jt(u, c, o), c = u;
|
|
3124
3124
|
}
|
|
3125
|
-
m = m || C && l - E - 1 > s && !
|
|
3125
|
+
m = m || C && l - E - 1 > s && !Ze(t[E + 1]);
|
|
3126
3126
|
}
|
|
3127
|
-
return !S && !m ?
|
|
3127
|
+
return !S && !m ? w && !i ? Qe : e.quoteStyle === "double" ? xe : je : a > 9 && lr(t) ? xe : m ? ln : sn;
|
|
3128
3128
|
}
|
|
3129
3129
|
function Wo(e, t, n) {
|
|
3130
3130
|
const { indent: r, blockIndent: i, lineWidth: o } = n;
|
|
3131
3131
|
switch (t) {
|
|
3132
|
-
case
|
|
3132
|
+
case Qe:
|
|
3133
3133
|
return $n(e, r);
|
|
3134
|
-
case
|
|
3134
|
+
case je:
|
|
3135
3135
|
return `'${$n(e, r).replace(/'/g, "''")}'`;
|
|
3136
3136
|
case sn:
|
|
3137
|
-
return "|" + Nn(e, i) + kn(
|
|
3137
|
+
return "|" + Nn(e, i) + kn(_n(e, r));
|
|
3138
3138
|
case ln:
|
|
3139
|
-
return ">" + Nn(e, i) + kn(
|
|
3140
|
-
case
|
|
3139
|
+
return ">" + Nn(e, i) + kn(_n(Vo(e, o), r));
|
|
3140
|
+
case xe:
|
|
3141
3141
|
return `"${Xo(e)}"`;
|
|
3142
3142
|
}
|
|
3143
3143
|
}
|
|
3144
3144
|
function jo(e, t, n, r, i) {
|
|
3145
3145
|
const o = r || !i;
|
|
3146
|
-
if (t.style.singleQuoted) return
|
|
3147
|
-
if (t.style.doubleQuoted) return
|
|
3146
|
+
if (t.style.singleQuoted) return je;
|
|
3147
|
+
if (t.style.doubleQuoted) return xe;
|
|
3148
3148
|
if (!o) {
|
|
3149
3149
|
if (t.style.literal) return sn;
|
|
3150
3150
|
if (t.style.folded) return ln;
|
|
3151
3151
|
}
|
|
3152
3152
|
const a = t.value;
|
|
3153
3153
|
if (a.length === 0)
|
|
3154
|
-
return t.style.tagged ||
|
|
3154
|
+
return t.style.tagged || wn(e, a) === t.tag ? Qe : e.quoteStyle === "double" ? xe : je;
|
|
3155
3155
|
const s = Yo(e, a, n, o, e.forceQuotes && !r, i);
|
|
3156
|
-
return s ===
|
|
3156
|
+
return s === Qe && !t.style.tagged && wn(e, a) !== t.tag ? e.quoteStyle === "double" ? xe : je : s;
|
|
3157
3157
|
}
|
|
3158
3158
|
function Nn(e, t) {
|
|
3159
3159
|
const n = lr(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
@@ -3183,7 +3183,7 @@ function kn(e) {
|
|
|
3183
3183
|
return e[e.length - 1] === `
|
|
3184
3184
|
` ? e.slice(0, -1) : e;
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function Ze(e) {
|
|
3187
3187
|
return e === " " || e === " ";
|
|
3188
3188
|
}
|
|
3189
3189
|
function Vo(e, t) {
|
|
@@ -3192,16 +3192,16 @@ function Vo(e, t) {
|
|
|
3192
3192
|
`);
|
|
3193
3193
|
r === -1 && (r = e.length), n.lastIndex = r;
|
|
3194
3194
|
let i = Ln(e.slice(0, r), t), o = e[0] === `
|
|
3195
|
-
` ||
|
|
3195
|
+
` || Ze(e[0]), a, s;
|
|
3196
3196
|
for (; s = n.exec(e); ) {
|
|
3197
3197
|
const l = s[1], u = s[2];
|
|
3198
|
-
a = u !== "" &&
|
|
3198
|
+
a = u !== "" && Ze(u[0]), i += l + (!o && !a && u !== "" ? `
|
|
3199
3199
|
` : "") + Ln(u, t), o = a;
|
|
3200
3200
|
}
|
|
3201
3201
|
return i;
|
|
3202
3202
|
}
|
|
3203
3203
|
function Ln(e, t) {
|
|
3204
|
-
if (e === "" ||
|
|
3204
|
+
if (e === "" || Ze(e[0])) return e;
|
|
3205
3205
|
const n = / [^ \t]/g;
|
|
3206
3206
|
let r, i = 0, o, a = 0, s = 0, l = "";
|
|
3207
3207
|
for (; r = n.exec(e); )
|
|
@@ -3220,7 +3220,7 @@ function Xo(e) {
|
|
|
3220
3220
|
t += i;
|
|
3221
3221
|
continue;
|
|
3222
3222
|
}
|
|
3223
|
-
if (
|
|
3223
|
+
if (ze(n)) {
|
|
3224
3224
|
t += e[r], n >= 65536 && (t += e[r + 1]);
|
|
3225
3225
|
continue;
|
|
3226
3226
|
}
|
|
@@ -3245,7 +3245,7 @@ function On(e, t, n, r) {
|
|
|
3245
3245
|
compact: e.seqInlineFirst,
|
|
3246
3246
|
isblockseq: !0
|
|
3247
3247
|
});
|
|
3248
|
-
(!r || i !== "") && (i += Wt(e, t)), s === "" ||
|
|
3248
|
+
(!r || i !== "") && (i += Wt(e, t)), s === "" || Pe === s.charCodeAt(0) ? i += "-" : i += "- ", i += s;
|
|
3249
3249
|
}
|
|
3250
3250
|
return i;
|
|
3251
3251
|
}
|
|
@@ -3263,19 +3263,19 @@ function Qo(e, t, n) {
|
|
|
3263
3263
|
const o = e.flowBracketPadding && r !== "" ? " " : "";
|
|
3264
3264
|
return `{${o}${r}${o}}`;
|
|
3265
3265
|
}
|
|
3266
|
-
function
|
|
3266
|
+
function nt(e) {
|
|
3267
3267
|
return e.kind === "scalar" ? e.value : e;
|
|
3268
3268
|
}
|
|
3269
3269
|
function cr(e, t) {
|
|
3270
3270
|
if (!e.sortKeys) return t;
|
|
3271
3271
|
const n = t.slice();
|
|
3272
3272
|
if (e.sortKeys === !0) n.sort((r, i) => {
|
|
3273
|
-
const o =
|
|
3273
|
+
const o = nt(r.key), a = nt(i.key);
|
|
3274
3274
|
return o < a ? -1 : o > a ? 1 : 0;
|
|
3275
3275
|
});
|
|
3276
3276
|
else {
|
|
3277
3277
|
const r = e.sortKeys;
|
|
3278
|
-
n.sort((i, o) => r(
|
|
3278
|
+
n.sort((i, o) => r(nt(i.key), nt(o.key)));
|
|
3279
3279
|
}
|
|
3280
3280
|
return n;
|
|
3281
3281
|
}
|
|
@@ -3295,13 +3295,13 @@ function Zo(e, t, n, r) {
|
|
|
3295
3295
|
iskey: !0
|
|
3296
3296
|
}), C = u.kind === "scalar" && u.value.indexOf(`
|
|
3297
3297
|
`) !== -1, E = S || C || m.length > 1024;
|
|
3298
|
-
E && (m &&
|
|
3299
|
-
const
|
|
3298
|
+
E && (m && Pe === m.charCodeAt(0) ? l += "?" : l += "? "), l += m, E && (l += Wt(e, t));
|
|
3299
|
+
const w = Ce(e, t + 1, c, {
|
|
3300
3300
|
block: !0,
|
|
3301
3301
|
compact: E,
|
|
3302
3302
|
isblockseq: E && !Vt(e, c, t + 1)
|
|
3303
3303
|
}), M = u.kind === "scalar" && u.value === "" && m !== "" && m.charCodeAt(m.length - 1) !== ar && m.charCodeAt(m.length - 1) !== or, N = !E && (u.kind === "alias" || M) ? " " : "";
|
|
3304
|
-
|
|
3304
|
+
w === "" || Pe === w.charCodeAt(0) ? l += `${N}:` : l += `${N}: `, l += w, i += l;
|
|
3305
3305
|
}
|
|
3306
3306
|
return i;
|
|
3307
3307
|
}
|
|
@@ -3320,13 +3320,13 @@ function Ce(e, t, n, r) {
|
|
|
3320
3320
|
else if (n.kind === "sequence") S ? e.seqNoIndent && !a && t > 0 ? u = On(e, t - 1, n, s) : u = On(e, t, n, s) : u = zo(e, t, n);
|
|
3321
3321
|
else {
|
|
3322
3322
|
const m = Do(e, t), C = jo(e, n, m, o, i);
|
|
3323
|
-
u = Wo(n.value, C, m), c = n.style.tagged || C !==
|
|
3323
|
+
u = Wo(n.value, C, m), c = n.style.tagged || C !== Qe && n.tag !== e.defaultScalarTagName;
|
|
3324
3324
|
}
|
|
3325
3325
|
if (S && s && t > 0 && e.indent > 2 && (u = `${" ".repeat(e.indent - 2)}${u}`), c || l) {
|
|
3326
3326
|
const m = [], C = c ? Ho(n) : null, E = l ? `&${n.anchor}` : null;
|
|
3327
3327
|
e.tagBeforeAnchor ? (C !== null && m.push(C), E !== null && m.push(E)) : (E !== null && m.push(E), C !== null && m.push(C));
|
|
3328
|
-
const
|
|
3329
|
-
u = `${m.join(" ")}${
|
|
3328
|
+
const w = u === "" || u.charCodeAt(0) === Pe ? "" : " ";
|
|
3329
|
+
u = `${m.join(" ")}${w}${u}`;
|
|
3330
3330
|
}
|
|
3331
3331
|
return u;
|
|
3332
3332
|
}
|
|
@@ -3408,7 +3408,7 @@ function oa(e, t = {}) {
|
|
|
3408
3408
|
const n = {
|
|
3409
3409
|
...ia,
|
|
3410
3410
|
...t
|
|
3411
|
-
}, r =
|
|
3411
|
+
}, r = bo(e, n.schema, {
|
|
3412
3412
|
noRefs: n.noRefs,
|
|
3413
3413
|
skipInvalid: n.skipInvalid
|
|
3414
3414
|
});
|
|
@@ -3427,7 +3427,7 @@ const aa = Gn.withTags(Mn, Bn, Dn, Un, Kn), ur = (e, t) => {
|
|
|
3427
3427
|
if (n.length > 1)
|
|
3428
3428
|
throw new At("expected a single document in the stream, but found more");
|
|
3429
3429
|
return n[0];
|
|
3430
|
-
},
|
|
3430
|
+
}, va = (e, t) => oa(e, t);
|
|
3431
3431
|
function sa(e, t) {
|
|
3432
3432
|
return e.hasOwnProperty(t) ? e[t] : void 0;
|
|
3433
3433
|
}
|
|
@@ -3497,7 +3497,7 @@ function Ra(e, t) {
|
|
|
3497
3497
|
throw new St(r, n);
|
|
3498
3498
|
}
|
|
3499
3499
|
}
|
|
3500
|
-
class
|
|
3500
|
+
class xa {
|
|
3501
3501
|
config;
|
|
3502
3502
|
cache = /* @__PURE__ */ new Map();
|
|
3503
3503
|
constructor(t = { http: { headers: [] } }) {
|
|
@@ -3507,12 +3507,12 @@ class _a {
|
|
|
3507
3507
|
return new Set(Array.from(this.cache.keys()));
|
|
3508
3508
|
}
|
|
3509
3509
|
resolveExternalRef(t, n) {
|
|
3510
|
-
return
|
|
3510
|
+
return Ne(n) ? n : t && Ne(t) ? new URL(n, t).href : Ve.resolve(t ? Ve.dirname(t) : process.cwd(), n);
|
|
3511
3511
|
}
|
|
3512
3512
|
async loadExternalRef(t) {
|
|
3513
3513
|
try {
|
|
3514
|
-
if (
|
|
3515
|
-
const { body: n, mimeType: r } = await
|
|
3514
|
+
if (Ne(t)) {
|
|
3515
|
+
const { body: n, mimeType: r } = await vr(t, this.config.http);
|
|
3516
3516
|
return new Xt(t, n, r);
|
|
3517
3517
|
} else {
|
|
3518
3518
|
if ((void 0)(t).isDirectory())
|
|
@@ -3528,15 +3528,16 @@ class _a {
|
|
|
3528
3528
|
parseDocument(t, n = !1) {
|
|
3529
3529
|
if (fr(t.absoluteRef))
|
|
3530
3530
|
return { source: t, parsed: t.body };
|
|
3531
|
-
|
|
3531
|
+
const r = Ne(t.absoluteRef) ? new URL(t.absoluteRef).pathname : t.absoluteRef;
|
|
3532
|
+
if (!ca(r) && !t.mimeType?.match(/(json|yaml|openapi)/) && !n)
|
|
3532
3533
|
return { source: t, parsed: t.body };
|
|
3533
3534
|
try {
|
|
3534
3535
|
return {
|
|
3535
3536
|
source: t,
|
|
3536
3537
|
parsed: ur(t.body, { filename: t.absoluteRef })
|
|
3537
3538
|
};
|
|
3538
|
-
} catch (
|
|
3539
|
-
throw new St(
|
|
3539
|
+
} catch (i) {
|
|
3540
|
+
throw new St(i, t);
|
|
3540
3541
|
}
|
|
3541
3542
|
}
|
|
3542
3543
|
async resolveDocument(t, n, r = !1) {
|
|
@@ -3561,8 +3562,8 @@ function pa(e, t) {
|
|
|
3561
3562
|
}
|
|
3562
3563
|
return !1;
|
|
3563
3564
|
}
|
|
3564
|
-
const
|
|
3565
|
-
async function
|
|
3565
|
+
const rt = { name: "unknown", properties: {} }, da = { name: "scalar", properties: {} };
|
|
3566
|
+
async function _a(e) {
|
|
3566
3567
|
const { rootDocument: t, externalRefResolver: n, rootType: r } = e, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [];
|
|
3567
3568
|
l(t.parsed, t, "#/", r);
|
|
3568
3569
|
let s;
|
|
@@ -3572,35 +3573,36 @@ async function xa(e) {
|
|
|
3572
3573
|
return i;
|
|
3573
3574
|
function l(u, c, S, m) {
|
|
3574
3575
|
const C = c.source.absoluteRef, E = /* @__PURE__ */ new Map();
|
|
3575
|
-
|
|
3576
|
-
function
|
|
3576
|
+
w(u, m, C + S);
|
|
3577
|
+
function w(N, k, y) {
|
|
3577
3578
|
if (!Re(N) && !Array.isArray(N))
|
|
3578
3579
|
return;
|
|
3579
3580
|
const R = `${k.name}::${y}`;
|
|
3580
3581
|
if (o.has(R))
|
|
3581
3582
|
return;
|
|
3582
3583
|
if (o.add(R), Array.isArray(N)) {
|
|
3583
|
-
const
|
|
3584
|
-
if (
|
|
3584
|
+
const v = k.items;
|
|
3585
|
+
if (v === void 0 && k !== rt && k !== it)
|
|
3585
3586
|
return;
|
|
3586
|
-
const A = typeof
|
|
3587
|
+
const A = typeof v == "function";
|
|
3587
3588
|
for (let g = 0; g < N.length; g++) {
|
|
3588
|
-
let x = A ?
|
|
3589
|
-
if (x === void 0 && k !==
|
|
3589
|
+
let x = A ? v(N[g], ve(y, g)) : v;
|
|
3590
|
+
if (x === void 0 && k !== rt && k !== it)
|
|
3590
3591
|
continue;
|
|
3591
3592
|
const W = x?.directResolveAs ? { $ref: N[g] } : N[g];
|
|
3592
|
-
x = x?.directResolveAs || x,
|
|
3593
|
+
x = x?.directResolveAs || x, w(W, ot(x) ? x : rt, ve(y, g));
|
|
3593
3594
|
}
|
|
3594
3595
|
return;
|
|
3595
3596
|
}
|
|
3596
|
-
const [f,
|
|
3597
|
-
|
|
3598
|
-
for (const
|
|
3599
|
-
let A = N[
|
|
3600
|
-
|
|
3597
|
+
const [f, I] = Object.entries(N).find(([v]) => v === "$anchor") || [];
|
|
3598
|
+
I && E.set(`#${I}`, N);
|
|
3599
|
+
for (const v of Object.keys(N)) {
|
|
3600
|
+
let A = N[v], g = sa(k.properties, v);
|
|
3601
|
+
const x = k.extensionsPrefix !== void 0 && v.startsWith(k.extensionsPrefix);
|
|
3602
|
+
g === void 0 && !x && (g = k.additionalProperties), typeof g == "function" && (g = g(A, v)), x && g === void 0 && (g = it), g === void 0 && (g = rt), !ot(g) && g?.directResolveAs && (g = g.directResolveAs, A = { $ref: A }), g && g.name === void 0 && g.resolvable !== !1 && (g = da), !(!ot(g) || !(Re(A) || Array.isArray(A))) && w(A, g, ve(y, Fe(v)));
|
|
3601
3603
|
}
|
|
3602
3604
|
if (at(N)) {
|
|
3603
|
-
const
|
|
3605
|
+
const v = M(c, N, {
|
|
3604
3606
|
prev: null,
|
|
3605
3607
|
node: N
|
|
3606
3608
|
}).then((A) => {
|
|
@@ -3610,16 +3612,16 @@ async function xa(e) {
|
|
|
3610
3612
|
l(g.node, g.document, g.location.pointer, k);
|
|
3611
3613
|
}
|
|
3612
3614
|
});
|
|
3613
|
-
a.push(
|
|
3615
|
+
a.push(v);
|
|
3614
3616
|
}
|
|
3615
|
-
if (
|
|
3616
|
-
const
|
|
3617
|
+
if (_r(N)) {
|
|
3618
|
+
const v = M(c, { $ref: N.externalValue }, {
|
|
3617
3619
|
prev: null,
|
|
3618
3620
|
node: N
|
|
3619
3621
|
}).then((A) => {
|
|
3620
3622
|
A.resolved && l(A.node, A.document, A.nodePointer, k);
|
|
3621
3623
|
});
|
|
3622
|
-
a.push(
|
|
3624
|
+
a.push(v);
|
|
3623
3625
|
}
|
|
3624
3626
|
}
|
|
3625
3627
|
async function M(N, k, y) {
|
|
@@ -3636,14 +3638,14 @@ async function xa(e) {
|
|
|
3636
3638
|
}, q = kt(N.source.absoluteRef, k.$ref);
|
|
3637
3639
|
return i.set(q, L), L;
|
|
3638
3640
|
}
|
|
3639
|
-
const { uri: R, pointer: f } =
|
|
3640
|
-
let
|
|
3641
|
+
const { uri: R, pointer: f } = Ir(k.$ref), I = R !== null && n.resolveExternalRef(N.source.absoluteRef, R) !== N.source.absoluteRef;
|
|
3642
|
+
let v;
|
|
3641
3643
|
try {
|
|
3642
|
-
|
|
3644
|
+
v = I ? await n.resolveDocument(N.source.absoluteRef, R) : N;
|
|
3643
3645
|
} catch (L) {
|
|
3644
3646
|
const q = {
|
|
3645
3647
|
resolved: !1,
|
|
3646
|
-
isRemote:
|
|
3648
|
+
isRemote: I,
|
|
3647
3649
|
document: void 0,
|
|
3648
3650
|
error: L
|
|
3649
3651
|
}, ce = kt(N.source.absoluteRef, k.$ref);
|
|
@@ -3651,22 +3653,22 @@ async function xa(e) {
|
|
|
3651
3653
|
}
|
|
3652
3654
|
let A = {
|
|
3653
3655
|
resolved: !0,
|
|
3654
|
-
document:
|
|
3655
|
-
isRemote:
|
|
3656
|
+
document: v,
|
|
3657
|
+
isRemote: I,
|
|
3656
3658
|
node: N.parsed,
|
|
3657
3659
|
nodePointer: "#/"
|
|
3658
|
-
}, g =
|
|
3660
|
+
}, g = v.parsed;
|
|
3659
3661
|
const x = f;
|
|
3660
3662
|
for (const L of x)
|
|
3661
3663
|
if (Re(g) && g[L] !== void 0)
|
|
3662
|
-
g = g[L], A.nodePointer =
|
|
3664
|
+
g = g[L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3663
3665
|
else if (Array.isArray(g) && g[+L] !== void 0)
|
|
3664
|
-
g = g[+L], A.nodePointer =
|
|
3666
|
+
g = g[+L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3665
3667
|
else if (at(g))
|
|
3666
|
-
if (A = await M(
|
|
3667
|
-
g = A.node[L], A.nodePointer =
|
|
3668
|
+
if (A = await M(v, g, Pn(y, g)), A.chain = void 0, v = A.document || v, Re(A.node))
|
|
3669
|
+
g = A.node[L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3668
3670
|
else if (Array.isArray(A.node))
|
|
3669
|
-
g = A.node[+L], A.nodePointer =
|
|
3671
|
+
g = A.node[+L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3670
3672
|
else {
|
|
3671
3673
|
g = void 0;
|
|
3672
3674
|
break;
|
|
@@ -3675,10 +3677,10 @@ async function xa(e) {
|
|
|
3675
3677
|
g = void 0;
|
|
3676
3678
|
break;
|
|
3677
3679
|
}
|
|
3678
|
-
A.node = g, A.document =
|
|
3680
|
+
A.node = g, A.document = v;
|
|
3679
3681
|
const W = kt(N.source.absoluteRef, k.$ref);
|
|
3680
3682
|
if (A.document && at(g)) {
|
|
3681
|
-
const L =
|
|
3683
|
+
const L = xr(g) ? {
|
|
3682
3684
|
node: g,
|
|
3683
3685
|
document: A.document,
|
|
3684
3686
|
location: new zt(A.document.source, A.nodePointer)
|
|
@@ -3690,40 +3692,40 @@ async function xa(e) {
|
|
|
3690
3692
|
}
|
|
3691
3693
|
}
|
|
3692
3694
|
export {
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
+
_r as A,
|
|
3696
|
+
xa as B,
|
|
3695
3697
|
ya as C,
|
|
3696
3698
|
Sa as D,
|
|
3697
3699
|
Nr as E,
|
|
3698
|
-
|
|
3700
|
+
br as F,
|
|
3699
3701
|
zt as L,
|
|
3700
3702
|
cn as R,
|
|
3701
3703
|
Xt as S,
|
|
3702
3704
|
St as Y,
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3705
|
+
Ne as a,
|
|
3706
|
+
Tr as b,
|
|
3707
|
+
fr as c,
|
|
3708
|
+
Ta as d,
|
|
3709
|
+
Fe as e,
|
|
3708
3710
|
ca as f,
|
|
3709
3711
|
Ea as g,
|
|
3710
3712
|
gr as h,
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
+
at as i,
|
|
3714
|
+
vr as j,
|
|
3713
3715
|
Ca as k,
|
|
3714
3716
|
ga as l,
|
|
3715
3717
|
Ra as m,
|
|
3716
3718
|
Aa as n,
|
|
3717
3719
|
ma as o,
|
|
3718
3720
|
ur as p,
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3721
|
+
Ir as q,
|
|
3722
|
+
_a as r,
|
|
3723
|
+
va as s,
|
|
3722
3724
|
sa as t,
|
|
3723
|
-
|
|
3725
|
+
wr as u,
|
|
3724
3726
|
it as v,
|
|
3725
3727
|
ot as w,
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
+
ba as x,
|
|
3729
|
+
xr as y,
|
|
3728
3730
|
kt as z
|
|
3729
3731
|
};
|