@sisense/sdk-ui 1.23.0 → 1.25.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/dist/ai.cjs +30 -29
- package/dist/ai.js +571 -558
- package/dist/analytics-composer.cjs +35 -35
- package/dist/analytics-composer.js +281 -261
- package/dist/{derive-chart-family-CTpRObm1.js → derive-chart-family-BlFbAr2V.js} +18111 -17793
- package/dist/{derive-chart-family-DcALKnKU.cjs → derive-chart-family-C_c2ZQQd.cjs} +108 -108
- package/dist/index.cjs +56 -75
- package/dist/index.js +5374 -5298
- package/dist/packages/sdk-ui/src/ai/chart/chart-insights.d.ts +2 -1
- package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +7 -2
- package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +4 -2
- package/dist/packages/sdk-ui/src/ai/icons/exclamation-mark-brand-icon.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/common/stringify-props.d.ts +5 -0
- package/dist/packages/sdk-ui/src/analytics-composer/common/utils.d.ts +2 -0
- package/dist/packages/sdk-ui/src/analytics-composer/execute-query/execute-query-composer.d.ts +8 -0
- package/dist/packages/sdk-ui/src/analytics-composer/execute-query/to-execute-query-code.d.ts +2 -0
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +13 -2
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/widget/widget-composer.d.ts +1 -0
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +25 -2
- package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +9 -4
- package/dist/packages/sdk-ui/src/chart/advanced-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/regular-chart.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-data-processor/data-table-date-period.d.ts +1 -4
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/sunburst/sunburst-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +2 -0
- package/dist/packages/sdk-ui/src/common-filters/cascading-utils.d.ts +3 -1
- package/dist/packages/sdk-ui/src/common-filters/common-filters-connector.d.ts +4 -3
- package/dist/packages/sdk-ui/src/common-filters/types.d.ts +25 -0
- package/dist/packages/sdk-ui/src/common-filters/use-common-filters.d.ts +8 -9
- package/dist/packages/sdk-ui/src/common-filters/use-convert-filter-relations.d.ts +26 -0
- package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/components/horizontal-collapse.d.ts +6 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +40 -10
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +8 -3
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-filters-panel-collapsed-state.d.ts +8 -0
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +24 -6
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +4 -4
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-error-boundary.d.ts +3 -1
- package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +4 -2
- package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/custom-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/helpers.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel-tile.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +3 -3
- package/dist/packages/sdk-ui/src/filters/components/icons/trash-icon.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-list.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/unsupported-filter-tile.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/helpers.d.ts +122 -0
- package/dist/packages/sdk-ui/src/filters/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/index.d.ts +3 -1
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/get-dashboard-model.d.ts +2 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +3 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +2 -4
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +26 -18
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts +3 -0
- package/dist/packages/sdk-ui/src/models/hierarchy/get-hierarchy-models.d.ts +6 -1
- package/dist/packages/sdk-ui/src/models/hierarchy/types.d.ts +3 -0
- package/dist/packages/sdk-ui/src/models/hierarchy/use-get-hierarchy-models.d.ts +4 -4
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +11 -1
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +3 -1
- package/dist/packages/sdk-ui/src/props.d.ts +11 -3
- package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +1 -0
- package/dist/packages/sdk-ui/src/query-execution/utils.d.ts +3 -0
- package/dist/packages/sdk-ui/src/sisense-context/sisense-context.d.ts +2 -0
- package/dist/packages/sdk-ui/src/table/table-component.d.ts +1 -1
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +10 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +20 -0
- package/dist/packages/sdk-ui/src/utils/extract-widget-ids.d.ts +2 -0
- package/dist/packages/sdk-ui/src/utils/filter-relations.d.ts +64 -0
- package/dist/packages/sdk-ui/src/utils/filters-comparator.d.ts +5 -0
- package/dist/packages/sdk-ui/src/utils/filters.d.ts +0 -1
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +178 -178
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-filters.d.ts +17 -17
- package/dist/packages/sdk-ui/src/widget-by-id/use-get-dashboard-model-and-widget-model.d.ts +13 -0
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +13 -4
- package/dist/packages/sdk-ui/src/widgets/common/widget-container.d.ts +2 -0
- package/dist/packages/sdk-ui/src/widgets/common/widget-errors-and-warnings-context.d.ts +14 -0
- package/dist/packages/sdk-ui/src/widgets/common/widget-header-info-button.d.ts +3 -1
- package/dist/packages/sdk-ui/src/widgets/common/widget-header.d.ts +2 -0
- package/dist/useQuery-BYxzPyc5.cjs +870 -0
- package/dist/{useQuery-1xZMqnAI.js → useQuery-P9b5LtGq.js} +18768 -17547
- package/dist/widget-composer-DPsDPrFM.cjs +237 -0
- package/dist/widget-composer-DXM5t9rq.js +614 -0
- package/package.json +8 -8
- package/dist/packages/sdk-ui/src/dashboard/components/HorizontalCollapse.d.ts +0 -5
- package/dist/useQuery-D9rZ58KS.cjs +0 -821
- package/dist/widget-composer-B17DVa2A.cjs +0 -101
- package/dist/widget-composer-DqjH_6dw.js +0 -448
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Qs = Object.defineProperty, Ys = Object.defineProperties;
|
|
2
2
|
var Gs = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var _e = Object.getOwnPropertySymbols;
|
|
4
4
|
var Pt = Object.prototype.hasOwnProperty, qt = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var it = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s);
|
|
6
|
-
var rt = (s, e, t) => e in s ?
|
|
6
|
+
var rt = (s, e, t) => e in s ? Qs(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, R = (s, e) => {
|
|
7
7
|
for (var t in e || (e = {}))
|
|
8
8
|
Pt.call(e, t) && rt(s, t, e[t]);
|
|
9
9
|
if (_e)
|
|
10
10
|
for (var t of _e(e))
|
|
11
11
|
qt.call(e, t) && rt(s, t, e[t]);
|
|
12
12
|
return s;
|
|
13
|
-
}, G = (s, e) =>
|
|
13
|
+
}, G = (s, e) => Ys(s, Gs(e));
|
|
14
14
|
var Dt = (s, e) => {
|
|
15
15
|
var t = {};
|
|
16
16
|
for (var n in s)
|
|
@@ -60,10 +60,10 @@ var d = (s) => {
|
|
|
60
60
|
throw r;
|
|
61
61
|
}, "return" in e && n("return"), i;
|
|
62
62
|
};
|
|
63
|
-
import { s as Hs, E as Kt, c as
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
const kt = Symbol.for("yaml.alias"), mt = Symbol.for("yaml.document"), W = Symbol.for("yaml.map"), Zt = Symbol.for("yaml.pair"),
|
|
63
|
+
import { s as Hs, E as Kt, c as zs, p as Xs, v as xs, a as Zs, b as en, d as tn, g as sn } from "./widget-composer-DXM5t9rq.js";
|
|
64
|
+
import { e as $i, f as Ci, i as _i, w as Mi } from "./widget-composer-DXM5t9rq.js";
|
|
65
|
+
import { a7 as nn, aR as Ft, cg as rn, cW as on } from "./derive-chart-family-BlFbAr2V.js";
|
|
66
|
+
const kt = Symbol.for("yaml.alias"), mt = Symbol.for("yaml.document"), W = Symbol.for("yaml.map"), Zt = Symbol.for("yaml.pair"), Y = Symbol.for("yaml.scalar"), me = Symbol.for("yaml.seq"), F = Symbol.for("yaml.node.type"), ne = (s) => !!s && typeof s == "object" && s[F] === kt, ye = (s) => !!s && typeof s == "object" && s[F] === mt, ge = (s) => !!s && typeof s == "object" && s[F] === W, E = (s) => !!s && typeof s == "object" && s[F] === Zt, A = (s) => !!s && typeof s == "object" && s[F] === Y, be = (s) => !!s && typeof s == "object" && s[F] === me;
|
|
67
67
|
function $(s) {
|
|
68
68
|
if (s && typeof s == "object")
|
|
69
69
|
switch (s[F]) {
|
|
@@ -78,13 +78,13 @@ function M(s) {
|
|
|
78
78
|
switch (s[F]) {
|
|
79
79
|
case kt:
|
|
80
80
|
case W:
|
|
81
|
-
case
|
|
81
|
+
case Y:
|
|
82
82
|
case me:
|
|
83
83
|
return !0;
|
|
84
84
|
}
|
|
85
85
|
return !1;
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const ln = (s) => (A(s) || $(s)) && !!s.anchor, q = Symbol("break visit"), es = Symbol("skip children"), J = Symbol("remove node");
|
|
88
88
|
function H(s, e) {
|
|
89
89
|
const t = ts(e);
|
|
90
90
|
ye(s) ? le(null, s.contents, t, Object.freeze([s])) === J && (s.contents = null) : le(null, s, t, Object.freeze([]));
|
|
@@ -190,7 +190,7 @@ function ss(s, e, t, n) {
|
|
|
190
190
|
return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
|
|
191
191
|
if (E(e))
|
|
192
192
|
return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
|
|
193
|
-
if (
|
|
193
|
+
if (A(e))
|
|
194
194
|
return (l = t.Scalar) == null ? void 0 : l.call(t, s, e, n);
|
|
195
195
|
if (ne(e))
|
|
196
196
|
return (a = t.Alias) == null ? void 0 : a.call(t, s, e, n);
|
|
@@ -208,14 +208,14 @@ function ns(s, e, t) {
|
|
|
208
208
|
throw new Error(`Cannot replace node with ${i} parent`);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const an = {
|
|
212
212
|
"!": "%21",
|
|
213
213
|
",": "%2C",
|
|
214
214
|
"[": "%5B",
|
|
215
215
|
"]": "%5D",
|
|
216
216
|
"{": "%7B",
|
|
217
217
|
"}": "%7D"
|
|
218
|
-
},
|
|
218
|
+
}, cn = (s) => s.replace(/[!,[\]{}]/g, (e) => an[e]);
|
|
219
219
|
class P {
|
|
220
220
|
constructor(e, t) {
|
|
221
221
|
this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, P.defaultYaml, e), this.tags = Object.assign({}, P.defaultTags, t);
|
|
@@ -305,7 +305,7 @@ class P {
|
|
|
305
305
|
tagString(e) {
|
|
306
306
|
for (const [t, n] of Object.entries(this.tags))
|
|
307
307
|
if (e.startsWith(n))
|
|
308
|
-
return t +
|
|
308
|
+
return t + cn(e.substring(n.length));
|
|
309
309
|
return e[0] === "!" ? e : `!<${e}>`;
|
|
310
310
|
}
|
|
311
311
|
toString(e) {
|
|
@@ -348,7 +348,7 @@ function os(s, e) {
|
|
|
348
348
|
return n;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function fn(s, e) {
|
|
352
352
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
353
353
|
let i = null;
|
|
354
354
|
return {
|
|
@@ -365,7 +365,7 @@ function on(s, e) {
|
|
|
365
365
|
setAnchors: () => {
|
|
366
366
|
for (const r of t) {
|
|
367
367
|
const o = n.get(r);
|
|
368
|
-
if (typeof o == "object" && o.anchor && (
|
|
368
|
+
if (typeof o == "object" && o.anchor && (A(o.node) || $(o.node)))
|
|
369
369
|
o.node.anchor = o.anchor;
|
|
370
370
|
else {
|
|
371
371
|
const l = new Error("Failed to resolve repeated object (this should not happen)");
|
|
@@ -404,7 +404,7 @@ function K(s, e, t) {
|
|
|
404
404
|
if (Array.isArray(s))
|
|
405
405
|
return s.map((n, i) => K(n, String(i), t));
|
|
406
406
|
if (s && typeof s.toJSON == "function") {
|
|
407
|
-
if (!t || !
|
|
407
|
+
if (!t || !ln(s))
|
|
408
408
|
return s.toJSON(e, t);
|
|
409
409
|
const n = { aliasCount: 0, count: 1, res: void 0 };
|
|
410
410
|
t.anchors.set(s, n), t.onCreate = (r) => {
|
|
@@ -442,7 +442,7 @@ class Nt {
|
|
|
442
442
|
return typeof r == "function" ? ce(r, { "": l }, "", l) : l;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
class
|
|
445
|
+
class Qe extends Nt {
|
|
446
446
|
constructor(e) {
|
|
447
447
|
super(kt), this.source = e, Object.defineProperty(this, "tag", {
|
|
448
448
|
set() {
|
|
@@ -516,7 +516,7 @@ function Pe(s, e, t) {
|
|
|
516
516
|
const ls = (s) => !s || typeof s != "function" && typeof s != "object";
|
|
517
517
|
class N extends Nt {
|
|
518
518
|
constructor(e) {
|
|
519
|
-
super(
|
|
519
|
+
super(Y), this.value = e;
|
|
520
520
|
}
|
|
521
521
|
toJSON(e, t) {
|
|
522
522
|
return t != null && t.keep ? this.value : K(this.value, e, t);
|
|
@@ -530,8 +530,8 @@ N.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
|
530
530
|
N.PLAIN = "PLAIN";
|
|
531
531
|
N.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
532
532
|
N.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
533
|
-
const
|
|
534
|
-
function
|
|
533
|
+
const un = "tag:yaml.org,2002:";
|
|
534
|
+
function hn(s, e, t) {
|
|
535
535
|
var n;
|
|
536
536
|
if (e) {
|
|
537
537
|
const i = t.filter((o) => o.tag === e), r = (n = i.find((o) => !o.format)) != null ? n : i[0];
|
|
@@ -544,7 +544,7 @@ function an(s, e, t) {
|
|
|
544
544
|
return ((r = i.identify) == null ? void 0 : r.call(i, s)) && !i.format;
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function Ie(s, e, t) {
|
|
548
548
|
var f, p, m;
|
|
549
549
|
if (ye(s) && (s = s.contents), M(s))
|
|
550
550
|
return s;
|
|
@@ -557,11 +557,11 @@ function Ae(s, e, t) {
|
|
|
557
557
|
let a;
|
|
558
558
|
if (n && s && typeof s == "object") {
|
|
559
559
|
if (a = l.get(s), a)
|
|
560
|
-
return a.anchor || (a.anchor = i(s)), new
|
|
560
|
+
return a.anchor || (a.anchor = i(s)), new Qe(a.anchor);
|
|
561
561
|
a = { anchor: null, node: null }, l.set(s, a);
|
|
562
562
|
}
|
|
563
|
-
e != null && e.startsWith("!!") && (e =
|
|
564
|
-
let c =
|
|
563
|
+
e != null && e.startsWith("!!") && (e = un + e.slice(2));
|
|
564
|
+
let c = hn(s, e, o.tags);
|
|
565
565
|
if (!c) {
|
|
566
566
|
if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
|
|
567
567
|
const y = new N(s);
|
|
@@ -583,7 +583,7 @@ function Fe(s, e, t) {
|
|
|
583
583
|
} else
|
|
584
584
|
n = /* @__PURE__ */ new Map([[r, n]]);
|
|
585
585
|
}
|
|
586
|
-
return
|
|
586
|
+
return Ie(n, void 0, {
|
|
587
587
|
aliasDuplicateObjects: !1,
|
|
588
588
|
keepUndefined: !1,
|
|
589
589
|
onAnchor: () => {
|
|
@@ -650,14 +650,14 @@ class as extends Nt {
|
|
|
650
650
|
*/
|
|
651
651
|
getIn(e, t) {
|
|
652
652
|
const [n, ...i] = e, r = this.get(n, !0);
|
|
653
|
-
return i.length === 0 ? !t &&
|
|
653
|
+
return i.length === 0 ? !t && A(r) ? r.value : r : $(r) ? r.getIn(i, t) : void 0;
|
|
654
654
|
}
|
|
655
655
|
hasAllNullValues(e) {
|
|
656
656
|
return this.items.every((t) => {
|
|
657
657
|
if (!E(t))
|
|
658
658
|
return !1;
|
|
659
659
|
const n = t.value;
|
|
660
|
-
return n == null || e &&
|
|
660
|
+
return n == null || e && A(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
/**
|
|
@@ -689,15 +689,15 @@ class as extends Nt {
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
function
|
|
692
|
+
const dn = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
|
|
693
|
+
function Q(s, e) {
|
|
694
694
|
return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
|
|
695
695
|
}
|
|
696
696
|
const Z = (s, e, t) => s.endsWith(`
|
|
697
|
-
`) ?
|
|
697
|
+
`) ? Q(t, e) : t.includes(`
|
|
698
698
|
`) ? `
|
|
699
|
-
` +
|
|
700
|
-
function
|
|
699
|
+
` + Q(t, e) : (s.endsWith(" ") ? "" : " ") + t, cs = "flow", yt = "block", qe = "quoted";
|
|
700
|
+
function Ye(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
|
|
701
701
|
if (!i || i < 0)
|
|
702
702
|
return s;
|
|
703
703
|
i < r && (r = 0);
|
|
@@ -709,8 +709,8 @@ function Qe(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
|
|
|
709
709
|
typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
|
|
710
710
|
let p, m, y = !1, u = -1, g = -1, b = -1;
|
|
711
711
|
t === yt && (u = Rt(s, u, e.length), u !== -1 && (f = u + a));
|
|
712
|
-
for (let
|
|
713
|
-
if (t === qe &&
|
|
712
|
+
for (let I; I = s[u += 1]; ) {
|
|
713
|
+
if (t === qe && I === "\\") {
|
|
714
714
|
switch (g = u, s[u + 1]) {
|
|
715
715
|
case "x":
|
|
716
716
|
u += 3;
|
|
@@ -726,11 +726,11 @@ function Qe(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
|
|
|
726
726
|
}
|
|
727
727
|
b = u;
|
|
728
728
|
}
|
|
729
|
-
if (
|
|
729
|
+
if (I === `
|
|
730
730
|
`)
|
|
731
731
|
t === yt && (u = Rt(s, u, e.length)), f = u + e.length + a, p = void 0;
|
|
732
732
|
else {
|
|
733
|
-
if (
|
|
733
|
+
if (I === " " && m && m !== " " && m !== `
|
|
734
734
|
` && m !== " ") {
|
|
735
735
|
const k = s[u + 1];
|
|
736
736
|
k && k !== " " && k !== `
|
|
@@ -741,7 +741,7 @@ function Qe(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
|
|
|
741
741
|
c.push(p), f = p + a, p = void 0;
|
|
742
742
|
else if (t === qe) {
|
|
743
743
|
for (; m === " " || m === " "; )
|
|
744
|
-
m =
|
|
744
|
+
m = I, I = s[u += 1], y = !0;
|
|
745
745
|
const k = u > b + 1 ? u - 2 : g - 1;
|
|
746
746
|
if (h[k])
|
|
747
747
|
return s;
|
|
@@ -749,14 +749,14 @@ function Qe(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
|
|
|
749
749
|
} else
|
|
750
750
|
y = !0;
|
|
751
751
|
}
|
|
752
|
-
m =
|
|
752
|
+
m = I;
|
|
753
753
|
}
|
|
754
754
|
if (y && l && l(), c.length === 0)
|
|
755
755
|
return s;
|
|
756
756
|
o && o();
|
|
757
757
|
let S = s.slice(0, c[0]);
|
|
758
|
-
for (let
|
|
759
|
-
const k = c[
|
|
758
|
+
for (let I = 0; I < c.length; ++I) {
|
|
759
|
+
const k = c[I], O = c[I + 1] || s.length;
|
|
760
760
|
k === 0 ? S = `
|
|
761
761
|
${e}${s.slice(0, O)}` : (t === qe && h[k] && (S += `${s[k]}\\`), S += `
|
|
762
762
|
${e}${s.slice(k + 1, O)}`);
|
|
@@ -782,7 +782,7 @@ const Ge = (s, e) => ({
|
|
|
782
782
|
lineWidth: s.options.lineWidth,
|
|
783
783
|
minContentWidth: s.options.minContentWidth
|
|
784
784
|
}), We = (s) => /^(%|---|\.\.\.)/m.test(s);
|
|
785
|
-
function
|
|
785
|
+
function pn(s, e, t) {
|
|
786
786
|
if (!e || e < 0)
|
|
787
787
|
return !1;
|
|
788
788
|
const n = e - t, i = s.length;
|
|
@@ -857,7 +857,7 @@ function Te(s, e) {
|
|
|
857
857
|
default:
|
|
858
858
|
a += 1;
|
|
859
859
|
}
|
|
860
|
-
return o = l ? o + t.slice(l) : t, n ? o :
|
|
860
|
+
return o = l ? o + t.slice(l) : t, n ? o : Ye(o, r, qe, Ge(e, !1));
|
|
861
861
|
}
|
|
862
862
|
function gt(s, e) {
|
|
863
863
|
if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
|
|
@@ -865,7 +865,7 @@ function gt(s, e) {
|
|
|
865
865
|
return Te(s, e);
|
|
866
866
|
const t = e.indent || (We(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
867
867
|
${t}`) + "'";
|
|
868
|
-
return e.implicitKey ? n :
|
|
868
|
+
return e.implicitKey ? n : Ye(n, t, cs, Ge(e, !1));
|
|
869
869
|
}
|
|
870
870
|
function fe(s, e) {
|
|
871
871
|
const { singleQuote: t } = e.options;
|
|
@@ -891,7 +891,7 @@ function De({ comment: s, type: e, value: t }, n, i, r) {
|
|
|
891
891
|
const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
|
|
892
892
|
if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
|
|
893
893
|
return fe(t, n);
|
|
894
|
-
const c = n.indent || (n.forceBlockIndent || We(t) ? " " : ""), h = o === "literal" ? !0 : o === "folded" || e === N.BLOCK_FOLDED ? !1 : e === N.BLOCK_LITERAL ? !0 : !
|
|
894
|
+
const c = n.indent || (n.forceBlockIndent || We(t) ? " " : ""), h = o === "literal" ? !0 : o === "folded" || e === N.BLOCK_FOLDED ? !1 : e === N.BLOCK_LITERAL ? !0 : !pn(t, a, c.length);
|
|
895
895
|
if (!t)
|
|
896
896
|
return h ? `|
|
|
897
897
|
` : `>
|
|
@@ -927,11 +927,11 @@ function De({ comment: s, type: e, value: t }, n, i, r) {
|
|
|
927
927
|
${c}${S}${t}${m}`;
|
|
928
928
|
t = t.replace(/\n+/g, `
|
|
929
929
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
|
|
930
|
-
const O =
|
|
930
|
+
const O = Ye(`${S}${t}${m}`, c, yt, Ge(n, !0));
|
|
931
931
|
return `${k}
|
|
932
932
|
${c}${O}`;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function mn(s, e, t, n) {
|
|
935
935
|
const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: h } = e;
|
|
936
936
|
if (l && r.includes(`
|
|
937
937
|
`) || h && /[[\]{},]/.test(r))
|
|
@@ -958,7 +958,7 @@ ${a}`);
|
|
|
958
958
|
if (y.some(p) || m != null && m.some(p))
|
|
959
959
|
return fe(r, e);
|
|
960
960
|
}
|
|
961
|
-
return l ? f :
|
|
961
|
+
return l ? f : Ye(f, a, cs, Ge(e, !1));
|
|
962
962
|
}
|
|
963
963
|
function Le(s, e, t, n) {
|
|
964
964
|
const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
|
|
@@ -974,7 +974,7 @@ function Le(s, e, t, n) {
|
|
|
974
974
|
case N.QUOTE_SINGLE:
|
|
975
975
|
return gt(o.value, e);
|
|
976
976
|
case N.PLAIN:
|
|
977
|
-
return
|
|
977
|
+
return mn(o, e, t, n);
|
|
978
978
|
default:
|
|
979
979
|
return null;
|
|
980
980
|
}
|
|
@@ -990,7 +990,7 @@ function Le(s, e, t, n) {
|
|
|
990
990
|
function fs(s, e) {
|
|
991
991
|
const t = Object.assign({
|
|
992
992
|
blockQuote: !0,
|
|
993
|
-
commentString:
|
|
993
|
+
commentString: dn,
|
|
994
994
|
defaultKeyType: null,
|
|
995
995
|
defaultStringType: "PLAIN",
|
|
996
996
|
directives: null,
|
|
@@ -1028,7 +1028,7 @@ function fs(s, e) {
|
|
|
1028
1028
|
options: t
|
|
1029
1029
|
};
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function yn(s, e) {
|
|
1032
1032
|
var i, r, o, l;
|
|
1033
1033
|
if (e.tag) {
|
|
1034
1034
|
const a = s.filter((c) => c.tag === e.tag);
|
|
@@ -1036,7 +1036,7 @@ function hn(s, e) {
|
|
|
1036
1036
|
return (i = a.find((c) => c.format === e.format)) != null ? i : a[0];
|
|
1037
1037
|
}
|
|
1038
1038
|
let t, n;
|
|
1039
|
-
if (
|
|
1039
|
+
if (A(e)) {
|
|
1040
1040
|
n = e.value;
|
|
1041
1041
|
const a = s.filter((c) => {
|
|
1042
1042
|
var h;
|
|
@@ -1051,10 +1051,10 @@ function hn(s, e) {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
return t;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function gn(s, e, { anchors: t, doc: n }) {
|
|
1055
1055
|
if (!n.directives)
|
|
1056
1056
|
return "";
|
|
1057
|
-
const i = [], r = (
|
|
1057
|
+
const i = [], r = (A(s) || $(s)) && s.anchor;
|
|
1058
1058
|
r && is(r) && (t.add(r), i.push(`&${r}`));
|
|
1059
1059
|
const o = s.tag ? s.tag : e.default ? null : e.tag;
|
|
1060
1060
|
return o && i.push(n.directives.tagString(o)), i.join(" ");
|
|
@@ -1072,14 +1072,14 @@ function de(s, e, t, n) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
let i;
|
|
1074
1074
|
const r = M(s) ? s : e.doc.createNode(s, { onTagObj: (h) => i = h });
|
|
1075
|
-
i || (i =
|
|
1076
|
-
const o =
|
|
1075
|
+
i || (i = yn(e.doc.schema.tags, r));
|
|
1076
|
+
const o = gn(r, i, e);
|
|
1077
1077
|
o.length > 0 && (e.indentAtStart = ((c = e.indentAtStart) != null ? c : 0) + o.length + 1);
|
|
1078
|
-
const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) :
|
|
1079
|
-
return o ?
|
|
1078
|
+
const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : A(r) ? Le(r, e, t, n) : r.toString(e, t, n);
|
|
1079
|
+
return o ? A(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
|
|
1080
1080
|
${e.indent}${l}` : l;
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function bn({ key: s, value: e }, t, n, i) {
|
|
1083
1083
|
var C, w;
|
|
1084
1084
|
const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: h, simpleKeys: f } } = t;
|
|
1085
1085
|
let p = M(s) && s.comment || null;
|
|
@@ -1091,7 +1091,7 @@ function pn({ key: s, value: e }, t, n, i) {
|
|
|
1091
1091
|
throw new Error(L);
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
let m = !f && (!s || p && e == null && !t.inFlow || $(s) || (
|
|
1094
|
+
let m = !f && (!s || p && e == null && !t.inFlow || $(s) || (A(s) ? s.type === N.BLOCK_FOLDED || s.type === N.BLOCK_LITERAL : typeof s == "object"));
|
|
1095
1095
|
t = Object.assign({}, t, {
|
|
1096
1096
|
allNullValues: !1,
|
|
1097
1097
|
implicitKey: !m && (f || !r),
|
|
@@ -1110,8 +1110,8 @@ function pn({ key: s, value: e }, t, n, i) {
|
|
|
1110
1110
|
return g = `? ${g}`, p && !y ? g += Z(g, t.indent, c(p)) : u && i && i(), g;
|
|
1111
1111
|
y && (p = null), m ? (p && (g += Z(g, t.indent, c(p))), g = `? ${g}
|
|
1112
1112
|
${l}:`) : (g = `${g}:`, p && (g += Z(g, t.indent, c(p))));
|
|
1113
|
-
let b, S,
|
|
1114
|
-
M(e) ? (b = !!e.spaceBefore, S = e.commentBefore,
|
|
1113
|
+
let b, S, I;
|
|
1114
|
+
M(e) ? (b = !!e.spaceBefore, S = e.commentBefore, I = e.comment) : (b = !1, S = null, I = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !m && !p && A(e) && (t.indentAtStart = g.length + 1), u = !1, !h && a.length >= 2 && !t.inFlow && !m && be(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
|
|
1115
1115
|
let k = !1;
|
|
1116
1116
|
const O = de(e, t, () => k = !0, () => u = !0);
|
|
1117
1117
|
let T = " ";
|
|
@@ -1120,7 +1120,7 @@ ${l}:`) : (g = `${g}:`, p && (g += Z(g, t.indent, c(p))));
|
|
|
1120
1120
|
` : "", S) {
|
|
1121
1121
|
const L = c(S);
|
|
1122
1122
|
T += `
|
|
1123
|
-
${
|
|
1123
|
+
${Q(L, t.indent)}`;
|
|
1124
1124
|
}
|
|
1125
1125
|
O === "" && !t.inFlow ? T === `
|
|
1126
1126
|
` && (T = `
|
|
@@ -1129,8 +1129,8 @@ ${Y(L, t.indent)}`;
|
|
|
1129
1129
|
${t.indent}`;
|
|
1130
1130
|
} else if (!m && $(e)) {
|
|
1131
1131
|
const L = O[0], _ = O.indexOf(`
|
|
1132
|
-
`), B = _ !== -1,
|
|
1133
|
-
if (B || !
|
|
1132
|
+
`), B = _ !== -1, X = (w = (C = t.inFlow) != null ? C : e.flow) != null ? w : e.items.length === 0;
|
|
1133
|
+
if (B || !X) {
|
|
1134
1134
|
let ie = !1;
|
|
1135
1135
|
if (B && (L === "&" || L === "!")) {
|
|
1136
1136
|
let v = O.indexOf(" ");
|
|
@@ -1142,14 +1142,14 @@ ${t.indent}`);
|
|
|
1142
1142
|
} else
|
|
1143
1143
|
(O === "" || O[0] === `
|
|
1144
1144
|
`) && (T = "");
|
|
1145
|
-
return g += T + O, t.inFlow ? k && n && n() :
|
|
1145
|
+
return g += T + O, t.inFlow ? k && n && n() : I && !k ? g += Z(g, t.indent, c(I)) : u && i && i(), g;
|
|
1146
1146
|
}
|
|
1147
1147
|
function us(s, e) {
|
|
1148
1148
|
(s === "debug" || s === "warn") && (typeof process != "undefined" && process.emitWarning ? process.emitWarning(e) : console.warn(e));
|
|
1149
1149
|
}
|
|
1150
1150
|
const Ut = "<<";
|
|
1151
1151
|
function hs(s, e, { key: t, value: n }) {
|
|
1152
|
-
if (s != null && s.doc.schema.merge &&
|
|
1152
|
+
if (s != null && s.doc.schema.merge && wn(t))
|
|
1153
1153
|
if (n = ne(n) ? n.resolve(s.doc) : n, be(n))
|
|
1154
1154
|
for (const i of n.items)
|
|
1155
1155
|
at(s, e, i);
|
|
@@ -1165,7 +1165,7 @@ function hs(s, e, { key: t, value: n }) {
|
|
|
1165
1165
|
else if (e instanceof Set)
|
|
1166
1166
|
e.add(i);
|
|
1167
1167
|
else {
|
|
1168
|
-
const r =
|
|
1168
|
+
const r = Sn(t, i, s), o = K(n, r, s);
|
|
1169
1169
|
r in e ? Object.defineProperty(e, r, {
|
|
1170
1170
|
value: o,
|
|
1171
1171
|
writable: !0,
|
|
@@ -1176,7 +1176,7 @@ function hs(s, e, { key: t, value: n }) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
return e;
|
|
1178
1178
|
}
|
|
1179
|
-
const
|
|
1179
|
+
const wn = (s) => s === Ut || A(s) && s.value === Ut && (!s.type || s.type === N.PLAIN);
|
|
1180
1180
|
function at(s, e, t) {
|
|
1181
1181
|
const n = s && ne(t) ? t.resolve(s.doc) : t;
|
|
1182
1182
|
if (!ge(n))
|
|
@@ -1191,7 +1191,7 @@ function at(s, e, t) {
|
|
|
1191
1191
|
});
|
|
1192
1192
|
return e;
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Sn(s, e, t) {
|
|
1195
1195
|
if (e === null)
|
|
1196
1196
|
return "";
|
|
1197
1197
|
if (typeof e != "object")
|
|
@@ -1212,7 +1212,7 @@ function yn(s, e, t) {
|
|
|
1212
1212
|
return JSON.stringify(e);
|
|
1213
1213
|
}
|
|
1214
1214
|
function Ot(s, e, t) {
|
|
1215
|
-
const n =
|
|
1215
|
+
const n = Ie(s, void 0, t), i = Ie(e, void 0, t);
|
|
1216
1216
|
return new j(n, i);
|
|
1217
1217
|
}
|
|
1218
1218
|
class j {
|
|
@@ -1228,14 +1228,14 @@ class j {
|
|
|
1228
1228
|
return hs(t, n, this);
|
|
1229
1229
|
}
|
|
1230
1230
|
toString(e, t, n) {
|
|
1231
|
-
return e != null && e.doc ?
|
|
1231
|
+
return e != null && e.doc ? bn(this, e, t, n) : JSON.stringify(this);
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
1234
|
function ds(s, e, t) {
|
|
1235
1235
|
var r;
|
|
1236
|
-
return (((r = e.inFlow) != null ? r : s.flow) ?
|
|
1236
|
+
return (((r = e.inFlow) != null ? r : s.flow) ? Nn : kn)(s, e, t);
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function kn({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
|
|
1239
1239
|
const { indent: a, options: { commentString: c } } = t, h = Object.assign({}, t, { indent: r, type: null });
|
|
1240
1240
|
let f = !1;
|
|
1241
1241
|
const p = [];
|
|
@@ -1265,9 +1265,9 @@ ${a}${u}` : `
|
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
1267
|
return s ? (m += `
|
|
1268
|
-
` +
|
|
1268
|
+
` + Q(c(s), a), l && l()) : f && o && o(), m;
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function Nn({ items: s }, e, { flowChars: t, itemIndent: n }) {
|
|
1271
1271
|
const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
|
|
1272
1272
|
n += r;
|
|
1273
1273
|
const a = Object.assign({}, e, {
|
|
@@ -1285,8 +1285,8 @@ function bn({ items: s }, e, { flowChars: t, itemIndent: n }) {
|
|
|
1285
1285
|
else if (E(u)) {
|
|
1286
1286
|
const S = M(u.key) ? u.key : null;
|
|
1287
1287
|
S && (S.spaceBefore && f.push(""), Re(e, f, S.commentBefore, !1), S.comment && (c = !0));
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1288
|
+
const I = M(u.value) ? u.value : null;
|
|
1289
|
+
I ? (I.comment && (g = I.comment), I.commentBefore && (c = !0)) : u.value == null && (S != null && S.comment) && (g = S.comment);
|
|
1290
1290
|
}
|
|
1291
1291
|
g && (c = !0);
|
|
1292
1292
|
let b = de(u, a, () => g = null);
|
|
@@ -1313,14 +1313,14 @@ ${i}${m}`;
|
|
|
1313
1313
|
}
|
|
1314
1314
|
function Re({ indent: s, options: { commentString: e } }, t, n, i) {
|
|
1315
1315
|
if (n && i && (n = n.replace(/^\n+/, "")), n) {
|
|
1316
|
-
const r =
|
|
1316
|
+
const r = Q(e(n), s);
|
|
1317
1317
|
t.push(r.trimStart());
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
function ee(s, e) {
|
|
1321
|
-
const t =
|
|
1321
|
+
const t = A(e) ? e.value : e;
|
|
1322
1322
|
for (const n of s)
|
|
1323
|
-
if (E(n) && (n.key === e || n.key === t ||
|
|
1323
|
+
if (E(n) && (n.key === e || n.key === t || A(n.key) && n.key.value === t))
|
|
1324
1324
|
return n;
|
|
1325
1325
|
}
|
|
1326
1326
|
class D extends as {
|
|
@@ -1364,7 +1364,7 @@ class D extends as {
|
|
|
1364
1364
|
if (i) {
|
|
1365
1365
|
if (!t)
|
|
1366
1366
|
throw new Error(`Key ${n.key} already set`);
|
|
1367
|
-
|
|
1367
|
+
A(i.value) && ls(n.value) ? i.value.value = n.value : i.value = n.value;
|
|
1368
1368
|
} else if (r) {
|
|
1369
1369
|
const l = this.items.findIndex((a) => r(n, a) < 0);
|
|
1370
1370
|
l === -1 ? this.items.push(n) : this.items.splice(l, 0, n);
|
|
@@ -1378,7 +1378,7 @@ class D extends as {
|
|
|
1378
1378
|
get(e, t) {
|
|
1379
1379
|
var r;
|
|
1380
1380
|
const n = ee(this.items, e), i = n == null ? void 0 : n.value;
|
|
1381
|
-
return (r = !t &&
|
|
1381
|
+
return (r = !t && A(i) ? i.value : i) != null ? r : void 0;
|
|
1382
1382
|
}
|
|
1383
1383
|
has(e) {
|
|
1384
1384
|
return !!ee(this.items, e);
|
|
@@ -1423,7 +1423,7 @@ const we = {
|
|
|
1423
1423
|
},
|
|
1424
1424
|
createNode: (s, e, t) => D.from(s, e, t)
|
|
1425
1425
|
};
|
|
1426
|
-
class
|
|
1426
|
+
class z extends as {
|
|
1427
1427
|
static get tagName() {
|
|
1428
1428
|
return "tag:yaml.org,2002:seq";
|
|
1429
1429
|
}
|
|
@@ -1450,7 +1450,7 @@ class X extends as {
|
|
|
1450
1450
|
if (typeof n != "number")
|
|
1451
1451
|
return;
|
|
1452
1452
|
const i = this.items[n];
|
|
1453
|
-
return !t &&
|
|
1453
|
+
return !t && A(i) ? i.value : i;
|
|
1454
1454
|
}
|
|
1455
1455
|
/**
|
|
1456
1456
|
* Checks if the collection includes a value with the key `key`.
|
|
@@ -1474,7 +1474,7 @@ class X extends as {
|
|
|
1474
1474
|
if (typeof n != "number")
|
|
1475
1475
|
throw new Error(`Expected a valid index, not ${e}.`);
|
|
1476
1476
|
const i = this.items[n];
|
|
1477
|
-
|
|
1477
|
+
A(i) && ls(t) ? i.value = t : this.items[n] = t;
|
|
1478
1478
|
}
|
|
1479
1479
|
toJSON(e, t) {
|
|
1480
1480
|
const n = [];
|
|
@@ -1502,25 +1502,25 @@ class X extends as {
|
|
|
1502
1502
|
const a = t instanceof Set ? l : String(o++);
|
|
1503
1503
|
l = i.call(t, a, l);
|
|
1504
1504
|
}
|
|
1505
|
-
r.items.push(
|
|
1505
|
+
r.items.push(Ie(l, void 0, n));
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
return r;
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
function Me(s) {
|
|
1512
|
-
let e =
|
|
1512
|
+
let e = A(s) ? s.value : s;
|
|
1513
1513
|
return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
|
|
1514
1514
|
}
|
|
1515
1515
|
const Se = {
|
|
1516
1516
|
collection: "seq",
|
|
1517
1517
|
default: !0,
|
|
1518
|
-
nodeClass:
|
|
1518
|
+
nodeClass: z,
|
|
1519
1519
|
tag: "tag:yaml.org,2002:seq",
|
|
1520
1520
|
resolve(s, e) {
|
|
1521
1521
|
return be(s) || e("Expected a sequence for this tag"), s;
|
|
1522
1522
|
},
|
|
1523
|
-
createNode: (s, e, t) =>
|
|
1523
|
+
createNode: (s, e, t) => z.from(s, e, t)
|
|
1524
1524
|
}, He = {
|
|
1525
1525
|
identify: (s) => typeof s == "string",
|
|
1526
1526
|
default: !0,
|
|
@@ -1529,14 +1529,14 @@ const Se = {
|
|
|
1529
1529
|
stringify(s, e, t, n) {
|
|
1530
1530
|
return e = Object.assign({ actualString: !0 }, e), Le(s, e, t, n);
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1532
|
+
}, ze = {
|
|
1533
1533
|
identify: (s) => s == null,
|
|
1534
1534
|
createNode: () => new N(null),
|
|
1535
1535
|
default: !0,
|
|
1536
1536
|
tag: "tag:yaml.org,2002:null",
|
|
1537
1537
|
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
1538
1538
|
resolve: () => new N(null),
|
|
1539
|
-
stringify: ({ source: s }, e) => typeof s == "string" &&
|
|
1539
|
+
stringify: ({ source: s }, e) => typeof s == "string" && ze.test.test(s) ? s : e.options.nullStr
|
|
1540
1540
|
}, Tt = {
|
|
1541
1541
|
identify: (s) => typeof s == "boolean",
|
|
1542
1542
|
default: !0,
|
|
@@ -1596,39 +1596,39 @@ const ps = {
|
|
|
1596
1596
|
return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
|
|
1597
1597
|
},
|
|
1598
1598
|
stringify: V
|
|
1599
|
-
},
|
|
1599
|
+
}, Xe = (s) => typeof s == "bigint" || Number.isInteger(s), It = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
|
|
1600
1600
|
function gs(s, e, t) {
|
|
1601
1601
|
const { value: n } = s;
|
|
1602
|
-
return
|
|
1602
|
+
return Xe(n) && n >= 0 ? t + n.toString(e) : V(s);
|
|
1603
1603
|
}
|
|
1604
1604
|
const bs = {
|
|
1605
|
-
identify: (s) =>
|
|
1605
|
+
identify: (s) => Xe(s) && s >= 0,
|
|
1606
1606
|
default: !0,
|
|
1607
1607
|
tag: "tag:yaml.org,2002:int",
|
|
1608
1608
|
format: "OCT",
|
|
1609
1609
|
test: /^0o[0-7]+$/,
|
|
1610
|
-
resolve: (s, e, t) =>
|
|
1610
|
+
resolve: (s, e, t) => It(s, 2, 8, t),
|
|
1611
1611
|
stringify: (s) => gs(s, 8, "0o")
|
|
1612
1612
|
}, ws = {
|
|
1613
|
-
identify:
|
|
1613
|
+
identify: Xe,
|
|
1614
1614
|
default: !0,
|
|
1615
1615
|
tag: "tag:yaml.org,2002:int",
|
|
1616
1616
|
test: /^[-+]?[0-9]+$/,
|
|
1617
|
-
resolve: (s, e, t) =>
|
|
1617
|
+
resolve: (s, e, t) => It(s, 0, 10, t),
|
|
1618
1618
|
stringify: V
|
|
1619
1619
|
}, Ss = {
|
|
1620
|
-
identify: (s) =>
|
|
1620
|
+
identify: (s) => Xe(s) && s >= 0,
|
|
1621
1621
|
default: !0,
|
|
1622
1622
|
tag: "tag:yaml.org,2002:int",
|
|
1623
1623
|
format: "HEX",
|
|
1624
1624
|
test: /^0x[0-9a-fA-F]+$/,
|
|
1625
|
-
resolve: (s, e, t) =>
|
|
1625
|
+
resolve: (s, e, t) => It(s, 2, 16, t),
|
|
1626
1626
|
stringify: (s) => gs(s, 16, "0x")
|
|
1627
|
-
},
|
|
1627
|
+
}, On = [
|
|
1628
1628
|
we,
|
|
1629
1629
|
Se,
|
|
1630
1630
|
He,
|
|
1631
|
-
|
|
1631
|
+
ze,
|
|
1632
1632
|
Tt,
|
|
1633
1633
|
bs,
|
|
1634
1634
|
ws,
|
|
@@ -1640,7 +1640,7 @@ const bs = {
|
|
|
1640
1640
|
function Vt(s) {
|
|
1641
1641
|
return typeof s == "bigint" || Number.isInteger(s);
|
|
1642
1642
|
}
|
|
1643
|
-
const ve = ({ value: s }) => JSON.stringify(s),
|
|
1643
|
+
const ve = ({ value: s }) => JSON.stringify(s), Tn = [
|
|
1644
1644
|
{
|
|
1645
1645
|
identify: (s) => typeof s == "string",
|
|
1646
1646
|
default: !0,
|
|
@@ -1681,14 +1681,14 @@ const ve = ({ value: s }) => JSON.stringify(s), Sn = [
|
|
|
1681
1681
|
resolve: (s) => parseFloat(s),
|
|
1682
1682
|
stringify: ve
|
|
1683
1683
|
}
|
|
1684
|
-
],
|
|
1684
|
+
], In = {
|
|
1685
1685
|
default: !0,
|
|
1686
1686
|
tag: "",
|
|
1687
1687
|
test: /^/,
|
|
1688
1688
|
resolve(s, e) {
|
|
1689
1689
|
return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
|
|
1690
1690
|
}
|
|
1691
|
-
},
|
|
1691
|
+
}, An = [we, Se].concat(Tn, In), At = {
|
|
1692
1692
|
identify: (s) => s instanceof Uint8Array,
|
|
1693
1693
|
// Buffer inherits from Uint8Array
|
|
1694
1694
|
default: !1,
|
|
@@ -1759,7 +1759,7 @@ ${o.comment}` : i.comment;
|
|
|
1759
1759
|
return s;
|
|
1760
1760
|
}
|
|
1761
1761
|
function Ns(s, e, t) {
|
|
1762
|
-
const { replacer: n } = t, i = new
|
|
1762
|
+
const { replacer: n } = t, i = new z(s);
|
|
1763
1763
|
i.tag = "tag:yaml.org,2002:pairs";
|
|
1764
1764
|
let r = 0;
|
|
1765
1765
|
if (e && Symbol.iterator in Object(e))
|
|
@@ -1790,7 +1790,7 @@ const Et = {
|
|
|
1790
1790
|
resolve: ks,
|
|
1791
1791
|
createNode: Ns
|
|
1792
1792
|
};
|
|
1793
|
-
class ue extends
|
|
1793
|
+
class ue extends z {
|
|
1794
1794
|
constructor() {
|
|
1795
1795
|
super(), this.add = D.prototype.add.bind(this), this.delete = D.prototype.delete.bind(this), this.get = D.prototype.get.bind(this), this.has = D.prototype.has.bind(this), this.set = D.prototype.set.bind(this), this.tag = ue.tag;
|
|
1796
1796
|
}
|
|
@@ -1826,13 +1826,13 @@ const Lt = {
|
|
|
1826
1826
|
resolve(s, e) {
|
|
1827
1827
|
const t = ks(s, e), n = [];
|
|
1828
1828
|
for (const { key: i } of t.items)
|
|
1829
|
-
|
|
1829
|
+
A(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
|
|
1830
1830
|
return Object.assign(new ue(), t);
|
|
1831
1831
|
},
|
|
1832
1832
|
createNode: (s, e, t) => ue.from(s, e, t)
|
|
1833
1833
|
};
|
|
1834
1834
|
function Os({ value: s, source: e }, t) {
|
|
1835
|
-
return e && (s ? Ts :
|
|
1835
|
+
return e && (s ? Ts : Is).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
|
|
1836
1836
|
}
|
|
1837
1837
|
const Ts = {
|
|
1838
1838
|
identify: (s) => s === !0,
|
|
@@ -1841,21 +1841,21 @@ const Ts = {
|
|
|
1841
1841
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
1842
1842
|
resolve: () => new N(!0),
|
|
1843
1843
|
stringify: Os
|
|
1844
|
-
},
|
|
1844
|
+
}, Is = {
|
|
1845
1845
|
identify: (s) => s === !1,
|
|
1846
1846
|
default: !0,
|
|
1847
1847
|
tag: "tag:yaml.org,2002:bool",
|
|
1848
1848
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
1849
1849
|
resolve: () => new N(!1),
|
|
1850
1850
|
stringify: Os
|
|
1851
|
-
},
|
|
1851
|
+
}, En = {
|
|
1852
1852
|
identify: (s) => typeof s == "number",
|
|
1853
1853
|
default: !0,
|
|
1854
1854
|
tag: "tag:yaml.org,2002:float",
|
|
1855
1855
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1856
1856
|
resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
1857
1857
|
stringify: V
|
|
1858
|
-
},
|
|
1858
|
+
}, Ln = {
|
|
1859
1859
|
identify: (s) => typeof s == "number",
|
|
1860
1860
|
default: !0,
|
|
1861
1861
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1866,7 +1866,7 @@ const Ts = {
|
|
|
1866
1866
|
const e = Number(s.value);
|
|
1867
1867
|
return isFinite(e) ? e.toExponential() : V(s);
|
|
1868
1868
|
}
|
|
1869
|
-
},
|
|
1869
|
+
}, $n = {
|
|
1870
1870
|
identify: (s) => typeof s == "number",
|
|
1871
1871
|
default: !0,
|
|
1872
1872
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1909,7 +1909,7 @@ function $t(s, e, t) {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
return V(s);
|
|
1911
1911
|
}
|
|
1912
|
-
const
|
|
1912
|
+
const Cn = {
|
|
1913
1913
|
identify: $e,
|
|
1914
1914
|
default: !0,
|
|
1915
1915
|
tag: "tag:yaml.org,2002:int",
|
|
@@ -1917,7 +1917,7 @@ const In = {
|
|
|
1917
1917
|
test: /^[-+]?0b[0-1_]+$/,
|
|
1918
1918
|
resolve: (s, e, t) => xe(s, 2, 2, t),
|
|
1919
1919
|
stringify: (s) => $t(s, 2, "0b")
|
|
1920
|
-
},
|
|
1920
|
+
}, _n = {
|
|
1921
1921
|
identify: $e,
|
|
1922
1922
|
default: !0,
|
|
1923
1923
|
tag: "tag:yaml.org,2002:int",
|
|
@@ -1925,14 +1925,14 @@ const In = {
|
|
|
1925
1925
|
test: /^[-+]?0[0-7_]+$/,
|
|
1926
1926
|
resolve: (s, e, t) => xe(s, 1, 8, t),
|
|
1927
1927
|
stringify: (s) => $t(s, 8, "0")
|
|
1928
|
-
},
|
|
1928
|
+
}, Mn = {
|
|
1929
1929
|
identify: $e,
|
|
1930
1930
|
default: !0,
|
|
1931
1931
|
tag: "tag:yaml.org,2002:int",
|
|
1932
1932
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
1933
1933
|
resolve: (s, e, t) => xe(s, 0, 10, t),
|
|
1934
1934
|
stringify: V
|
|
1935
|
-
},
|
|
1935
|
+
}, vn = {
|
|
1936
1936
|
identify: $e,
|
|
1937
1937
|
default: !0,
|
|
1938
1938
|
tag: "tag:yaml.org,2002:int",
|
|
@@ -1955,7 +1955,7 @@ class he extends D {
|
|
|
1955
1955
|
*/
|
|
1956
1956
|
get(e, t) {
|
|
1957
1957
|
const n = ee(this.items, e);
|
|
1958
|
-
return !t && E(n) ?
|
|
1958
|
+
return !t && E(n) ? A(n.key) ? n.key.value : n.key : n;
|
|
1959
1959
|
}
|
|
1960
1960
|
set(e, t) {
|
|
1961
1961
|
if (typeof t != "boolean")
|
|
@@ -2003,7 +2003,7 @@ function _t(s, e) {
|
|
|
2003
2003
|
const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
|
|
2004
2004
|
return t === "-" ? i(-1) * r : r;
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function As(s) {
|
|
2007
2007
|
let { value: e } = s, t = (o) => o;
|
|
2008
2008
|
if (typeof e == "bigint")
|
|
2009
2009
|
t = (o) => BigInt(o);
|
|
@@ -2021,7 +2021,7 @@ const Es = {
|
|
|
2021
2021
|
format: "TIME",
|
|
2022
2022
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
2023
2023
|
resolve: (s, e, { intAsBigInt: t }) => _t(s, t),
|
|
2024
|
-
stringify:
|
|
2024
|
+
stringify: As
|
|
2025
2025
|
}, Ls = {
|
|
2026
2026
|
identify: (s) => typeof s == "number",
|
|
2027
2027
|
default: !0,
|
|
@@ -2029,7 +2029,7 @@ const Es = {
|
|
|
2029
2029
|
format: "TIME",
|
|
2030
2030
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
2031
2031
|
resolve: (s) => _t(s, !1),
|
|
2032
|
-
stringify:
|
|
2032
|
+
stringify: As
|
|
2033
2033
|
}, Ze = {
|
|
2034
2034
|
identify: (s) => s instanceof Date,
|
|
2035
2035
|
default: !0,
|
|
@@ -2056,31 +2056,31 @@ const Es = {
|
|
|
2056
2056
|
we,
|
|
2057
2057
|
Se,
|
|
2058
2058
|
He,
|
|
2059
|
-
|
|
2059
|
+
ze,
|
|
2060
2060
|
Ts,
|
|
2061
|
-
|
|
2062
|
-
|
|
2061
|
+
Is,
|
|
2062
|
+
Cn,
|
|
2063
|
+
_n,
|
|
2064
|
+
Mn,
|
|
2065
|
+
vn,
|
|
2063
2066
|
En,
|
|
2064
2067
|
Ln,
|
|
2065
2068
|
$n,
|
|
2066
|
-
|
|
2067
|
-
Tn,
|
|
2068
|
-
An,
|
|
2069
|
-
It,
|
|
2069
|
+
At,
|
|
2070
2070
|
Lt,
|
|
2071
2071
|
Et,
|
|
2072
2072
|
Ct,
|
|
2073
2073
|
Es,
|
|
2074
2074
|
Ls,
|
|
2075
2075
|
Ze
|
|
2076
|
-
],
|
|
2077
|
-
["core",
|
|
2076
|
+
], Qt = /* @__PURE__ */ new Map([
|
|
2077
|
+
["core", On],
|
|
2078
2078
|
["failsafe", [we, Se, He]],
|
|
2079
|
-
["json",
|
|
2079
|
+
["json", An],
|
|
2080
2080
|
["yaml11", Jt],
|
|
2081
2081
|
["yaml-1.1", Jt]
|
|
2082
|
-
]),
|
|
2083
|
-
binary:
|
|
2082
|
+
]), Yt = {
|
|
2083
|
+
binary: At,
|
|
2084
2084
|
bool: Tt,
|
|
2085
2085
|
float: ys,
|
|
2086
2086
|
floatExp: ms,
|
|
@@ -2091,26 +2091,26 @@ const Es = {
|
|
|
2091
2091
|
intOct: bs,
|
|
2092
2092
|
intTime: Es,
|
|
2093
2093
|
map: we,
|
|
2094
|
-
null:
|
|
2094
|
+
null: ze,
|
|
2095
2095
|
omap: Lt,
|
|
2096
2096
|
pairs: Et,
|
|
2097
2097
|
seq: Se,
|
|
2098
2098
|
set: Ct,
|
|
2099
2099
|
timestamp: Ze
|
|
2100
|
-
},
|
|
2101
|
-
"tag:yaml.org,2002:binary":
|
|
2100
|
+
}, Bn = {
|
|
2101
|
+
"tag:yaml.org,2002:binary": At,
|
|
2102
2102
|
"tag:yaml.org,2002:omap": Lt,
|
|
2103
2103
|
"tag:yaml.org,2002:pairs": Et,
|
|
2104
2104
|
"tag:yaml.org,2002:set": Ct,
|
|
2105
2105
|
"tag:yaml.org,2002:timestamp": Ze
|
|
2106
2106
|
};
|
|
2107
2107
|
function ct(s, e) {
|
|
2108
|
-
let t =
|
|
2108
|
+
let t = Qt.get(e);
|
|
2109
2109
|
if (!t)
|
|
2110
2110
|
if (Array.isArray(s))
|
|
2111
2111
|
t = [];
|
|
2112
2112
|
else {
|
|
2113
|
-
const n = Array.from(
|
|
2113
|
+
const n = Array.from(Qt.keys()).filter((i) => i !== "yaml11").map((i) => JSON.stringify(i)).join(", ");
|
|
2114
2114
|
throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`);
|
|
2115
2115
|
}
|
|
2116
2116
|
if (Array.isArray(s))
|
|
@@ -2121,24 +2121,24 @@ function ct(s, e) {
|
|
|
2121
2121
|
return t.map((n) => {
|
|
2122
2122
|
if (typeof n != "string")
|
|
2123
2123
|
return n;
|
|
2124
|
-
const i =
|
|
2124
|
+
const i = Yt[n];
|
|
2125
2125
|
if (i)
|
|
2126
2126
|
return i;
|
|
2127
|
-
const r = Object.keys(
|
|
2127
|
+
const r = Object.keys(Yt).map((o) => JSON.stringify(o)).join(", ");
|
|
2128
2128
|
throw new Error(`Unknown custom tag "${n}"; use one of ${r}`);
|
|
2129
2129
|
});
|
|
2130
2130
|
}
|
|
2131
|
-
const
|
|
2131
|
+
const jn = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
|
|
2132
2132
|
class et {
|
|
2133
2133
|
constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
|
|
2134
|
-
this.compat = Array.isArray(e) ? ct(e, "compat") : e ? ct(null, e) : null, this.merge = !!n, this.name = typeof r == "string" && r || "core", this.knownTags = i ?
|
|
2134
|
+
this.compat = Array.isArray(e) ? ct(e, "compat") : e ? ct(null, e) : null, this.merge = !!n, this.name = typeof r == "string" && r || "core", this.knownTags = i ? Bn : {}, this.tags = ct(t, this.name), this.toStringOptions = l != null ? l : null, Object.defineProperty(this, W, { value: we }), Object.defineProperty(this, Y, { value: He }), Object.defineProperty(this, me, { value: Se }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? jn : null;
|
|
2135
2135
|
}
|
|
2136
2136
|
clone() {
|
|
2137
2137
|
const e = Object.create(et.prototype, Object.getOwnPropertyDescriptors(this));
|
|
2138
2138
|
return e.tags = this.tags.slice(), e;
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2141
|
+
function Pn(s, e) {
|
|
2142
2142
|
var a;
|
|
2143
2143
|
const t = [];
|
|
2144
2144
|
let n = e.directives === !0;
|
|
@@ -2151,14 +2151,14 @@ function Mn(s, e) {
|
|
|
2151
2151
|
if (s.commentBefore) {
|
|
2152
2152
|
t.length !== 1 && t.unshift("");
|
|
2153
2153
|
const c = r(s.commentBefore);
|
|
2154
|
-
t.unshift(
|
|
2154
|
+
t.unshift(Q(c, ""));
|
|
2155
2155
|
}
|
|
2156
2156
|
let o = !1, l = null;
|
|
2157
2157
|
if (s.contents) {
|
|
2158
2158
|
if (M(s.contents)) {
|
|
2159
2159
|
if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
|
|
2160
2160
|
const f = r(s.contents.commentBefore);
|
|
2161
|
-
t.push(
|
|
2161
|
+
t.push(Q(f, ""));
|
|
2162
2162
|
}
|
|
2163
2163
|
i.forceBlockIndent = !!s.comment, l = s.contents.comment;
|
|
2164
2164
|
}
|
|
@@ -2171,12 +2171,12 @@ function Mn(s, e) {
|
|
|
2171
2171
|
if (s.comment) {
|
|
2172
2172
|
const c = r(s.comment);
|
|
2173
2173
|
c.includes(`
|
|
2174
|
-
`) ? (t.push("..."), t.push(
|
|
2174
|
+
`) ? (t.push("..."), t.push(Q(c, ""))) : t.push(`... ${c}`);
|
|
2175
2175
|
} else
|
|
2176
2176
|
t.push("...");
|
|
2177
2177
|
else {
|
|
2178
2178
|
let c = s.comment;
|
|
2179
|
-
c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(
|
|
2179
|
+
c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(Q(r(c), "")));
|
|
2180
2180
|
}
|
|
2181
2181
|
return t.join(`
|
|
2182
2182
|
`) + `
|
|
@@ -2234,7 +2234,7 @@ class ke {
|
|
|
2234
2234
|
e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2235
2235
|
!t || n.has(t) ? os(t || "a", n) : t;
|
|
2236
2236
|
}
|
|
2237
|
-
return new
|
|
2237
|
+
return new Qe(e.anchor);
|
|
2238
2238
|
}
|
|
2239
2239
|
createNode(e, t, n) {
|
|
2240
2240
|
let i;
|
|
@@ -2245,7 +2245,7 @@ class ke {
|
|
|
2245
2245
|
b.length > 0 && (t = t.concat(b)), i = t;
|
|
2246
2246
|
} else
|
|
2247
2247
|
n === void 0 && t && (n = t, t = void 0);
|
|
2248
|
-
const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: h } = n != null ? n : {}, { onAnchor: f, setAnchors: p, sourceObjects: m } =
|
|
2248
|
+
const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: h } = n != null ? n : {}, { onAnchor: f, setAnchors: p, sourceObjects: m } = fn(
|
|
2249
2249
|
this,
|
|
2250
2250
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2251
2251
|
o || "a"
|
|
@@ -2257,7 +2257,7 @@ class ke {
|
|
|
2257
2257
|
replacer: i,
|
|
2258
2258
|
schema: this.schema,
|
|
2259
2259
|
sourceObjects: m
|
|
2260
|
-
}, u =
|
|
2260
|
+
}, u = Ie(e, h, y);
|
|
2261
2261
|
return l && $(u) && (u.flow = !0), p(), u;
|
|
2262
2262
|
}
|
|
2263
2263
|
/**
|
|
@@ -2296,7 +2296,7 @@ class ke {
|
|
|
2296
2296
|
* `true` (collections are always returned intact).
|
|
2297
2297
|
*/
|
|
2298
2298
|
getIn(e, t) {
|
|
2299
|
-
return Oe(e) ? !t &&
|
|
2299
|
+
return Oe(e) ? !t && A(this.contents) ? this.contents.value : this.contents : $(this.contents) ? this.contents.getIn(e, t) : void 0;
|
|
2300
2300
|
}
|
|
2301
2301
|
/**
|
|
2302
2302
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -2389,7 +2389,7 @@ class ke {
|
|
|
2389
2389
|
const t = JSON.stringify(e.indent);
|
|
2390
2390
|
throw new Error(`"indent" option must be a positive integer, not ${t}`);
|
|
2391
2391
|
}
|
|
2392
|
-
return
|
|
2392
|
+
return Pn(this, e);
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
function re(s) {
|
|
@@ -2441,7 +2441,7 @@ ${c}
|
|
|
2441
2441
|
}
|
|
2442
2442
|
};
|
|
2443
2443
|
function pe(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
|
|
2444
|
-
let a = !1, c = l, h = l, f = "", p = "", m = !1, y = !1, u = null, g = null, b = null, S = null,
|
|
2444
|
+
let a = !1, c = l, h = l, f = "", p = "", m = !1, y = !1, u = null, g = null, b = null, S = null, I = null, k = null, O = null;
|
|
2445
2445
|
for (const w of s)
|
|
2446
2446
|
switch (y && (w.type !== "space" && w.type !== "newline" && w.type !== "comma" && r(w.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), u && (c && w.type !== "comment" && w.type !== "newline" && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), u = null), w.type) {
|
|
2447
2447
|
case "space":
|
|
@@ -2468,7 +2468,7 @@ function pe(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
|
|
|
2468
2468
|
break;
|
|
2469
2469
|
case "comma":
|
|
2470
2470
|
if (e) {
|
|
2471
|
-
|
|
2471
|
+
I && r(w, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), I = w, c = !1, h = !1;
|
|
2472
2472
|
break;
|
|
2473
2473
|
}
|
|
2474
2474
|
default:
|
|
@@ -2476,7 +2476,7 @@ function pe(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
|
|
|
2476
2476
|
}
|
|
2477
2477
|
const T = s[s.length - 1], C = T ? T.offset + T.source.length : i;
|
|
2478
2478
|
return y && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), u && (c && u.indent <= o || (n == null ? void 0 : n.type) === "block-map" || (n == null ? void 0 : n.type) === "block-seq") && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
|
|
2479
|
-
comma:
|
|
2479
|
+
comma: I,
|
|
2480
2480
|
found: k,
|
|
2481
2481
|
spaceBefore: a,
|
|
2482
2482
|
comment: f,
|
|
@@ -2488,7 +2488,7 @@ function pe(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
|
|
|
2488
2488
|
start: O != null ? O : C
|
|
2489
2489
|
};
|
|
2490
2490
|
}
|
|
2491
|
-
function
|
|
2491
|
+
function Ae(s) {
|
|
2492
2492
|
if (!s)
|
|
2493
2493
|
return null;
|
|
2494
2494
|
switch (s.type) {
|
|
@@ -2515,7 +2515,7 @@ function Ie(s) {
|
|
|
2515
2515
|
if (t.type === "newline")
|
|
2516
2516
|
return !0;
|
|
2517
2517
|
}
|
|
2518
|
-
if (
|
|
2518
|
+
if (Ae(e.key) || Ae(e.value))
|
|
2519
2519
|
return !0;
|
|
2520
2520
|
}
|
|
2521
2521
|
return !1;
|
|
@@ -2526,18 +2526,18 @@ function Ie(s) {
|
|
|
2526
2526
|
function wt(s, e, t) {
|
|
2527
2527
|
if ((e == null ? void 0 : e.type) === "flow-collection") {
|
|
2528
2528
|
const n = e.end[0];
|
|
2529
|
-
n.indent === s && (n.source === "]" || n.source === "}") &&
|
|
2529
|
+
n.indent === s && (n.source === "]" || n.source === "}") && Ae(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
|
|
2530
2530
|
}
|
|
2531
2531
|
}
|
|
2532
2532
|
function Cs(s, e, t) {
|
|
2533
2533
|
const { uniqueKeys: n } = s.options;
|
|
2534
2534
|
if (n === !1)
|
|
2535
2535
|
return !1;
|
|
2536
|
-
const i = typeof n == "function" ? n : (r, o) => r === o ||
|
|
2536
|
+
const i = typeof n == "function" ? n : (r, o) => r === o || A(r) && A(o) && r.value === o.value && !(r.value === "<<" && s.schema.merge);
|
|
2537
2537
|
return e.some((r) => i(r.key, t));
|
|
2538
2538
|
}
|
|
2539
2539
|
const Gt = "All mapping items must start at the same column";
|
|
2540
|
-
function
|
|
2540
|
+
function qn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2541
2541
|
var h, f;
|
|
2542
2542
|
const o = (h = r == null ? void 0 : r.nodeClass) != null ? h : D, l = new o(t.schema);
|
|
2543
2543
|
t.atRoot && (t.atRoot = !1);
|
|
@@ -2557,11 +2557,11 @@ function vn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2557
2557
|
` + b.comment : l.comment = b.comment);
|
|
2558
2558
|
continue;
|
|
2559
2559
|
}
|
|
2560
|
-
(b.newlineAfterProp ||
|
|
2560
|
+
(b.newlineAfterProp || Ae(y)) && i(y != null ? y : m[m.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
2561
2561
|
} else
|
|
2562
2562
|
((f = b.found) == null ? void 0 : f.indent) !== n.indent && i(a, "BAD_INDENT", Gt);
|
|
2563
|
-
const
|
|
2564
|
-
t.schema.compat && wt(n.indent, y, i), Cs(t, l.items, k) && i(
|
|
2563
|
+
const I = b.end, k = y ? s(t, y, b, i) : e(t, I, m, null, b, i);
|
|
2564
|
+
t.schema.compat && wt(n.indent, y, i), Cs(t, l.items, k) && i(I, "DUPLICATE_KEY", "Map keys must be unique");
|
|
2565
2565
|
const O = pe(u != null ? u : [], {
|
|
2566
2566
|
indicator: "map-value-ind",
|
|
2567
2567
|
next: g,
|
|
@@ -2585,9 +2585,9 @@ function vn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2585
2585
|
}
|
|
2586
2586
|
return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c != null ? c : a], l;
|
|
2587
2587
|
}
|
|
2588
|
-
function
|
|
2588
|
+
function Dn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2589
2589
|
var h;
|
|
2590
|
-
const o = (h = r == null ? void 0 : r.nodeClass) != null ? h :
|
|
2590
|
+
const o = (h = r == null ? void 0 : r.nodeClass) != null ? h : z, l = new o(t.schema);
|
|
2591
2591
|
t.atRoot && (t.atRoot = !1);
|
|
2592
2592
|
let a = n.offset, c = null;
|
|
2593
2593
|
for (const { start: f, value: p } of n.items) {
|
|
@@ -2639,15 +2639,15 @@ function Ce(s, e, t, n) {
|
|
|
2639
2639
|
return { comment: i, offset: e };
|
|
2640
2640
|
}
|
|
2641
2641
|
const ft = "Block collections are not allowed within flow collections", ut = (s) => s && (s.type === "block-map" || s.type === "block-seq");
|
|
2642
|
-
function
|
|
2642
|
+
function Kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2643
2643
|
var g, b;
|
|
2644
|
-
const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (g = r == null ? void 0 : r.nodeClass) != null ? g : o ? D :
|
|
2644
|
+
const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (g = r == null ? void 0 : r.nodeClass) != null ? g : o ? D : z, c = new a(t.schema);
|
|
2645
2645
|
c.flow = !0;
|
|
2646
2646
|
const h = t.atRoot;
|
|
2647
2647
|
h && (t.atRoot = !1);
|
|
2648
2648
|
let f = n.offset + n.start.source.length;
|
|
2649
2649
|
for (let S = 0; S < n.items.length; ++S) {
|
|
2650
|
-
const
|
|
2650
|
+
const I = n.items[S], { start: k, key: O, sep: T, value: C } = I, w = pe(k, {
|
|
2651
2651
|
flow: l,
|
|
2652
2652
|
indicator: "explicit-key-ind",
|
|
2653
2653
|
next: O != null ? O : T == null ? void 0 : T[0],
|
|
@@ -2662,7 +2662,7 @@ function jn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2662
2662
|
` + w.comment : c.comment = w.comment), f = w.end;
|
|
2663
2663
|
continue;
|
|
2664
2664
|
}
|
|
2665
|
-
!o && t.options.strict &&
|
|
2665
|
+
!o && t.options.strict && Ae(O) && i(
|
|
2666
2666
|
O,
|
|
2667
2667
|
// checked by containsNewline()
|
|
2668
2668
|
"MULTILINE_IMPLICIT_KEY",
|
|
@@ -2721,18 +2721,18 @@ function jn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2721
2721
|
}
|
|
2722
2722
|
} else
|
|
2723
2723
|
C && ("source" in C && C.source && C.source[0] === ":" ? i(C, "MISSING_CHAR", `Missing space after : in ${l}`) : i(B.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2724
|
+
const X = C ? s(t, C, B, i) : B.found ? e(t, B.end, T, null, B, i) : null;
|
|
2725
|
+
X ? ut(C) && i(X.range, "BLOCK_IN_FLOW", ft) : B.comment && (_.comment ? _.comment += `
|
|
2726
2726
|
` + B.comment : _.comment = B.comment);
|
|
2727
|
-
const ie = new j(_,
|
|
2728
|
-
if (t.options.keepSourceTokens && (ie.srcToken =
|
|
2727
|
+
const ie = new j(_, X);
|
|
2728
|
+
if (t.options.keepSourceTokens && (ie.srcToken = I), o) {
|
|
2729
2729
|
const v = c;
|
|
2730
2730
|
Cs(t, v.items, _) && i(L, "DUPLICATE_KEY", "Map keys must be unique"), v.items.push(ie);
|
|
2731
2731
|
} else {
|
|
2732
2732
|
const v = new D(t.schema);
|
|
2733
2733
|
v.flow = !0, v.items.push(ie), c.items.push(v);
|
|
2734
2734
|
}
|
|
2735
|
-
f =
|
|
2735
|
+
f = X ? X.range[2] : B.end;
|
|
2736
2736
|
}
|
|
2737
2737
|
}
|
|
2738
2738
|
const p = o ? "}" : "]", [m, ...y] = n.end;
|
|
@@ -2740,8 +2740,8 @@ function jn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2740
2740
|
if (m && m.source === p)
|
|
2741
2741
|
u = m.offset + m.source.length;
|
|
2742
2742
|
else {
|
|
2743
|
-
const S = l[0].toUpperCase() + l.substring(1),
|
|
2744
|
-
i(f, h ? "MISSING_CHAR" : "BAD_INDENT",
|
|
2743
|
+
const S = l[0].toUpperCase() + l.substring(1), I = h ? `${S} must end with a ${p}` : `${S} in block collection must be sufficiently indented and end with a ${p}`;
|
|
2744
|
+
i(f, h ? "MISSING_CHAR" : "BAD_INDENT", I), m && m.source.length !== 1 && y.unshift(m);
|
|
2745
2745
|
}
|
|
2746
2746
|
if (y.length > 0) {
|
|
2747
2747
|
const S = Ce(y, u, t.options.strict, i);
|
|
@@ -2752,10 +2752,10 @@ function jn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2752
2752
|
return c;
|
|
2753
2753
|
}
|
|
2754
2754
|
function ht(s, e, t, n, i, r) {
|
|
2755
|
-
const o = t.type === "block-map" ?
|
|
2755
|
+
const o = t.type === "block-map" ? qn(s, e, t, n, r) : t.type === "block-seq" ? Dn(s, e, t, n, r) : Kn(s, e, t, n, r), l = o.constructor;
|
|
2756
2756
|
return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
|
|
2757
2757
|
}
|
|
2758
|
-
function
|
|
2758
|
+
function Fn(s, e, t, n, i) {
|
|
2759
2759
|
var p, m;
|
|
2760
2760
|
const r = n.tag, o = r ? e.directives.tagName(r.source, (y) => i(r, "TAG_RESOLVE_FAILED", y)) : null;
|
|
2761
2761
|
if (t.type === "block-seq") {
|
|
@@ -2763,7 +2763,7 @@ function Pn(s, e, t, n, i) {
|
|
|
2763
2763
|
g && (!u || u.offset < g.offset) && i(g, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
2764
2764
|
}
|
|
2765
2765
|
const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
|
|
2766
|
-
if (!r || !o || o === "!" || o === D.tagName && l === "map" || o ===
|
|
2766
|
+
if (!r || !o || o === "!" || o === D.tagName && l === "map" || o === z.tagName && l === "seq")
|
|
2767
2767
|
return ht(s, e, t, i, o);
|
|
2768
2768
|
let a = e.schema.tags.find((y) => y.tag === o && y.collection === l);
|
|
2769
2769
|
if (!a) {
|
|
@@ -2777,10 +2777,10 @@ function Pn(s, e, t, n, i) {
|
|
|
2777
2777
|
return f.range = c.range, f.tag = o, a != null && a.format && (f.format = a.format), f;
|
|
2778
2778
|
}
|
|
2779
2779
|
function _s(s, e, t) {
|
|
2780
|
-
const n = e.offset, i =
|
|
2780
|
+
const n = e.offset, i = Rn(e, s.options.strict, t);
|
|
2781
2781
|
if (!i)
|
|
2782
2782
|
return { value: "", type: null, comment: "", range: [n, n, n] };
|
|
2783
|
-
const r = i.mode === ">" ? N.BLOCK_FOLDED : N.BLOCK_LITERAL, o = e.source ?
|
|
2783
|
+
const r = i.mode === ">" ? N.BLOCK_FOLDED : N.BLOCK_LITERAL, o = e.source ? Un(e.source) : [];
|
|
2784
2784
|
let l = o.length;
|
|
2785
2785
|
for (let u = o.length - 1; u >= 0; --u) {
|
|
2786
2786
|
const g = o[u][1];
|
|
@@ -2849,7 +2849,7 @@ function _s(s, e, t) {
|
|
|
2849
2849
|
const y = n + i.length + e.source.length;
|
|
2850
2850
|
return { value: f, type: r, comment: i.comment, range: [n, y, y] };
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function Rn({ offset: s, props: e }, t, n) {
|
|
2853
2853
|
if (e[0].type !== "block-scalar-header")
|
|
2854
2854
|
return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
|
|
2855
2855
|
const { source: i } = e[0], r = i[0];
|
|
@@ -2889,7 +2889,7 @@ function qn({ offset: s, props: e }, t, n) {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
return { mode: r, indent: o, chomp: l, comment: h, length: f };
|
|
2891
2891
|
}
|
|
2892
|
-
function
|
|
2892
|
+
function Un(s) {
|
|
2893
2893
|
const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
|
|
2894
2894
|
for (let o = 1; o < e.length; o += 2)
|
|
2895
2895
|
r.push([e[o], e[o + 1]]);
|
|
@@ -2901,13 +2901,13 @@ function Ms(s, e, t) {
|
|
|
2901
2901
|
const c = (p, m, y) => t(n + p, m, y);
|
|
2902
2902
|
switch (i) {
|
|
2903
2903
|
case "scalar":
|
|
2904
|
-
l = N.PLAIN, a =
|
|
2904
|
+
l = N.PLAIN, a = Vn(r, c);
|
|
2905
2905
|
break;
|
|
2906
2906
|
case "single-quoted-scalar":
|
|
2907
|
-
l = N.QUOTE_SINGLE, a =
|
|
2907
|
+
l = N.QUOTE_SINGLE, a = Jn(r, c);
|
|
2908
2908
|
break;
|
|
2909
2909
|
case "double-quoted-scalar":
|
|
2910
|
-
l = N.QUOTE_DOUBLE, a =
|
|
2910
|
+
l = N.QUOTE_DOUBLE, a = Qn(r, c);
|
|
2911
2911
|
break;
|
|
2912
2912
|
default:
|
|
2913
2913
|
return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
|
|
@@ -2925,7 +2925,7 @@ function Ms(s, e, t) {
|
|
|
2925
2925
|
range: [n, h, f.offset]
|
|
2926
2926
|
};
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2928
|
+
function Vn(s, e) {
|
|
2929
2929
|
let t = "";
|
|
2930
2930
|
switch (s[0]) {
|
|
2931
2931
|
case " ":
|
|
@@ -2950,7 +2950,7 @@ function Kn(s, e) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), vs(s);
|
|
2952
2952
|
}
|
|
2953
|
-
function
|
|
2953
|
+
function Jn(s, e) {
|
|
2954
2954
|
return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), vs(s.slice(1, -1)).replace(/''/g, "'");
|
|
2955
2955
|
}
|
|
2956
2956
|
function vs(s) {
|
|
@@ -2974,7 +2974,7 @@ function vs(s) {
|
|
|
2974
2974
|
const l = new RegExp("[ \\t]*(.*)", "sy");
|
|
2975
2975
|
return l.lastIndex = o, n = l.exec(s), i + r + ((a = n == null ? void 0 : n[1]) != null ? a : "");
|
|
2976
2976
|
}
|
|
2977
|
-
function
|
|
2977
|
+
function Qn(s, e) {
|
|
2978
2978
|
let t = "";
|
|
2979
2979
|
for (let n = 1; n < s.length - 1; ++n) {
|
|
2980
2980
|
const i = s[n];
|
|
@@ -2982,11 +2982,11 @@ function Rn(s, e) {
|
|
|
2982
2982
|
`))
|
|
2983
2983
|
if (i === `
|
|
2984
2984
|
`) {
|
|
2985
|
-
const { fold: r, offset: o } =
|
|
2985
|
+
const { fold: r, offset: o } = Yn(s, n);
|
|
2986
2986
|
t += r, n = o;
|
|
2987
2987
|
} else if (i === "\\") {
|
|
2988
2988
|
let r = s[++n];
|
|
2989
|
-
const o =
|
|
2989
|
+
const o = Gn[r];
|
|
2990
2990
|
if (o)
|
|
2991
2991
|
t += o;
|
|
2992
2992
|
else if (r === `
|
|
@@ -2999,7 +2999,7 @@ function Rn(s, e) {
|
|
|
2999
2999
|
r = s[++n + 1];
|
|
3000
3000
|
else if (r === "x" || r === "u" || r === "U") {
|
|
3001
3001
|
const l = { x: 2, u: 4, U: 8 }[r];
|
|
3002
|
-
t +=
|
|
3002
|
+
t += Wn(s, n + 1, l, e), n += l;
|
|
3003
3003
|
} else {
|
|
3004
3004
|
const l = s.substr(n - 1, 2);
|
|
3005
3005
|
e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), t += l;
|
|
@@ -3017,7 +3017,7 @@ function Rn(s, e) {
|
|
|
3017
3017
|
}
|
|
3018
3018
|
return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
|
|
3019
3019
|
}
|
|
3020
|
-
function
|
|
3020
|
+
function Yn(s, e) {
|
|
3021
3021
|
let t = "", n = s[e + 1];
|
|
3022
3022
|
for (; (n === " " || n === " " || n === `
|
|
3023
3023
|
` || n === "\r") && !(n === "\r" && s[e + 2] !== `
|
|
@@ -3027,7 +3027,7 @@ function Un(s, e) {
|
|
|
3027
3027
|
`), e += 1, n = s[e + 1];
|
|
3028
3028
|
return t || (t = " "), { fold: t, offset: e };
|
|
3029
3029
|
}
|
|
3030
|
-
const
|
|
3030
|
+
const Gn = {
|
|
3031
3031
|
0: "\0",
|
|
3032
3032
|
// null character
|
|
3033
3033
|
a: "\x07",
|
|
@@ -3061,7 +3061,7 @@ const Vn = {
|
|
|
3061
3061
|
"\\": "\\",
|
|
3062
3062
|
" ": " "
|
|
3063
3063
|
};
|
|
3064
|
-
function
|
|
3064
|
+
function Wn(s, e, t, n) {
|
|
3065
3065
|
const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
|
|
3066
3066
|
if (isNaN(o)) {
|
|
3067
3067
|
const l = s.substr(e - 2, t + 2);
|
|
@@ -3070,21 +3070,21 @@ function Jn(s, e, t, n) {
|
|
|
3070
3070
|
return String.fromCodePoint(o);
|
|
3071
3071
|
}
|
|
3072
3072
|
function Bs(s, e, t, n) {
|
|
3073
|
-
const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? _s(s, e, n) : Ms(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null, c = t && a ?
|
|
3073
|
+
const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? _s(s, e, n) : Ms(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null, c = t && a ? Hn(s.schema, i, a, t, n) : e.type === "scalar" ? zn(s, i, e, n) : s.schema[Y];
|
|
3074
3074
|
let h;
|
|
3075
3075
|
try {
|
|
3076
3076
|
const f = c.resolve(i, (p) => n(t != null ? t : e, "TAG_RESOLVE_FAILED", p), s.options);
|
|
3077
|
-
h =
|
|
3077
|
+
h = A(f) ? f : new N(f);
|
|
3078
3078
|
} catch (f) {
|
|
3079
3079
|
const p = f instanceof Error ? f.message : String(f);
|
|
3080
3080
|
n(t != null ? t : e, "TAG_RESOLVE_FAILED", p), h = new N(i);
|
|
3081
3081
|
}
|
|
3082
3082
|
return h.range = l, h.source = i, r && (h.type = r), a && (h.tag = a), c.format && (h.format = c.format), o && (h.comment = o), h;
|
|
3083
3083
|
}
|
|
3084
|
-
function
|
|
3084
|
+
function Hn(s, e, t, n, i) {
|
|
3085
3085
|
var l;
|
|
3086
3086
|
if (t === "!")
|
|
3087
|
-
return s[
|
|
3087
|
+
return s[Y];
|
|
3088
3088
|
const r = [];
|
|
3089
3089
|
for (const a of s.tags)
|
|
3090
3090
|
if (!a.collection && a.tag === t)
|
|
@@ -3096,19 +3096,19 @@ function Yn(s, e, t, n, i) {
|
|
|
3096
3096
|
if ((l = a.test) != null && l.test(e))
|
|
3097
3097
|
return a;
|
|
3098
3098
|
const o = s.knownTags[t];
|
|
3099
|
-
return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[
|
|
3099
|
+
return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[Y]);
|
|
3100
3100
|
}
|
|
3101
|
-
function
|
|
3101
|
+
function zn({ directives: s, schema: e }, t, n, i) {
|
|
3102
3102
|
var o;
|
|
3103
3103
|
const r = e.tags.find((l) => {
|
|
3104
3104
|
var a;
|
|
3105
3105
|
return l.default && ((a = l.test) == null ? void 0 : a.test(t));
|
|
3106
|
-
}) || e[
|
|
3106
|
+
}) || e[Y];
|
|
3107
3107
|
if (e.compat) {
|
|
3108
3108
|
const l = (o = e.compat.find((a) => {
|
|
3109
3109
|
var c;
|
|
3110
3110
|
return a.default && ((c = a.test) == null ? void 0 : c.test(t));
|
|
3111
|
-
})) != null ? o : e[
|
|
3111
|
+
})) != null ? o : e[Y];
|
|
3112
3112
|
if (r.tag !== l.tag) {
|
|
3113
3113
|
const a = s.tagString(r.tag), c = s.tagString(l.tag), h = `Value may be parsed as either ${a} or ${c}`;
|
|
3114
3114
|
i(n, "TAG_RESOLVE_FAILED", h, !0);
|
|
@@ -3116,7 +3116,7 @@ function Qn({ directives: s, schema: e }, t, n, i) {
|
|
|
3116
3116
|
}
|
|
3117
3117
|
return r;
|
|
3118
3118
|
}
|
|
3119
|
-
function
|
|
3119
|
+
function Xn(s, e, t) {
|
|
3120
3120
|
if (e) {
|
|
3121
3121
|
t === null && (t = e.length);
|
|
3122
3122
|
for (let n = t - 1; n >= 0; --n) {
|
|
@@ -3135,13 +3135,13 @@ function Gn(s, e, t) {
|
|
|
3135
3135
|
}
|
|
3136
3136
|
return s;
|
|
3137
3137
|
}
|
|
3138
|
-
const
|
|
3138
|
+
const xn = { composeNode: js, composeEmptyNode: vt };
|
|
3139
3139
|
function js(s, e, t, n) {
|
|
3140
3140
|
const { spaceBefore: i, comment: r, anchor: o, tag: l } = t;
|
|
3141
3141
|
let a, c = !0;
|
|
3142
3142
|
switch (e.type) {
|
|
3143
3143
|
case "alias":
|
|
3144
|
-
a =
|
|
3144
|
+
a = Zn(s, e, n), (o || l) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
3145
3145
|
break;
|
|
3146
3146
|
case "scalar":
|
|
3147
3147
|
case "single-quoted-scalar":
|
|
@@ -3152,7 +3152,7 @@ function js(s, e, t, n) {
|
|
|
3152
3152
|
case "block-map":
|
|
3153
3153
|
case "block-seq":
|
|
3154
3154
|
case "flow-collection":
|
|
3155
|
-
a =
|
|
3155
|
+
a = Fn(xn, s, e, t, n), o && (a.anchor = o.source.substring(1));
|
|
3156
3156
|
break;
|
|
3157
3157
|
default: {
|
|
3158
3158
|
const h = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
|
|
@@ -3164,19 +3164,19 @@ function js(s, e, t, n) {
|
|
|
3164
3164
|
function vt(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
|
|
3165
3165
|
const h = {
|
|
3166
3166
|
type: "scalar",
|
|
3167
|
-
offset:
|
|
3167
|
+
offset: Xn(e, t, n),
|
|
3168
3168
|
indent: -1,
|
|
3169
3169
|
source: ""
|
|
3170
3170
|
}, f = Bs(s, h, l, c);
|
|
3171
3171
|
return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = a), f;
|
|
3172
3172
|
}
|
|
3173
|
-
function
|
|
3174
|
-
const r = new
|
|
3173
|
+
function Zn({ options: s }, { offset: e, source: t, end: n }, i) {
|
|
3174
|
+
const r = new Qe(t.substring(1));
|
|
3175
3175
|
r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
|
|
3176
3176
|
const o = e + t.length, l = Ce(n, o, s.strict, i);
|
|
3177
3177
|
return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
|
|
3178
3178
|
}
|
|
3179
|
-
function
|
|
3179
|
+
function ei(s, e, { offset: t, start: n, value: i, end: r }, o) {
|
|
3180
3180
|
const l = Object.assign({ _directives: e }, s), a = new ke(void 0, l), c = {
|
|
3181
3181
|
atRoot: !0,
|
|
3182
3182
|
directives: a.directives,
|
|
@@ -3287,7 +3287,7 @@ ${o}` : n;
|
|
|
3287
3287
|
}), this.prelude.push(e.source), this.atDirectives = !0;
|
|
3288
3288
|
break;
|
|
3289
3289
|
case "document": {
|
|
3290
|
-
const t =
|
|
3290
|
+
const t = ei(this.options, this.directives, e, this.onError);
|
|
3291
3291
|
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;
|
|
3292
3292
|
break;
|
|
3293
3293
|
}
|
|
@@ -3338,7 +3338,7 @@ ${t.comment}` : t.comment;
|
|
|
3338
3338
|
}
|
|
3339
3339
|
}
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3341
|
+
function ti(s, e = !0, t) {
|
|
3342
3342
|
if (s) {
|
|
3343
3343
|
const n = (i, r, o) => {
|
|
3344
3344
|
const l = typeof i == "number" ? i : Array.isArray(i) ? i[0] : i.offset;
|
|
@@ -3358,7 +3358,7 @@ function zn(s, e = !0, t) {
|
|
|
3358
3358
|
}
|
|
3359
3359
|
return null;
|
|
3360
3360
|
}
|
|
3361
|
-
function
|
|
3361
|
+
function si(s, e) {
|
|
3362
3362
|
var c;
|
|
3363
3363
|
const { implicitKey: t = !1, indent: n, inFlow: i = !1, offset: r = -1, type: o = "PLAIN" } = e, l = Le({ type: o, value: s }, {
|
|
3364
3364
|
implicitKey: t,
|
|
@@ -3388,7 +3388,7 @@ function xn(s, e) {
|
|
|
3388
3388
|
return { type: "scalar", offset: r, indent: n, source: l, end: a };
|
|
3389
3389
|
}
|
|
3390
3390
|
}
|
|
3391
|
-
function
|
|
3391
|
+
function ni(s, e, t = {}) {
|
|
3392
3392
|
let { afterKey: n = !1, implicitKey: i = !1, inFlow: r = !1, type: o } = t, l = "indent" in s ? s.indent : null;
|
|
3393
3393
|
if (n && typeof l == "number" && (l += 2), !o)
|
|
3394
3394
|
switch (s.type) {
|
|
@@ -3417,7 +3417,7 @@ function Zn(s, e, t = {}) {
|
|
|
3417
3417
|
switch (a[0]) {
|
|
3418
3418
|
case "|":
|
|
3419
3419
|
case ">":
|
|
3420
|
-
|
|
3420
|
+
ii(s, a);
|
|
3421
3421
|
break;
|
|
3422
3422
|
case '"':
|
|
3423
3423
|
dt(s, a, "double-quoted-scalar");
|
|
@@ -3429,7 +3429,7 @@ function Zn(s, e, t = {}) {
|
|
|
3429
3429
|
dt(s, a, "scalar");
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
|
-
function
|
|
3432
|
+
function ii(s, e) {
|
|
3433
3433
|
const t = e.indexOf(`
|
|
3434
3434
|
`), n = e.substring(0, t), i = e.substring(t + 1) + `
|
|
3435
3435
|
`;
|
|
@@ -3493,7 +3493,7 @@ function dt(s, e, t) {
|
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
3495
3495
|
}
|
|
3496
|
-
const
|
|
3496
|
+
const ri = (s) => "type" in s ? Ve(s) : Ke(s);
|
|
3497
3497
|
function Ve(s) {
|
|
3498
3498
|
switch (s.type) {
|
|
3499
3499
|
case "block-scalar": {
|
|
@@ -3542,12 +3542,12 @@ function Ke({ start: s, key: e, sep: t, value: n }) {
|
|
|
3542
3542
|
i += r.source;
|
|
3543
3543
|
return n && (i += Ve(n)), i;
|
|
3544
3544
|
}
|
|
3545
|
-
const St = Symbol("break visit"),
|
|
3545
|
+
const St = Symbol("break visit"), oi = Symbol("skip children"), qs = Symbol("remove item");
|
|
3546
3546
|
function se(s, e) {
|
|
3547
3547
|
"type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Ds(Object.freeze([]), s, e);
|
|
3548
3548
|
}
|
|
3549
3549
|
se.BREAK = St;
|
|
3550
|
-
se.SKIP =
|
|
3550
|
+
se.SKIP = oi;
|
|
3551
3551
|
se.REMOVE = qs;
|
|
3552
3552
|
se.itemAtPath = (s, e) => {
|
|
3553
3553
|
let t = s;
|
|
@@ -3588,8 +3588,8 @@ function Ds(s, e, t) {
|
|
|
3588
3588
|
}
|
|
3589
3589
|
return typeof n == "function" ? n(e, s) : n;
|
|
3590
3590
|
}
|
|
3591
|
-
const tt = "\uFEFF", st = "", nt = "", Ee = "",
|
|
3592
|
-
function
|
|
3591
|
+
const tt = "\uFEFF", st = "", nt = "", Ee = "", li = (s) => !!s && "items" in s, ai = (s) => !!s && (s.type === "scalar" || s.type === "single-quoted-scalar" || s.type === "double-quoted-scalar" || s.type === "block-scalar");
|
|
3592
|
+
function ci(s) {
|
|
3593
3593
|
switch (s) {
|
|
3594
3594
|
case tt:
|
|
3595
3595
|
return "<BOM>";
|
|
@@ -3664,19 +3664,19 @@ function Ks(s) {
|
|
|
3664
3664
|
}
|
|
3665
3665
|
return null;
|
|
3666
3666
|
}
|
|
3667
|
-
const
|
|
3667
|
+
const fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3668
3668
|
__proto__: null,
|
|
3669
3669
|
BOM: tt,
|
|
3670
3670
|
DOCUMENT: st,
|
|
3671
3671
|
FLOW_END: nt,
|
|
3672
3672
|
SCALAR: Ee,
|
|
3673
|
-
createScalarToken:
|
|
3674
|
-
isCollection:
|
|
3675
|
-
isScalar:
|
|
3676
|
-
prettyToken:
|
|
3677
|
-
resolveAsScalar:
|
|
3678
|
-
setScalarValue:
|
|
3679
|
-
stringify:
|
|
3673
|
+
createScalarToken: si,
|
|
3674
|
+
isCollection: li,
|
|
3675
|
+
isScalar: ai,
|
|
3676
|
+
prettyToken: ci,
|
|
3677
|
+
resolveAsScalar: ti,
|
|
3678
|
+
setScalarValue: ni,
|
|
3679
|
+
stringify: ri,
|
|
3680
3680
|
tokenType: Ks,
|
|
3681
3681
|
visit: se
|
|
3682
3682
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3693,8 +3693,8 @@ function U(s) {
|
|
|
3693
3693
|
return !1;
|
|
3694
3694
|
}
|
|
3695
3695
|
}
|
|
3696
|
-
const Ht = new Set("0123456789ABCDEFabcdef"),
|
|
3697
|
-
\r `), pt = (s) => !s ||
|
|
3696
|
+
const Ht = new Set("0123456789ABCDEFabcdef"), ui = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Be = new Set(",[]{}"), hi = new Set(` ,[]{}
|
|
3697
|
+
\r `), pt = (s) => !s || hi.has(s);
|
|
3698
3698
|
class Fs {
|
|
3699
3699
|
constructor() {
|
|
3700
3700
|
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;
|
|
@@ -4077,7 +4077,7 @@ class Fs {
|
|
|
4077
4077
|
} else {
|
|
4078
4078
|
let e = this.pos + 1, t = this.buffer[e];
|
|
4079
4079
|
for (; t; )
|
|
4080
|
-
if (
|
|
4080
|
+
if (ui.has(t))
|
|
4081
4081
|
t = this.buffer[++e];
|
|
4082
4082
|
else if (t === "%" && Ht.has(this.buffer[e + 1]) && Ht.has(this.buffer[e + 2]))
|
|
4083
4083
|
t = this.buffer[e += 3];
|
|
@@ -4130,7 +4130,7 @@ function x(s, e) {
|
|
|
4130
4130
|
return !0;
|
|
4131
4131
|
return !1;
|
|
4132
4132
|
}
|
|
4133
|
-
function
|
|
4133
|
+
function zt(s) {
|
|
4134
4134
|
for (let e = 0; e < s.length; ++e)
|
|
4135
4135
|
switch (s[e].type) {
|
|
4136
4136
|
case "space":
|
|
@@ -4188,7 +4188,7 @@ function oe(s) {
|
|
|
4188
4188
|
;
|
|
4189
4189
|
return s.splice(e, s.length);
|
|
4190
4190
|
}
|
|
4191
|
-
function
|
|
4191
|
+
function Xt(s) {
|
|
4192
4192
|
if (s.start.type === "flow-seq-start")
|
|
4193
4193
|
for (const e of s.items)
|
|
4194
4194
|
e.sep && !e.value && !x(e.start, "explicit-key-ind") && !x(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, Us(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
|
|
@@ -4312,7 +4312,7 @@ class jt {
|
|
|
4312
4312
|
yield t;
|
|
4313
4313
|
else {
|
|
4314
4314
|
const n = this.peek(1);
|
|
4315
|
-
switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" &&
|
|
4315
|
+
switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && Xt(t), n.type) {
|
|
4316
4316
|
case "document":
|
|
4317
4317
|
n.value = t;
|
|
4318
4318
|
break;
|
|
@@ -4347,7 +4347,7 @@ class jt {
|
|
|
4347
4347
|
}
|
|
4348
4348
|
if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
|
|
4349
4349
|
const i = t.items[t.items.length - 1];
|
|
4350
|
-
i && !i.sep && !i.value && i.start.length > 0 &&
|
|
4350
|
+
i && !i.sep && !i.value && i.start.length > 0 && zt(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
|
|
4351
4351
|
}
|
|
4352
4352
|
}
|
|
4353
4353
|
}
|
|
@@ -4385,7 +4385,7 @@ class jt {
|
|
|
4385
4385
|
return yield* d(this.lineEnd(e));
|
|
4386
4386
|
switch (this.type) {
|
|
4387
4387
|
case "doc-start": {
|
|
4388
|
-
|
|
4388
|
+
zt(e.start) !== -1 ? (yield* d(this.pop()), yield* d(this.step())) : e.start.push(this.sourceToken);
|
|
4389
4389
|
return;
|
|
4390
4390
|
}
|
|
4391
4391
|
case "anchor":
|
|
@@ -4656,7 +4656,7 @@ class jt {
|
|
|
4656
4656
|
yield* d(this.pop()), yield* d(this.step());
|
|
4657
4657
|
else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
|
|
4658
4658
|
const i = je(n), r = oe(i);
|
|
4659
|
-
|
|
4659
|
+
Xt(e);
|
|
4660
4660
|
const o = e.end.splice(1, e.end.length);
|
|
4661
4661
|
o.push(this.sourceToken);
|
|
4662
4662
|
const l = {
|
|
@@ -4769,7 +4769,7 @@ function Vs(s) {
|
|
|
4769
4769
|
const e = s.prettyErrors !== !1;
|
|
4770
4770
|
return { lineCounter: s.lineCounter || e && new Rs() || null, prettyErrors: e };
|
|
4771
4771
|
}
|
|
4772
|
-
function
|
|
4772
|
+
function di(s, e = {}) {
|
|
4773
4773
|
const { lineCounter: t, prettyErrors: n } = Vs(e), i = new jt(t == null ? void 0 : t.addNewLine), r = new Bt(e), o = Array.from(r.compose(i.parse(s)));
|
|
4774
4774
|
if (n && t)
|
|
4775
4775
|
for (const l of o)
|
|
@@ -4788,7 +4788,7 @@ function Js(s, e = {}) {
|
|
|
4788
4788
|
}
|
|
4789
4789
|
return n && t && (o.errors.forEach(Ue(s, t)), o.warnings.forEach(Ue(s, t))), o;
|
|
4790
4790
|
}
|
|
4791
|
-
function
|
|
4791
|
+
function pi(s, e, t) {
|
|
4792
4792
|
let n;
|
|
4793
4793
|
typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
|
|
4794
4794
|
const i = Js(s, t);
|
|
@@ -4801,7 +4801,7 @@ function fi(s, e, t) {
|
|
|
4801
4801
|
}
|
|
4802
4802
|
return i.toJS(Object.assign({ reviver: n }, t));
|
|
4803
4803
|
}
|
|
4804
|
-
function
|
|
4804
|
+
function mi(s, e, t) {
|
|
4805
4805
|
var i;
|
|
4806
4806
|
let n = null;
|
|
4807
4807
|
if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
|
|
@@ -4817,8 +4817,8 @@ function ui(s, e, t) {
|
|
|
4817
4817
|
}
|
|
4818
4818
|
const xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4819
4819
|
__proto__: null,
|
|
4820
|
-
Alias:
|
|
4821
|
-
CST:
|
|
4820
|
+
Alias: Qe,
|
|
4821
|
+
CST: fi,
|
|
4822
4822
|
Composer: Bt,
|
|
4823
4823
|
Document: ke,
|
|
4824
4824
|
Lexer: Fs,
|
|
@@ -4830,7 +4830,7 @@ const xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4830
4830
|
YAMLError: Mt,
|
|
4831
4831
|
YAMLMap: D,
|
|
4832
4832
|
YAMLParseError: te,
|
|
4833
|
-
YAMLSeq:
|
|
4833
|
+
YAMLSeq: z,
|
|
4834
4834
|
YAMLWarning: $s,
|
|
4835
4835
|
isAlias: ne,
|
|
4836
4836
|
isCollection: $,
|
|
@@ -4838,15 +4838,15 @@ const xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4838
4838
|
isMap: ge,
|
|
4839
4839
|
isNode: M,
|
|
4840
4840
|
isPair: E,
|
|
4841
|
-
isScalar:
|
|
4841
|
+
isScalar: A,
|
|
4842
4842
|
isSeq: be,
|
|
4843
|
-
parse:
|
|
4844
|
-
parseAllDocuments:
|
|
4843
|
+
parse: pi,
|
|
4844
|
+
parseAllDocuments: di,
|
|
4845
4845
|
parseDocument: Js,
|
|
4846
|
-
stringify:
|
|
4846
|
+
stringify: mi,
|
|
4847
4847
|
visit: H,
|
|
4848
4848
|
visitAsync: Je
|
|
4849
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4849
|
+
}, Symbol.toStringTag, { value: "Module" })), yi = `# This is your query - you can modify it directly and click Run to see new results.
|
|
4850
4850
|
# Try uncommenting the elements below
|
|
4851
4851
|
# To learn more about the query syntax, visit [Doc URL]
|
|
4852
4852
|
---
|
|
@@ -4888,7 +4888,7 @@ model: {{dataSourceTitle}}
|
|
|
4888
4888
|
# - name: Dimension2
|
|
4889
4889
|
# - name: Measure1
|
|
4890
4890
|
# - name: Measure2`;
|
|
4891
|
-
class
|
|
4891
|
+
class Ti {
|
|
4892
4892
|
/**
|
|
4893
4893
|
* Constructor for QueryTranslator.
|
|
4894
4894
|
*
|
|
@@ -4912,7 +4912,7 @@ class yi {
|
|
|
4912
4912
|
* Concatenates Aggregation Types.
|
|
4913
4913
|
*/
|
|
4914
4914
|
concatAggTypes() {
|
|
4915
|
-
return Object.values(
|
|
4915
|
+
return Object.values(on).map((t) => nn.aggregationToJAQL(t)).join("|");
|
|
4916
4916
|
}
|
|
4917
4917
|
/**
|
|
4918
4918
|
* Simplifies Aggregation Formula defined in MetadataItemJaql returned from chat response.
|
|
@@ -5051,13 +5051,13 @@ class yi {
|
|
|
5051
5051
|
*/
|
|
5052
5052
|
stringifySimple(e) {
|
|
5053
5053
|
const r = e, { queryTitle: t } = r, n = Dt(r, ["queryTitle"]), i = new xt.Document(n);
|
|
5054
|
-
return i.commentBefore = ` ${
|
|
5054
|
+
return i.commentBefore = ` ${zs(t)}`, i.directives && (i.directives.docStart = !0), String(i);
|
|
5055
5055
|
}
|
|
5056
5056
|
/**
|
|
5057
5057
|
* Returns the query template.
|
|
5058
5058
|
*/
|
|
5059
5059
|
getQueryTemplate() {
|
|
5060
|
-
return
|
|
5060
|
+
return Xs(yi, { dataSourceTitle: this.contextTitle });
|
|
5061
5061
|
}
|
|
5062
5062
|
/**
|
|
5063
5063
|
* Parses a YAML string to Simple Query Model.
|
|
@@ -5084,7 +5084,7 @@ class yi {
|
|
|
5084
5084
|
if (!e || !("dataOptions" in e))
|
|
5085
5085
|
return {};
|
|
5086
5086
|
const { chartType: t, dataOptions: n } = e;
|
|
5087
|
-
return { chartFamily:
|
|
5087
|
+
return { chartFamily: rn(t), chartType: t, axesMapping: n };
|
|
5088
5088
|
}
|
|
5089
5089
|
/**
|
|
5090
5090
|
* Expands MetadataItemJaql by adding table, column, datatype, and title
|
|
@@ -5138,15 +5138,35 @@ class yi {
|
|
|
5138
5138
|
return { jaql: o, chartRecommendations: l, queryTitle: r };
|
|
5139
5139
|
}
|
|
5140
5140
|
}
|
|
5141
|
-
const
|
|
5141
|
+
const Ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5142
5142
|
__proto__: null
|
|
5143
|
+
}, Symbol.toStringTag, { value: "Module" })), gi = "executeQueryTmpl", bi = (s, e, t) => {
|
|
5144
|
+
const n = {
|
|
5145
|
+
dataSourceString: Zs(s.dataSource),
|
|
5146
|
+
dimensionsString: "[]",
|
|
5147
|
+
// TODO
|
|
5148
|
+
measuresString: "[]",
|
|
5149
|
+
// TODO
|
|
5150
|
+
filtersString: en(s.filters),
|
|
5151
|
+
highlightsString: "[]",
|
|
5152
|
+
// TODO
|
|
5153
|
+
extraImportsString: tn(s.filters || [])
|
|
5154
|
+
};
|
|
5155
|
+
return sn(t, n, e);
|
|
5156
|
+
}, wi = ({
|
|
5157
|
+
queryParams: s,
|
|
5158
|
+
uiFramework: e = "react"
|
|
5159
|
+
}) => bi(s, e, gi), Si = (s) => wi(s), Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5160
|
+
__proto__: null,
|
|
5161
|
+
toExecuteQueryCode: Si
|
|
5143
5162
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5144
5163
|
export {
|
|
5145
|
-
|
|
5164
|
+
$i as EMPTY_EXPANDED_QUERY_MODEL,
|
|
5146
5165
|
Kt as EMPTY_SIMPLE_QUERY_MODEL,
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5166
|
+
Ti as QueryTranslator,
|
|
5167
|
+
Ii as dashboardComposer,
|
|
5168
|
+
Ai as executeQueryComposer,
|
|
5169
|
+
Ci as isByIdWidgetCodeParams,
|
|
5170
|
+
_i as isClientSideWidgetCodeParams,
|
|
5171
|
+
Mi as widgetComposer
|
|
5152
5172
|
};
|