@skillre/dsh-plugin-work-dashboard 0.9.0 → 0.10.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/docs/DESIGN-1.0-/344/274/230/345/214/226/346/226/271/346/241/210.md +212 -0
- package/docs/DESIGN-/344/274/232/350/257/235/344/272/214-SuperAgent/344/270/216/344/273/223/345/272/223/346/224/271/351/200/240.md +275 -0
- package/docs/LEDGER-REQUIREMENTS-v3.1.md +367 -0
- package/docs/PLAN-v3.1-adaptation.md +237 -0
- package/docs/TARGET-/345/217/260/350/264/246/344/273/223/345/272/223v3.1.md +500 -0
- package/docs//350/200/201Mac-SuperAgent/346/224/271/351/200/240/350/256/260/345/275/225-/347/254/254/344/272/214/346/255/245.md +233 -0
- package/lib/client/css/detail.d.ts +1 -1
- package/lib/client/css/detail.js +83 -4
- package/lib/client/text.js +68 -6
- package/lib/client.js +2698 -40
- package/lib/form.d.ts +62 -2
- package/lib/form.js +88 -10
- package/lib/gap.d.ts +26 -8
- package/lib/gap.js +88 -17
- package/lib/repo.d.ts +60 -0
- package/lib/repo.js +99 -0
- package/lib/rules.d.ts +105 -0
- package/lib/rules.js +227 -0
- package/lib/signals.d.ts +126 -0
- package/lib/signals.js +238 -0
- package/lib/store.d.ts +16 -1
- package/lib/store.js +80 -10
- package/lib/types.d.ts +129 -15
- package/lib/types.js +5 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -57,7 +57,12 @@ window.__ModuleLoader__.load({
|
|
|
57
57
|
"R9-evidence-no-recognition",
|
|
58
58
|
"R10-g3-1-without-g3-2",
|
|
59
59
|
"R11-no-next-milestone",
|
|
60
|
-
"R12-stage-stalled"
|
|
60
|
+
"R12-stage-stalled",
|
|
61
|
+
// v3.1 state rules: a plan that is the right shape but unexecuted.
|
|
62
|
+
"R13-scenario-no-evidence",
|
|
63
|
+
"R14-scenario-awaiting-customer",
|
|
64
|
+
"R15-criteria-unverified",
|
|
65
|
+
"R16-scenario-not-started"
|
|
61
66
|
]);
|
|
62
67
|
var BLOCKER_SOURCES = Object.freeze([
|
|
63
68
|
"gap",
|
|
@@ -212,6 +217,12 @@ window.__ModuleLoader__.load({
|
|
|
212
217
|
scenariosLimitHint: "\u8981\u6C42 3\u20135 \u4E2A",
|
|
213
218
|
risksLimitHint: "\u4E0A\u9650 3 \u4E2A",
|
|
214
219
|
emptyField: "\uFF08\u7A7A\uFF09",
|
|
220
|
+
// The ledger's `priority` is an English enum (strategic/high/normal). Rendering
|
|
221
|
+
// it raw would read as a code fragment inside a Chinese page.
|
|
222
|
+
priorityStrategic: "\u6218\u7565",
|
|
223
|
+
priorityHigh: "\u9AD8",
|
|
224
|
+
priorityNormal: "\u5E38\u89C4",
|
|
225
|
+
priorityUnknown: "\u672A\u5B9A",
|
|
215
226
|
riskLevel: "\u7B49\u7EA7",
|
|
216
227
|
riskMitigation: "\u5E94\u5BF9",
|
|
217
228
|
round: "\u7B2C {round} \u8F6E",
|
|
@@ -594,16 +605,42 @@ window.__ModuleLoader__.load({
|
|
|
594
605
|
dtG0Unreviewed: "\u8FD8\u6CA1\u6709\u8BC4\u5BA1\u7ED3\u8BBA",
|
|
595
606
|
dtPlanTitle: "\u8BA1\u5212\uFF08G1 / G2\uFF09",
|
|
596
607
|
dtPlanCriteria: "\u6210\u529F\u6307\u6807",
|
|
597
|
-
|
|
608
|
+
dtPlanCriteriaStatus: "\u72B6\u6001",
|
|
609
|
+
dtPlanScenarioGoal: "\u76EE\u6807",
|
|
610
|
+
dtPlanScenarioEvidence: "{count} \u9879\u8BC1\u636E",
|
|
611
|
+
dtProgressCountLabel: "{count} \u6761",
|
|
612
|
+
dtPlanScenarioDetail: "\u8BE6\u60C5",
|
|
613
|
+
dtScenarioBack: "\u8FD4\u56DE\u603B\u89C8",
|
|
614
|
+
dtScenarioTitle: "\u573A\u666F\u8BE6\u60C5",
|
|
615
|
+
dtScenarioGoal: "\u6210\u529F\u76EE\u6807",
|
|
616
|
+
dtScenarioEvidence: "\u8BC1\u636E",
|
|
617
|
+
dtScenarioEvidenceNone: "\u8FD9\u4E2A\u573A\u666F\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BC1\u636E\u3002\u6CA1\u6709\u8BC1\u636E\u7684\u573A\u666F\uFF0C\u5728\u4EFB\u4F55\u8BA8\u8BBA\u91CC\u90FD\u7B49\u4E8E\u6CA1\u505A\u8FC7\u3002",
|
|
618
|
+
dtScenarioCustomer: "\u5BA2\u6237\u53CD\u9988",
|
|
619
|
+
dtScenarioSyncedWith: "\u540C\u6B65\u5BF9\u8C61",
|
|
620
|
+
dtScenarioFeedbackEmpty: "\u8FD8\u6CA1\u6709\u8BB0\u5F55\u5BA2\u6237\u53CD\u9988\u3002\u5BA2\u6237\u600E\u4E48\u8BF4\uFF0C\u6BD4\u6211\u4EEC\u600E\u4E48\u6D4B\u66F4\u91CD\u8981\u3002",
|
|
621
|
+
dtScenarioGate3: "G3 \u5224\u5B9A",
|
|
622
|
+
dtScenarioLinked: "\u5173\u8054\u8FDB\u5C55",
|
|
623
|
+
dtScenarioLinkedNone: "\u8FD8\u6CA1\u6709\u8FDB\u5C55\u5173\u8054\u5230\u8FD9\u4E2A\u573A\u666F\u3002\u65B0\u589E\u8FDB\u5C55\u65F6\u7528 scenario_ids \u5F15\u7528\u5B83\u3002",
|
|
624
|
+
dtScenarioNotFound: "\u627E\u4E0D\u5230\u8FD9\u4E2A\u573A\u666F",
|
|
625
|
+
dtStatusProven: "\u5DF2\u8BC1\u660E",
|
|
626
|
+
dtStatusAwaiting: "\u5F85\u5BA2\u6237\u786E\u8BA4",
|
|
627
|
+
dtStatusNoEvidence: "\u65E0\u8BC1\u636E",
|
|
628
|
+
dtStatusNotStarted: "\u672A\u5F00\u59CB",
|
|
629
|
+
dtCritProven: "\u5DF2\u8FBE\u6210",
|
|
630
|
+
dtCritPartial: "\u90E8\u5206\u8FBE\u6210",
|
|
631
|
+
dtCritFailed: "\u672A\u8FBE\u6210",
|
|
632
|
+
dtCritUnverified: "\u672A\u9A8C\u8BC1",
|
|
633
|
+
dtCriteriaStatusNone: "\u672A\u9A8C\u8BC1",
|
|
634
|
+
dtPlanCriteriaNone: "\u8FD8\u6CA1\u6709\u6210\u529F\u6307\u6807\u3002\u81F3\u5C11\u5199 2 \u9879\u53EF\u9A8C\u6536\u7684\u6307\u6807\uFF0C\u5426\u5219 POC \u7ED3\u675F\u540E\u65E0\u6CD5\u5224\u5B9A\u6210\u6CA1\u6210\u3002",
|
|
598
635
|
dtPlanCriteriaCount: "{count} \u9879\uFF08\u8981\u6C42 2\u20133\uFF09",
|
|
599
636
|
dtPlanMetric: "\u6307\u6807",
|
|
600
637
|
dtPlanBaseline: "\u57FA\u7EBF",
|
|
601
638
|
dtPlanTarget: "\u76EE\u6807",
|
|
602
639
|
dtPlanScenarios: "\u9A8C\u8BC1\u573A\u666F",
|
|
603
|
-
dtPlanScenariosNone: "\u8FD8\u6CA1\u6709\
|
|
640
|
+
dtPlanScenariosNone: "\u8FD8\u6CA1\u6709\u9A8C\u8BC1\u573A\u666F\u3002\u5199 3\u20135 \u4E2A\u5177\u4F53\u573A\u666F\uFF0C\u6BCF\u4E2A\u90FD\u8981\u80FD\u5BF9\u5E94\u5230\u8BC1\u636E\u3002",
|
|
604
641
|
dtPlanScenariosCount: "{count} \u4E2A\uFF08\u8981\u6C42 3\u20135\uFF09",
|
|
605
642
|
dtPlanRisks: "\u98CE\u9669",
|
|
606
|
-
dtPlanRisksNone: "\u6CA1\u6709\u767B\u8BB0\u98CE\u9669",
|
|
643
|
+
dtPlanRisksNone: "\u6CA1\u6709\u767B\u8BB0\u98CE\u9669\u3002\u81F3\u5C11\u5199\u4E0B\u6700\u53EF\u80FD\u8BA9\u8FD9\u6B21 POC \u5931\u8D25\u7684\u90A3\u4E00\u6761\u3002",
|
|
607
644
|
dtPlanRisksCount: "{count} \u4E2A\uFF08\u4E0A\u9650 3\uFF09",
|
|
608
645
|
dtPlanMitigation: "\u5E94\u5BF9",
|
|
609
646
|
dtPlanPain: "\u5BA2\u6237\u75DB\u70B9",
|
|
@@ -747,6 +784,10 @@ window.__ModuleLoader__.load({
|
|
|
747
784
|
scenariosLimitHint: "3\u20135 required",
|
|
748
785
|
risksLimitHint: "At most 3",
|
|
749
786
|
emptyField: "(empty)",
|
|
787
|
+
priorityStrategic: "Strategic",
|
|
788
|
+
priorityHigh: "High",
|
|
789
|
+
priorityNormal: "Normal",
|
|
790
|
+
priorityUnknown: "Unset",
|
|
750
791
|
riskLevel: "Level",
|
|
751
792
|
riskMitigation: "Mitigation",
|
|
752
793
|
round: "Round {round}",
|
|
@@ -1128,16 +1169,42 @@ window.__ModuleLoader__.load({
|
|
|
1128
1169
|
dtG0Unreviewed: "No review conclusion yet",
|
|
1129
1170
|
dtPlanTitle: "Plan (G1 / G2)",
|
|
1130
1171
|
dtPlanCriteria: "Success criteria",
|
|
1131
|
-
|
|
1172
|
+
dtPlanCriteriaStatus: "Status",
|
|
1173
|
+
dtPlanScenarioGoal: "Goal",
|
|
1174
|
+
dtPlanScenarioEvidence: "{count} evidence",
|
|
1175
|
+
dtProgressCountLabel: "{count} entries",
|
|
1176
|
+
dtPlanScenarioDetail: "Detail",
|
|
1177
|
+
dtScenarioBack: "Back to overview",
|
|
1178
|
+
dtScenarioTitle: "Scenario detail",
|
|
1179
|
+
dtScenarioGoal: "Success goal",
|
|
1180
|
+
dtScenarioEvidence: "Evidence",
|
|
1181
|
+
dtScenarioEvidenceNone: "No evidence for this scenario yet. An unbacked scenario counts as not done.",
|
|
1182
|
+
dtScenarioCustomer: "Customer feedback",
|
|
1183
|
+
dtScenarioSyncedWith: "Synced with",
|
|
1184
|
+
dtScenarioFeedbackEmpty: "No customer feedback yet. What the customer says matters more than what we tested.",
|
|
1185
|
+
dtScenarioGate3: "G3 verdict",
|
|
1186
|
+
dtScenarioLinked: "Linked progress",
|
|
1187
|
+
dtScenarioLinkedNone: "No progress entry references this scenario yet. Cite its id in scenario_ids.",
|
|
1188
|
+
dtScenarioNotFound: "Scenario not found",
|
|
1189
|
+
dtStatusProven: "Proven",
|
|
1190
|
+
dtStatusAwaiting: "Awaiting customer",
|
|
1191
|
+
dtStatusNoEvidence: "No evidence",
|
|
1192
|
+
dtStatusNotStarted: "Not started",
|
|
1193
|
+
dtCritProven: "Met",
|
|
1194
|
+
dtCritPartial: "Partially met",
|
|
1195
|
+
dtCritFailed: "Not met",
|
|
1196
|
+
dtCritUnverified: "Unverified",
|
|
1197
|
+
dtCriteriaStatusNone: "Unverified",
|
|
1198
|
+
dtPlanCriteriaNone: "No success criterion yet. Write at least 2 so the pilot can be judged when it ends.",
|
|
1132
1199
|
dtPlanCriteriaCount: "{count} (2\u20133 required)",
|
|
1133
1200
|
dtPlanMetric: "Metric",
|
|
1134
1201
|
dtPlanBaseline: "Baseline",
|
|
1135
1202
|
dtPlanTarget: "Target",
|
|
1136
1203
|
dtPlanScenarios: "Validation scenarios",
|
|
1137
|
-
dtPlanScenariosNone: "No validation scenario
|
|
1204
|
+
dtPlanScenariosNone: "No validation scenario yet. Write 3\u20135 concrete ones, each able to point at evidence.",
|
|
1138
1205
|
dtPlanScenariosCount: "{count} (3\u20135 required)",
|
|
1139
1206
|
dtPlanRisks: "Risks",
|
|
1140
|
-
dtPlanRisksNone: "No risk registered",
|
|
1207
|
+
dtPlanRisksNone: "No risk registered. Name at least the one most likely to sink this pilot.",
|
|
1141
1208
|
dtPlanRisksCount: "{count} (max 3)",
|
|
1142
1209
|
dtPlanMitigation: "Mitigation",
|
|
1143
1210
|
dtPlanPain: "Customer pain",
|
|
@@ -1551,6 +1618,2323 @@ window.__ModuleLoader__.load({
|
|
|
1551
1618
|
// src/client/blockers.tsx
|
|
1552
1619
|
var import_react = require("react");
|
|
1553
1620
|
|
|
1621
|
+
// node_modules/yaml/browser/dist/nodes/identity.js
|
|
1622
|
+
var ALIAS = Symbol.for("yaml.alias");
|
|
1623
|
+
var DOC = Symbol.for("yaml.document");
|
|
1624
|
+
var MAP = Symbol.for("yaml.map");
|
|
1625
|
+
var PAIR = Symbol.for("yaml.pair");
|
|
1626
|
+
var SCALAR = Symbol.for("yaml.scalar");
|
|
1627
|
+
var SEQ = Symbol.for("yaml.seq");
|
|
1628
|
+
var NODE_TYPE = Symbol.for("yaml.node.type");
|
|
1629
|
+
var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS;
|
|
1630
|
+
var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC;
|
|
1631
|
+
var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP;
|
|
1632
|
+
var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR;
|
|
1633
|
+
var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR;
|
|
1634
|
+
var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ;
|
|
1635
|
+
function isCollection(node) {
|
|
1636
|
+
if (node && typeof node === "object")
|
|
1637
|
+
switch (node[NODE_TYPE]) {
|
|
1638
|
+
case MAP:
|
|
1639
|
+
case SEQ:
|
|
1640
|
+
return true;
|
|
1641
|
+
}
|
|
1642
|
+
return false;
|
|
1643
|
+
}
|
|
1644
|
+
function isNode(node) {
|
|
1645
|
+
if (node && typeof node === "object")
|
|
1646
|
+
switch (node[NODE_TYPE]) {
|
|
1647
|
+
case ALIAS:
|
|
1648
|
+
case MAP:
|
|
1649
|
+
case SCALAR:
|
|
1650
|
+
case SEQ:
|
|
1651
|
+
return true;
|
|
1652
|
+
}
|
|
1653
|
+
return false;
|
|
1654
|
+
}
|
|
1655
|
+
var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
1656
|
+
|
|
1657
|
+
// node_modules/yaml/browser/dist/visit.js
|
|
1658
|
+
var BREAK = Symbol("break visit");
|
|
1659
|
+
var SKIP = Symbol("skip children");
|
|
1660
|
+
var REMOVE = Symbol("remove node");
|
|
1661
|
+
function visit(node, visitor) {
|
|
1662
|
+
const visitor_ = initVisitor(visitor);
|
|
1663
|
+
if (isDocument(node)) {
|
|
1664
|
+
const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
|
|
1665
|
+
if (cd === REMOVE)
|
|
1666
|
+
node.contents = null;
|
|
1667
|
+
} else
|
|
1668
|
+
visit_(null, node, visitor_, Object.freeze([]));
|
|
1669
|
+
}
|
|
1670
|
+
visit.BREAK = BREAK;
|
|
1671
|
+
visit.SKIP = SKIP;
|
|
1672
|
+
visit.REMOVE = REMOVE;
|
|
1673
|
+
function visit_(key, node, visitor, path) {
|
|
1674
|
+
const ctrl = callVisitor(key, node, visitor, path);
|
|
1675
|
+
if (isNode(ctrl) || isPair(ctrl)) {
|
|
1676
|
+
replaceNode(key, path, ctrl);
|
|
1677
|
+
return visit_(key, ctrl, visitor, path);
|
|
1678
|
+
}
|
|
1679
|
+
if (typeof ctrl !== "symbol") {
|
|
1680
|
+
if (isCollection(node)) {
|
|
1681
|
+
path = Object.freeze(path.concat(node));
|
|
1682
|
+
for (let i = 0; i < node.items.length; ++i) {
|
|
1683
|
+
const ci = visit_(i, node.items[i], visitor, path);
|
|
1684
|
+
if (typeof ci === "number")
|
|
1685
|
+
i = ci - 1;
|
|
1686
|
+
else if (ci === BREAK)
|
|
1687
|
+
return BREAK;
|
|
1688
|
+
else if (ci === REMOVE) {
|
|
1689
|
+
node.items.splice(i, 1);
|
|
1690
|
+
i -= 1;
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
} else if (isPair(node)) {
|
|
1694
|
+
path = Object.freeze(path.concat(node));
|
|
1695
|
+
const ck = visit_("key", node.key, visitor, path);
|
|
1696
|
+
if (ck === BREAK)
|
|
1697
|
+
return BREAK;
|
|
1698
|
+
else if (ck === REMOVE)
|
|
1699
|
+
node.key = null;
|
|
1700
|
+
const cv = visit_("value", node.value, visitor, path);
|
|
1701
|
+
if (cv === BREAK)
|
|
1702
|
+
return BREAK;
|
|
1703
|
+
else if (cv === REMOVE)
|
|
1704
|
+
node.value = null;
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
return ctrl;
|
|
1708
|
+
}
|
|
1709
|
+
async function visitAsync(node, visitor) {
|
|
1710
|
+
const visitor_ = initVisitor(visitor);
|
|
1711
|
+
if (isDocument(node)) {
|
|
1712
|
+
const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
|
|
1713
|
+
if (cd === REMOVE)
|
|
1714
|
+
node.contents = null;
|
|
1715
|
+
} else
|
|
1716
|
+
await visitAsync_(null, node, visitor_, Object.freeze([]));
|
|
1717
|
+
}
|
|
1718
|
+
visitAsync.BREAK = BREAK;
|
|
1719
|
+
visitAsync.SKIP = SKIP;
|
|
1720
|
+
visitAsync.REMOVE = REMOVE;
|
|
1721
|
+
async function visitAsync_(key, node, visitor, path) {
|
|
1722
|
+
const ctrl = await callVisitor(key, node, visitor, path);
|
|
1723
|
+
if (isNode(ctrl) || isPair(ctrl)) {
|
|
1724
|
+
replaceNode(key, path, ctrl);
|
|
1725
|
+
return visitAsync_(key, ctrl, visitor, path);
|
|
1726
|
+
}
|
|
1727
|
+
if (typeof ctrl !== "symbol") {
|
|
1728
|
+
if (isCollection(node)) {
|
|
1729
|
+
path = Object.freeze(path.concat(node));
|
|
1730
|
+
for (let i = 0; i < node.items.length; ++i) {
|
|
1731
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path);
|
|
1732
|
+
if (typeof ci === "number")
|
|
1733
|
+
i = ci - 1;
|
|
1734
|
+
else if (ci === BREAK)
|
|
1735
|
+
return BREAK;
|
|
1736
|
+
else if (ci === REMOVE) {
|
|
1737
|
+
node.items.splice(i, 1);
|
|
1738
|
+
i -= 1;
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
} else if (isPair(node)) {
|
|
1742
|
+
path = Object.freeze(path.concat(node));
|
|
1743
|
+
const ck = await visitAsync_("key", node.key, visitor, path);
|
|
1744
|
+
if (ck === BREAK)
|
|
1745
|
+
return BREAK;
|
|
1746
|
+
else if (ck === REMOVE)
|
|
1747
|
+
node.key = null;
|
|
1748
|
+
const cv = await visitAsync_("value", node.value, visitor, path);
|
|
1749
|
+
if (cv === BREAK)
|
|
1750
|
+
return BREAK;
|
|
1751
|
+
else if (cv === REMOVE)
|
|
1752
|
+
node.value = null;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
return ctrl;
|
|
1756
|
+
}
|
|
1757
|
+
function initVisitor(visitor) {
|
|
1758
|
+
if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) {
|
|
1759
|
+
return Object.assign({
|
|
1760
|
+
Alias: visitor.Node,
|
|
1761
|
+
Map: visitor.Node,
|
|
1762
|
+
Scalar: visitor.Node,
|
|
1763
|
+
Seq: visitor.Node
|
|
1764
|
+
}, visitor.Value && {
|
|
1765
|
+
Map: visitor.Value,
|
|
1766
|
+
Scalar: visitor.Value,
|
|
1767
|
+
Seq: visitor.Value
|
|
1768
|
+
}, visitor.Collection && {
|
|
1769
|
+
Map: visitor.Collection,
|
|
1770
|
+
Seq: visitor.Collection
|
|
1771
|
+
}, visitor);
|
|
1772
|
+
}
|
|
1773
|
+
return visitor;
|
|
1774
|
+
}
|
|
1775
|
+
function callVisitor(key, node, visitor, path) {
|
|
1776
|
+
if (typeof visitor === "function")
|
|
1777
|
+
return visitor(key, node, path);
|
|
1778
|
+
if (isMap(node))
|
|
1779
|
+
return visitor.Map?.(key, node, path);
|
|
1780
|
+
if (isSeq(node))
|
|
1781
|
+
return visitor.Seq?.(key, node, path);
|
|
1782
|
+
if (isPair(node))
|
|
1783
|
+
return visitor.Pair?.(key, node, path);
|
|
1784
|
+
if (isScalar(node))
|
|
1785
|
+
return visitor.Scalar?.(key, node, path);
|
|
1786
|
+
if (isAlias(node))
|
|
1787
|
+
return visitor.Alias?.(key, node, path);
|
|
1788
|
+
return void 0;
|
|
1789
|
+
}
|
|
1790
|
+
function replaceNode(key, path, node) {
|
|
1791
|
+
const parent = path[path.length - 1];
|
|
1792
|
+
if (isCollection(parent)) {
|
|
1793
|
+
parent.items[key] = node;
|
|
1794
|
+
} else if (isPair(parent)) {
|
|
1795
|
+
if (key === "key")
|
|
1796
|
+
parent.key = node;
|
|
1797
|
+
else
|
|
1798
|
+
parent.value = node;
|
|
1799
|
+
} else if (isDocument(parent)) {
|
|
1800
|
+
parent.contents = node;
|
|
1801
|
+
} else {
|
|
1802
|
+
const pt = isAlias(parent) ? "alias" : "scalar";
|
|
1803
|
+
throw new Error(`Cannot replace node with ${pt} parent`);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
// node_modules/yaml/browser/dist/doc/directives.js
|
|
1808
|
+
var escapeChars = {
|
|
1809
|
+
"!": "%21",
|
|
1810
|
+
",": "%2C",
|
|
1811
|
+
"[": "%5B",
|
|
1812
|
+
"]": "%5D",
|
|
1813
|
+
"{": "%7B",
|
|
1814
|
+
"}": "%7D"
|
|
1815
|
+
};
|
|
1816
|
+
var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]);
|
|
1817
|
+
var Directives = class _Directives {
|
|
1818
|
+
constructor(yaml, tags) {
|
|
1819
|
+
this.docStart = null;
|
|
1820
|
+
this.docEnd = false;
|
|
1821
|
+
this.yaml = Object.assign({}, _Directives.defaultYaml, yaml);
|
|
1822
|
+
this.tags = Object.assign({}, _Directives.defaultTags, tags);
|
|
1823
|
+
}
|
|
1824
|
+
clone() {
|
|
1825
|
+
const copy = new _Directives(this.yaml, this.tags);
|
|
1826
|
+
copy.docStart = this.docStart;
|
|
1827
|
+
return copy;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* During parsing, get a Directives instance for the current document and
|
|
1831
|
+
* update the stream state according to the current version's spec.
|
|
1832
|
+
*/
|
|
1833
|
+
atDocument() {
|
|
1834
|
+
const res = new _Directives(this.yaml, this.tags);
|
|
1835
|
+
switch (this.yaml.version) {
|
|
1836
|
+
case "1.1":
|
|
1837
|
+
this.atNextDocument = true;
|
|
1838
|
+
break;
|
|
1839
|
+
case "1.2":
|
|
1840
|
+
this.atNextDocument = false;
|
|
1841
|
+
this.yaml = {
|
|
1842
|
+
explicit: _Directives.defaultYaml.explicit,
|
|
1843
|
+
version: "1.2"
|
|
1844
|
+
};
|
|
1845
|
+
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
1846
|
+
break;
|
|
1847
|
+
}
|
|
1848
|
+
return res;
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* @param onError - May be called even if the action was successful
|
|
1852
|
+
* @returns `true` on success
|
|
1853
|
+
*/
|
|
1854
|
+
add(line, onError) {
|
|
1855
|
+
if (this.atNextDocument) {
|
|
1856
|
+
this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" };
|
|
1857
|
+
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
1858
|
+
this.atNextDocument = false;
|
|
1859
|
+
}
|
|
1860
|
+
const parts = line.trim().split(/[ \t]+/);
|
|
1861
|
+
const name = parts.shift();
|
|
1862
|
+
switch (name) {
|
|
1863
|
+
case "%TAG": {
|
|
1864
|
+
if (parts.length !== 2) {
|
|
1865
|
+
onError(0, "%TAG directive should contain exactly two parts");
|
|
1866
|
+
if (parts.length < 2)
|
|
1867
|
+
return false;
|
|
1868
|
+
}
|
|
1869
|
+
const [handle, prefix] = parts;
|
|
1870
|
+
this.tags[handle] = prefix;
|
|
1871
|
+
return true;
|
|
1872
|
+
}
|
|
1873
|
+
case "%YAML": {
|
|
1874
|
+
this.yaml.explicit = true;
|
|
1875
|
+
if (parts.length !== 1) {
|
|
1876
|
+
onError(0, "%YAML directive should contain exactly one part");
|
|
1877
|
+
return false;
|
|
1878
|
+
}
|
|
1879
|
+
const [version] = parts;
|
|
1880
|
+
if (version === "1.1" || version === "1.2") {
|
|
1881
|
+
this.yaml.version = version;
|
|
1882
|
+
return true;
|
|
1883
|
+
} else {
|
|
1884
|
+
const isValid = /^\d+\.\d+$/.test(version);
|
|
1885
|
+
onError(6, `Unsupported YAML version ${version}`, isValid);
|
|
1886
|
+
return false;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
default:
|
|
1890
|
+
onError(0, `Unknown directive ${name}`, true);
|
|
1891
|
+
return false;
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Resolves a tag, matching handles to those defined in %TAG directives.
|
|
1896
|
+
*
|
|
1897
|
+
* @returns Resolved tag, which may also be the non-specific tag `'!'` or a
|
|
1898
|
+
* `'!local'` tag, or `null` if unresolvable.
|
|
1899
|
+
*/
|
|
1900
|
+
tagName(source, onError) {
|
|
1901
|
+
if (source === "!")
|
|
1902
|
+
return "!";
|
|
1903
|
+
if (source[0] !== "!") {
|
|
1904
|
+
onError(`Not a valid tag: ${source}`);
|
|
1905
|
+
return null;
|
|
1906
|
+
}
|
|
1907
|
+
if (source[1] === "<") {
|
|
1908
|
+
const verbatim = source.slice(2, -1);
|
|
1909
|
+
if (verbatim === "!" || verbatim === "!!") {
|
|
1910
|
+
onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
|
|
1911
|
+
return null;
|
|
1912
|
+
}
|
|
1913
|
+
if (source[source.length - 1] !== ">")
|
|
1914
|
+
onError("Verbatim tags must end with a >");
|
|
1915
|
+
return verbatim;
|
|
1916
|
+
}
|
|
1917
|
+
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
|
|
1918
|
+
if (!suffix)
|
|
1919
|
+
onError(`The ${source} tag has no suffix`);
|
|
1920
|
+
const prefix = this.tags[handle];
|
|
1921
|
+
if (prefix) {
|
|
1922
|
+
try {
|
|
1923
|
+
return prefix + decodeURIComponent(suffix);
|
|
1924
|
+
} catch (error) {
|
|
1925
|
+
onError(String(error));
|
|
1926
|
+
return null;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
if (handle === "!")
|
|
1930
|
+
return source;
|
|
1931
|
+
onError(`Could not resolve tag: ${source}`);
|
|
1932
|
+
return null;
|
|
1933
|
+
}
|
|
1934
|
+
/**
|
|
1935
|
+
* Given a fully resolved tag, returns its printable string form,
|
|
1936
|
+
* taking into account current tag prefixes and defaults.
|
|
1937
|
+
*/
|
|
1938
|
+
tagString(tag) {
|
|
1939
|
+
for (const [handle, prefix] of Object.entries(this.tags)) {
|
|
1940
|
+
if (tag.startsWith(prefix))
|
|
1941
|
+
return handle + escapeTagName(tag.substring(prefix.length));
|
|
1942
|
+
}
|
|
1943
|
+
return tag[0] === "!" ? tag : `!<${tag}>`;
|
|
1944
|
+
}
|
|
1945
|
+
toString(doc) {
|
|
1946
|
+
const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
|
1947
|
+
const tagEntries = Object.entries(this.tags);
|
|
1948
|
+
let tagNames;
|
|
1949
|
+
if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
|
|
1950
|
+
const tags = {};
|
|
1951
|
+
visit(doc.contents, (_key, node) => {
|
|
1952
|
+
if (isNode(node) && node.tag)
|
|
1953
|
+
tags[node.tag] = true;
|
|
1954
|
+
});
|
|
1955
|
+
tagNames = Object.keys(tags);
|
|
1956
|
+
} else
|
|
1957
|
+
tagNames = [];
|
|
1958
|
+
for (const [handle, prefix] of tagEntries) {
|
|
1959
|
+
if (handle === "!!" && prefix === "tag:yaml.org,2002:")
|
|
1960
|
+
continue;
|
|
1961
|
+
if (!doc || tagNames.some((tn) => tn.startsWith(prefix)))
|
|
1962
|
+
lines.push(`%TAG ${handle} ${prefix}`);
|
|
1963
|
+
}
|
|
1964
|
+
return lines.join("\n");
|
|
1965
|
+
}
|
|
1966
|
+
};
|
|
1967
|
+
Directives.defaultYaml = { explicit: false, version: "1.2" };
|
|
1968
|
+
Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
1969
|
+
|
|
1970
|
+
// node_modules/yaml/browser/dist/doc/anchors.js
|
|
1971
|
+
function anchorIsValid(anchor) {
|
|
1972
|
+
if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
|
|
1973
|
+
const sa = JSON.stringify(anchor);
|
|
1974
|
+
const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
|
|
1975
|
+
throw new Error(msg);
|
|
1976
|
+
}
|
|
1977
|
+
return true;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
// node_modules/yaml/browser/dist/doc/applyReviver.js
|
|
1981
|
+
function applyReviver(reviver, obj, key, val) {
|
|
1982
|
+
if (val && typeof val === "object") {
|
|
1983
|
+
if (Array.isArray(val)) {
|
|
1984
|
+
for (let i = 0, len = val.length; i < len; ++i) {
|
|
1985
|
+
const v0 = val[i];
|
|
1986
|
+
const v1 = applyReviver(reviver, val, String(i), v0);
|
|
1987
|
+
if (v1 === void 0)
|
|
1988
|
+
delete val[i];
|
|
1989
|
+
else if (v1 !== v0)
|
|
1990
|
+
val[i] = v1;
|
|
1991
|
+
}
|
|
1992
|
+
} else if (val instanceof Map) {
|
|
1993
|
+
for (const k of Array.from(val.keys())) {
|
|
1994
|
+
const v0 = val.get(k);
|
|
1995
|
+
const v1 = applyReviver(reviver, val, k, v0);
|
|
1996
|
+
if (v1 === void 0)
|
|
1997
|
+
val.delete(k);
|
|
1998
|
+
else if (v1 !== v0)
|
|
1999
|
+
val.set(k, v1);
|
|
2000
|
+
}
|
|
2001
|
+
} else if (val instanceof Set) {
|
|
2002
|
+
for (const v0 of Array.from(val)) {
|
|
2003
|
+
const v1 = applyReviver(reviver, val, v0, v0);
|
|
2004
|
+
if (v1 === void 0)
|
|
2005
|
+
val.delete(v0);
|
|
2006
|
+
else if (v1 !== v0) {
|
|
2007
|
+
val.delete(v0);
|
|
2008
|
+
val.add(v1);
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
} else {
|
|
2012
|
+
for (const [k, v0] of Object.entries(val)) {
|
|
2013
|
+
const v1 = applyReviver(reviver, val, k, v0);
|
|
2014
|
+
if (v1 === void 0)
|
|
2015
|
+
delete val[k];
|
|
2016
|
+
else if (v1 !== v0)
|
|
2017
|
+
val[k] = v1;
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
return reviver.call(obj, key, val);
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
// node_modules/yaml/browser/dist/nodes/toJS.js
|
|
2025
|
+
function toJS(value, arg, ctx) {
|
|
2026
|
+
if (Array.isArray(value))
|
|
2027
|
+
return value.map((v, i) => toJS(v, String(i), ctx));
|
|
2028
|
+
if (value && typeof value.toJSON === "function") {
|
|
2029
|
+
if (!ctx || !hasAnchor(value))
|
|
2030
|
+
return value.toJSON(arg, ctx);
|
|
2031
|
+
const data = { aliasCount: 0, count: 1, res: void 0 };
|
|
2032
|
+
ctx.anchors.set(value, data);
|
|
2033
|
+
ctx.onCreate = (res2) => {
|
|
2034
|
+
data.res = res2;
|
|
2035
|
+
delete ctx.onCreate;
|
|
2036
|
+
};
|
|
2037
|
+
const res = value.toJSON(arg, ctx);
|
|
2038
|
+
if (ctx.onCreate)
|
|
2039
|
+
ctx.onCreate(res);
|
|
2040
|
+
return res;
|
|
2041
|
+
}
|
|
2042
|
+
if (typeof value === "bigint" && !ctx?.keep)
|
|
2043
|
+
return Number(value);
|
|
2044
|
+
return value;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
// node_modules/yaml/browser/dist/nodes/Node.js
|
|
2048
|
+
var NodeBase = class {
|
|
2049
|
+
constructor(type) {
|
|
2050
|
+
Object.defineProperty(this, NODE_TYPE, { value: type });
|
|
2051
|
+
}
|
|
2052
|
+
/** Create a copy of this node. */
|
|
2053
|
+
clone() {
|
|
2054
|
+
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
2055
|
+
if (this.range)
|
|
2056
|
+
copy.range = this.range.slice();
|
|
2057
|
+
return copy;
|
|
2058
|
+
}
|
|
2059
|
+
/** A plain JavaScript representation of this node. */
|
|
2060
|
+
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
2061
|
+
if (!isDocument(doc))
|
|
2062
|
+
throw new TypeError("A document argument is required");
|
|
2063
|
+
const ctx = {
|
|
2064
|
+
anchors: /* @__PURE__ */ new Map(),
|
|
2065
|
+
doc,
|
|
2066
|
+
keep: true,
|
|
2067
|
+
mapAsMap: mapAsMap === true,
|
|
2068
|
+
mapKeyWarned: false,
|
|
2069
|
+
maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100
|
|
2070
|
+
};
|
|
2071
|
+
const res = toJS(this, "", ctx);
|
|
2072
|
+
if (typeof onAnchor === "function")
|
|
2073
|
+
for (const { count, res: res2 } of ctx.anchors.values())
|
|
2074
|
+
onAnchor(res2, count);
|
|
2075
|
+
return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res;
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
|
|
2079
|
+
// node_modules/yaml/browser/dist/nodes/Alias.js
|
|
2080
|
+
var Alias = class extends NodeBase {
|
|
2081
|
+
constructor(source) {
|
|
2082
|
+
super(ALIAS);
|
|
2083
|
+
this.source = source;
|
|
2084
|
+
Object.defineProperty(this, "tag", {
|
|
2085
|
+
set() {
|
|
2086
|
+
throw new Error("Alias nodes cannot have tags");
|
|
2087
|
+
}
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Resolve the value of this alias within `doc`, finding the last
|
|
2092
|
+
* instance of the `source` anchor before this node.
|
|
2093
|
+
*/
|
|
2094
|
+
resolve(doc, ctx) {
|
|
2095
|
+
if (ctx?.maxAliasCount === 0)
|
|
2096
|
+
throw new ReferenceError("Alias resolution is disabled");
|
|
2097
|
+
let nodes;
|
|
2098
|
+
if (ctx?.aliasResolveCache) {
|
|
2099
|
+
nodes = ctx.aliasResolveCache;
|
|
2100
|
+
} else {
|
|
2101
|
+
nodes = [];
|
|
2102
|
+
visit(doc, {
|
|
2103
|
+
Node: (_key, node) => {
|
|
2104
|
+
if (isAlias(node) || hasAnchor(node))
|
|
2105
|
+
nodes.push(node);
|
|
2106
|
+
}
|
|
2107
|
+
});
|
|
2108
|
+
if (ctx)
|
|
2109
|
+
ctx.aliasResolveCache = nodes;
|
|
2110
|
+
}
|
|
2111
|
+
let found = void 0;
|
|
2112
|
+
for (const node of nodes) {
|
|
2113
|
+
if (node === this)
|
|
2114
|
+
break;
|
|
2115
|
+
if (node.anchor === this.source)
|
|
2116
|
+
found = node;
|
|
2117
|
+
}
|
|
2118
|
+
if (found && ctx) {
|
|
2119
|
+
const { anchors, doc: doc2, maxAliasCount } = ctx;
|
|
2120
|
+
let data = anchors.get(found);
|
|
2121
|
+
if (!data) {
|
|
2122
|
+
toJS(found, null, ctx);
|
|
2123
|
+
data = anchors.get(found);
|
|
2124
|
+
}
|
|
2125
|
+
if (data?.res === void 0) {
|
|
2126
|
+
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
2127
|
+
throw new ReferenceError(msg);
|
|
2128
|
+
}
|
|
2129
|
+
if (maxAliasCount >= 0) {
|
|
2130
|
+
data.count += 1;
|
|
2131
|
+
if (data.aliasCount === 0)
|
|
2132
|
+
data.aliasCount = getAliasCount(doc2, found, anchors);
|
|
2133
|
+
if (data.count * data.aliasCount > maxAliasCount) {
|
|
2134
|
+
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
2135
|
+
throw new ReferenceError(msg);
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
return found;
|
|
2140
|
+
}
|
|
2141
|
+
toJSON(_arg, ctx) {
|
|
2142
|
+
if (!ctx)
|
|
2143
|
+
return { source: this.source };
|
|
2144
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
2145
|
+
if (!source) {
|
|
2146
|
+
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
2147
|
+
throw new ReferenceError(msg);
|
|
2148
|
+
}
|
|
2149
|
+
return ctx.anchors.get(source).res;
|
|
2150
|
+
}
|
|
2151
|
+
toString(ctx, _onComment, _onChompKeep) {
|
|
2152
|
+
const src = `*${this.source}`;
|
|
2153
|
+
if (ctx) {
|
|
2154
|
+
anchorIsValid(this.source);
|
|
2155
|
+
if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
|
|
2156
|
+
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
2157
|
+
throw new Error(msg);
|
|
2158
|
+
}
|
|
2159
|
+
if (ctx.implicitKey)
|
|
2160
|
+
return `${src} `;
|
|
2161
|
+
}
|
|
2162
|
+
return src;
|
|
2163
|
+
}
|
|
2164
|
+
};
|
|
2165
|
+
function getAliasCount(doc, node, anchors) {
|
|
2166
|
+
if (isAlias(node)) {
|
|
2167
|
+
const source = node.resolve(doc);
|
|
2168
|
+
const anchor = anchors && source && anchors.get(source);
|
|
2169
|
+
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
2170
|
+
} else if (isCollection(node)) {
|
|
2171
|
+
let count = 0;
|
|
2172
|
+
for (const item of node.items) {
|
|
2173
|
+
const c = getAliasCount(doc, item, anchors);
|
|
2174
|
+
if (c > count)
|
|
2175
|
+
count = c;
|
|
2176
|
+
}
|
|
2177
|
+
return count;
|
|
2178
|
+
} else if (isPair(node)) {
|
|
2179
|
+
const kc = getAliasCount(doc, node.key, anchors);
|
|
2180
|
+
const vc = getAliasCount(doc, node.value, anchors);
|
|
2181
|
+
return Math.max(kc, vc);
|
|
2182
|
+
}
|
|
2183
|
+
return 1;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
// node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
2187
|
+
var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
2188
|
+
var Scalar = class extends NodeBase {
|
|
2189
|
+
constructor(value) {
|
|
2190
|
+
super(SCALAR);
|
|
2191
|
+
this.value = value;
|
|
2192
|
+
}
|
|
2193
|
+
toJSON(arg, ctx) {
|
|
2194
|
+
return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
|
|
2195
|
+
}
|
|
2196
|
+
toString() {
|
|
2197
|
+
return String(this.value);
|
|
2198
|
+
}
|
|
2199
|
+
};
|
|
2200
|
+
Scalar.BLOCK_FOLDED = "BLOCK_FOLDED";
|
|
2201
|
+
Scalar.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
2202
|
+
Scalar.PLAIN = "PLAIN";
|
|
2203
|
+
Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
2204
|
+
Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
2205
|
+
|
|
2206
|
+
// node_modules/yaml/browser/dist/doc/createNode.js
|
|
2207
|
+
var defaultTagPrefix = "tag:yaml.org,2002:";
|
|
2208
|
+
function findTagObject(value, tagName, tags) {
|
|
2209
|
+
if (tagName) {
|
|
2210
|
+
const match = tags.filter((t) => t.tag === tagName);
|
|
2211
|
+
const tagObj = match.find((t) => !t.format) ?? match[0];
|
|
2212
|
+
if (!tagObj)
|
|
2213
|
+
throw new Error(`Tag ${tagName} not found`);
|
|
2214
|
+
return tagObj;
|
|
2215
|
+
}
|
|
2216
|
+
return tags.find((t) => t.identify?.(value) && !t.format);
|
|
2217
|
+
}
|
|
2218
|
+
function createNode(value, tagName, ctx) {
|
|
2219
|
+
if (isDocument(value))
|
|
2220
|
+
value = value.contents;
|
|
2221
|
+
if (isNode(value))
|
|
2222
|
+
return value;
|
|
2223
|
+
if (isPair(value)) {
|
|
2224
|
+
const map2 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
|
|
2225
|
+
map2.items.push(value);
|
|
2226
|
+
return map2;
|
|
2227
|
+
}
|
|
2228
|
+
if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
|
|
2229
|
+
value = value.valueOf();
|
|
2230
|
+
}
|
|
2231
|
+
const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema4, sourceObjects } = ctx;
|
|
2232
|
+
let ref = void 0;
|
|
2233
|
+
if (aliasDuplicateObjects && value && typeof value === "object") {
|
|
2234
|
+
ref = sourceObjects.get(value);
|
|
2235
|
+
if (ref) {
|
|
2236
|
+
ref.anchor ?? (ref.anchor = onAnchor(value));
|
|
2237
|
+
return new Alias(ref.anchor);
|
|
2238
|
+
} else {
|
|
2239
|
+
ref = { anchor: null, node: null };
|
|
2240
|
+
sourceObjects.set(value, ref);
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
if (tagName?.startsWith("!!"))
|
|
2244
|
+
tagName = defaultTagPrefix + tagName.slice(2);
|
|
2245
|
+
let tagObj = findTagObject(value, tagName, schema4.tags);
|
|
2246
|
+
if (!tagObj) {
|
|
2247
|
+
if (value && typeof value.toJSON === "function") {
|
|
2248
|
+
value = value.toJSON();
|
|
2249
|
+
}
|
|
2250
|
+
if (!value || typeof value !== "object") {
|
|
2251
|
+
const node2 = new Scalar(value);
|
|
2252
|
+
if (ref)
|
|
2253
|
+
ref.node = node2;
|
|
2254
|
+
return node2;
|
|
2255
|
+
}
|
|
2256
|
+
tagObj = value instanceof Map ? schema4[MAP] : Symbol.iterator in Object(value) ? schema4[SEQ] : schema4[MAP];
|
|
2257
|
+
}
|
|
2258
|
+
if (onTagObj) {
|
|
2259
|
+
onTagObj(tagObj);
|
|
2260
|
+
delete ctx.onTagObj;
|
|
2261
|
+
}
|
|
2262
|
+
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar(value);
|
|
2263
|
+
if (tagName)
|
|
2264
|
+
node.tag = tagName;
|
|
2265
|
+
else if (!tagObj.default)
|
|
2266
|
+
node.tag = tagObj.tag;
|
|
2267
|
+
if (ref)
|
|
2268
|
+
ref.node = node;
|
|
2269
|
+
return node;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
// node_modules/yaml/browser/dist/nodes/Collection.js
|
|
2273
|
+
function collectionFromPath(schema4, path, value) {
|
|
2274
|
+
let v = value;
|
|
2275
|
+
for (let i = path.length - 1; i >= 0; --i) {
|
|
2276
|
+
const k = path[i];
|
|
2277
|
+
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
2278
|
+
const a = [];
|
|
2279
|
+
a[k] = v;
|
|
2280
|
+
v = a;
|
|
2281
|
+
} else {
|
|
2282
|
+
v = /* @__PURE__ */ new Map([[k, v]]);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
return createNode(v, void 0, {
|
|
2286
|
+
aliasDuplicateObjects: false,
|
|
2287
|
+
keepUndefined: false,
|
|
2288
|
+
onAnchor: () => {
|
|
2289
|
+
throw new Error("This should not happen, please report a bug.");
|
|
2290
|
+
},
|
|
2291
|
+
schema: schema4,
|
|
2292
|
+
sourceObjects: /* @__PURE__ */ new Map()
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2295
|
+
var isEmptyPath = (path) => path == null || typeof path === "object" && !!path[Symbol.iterator]().next().done;
|
|
2296
|
+
var Collection = class extends NodeBase {
|
|
2297
|
+
constructor(type, schema4) {
|
|
2298
|
+
super(type);
|
|
2299
|
+
Object.defineProperty(this, "schema", {
|
|
2300
|
+
value: schema4,
|
|
2301
|
+
configurable: true,
|
|
2302
|
+
enumerable: false,
|
|
2303
|
+
writable: true
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
/**
|
|
2307
|
+
* Create a copy of this collection.
|
|
2308
|
+
*
|
|
2309
|
+
* @param schema - If defined, overwrites the original's schema
|
|
2310
|
+
*/
|
|
2311
|
+
clone(schema4) {
|
|
2312
|
+
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
2313
|
+
if (schema4)
|
|
2314
|
+
copy.schema = schema4;
|
|
2315
|
+
copy.items = copy.items.map((it) => isNode(it) || isPair(it) ? it.clone(schema4) : it);
|
|
2316
|
+
if (this.range)
|
|
2317
|
+
copy.range = this.range.slice();
|
|
2318
|
+
return copy;
|
|
2319
|
+
}
|
|
2320
|
+
/**
|
|
2321
|
+
* Adds a value to the collection. For `!!map` and `!!omap` the value must
|
|
2322
|
+
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
2323
|
+
* that already exists in the map.
|
|
2324
|
+
*/
|
|
2325
|
+
addIn(path, value) {
|
|
2326
|
+
if (isEmptyPath(path))
|
|
2327
|
+
this.add(value);
|
|
2328
|
+
else {
|
|
2329
|
+
const [key, ...rest] = path;
|
|
2330
|
+
const node = this.get(key, true);
|
|
2331
|
+
if (isCollection(node))
|
|
2332
|
+
node.addIn(rest, value);
|
|
2333
|
+
else if (node === void 0 && this.schema)
|
|
2334
|
+
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
2335
|
+
else
|
|
2336
|
+
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
/**
|
|
2340
|
+
* Removes a value from the collection.
|
|
2341
|
+
* @returns `true` if the item was found and removed.
|
|
2342
|
+
*/
|
|
2343
|
+
deleteIn(path) {
|
|
2344
|
+
const [key, ...rest] = path;
|
|
2345
|
+
if (rest.length === 0)
|
|
2346
|
+
return this.delete(key);
|
|
2347
|
+
const node = this.get(key, true);
|
|
2348
|
+
if (isCollection(node))
|
|
2349
|
+
return node.deleteIn(rest);
|
|
2350
|
+
else
|
|
2351
|
+
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
2355
|
+
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
2356
|
+
* `true` (collections are always returned intact).
|
|
2357
|
+
*/
|
|
2358
|
+
getIn(path, keepScalar) {
|
|
2359
|
+
const [key, ...rest] = path;
|
|
2360
|
+
const node = this.get(key, true);
|
|
2361
|
+
if (rest.length === 0)
|
|
2362
|
+
return !keepScalar && isScalar(node) ? node.value : node;
|
|
2363
|
+
else
|
|
2364
|
+
return isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
|
|
2365
|
+
}
|
|
2366
|
+
hasAllNullValues(allowScalar) {
|
|
2367
|
+
return this.items.every((node) => {
|
|
2368
|
+
if (!isPair(node))
|
|
2369
|
+
return false;
|
|
2370
|
+
const n = node.value;
|
|
2371
|
+
return n == null || allowScalar && isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2374
|
+
/**
|
|
2375
|
+
* Checks if the collection includes a value with the key `key`.
|
|
2376
|
+
*/
|
|
2377
|
+
hasIn(path) {
|
|
2378
|
+
const [key, ...rest] = path;
|
|
2379
|
+
if (rest.length === 0)
|
|
2380
|
+
return this.has(key);
|
|
2381
|
+
const node = this.get(key, true);
|
|
2382
|
+
return isCollection(node) ? node.hasIn(rest) : false;
|
|
2383
|
+
}
|
|
2384
|
+
/**
|
|
2385
|
+
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
2386
|
+
* boolean to add/remove the item from the set.
|
|
2387
|
+
*/
|
|
2388
|
+
setIn(path, value) {
|
|
2389
|
+
const [key, ...rest] = path;
|
|
2390
|
+
if (rest.length === 0) {
|
|
2391
|
+
this.set(key, value);
|
|
2392
|
+
} else {
|
|
2393
|
+
const node = this.get(key, true);
|
|
2394
|
+
if (isCollection(node))
|
|
2395
|
+
node.setIn(rest, value);
|
|
2396
|
+
else if (node === void 0 && this.schema)
|
|
2397
|
+
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
2398
|
+
else
|
|
2399
|
+
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
};
|
|
2403
|
+
|
|
2404
|
+
// node_modules/yaml/browser/dist/stringify/stringifyComment.js
|
|
2405
|
+
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
2406
|
+
function indentComment(comment, indent) {
|
|
2407
|
+
if (/^\n+$/.test(comment))
|
|
2408
|
+
return comment.substring(1);
|
|
2409
|
+
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
2410
|
+
}
|
|
2411
|
+
var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
|
|
2412
|
+
|
|
2413
|
+
// node_modules/yaml/browser/dist/stringify/foldFlowLines.js
|
|
2414
|
+
var FOLD_FLOW = "flow";
|
|
2415
|
+
var FOLD_BLOCK = "block";
|
|
2416
|
+
var FOLD_QUOTED = "quoted";
|
|
2417
|
+
function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
|
|
2418
|
+
if (!lineWidth || lineWidth < 0)
|
|
2419
|
+
return text;
|
|
2420
|
+
if (lineWidth < minContentWidth)
|
|
2421
|
+
minContentWidth = 0;
|
|
2422
|
+
const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
|
|
2423
|
+
if (text.length <= endStep)
|
|
2424
|
+
return text;
|
|
2425
|
+
const folds = [];
|
|
2426
|
+
const escapedFolds = {};
|
|
2427
|
+
let end = lineWidth - indent.length;
|
|
2428
|
+
if (typeof indentAtStart === "number") {
|
|
2429
|
+
if (indentAtStart > lineWidth - Math.max(2, minContentWidth))
|
|
2430
|
+
folds.push(0);
|
|
2431
|
+
else
|
|
2432
|
+
end = lineWidth - indentAtStart;
|
|
2433
|
+
}
|
|
2434
|
+
let split = void 0;
|
|
2435
|
+
let prev = void 0;
|
|
2436
|
+
let overflow = false;
|
|
2437
|
+
let i = -1;
|
|
2438
|
+
let escStart = -1;
|
|
2439
|
+
let escEnd = -1;
|
|
2440
|
+
if (mode === FOLD_BLOCK) {
|
|
2441
|
+
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
2442
|
+
if (i !== -1)
|
|
2443
|
+
end = i + endStep;
|
|
2444
|
+
}
|
|
2445
|
+
for (let ch; ch = text[i += 1]; ) {
|
|
2446
|
+
if (mode === FOLD_QUOTED && ch === "\\") {
|
|
2447
|
+
escStart = i;
|
|
2448
|
+
switch (text[i + 1]) {
|
|
2449
|
+
case "x":
|
|
2450
|
+
i += 3;
|
|
2451
|
+
break;
|
|
2452
|
+
case "u":
|
|
2453
|
+
i += 5;
|
|
2454
|
+
break;
|
|
2455
|
+
case "U":
|
|
2456
|
+
i += 9;
|
|
2457
|
+
break;
|
|
2458
|
+
default:
|
|
2459
|
+
i += 1;
|
|
2460
|
+
}
|
|
2461
|
+
escEnd = i;
|
|
2462
|
+
}
|
|
2463
|
+
if (ch === "\n") {
|
|
2464
|
+
if (mode === FOLD_BLOCK)
|
|
2465
|
+
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
2466
|
+
end = i + indent.length + endStep;
|
|
2467
|
+
split = void 0;
|
|
2468
|
+
} else {
|
|
2469
|
+
if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
|
|
2470
|
+
const next = text[i + 1];
|
|
2471
|
+
if (next && next !== " " && next !== "\n" && next !== " ")
|
|
2472
|
+
split = i;
|
|
2473
|
+
}
|
|
2474
|
+
if (i >= end) {
|
|
2475
|
+
if (split) {
|
|
2476
|
+
folds.push(split);
|
|
2477
|
+
end = split + endStep;
|
|
2478
|
+
split = void 0;
|
|
2479
|
+
} else if (mode === FOLD_QUOTED) {
|
|
2480
|
+
while (prev === " " || prev === " ") {
|
|
2481
|
+
prev = ch;
|
|
2482
|
+
ch = text[i += 1];
|
|
2483
|
+
overflow = true;
|
|
2484
|
+
}
|
|
2485
|
+
const j = i > escEnd + 1 ? i - 2 : escStart - 1;
|
|
2486
|
+
if (escapedFolds[j])
|
|
2487
|
+
return text;
|
|
2488
|
+
folds.push(j);
|
|
2489
|
+
escapedFolds[j] = true;
|
|
2490
|
+
end = j + endStep;
|
|
2491
|
+
split = void 0;
|
|
2492
|
+
} else {
|
|
2493
|
+
overflow = true;
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
prev = ch;
|
|
2498
|
+
}
|
|
2499
|
+
if (overflow && onOverflow)
|
|
2500
|
+
onOverflow();
|
|
2501
|
+
if (folds.length === 0)
|
|
2502
|
+
return text;
|
|
2503
|
+
if (onFold)
|
|
2504
|
+
onFold();
|
|
2505
|
+
let res = text.slice(0, folds[0]);
|
|
2506
|
+
for (let i2 = 0; i2 < folds.length; ++i2) {
|
|
2507
|
+
const fold = folds[i2];
|
|
2508
|
+
const end2 = folds[i2 + 1] || text.length;
|
|
2509
|
+
if (fold === 0)
|
|
2510
|
+
res = `
|
|
2511
|
+
${indent}${text.slice(0, end2)}`;
|
|
2512
|
+
else {
|
|
2513
|
+
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
2514
|
+
res += `${text[fold]}\\`;
|
|
2515
|
+
res += `
|
|
2516
|
+
${indent}${text.slice(fold + 1, end2)}`;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
return res;
|
|
2520
|
+
}
|
|
2521
|
+
function consumeMoreIndentedLines(text, i, indent) {
|
|
2522
|
+
let end = i;
|
|
2523
|
+
let start = i + 1;
|
|
2524
|
+
let ch = text[start];
|
|
2525
|
+
while (ch === " " || ch === " ") {
|
|
2526
|
+
if (i < start + indent) {
|
|
2527
|
+
ch = text[++i];
|
|
2528
|
+
} else {
|
|
2529
|
+
do {
|
|
2530
|
+
ch = text[++i];
|
|
2531
|
+
} while (ch && ch !== "\n");
|
|
2532
|
+
end = i;
|
|
2533
|
+
start = i + 1;
|
|
2534
|
+
ch = text[start];
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
return end;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
// node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
2541
|
+
var getFoldOptions = (ctx, isBlock) => ({
|
|
2542
|
+
indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
|
|
2543
|
+
lineWidth: ctx.options.lineWidth,
|
|
2544
|
+
minContentWidth: ctx.options.minContentWidth
|
|
2545
|
+
});
|
|
2546
|
+
var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str);
|
|
2547
|
+
function lineLengthOverLimit(str, lineWidth, indentLength) {
|
|
2548
|
+
if (!lineWidth || lineWidth < 0)
|
|
2549
|
+
return false;
|
|
2550
|
+
const limit = lineWidth - indentLength;
|
|
2551
|
+
const strLen = str.length;
|
|
2552
|
+
if (strLen <= limit)
|
|
2553
|
+
return false;
|
|
2554
|
+
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
2555
|
+
if (str[i] === "\n") {
|
|
2556
|
+
if (i - start > limit)
|
|
2557
|
+
return true;
|
|
2558
|
+
start = i + 1;
|
|
2559
|
+
if (strLen - start <= limit)
|
|
2560
|
+
return false;
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
return true;
|
|
2564
|
+
}
|
|
2565
|
+
function doubleQuotedString(value, ctx) {
|
|
2566
|
+
const json = JSON.stringify(value);
|
|
2567
|
+
if (ctx.options.doubleQuotedAsJSON)
|
|
2568
|
+
return json;
|
|
2569
|
+
const { implicitKey } = ctx;
|
|
2570
|
+
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
2571
|
+
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
2572
|
+
let str = "";
|
|
2573
|
+
let start = 0;
|
|
2574
|
+
for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
|
|
2575
|
+
if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
|
|
2576
|
+
str += json.slice(start, i) + "\\ ";
|
|
2577
|
+
i += 1;
|
|
2578
|
+
start = i;
|
|
2579
|
+
ch = "\\";
|
|
2580
|
+
}
|
|
2581
|
+
if (ch === "\\")
|
|
2582
|
+
switch (json[i + 1]) {
|
|
2583
|
+
case "u":
|
|
2584
|
+
{
|
|
2585
|
+
str += json.slice(start, i);
|
|
2586
|
+
const code = json.substr(i + 2, 4);
|
|
2587
|
+
switch (code) {
|
|
2588
|
+
case "0000":
|
|
2589
|
+
str += "\\0";
|
|
2590
|
+
break;
|
|
2591
|
+
case "0007":
|
|
2592
|
+
str += "\\a";
|
|
2593
|
+
break;
|
|
2594
|
+
case "000b":
|
|
2595
|
+
str += "\\v";
|
|
2596
|
+
break;
|
|
2597
|
+
case "001b":
|
|
2598
|
+
str += "\\e";
|
|
2599
|
+
break;
|
|
2600
|
+
case "0085":
|
|
2601
|
+
str += "\\N";
|
|
2602
|
+
break;
|
|
2603
|
+
case "00a0":
|
|
2604
|
+
str += "\\_";
|
|
2605
|
+
break;
|
|
2606
|
+
case "2028":
|
|
2607
|
+
str += "\\L";
|
|
2608
|
+
break;
|
|
2609
|
+
case "2029":
|
|
2610
|
+
str += "\\P";
|
|
2611
|
+
break;
|
|
2612
|
+
default:
|
|
2613
|
+
if (code.substr(0, 2) === "00")
|
|
2614
|
+
str += "\\x" + code.substr(2);
|
|
2615
|
+
else
|
|
2616
|
+
str += json.substr(i, 6);
|
|
2617
|
+
}
|
|
2618
|
+
i += 5;
|
|
2619
|
+
start = i + 1;
|
|
2620
|
+
}
|
|
2621
|
+
break;
|
|
2622
|
+
case "n":
|
|
2623
|
+
if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
|
|
2624
|
+
i += 1;
|
|
2625
|
+
} else {
|
|
2626
|
+
str += json.slice(start, i) + "\n\n";
|
|
2627
|
+
while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
|
|
2628
|
+
str += "\n";
|
|
2629
|
+
i += 2;
|
|
2630
|
+
}
|
|
2631
|
+
str += indent;
|
|
2632
|
+
if (json[i + 2] === " ")
|
|
2633
|
+
str += "\\";
|
|
2634
|
+
i += 1;
|
|
2635
|
+
start = i + 1;
|
|
2636
|
+
}
|
|
2637
|
+
break;
|
|
2638
|
+
default:
|
|
2639
|
+
i += 1;
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
str = start ? str + json.slice(start) : json;
|
|
2643
|
+
return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
2644
|
+
}
|
|
2645
|
+
function singleQuotedString(value, ctx) {
|
|
2646
|
+
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
2647
|
+
return doubleQuotedString(value, ctx);
|
|
2648
|
+
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
2649
|
+
const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
2650
|
+
${indent}`) + "'";
|
|
2651
|
+
return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
2652
|
+
}
|
|
2653
|
+
function quotedString(value, ctx) {
|
|
2654
|
+
const { singleQuote } = ctx.options;
|
|
2655
|
+
let qs;
|
|
2656
|
+
if (singleQuote === false)
|
|
2657
|
+
qs = doubleQuotedString;
|
|
2658
|
+
else {
|
|
2659
|
+
const hasDouble = value.includes('"');
|
|
2660
|
+
const hasSingle = value.includes("'");
|
|
2661
|
+
if (hasDouble && !hasSingle)
|
|
2662
|
+
qs = singleQuotedString;
|
|
2663
|
+
else if (hasSingle && !hasDouble)
|
|
2664
|
+
qs = doubleQuotedString;
|
|
2665
|
+
else
|
|
2666
|
+
qs = singleQuote ? singleQuotedString : doubleQuotedString;
|
|
2667
|
+
}
|
|
2668
|
+
return qs(value, ctx);
|
|
2669
|
+
}
|
|
2670
|
+
var blockEndNewlines;
|
|
2671
|
+
try {
|
|
2672
|
+
blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
|
|
2673
|
+
} catch {
|
|
2674
|
+
blockEndNewlines = /\n+(?!\n|$)/g;
|
|
2675
|
+
}
|
|
2676
|
+
function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
2677
|
+
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
2678
|
+
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
2679
|
+
return quotedString(value, ctx);
|
|
2680
|
+
}
|
|
2681
|
+
const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
|
|
2682
|
+
const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
|
|
2683
|
+
if (!value)
|
|
2684
|
+
return literal ? "|\n" : ">\n";
|
|
2685
|
+
let chomp;
|
|
2686
|
+
let endStart;
|
|
2687
|
+
for (endStart = value.length; endStart > 0; --endStart) {
|
|
2688
|
+
const ch = value[endStart - 1];
|
|
2689
|
+
if (ch !== "\n" && ch !== " " && ch !== " ")
|
|
2690
|
+
break;
|
|
2691
|
+
}
|
|
2692
|
+
let end = value.substring(endStart);
|
|
2693
|
+
const endNlPos = end.indexOf("\n");
|
|
2694
|
+
if (endNlPos === -1) {
|
|
2695
|
+
chomp = "-";
|
|
2696
|
+
} else if (value === end || endNlPos !== end.length - 1) {
|
|
2697
|
+
chomp = "+";
|
|
2698
|
+
if (onChompKeep)
|
|
2699
|
+
onChompKeep();
|
|
2700
|
+
} else {
|
|
2701
|
+
chomp = "";
|
|
2702
|
+
}
|
|
2703
|
+
if (end) {
|
|
2704
|
+
value = value.slice(0, -end.length);
|
|
2705
|
+
if (end[end.length - 1] === "\n")
|
|
2706
|
+
end = end.slice(0, -1);
|
|
2707
|
+
end = end.replace(blockEndNewlines, `$&${indent}`);
|
|
2708
|
+
}
|
|
2709
|
+
let startWithSpace = false;
|
|
2710
|
+
let startEnd;
|
|
2711
|
+
let startNlPos = -1;
|
|
2712
|
+
for (startEnd = 0; startEnd < value.length; ++startEnd) {
|
|
2713
|
+
const ch = value[startEnd];
|
|
2714
|
+
if (ch === " ")
|
|
2715
|
+
startWithSpace = true;
|
|
2716
|
+
else if (ch === "\n")
|
|
2717
|
+
startNlPos = startEnd;
|
|
2718
|
+
else
|
|
2719
|
+
break;
|
|
2720
|
+
}
|
|
2721
|
+
let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);
|
|
2722
|
+
if (start) {
|
|
2723
|
+
value = value.substring(start.length);
|
|
2724
|
+
start = start.replace(/\n+/g, `$&${indent}`);
|
|
2725
|
+
}
|
|
2726
|
+
const indentSize = indent ? "2" : "1";
|
|
2727
|
+
let header = (startWithSpace ? indentSize : "") + chomp;
|
|
2728
|
+
if (comment) {
|
|
2729
|
+
header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
|
|
2730
|
+
if (onComment)
|
|
2731
|
+
onComment();
|
|
2732
|
+
}
|
|
2733
|
+
if (!literal) {
|
|
2734
|
+
const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
|
|
2735
|
+
let literalFallback = false;
|
|
2736
|
+
const foldOptions = getFoldOptions(ctx, true);
|
|
2737
|
+
if (blockQuote !== "folded" && type !== Scalar.BLOCK_FOLDED) {
|
|
2738
|
+
foldOptions.onOverflow = () => {
|
|
2739
|
+
literalFallback = true;
|
|
2740
|
+
};
|
|
2741
|
+
}
|
|
2742
|
+
const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);
|
|
2743
|
+
if (!literalFallback)
|
|
2744
|
+
return `>${header}
|
|
2745
|
+
${indent}${body}`;
|
|
2746
|
+
}
|
|
2747
|
+
value = value.replace(/\n+/g, `$&${indent}`);
|
|
2748
|
+
return `|${header}
|
|
2749
|
+
${indent}${start}${value}${end}`;
|
|
2750
|
+
}
|
|
2751
|
+
function plainString(item, ctx, onComment, onChompKeep) {
|
|
2752
|
+
const { type, value } = item;
|
|
2753
|
+
const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
|
|
2754
|
+
if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) {
|
|
2755
|
+
return quotedString(value, ctx);
|
|
2756
|
+
}
|
|
2757
|
+
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
|
|
2758
|
+
return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
|
|
2759
|
+
}
|
|
2760
|
+
if (!implicitKey && !inFlow && type !== Scalar.PLAIN && value.includes("\n")) {
|
|
2761
|
+
return blockString(item, ctx, onComment, onChompKeep);
|
|
2762
|
+
}
|
|
2763
|
+
if (containsDocumentMarker(value)) {
|
|
2764
|
+
if (indent === "") {
|
|
2765
|
+
ctx.forceBlockIndent = true;
|
|
2766
|
+
return blockString(item, ctx, onComment, onChompKeep);
|
|
2767
|
+
} else if (implicitKey && indent === indentStep) {
|
|
2768
|
+
return quotedString(value, ctx);
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
const str = value.replace(/\n+/g, `$&
|
|
2772
|
+
${indent}`);
|
|
2773
|
+
if (actualString) {
|
|
2774
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str);
|
|
2775
|
+
const { compat, tags } = ctx.doc.schema;
|
|
2776
|
+
if (tags.some(test) || compat?.some(test))
|
|
2777
|
+
return quotedString(value, ctx);
|
|
2778
|
+
}
|
|
2779
|
+
return implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
2780
|
+
}
|
|
2781
|
+
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
2782
|
+
const { implicitKey, inFlow } = ctx;
|
|
2783
|
+
const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
|
|
2784
|
+
let { type } = item;
|
|
2785
|
+
if (type !== Scalar.QUOTE_DOUBLE) {
|
|
2786
|
+
if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
|
|
2787
|
+
type = Scalar.QUOTE_DOUBLE;
|
|
2788
|
+
}
|
|
2789
|
+
const _stringify = (_type) => {
|
|
2790
|
+
switch (_type) {
|
|
2791
|
+
case Scalar.BLOCK_FOLDED:
|
|
2792
|
+
case Scalar.BLOCK_LITERAL:
|
|
2793
|
+
return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
|
|
2794
|
+
case Scalar.QUOTE_DOUBLE:
|
|
2795
|
+
return doubleQuotedString(ss.value, ctx);
|
|
2796
|
+
case Scalar.QUOTE_SINGLE:
|
|
2797
|
+
return singleQuotedString(ss.value, ctx);
|
|
2798
|
+
case Scalar.PLAIN:
|
|
2799
|
+
return plainString(ss, ctx, onComment, onChompKeep);
|
|
2800
|
+
default:
|
|
2801
|
+
return null;
|
|
2802
|
+
}
|
|
2803
|
+
};
|
|
2804
|
+
let res = _stringify(type);
|
|
2805
|
+
if (res === null) {
|
|
2806
|
+
const { defaultKeyType, defaultStringType } = ctx.options;
|
|
2807
|
+
const t = implicitKey && defaultKeyType || defaultStringType;
|
|
2808
|
+
res = _stringify(t);
|
|
2809
|
+
if (res === null)
|
|
2810
|
+
throw new Error(`Unsupported default string type ${t}`);
|
|
2811
|
+
}
|
|
2812
|
+
return res;
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
// node_modules/yaml/browser/dist/stringify/stringify.js
|
|
2816
|
+
function createStringifyContext(doc, options) {
|
|
2817
|
+
const opt = Object.assign({
|
|
2818
|
+
blockQuote: true,
|
|
2819
|
+
commentString: stringifyComment,
|
|
2820
|
+
defaultKeyType: null,
|
|
2821
|
+
defaultStringType: "PLAIN",
|
|
2822
|
+
directives: null,
|
|
2823
|
+
doubleQuotedAsJSON: false,
|
|
2824
|
+
doubleQuotedMinMultiLineLength: 40,
|
|
2825
|
+
falseStr: "false",
|
|
2826
|
+
flowCollectionPadding: true,
|
|
2827
|
+
indentSeq: true,
|
|
2828
|
+
lineWidth: 80,
|
|
2829
|
+
minContentWidth: 20,
|
|
2830
|
+
nullStr: "null",
|
|
2831
|
+
simpleKeys: false,
|
|
2832
|
+
singleQuote: null,
|
|
2833
|
+
trailingComma: false,
|
|
2834
|
+
trueStr: "true",
|
|
2835
|
+
verifyAliasOrder: true
|
|
2836
|
+
}, doc.schema.toStringOptions, options);
|
|
2837
|
+
let inFlow;
|
|
2838
|
+
switch (opt.collectionStyle) {
|
|
2839
|
+
case "block":
|
|
2840
|
+
inFlow = false;
|
|
2841
|
+
break;
|
|
2842
|
+
case "flow":
|
|
2843
|
+
inFlow = true;
|
|
2844
|
+
break;
|
|
2845
|
+
default:
|
|
2846
|
+
inFlow = null;
|
|
2847
|
+
}
|
|
2848
|
+
return {
|
|
2849
|
+
anchors: /* @__PURE__ */ new Set(),
|
|
2850
|
+
doc,
|
|
2851
|
+
flowCollectionPadding: opt.flowCollectionPadding ? " " : "",
|
|
2852
|
+
indent: "",
|
|
2853
|
+
indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ",
|
|
2854
|
+
inFlow,
|
|
2855
|
+
options: opt
|
|
2856
|
+
};
|
|
2857
|
+
}
|
|
2858
|
+
function getTagObject(tags, item) {
|
|
2859
|
+
if (item.tag) {
|
|
2860
|
+
const match = tags.filter((t) => t.tag === item.tag);
|
|
2861
|
+
if (match.length > 0)
|
|
2862
|
+
return match.find((t) => t.format === item.format) ?? match[0];
|
|
2863
|
+
}
|
|
2864
|
+
let tagObj = void 0;
|
|
2865
|
+
let obj;
|
|
2866
|
+
if (isScalar(item)) {
|
|
2867
|
+
obj = item.value;
|
|
2868
|
+
let match = tags.filter((t) => t.identify?.(obj));
|
|
2869
|
+
if (match.length > 1) {
|
|
2870
|
+
const testMatch = match.filter((t) => t.test);
|
|
2871
|
+
if (testMatch.length > 0)
|
|
2872
|
+
match = testMatch;
|
|
2873
|
+
}
|
|
2874
|
+
tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);
|
|
2875
|
+
} else {
|
|
2876
|
+
obj = item;
|
|
2877
|
+
tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
|
|
2878
|
+
}
|
|
2879
|
+
if (!tagObj) {
|
|
2880
|
+
const name = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
|
|
2881
|
+
throw new Error(`Tag not resolved for ${name} value`);
|
|
2882
|
+
}
|
|
2883
|
+
return tagObj;
|
|
2884
|
+
}
|
|
2885
|
+
function stringifyProps(node, tagObj, { anchors, doc }) {
|
|
2886
|
+
if (!doc.directives)
|
|
2887
|
+
return "";
|
|
2888
|
+
const props = [];
|
|
2889
|
+
const anchor = (isScalar(node) || isCollection(node)) && node.anchor;
|
|
2890
|
+
if (anchor && anchorIsValid(anchor)) {
|
|
2891
|
+
anchors.add(anchor);
|
|
2892
|
+
props.push(`&${anchor}`);
|
|
2893
|
+
}
|
|
2894
|
+
const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
|
|
2895
|
+
if (tag)
|
|
2896
|
+
props.push(doc.directives.tagString(tag));
|
|
2897
|
+
return props.join(" ");
|
|
2898
|
+
}
|
|
2899
|
+
function stringify(item, ctx, onComment, onChompKeep) {
|
|
2900
|
+
if (isPair(item))
|
|
2901
|
+
return item.toString(ctx, onComment, onChompKeep);
|
|
2902
|
+
if (isAlias(item)) {
|
|
2903
|
+
if (ctx.doc.directives)
|
|
2904
|
+
return item.toString(ctx);
|
|
2905
|
+
if (ctx.resolvedAliases?.has(item)) {
|
|
2906
|
+
throw new TypeError(`Cannot stringify circular structure without alias nodes`);
|
|
2907
|
+
} else {
|
|
2908
|
+
if (ctx.resolvedAliases)
|
|
2909
|
+
ctx.resolvedAliases.add(item);
|
|
2910
|
+
else
|
|
2911
|
+
ctx.resolvedAliases = /* @__PURE__ */ new Set([item]);
|
|
2912
|
+
item = item.resolve(ctx.doc);
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
let tagObj = void 0;
|
|
2916
|
+
const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
2917
|
+
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
2918
|
+
const props = stringifyProps(node, tagObj, ctx);
|
|
2919
|
+
if (props.length > 0)
|
|
2920
|
+
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
2921
|
+
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
|
|
2922
|
+
if (!props)
|
|
2923
|
+
return str;
|
|
2924
|
+
return isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
|
|
2925
|
+
${ctx.indent}${str}`;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
// node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
2929
|
+
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
2930
|
+
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
2931
|
+
let keyComment = isNode(key) && key.comment || null;
|
|
2932
|
+
if (simpleKeys) {
|
|
2933
|
+
if (keyComment) {
|
|
2934
|
+
throw new Error("With simple keys, key nodes cannot have comments");
|
|
2935
|
+
}
|
|
2936
|
+
if (isCollection(key) || !isNode(key) && typeof key === "object") {
|
|
2937
|
+
const msg = "With simple keys, collection cannot be used as a key value";
|
|
2938
|
+
throw new Error(msg);
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || isCollection(key) || (isScalar(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object"));
|
|
2942
|
+
ctx = Object.assign({}, ctx, {
|
|
2943
|
+
allNullValues: false,
|
|
2944
|
+
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
2945
|
+
indent: indent + indentStep
|
|
2946
|
+
});
|
|
2947
|
+
let keyCommentDone = false;
|
|
2948
|
+
let chompKeep = false;
|
|
2949
|
+
let str = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
2950
|
+
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
2951
|
+
if (simpleKeys)
|
|
2952
|
+
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
2953
|
+
explicitKey = true;
|
|
2954
|
+
}
|
|
2955
|
+
if (ctx.inFlow) {
|
|
2956
|
+
if (allNullValues || value == null) {
|
|
2957
|
+
if (keyCommentDone && onComment)
|
|
2958
|
+
onComment();
|
|
2959
|
+
return str === "" ? "?" : explicitKey ? `? ${str}` : str;
|
|
2960
|
+
}
|
|
2961
|
+
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
2962
|
+
str = `? ${str}`;
|
|
2963
|
+
if (keyComment && !keyCommentDone) {
|
|
2964
|
+
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
2965
|
+
} else if (chompKeep && onChompKeep)
|
|
2966
|
+
onChompKeep();
|
|
2967
|
+
return str;
|
|
2968
|
+
}
|
|
2969
|
+
if (keyCommentDone)
|
|
2970
|
+
keyComment = null;
|
|
2971
|
+
if (explicitKey) {
|
|
2972
|
+
if (keyComment)
|
|
2973
|
+
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
2974
|
+
str = `? ${str}
|
|
2975
|
+
${indent}:`;
|
|
2976
|
+
} else {
|
|
2977
|
+
str = `${str}:`;
|
|
2978
|
+
if (keyComment)
|
|
2979
|
+
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
2980
|
+
}
|
|
2981
|
+
let vsb, vcb, valueComment;
|
|
2982
|
+
if (isNode(value)) {
|
|
2983
|
+
vsb = !!value.spaceBefore;
|
|
2984
|
+
vcb = value.commentBefore;
|
|
2985
|
+
valueComment = value.comment;
|
|
2986
|
+
} else {
|
|
2987
|
+
vsb = false;
|
|
2988
|
+
vcb = null;
|
|
2989
|
+
valueComment = null;
|
|
2990
|
+
if (value && typeof value === "object")
|
|
2991
|
+
value = doc.createNode(value);
|
|
2992
|
+
}
|
|
2993
|
+
ctx.implicitKey = false;
|
|
2994
|
+
if (!explicitKey && !keyComment && isScalar(value))
|
|
2995
|
+
ctx.indentAtStart = str.length + 1;
|
|
2996
|
+
chompKeep = false;
|
|
2997
|
+
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
2998
|
+
ctx.indent = ctx.indent.substring(2);
|
|
2999
|
+
}
|
|
3000
|
+
let valueCommentDone = false;
|
|
3001
|
+
const valueStr = stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
|
|
3002
|
+
let ws = " ";
|
|
3003
|
+
if (keyComment || vsb || vcb) {
|
|
3004
|
+
ws = vsb ? "\n" : "";
|
|
3005
|
+
if (vcb) {
|
|
3006
|
+
const cs = commentString(vcb);
|
|
3007
|
+
ws += `
|
|
3008
|
+
${indentComment(cs, ctx.indent)}`;
|
|
3009
|
+
}
|
|
3010
|
+
if (valueStr === "" && !ctx.inFlow) {
|
|
3011
|
+
if (ws === "\n" && valueComment)
|
|
3012
|
+
ws = "\n\n";
|
|
3013
|
+
} else {
|
|
3014
|
+
ws += `
|
|
3015
|
+
${ctx.indent}`;
|
|
3016
|
+
}
|
|
3017
|
+
} else if (!explicitKey && isCollection(value)) {
|
|
3018
|
+
const vs0 = valueStr[0];
|
|
3019
|
+
const nl0 = valueStr.indexOf("\n");
|
|
3020
|
+
const hasNewline = nl0 !== -1;
|
|
3021
|
+
const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;
|
|
3022
|
+
if (hasNewline || !flow) {
|
|
3023
|
+
let hasPropsLine = false;
|
|
3024
|
+
if (hasNewline && (vs0 === "&" || vs0 === "!")) {
|
|
3025
|
+
let sp0 = valueStr.indexOf(" ");
|
|
3026
|
+
if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") {
|
|
3027
|
+
sp0 = valueStr.indexOf(" ", sp0 + 1);
|
|
3028
|
+
}
|
|
3029
|
+
if (sp0 === -1 || nl0 < sp0)
|
|
3030
|
+
hasPropsLine = true;
|
|
3031
|
+
}
|
|
3032
|
+
if (!hasPropsLine)
|
|
3033
|
+
ws = `
|
|
3034
|
+
${ctx.indent}`;
|
|
3035
|
+
}
|
|
3036
|
+
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
3037
|
+
ws = "";
|
|
3038
|
+
}
|
|
3039
|
+
str += ws + valueStr;
|
|
3040
|
+
if (ctx.inFlow) {
|
|
3041
|
+
if (valueCommentDone && onComment)
|
|
3042
|
+
onComment();
|
|
3043
|
+
} else if (valueComment && !valueCommentDone) {
|
|
3044
|
+
str += lineComment(str, ctx.indent, commentString(valueComment));
|
|
3045
|
+
} else if (chompKeep && onChompKeep) {
|
|
3046
|
+
onChompKeep();
|
|
3047
|
+
}
|
|
3048
|
+
return str;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
// node_modules/yaml/browser/dist/log.js
|
|
3052
|
+
function warn(logLevel, warning) {
|
|
3053
|
+
if (logLevel === "debug" || logLevel === "warn") {
|
|
3054
|
+
console.warn(warning);
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
|
|
3059
|
+
var MERGE_KEY = "<<";
|
|
3060
|
+
var merge = {
|
|
3061
|
+
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
3062
|
+
default: "key",
|
|
3063
|
+
tag: "tag:yaml.org,2002:merge",
|
|
3064
|
+
test: /^<<$/,
|
|
3065
|
+
resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {
|
|
3066
|
+
addToJSMap: addMergeToJSMap
|
|
3067
|
+
}),
|
|
3068
|
+
stringify: () => MERGE_KEY
|
|
3069
|
+
};
|
|
3070
|
+
var isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
3071
|
+
function addMergeToJSMap(ctx, map2, value) {
|
|
3072
|
+
const source = resolveAliasValue(ctx, value);
|
|
3073
|
+
if (isSeq(source))
|
|
3074
|
+
for (const it of source.items)
|
|
3075
|
+
mergeValue(ctx, map2, it);
|
|
3076
|
+
else if (Array.isArray(source))
|
|
3077
|
+
for (const it of source)
|
|
3078
|
+
mergeValue(ctx, map2, it);
|
|
3079
|
+
else
|
|
3080
|
+
mergeValue(ctx, map2, source);
|
|
3081
|
+
}
|
|
3082
|
+
function mergeValue(ctx, map2, value) {
|
|
3083
|
+
const source = resolveAliasValue(ctx, value);
|
|
3084
|
+
if (!isMap(source))
|
|
3085
|
+
throw new Error("Merge sources must be maps or map aliases");
|
|
3086
|
+
const srcMap = source.toJSON(null, ctx, Map);
|
|
3087
|
+
for (const [key, value2] of srcMap) {
|
|
3088
|
+
if (map2 instanceof Map) {
|
|
3089
|
+
if (!map2.has(key))
|
|
3090
|
+
map2.set(key, value2);
|
|
3091
|
+
} else if (map2 instanceof Set) {
|
|
3092
|
+
map2.add(key);
|
|
3093
|
+
} else if (!Object.prototype.hasOwnProperty.call(map2, key)) {
|
|
3094
|
+
Object.defineProperty(map2, key, {
|
|
3095
|
+
value: value2,
|
|
3096
|
+
writable: true,
|
|
3097
|
+
enumerable: true,
|
|
3098
|
+
configurable: true
|
|
3099
|
+
});
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
return map2;
|
|
3103
|
+
}
|
|
3104
|
+
function resolveAliasValue(ctx, value) {
|
|
3105
|
+
return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
// node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
3109
|
+
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
3110
|
+
if (isNode(key) && key.addToJSMap)
|
|
3111
|
+
key.addToJSMap(ctx, map2, value);
|
|
3112
|
+
else if (isMergeKey(ctx, key))
|
|
3113
|
+
addMergeToJSMap(ctx, map2, value);
|
|
3114
|
+
else {
|
|
3115
|
+
const jsKey = toJS(key, "", ctx);
|
|
3116
|
+
if (map2 instanceof Map) {
|
|
3117
|
+
map2.set(jsKey, toJS(value, jsKey, ctx));
|
|
3118
|
+
} else if (map2 instanceof Set) {
|
|
3119
|
+
map2.add(jsKey);
|
|
3120
|
+
} else {
|
|
3121
|
+
const stringKey = stringifyKey(key, jsKey, ctx);
|
|
3122
|
+
const jsValue = toJS(value, stringKey, ctx);
|
|
3123
|
+
if (stringKey in map2)
|
|
3124
|
+
Object.defineProperty(map2, stringKey, {
|
|
3125
|
+
value: jsValue,
|
|
3126
|
+
writable: true,
|
|
3127
|
+
enumerable: true,
|
|
3128
|
+
configurable: true
|
|
3129
|
+
});
|
|
3130
|
+
else
|
|
3131
|
+
map2[stringKey] = jsValue;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
return map2;
|
|
3135
|
+
}
|
|
3136
|
+
function stringifyKey(key, jsKey, ctx) {
|
|
3137
|
+
if (jsKey === null)
|
|
3138
|
+
return "";
|
|
3139
|
+
if (typeof jsKey !== "object")
|
|
3140
|
+
return String(jsKey);
|
|
3141
|
+
if (isNode(key) && ctx?.doc) {
|
|
3142
|
+
const strCtx = createStringifyContext(ctx.doc, {});
|
|
3143
|
+
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
3144
|
+
for (const node of ctx.anchors.keys())
|
|
3145
|
+
strCtx.anchors.add(node.anchor);
|
|
3146
|
+
strCtx.inFlow = true;
|
|
3147
|
+
strCtx.inStringifyKey = true;
|
|
3148
|
+
const strKey = key.toString(strCtx);
|
|
3149
|
+
if (!ctx.mapKeyWarned) {
|
|
3150
|
+
let jsonStr = JSON.stringify(strKey);
|
|
3151
|
+
if (jsonStr.length > 40)
|
|
3152
|
+
jsonStr = jsonStr.substring(0, 36) + '..."';
|
|
3153
|
+
warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
|
|
3154
|
+
ctx.mapKeyWarned = true;
|
|
3155
|
+
}
|
|
3156
|
+
return strKey;
|
|
3157
|
+
}
|
|
3158
|
+
return JSON.stringify(jsKey);
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
// node_modules/yaml/browser/dist/nodes/Pair.js
|
|
3162
|
+
function createPair(key, value, ctx) {
|
|
3163
|
+
const k = createNode(key, void 0, ctx);
|
|
3164
|
+
const v = createNode(value, void 0, ctx);
|
|
3165
|
+
return new Pair(k, v);
|
|
3166
|
+
}
|
|
3167
|
+
var Pair = class _Pair {
|
|
3168
|
+
constructor(key, value = null) {
|
|
3169
|
+
Object.defineProperty(this, NODE_TYPE, { value: PAIR });
|
|
3170
|
+
this.key = key;
|
|
3171
|
+
this.value = value;
|
|
3172
|
+
}
|
|
3173
|
+
clone(schema4) {
|
|
3174
|
+
let { key, value } = this;
|
|
3175
|
+
if (isNode(key))
|
|
3176
|
+
key = key.clone(schema4);
|
|
3177
|
+
if (isNode(value))
|
|
3178
|
+
value = value.clone(schema4);
|
|
3179
|
+
return new _Pair(key, value);
|
|
3180
|
+
}
|
|
3181
|
+
toJSON(_, ctx) {
|
|
3182
|
+
const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
3183
|
+
return addPairToJSMap(ctx, pair, this);
|
|
3184
|
+
}
|
|
3185
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3186
|
+
return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);
|
|
3187
|
+
}
|
|
3188
|
+
};
|
|
3189
|
+
|
|
3190
|
+
// node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
3191
|
+
function stringifyCollection(collection, ctx, options) {
|
|
3192
|
+
const flow = ctx.inFlow ?? collection.flow;
|
|
3193
|
+
const stringify4 = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
3194
|
+
return stringify4(collection, ctx, options);
|
|
3195
|
+
}
|
|
3196
|
+
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
3197
|
+
const { indent, options: { commentString } } = ctx;
|
|
3198
|
+
const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
|
|
3199
|
+
let chompKeep = false;
|
|
3200
|
+
const lines = [];
|
|
3201
|
+
for (let i = 0; i < items.length; ++i) {
|
|
3202
|
+
const item = items[i];
|
|
3203
|
+
let comment2 = null;
|
|
3204
|
+
if (isNode(item)) {
|
|
3205
|
+
if (!chompKeep && item.spaceBefore)
|
|
3206
|
+
lines.push("");
|
|
3207
|
+
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
3208
|
+
if (item.comment)
|
|
3209
|
+
comment2 = item.comment;
|
|
3210
|
+
} else if (isPair(item)) {
|
|
3211
|
+
const ik = isNode(item.key) ? item.key : null;
|
|
3212
|
+
if (ik) {
|
|
3213
|
+
if (!chompKeep && ik.spaceBefore)
|
|
3214
|
+
lines.push("");
|
|
3215
|
+
addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
chompKeep = false;
|
|
3219
|
+
let str2 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
3220
|
+
if (comment2)
|
|
3221
|
+
str2 += lineComment(str2, itemIndent, commentString(comment2));
|
|
3222
|
+
if (chompKeep && comment2)
|
|
3223
|
+
chompKeep = false;
|
|
3224
|
+
lines.push(blockItemPrefix + str2);
|
|
3225
|
+
}
|
|
3226
|
+
let str;
|
|
3227
|
+
if (lines.length === 0) {
|
|
3228
|
+
str = flowChars.start + flowChars.end;
|
|
3229
|
+
} else {
|
|
3230
|
+
str = lines[0];
|
|
3231
|
+
for (let i = 1; i < lines.length; ++i) {
|
|
3232
|
+
const line = lines[i];
|
|
3233
|
+
str += line ? `
|
|
3234
|
+
${indent}${line}` : "\n";
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
if (comment) {
|
|
3238
|
+
str += "\n" + indentComment(commentString(comment), indent);
|
|
3239
|
+
if (onComment)
|
|
3240
|
+
onComment();
|
|
3241
|
+
} else if (chompKeep && onChompKeep)
|
|
3242
|
+
onChompKeep();
|
|
3243
|
+
return str;
|
|
3244
|
+
}
|
|
3245
|
+
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
3246
|
+
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
3247
|
+
itemIndent += indentStep;
|
|
3248
|
+
const itemCtx = Object.assign({}, ctx, {
|
|
3249
|
+
indent: itemIndent,
|
|
3250
|
+
inFlow: true,
|
|
3251
|
+
type: null
|
|
3252
|
+
});
|
|
3253
|
+
let reqNewline = false;
|
|
3254
|
+
let linesAtValue = 0;
|
|
3255
|
+
const lines = [];
|
|
3256
|
+
for (let i = 0; i < items.length; ++i) {
|
|
3257
|
+
const item = items[i];
|
|
3258
|
+
let comment = null;
|
|
3259
|
+
if (isNode(item)) {
|
|
3260
|
+
if (item.spaceBefore)
|
|
3261
|
+
lines.push("");
|
|
3262
|
+
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
3263
|
+
if (item.comment)
|
|
3264
|
+
comment = item.comment;
|
|
3265
|
+
} else if (isPair(item)) {
|
|
3266
|
+
const ik = isNode(item.key) ? item.key : null;
|
|
3267
|
+
if (ik) {
|
|
3268
|
+
if (ik.spaceBefore)
|
|
3269
|
+
lines.push("");
|
|
3270
|
+
addCommentBefore(ctx, lines, ik.commentBefore, false);
|
|
3271
|
+
if (ik.comment)
|
|
3272
|
+
reqNewline = true;
|
|
3273
|
+
}
|
|
3274
|
+
const iv = isNode(item.value) ? item.value : null;
|
|
3275
|
+
if (iv) {
|
|
3276
|
+
if (iv.comment)
|
|
3277
|
+
comment = iv.comment;
|
|
3278
|
+
if (iv.commentBefore)
|
|
3279
|
+
reqNewline = true;
|
|
3280
|
+
} else if (item.value == null && ik?.comment) {
|
|
3281
|
+
comment = ik.comment;
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
if (comment)
|
|
3285
|
+
reqNewline = true;
|
|
3286
|
+
let str = stringify(item, itemCtx, () => comment = null);
|
|
3287
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
|
|
3288
|
+
if (i < items.length - 1) {
|
|
3289
|
+
str += ",";
|
|
3290
|
+
} else if (ctx.options.trailingComma) {
|
|
3291
|
+
if (ctx.options.lineWidth > 0) {
|
|
3292
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
3293
|
+
}
|
|
3294
|
+
if (reqNewline) {
|
|
3295
|
+
str += ",";
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
if (comment)
|
|
3299
|
+
str += lineComment(str, itemIndent, commentString(comment));
|
|
3300
|
+
lines.push(str);
|
|
3301
|
+
linesAtValue = lines.length;
|
|
3302
|
+
}
|
|
3303
|
+
const { start, end } = flowChars;
|
|
3304
|
+
if (lines.length === 0) {
|
|
3305
|
+
return start + end;
|
|
3306
|
+
} else {
|
|
3307
|
+
if (!reqNewline) {
|
|
3308
|
+
const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
|
|
3309
|
+
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
3310
|
+
}
|
|
3311
|
+
if (reqNewline) {
|
|
3312
|
+
let str = start;
|
|
3313
|
+
for (const line of lines)
|
|
3314
|
+
str += line ? `
|
|
3315
|
+
${indentStep}${indent}${line}` : "\n";
|
|
3316
|
+
return `${str}
|
|
3317
|
+
${indent}${end}`;
|
|
3318
|
+
} else {
|
|
3319
|
+
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
|
3324
|
+
if (comment && chompKeep)
|
|
3325
|
+
comment = comment.replace(/^\n+/, "");
|
|
3326
|
+
if (comment) {
|
|
3327
|
+
const ic = indentComment(commentString(comment), indent);
|
|
3328
|
+
lines.push(ic.trimStart());
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
// node_modules/yaml/browser/dist/nodes/YAMLMap.js
|
|
3333
|
+
function findPair(items, key) {
|
|
3334
|
+
const k = isScalar(key) ? key.value : key;
|
|
3335
|
+
for (const it of items) {
|
|
3336
|
+
if (isPair(it)) {
|
|
3337
|
+
if (it.key === key || it.key === k)
|
|
3338
|
+
return it;
|
|
3339
|
+
if (isScalar(it.key) && it.key.value === k)
|
|
3340
|
+
return it;
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
return void 0;
|
|
3344
|
+
}
|
|
3345
|
+
var YAMLMap = class extends Collection {
|
|
3346
|
+
static get tagName() {
|
|
3347
|
+
return "tag:yaml.org,2002:map";
|
|
3348
|
+
}
|
|
3349
|
+
constructor(schema4) {
|
|
3350
|
+
super(MAP, schema4);
|
|
3351
|
+
this.items = [];
|
|
3352
|
+
}
|
|
3353
|
+
/**
|
|
3354
|
+
* A generic collection parsing method that can be extended
|
|
3355
|
+
* to other node classes that inherit from YAMLMap
|
|
3356
|
+
*/
|
|
3357
|
+
static from(schema4, obj, ctx) {
|
|
3358
|
+
const { keepUndefined, replacer } = ctx;
|
|
3359
|
+
const map2 = new this(schema4);
|
|
3360
|
+
const add = (key, value) => {
|
|
3361
|
+
if (typeof replacer === "function")
|
|
3362
|
+
value = replacer.call(obj, key, value);
|
|
3363
|
+
else if (Array.isArray(replacer) && !replacer.includes(key))
|
|
3364
|
+
return;
|
|
3365
|
+
if (value !== void 0 || keepUndefined)
|
|
3366
|
+
map2.items.push(createPair(key, value, ctx));
|
|
3367
|
+
};
|
|
3368
|
+
if (obj instanceof Map) {
|
|
3369
|
+
for (const [key, value] of obj)
|
|
3370
|
+
add(key, value);
|
|
3371
|
+
} else if (obj && typeof obj === "object") {
|
|
3372
|
+
for (const key of Object.keys(obj))
|
|
3373
|
+
add(key, obj[key]);
|
|
3374
|
+
}
|
|
3375
|
+
if (typeof schema4.sortMapEntries === "function") {
|
|
3376
|
+
map2.items.sort(schema4.sortMapEntries);
|
|
3377
|
+
}
|
|
3378
|
+
return map2;
|
|
3379
|
+
}
|
|
3380
|
+
/**
|
|
3381
|
+
* Adds a value to the collection.
|
|
3382
|
+
*
|
|
3383
|
+
* @param overwrite - If not set `true`, using a key that is already in the
|
|
3384
|
+
* collection will throw. Otherwise, overwrites the previous value.
|
|
3385
|
+
*/
|
|
3386
|
+
add(pair, overwrite) {
|
|
3387
|
+
let _pair;
|
|
3388
|
+
if (isPair(pair))
|
|
3389
|
+
_pair = pair;
|
|
3390
|
+
else if (!pair || typeof pair !== "object" || !("key" in pair)) {
|
|
3391
|
+
_pair = new Pair(pair, pair?.value);
|
|
3392
|
+
} else
|
|
3393
|
+
_pair = new Pair(pair.key, pair.value);
|
|
3394
|
+
const prev = findPair(this.items, _pair.key);
|
|
3395
|
+
const sortEntries = this.schema?.sortMapEntries;
|
|
3396
|
+
if (prev) {
|
|
3397
|
+
if (!overwrite)
|
|
3398
|
+
throw new Error(`Key ${_pair.key} already set`);
|
|
3399
|
+
if (isScalar(prev.value) && isScalarValue(_pair.value))
|
|
3400
|
+
prev.value.value = _pair.value;
|
|
3401
|
+
else
|
|
3402
|
+
prev.value = _pair.value;
|
|
3403
|
+
} else if (sortEntries) {
|
|
3404
|
+
const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0);
|
|
3405
|
+
if (i === -1)
|
|
3406
|
+
this.items.push(_pair);
|
|
3407
|
+
else
|
|
3408
|
+
this.items.splice(i, 0, _pair);
|
|
3409
|
+
} else {
|
|
3410
|
+
this.items.push(_pair);
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
delete(key) {
|
|
3414
|
+
const it = findPair(this.items, key);
|
|
3415
|
+
if (!it)
|
|
3416
|
+
return false;
|
|
3417
|
+
const del = this.items.splice(this.items.indexOf(it), 1);
|
|
3418
|
+
return del.length > 0;
|
|
3419
|
+
}
|
|
3420
|
+
get(key, keepScalar) {
|
|
3421
|
+
const it = findPair(this.items, key);
|
|
3422
|
+
const node = it?.value;
|
|
3423
|
+
return (!keepScalar && isScalar(node) ? node.value : node) ?? void 0;
|
|
3424
|
+
}
|
|
3425
|
+
has(key) {
|
|
3426
|
+
return !!findPair(this.items, key);
|
|
3427
|
+
}
|
|
3428
|
+
set(key, value) {
|
|
3429
|
+
this.add(new Pair(key, value), true);
|
|
3430
|
+
}
|
|
3431
|
+
/**
|
|
3432
|
+
* @param ctx - Conversion context, originally set in Document#toJS()
|
|
3433
|
+
* @param {Class} Type - If set, forces the returned collection type
|
|
3434
|
+
* @returns Instance of Type, Map, or Object
|
|
3435
|
+
*/
|
|
3436
|
+
toJSON(_, ctx, Type) {
|
|
3437
|
+
const map2 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
3438
|
+
if (ctx?.onCreate)
|
|
3439
|
+
ctx.onCreate(map2);
|
|
3440
|
+
for (const item of this.items)
|
|
3441
|
+
addPairToJSMap(ctx, map2, item);
|
|
3442
|
+
return map2;
|
|
3443
|
+
}
|
|
3444
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3445
|
+
if (!ctx)
|
|
3446
|
+
return JSON.stringify(this);
|
|
3447
|
+
for (const item of this.items) {
|
|
3448
|
+
if (!isPair(item))
|
|
3449
|
+
throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
|
|
3450
|
+
}
|
|
3451
|
+
if (!ctx.allNullValues && this.hasAllNullValues(false))
|
|
3452
|
+
ctx = Object.assign({}, ctx, { allNullValues: true });
|
|
3453
|
+
return stringifyCollection(this, ctx, {
|
|
3454
|
+
blockItemPrefix: "",
|
|
3455
|
+
flowChars: { start: "{", end: "}" },
|
|
3456
|
+
itemIndent: ctx.indent || "",
|
|
3457
|
+
onChompKeep,
|
|
3458
|
+
onComment
|
|
3459
|
+
});
|
|
3460
|
+
}
|
|
3461
|
+
};
|
|
3462
|
+
|
|
3463
|
+
// node_modules/yaml/browser/dist/schema/common/map.js
|
|
3464
|
+
var map = {
|
|
3465
|
+
collection: "map",
|
|
3466
|
+
default: true,
|
|
3467
|
+
nodeClass: YAMLMap,
|
|
3468
|
+
tag: "tag:yaml.org,2002:map",
|
|
3469
|
+
resolve(map2, onError) {
|
|
3470
|
+
if (!isMap(map2))
|
|
3471
|
+
onError("Expected a mapping for this tag");
|
|
3472
|
+
return map2;
|
|
3473
|
+
},
|
|
3474
|
+
createNode: (schema4, obj, ctx) => YAMLMap.from(schema4, obj, ctx)
|
|
3475
|
+
};
|
|
3476
|
+
|
|
3477
|
+
// node_modules/yaml/browser/dist/nodes/YAMLSeq.js
|
|
3478
|
+
var YAMLSeq = class extends Collection {
|
|
3479
|
+
static get tagName() {
|
|
3480
|
+
return "tag:yaml.org,2002:seq";
|
|
3481
|
+
}
|
|
3482
|
+
constructor(schema4) {
|
|
3483
|
+
super(SEQ, schema4);
|
|
3484
|
+
this.items = [];
|
|
3485
|
+
}
|
|
3486
|
+
add(value) {
|
|
3487
|
+
this.items.push(value);
|
|
3488
|
+
}
|
|
3489
|
+
/**
|
|
3490
|
+
* Removes a value from the collection.
|
|
3491
|
+
*
|
|
3492
|
+
* `key` must contain a representation of an integer for this to succeed.
|
|
3493
|
+
* It may be wrapped in a `Scalar`.
|
|
3494
|
+
*
|
|
3495
|
+
* @returns `true` if the item was found and removed.
|
|
3496
|
+
*/
|
|
3497
|
+
delete(key) {
|
|
3498
|
+
const idx = asItemIndex(key);
|
|
3499
|
+
if (typeof idx !== "number")
|
|
3500
|
+
return false;
|
|
3501
|
+
const del = this.items.splice(idx, 1);
|
|
3502
|
+
return del.length > 0;
|
|
3503
|
+
}
|
|
3504
|
+
get(key, keepScalar) {
|
|
3505
|
+
const idx = asItemIndex(key);
|
|
3506
|
+
if (typeof idx !== "number")
|
|
3507
|
+
return void 0;
|
|
3508
|
+
const it = this.items[idx];
|
|
3509
|
+
return !keepScalar && isScalar(it) ? it.value : it;
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* Checks if the collection includes a value with the key `key`.
|
|
3513
|
+
*
|
|
3514
|
+
* `key` must contain a representation of an integer for this to succeed.
|
|
3515
|
+
* It may be wrapped in a `Scalar`.
|
|
3516
|
+
*/
|
|
3517
|
+
has(key) {
|
|
3518
|
+
const idx = asItemIndex(key);
|
|
3519
|
+
return typeof idx === "number" && idx < this.items.length;
|
|
3520
|
+
}
|
|
3521
|
+
/**
|
|
3522
|
+
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
3523
|
+
* boolean to add/remove the item from the set.
|
|
3524
|
+
*
|
|
3525
|
+
* If `key` does not contain a representation of an integer, this will throw.
|
|
3526
|
+
* It may be wrapped in a `Scalar`.
|
|
3527
|
+
*/
|
|
3528
|
+
set(key, value) {
|
|
3529
|
+
const idx = asItemIndex(key);
|
|
3530
|
+
if (typeof idx !== "number")
|
|
3531
|
+
throw new Error(`Expected a valid index, not ${key}.`);
|
|
3532
|
+
const prev = this.items[idx];
|
|
3533
|
+
if (isScalar(prev) && isScalarValue(value))
|
|
3534
|
+
prev.value = value;
|
|
3535
|
+
else
|
|
3536
|
+
this.items[idx] = value;
|
|
3537
|
+
}
|
|
3538
|
+
toJSON(_, ctx) {
|
|
3539
|
+
const seq2 = [];
|
|
3540
|
+
if (ctx?.onCreate)
|
|
3541
|
+
ctx.onCreate(seq2);
|
|
3542
|
+
let i = 0;
|
|
3543
|
+
for (const item of this.items)
|
|
3544
|
+
seq2.push(toJS(item, String(i++), ctx));
|
|
3545
|
+
return seq2;
|
|
3546
|
+
}
|
|
3547
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3548
|
+
if (!ctx)
|
|
3549
|
+
return JSON.stringify(this);
|
|
3550
|
+
return stringifyCollection(this, ctx, {
|
|
3551
|
+
blockItemPrefix: "- ",
|
|
3552
|
+
flowChars: { start: "[", end: "]" },
|
|
3553
|
+
itemIndent: (ctx.indent || "") + " ",
|
|
3554
|
+
onChompKeep,
|
|
3555
|
+
onComment
|
|
3556
|
+
});
|
|
3557
|
+
}
|
|
3558
|
+
static from(schema4, obj, ctx) {
|
|
3559
|
+
const { replacer } = ctx;
|
|
3560
|
+
const seq2 = new this(schema4);
|
|
3561
|
+
if (obj && Symbol.iterator in Object(obj)) {
|
|
3562
|
+
let i = 0;
|
|
3563
|
+
for (let it of obj) {
|
|
3564
|
+
if (typeof replacer === "function") {
|
|
3565
|
+
const key = obj instanceof Set ? it : String(i++);
|
|
3566
|
+
it = replacer.call(obj, key, it);
|
|
3567
|
+
}
|
|
3568
|
+
seq2.items.push(createNode(it, void 0, ctx));
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3571
|
+
return seq2;
|
|
3572
|
+
}
|
|
3573
|
+
};
|
|
3574
|
+
function asItemIndex(key) {
|
|
3575
|
+
let idx = isScalar(key) ? key.value : key;
|
|
3576
|
+
if (idx && typeof idx === "string")
|
|
3577
|
+
idx = Number(idx);
|
|
3578
|
+
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
// node_modules/yaml/browser/dist/schema/common/seq.js
|
|
3582
|
+
var seq = {
|
|
3583
|
+
collection: "seq",
|
|
3584
|
+
default: true,
|
|
3585
|
+
nodeClass: YAMLSeq,
|
|
3586
|
+
tag: "tag:yaml.org,2002:seq",
|
|
3587
|
+
resolve(seq2, onError) {
|
|
3588
|
+
if (!isSeq(seq2))
|
|
3589
|
+
onError("Expected a sequence for this tag");
|
|
3590
|
+
return seq2;
|
|
3591
|
+
},
|
|
3592
|
+
createNode: (schema4, obj, ctx) => YAMLSeq.from(schema4, obj, ctx)
|
|
3593
|
+
};
|
|
3594
|
+
|
|
3595
|
+
// node_modules/yaml/browser/dist/schema/json/schema.js
|
|
3596
|
+
function intIdentify(value) {
|
|
3597
|
+
return typeof value === "bigint" || Number.isInteger(value);
|
|
3598
|
+
}
|
|
3599
|
+
var stringifyJSON = ({ value }) => JSON.stringify(value);
|
|
3600
|
+
var jsonScalars = [
|
|
3601
|
+
{
|
|
3602
|
+
identify: (value) => typeof value === "string",
|
|
3603
|
+
default: true,
|
|
3604
|
+
tag: "tag:yaml.org,2002:str",
|
|
3605
|
+
resolve: (str) => str,
|
|
3606
|
+
stringify: stringifyJSON
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
identify: (value) => value == null,
|
|
3610
|
+
createNode: () => new Scalar(null),
|
|
3611
|
+
default: true,
|
|
3612
|
+
tag: "tag:yaml.org,2002:null",
|
|
3613
|
+
test: /^null$/,
|
|
3614
|
+
resolve: () => null,
|
|
3615
|
+
stringify: stringifyJSON
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
identify: (value) => typeof value === "boolean",
|
|
3619
|
+
default: true,
|
|
3620
|
+
tag: "tag:yaml.org,2002:bool",
|
|
3621
|
+
test: /^true$|^false$/,
|
|
3622
|
+
resolve: (str) => str === "true",
|
|
3623
|
+
stringify: stringifyJSON
|
|
3624
|
+
},
|
|
3625
|
+
{
|
|
3626
|
+
identify: intIdentify,
|
|
3627
|
+
default: true,
|
|
3628
|
+
tag: "tag:yaml.org,2002:int",
|
|
3629
|
+
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
3630
|
+
resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),
|
|
3631
|
+
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
identify: (value) => typeof value === "number",
|
|
3635
|
+
default: true,
|
|
3636
|
+
tag: "tag:yaml.org,2002:float",
|
|
3637
|
+
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
3638
|
+
resolve: (str) => parseFloat(str),
|
|
3639
|
+
stringify: stringifyJSON
|
|
3640
|
+
}
|
|
3641
|
+
];
|
|
3642
|
+
var jsonError = {
|
|
3643
|
+
default: true,
|
|
3644
|
+
tag: "",
|
|
3645
|
+
test: /^/,
|
|
3646
|
+
resolve(str, onError) {
|
|
3647
|
+
onError(`Unresolved plain scalar ${JSON.stringify(str)}`);
|
|
3648
|
+
return str;
|
|
3649
|
+
}
|
|
3650
|
+
};
|
|
3651
|
+
var schema = [map, seq].concat(jsonScalars, jsonError);
|
|
3652
|
+
|
|
3653
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
3654
|
+
function createPairs(schema4, iterable, ctx) {
|
|
3655
|
+
const { replacer } = ctx;
|
|
3656
|
+
const pairs2 = new YAMLSeq(schema4);
|
|
3657
|
+
pairs2.tag = "tag:yaml.org,2002:pairs";
|
|
3658
|
+
let i = 0;
|
|
3659
|
+
if (iterable && Symbol.iterator in Object(iterable))
|
|
3660
|
+
for (let it of iterable) {
|
|
3661
|
+
if (typeof replacer === "function")
|
|
3662
|
+
it = replacer.call(iterable, String(i++), it);
|
|
3663
|
+
let key, value;
|
|
3664
|
+
if (Array.isArray(it)) {
|
|
3665
|
+
if (it.length === 2) {
|
|
3666
|
+
key = it[0];
|
|
3667
|
+
value = it[1];
|
|
3668
|
+
} else
|
|
3669
|
+
throw new TypeError(`Expected [key, value] tuple: ${it}`);
|
|
3670
|
+
} else if (it && it instanceof Object) {
|
|
3671
|
+
const keys = Object.keys(it);
|
|
3672
|
+
if (keys.length === 1) {
|
|
3673
|
+
key = keys[0];
|
|
3674
|
+
value = it[key];
|
|
3675
|
+
} else {
|
|
3676
|
+
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
3677
|
+
}
|
|
3678
|
+
} else {
|
|
3679
|
+
key = it;
|
|
3680
|
+
}
|
|
3681
|
+
pairs2.items.push(createPair(key, value, ctx));
|
|
3682
|
+
}
|
|
3683
|
+
return pairs2;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
|
|
3687
|
+
var YAMLOMap = class _YAMLOMap extends YAMLSeq {
|
|
3688
|
+
constructor() {
|
|
3689
|
+
super();
|
|
3690
|
+
this.add = YAMLMap.prototype.add.bind(this);
|
|
3691
|
+
this.delete = YAMLMap.prototype.delete.bind(this);
|
|
3692
|
+
this.get = YAMLMap.prototype.get.bind(this);
|
|
3693
|
+
this.has = YAMLMap.prototype.has.bind(this);
|
|
3694
|
+
this.set = YAMLMap.prototype.set.bind(this);
|
|
3695
|
+
this.tag = _YAMLOMap.tag;
|
|
3696
|
+
}
|
|
3697
|
+
/**
|
|
3698
|
+
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
|
|
3699
|
+
* but TypeScript won't allow widening the signature of a child method.
|
|
3700
|
+
*/
|
|
3701
|
+
toJSON(_, ctx) {
|
|
3702
|
+
if (!ctx)
|
|
3703
|
+
return super.toJSON(_);
|
|
3704
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
3705
|
+
if (ctx?.onCreate)
|
|
3706
|
+
ctx.onCreate(map2);
|
|
3707
|
+
for (const pair of this.items) {
|
|
3708
|
+
let key, value;
|
|
3709
|
+
if (isPair(pair)) {
|
|
3710
|
+
key = toJS(pair.key, "", ctx);
|
|
3711
|
+
value = toJS(pair.value, key, ctx);
|
|
3712
|
+
} else {
|
|
3713
|
+
key = toJS(pair, "", ctx);
|
|
3714
|
+
}
|
|
3715
|
+
if (map2.has(key))
|
|
3716
|
+
throw new Error("Ordered maps must not include duplicate keys");
|
|
3717
|
+
map2.set(key, value);
|
|
3718
|
+
}
|
|
3719
|
+
return map2;
|
|
3720
|
+
}
|
|
3721
|
+
static from(schema4, iterable, ctx) {
|
|
3722
|
+
const pairs2 = createPairs(schema4, iterable, ctx);
|
|
3723
|
+
const omap2 = new this();
|
|
3724
|
+
omap2.items = pairs2.items;
|
|
3725
|
+
return omap2;
|
|
3726
|
+
}
|
|
3727
|
+
};
|
|
3728
|
+
YAMLOMap.tag = "tag:yaml.org,2002:omap";
|
|
3729
|
+
|
|
3730
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
|
|
3731
|
+
var YAMLSet = class _YAMLSet extends YAMLMap {
|
|
3732
|
+
constructor(schema4) {
|
|
3733
|
+
super(schema4);
|
|
3734
|
+
this.tag = _YAMLSet.tag;
|
|
3735
|
+
}
|
|
3736
|
+
add(key) {
|
|
3737
|
+
let pair;
|
|
3738
|
+
if (isPair(key))
|
|
3739
|
+
pair = key;
|
|
3740
|
+
else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
|
|
3741
|
+
pair = new Pair(key.key, null);
|
|
3742
|
+
else
|
|
3743
|
+
pair = new Pair(key, null);
|
|
3744
|
+
const prev = findPair(this.items, pair.key);
|
|
3745
|
+
if (!prev)
|
|
3746
|
+
this.items.push(pair);
|
|
3747
|
+
}
|
|
3748
|
+
/**
|
|
3749
|
+
* If `keepPair` is `true`, returns the Pair matching `key`.
|
|
3750
|
+
* Otherwise, returns the value of that Pair's key.
|
|
3751
|
+
*/
|
|
3752
|
+
get(key, keepPair) {
|
|
3753
|
+
const pair = findPair(this.items, key);
|
|
3754
|
+
return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
3755
|
+
}
|
|
3756
|
+
set(key, value) {
|
|
3757
|
+
if (typeof value !== "boolean")
|
|
3758
|
+
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
|
|
3759
|
+
const prev = findPair(this.items, key);
|
|
3760
|
+
if (prev && !value) {
|
|
3761
|
+
this.items.splice(this.items.indexOf(prev), 1);
|
|
3762
|
+
} else if (!prev && value) {
|
|
3763
|
+
this.items.push(new Pair(key));
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
toJSON(_, ctx) {
|
|
3767
|
+
return super.toJSON(_, ctx, Set);
|
|
3768
|
+
}
|
|
3769
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3770
|
+
if (!ctx)
|
|
3771
|
+
return JSON.stringify(this);
|
|
3772
|
+
if (this.hasAllNullValues(true))
|
|
3773
|
+
return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
|
|
3774
|
+
else
|
|
3775
|
+
throw new Error("Set items must all have null values");
|
|
3776
|
+
}
|
|
3777
|
+
static from(schema4, iterable, ctx) {
|
|
3778
|
+
const { replacer } = ctx;
|
|
3779
|
+
const set2 = new this(schema4);
|
|
3780
|
+
if (iterable && Symbol.iterator in Object(iterable))
|
|
3781
|
+
for (let value of iterable) {
|
|
3782
|
+
if (typeof replacer === "function")
|
|
3783
|
+
value = replacer.call(iterable, value, value);
|
|
3784
|
+
set2.items.push(createPair(value, null, ctx));
|
|
3785
|
+
}
|
|
3786
|
+
return set2;
|
|
3787
|
+
}
|
|
3788
|
+
};
|
|
3789
|
+
YAMLSet.tag = "tag:yaml.org,2002:set";
|
|
3790
|
+
|
|
3791
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
3792
|
+
function parseSexagesimal(str, asBigInt) {
|
|
3793
|
+
const sign = str[0];
|
|
3794
|
+
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
3795
|
+
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
3796
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
3797
|
+
return sign === "-" ? num(-1) * res : res;
|
|
3798
|
+
}
|
|
3799
|
+
var timestamp = {
|
|
3800
|
+
identify: (value) => value instanceof Date,
|
|
3801
|
+
default: true,
|
|
3802
|
+
tag: "tag:yaml.org,2002:timestamp",
|
|
3803
|
+
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
|
|
3804
|
+
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
3805
|
+
// assumed to be 00:00:00Z (start of day, UTC).
|
|
3806
|
+
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
3807
|
+
resolve(str) {
|
|
3808
|
+
const match = str.match(timestamp.test);
|
|
3809
|
+
if (!match)
|
|
3810
|
+
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
3811
|
+
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
3812
|
+
const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0;
|
|
3813
|
+
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
|
|
3814
|
+
const tz = match[8];
|
|
3815
|
+
if (tz && tz !== "Z") {
|
|
3816
|
+
let d = parseSexagesimal(tz, false);
|
|
3817
|
+
if (Math.abs(d) < 30)
|
|
3818
|
+
d *= 60;
|
|
3819
|
+
date -= 6e4 * d;
|
|
3820
|
+
}
|
|
3821
|
+
return new Date(date);
|
|
3822
|
+
},
|
|
3823
|
+
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
3824
|
+
};
|
|
3825
|
+
|
|
3826
|
+
// node_modules/yaml/browser/dist/parse/cst-visit.js
|
|
3827
|
+
var BREAK2 = Symbol("break visit");
|
|
3828
|
+
var SKIP2 = Symbol("skip children");
|
|
3829
|
+
var REMOVE2 = Symbol("remove item");
|
|
3830
|
+
function visit2(cst, visitor) {
|
|
3831
|
+
if ("type" in cst && cst.type === "document")
|
|
3832
|
+
cst = { start: cst.start, value: cst.value };
|
|
3833
|
+
_visit(Object.freeze([]), cst, visitor);
|
|
3834
|
+
}
|
|
3835
|
+
visit2.BREAK = BREAK2;
|
|
3836
|
+
visit2.SKIP = SKIP2;
|
|
3837
|
+
visit2.REMOVE = REMOVE2;
|
|
3838
|
+
visit2.itemAtPath = (cst, path) => {
|
|
3839
|
+
let item = cst;
|
|
3840
|
+
for (const [field, index] of path) {
|
|
3841
|
+
const tok = item?.[field];
|
|
3842
|
+
if (tok && "items" in tok) {
|
|
3843
|
+
item = tok.items[index];
|
|
3844
|
+
} else
|
|
3845
|
+
return void 0;
|
|
3846
|
+
}
|
|
3847
|
+
return item;
|
|
3848
|
+
};
|
|
3849
|
+
visit2.parentCollection = (cst, path) => {
|
|
3850
|
+
const parent = visit2.itemAtPath(cst, path.slice(0, -1));
|
|
3851
|
+
const field = path[path.length - 1][0];
|
|
3852
|
+
const coll = parent?.[field];
|
|
3853
|
+
if (coll && "items" in coll)
|
|
3854
|
+
return coll;
|
|
3855
|
+
throw new Error("Parent collection not found");
|
|
3856
|
+
};
|
|
3857
|
+
function _visit(path, item, visitor) {
|
|
3858
|
+
let ctrl = visitor(item, path);
|
|
3859
|
+
if (typeof ctrl === "symbol")
|
|
3860
|
+
return ctrl;
|
|
3861
|
+
for (const field of ["key", "value"]) {
|
|
3862
|
+
const token = item[field];
|
|
3863
|
+
if (token && "items" in token) {
|
|
3864
|
+
for (let i = 0; i < token.items.length; ++i) {
|
|
3865
|
+
const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
|
|
3866
|
+
if (typeof ci === "number")
|
|
3867
|
+
i = ci - 1;
|
|
3868
|
+
else if (ci === BREAK2)
|
|
3869
|
+
return BREAK2;
|
|
3870
|
+
else if (ci === REMOVE2) {
|
|
3871
|
+
token.items.splice(i, 1);
|
|
3872
|
+
i -= 1;
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
if (typeof ctrl === "function" && field === "key")
|
|
3876
|
+
ctrl = ctrl(item, path);
|
|
3877
|
+
}
|
|
3878
|
+
}
|
|
3879
|
+
return typeof ctrl === "function" ? ctrl(item, path) : ctrl;
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
// node_modules/yaml/browser/dist/parse/lexer.js
|
|
3883
|
+
var hexDigits = new Set("0123456789ABCDEFabcdef");
|
|
3884
|
+
var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
3885
|
+
var flowIndicatorChars = new Set(",[]{}");
|
|
3886
|
+
var invalidAnchorChars = new Set(" ,[]{}\n\r ");
|
|
3887
|
+
|
|
3888
|
+
// src/rules.ts
|
|
3889
|
+
var KNOWN_RULES = Object.freeze([
|
|
3890
|
+
"R1-gate0-missing",
|
|
3891
|
+
"R2-large-amount-no-g0",
|
|
3892
|
+
"R3-g0-passed-no-plan",
|
|
3893
|
+
"R4-criteria-count",
|
|
3894
|
+
"R5-scenarios-count",
|
|
3895
|
+
"R6-risks-overflow",
|
|
3896
|
+
"R7-g2-not-ready",
|
|
3897
|
+
"R8-progress-no-evidence",
|
|
3898
|
+
"R9-evidence-no-recognition",
|
|
3899
|
+
"R10-g3-1-without-g3-2",
|
|
3900
|
+
"R11-no-next-milestone",
|
|
3901
|
+
"R12-stage-stalled",
|
|
3902
|
+
"R13-scenario-no-evidence",
|
|
3903
|
+
"R14-scenario-awaiting-customer",
|
|
3904
|
+
"R15-criteria-unverified",
|
|
3905
|
+
"R16-scenario-not-started"
|
|
3906
|
+
]);
|
|
3907
|
+
var FALLBACK_THRESHOLDS = Object.freeze({
|
|
3908
|
+
largeAmountWan: 300,
|
|
3909
|
+
criteria: { min: 2, max: 3 },
|
|
3910
|
+
scenarios: { min: 3, max: 5 },
|
|
3911
|
+
risks: { max: 3 },
|
|
3912
|
+
stallDays: 45
|
|
3913
|
+
});
|
|
3914
|
+
var FALLBACK_PRIORITY = Object.freeze({
|
|
3915
|
+
strategicWan: 1e3,
|
|
3916
|
+
highWan: 300,
|
|
3917
|
+
strategicPocTypes: ["\u5927\u4F53\u91CF\u9879\u76EE"]
|
|
3918
|
+
});
|
|
3919
|
+
var FALLBACK_RULE_META = Object.freeze({
|
|
3920
|
+
R1: { id: "R1", name: "G0 \u4E94\u5FC5\u586B\u7F3A\u5931", level: "high", priority: 90, guard: null },
|
|
3921
|
+
R2: { id: "R2", name: "\u5927\u91D1\u989D\u672A\u8FC7 G0", level: "high", priority: 94, guard: null },
|
|
3922
|
+
R3: { id: "R3", name: "G0 \u901A\u8FC7\u65E0\u8BA1\u5212", level: "high", priority: 92, guard: null },
|
|
3923
|
+
R4: { id: "R4", name: "\u6210\u529F\u6807\u51C6\u4E0D\u805A\u7126", level: "medium", priority: 50, guard: null },
|
|
3924
|
+
R5: { id: "R5", name: "\u573A\u666F\u4E0D\u805A\u7126", level: "medium", priority: 48, guard: null },
|
|
3925
|
+
R6: { id: "R6", name: "\u98CE\u9669\u8D85\u9650", level: "medium", priority: 46, guard: null },
|
|
3926
|
+
R7: { id: "R7", name: "G2 \u672A\u5C31\u7EEA\u5DF2\u5F00\u6D4B", level: "high", priority: 84, guard: null },
|
|
3927
|
+
R8: { id: "R8", name: "\u8FDB\u5C55\u65E0\u8BC1\u636E", level: "high", priority: 82, guard: null },
|
|
3928
|
+
R9: { id: "R9", name: "\u6709\u8BC1\u636E\u65E0\u8BA4\u53EF", level: "high", priority: 80, guard: null },
|
|
3929
|
+
R10: { id: "R10", name: "G3-1 \u65E0 G3-2", level: "high", priority: 78, guard: null },
|
|
3930
|
+
R11: { id: "R11", name: "\u8FBE\u6210\u65E0\u4E0B\u4E00\u6B65", level: "high", priority: 96, guard: null },
|
|
3931
|
+
R12: { id: "R12", name: "\u9636\u6BB5\u505C\u6EDE", level: "medium", priority: 40, guard: null },
|
|
3932
|
+
R13: { id: "R13", name: "\u573A\u666F\u65E0\u8BC1\u636E", level: "high", priority: 88, guard: "requires-progress" },
|
|
3933
|
+
R14: { id: "R14", name: "\u573A\u666F\u5F85\u5BA2\u6237\u786E\u8BA4", level: "info", priority: 30, guard: null },
|
|
3934
|
+
R15: { id: "R15", name: "\u6307\u6807\u672A\u9A8C\u8BC1", level: "medium", priority: 44, guard: "criteria-count-in-range" },
|
|
3935
|
+
R16: { id: "R16", name: "\u573A\u666F\u672A\u5F00\u59CB", level: "medium", priority: 42, guard: "scenarios-count-in-range-and-progress" }
|
|
3936
|
+
});
|
|
3937
|
+
|
|
1554
3938
|
// src/gap.ts
|
|
1555
3939
|
var RULE_META = {
|
|
1556
3940
|
// R1: the G0 floor. Nothing downstream is trustworthy without it.
|
|
@@ -1573,7 +3957,14 @@ window.__ModuleLoader__.load({
|
|
|
1573
3957
|
// original design documented: value was created and none of it was banked.
|
|
1574
3958
|
"R11-no-next-milestone": { no: 11, level: "high", priority: 96 },
|
|
1575
3959
|
// R12: the project has not moved.
|
|
1576
|
-
"R12-stage-stalled": { no: 12, level: "medium", priority: 40 }
|
|
3960
|
+
"R12-stage-stalled": { no: 12, level: "medium", priority: 40 },
|
|
3961
|
+
// R13–R16: the plan is the right shape but the work has not moved. A scenario
|
|
3962
|
+
// with no evidence behind it is the state-level twin of R8, per item instead
|
|
3963
|
+
// of per entry.
|
|
3964
|
+
"R13-scenario-no-evidence": { no: 13, level: "high", priority: 88 },
|
|
3965
|
+
"R14-scenario-awaiting-customer": { no: 14, level: "info", priority: 30 },
|
|
3966
|
+
"R15-criteria-unverified": { no: 15, level: "medium", priority: 44 },
|
|
3967
|
+
"R16-scenario-not-started": { no: 16, level: "medium", priority: 42 }
|
|
1577
3968
|
};
|
|
1578
3969
|
|
|
1579
3970
|
// src/client/blockers.tsx
|
|
@@ -1614,6 +4005,11 @@ window.__ModuleLoader__.load({
|
|
|
1614
4005
|
const meta = RULE_META[row.rule];
|
|
1615
4006
|
return `R${meta.no} ${format(t(`gap.${row.rule}.title`), { ...row.params })}`;
|
|
1616
4007
|
}
|
|
4008
|
+
function levelRank(level) {
|
|
4009
|
+
if (level === "high") return 3;
|
|
4010
|
+
if (level === "medium") return 2;
|
|
4011
|
+
return 1;
|
|
4012
|
+
}
|
|
1617
4013
|
function groupByProject(rows) {
|
|
1618
4014
|
const groups = /* @__PURE__ */ new Map();
|
|
1619
4015
|
for (const row of rows) {
|
|
@@ -1629,7 +4025,7 @@ window.__ModuleLoader__.load({
|
|
|
1629
4025
|
continue;
|
|
1630
4026
|
}
|
|
1631
4027
|
existing.rows.push(row);
|
|
1632
|
-
if (row.level
|
|
4028
|
+
if (levelRank(row.level) > levelRank(existing.level)) existing.level = row.level;
|
|
1633
4029
|
}
|
|
1634
4030
|
return [...groups.values()];
|
|
1635
4031
|
}
|
|
@@ -1707,13 +4103,16 @@ window.__ModuleLoader__.load({
|
|
|
1707
4103
|
const items = (0, import_react.useMemo)(() => {
|
|
1708
4104
|
const next = [];
|
|
1709
4105
|
const missing = detail.gate0.checklist.filter((item) => !item.present);
|
|
1710
|
-
for (const item of missing) {
|
|
4106
|
+
for (const [index, item] of missing.entries()) {
|
|
1711
4107
|
const label = t(G0_WORK_LABEL[item.field] ?? item.field);
|
|
1712
4108
|
next.push({
|
|
1713
4109
|
key: `g0:${item.field}`,
|
|
1714
4110
|
label: format(t("worklistG0Field"), { field: label }),
|
|
1715
|
-
|
|
1716
|
-
|
|
4111
|
+
// The count is a fact about the group, not about this row: repeating it
|
|
4112
|
+
// on all five lines turned the most actionable block on the page into a
|
|
4113
|
+
// wall of identical sentences. It is said once, on the first row.
|
|
4114
|
+
copy: index === 0 ? t("worklistG0Intro", { count: String(missing.length) }) : "",
|
|
4115
|
+
action: index === 0 ? t("worklistG0Hint") : ""
|
|
1717
4116
|
});
|
|
1718
4117
|
}
|
|
1719
4118
|
const has = (source) => (rows ?? []).some((row) => row.source === source);
|
|
@@ -1806,6 +4205,46 @@ window.__ModuleLoader__.load({
|
|
|
1806
4205
|
if (level === "low") return "green";
|
|
1807
4206
|
return "slate";
|
|
1808
4207
|
}
|
|
4208
|
+
function priorityLabelKey(priority) {
|
|
4209
|
+
if (priority === "strategic") return "priorityStrategic";
|
|
4210
|
+
if (priority === "high") return "priorityHigh";
|
|
4211
|
+
if (priority === "normal") return "priorityNormal";
|
|
4212
|
+
return "priorityUnknown";
|
|
4213
|
+
}
|
|
4214
|
+
function scenarioNameOf(detail, id) {
|
|
4215
|
+
const found = detail.plan.scenarios.find((item) => item.id === id);
|
|
4216
|
+
return found === void 0 ? "" : found.name;
|
|
4217
|
+
}
|
|
4218
|
+
function scenarioTone(status) {
|
|
4219
|
+
if (status === "\u5DF2\u8BC1\u660E") return "green";
|
|
4220
|
+
if (status === "\u5F85\u5BA2\u6237\u786E\u8BA4") return "amber";
|
|
4221
|
+
if (status === "\u65E0\u8BC1\u636E") return "red";
|
|
4222
|
+
return "slate";
|
|
4223
|
+
}
|
|
4224
|
+
function scenarioGlyph(status) {
|
|
4225
|
+
if (status === "\u5DF2\u8BC1\u660E") return "\u25CF";
|
|
4226
|
+
if (status === "\u5F85\u5BA2\u6237\u786E\u8BA4") return "\u25D0";
|
|
4227
|
+
if (status === "\u65E0\u8BC1\u636E") return "\u25CB";
|
|
4228
|
+
return "\u2014";
|
|
4229
|
+
}
|
|
4230
|
+
function criterionTone(status) {
|
|
4231
|
+
if (status === "\u5DF2\u8FBE\u6210") return "green";
|
|
4232
|
+
if (status === "\u90E8\u5206\u8FBE\u6210") return "amber";
|
|
4233
|
+
if (status === "\u672A\u8FBE\u6210") return "red";
|
|
4234
|
+
return "slate";
|
|
4235
|
+
}
|
|
4236
|
+
var SCENARIO_STATUS_KEY = {
|
|
4237
|
+
\u5DF2\u8BC1\u660E: "Proven",
|
|
4238
|
+
\u5F85\u5BA2\u6237\u786E\u8BA4: "Awaiting",
|
|
4239
|
+
\u65E0\u8BC1\u636E: "NoEvidence",
|
|
4240
|
+
\u672A\u5F00\u59CB: "NotStarted"
|
|
4241
|
+
};
|
|
4242
|
+
var CRITERION_STATUS_KEY = {
|
|
4243
|
+
\u5DF2\u8FBE\u6210: "Proven",
|
|
4244
|
+
\u90E8\u5206\u8FBE\u6210: "Partial",
|
|
4245
|
+
\u672A\u8FBE\u6210: "Failed",
|
|
4246
|
+
\u672A\u9A8C\u8BC1: "Unverified"
|
|
4247
|
+
};
|
|
1809
4248
|
function completionRatio(value) {
|
|
1810
4249
|
const match = value.match(/^(\d+(?:\.\d+)?)\s*%/u);
|
|
1811
4250
|
if (match === null) return null;
|
|
@@ -1914,7 +4353,7 @@ window.__ModuleLoader__.load({
|
|
|
1914
4353
|
summary.closed ? t("stageClosed") : summary.stageLabel === "" ? t("stageUnknown") : summary.stageLabel
|
|
1915
4354
|
] }),
|
|
1916
4355
|
summary.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-pill tone-slate", children: summary.status }),
|
|
1917
|
-
summary.priority === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
4356
|
+
summary.priority === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `status-pill tone-${summary.priority === "strategic" ? "amber" : summary.priority === "high" ? "amber" : "slate"}`, children: t(priorityLabelKey(summary.priority)) })
|
|
1918
4357
|
] })
|
|
1919
4358
|
] }),
|
|
1920
4359
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-amount", children: [
|
|
@@ -1956,7 +4395,7 @@ window.__ModuleLoader__.load({
|
|
|
1956
4395
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtSponsorLabel"), value: detail.execSponsor, t }),
|
|
1957
4396
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("type"), value: summary.pocType, t }),
|
|
1958
4397
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtStageSinceLabel"), value: summary.stageSince === null ? "" : `${formatDate(summary.stageSince, locale)}${summary.daysInStage === null ? "" : ` \xB7 ${format(t("daysInStage"), { days: summary.daysInStage })}`}`, t }),
|
|
1959
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtPriorityLabel"), value: summary.priority, t })
|
|
4398
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtPriorityLabel"), value: summary.priority === "" ? "" : t(priorityLabelKey(summary.priority)), t })
|
|
1960
4399
|
] })
|
|
1961
4400
|
] }),
|
|
1962
4401
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-nav", children: [
|
|
@@ -1972,7 +4411,7 @@ window.__ModuleLoader__.load({
|
|
|
1972
4411
|
] })
|
|
1973
4412
|
] });
|
|
1974
4413
|
}
|
|
1975
|
-
function ProgressItem({ entry, index, t, locale }) {
|
|
4414
|
+
function ProgressItem({ entry, index, t, locale, detail }) {
|
|
1976
4415
|
const tone = recognitionTone(entry.customer.recognition);
|
|
1977
4416
|
const ratio = completionRatio(entry.completion);
|
|
1978
4417
|
const hasNext = entry.next.goal !== "" || entry.next.owner !== "" || entry.next.deadline !== "";
|
|
@@ -2003,9 +4442,12 @@ window.__ModuleLoader__.load({
|
|
|
2003
4442
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-pair-value", children: entry.actual })
|
|
2004
4443
|
] })
|
|
2005
4444
|
] }),
|
|
2006
|
-
entry.
|
|
4445
|
+
entry.scenarioIds.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-scope", children: [
|
|
2007
4446
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-scope-label", children: t("dtProgressScope") }),
|
|
2008
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "chip-row", children: entry.
|
|
4447
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "chip-row", children: entry.scenarioIds.map((id, itemIndex) => {
|
|
4448
|
+
const linked = scenarioNameOf(detail, id);
|
|
4449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: linked === "" ? id : linked }, `${id}:${itemIndex}`);
|
|
4450
|
+
}) })
|
|
2009
4451
|
] }),
|
|
2010
4452
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-evidence", children: [
|
|
2011
4453
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-block-label", children: t("dtProgressEvidence") }),
|
|
@@ -2065,7 +4507,7 @@ window.__ModuleLoader__.load({
|
|
|
2065
4507
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtProgressTitle"), kicker: format(t("dtProgressCount"), { count: ordered.length }), children: ordered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsec-empty", children: [
|
|
2066
4508
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "dsec-empty-title", children: t("dtProgressEmptyTitle") }),
|
|
2067
4509
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsec-empty-copy", children: t("dtProgressEmptyCopy") })
|
|
2068
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "prog-stream", children: ordered.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressItem, { entry, index, t, locale }, `${entry.date}:${entry.seq ?? index}`)) }) });
|
|
4510
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "prog-stream", children: ordered.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressItem, { entry, index, t, locale, detail }, `${entry.date}:${entry.seq ?? index}`)) }) });
|
|
2069
4511
|
}
|
|
2070
4512
|
function DimensionGrid({ detail, t }) {
|
|
2071
4513
|
const values = {
|
|
@@ -2156,7 +4598,91 @@ window.__ModuleLoader__.load({
|
|
|
2156
4598
|
] })
|
|
2157
4599
|
] });
|
|
2158
4600
|
}
|
|
2159
|
-
function
|
|
4601
|
+
function ScenarioDetail({ detail, scenarioId, t }) {
|
|
4602
|
+
const scenario = detail.plan.scenarios.find((item) => item.id === scenarioId);
|
|
4603
|
+
if (scenario === void 0) {
|
|
4604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtScenarioTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioNotFound") }) });
|
|
4605
|
+
}
|
|
4606
|
+
const tone = scenarioTone(scenario.status);
|
|
4607
|
+
const entries = detail.progress.filter((entry) => entry.scenarioIds.includes(scenarioId)).slice().sort((left, right) => right.date === left.date ? (right.seq ?? 0) - (left.seq ?? 0) : right.date.localeCompare(left.date));
|
|
4608
|
+
const evidence = entries.flatMap((entry) => entry.evidence.map((item) => ({ ...item, date: entry.date })));
|
|
4609
|
+
const latestWithCustomer = entries.find((entry) => entry.customer.syncedWith !== "" || entry.customer.feedback !== "" || entry.customer.recognition !== "");
|
|
4610
|
+
const latest = entries[0];
|
|
4611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtScenarioTitle"), kicker: scenario.name, children: [
|
|
4612
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "sd-head", "data-tone": tone, children: [
|
|
4613
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-head-no", children: scenario.id }),
|
|
4614
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-head-name", children: scenario.name === "" ? t("emptyField") : scenario.name }),
|
|
4615
|
+
scenario.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
|
|
4616
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4617
|
+
t(`dtStatus${SCENARIO_STATUS_KEY[scenario.status] ?? "NoEvidence"}`)
|
|
4618
|
+
] })
|
|
4619
|
+
] }),
|
|
4620
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-prose", "data-empty": scenario.goal === "", children: [
|
|
4621
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-prose-label", children: t("dtScenarioGoal") }),
|
|
4622
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-prose-body prose", children: scenario.goal === "" ? t("emptyField") : scenario.goal })
|
|
4623
|
+
] }),
|
|
4624
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4625
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
|
|
4626
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioEvidence") }),
|
|
4627
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: format(t("dtPlanScenarioEvidence"), { count: evidence.length }) })
|
|
4628
|
+
] }),
|
|
4629
|
+
evidence.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioEvidenceNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "sd-evidence", children: evidence.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "sd-evidence-row", children: [
|
|
4630
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-evidence-type", children: item.type === "" ? t("dtUnset") : item.type }),
|
|
4631
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-evidence-title", children: item.title === "" ? t("emptyField") : item.title }),
|
|
4632
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-evidence-date", children: item.date }),
|
|
4633
|
+
item.link === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { className: "sd-evidence-link", href: item.link, target: "_blank", rel: "noreferrer noopener", children: t("dtPlanScenarioDetail") })
|
|
4634
|
+
] }, `${item.title}:${index}`)) })
|
|
4635
|
+
] }),
|
|
4636
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4637
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("header", { className: "plan-block-head", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioCustomer") }) }),
|
|
4638
|
+
latestWithCustomer === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioFeedbackEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "sd-customer", children: [
|
|
4639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "sd-customer-sync", children: [
|
|
4640
|
+
t("dtScenarioSyncedWith"),
|
|
4641
|
+
"\uFF1A",
|
|
4642
|
+
latestWithCustomer.customer.syncedWith === "" ? t("dtUnset") : latestWithCustomer.customer.syncedWith,
|
|
4643
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-customer-date", children: latestWithCustomer.date })
|
|
4644
|
+
] }),
|
|
4645
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "sd-customer-feedback prose", children: latestWithCustomer.customer.feedback === "" ? t("dtUnset") : latestWithCustomer.customer.feedback }),
|
|
4646
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${recognitionTone(latestWithCustomer.customer.recognition)}`, children: [
|
|
4647
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4648
|
+
latestWithCustomer.customer.recognition === "" ? t("dtUnset") : latestWithCustomer.customer.recognition
|
|
4649
|
+
] })
|
|
4650
|
+
] })
|
|
4651
|
+
] }),
|
|
4652
|
+
latest === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4653
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("header", { className: "plan-block-head", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioGate3") }) }),
|
|
4654
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "sd-gate3", children: [
|
|
4655
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${latest.gate3_1 === "\u53EF\u8BC1\u660E" ? "green" : "amber"}`, children: [
|
|
4656
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4657
|
+
"G3-1 ",
|
|
4658
|
+
latest.gate3_1 === "" ? t("dtUnset") : latest.gate3_1
|
|
4659
|
+
] }),
|
|
4660
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${latest.gate3_2 === "\u5DF2\u786E\u8BA4" ? "green" : "amber"}`, children: [
|
|
4661
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4662
|
+
"G3-2 ",
|
|
4663
|
+
latest.gate3_2 === "" ? t("dtUnset") : latest.gate3_2
|
|
4664
|
+
] }),
|
|
4665
|
+
latest.gate3_1 === "\u53EF\u8BC1\u660E" && latest.gate3_2 !== "\u5DF2\u786E\u8BA4" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-gate3-note", children: "R10" }) : null
|
|
4666
|
+
] })
|
|
4667
|
+
] }),
|
|
4668
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4669
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
|
|
4670
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioLinked") }),
|
|
4671
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: format(t("dtProgressCountLabel"), { count: entries.length }) })
|
|
4672
|
+
] }),
|
|
4673
|
+
entries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioLinkedNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "sd-linked", children: entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "sd-linked-row", children: [
|
|
4674
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-linked-date", children: entry.date }),
|
|
4675
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "sd-linked-seq", children: [
|
|
4676
|
+
"#",
|
|
4677
|
+
entry.seq ?? "\u2014"
|
|
4678
|
+
] }),
|
|
4679
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-linked-change", children: entry.change === "" ? t("dtUnset") : entry.change }),
|
|
4680
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-linked-actual", children: entry.actual === "" ? t("emptyField") : entry.actual })
|
|
4681
|
+
] }, entry.seq ?? entry.date)) })
|
|
4682
|
+
] })
|
|
4683
|
+
] });
|
|
4684
|
+
}
|
|
4685
|
+
function PlanPanels({ detail, t, onOpenScenario }) {
|
|
2160
4686
|
const plan = detail.plan;
|
|
2161
4687
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtPlanTitle"), children: [
|
|
2162
4688
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-meta", children: [
|
|
@@ -2198,14 +4724,23 @@ window.__ModuleLoader__.load({
|
|
|
2198
4724
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanCriteria") }),
|
|
2199
4725
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanMetric") }),
|
|
2200
4726
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanBaseline") }),
|
|
2201
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanTarget") })
|
|
4727
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanTarget") }),
|
|
4728
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanCriteriaStatus") })
|
|
2202
4729
|
] }) }),
|
|
2203
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: plan.criteria.map((criterion, index) =>
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
2207
|
-
|
|
2208
|
-
|
|
4730
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: plan.criteria.map((criterion, index) => {
|
|
4731
|
+
const status = criterion.status;
|
|
4732
|
+
const tone = criterionTone(status);
|
|
4733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
|
|
4734
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-name", children: criterion.name === "" ? t("emptyField") : criterion.name }),
|
|
4735
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: criterion.metric === "" ? t("emptyField") : criterion.metric }),
|
|
4736
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-num", children: criterion.baseline === "" ? "\u2014" : criterion.baseline }),
|
|
4737
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-target", children: criterion.target === "" ? "\u2014" : criterion.target }),
|
|
4738
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-status", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
|
|
4739
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4740
|
+
t(`dtCrit${CRITERION_STATUS_KEY[status] ?? "Unverified"}`)
|
|
4741
|
+
] }) })
|
|
4742
|
+
] }, criterion.id === "" ? `${criterion.name}:${index}` : criterion.id);
|
|
4743
|
+
}) })
|
|
2209
4744
|
] })
|
|
2210
4745
|
] }),
|
|
2211
4746
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
@@ -2213,10 +4748,42 @@ window.__ModuleLoader__.load({
|
|
|
2213
4748
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtPlanScenarios") }),
|
|
2214
4749
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: plan.scenarios.length === 0 ? t("dtPlanScenariosNone") : format(t("dtPlanScenariosCount"), { count: plan.scenarios.length }) })
|
|
2215
4750
|
] }),
|
|
2216
|
-
plan.scenarios.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtPlanScenariosNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "plan-scenarios", children: plan.scenarios.map((scenario, index) =>
|
|
2217
|
-
|
|
2218
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
2219
|
-
|
|
4751
|
+
plan.scenarios.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtPlanScenariosNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "plan-scenarios", children: plan.scenarios.map((scenario, index) => {
|
|
4752
|
+
const tone = scenarioTone(scenario.status);
|
|
4753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "plan-scenario", "data-tone": tone, children: [
|
|
4754
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-no", children: String(index + 1).padStart(2, "0") }),
|
|
4755
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-scenario-body", children: [
|
|
4756
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-name", children: scenario.name === "" ? t("emptyField") : scenario.name }),
|
|
4757
|
+
scenario.goal === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-scenario-goal", children: [
|
|
4758
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-goal-label", children: t("dtPlanScenarioGoal") }),
|
|
4759
|
+
scenario.goal
|
|
4760
|
+
] })
|
|
4761
|
+
] }),
|
|
4762
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-scenario-tail", children: [
|
|
4763
|
+
scenario.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
4764
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-glyph", "aria-hidden": "true", children: scenarioGlyph(scenario.status) }),
|
|
4765
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
|
|
4766
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4767
|
+
t(`dtStatus${SCENARIO_STATUS_KEY[scenario.status] ?? "NoEvidence"}`)
|
|
4768
|
+
] }),
|
|
4769
|
+
scenario.evidenceCount === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-evidence", children: format(t("dtPlanScenarioEvidence"), { count: scenario.evidenceCount }) })
|
|
4770
|
+
] }),
|
|
4771
|
+
scenario.id === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4772
|
+
"button",
|
|
4773
|
+
{
|
|
4774
|
+
type: "button",
|
|
4775
|
+
className: "plan-scenario-open",
|
|
4776
|
+
onClick: () => onOpenScenario(scenario.id),
|
|
4777
|
+
"aria-label": `${t("dtPlanScenarioDetail")}: ${scenario.name}`,
|
|
4778
|
+
children: [
|
|
4779
|
+
t("dtPlanScenarioDetail"),
|
|
4780
|
+
" \u203A"
|
|
4781
|
+
]
|
|
4782
|
+
}
|
|
4783
|
+
)
|
|
4784
|
+
] })
|
|
4785
|
+
] }, scenario.id === "" ? `${scenario.name}:${index}` : scenario.id);
|
|
4786
|
+
}) })
|
|
2220
4787
|
] }),
|
|
2221
4788
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
2222
4789
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
|
|
@@ -2269,18 +4836,28 @@ window.__ModuleLoader__.load({
|
|
|
2269
4836
|
const stage = detail.summary.closed ? "closed" : detail.summary.stage;
|
|
2270
4837
|
const skeleton = SKELETON_FOR[stage] ?? SKELETON_FOR.unknown;
|
|
2271
4838
|
const [foldOpen, setFoldOpen] = (0, import_react2.useState)(false);
|
|
4839
|
+
const [scenarioId, setScenarioId] = (0, import_react2.useState)(null);
|
|
2272
4840
|
const sections = {
|
|
2273
4841
|
basic: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BasicInfo, { detail, t }, "basic"),
|
|
2274
4842
|
progress: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressStream, { detail, t, locale }, "progress"),
|
|
2275
4843
|
dimensions: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DimensionGrid, { detail, t }, "dimensions"),
|
|
2276
4844
|
gate0: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Gate0Meter, { detail, t }, "gate0"),
|
|
2277
|
-
plan: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PlanPanels, { detail, t }, "plan"),
|
|
4845
|
+
plan: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PlanPanels, { detail, t, onOpenScenario: setScenarioId }, "plan"),
|
|
2278
4846
|
outcome: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OutcomePanel, { detail, t }, "outcome")
|
|
2279
4847
|
};
|
|
2280
4848
|
const primary = skeleton.sections;
|
|
2281
4849
|
const secondary = ["basic", "progress", "dimensions", "gate0", "plan", "outcome"].filter((key) => !primary.includes(key));
|
|
2282
4850
|
const stageState = stageStateOf(detail);
|
|
2283
4851
|
const projectBlockers = props.blockers ?? [];
|
|
4852
|
+
if (scenarioId !== null) {
|
|
4853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-page", children: [
|
|
4854
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IdentityRail, { props }),
|
|
4855
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { className: "dt-pane", children: [
|
|
4856
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "sd-back", onClick: () => setScenarioId(null), children: t("dtScenarioBack") }),
|
|
4857
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ScenarioDetail, { detail, scenarioId, t })
|
|
4858
|
+
] })
|
|
4859
|
+
] });
|
|
4860
|
+
}
|
|
2284
4861
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-page", children: [
|
|
2285
4862
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IdentityRail, { props }),
|
|
2286
4863
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { className: "dt-pane", children: [
|
|
@@ -2900,7 +5477,9 @@ window.__ModuleLoader__.load({
|
|
|
2900
5477
|
label: `R${row.ruleNo} ${format(t(`gap.${row.rule}.title`), { ...representative.get(row.rule)?.params ?? {} })}`,
|
|
2901
5478
|
value: row.count,
|
|
2902
5479
|
display: format(t("gapRuleFiresLabel"), { count: row.count }),
|
|
2903
|
-
|
|
5480
|
+
// `info` is its own tier (R14): painting it amber would put a project that is
|
|
5481
|
+
// merely waiting on the customer beside one that has no evidence at all.
|
|
5482
|
+
tone: row.level === "high" ? "red" : row.level === "medium" ? "amber" : "slate"
|
|
2904
5483
|
}));
|
|
2905
5484
|
const [collapsed, setCollapsed] = (0, import_react5.useState)(false);
|
|
2906
5485
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "pf-band", "data-collapsed": collapsed, "aria-label": t("bandTitle"), children: [
|
|
@@ -4596,13 +7175,92 @@ window.__ModuleLoader__.load({
|
|
|
4596
7175
|
.wd-shell .plan-criterion-name { font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
4597
7176
|
.wd-shell .plan-criterion-num { font-variant-numeric: tabular-nums; }
|
|
4598
7177
|
.wd-shell .plan-criterion-target { font-weight: 650; color: var(--wd-primary); font-variant-numeric: tabular-nums; }
|
|
4599
|
-
.wd-shell .plan-scenarios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap:
|
|
4600
|
-
|
|
7178
|
+
.wd-shell .plan-scenarios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
|
|
7179
|
+
/* A scenario row carries its derived state as a left edge: the row's colour is
|
|
7180
|
+
the finding, so it has to survive a glance down the list. */
|
|
7181
|
+
.wd-shell .plan-scenario {
|
|
7182
|
+
display: flex; align-items: flex-start; gap: 10px;
|
|
7183
|
+
padding: 8px 10px 8px 9px; border-radius: 8px;
|
|
7184
|
+
background: var(--wd-surface); border: 1px solid var(--wd-hairline);
|
|
7185
|
+
border-left: 3px solid var(--wd-slate);
|
|
7186
|
+
}
|
|
7187
|
+
.wd-shell .plan-scenario[data-tone="green"] { border-left-color: var(--wd-green); }
|
|
7188
|
+
.wd-shell .plan-scenario[data-tone="amber"] { border-left-color: var(--wd-amber); }
|
|
7189
|
+
.wd-shell .plan-scenario[data-tone="red"] { border-left-color: var(--wd-red); }
|
|
4601
7190
|
.wd-shell .plan-scenario-no {
|
|
4602
|
-
flex: none;
|
|
7191
|
+
flex: none; margin-top: 1px;
|
|
7192
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
4603
7193
|
font-size: 9.5px; line-height: 15px; font-weight: 650; color: var(--dsw-alias-label-tertiary);
|
|
4604
7194
|
}
|
|
4605
|
-
.wd-shell .plan-scenario-
|
|
7195
|
+
.wd-shell .plan-scenario[data-tone="green"] .plan-scenario-no { color: var(--wd-green); }
|
|
7196
|
+
.wd-shell .plan-scenario[data-tone="amber"] .plan-scenario-no { color: var(--wd-amber); }
|
|
7197
|
+
.wd-shell .plan-scenario[data-tone="red"] .plan-scenario-no { color: var(--wd-red); }
|
|
7198
|
+
.wd-shell .plan-scenario-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
|
|
7199
|
+
.wd-shell .plan-scenario-name { font-size: 11.5px; line-height: 17px; font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
7200
|
+
.wd-shell .plan-scenario-goal { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
|
|
7201
|
+
.wd-shell .plan-scenario-goal-label { margin-right: 5px; color: var(--dsw-alias-label-tertiary); }
|
|
7202
|
+
.wd-shell .plan-scenario-tail { flex: none; display: flex; align-items: center; gap: 6px; }
|
|
7203
|
+
.wd-shell .plan-scenario-glyph { font-size: 10px; line-height: 14px; }
|
|
7204
|
+
.wd-shell .plan-scenario[data-tone="green"] .plan-scenario-glyph { color: var(--wd-green); }
|
|
7205
|
+
.wd-shell .plan-scenario[data-tone="amber"] .plan-scenario-glyph { color: var(--wd-amber); }
|
|
7206
|
+
.wd-shell .plan-scenario[data-tone="red"] .plan-scenario-glyph { color: var(--wd-red); }
|
|
7207
|
+
.wd-shell .plan-scenario[data-tone="slate"] .plan-scenario-glyph { color: var(--wd-slate); }
|
|
7208
|
+
.wd-shell .plan-scenario-evidence {
|
|
7209
|
+
font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary);
|
|
7210
|
+
font-variant-numeric: tabular-nums; white-space: nowrap;
|
|
7211
|
+
}
|
|
7212
|
+
.wd-shell .plan-criterion-status { white-space: nowrap; }
|
|
7213
|
+
|
|
7214
|
+
/* ---------- scenario detail (layer two) ---------- */
|
|
7215
|
+
.wd-shell .plan-scenario-open {
|
|
7216
|
+
flex: none; margin-left: 2px; padding: 2px 6px;
|
|
7217
|
+
border: 0; border-radius: 5px; background: transparent; cursor: pointer;
|
|
7218
|
+
font-family: inherit; font-size: 10.5px; line-height: 15px; font-weight: 600;
|
|
7219
|
+
color: var(--wd-primary);
|
|
7220
|
+
}
|
|
7221
|
+
.wd-shell .plan-scenario-open:hover { background: var(--wd-primary-soft); }
|
|
7222
|
+
.wd-shell .plan-scenario-open:focus-visible { outline: 2px solid var(--wd-primary-ring); outline-offset: 1px; }
|
|
7223
|
+
.wd-shell .sd-back {
|
|
7224
|
+
align-self: flex-start; margin-bottom: 2px; padding: 3px 8px;
|
|
7225
|
+
border: 1px solid var(--wd-hairline); border-radius: 6px; background: var(--wd-surface); cursor: pointer;
|
|
7226
|
+
font-family: inherit; font-size: 10.5px; line-height: 15px; font-weight: 600; color: var(--wd-primary);
|
|
7227
|
+
}
|
|
7228
|
+
.wd-shell .sd-back:hover { background: var(--wd-primary-soft); }
|
|
7229
|
+
.wd-shell .sd-back:focus-visible { outline: 2px solid var(--wd-primary-ring); outline-offset: 1px; }
|
|
7230
|
+
.wd-shell .sd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--wd-hairline); }
|
|
7231
|
+
.wd-shell .sd-head-no {
|
|
7232
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
7233
|
+
font-size: 10px; line-height: 15px; font-weight: 650; color: var(--dsw-alias-label-tertiary);
|
|
7234
|
+
}
|
|
7235
|
+
.wd-shell .sd-head-name { font-size: 14px; line-height: 20px; font-weight: 650; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
7236
|
+
.wd-shell .sd-evidence { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
7237
|
+
.wd-shell .sd-evidence-row {
|
|
7238
|
+
display: flex; align-items: baseline; gap: 9px; padding: 7px 10px;
|
|
7239
|
+
border-radius: 7px; background: var(--wd-inset);
|
|
7240
|
+
}
|
|
7241
|
+
.wd-shell .sd-evidence-type { flex: none; font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
7242
|
+
.wd-shell .sd-evidence-title { flex: 1; min-width: 0; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
7243
|
+
.wd-shell .sd-evidence-date { flex: none; font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7244
|
+
.wd-shell .sd-evidence-link { flex: none; font-size: 10.5px; color: var(--wd-primary); text-decoration: none; }
|
|
7245
|
+
.wd-shell .sd-evidence-link:hover { text-decoration: underline; }
|
|
7246
|
+
.wd-shell .sd-customer { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px; border-radius: 8px; background: var(--wd-inset); }
|
|
7247
|
+
.wd-shell .sd-customer-sync { display: flex; align-items: baseline; gap: 8px; font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
7248
|
+
.wd-shell .sd-customer-date { font-variant-numeric: tabular-nums; }
|
|
7249
|
+
.wd-shell .sd-customer-feedback { margin: 0; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary); }
|
|
7250
|
+
.wd-shell .sd-gate3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
7251
|
+
.wd-shell .sd-gate3-note {
|
|
7252
|
+
font-size: 9.5px; line-height: 14px; font-weight: 650; color: var(--wd-red);
|
|
7253
|
+
padding: 1px 5px; border-radius: 4px; background: var(--wd-red-soft);
|
|
7254
|
+
}
|
|
7255
|
+
.wd-shell .sd-linked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
7256
|
+
.wd-shell .sd-linked-row {
|
|
7257
|
+
display: grid; grid-template-columns: 82px 34px 76px minmax(0, 1fr); gap: 8px;
|
|
7258
|
+
align-items: baseline; padding: 6px 10px; border-radius: 7px; background: var(--wd-inset);
|
|
7259
|
+
}
|
|
7260
|
+
.wd-shell .sd-linked-date { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7261
|
+
.wd-shell .sd-linked-seq { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7262
|
+
.wd-shell .sd-linked-change { font-size: 9.5px; line-height: 14px; font-weight: 600; color: var(--wd-primary); }
|
|
7263
|
+
.wd-shell .sd-linked-actual { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
4606
7264
|
.wd-shell .plan-risks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
|
|
4607
7265
|
.wd-shell .plan-risk { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--wd-inset); }
|
|
4608
7266
|
.wd-shell .plan-risk-dot { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--wd-slate); }
|
|
@@ -5804,9 +8462,9 @@ window.__ModuleLoader__.load({
|
|
|
5804
8462
|
const stages = /* @__PURE__ */ new Map();
|
|
5805
8463
|
const statuses = /* @__PURE__ */ new Map();
|
|
5806
8464
|
const types = /* @__PURE__ */ new Map();
|
|
5807
|
-
const bump = (
|
|
5808
|
-
const existing =
|
|
5809
|
-
if (existing === void 0)
|
|
8465
|
+
const bump = (map2, value, label) => {
|
|
8466
|
+
const existing = map2.get(value);
|
|
8467
|
+
if (existing === void 0) map2.set(value, { value, label, count: 1 });
|
|
5810
8468
|
else existing.count += 1;
|
|
5811
8469
|
};
|
|
5812
8470
|
for (const project of projects) {
|
|
@@ -5820,7 +8478,7 @@ window.__ModuleLoader__.load({
|
|
|
5820
8478
|
for (const stage of STAGES) {
|
|
5821
8479
|
if (!stages.has(stage)) stages.set(stage, { value: stage, label: stageLabel(snapshotT, stage), count: count((project) => project.closed ? "closed" : project.stage ?? "unknown", stage) });
|
|
5822
8480
|
}
|
|
5823
|
-
const sortOptions = (
|
|
8481
|
+
const sortOptions = (map2) => [...map2.values()].sort((left, right) => right.count - left.count || left.label.localeCompare(right.label));
|
|
5824
8482
|
return {
|
|
5825
8483
|
system: sortOptions(systems),
|
|
5826
8484
|
company: sortOptions(companies),
|