@primmel/primmel 1.21.18 → 1.21.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/check-rules.d.ts.map +1 -1
- package/dist/src/check-rules.js +1 -0
- package/dist/src/check-rules.js.map +1 -1
- package/dist/src/check.d.ts.map +1 -1
- package/dist/src/check.js +73 -27
- package/dist/src/check.js.map +1 -1
- package/dist/src/export/retrieval.d.ts +1 -1
- package/dist/src/export/retrieval.d.ts.map +1 -1
- package/dist/src/export/retrieval.js +0 -79
- package/dist/src/export/retrieval.js.map +1 -1
- package/dist/src/model-diff.d.ts.map +1 -1
- package/dist/src/model-diff.js +0 -1
- package/dist/src/model-diff.js.map +1 -1
- package/dist/src/ser-des/config/index.d.ts.map +1 -1
- package/dist/src/ser-des/config/index.js +0 -1
- package/dist/src/ser-des/config/index.js.map +1 -1
- package/dist/src/ser-des/config/process.d.ts.map +1 -1
- package/dist/src/ser-des/config/process.js +4 -0
- package/dist/src/ser-des/config/process.js.map +1 -1
- package/dist/src/ser-des/config/quantity.d.ts.map +1 -1
- package/dist/src/ser-des/config/quantity.js +25 -7
- package/dist/src/ser-des/config/quantity.js.map +1 -1
- package/dist/src/ser-des/config/series.d.ts.map +1 -1
- package/dist/src/ser-des/config/series.js +11 -1
- package/dist/src/ser-des/config/series.js.map +1 -1
- package/dist/src/ser-des/config/subject.d.ts +1 -8
- package/dist/src/ser-des/config/subject.d.ts.map +1 -1
- package/dist/src/ser-des/config/subject.js +1 -180
- package/dist/src/ser-des/config/subject.js.map +1 -1
- package/dist/src/ser-des/package.d.ts.map +1 -1
- package/dist/src/ser-des/package.js +0 -1
- package/dist/src/ser-des/package.js.map +1 -1
- package/dist/src/ser-des/parse.d.ts.map +1 -1
- package/dist/src/ser-des/parse.js +0 -1
- package/dist/src/ser-des/parse.js.map +1 -1
- package/dist/src/ser-des/types.d.ts +1 -2
- package/dist/src/ser-des/types.d.ts.map +1 -1
- package/dist/src/types/Artifact.d.ts +2 -3
- package/dist/src/types/Artifact.d.ts.map +1 -1
- package/dist/src/types/Artifact.js +2 -3
- package/dist/src/types/Artifact.js.map +1 -1
- package/dist/src/types/Quantity.d.ts +11 -0
- package/dist/src/types/Quantity.d.ts.map +1 -1
- package/dist/src/types/Series.d.ts +7 -0
- package/dist/src/types/Series.d.ts.map +1 -1
- package/dist/src/types/Standard.d.ts +1 -2
- package/dist/src/types/Standard.d.ts.map +1 -1
- package/dist/src/types/Subject.d.ts +0 -43
- package/dist/src/types/Subject.d.ts.map +1 -1
- package/dist-browser/index.mjs +672 -728
- package/dist-cli/primmel.mjs +132 -350
- package/package.json +1 -1
package/dist-browser/index.mjs
CHANGED
|
@@ -216,7 +216,6 @@ function d(e, t, n = {}) {
|
|
|
216
216
|
attributeDefinitions: {},
|
|
217
217
|
capabilities: {},
|
|
218
218
|
behaviors: {},
|
|
219
|
-
conditionSets: {},
|
|
220
219
|
subjects: {},
|
|
221
220
|
identitySlots: {},
|
|
222
221
|
aspects: {},
|
|
@@ -896,6 +895,10 @@ function me(e) {
|
|
|
896
895
|
}, r = n(e), o = 0;
|
|
897
896
|
for (; o < r.length;) {
|
|
898
897
|
let e = r[o++];
|
|
898
|
+
if (e === "record") {
|
|
899
|
+
t.record = a(r[o++]);
|
|
900
|
+
continue;
|
|
901
|
+
}
|
|
899
902
|
if (e !== "axis" && e !== "cell") {
|
|
900
903
|
o < r.length && i(r[o - 1]);
|
|
901
904
|
continue;
|
|
@@ -930,7 +933,7 @@ function me(e) {
|
|
|
930
933
|
function he(e) {
|
|
931
934
|
let t = "series { ";
|
|
932
935
|
for (let n of e.axes) t += "axis " + n.id + " { ", n.unit && (t += "unit \"" + s(n.unit) + "\" "), n.type && (t += "type " + n.type + " "), n.role && (t += "role " + n.role + " "), t += "} ";
|
|
933
|
-
return t += "cell { ", e.cellSymbol && (t += "symbol " + e.cellSymbol + " "), e.cellUnit && (t += "unit \"" + s(e.cellUnit) + "\" "), t += "} }", t;
|
|
936
|
+
return t += "cell { ", e.cellSymbol && (t += "symbol " + e.cellSymbol + " "), e.cellUnit && (t += "unit \"" + s(e.cellUnit) + "\" "), t += "} ", e.record !== void 0 && (t += "record " + e.record + " "), t += "}", t;
|
|
934
937
|
}
|
|
935
938
|
//#endregion
|
|
936
939
|
//#region src/ser-des/config/sourceDiscrepancy.ts
|
|
@@ -1330,7 +1333,24 @@ function je(e) {
|
|
|
1330
1333
|
for (; o < r.length;) {
|
|
1331
1334
|
let e = r[o++];
|
|
1332
1335
|
if (o >= r.length) break;
|
|
1333
|
-
|
|
1336
|
+
if (e === "value") {
|
|
1337
|
+
let e = r[o++];
|
|
1338
|
+
t.value = B(e);
|
|
1339
|
+
let n = a(e);
|
|
1340
|
+
typeof t.value == "number" && String(t.value) !== n && (t.valueLiteral = n);
|
|
1341
|
+
} else if (e === "unit") t.unit = a(r[o++]);
|
|
1342
|
+
else if (e === "kind" || e === "quantity_kind") t.quantityKind = a(r[o++]);
|
|
1343
|
+
else if (e === "uncertainty") {
|
|
1344
|
+
let e = r[o++];
|
|
1345
|
+
t.uncertainty = B(e);
|
|
1346
|
+
let n = a(e);
|
|
1347
|
+
typeof t.uncertainty == "number" && String(t.uncertainty) !== n && (t.uncertaintyLiteral = n);
|
|
1348
|
+
} else if (e === "tolerance") {
|
|
1349
|
+
let e = r[o++];
|
|
1350
|
+
t.tolerance = B(e);
|
|
1351
|
+
let n = a(e);
|
|
1352
|
+
typeof t.tolerance == "number" && String(t.tolerance) !== n && (t.toleranceLiteral = n);
|
|
1353
|
+
} else e === "provenance" ? t.provenance = Ne(i(r[o++])) : i(r[o++]);
|
|
1334
1354
|
}
|
|
1335
1355
|
return t;
|
|
1336
1356
|
}
|
|
@@ -1355,14 +1375,14 @@ function V(e) {
|
|
|
1355
1375
|
}
|
|
1356
1376
|
function Fe(e) {
|
|
1357
1377
|
if (!Me(e)) {
|
|
1358
|
-
let t = V(e.value);
|
|
1378
|
+
let t = e.valueLiteral ?? V(e.value);
|
|
1359
1379
|
return e.unit === void 0 ? t : t + " " + P(e.unit);
|
|
1360
1380
|
}
|
|
1361
1381
|
return Ie(e);
|
|
1362
1382
|
}
|
|
1363
1383
|
function Ie(e) {
|
|
1364
|
-
let t = ["value " + V(e.value)];
|
|
1365
|
-
return e.unit !== void 0 && t.push("unit \"" + s(e.unit) + "\""), e.quantityKind !== void 0 && t.push("kind " + P(e.quantityKind)), e.uncertainty !== void 0 && t.push("uncertainty " + V(e.uncertainty)), e.tolerance !== void 0 && t.push("tolerance " + V(e.tolerance)), e.provenance !== void 0 && t.push("provenance " + Pe(e.provenance)), "{ " + t.join(" ") + " }";
|
|
1384
|
+
let t = ["value " + (e.valueLiteral ?? V(e.value))];
|
|
1385
|
+
return e.unit !== void 0 && t.push("unit \"" + s(e.unit) + "\""), e.quantityKind !== void 0 && t.push("kind " + P(e.quantityKind)), e.uncertainty !== void 0 && t.push("uncertainty " + (e.uncertaintyLiteral ?? V(e.uncertainty))), e.tolerance !== void 0 && t.push("tolerance " + (e.toleranceLiteral ?? V(e.tolerance))), e.provenance !== void 0 && t.push("provenance " + Pe(e.provenance)), "{ " + t.join(" ") + " }";
|
|
1366
1386
|
}
|
|
1367
1387
|
//#endregion
|
|
1368
1388
|
//#region src/ser-des/config/process.ts
|
|
@@ -1394,11 +1414,11 @@ function ze(e, t = !1) {
|
|
|
1394
1414
|
if (e.length > 2) throw Error(`Parsing error: register "${n}" initial value has ${e.length} tokens (shape: name : type = value [unit]) — quote multi-word values`);
|
|
1395
1415
|
if (e.length === 1 && e[0].startsWith("{")) u.initial = je(i(e[0]));
|
|
1396
1416
|
else {
|
|
1397
|
-
let [t, n] = e, r = B(t)
|
|
1398
|
-
u.initial = n === void 0 ? { value: r } : {
|
|
1417
|
+
let [t, n] = e, r = B(t), i = n === void 0 ? { value: r } : {
|
|
1399
1418
|
value: r,
|
|
1400
1419
|
unit: a(n)
|
|
1401
1420
|
};
|
|
1421
|
+
typeof r == "number" && String(r) !== a(t) && (i.valueLiteral = a(t)), u.initial = i;
|
|
1402
1422
|
}
|
|
1403
1423
|
}
|
|
1404
1424
|
r.push(u);
|
|
@@ -7591,76 +7611,8 @@ var So = function(e, t) {
|
|
|
7591
7611
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
7592
7612
|
for (let e of n) t += D(e, " ", s);
|
|
7593
7613
|
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += K("verified_by", e.verifiedBy, " "), t += "}\n", t;
|
|
7594
|
-
}, Oo = function(e, t) {
|
|
7595
|
-
let n = {
|
|
7596
|
-
id: e,
|
|
7597
|
-
role: "",
|
|
7598
|
-
entries: [],
|
|
7599
|
-
source: null,
|
|
7600
|
-
sources: [],
|
|
7601
|
-
referenceIds: []
|
|
7602
|
-
}, o = r(t), s = 0;
|
|
7603
|
-
for (; s < o.length;) {
|
|
7604
|
-
let e = o[s++];
|
|
7605
|
-
if (s >= o.length) break;
|
|
7606
|
-
if (e === "role") n.role = a(o[s++]);
|
|
7607
|
-
else if (e === "subject") n.subject = a(o[s++]);
|
|
7608
|
-
else if (e === "description") n.description = a(o[s++]);
|
|
7609
|
-
else if (e === "entries") n.entries = ko(i(o[s++]));
|
|
7610
|
-
else if (e === "source") {
|
|
7611
|
-
let e = L(i(o[s++]));
|
|
7612
|
-
n.sources.push(e), n.source ||= e;
|
|
7613
|
-
} else if (e === "ref") {
|
|
7614
|
-
let e = C(o, s, a, i);
|
|
7615
|
-
if (s = e.next, e.ref.predicate === "derives-from") {
|
|
7616
|
-
let t = pe(e.ref.target);
|
|
7617
|
-
t ? (n.sources.push(t), n.source ||= t) : (n.refs ??= []).push(e.ref);
|
|
7618
|
-
} else e.ref.predicate === "cites" ? n.referenceIds.push(e.ref.target) : (n.refs ??= []).push(e.ref);
|
|
7619
|
-
} else if (e === "corresponds") {
|
|
7620
|
-
let e = O(o, s, a);
|
|
7621
|
-
(n.correspondences ??= []).push(e.corr), s = e.next;
|
|
7622
|
-
} else e === "reference" ? n.referenceIds = q(o[s++]) : s = b(o, s, e);
|
|
7623
|
-
}
|
|
7624
|
-
return (t) => (t.conditionSets[e] = n, t);
|
|
7625
|
-
};
|
|
7626
|
-
function ko(e) {
|
|
7627
|
-
let t = [], r = n(e), o = 0;
|
|
7628
|
-
for (; o < r.length;) {
|
|
7629
|
-
let e = F(r[o++]);
|
|
7630
|
-
if (!e) break;
|
|
7631
|
-
let s = {
|
|
7632
|
-
quantityKind: e,
|
|
7633
|
-
value: "",
|
|
7634
|
-
unit: "",
|
|
7635
|
-
tolerance: ""
|
|
7636
|
-
};
|
|
7637
|
-
if (o < r.length && r[o].startsWith("{")) {
|
|
7638
|
-
let e = n(i(r[o++])), t = 0;
|
|
7639
|
-
for (; t < e.length;) {
|
|
7640
|
-
let n = e[t++];
|
|
7641
|
-
if (t >= e.length) break;
|
|
7642
|
-
n === "value" ? s.value = a(e[t++]) : n === "unit" ? s.unit = a(e[t++]) : n === "tolerance" ? s.tolerance = a(e[t++]) : n === "note" ? s.note = a(e[t++]) : i(e[t++]);
|
|
7643
|
-
}
|
|
7644
|
-
}
|
|
7645
|
-
t.push(s);
|
|
7646
|
-
}
|
|
7647
|
-
return t;
|
|
7648
|
-
}
|
|
7649
|
-
var Ao = function(e) {
|
|
7650
|
-
let t = "condition_set " + e.id + " {\n";
|
|
7651
|
-
if (e.role && (t += " role " + e.role + "\n"), e.subject && (t += " subject " + e.subject + "\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.entries.length > 0) {
|
|
7652
|
-
t += " entries {\n";
|
|
7653
|
-
for (let n of e.entries) {
|
|
7654
|
-
let e = " " + n.quantityKind + " { value " + P(n.value);
|
|
7655
|
-
n.unit && (e += " unit \"" + s(n.unit) + "\""), n.tolerance && (e += " tolerance " + P(n.tolerance)), n.note && (e += " note \"" + s(n.note) + "\""), t += e + " }\n";
|
|
7656
|
-
}
|
|
7657
|
-
t += " }\n";
|
|
7658
|
-
}
|
|
7659
|
-
let n = e.sources && e.sources.length > 0 ? e.sources : e.source ? [e.source] : [];
|
|
7660
|
-
for (let e of n) t += D(e, " ", s);
|
|
7661
|
-
return t += K("reference", e.referenceIds, " "), t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
7662
7614
|
};
|
|
7663
|
-
function
|
|
7615
|
+
function Oo(e) {
|
|
7664
7616
|
let t = {}, r = n(e), i = 0;
|
|
7665
7617
|
for (; i < r.length;) {
|
|
7666
7618
|
let e = F(r[i++]);
|
|
@@ -7669,7 +7621,7 @@ function jo(e) {
|
|
|
7669
7621
|
}
|
|
7670
7622
|
return t;
|
|
7671
7623
|
}
|
|
7672
|
-
function
|
|
7624
|
+
function ko(e) {
|
|
7673
7625
|
let t = {}, r = n(e), i = 0;
|
|
7674
7626
|
for (; i < r.length;) {
|
|
7675
7627
|
let e = F(r[i++]);
|
|
@@ -7681,10 +7633,10 @@ function Mo(e) {
|
|
|
7681
7633
|
}
|
|
7682
7634
|
return t;
|
|
7683
7635
|
}
|
|
7684
|
-
function
|
|
7636
|
+
function Ao(e) {
|
|
7685
7637
|
return n(e).map(a).filter((e) => e.length > 0);
|
|
7686
7638
|
}
|
|
7687
|
-
function
|
|
7639
|
+
function jo(e) {
|
|
7688
7640
|
let t = {}, r = n(e), o = 0;
|
|
7689
7641
|
for (; o < r.length;) {
|
|
7690
7642
|
let e = F(r[o++]);
|
|
@@ -7696,13 +7648,13 @@ function Po(e) {
|
|
|
7696
7648
|
}
|
|
7697
7649
|
return t;
|
|
7698
7650
|
}
|
|
7699
|
-
function
|
|
7651
|
+
function Mo(e) {
|
|
7700
7652
|
let t = {}, r = n(e), o = 0;
|
|
7701
7653
|
for (; o < r.length;) {
|
|
7702
7654
|
let e = F(r[o++]);
|
|
7703
7655
|
if (!e) break;
|
|
7704
7656
|
if (o < r.length && r[o].startsWith("{")) {
|
|
7705
|
-
t[e] =
|
|
7657
|
+
t[e] = No(i(r[o++]));
|
|
7706
7658
|
continue;
|
|
7707
7659
|
}
|
|
7708
7660
|
let n = "", s = "", c = !1;
|
|
@@ -7718,7 +7670,7 @@ function Fo(e) {
|
|
|
7718
7670
|
}
|
|
7719
7671
|
return t;
|
|
7720
7672
|
}
|
|
7721
|
-
function
|
|
7673
|
+
function No(e) {
|
|
7722
7674
|
let t = {
|
|
7723
7675
|
symbol: "",
|
|
7724
7676
|
derivation: ""
|
|
@@ -7734,18 +7686,18 @@ function Io(e) {
|
|
|
7734
7686
|
}
|
|
7735
7687
|
return t;
|
|
7736
7688
|
}
|
|
7737
|
-
var
|
|
7738
|
-
function
|
|
7689
|
+
var Po = /* @__PURE__ */ new Set(["state", "behavior"]);
|
|
7690
|
+
function Fo(e, t, n) {
|
|
7739
7691
|
return e === "endpoint" ? (n < t.length && !t[n].startsWith("{") && n++, n < t.length && t[n].startsWith("{") && n++, n) : e === "serve" ? (n < t.length && n++, t[n] === "via" && (n += 2), n < t.length && t[n].startsWith("{") && n++, n) : n;
|
|
7740
7692
|
}
|
|
7741
|
-
function
|
|
7693
|
+
function Io(e, t, n, r, i) {
|
|
7742
7694
|
let a = F(n);
|
|
7743
7695
|
return e.misplacedAspects.push({
|
|
7744
7696
|
family: t,
|
|
7745
7697
|
aspect: a
|
|
7746
|
-
}), i < r.length && r[i].startsWith("{") ||
|
|
7698
|
+
}), i < r.length && r[i].startsWith("{") || Po.has(a) ? i++ : i = Fo(a, r, i), i;
|
|
7747
7699
|
}
|
|
7748
|
-
function
|
|
7700
|
+
function Lo(e, t) {
|
|
7749
7701
|
let r = e[t] ?? "";
|
|
7750
7702
|
if (r === "symbolic") return {
|
|
7751
7703
|
level: {
|
|
@@ -7774,7 +7726,7 @@ function Bo(e, t) {
|
|
|
7774
7726
|
next: t + 1
|
|
7775
7727
|
};
|
|
7776
7728
|
}
|
|
7777
|
-
function
|
|
7729
|
+
function Ro(e) {
|
|
7778
7730
|
let t = [], r = n(e), o = 0;
|
|
7779
7731
|
for (; o < r.length;) {
|
|
7780
7732
|
let e = r[o++];
|
|
@@ -7792,12 +7744,12 @@ function Vo(e) {
|
|
|
7792
7744
|
});
|
|
7793
7745
|
continue;
|
|
7794
7746
|
}
|
|
7795
|
-
t.push(
|
|
7747
|
+
t.push(Vo(F(e), i(r[o++])));
|
|
7796
7748
|
}
|
|
7797
7749
|
return t;
|
|
7798
7750
|
}
|
|
7799
|
-
var
|
|
7800
|
-
function
|
|
7751
|
+
var zo = ["mandatory", "optional"];
|
|
7752
|
+
function Bo(e, t) {
|
|
7801
7753
|
let r = {
|
|
7802
7754
|
attribute: "",
|
|
7803
7755
|
attributes: [],
|
|
@@ -7816,13 +7768,13 @@ function Uo(e, t) {
|
|
|
7816
7768
|
else if (t === "label") r.label = a(o[s++]);
|
|
7817
7769
|
else if (t === "obligation") {
|
|
7818
7770
|
let t = a(o[s++]);
|
|
7819
|
-
if (!
|
|
7771
|
+
if (!zo.includes(t)) throw Error(`Parsing error: promise. ID ${e}: Unknown certificate obligation "${t}" (valid: ${zo.join(", ")})`);
|
|
7820
7772
|
r.obligation = t;
|
|
7821
7773
|
} else i(o[s++]);
|
|
7822
7774
|
}
|
|
7823
7775
|
return r;
|
|
7824
7776
|
}
|
|
7825
|
-
function
|
|
7777
|
+
function Vo(e, t) {
|
|
7826
7778
|
let r = {
|
|
7827
7779
|
id: e,
|
|
7828
7780
|
target: "",
|
|
@@ -7838,62 +7790,62 @@ function Wo(e, t) {
|
|
|
7838
7790
|
if (s >= o.length) break;
|
|
7839
7791
|
if (e === "target") r.target = a(o[s++]);
|
|
7840
7792
|
else if (e === "level") {
|
|
7841
|
-
let e =
|
|
7793
|
+
let e = Lo(o, s);
|
|
7842
7794
|
r.level = e.level, s = e.next;
|
|
7843
7795
|
} else if (e === "conditions") {
|
|
7844
7796
|
let e = N(o, s);
|
|
7845
7797
|
r.conditions = a(e.text), s = e.next;
|
|
7846
|
-
} else e === "statement" ? r.statement = a(o[s++]) : e === "verified_by" ? r.verifiedBy = G(o[s++]) : e === "source" ? r.source = L(i(o[s++])) : e === "certificate" ? r.certificate =
|
|
7798
|
+
} else e === "statement" ? r.statement = a(o[s++]) : e === "verified_by" ? r.verifiedBy = G(o[s++]) : e === "source" ? r.source = L(i(o[s++])) : e === "certificate" ? r.certificate = Bo(r.id, i(o[s++])) : i(o[s++]);
|
|
7847
7799
|
}
|
|
7848
7800
|
return r;
|
|
7849
7801
|
}
|
|
7850
|
-
function
|
|
7802
|
+
function Ho(e) {
|
|
7851
7803
|
return e.id === "" && !e.target && !e.level && !e.conditions && e.verifiedBy.length === 0 && !e.source && !e.certificate;
|
|
7852
7804
|
}
|
|
7853
|
-
function
|
|
7805
|
+
function Uo(e, t) {
|
|
7854
7806
|
let r = n(e), a = 0;
|
|
7855
7807
|
for (; a < r.length;) {
|
|
7856
7808
|
let e = r[a++];
|
|
7857
7809
|
if (a >= r.length) break;
|
|
7858
|
-
if (e === "metadata") t.is.metadata =
|
|
7859
|
-
else if (e === "provenance") t.is.provenance =
|
|
7860
|
-
else if (e === "structure") t.is.structure =
|
|
7861
|
-
else if (e === "design_parameters") t.is.designParameters =
|
|
7862
|
-
else if (e === "designed_conditions") t.is.designedConditions =
|
|
7863
|
-
else if (e === "promises") t.is.promises =
|
|
7864
|
-
else if (e === "artifacts") t.is.artifacts =
|
|
7810
|
+
if (e === "metadata") t.is.metadata = Oo(i(r[a++]));
|
|
7811
|
+
else if (e === "provenance") t.is.provenance = Oo(i(r[a++]));
|
|
7812
|
+
else if (e === "structure") t.is.structure = Ao(i(r[a++]));
|
|
7813
|
+
else if (e === "design_parameters") t.is.designParameters = ko(i(r[a++]));
|
|
7814
|
+
else if (e === "designed_conditions") t.is.designedConditions = Oo(i(r[a++]));
|
|
7815
|
+
else if (e === "promises") t.is.promises = Ro(i(r[a++]));
|
|
7816
|
+
else if (e === "artifacts") t.is.artifacts = Ao(i(r[a++]));
|
|
7865
7817
|
else if (e === "endpoint") {
|
|
7866
7818
|
let e = F(r[a++] ?? ""), n = a < r.length ? i(r[a++]) : "";
|
|
7867
7819
|
e && t.is.endpoints.push(Qa(e, n));
|
|
7868
|
-
} else e === "composed_of" ? t.is.composedOf = oo(i(r[a++] ?? "")) : a =
|
|
7820
|
+
} else e === "composed_of" ? t.is.composedOf = oo(i(r[a++] ?? "")) : a = Io(t, "is", e, r, a);
|
|
7869
7821
|
}
|
|
7870
7822
|
}
|
|
7871
|
-
function
|
|
7823
|
+
function Wo(e, t) {
|
|
7872
7824
|
let r = n(e), o = 0;
|
|
7873
7825
|
for (; o < r.length;) {
|
|
7874
7826
|
let e = r[o++];
|
|
7875
7827
|
if (o >= r.length) break;
|
|
7876
|
-
if (e === "attributes") t.has.attributes =
|
|
7877
|
-
else if (e === "dimensions") t.has.dimensions =
|
|
7828
|
+
if (e === "attributes") t.has.attributes = ko(i(r[o++]));
|
|
7829
|
+
else if (e === "dimensions") t.has.dimensions = jo(i(r[o++]));
|
|
7878
7830
|
else if (e === "state") t.has.state = a(r[o++]);
|
|
7879
|
-
else if (e === "characteristics") t.has.characteristics =
|
|
7880
|
-
else if (e === "environmental_context") t.has.environmentalContext =
|
|
7881
|
-
else if (e === "artifact_instances") t.has.artifactInstances =
|
|
7831
|
+
else if (e === "characteristics") t.has.characteristics = Mo(i(r[o++]));
|
|
7832
|
+
else if (e === "environmental_context") t.has.environmentalContext = Ao(i(r[o++]));
|
|
7833
|
+
else if (e === "artifact_instances") t.has.artifactInstances = Ao(i(r[o++]));
|
|
7882
7834
|
else if (e === "serve") {
|
|
7883
7835
|
let e = to(r, o);
|
|
7884
7836
|
t.has.serves.push(e.binding), o = e.next;
|
|
7885
|
-
} else o =
|
|
7837
|
+
} else o = Io(t, "has", e, r, o);
|
|
7886
7838
|
}
|
|
7887
7839
|
}
|
|
7888
|
-
function
|
|
7840
|
+
function Go(e, t) {
|
|
7889
7841
|
let r = n(e), i = 0;
|
|
7890
7842
|
for (; i < r.length;) {
|
|
7891
7843
|
let e = r[i++];
|
|
7892
7844
|
if (i >= r.length) break;
|
|
7893
|
-
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i =
|
|
7845
|
+
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i = Io(t, "does", e, r, i);
|
|
7894
7846
|
}
|
|
7895
7847
|
}
|
|
7896
|
-
var
|
|
7848
|
+
var Ko = function(e, t) {
|
|
7897
7849
|
let n = {
|
|
7898
7850
|
id: e,
|
|
7899
7851
|
extends: "",
|
|
@@ -7923,11 +7875,11 @@ var Yo = function(e, t) {
|
|
|
7923
7875
|
for (; s < o.length;) {
|
|
7924
7876
|
let e = o[s++];
|
|
7925
7877
|
if (s >= o.length) break;
|
|
7926
|
-
e === "extends" ? n.extends = a(o[s++]) : e === "is" ?
|
|
7878
|
+
e === "extends" ? n.extends = a(o[s++]) : e === "is" ? Uo(i(o[s++]), n) : e === "has" ? Wo(i(o[s++]), n) : e === "does" ? Go(i(o[s++]), n) : e === "reference" ? n.referenceIds = q(o[s++]) : s = b(o, s, e);
|
|
7927
7879
|
}
|
|
7928
7880
|
return (t) => (t.subjects[e] = n, t);
|
|
7929
7881
|
};
|
|
7930
|
-
function
|
|
7882
|
+
function qo(e, t) {
|
|
7931
7883
|
return {
|
|
7932
7884
|
id: t.id,
|
|
7933
7885
|
extends: "",
|
|
@@ -7977,34 +7929,34 @@ function Xo(e, t) {
|
|
|
7977
7929
|
misplacedAspects: t.misplacedAspects
|
|
7978
7930
|
};
|
|
7979
7931
|
}
|
|
7980
|
-
function
|
|
7932
|
+
function Jo(e, t) {
|
|
7981
7933
|
let n = (t, r) => {
|
|
7982
7934
|
let i = t.extends;
|
|
7983
7935
|
if (!i || r.has(i)) return t;
|
|
7984
7936
|
let a = e.subjects[i];
|
|
7985
|
-
return a ? (r.add(i),
|
|
7937
|
+
return a ? (r.add(i), qo(n(a, r), t)) : t;
|
|
7986
7938
|
};
|
|
7987
7939
|
return n(t, /* @__PURE__ */ new Set([t.id]));
|
|
7988
7940
|
}
|
|
7989
|
-
function
|
|
7941
|
+
function Yo(e, t) {
|
|
7990
7942
|
let n = Object.keys(t);
|
|
7991
7943
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " " + P(t[e])).join(" ") + " }\n";
|
|
7992
7944
|
}
|
|
7993
|
-
function
|
|
7945
|
+
function Xo(e, t) {
|
|
7994
7946
|
let n = Object.keys(t);
|
|
7995
7947
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " :" + (t[e] ? " " + P(t[e]) : "")).join(" ") + " }\n";
|
|
7996
7948
|
}
|
|
7997
|
-
function
|
|
7949
|
+
function Zo(e, t) {
|
|
7998
7950
|
return t.length === 0 ? "" : " " + e + " { " + t.map(P).join(" ") + " }\n";
|
|
7999
7951
|
}
|
|
8000
|
-
function
|
|
7952
|
+
function Qo(e) {
|
|
8001
7953
|
let t = Object.keys(e);
|
|
8002
7954
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " in { " + e[t].join(", ") + " }").join(" ") + " }\n";
|
|
8003
7955
|
}
|
|
8004
|
-
function
|
|
7956
|
+
function $o(e) {
|
|
8005
7957
|
return /^ocl\{[\s\S]*\}$/.test(e) ? e : P(e);
|
|
8006
7958
|
}
|
|
8007
|
-
function
|
|
7959
|
+
function es(e) {
|
|
8008
7960
|
if (e.kind === "symbolic") return "symbolic " + P(e.symbolic ?? "");
|
|
8009
7961
|
if (e.kind === "range") {
|
|
8010
7962
|
let t = "";
|
|
@@ -8012,112 +7964,106 @@ function rs(e) {
|
|
|
8012
7964
|
}
|
|
8013
7965
|
return Ie(e.quantity ?? { value: "" });
|
|
8014
7966
|
}
|
|
8015
|
-
function
|
|
7967
|
+
function ts(e, t) {
|
|
8016
7968
|
let n = t + " ", r = t + "certificate {\n";
|
|
8017
7969
|
return e.attribute && (r += n + "attribute " + P(e.attribute) + "\n"), e.attributes.length > 0 && (r += n + "attributes { " + e.attributes.map(P).join(" ") + " }\n"), e.dimension && (r += n + "dimension " + P(e.dimension) + "\n"), e.type && (r += n + "type " + P(e.type) + "\n"), e.label && (r += n + "label \"" + s(e.label) + "\"\n"), e.obligation && (r += n + "obligation " + P(e.obligation) + "\n"), r += t + "}\n", r;
|
|
8018
7970
|
}
|
|
8019
|
-
function
|
|
7971
|
+
function ns(e, t, n = "") {
|
|
8020
7972
|
let r = t + " ", i = t + n + P(e.id) + " {\n";
|
|
8021
|
-
return e.target && (i += r + "target " + P(e.target) + "\n"), e.level && (i += r + "level " +
|
|
7973
|
+
return e.target && (i += r + "target " + P(e.target) + "\n"), e.level && (i += r + "level " + es(e.level) + "\n"), e.conditions && (i += r + "conditions " + $o(e.conditions) + "\n"), e.statement && (i += r + "statement \"" + s(e.statement) + "\"\n"), i += K("verified_by", e.verifiedBy, r), i += lo("source", e.source ?? null, r), e.certificate && (i += ts(e.certificate, r)), i += t + "}\n", i;
|
|
8022
7974
|
}
|
|
8023
|
-
function
|
|
7975
|
+
function rs(e) {
|
|
8024
7976
|
if (e.length === 0) return "";
|
|
8025
|
-
if (e.every(
|
|
7977
|
+
if (e.every(Ho)) return " promises { " + e.map((e) => P(e.statement)).join(" ") + " }\n";
|
|
8026
7978
|
let t = " promises {\n";
|
|
8027
7979
|
for (let n of e) {
|
|
8028
|
-
if (
|
|
7980
|
+
if (Ho(n)) {
|
|
8029
7981
|
t += " " + P(n.statement) + "\n";
|
|
8030
7982
|
continue;
|
|
8031
7983
|
}
|
|
8032
|
-
t +=
|
|
7984
|
+
t += ns(n, " ");
|
|
8033
7985
|
}
|
|
8034
7986
|
return t += " }\n", t;
|
|
8035
7987
|
}
|
|
8036
|
-
function
|
|
7988
|
+
function is(e) {
|
|
8037
7989
|
let t = Object.keys(e);
|
|
8038
7990
|
if (t.length === 0) return "";
|
|
8039
7991
|
let n = " characteristics {\n";
|
|
8040
7992
|
for (let r of t) {
|
|
8041
7993
|
let t = e[r];
|
|
8042
7994
|
if (t.behavior || t.quantityKind || t.unit || t.source && (t.source.doc || t.source.clause)) {
|
|
8043
|
-
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " +
|
|
7995
|
+
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " + $o(t.derivation) + "\n"), t.behavior && (n += " behavior " + P(t.behavior) + "\n"), t.quantityKind && (n += " quantity_kind " + P(t.quantityKind) + "\n"), t.unit && (n += " unit \"" + s(t.unit) + "\"\n"), n += lo("source", t.source ?? null, " "), n += " }\n";
|
|
8044
7996
|
continue;
|
|
8045
7997
|
}
|
|
8046
|
-
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " +
|
|
7998
|
+
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " + $o(t.derivation)), n += "\n";
|
|
8047
7999
|
}
|
|
8048
8000
|
return n += " }\n", n;
|
|
8049
8001
|
}
|
|
8050
|
-
function
|
|
8002
|
+
function as(e) {
|
|
8051
8003
|
let t = "";
|
|
8052
8004
|
for (let n of e) t += eo(n, " ");
|
|
8053
8005
|
return t;
|
|
8054
8006
|
}
|
|
8055
|
-
function
|
|
8007
|
+
function os(e) {
|
|
8056
8008
|
let t = "";
|
|
8057
8009
|
for (let n of e) t += no(n, " ");
|
|
8058
8010
|
return t;
|
|
8059
8011
|
}
|
|
8060
|
-
var
|
|
8012
|
+
var ss = function(e) {
|
|
8061
8013
|
let t = "subject " + e.id + " {\n";
|
|
8062
8014
|
e.extends && (t += " extends " + e.extends + "\n");
|
|
8063
|
-
let n =
|
|
8015
|
+
let n = Yo("metadata", e.is.metadata) + Yo("provenance", e.is.provenance) + Zo("structure", e.is.structure) + Xo("design_parameters", e.is.designParameters) + Yo("designed_conditions", e.is.designedConditions) + rs(e.is.promises) + Zo("artifacts", e.is.artifacts) + as(e.is.endpoints) + (e.is.composedOf ? co(e.is.composedOf, " ") : "");
|
|
8064
8016
|
n && (t += " is {\n" + n + " }\n");
|
|
8065
|
-
let r =
|
|
8017
|
+
let r = Xo("attributes", e.has.attributes) + Qo(e.has.dimensions) + (e.has.state ? " state " + P(e.has.state) + "\n" : "") + is(e.has.characteristics) + Zo("environmental_context", e.has.environmentalContext) + Zo("artifact_instances", e.has.artifactInstances) + os(e.has.serves);
|
|
8066
8018
|
r && (t += " has {\n" + r + " }\n");
|
|
8067
8019
|
let i = "";
|
|
8068
8020
|
for (let t of e.does.behaviors) i += " behavior " + P(t) + "\n";
|
|
8069
8021
|
return i && (t += " does {\n" + i + " }\n"), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
8070
|
-
},
|
|
8022
|
+
}, cs = {
|
|
8071
8023
|
keyword: "instrument",
|
|
8072
8024
|
field: "instruments",
|
|
8073
8025
|
takesID: !0,
|
|
8074
8026
|
parse: uo,
|
|
8075
8027
|
dump: yo
|
|
8076
|
-
},
|
|
8028
|
+
}, ls = {
|
|
8077
8029
|
keyword: "attribute_definition",
|
|
8078
8030
|
field: "attributeDefinitions",
|
|
8079
8031
|
takesID: !0,
|
|
8080
8032
|
parse: So,
|
|
8081
8033
|
dump: Co
|
|
8082
|
-
},
|
|
8034
|
+
}, us = {
|
|
8083
8035
|
keyword: "capability",
|
|
8084
8036
|
field: "capabilities",
|
|
8085
8037
|
takesID: !0,
|
|
8086
8038
|
parse: wo,
|
|
8087
8039
|
dump: To
|
|
8088
|
-
},
|
|
8040
|
+
}, ds = {
|
|
8089
8041
|
keyword: "behavior",
|
|
8090
8042
|
field: "behaviors",
|
|
8091
8043
|
takesID: !0,
|
|
8092
8044
|
parse: Eo,
|
|
8093
8045
|
dump: Do
|
|
8094
|
-
},
|
|
8095
|
-
keyword: "condition_set",
|
|
8096
|
-
field: "conditionSets",
|
|
8097
|
-
takesID: !0,
|
|
8098
|
-
parse: Oo,
|
|
8099
|
-
dump: Ao
|
|
8100
|
-
}, gs = {
|
|
8046
|
+
}, fs = {
|
|
8101
8047
|
keyword: "subject",
|
|
8102
8048
|
field: "subjects",
|
|
8103
8049
|
takesID: !0,
|
|
8104
|
-
parse:
|
|
8105
|
-
resolve:
|
|
8106
|
-
dump:
|
|
8050
|
+
parse: Ko,
|
|
8051
|
+
resolve: Jo,
|
|
8052
|
+
dump: ss
|
|
8107
8053
|
};
|
|
8108
8054
|
//#endregion
|
|
8109
8055
|
//#region src/ser-des/config/instance.ts
|
|
8110
|
-
function
|
|
8056
|
+
function ps(e) {
|
|
8111
8057
|
return !e.startsWith("\"") && e.endsWith(":") && e.length > 1;
|
|
8112
8058
|
}
|
|
8113
|
-
function
|
|
8059
|
+
function ms(e) {
|
|
8114
8060
|
let t = {}, r = n(e), o = 0;
|
|
8115
8061
|
for (; o < r.length;) {
|
|
8116
8062
|
let e = F(r[o++]);
|
|
8117
8063
|
if (!e) break;
|
|
8118
8064
|
r[o] === ":" && o++;
|
|
8119
8065
|
let n = [];
|
|
8120
|
-
for (; o < r.length && r[o + 1] !== ":" && !
|
|
8066
|
+
for (; o < r.length && r[o + 1] !== ":" && !ps(r[o]);) n.push(r[o++]);
|
|
8121
8067
|
if (n.length === 0) {
|
|
8122
8068
|
t[e] = { value: "" };
|
|
8123
8069
|
continue;
|
|
@@ -8135,7 +8081,7 @@ function vs(e) {
|
|
|
8135
8081
|
}
|
|
8136
8082
|
return t;
|
|
8137
8083
|
}
|
|
8138
|
-
function
|
|
8084
|
+
function hs(e) {
|
|
8139
8085
|
let t = {}, r = n(e), i = 0;
|
|
8140
8086
|
for (; i < r.length;) {
|
|
8141
8087
|
let e = F(r[i++]);
|
|
@@ -8144,18 +8090,18 @@ function ys(e) {
|
|
|
8144
8090
|
}
|
|
8145
8091
|
return t;
|
|
8146
8092
|
}
|
|
8147
|
-
function
|
|
8093
|
+
function gs(e) {
|
|
8148
8094
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
8149
8095
|
}
|
|
8150
|
-
function
|
|
8096
|
+
function _s(e, t) {
|
|
8151
8097
|
let r = n(e), a = 0;
|
|
8152
8098
|
for (; a < r.length;) {
|
|
8153
8099
|
let e = r[a++];
|
|
8154
8100
|
if (a >= r.length) break;
|
|
8155
|
-
e === "attributes" ? t.has.attributes =
|
|
8101
|
+
e === "attributes" ? t.has.attributes = ms(i(r[a++])) : e === "dimensions" ? t.has.dimensions = hs(i(r[a++])) : e === "test_context" ? t.has.testContext = ms(i(r[a++])) : i(r[a++]);
|
|
8156
8102
|
}
|
|
8157
8103
|
}
|
|
8158
|
-
function
|
|
8104
|
+
function vs(e) {
|
|
8159
8105
|
if (e.length === 0) return { value: "" };
|
|
8160
8106
|
let t = a(e[0]);
|
|
8161
8107
|
return e.length === 1 ? { value: t } : {
|
|
@@ -8163,7 +8109,7 @@ function Ss(e) {
|
|
|
8163
8109
|
unit: e.slice(1).map(a).join(" ")
|
|
8164
8110
|
};
|
|
8165
8111
|
}
|
|
8166
|
-
var
|
|
8112
|
+
var ys = function(e, t) {
|
|
8167
8113
|
let n = {
|
|
8168
8114
|
id: e,
|
|
8169
8115
|
of: "",
|
|
@@ -8187,40 +8133,40 @@ var Cs = function(e, t) {
|
|
|
8187
8133
|
s++;
|
|
8188
8134
|
let t = [];
|
|
8189
8135
|
for (; s < o.length && o[s] !== "}" && !(s + 1 < o.length && o[s + 1] === "=");) t.push(o[s++]);
|
|
8190
|
-
n.has.attributes[e] =
|
|
8191
|
-
} else e === "level" ? n.level = a(o[s++]) : e === "model" ? n.model = a(o[s++]) : e === "group" ? n.group = a(o[s++]) : e === "family" ? n.family = a(o[s++]) : e === "definition_versions" ? n.definitionVersions =
|
|
8136
|
+
n.has.attributes[e] = vs(t);
|
|
8137
|
+
} else e === "level" ? n.level = a(o[s++]) : e === "model" ? n.model = a(o[s++]) : e === "group" ? n.group = a(o[s++]) : e === "family" ? n.family = a(o[s++]) : e === "definition_versions" ? n.definitionVersions = hs(i(o[s++])) : e === "has" ? _s(i(o[s++]), n) : e === "reference" ? n.referenceIds = gs(o[s++]) : i(o[s++]);
|
|
8192
8138
|
}
|
|
8193
8139
|
return (t) => (t.instances[e] = n, t);
|
|
8194
8140
|
};
|
|
8195
|
-
function
|
|
8141
|
+
function bs(e, t) {
|
|
8196
8142
|
let n = Object.keys(t);
|
|
8197
8143
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + Fe(t[e])).join(" ") + " }\n";
|
|
8198
8144
|
}
|
|
8199
|
-
function
|
|
8145
|
+
function xs(e, t) {
|
|
8200
8146
|
let n = Object.keys(t);
|
|
8201
8147
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + P(t[e])).join(" ") + " }\n";
|
|
8202
8148
|
}
|
|
8203
|
-
var
|
|
8149
|
+
var Ss = {
|
|
8204
8150
|
keyword: "instance",
|
|
8205
8151
|
field: "instances",
|
|
8206
8152
|
takesID: !0,
|
|
8207
|
-
parse:
|
|
8153
|
+
parse: ys,
|
|
8208
8154
|
dump: function(e) {
|
|
8209
8155
|
let t = "instance " + e.id + " {\n";
|
|
8210
8156
|
e.of && (t += " of " + e.of + "\n"), e.level && (t += " level " + e.level + "\n"), e.model && (t += " model " + e.model + "\n"), e.group && (t += " group " + e.group + "\n"), e.family && (t += " family " + e.family + "\n");
|
|
8211
8157
|
let n = Object.keys(e.definitionVersions);
|
|
8212
8158
|
n.length > 0 && (t += " definition_versions { " + n.map((t) => t + " : " + P(e.definitionVersions[t])).join(" ") + " }\n");
|
|
8213
|
-
let r =
|
|
8159
|
+
let r = bs("attributes", e.has.attributes) + xs("dimensions", e.has.dimensions) + bs("test_context", e.has.testContext);
|
|
8214
8160
|
return r && (t += " has {\n" + r + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
8215
8161
|
}
|
|
8216
|
-
},
|
|
8162
|
+
}, Cs = [
|
|
8217
8163
|
"string",
|
|
8218
8164
|
"designation",
|
|
8219
8165
|
"serial",
|
|
8220
8166
|
"year",
|
|
8221
8167
|
"mark",
|
|
8222
8168
|
"map"
|
|
8223
|
-
],
|
|
8169
|
+
], ws = ["marked-on-instrument", "accompanying-document"], Ts = (e, t) => {
|
|
8224
8170
|
let r = {
|
|
8225
8171
|
id: e,
|
|
8226
8172
|
label: "",
|
|
@@ -8235,11 +8181,11 @@ var Es = {
|
|
|
8235
8181
|
if (t === "label") r.label = a(o());
|
|
8236
8182
|
else if (t === "type") {
|
|
8237
8183
|
let t = a(o());
|
|
8238
|
-
if (!
|
|
8184
|
+
if (!Cs.includes(t)) throw Error(`Parsing error: identity_slot. ID ${e}: Unknown identity slot type "${t}" (valid: ${Cs.join(", ")})`);
|
|
8239
8185
|
r.type = t;
|
|
8240
8186
|
} else if (t === "presentation") {
|
|
8241
8187
|
let t = n(a(o())).map(F).map(a).filter((e) => e.length > 0);
|
|
8242
|
-
for (let n of t) if (!
|
|
8188
|
+
for (let n of t) if (!ws.includes(n)) throw Error(`Parsing error: identity_slot. ID ${e}: Unknown presentation channel "${n}" (valid: ${ws.join(", ")})`);
|
|
8243
8189
|
r.presentation = t;
|
|
8244
8190
|
} else if (t === "optional") r.optional = o() === "true";
|
|
8245
8191
|
else if (t === "definition") r.definition = a(o());
|
|
@@ -8251,10 +8197,10 @@ var Es = {
|
|
|
8251
8197
|
construct: "identity_slot",
|
|
8252
8198
|
id: e
|
|
8253
8199
|
}), (t) => (t.identitySlots[e] = r, t);
|
|
8254
|
-
},
|
|
8200
|
+
}, Es = function(e) {
|
|
8255
8201
|
let t = "identity_slot " + e.id + " {\n";
|
|
8256
8202
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.type && (t += " type " + P(e.type) + "\n"), e.presentation.length > 0 && (t += " presentation { " + e.presentation.map(P).join(" ") + " }\n"), e.optional && (t += " optional true\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.metamodelClass && (t += " metamodel_class " + P(e.metamodelClass) + "\n"), e.source && (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8257
|
-
},
|
|
8203
|
+
}, Ds = [
|
|
8258
8204
|
"marking",
|
|
8259
8205
|
"inscription",
|
|
8260
8206
|
"sealing",
|
|
@@ -8266,7 +8212,7 @@ var Es = {
|
|
|
8266
8212
|
"construction",
|
|
8267
8213
|
"documentation",
|
|
8268
8214
|
"other"
|
|
8269
|
-
],
|
|
8215
|
+
], Os = (e, t) => {
|
|
8270
8216
|
let r = {
|
|
8271
8217
|
id: e,
|
|
8272
8218
|
label: "",
|
|
@@ -8283,7 +8229,7 @@ var Es = {
|
|
|
8283
8229
|
if (t === "label") r.label = a(o());
|
|
8284
8230
|
else if (t === "kind") {
|
|
8285
8231
|
let t = a(o());
|
|
8286
|
-
if (!
|
|
8232
|
+
if (!Ds.includes(t)) throw Error(`Parsing error: aspect. ID ${e}: Unknown aspect kind "${t}" (valid: ${Ds.join(", ")})`);
|
|
8287
8233
|
r.kind = t;
|
|
8288
8234
|
} else if (t === "definition") r.definition = a(o());
|
|
8289
8235
|
else if (t === "metamodel_class") r.metamodelClass = a(o());
|
|
@@ -8298,10 +8244,10 @@ var Es = {
|
|
|
8298
8244
|
construct: "aspect",
|
|
8299
8245
|
id: e
|
|
8300
8246
|
}), (t) => (t.aspects[e] = r, t);
|
|
8301
|
-
},
|
|
8247
|
+
}, ks = function(e) {
|
|
8302
8248
|
let t = "aspect " + e.id + " {\n";
|
|
8303
8249
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.kind && (t += " kind " + P(e.kind) + "\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.metamodelClass && (t += " metamodel_class " + P(e.metamodelClass) + "\n"), e.termRef && (t += " term_ref " + P(e.termRef) + "\n"), e.component && (t += " component " + P(e.component) + "\n"), e.attribute && (t += " attribute " + P(e.attribute) + "\n"), e.contains.length > 0 && (t += " contains { " + e.contains.map(P).join(" ") + " }\n"), e.source && (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8304
|
-
},
|
|
8250
|
+
}, As = (e, t) => {
|
|
8305
8251
|
let n = {
|
|
8306
8252
|
id: e,
|
|
8307
8253
|
promises: []
|
|
@@ -8309,22 +8255,22 @@ var Es = {
|
|
|
8309
8255
|
return y(t, (e, t) => {
|
|
8310
8256
|
if (e === "promise") {
|
|
8311
8257
|
let e = a(F(t()));
|
|
8312
|
-
n.promises.push(
|
|
8258
|
+
n.promises.push(Vo(e, i(t())));
|
|
8313
8259
|
} else return !1;
|
|
8314
8260
|
return !0;
|
|
8315
8261
|
}, {
|
|
8316
8262
|
construct: "promise_set",
|
|
8317
8263
|
id: e
|
|
8318
8264
|
}), (t) => (t.promiseSets[e] = n, t);
|
|
8319
|
-
},
|
|
8265
|
+
}, js = function(e) {
|
|
8320
8266
|
let t = "promise_set " + P(e.id) + " {\n";
|
|
8321
|
-
for (let n of e.promises) t +=
|
|
8267
|
+
for (let n of e.promises) t += ns(n, " ", "promise ");
|
|
8322
8268
|
return t += "}\n", t;
|
|
8323
|
-
},
|
|
8269
|
+
}, Ms = [
|
|
8324
8270
|
"shall",
|
|
8325
8271
|
"should",
|
|
8326
8272
|
"may"
|
|
8327
|
-
],
|
|
8273
|
+
], Ns = (e, t) => {
|
|
8328
8274
|
let n = {
|
|
8329
8275
|
id: e,
|
|
8330
8276
|
declarationForm: "",
|
|
@@ -8345,7 +8291,7 @@ var Es = {
|
|
|
8345
8291
|
else if (n === "description") t.description = a(r());
|
|
8346
8292
|
else if (n === "obligation") {
|
|
8347
8293
|
let n = a(r());
|
|
8348
|
-
if (!
|
|
8294
|
+
if (!Ms.includes(n)) throw Error(`Parsing error: application_declaration. ID ${e}: Unknown obligation "${n}" (valid: ${Ms.join(", ")})`);
|
|
8349
8295
|
t.obligation = n;
|
|
8350
8296
|
} else if (n === "source") t.source = L(i(r()));
|
|
8351
8297
|
else return !1;
|
|
@@ -8360,12 +8306,12 @@ var Es = {
|
|
|
8360
8306
|
construct: "application_declaration",
|
|
8361
8307
|
id: e
|
|
8362
8308
|
}), (t) => (t.applicationDeclarations[e] = n, t);
|
|
8363
|
-
},
|
|
8309
|
+
}, Ps = function(e) {
|
|
8364
8310
|
let t = "application_declaration " + P(e.id) + " {\n";
|
|
8365
8311
|
e.declarationForm && (t += " declaration_form " + P(e.declarationForm) + "\n");
|
|
8366
8312
|
for (let n of e.documents) t += " document " + P(n.id) + " {\n", n.name && (t += " name \"" + s(n.name) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.obligation && (t += " obligation " + P(n.obligation) + "\n"), n.source && (n.source.doc || n.source.clause) && (t += " source {\n", n.source.doc && (t += " doc \"" + s(n.source.doc) + "\"\n"), n.source.clause && (t += " clause \"" + s(n.source.clause) + "\"\n"), t += " }\n"), t += " }\n";
|
|
8367
8313
|
return t += "}\n", t;
|
|
8368
|
-
},
|
|
8314
|
+
}, Fs = (e, t) => {
|
|
8369
8315
|
let n = {
|
|
8370
8316
|
id: e,
|
|
8371
8317
|
fields: []
|
|
@@ -8392,28 +8338,28 @@ var Es = {
|
|
|
8392
8338
|
construct: "calculation_context",
|
|
8393
8339
|
id: e
|
|
8394
8340
|
}), (t) => (t.calculationContexts[e] = n, t);
|
|
8395
|
-
},
|
|
8341
|
+
}, Is = function(e) {
|
|
8396
8342
|
let t = "calculation_context " + P(e.id) + " {\n";
|
|
8397
8343
|
for (let n of e.fields) {
|
|
8398
8344
|
let e = " field " + P(n.id) + " { source " + P(n.source);
|
|
8399
8345
|
n.expression && (e += " expression \"" + s(n.expression) + "\""), t += e + " }\n";
|
|
8400
8346
|
}
|
|
8401
8347
|
return t += "}\n", t;
|
|
8402
|
-
},
|
|
8348
|
+
}, Ls = [
|
|
8403
8349
|
"integer",
|
|
8404
8350
|
"number",
|
|
8405
8351
|
"string",
|
|
8406
8352
|
"text",
|
|
8407
8353
|
"boolean",
|
|
8408
8354
|
"date"
|
|
8409
|
-
],
|
|
8355
|
+
], Rs = [
|
|
8410
8356
|
"MUST",
|
|
8411
8357
|
"SHALL",
|
|
8412
8358
|
"RECOMMEND",
|
|
8413
8359
|
"SHOULD",
|
|
8414
8360
|
"MAY",
|
|
8415
8361
|
"OPTIONAL"
|
|
8416
|
-
],
|
|
8362
|
+
], zs = (e, t) => {
|
|
8417
8363
|
let n = {
|
|
8418
8364
|
id: e,
|
|
8419
8365
|
label: "",
|
|
@@ -8436,14 +8382,14 @@ var Es = {
|
|
|
8436
8382
|
if (n === "label") t.label = a(r());
|
|
8437
8383
|
else if (n === "type") {
|
|
8438
8384
|
let n = a(r());
|
|
8439
|
-
if (!
|
|
8385
|
+
if (!Ls.includes(n)) throw Error(`Parsing error: evaluation_dimensions. ID ${e}: Unknown field type "${n}" (valid: ${Ls.join(", ")})`);
|
|
8440
8386
|
t.type = n;
|
|
8441
8387
|
} else if (n === "enum") t.enumRef = a(r());
|
|
8442
8388
|
else if (n === "required") t.required = r() === "true";
|
|
8443
8389
|
else if (n === "editable") t.editable = r() === "true";
|
|
8444
8390
|
else if (n === "setting") {
|
|
8445
8391
|
let n = a(r());
|
|
8446
|
-
if (!
|
|
8392
|
+
if (!Rs.includes(n)) throw Error(`Parsing error: evaluation_dimensions. ID ${e}: Unknown setting "${n}" (valid: ${Rs.join(", ")})`);
|
|
8447
8393
|
t.setting = n;
|
|
8448
8394
|
} else if (n === "multiple") t.multiple = r() === "true";
|
|
8449
8395
|
else return !1;
|
|
@@ -8458,12 +8404,12 @@ var Es = {
|
|
|
8458
8404
|
construct: "evaluation_dimensions",
|
|
8459
8405
|
id: e
|
|
8460
8406
|
}), (t) => (t.evaluationDimensions[e] = n, t);
|
|
8461
|
-
},
|
|
8407
|
+
}, Bs = function(e) {
|
|
8462
8408
|
let t = "evaluation_dimensions " + P(e.id) + " {\n";
|
|
8463
8409
|
e.label && (t += " label \"" + s(e.label) + "\"\n");
|
|
8464
8410
|
for (let n of e.fields) t += " field " + P(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.type && (t += " type " + P(n.type) + "\n"), n.enumRef && (t += " enum " + P(n.enumRef) + "\n"), t += " required " + (n.required ? "true" : "false") + "\n", t += " editable " + (n.editable ? "true" : "false") + "\n", n.setting && (t += " setting " + P(n.setting) + "\n"), n.multiple && (t += " multiple true\n"), t += " }\n";
|
|
8465
8411
|
return t += "}\n", t;
|
|
8466
|
-
},
|
|
8412
|
+
}, Vs = (e, t) => {
|
|
8467
8413
|
let r = {
|
|
8468
8414
|
id: e,
|
|
8469
8415
|
dimensions: {},
|
|
@@ -8483,13 +8429,13 @@ var Es = {
|
|
|
8483
8429
|
construct: "evaluation_profile",
|
|
8484
8430
|
id: e
|
|
8485
8431
|
}), (t) => (t.evaluationProfiles[e] = r, t);
|
|
8486
|
-
},
|
|
8432
|
+
}, Hs = function(e) {
|
|
8487
8433
|
let t = "evaluation_profile " + P(e.id) + " {\n", n = Object.keys(e.dimensions);
|
|
8488
8434
|
return n.length > 0 && (t += " dimensions { " + n.map((t) => {
|
|
8489
8435
|
let n = e.dimensions[t];
|
|
8490
8436
|
return Array.isArray(n) ? P(t) + " { " + n.map(P).join(" ") + " }" : P(t) + " " + P(n);
|
|
8491
8437
|
}).join(" ") + " }\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), t += "}\n", t;
|
|
8492
|
-
},
|
|
8438
|
+
}, Us = (e, t) => {
|
|
8493
8439
|
let n = {
|
|
8494
8440
|
id: e,
|
|
8495
8441
|
subject: "",
|
|
@@ -8555,7 +8501,7 @@ var Es = {
|
|
|
8555
8501
|
construct: "attestation",
|
|
8556
8502
|
id: e
|
|
8557
8503
|
}), (t) => (t.attestations[e] = n, t);
|
|
8558
|
-
},
|
|
8504
|
+
}, Ws = function(e) {
|
|
8559
8505
|
let t = "attestation " + P(e.id) + " {\n";
|
|
8560
8506
|
e.subject && (t += " subject " + P(e.subject) + "\n"), e.promises && (t += " promises " + P(e.promises) + "\n");
|
|
8561
8507
|
for (let n of e.basis) t += " basis " + P(n.kind) + " \"" + n.id.replace(/"/g, "\\\"") + "\"\n";
|
|
@@ -8570,11 +8516,11 @@ var Es = {
|
|
|
8570
8516
|
t += " }\n";
|
|
8571
8517
|
}
|
|
8572
8518
|
return t += "}\n", t;
|
|
8573
|
-
},
|
|
8574
|
-
function
|
|
8519
|
+
}, Gs = ["mandatory", "optional"];
|
|
8520
|
+
function Ks(e) {
|
|
8575
8521
|
return n(a(e)).map(F).map(a).filter((e) => e.length > 0);
|
|
8576
8522
|
}
|
|
8577
|
-
var
|
|
8523
|
+
var qs = (e, t) => {
|
|
8578
8524
|
let n = {
|
|
8579
8525
|
id: e,
|
|
8580
8526
|
numberFormat: "",
|
|
@@ -8613,11 +8559,11 @@ var Zs = (e, t) => {
|
|
|
8613
8559
|
if (n === "type") t.type = a(r());
|
|
8614
8560
|
else if (n === "label") t.label = a(r());
|
|
8615
8561
|
else if (n === "attribute") t.attribute = a(r());
|
|
8616
|
-
else if (n === "attributes") t.attributes =
|
|
8562
|
+
else if (n === "attributes") t.attributes = Ks(r());
|
|
8617
8563
|
else if (n === "dimension") t.dimension = a(r());
|
|
8618
8564
|
else if (n === "obligation") {
|
|
8619
8565
|
let n = a(r());
|
|
8620
|
-
if (!
|
|
8566
|
+
if (!Gs.includes(n)) throw Error(`Parsing error: certificate_template. ID ${e}: Unknown obligation "${n}" (valid: ${Gs.join(", ")})`);
|
|
8621
8567
|
t.obligation = n;
|
|
8622
8568
|
} else return !1;
|
|
8623
8569
|
return !0;
|
|
@@ -8651,7 +8597,7 @@ var Zs = (e, t) => {
|
|
|
8651
8597
|
construct: "certificate_template",
|
|
8652
8598
|
id: e
|
|
8653
8599
|
}), (t) => (t.certificateTemplates[e] = n, t);
|
|
8654
|
-
},
|
|
8600
|
+
}, Js = function(e) {
|
|
8655
8601
|
let t = "certificate_template " + P(e.id) + " {\n";
|
|
8656
8602
|
e.overlay && (t += " overlay true\n"), e.numberFormat && (t += " number_format \"" + s(e.numberFormat) + "\"\n"), e.dimensionLabels && (t += " dimension_labels {\n", t += " pattern \"" + s(e.dimensionLabels.pattern) + "\"\n", e.dimensionLabels.separator && (t += " separator \"" + s(e.dimensionLabels.separator) + "\"\n"), t += " }\n");
|
|
8657
8603
|
for (let n of e.characteristics) t += " characteristic " + P(n.id) + " {\n", n.type && (t += " type " + P(n.type) + "\n"), n.label && (t += " label \"" + s(n.label) + "\"\n"), n.attribute && (t += " attribute " + P(n.attribute) + "\n"), n.attributes.length > 0 && (t += " attributes { " + n.attributes.map(P).join(" ") + " }\n"), n.dimension && (t += " dimension " + P(n.dimension) + "\n"), n.obligation && (t += " obligation " + n.obligation + "\n"), t += " }\n";
|
|
@@ -8663,16 +8609,16 @@ var Zs = (e, t) => {
|
|
|
8663
8609
|
};
|
|
8664
8610
|
//#endregion
|
|
8665
8611
|
//#region src/ser-des/config/artifact.ts
|
|
8666
|
-
function
|
|
8612
|
+
function Ys(e) {
|
|
8667
8613
|
return n(a(e)).map(F).map(a).filter((e) => e.length > 0);
|
|
8668
8614
|
}
|
|
8669
|
-
function
|
|
8615
|
+
function Xs(e, t, n) {
|
|
8670
8616
|
return t.length === 0 ? "" : `${n}${e} { ${t.join(" ")} }\n`;
|
|
8671
8617
|
}
|
|
8672
|
-
function
|
|
8618
|
+
function Zs(e) {
|
|
8673
8619
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
8674
8620
|
}
|
|
8675
|
-
function
|
|
8621
|
+
function Qs(e) {
|
|
8676
8622
|
let t = [], r = n(e), i = 0;
|
|
8677
8623
|
for (; i < r.length;) {
|
|
8678
8624
|
let e = F(r[i++]);
|
|
@@ -8692,7 +8638,7 @@ function nc(e) {
|
|
|
8692
8638
|
}
|
|
8693
8639
|
return t;
|
|
8694
8640
|
}
|
|
8695
|
-
function
|
|
8641
|
+
function $s(e) {
|
|
8696
8642
|
let t = [], r = n(e), o = 0;
|
|
8697
8643
|
for (; o < r.length;) {
|
|
8698
8644
|
let e = F(r[o++]);
|
|
@@ -8707,14 +8653,14 @@ function rc(e) {
|
|
|
8707
8653
|
for (; t < e.length;) {
|
|
8708
8654
|
let n = e[t++];
|
|
8709
8655
|
if (t >= e.length) break;
|
|
8710
|
-
n === "kinds" ? s.kinds =
|
|
8656
|
+
n === "kinds" ? s.kinds = Ys(e[t++]) : n === "role" ? s.role = a(e[t++]) : i(e[t++]);
|
|
8711
8657
|
}
|
|
8712
8658
|
}
|
|
8713
8659
|
t.push(s);
|
|
8714
8660
|
}
|
|
8715
8661
|
return t;
|
|
8716
8662
|
}
|
|
8717
|
-
function
|
|
8663
|
+
function ec(e) {
|
|
8718
8664
|
let t = {
|
|
8719
8665
|
fields: [],
|
|
8720
8666
|
structure: "",
|
|
@@ -8723,11 +8669,11 @@ function ic(e) {
|
|
|
8723
8669
|
for (; o < r.length;) {
|
|
8724
8670
|
let e = r[o++];
|
|
8725
8671
|
if (o >= r.length) break;
|
|
8726
|
-
e === "fields" ? t.fields =
|
|
8672
|
+
e === "fields" ? t.fields = Qs(i(r[o++])) : e === "structure" ? t.structure = a(r[o++]) : e === "media" ? t.media = $s(i(r[o++])) : o = b(r, o, e);
|
|
8727
8673
|
}
|
|
8728
8674
|
return t;
|
|
8729
8675
|
}
|
|
8730
|
-
var
|
|
8676
|
+
var tc = function(e, t) {
|
|
8731
8677
|
let n = {
|
|
8732
8678
|
id: e,
|
|
8733
8679
|
name: "",
|
|
@@ -8747,7 +8693,7 @@ var ac = function(e, t) {
|
|
|
8747
8693
|
if (s >= o.length) break;
|
|
8748
8694
|
if (e === "name") n.name = a(o[s++]);
|
|
8749
8695
|
else if (e === "description") n.description = a(o[s++]);
|
|
8750
|
-
else if (e === "content_contract") n.contentContract =
|
|
8696
|
+
else if (e === "content_contract") n.contentContract = ec(i(o[s++]));
|
|
8751
8697
|
else if (e === "contract_from") n.contractFrom = F(a(o[s++]));
|
|
8752
8698
|
else if (e === "produced_when") {
|
|
8753
8699
|
let e = a(o[s++] ?? "");
|
|
@@ -8762,7 +8708,7 @@ var ac = function(e, t) {
|
|
|
8762
8708
|
else if (e === "source") {
|
|
8763
8709
|
let e = L(i(o[s++]));
|
|
8764
8710
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
8765
|
-
} else if (e === "reference") n.referenceIds =
|
|
8711
|
+
} else if (e === "reference") n.referenceIds = Zs(o[s++]);
|
|
8766
8712
|
else if (e === "ref") {
|
|
8767
8713
|
let e = C(o, s, a, i);
|
|
8768
8714
|
E(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
@@ -8773,10 +8719,10 @@ var ac = function(e, t) {
|
|
|
8773
8719
|
}
|
|
8774
8720
|
return (t) => (t.artifactDefinitions[e] = n, t);
|
|
8775
8721
|
};
|
|
8776
|
-
function
|
|
8722
|
+
function nc(e) {
|
|
8777
8723
|
return e.kind === "per_interval" ? `per_interval ${P(e.interval ?? "")}` : e.kind === "on_event" ? `on_event ${P(e.event ?? "")}` : e.kind;
|
|
8778
8724
|
}
|
|
8779
|
-
var
|
|
8725
|
+
var rc = function(e) {
|
|
8780
8726
|
let t = "artifact_definition " + e.id + " {\n";
|
|
8781
8727
|
e.name && (t += " name \"" + s(e.name) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.contractFrom && (t += " contract_from " + e.contractFrom + "\n");
|
|
8782
8728
|
let n = e.contentContract;
|
|
@@ -8796,11 +8742,11 @@ var sc = function(e) {
|
|
|
8796
8742
|
}
|
|
8797
8743
|
t += " }\n";
|
|
8798
8744
|
}
|
|
8799
|
-
e.producedWhen.kind && (t += " produced_when " +
|
|
8745
|
+
e.producedWhen.kind && (t += " produced_when " + nc(e.producedWhen) + "\n"), e.retention && (t += " retention \"" + s(e.retention) + "\"\n");
|
|
8800
8746
|
let r = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
8801
8747
|
for (let e of r) t += D(e, " ", s);
|
|
8802
|
-
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t +=
|
|
8803
|
-
},
|
|
8748
|
+
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += Xs("reference", e.referenceIds, " "), t += "}\n", t;
|
|
8749
|
+
}, ic = function(e, t) {
|
|
8804
8750
|
let n = {
|
|
8805
8751
|
id: e,
|
|
8806
8752
|
of: "",
|
|
@@ -8813,34 +8759,34 @@ var sc = function(e) {
|
|
|
8813
8759
|
for (; s < o.length;) {
|
|
8814
8760
|
let e = o[s++];
|
|
8815
8761
|
if (s >= o.length) break;
|
|
8816
|
-
e === "of" ? n.of = a(o[s++]) : e === "produced_at" ? n.producedAt = a(o[s++]) : e === "by" ? n.by = a(o[s++]) : e === "content" ? n.content =
|
|
8762
|
+
e === "of" ? n.of = a(o[s++]) : e === "produced_at" ? n.producedAt = a(o[s++]) : e === "by" ? n.by = a(o[s++]) : e === "content" ? n.content = ms(i(o[s++])) : e === "links" ? n.links = Ys(o[s++]) : e === "reference" ? n.referenceIds = Zs(o[s++]) : s = b(o, s, e);
|
|
8817
8763
|
}
|
|
8818
8764
|
return (t) => (t.artifactInstances[e] = n, t);
|
|
8819
|
-
},
|
|
8765
|
+
}, ac = function(e) {
|
|
8820
8766
|
let t = "artifact_instance " + e.id + " {\n";
|
|
8821
8767
|
e.of && (t += " of " + e.of + "\n"), e.producedAt && (t += " produced_at " + P(e.producedAt) + "\n"), e.by && (t += " by " + P(e.by) + "\n");
|
|
8822
8768
|
let n = Object.keys(e.content);
|
|
8823
|
-
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + Fe(e.content[t])).join(" ") + " }\n"), t +=
|
|
8824
|
-
},
|
|
8769
|
+
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + Fe(e.content[t])).join(" ") + " }\n"), t += Xs("links", e.links, " "), t += Xs("reference", e.referenceIds, " "), t += "}\n", t;
|
|
8770
|
+
}, oc = {
|
|
8825
8771
|
keyword: "artifact_definition",
|
|
8826
8772
|
field: "artifactDefinitions",
|
|
8827
8773
|
takesID: !0,
|
|
8828
|
-
parse:
|
|
8829
|
-
dump:
|
|
8830
|
-
},
|
|
8774
|
+
parse: tc,
|
|
8775
|
+
dump: rc
|
|
8776
|
+
}, sc = {
|
|
8831
8777
|
keyword: "artifact_instance",
|
|
8832
8778
|
field: "artifactInstances",
|
|
8833
8779
|
takesID: !0,
|
|
8834
|
-
parse:
|
|
8835
|
-
dump:
|
|
8836
|
-
},
|
|
8837
|
-
function
|
|
8780
|
+
parse: ic,
|
|
8781
|
+
dump: ac
|
|
8782
|
+
}, cc = I;
|
|
8783
|
+
function lc(e, t) {
|
|
8838
8784
|
let n = e[t] ?? "";
|
|
8839
8785
|
if (n.startsWith("{")) return {
|
|
8840
8786
|
selector: {
|
|
8841
8787
|
kind: "refs",
|
|
8842
8788
|
expression: "",
|
|
8843
|
-
refs:
|
|
8789
|
+
refs: cc(n)
|
|
8844
8790
|
},
|
|
8845
8791
|
next: t + 1
|
|
8846
8792
|
};
|
|
@@ -8865,7 +8811,7 @@ function pc(e, t) {
|
|
|
8865
8811
|
next: t + 1
|
|
8866
8812
|
};
|
|
8867
8813
|
}
|
|
8868
|
-
function
|
|
8814
|
+
function uc(e) {
|
|
8869
8815
|
let t = [], n = be(e), r = 0;
|
|
8870
8816
|
for (; r < n.length;) {
|
|
8871
8817
|
let e = n[r++];
|
|
@@ -8897,7 +8843,7 @@ function mc(e) {
|
|
|
8897
8843
|
}
|
|
8898
8844
|
return t;
|
|
8899
8845
|
}
|
|
8900
|
-
function
|
|
8846
|
+
function dc(e) {
|
|
8901
8847
|
let t = {
|
|
8902
8848
|
requirements: {
|
|
8903
8849
|
kind: "",
|
|
@@ -8913,13 +8859,13 @@ function hc(e) {
|
|
|
8913
8859
|
for (; r < n.length;) {
|
|
8914
8860
|
let e = n[r++];
|
|
8915
8861
|
if (e === "requirements" || e === "promises") {
|
|
8916
|
-
let i =
|
|
8862
|
+
let i = lc(n, r);
|
|
8917
8863
|
t[e] = i.selector, r = i.next;
|
|
8918
8864
|
}
|
|
8919
8865
|
}
|
|
8920
8866
|
return t;
|
|
8921
8867
|
}
|
|
8922
|
-
function
|
|
8868
|
+
function fc(e) {
|
|
8923
8869
|
let t = [], n = be(e), r = 0;
|
|
8924
8870
|
for (; r < n.length;) {
|
|
8925
8871
|
let e = n[r++];
|
|
@@ -8933,7 +8879,7 @@ function gc(e) {
|
|
|
8933
8879
|
}
|
|
8934
8880
|
return t;
|
|
8935
8881
|
}
|
|
8936
|
-
function
|
|
8882
|
+
function pc(e) {
|
|
8937
8883
|
let t = [], n = be(e), r = 0;
|
|
8938
8884
|
for (; r < n.length;) {
|
|
8939
8885
|
let e = n[r++];
|
|
@@ -8947,7 +8893,7 @@ function _c(e) {
|
|
|
8947
8893
|
}
|
|
8948
8894
|
return t;
|
|
8949
8895
|
}
|
|
8950
|
-
function
|
|
8896
|
+
function mc(e) {
|
|
8951
8897
|
let t = [], n = r(e), o = 0;
|
|
8952
8898
|
for (; o < n.length;) {
|
|
8953
8899
|
if (n[o++] !== "on") continue;
|
|
@@ -8955,7 +8901,7 @@ function vc(e) {
|
|
|
8955
8901
|
if (o < n.length && n[o].startsWith("{")) {
|
|
8956
8902
|
t.push({
|
|
8957
8903
|
outcome: e,
|
|
8958
|
-
actions:
|
|
8904
|
+
actions: pc(i(n[o++]))
|
|
8959
8905
|
});
|
|
8960
8906
|
continue;
|
|
8961
8907
|
}
|
|
@@ -8977,7 +8923,7 @@ function vc(e) {
|
|
|
8977
8923
|
}
|
|
8978
8924
|
return t;
|
|
8979
8925
|
}
|
|
8980
|
-
var
|
|
8926
|
+
var hc = function(e, t) {
|
|
8981
8927
|
let n = {
|
|
8982
8928
|
id: e,
|
|
8983
8929
|
over: [],
|
|
@@ -8999,12 +8945,12 @@ var yc = function(e, t) {
|
|
|
8999
8945
|
referenceIds: []
|
|
9000
8946
|
};
|
|
9001
8947
|
return y(t, (e, t) => {
|
|
9002
|
-
if (e === "over") n.over =
|
|
9003
|
-
else if (e === "triggers") n.triggers =
|
|
9004
|
-
else if (e === "evaluate") n.evaluate =
|
|
9005
|
-
else if (e === "emit") n.emit =
|
|
9006
|
-
else if (e === "escalate") n.escalate =
|
|
9007
|
-
else if (e === "reference") n.referenceIds =
|
|
8948
|
+
if (e === "over") n.over = cc(t());
|
|
8949
|
+
else if (e === "triggers") n.triggers = uc(i(t()));
|
|
8950
|
+
else if (e === "evaluate") n.evaluate = dc(i(t()));
|
|
8951
|
+
else if (e === "emit") n.emit = fc(i(t()));
|
|
8952
|
+
else if (e === "escalate") n.escalate = mc(i(t()));
|
|
8953
|
+
else if (e === "reference") n.referenceIds = cc(t());
|
|
9008
8954
|
else return !1;
|
|
9009
8955
|
return !0;
|
|
9010
8956
|
}, {
|
|
@@ -9012,46 +8958,46 @@ var yc = function(e, t) {
|
|
|
9012
8958
|
id: e
|
|
9013
8959
|
}), (t) => (t.monitors[e] = n, t);
|
|
9014
8960
|
};
|
|
9015
|
-
function
|
|
8961
|
+
function gc(e) {
|
|
9016
8962
|
return e.kind === "timer" ? "every " + P(e.every) : e.kind === "signal" ? "on signal " + P(e.signal) : e.kind === "change" ? "on change " + P(e.aspect) : "on " + P(e.kind);
|
|
9017
8963
|
}
|
|
9018
|
-
function
|
|
8964
|
+
function _c(e) {
|
|
9019
8965
|
return e.kind === "applicable_to" ? "applicable_to(" + e.expression + ")" : e.kind === "refs" ? "{ " + e.refs.map(P).join(" ") + " }" : P(e.kind);
|
|
9020
8966
|
}
|
|
9021
|
-
function
|
|
8967
|
+
function vc(e) {
|
|
9022
8968
|
let t = e.actions.map((e) => e.action === "notify" ? "notify " + P(e.role) : P(e.action)).join(" ");
|
|
9023
8969
|
return "on " + P(e.outcome) + " { " + t + " }";
|
|
9024
8970
|
}
|
|
9025
|
-
var
|
|
8971
|
+
var yc = {
|
|
9026
8972
|
keyword: "monitor",
|
|
9027
8973
|
field: "monitors",
|
|
9028
8974
|
takesID: !0,
|
|
9029
|
-
parse:
|
|
8975
|
+
parse: hc,
|
|
9030
8976
|
dump: function(e) {
|
|
9031
8977
|
let t = "monitor " + e.id + " {\n";
|
|
9032
|
-
e.over.length > 0 && (t += " over { " + e.over.map(P).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(
|
|
8978
|
+
e.over.length > 0 && (t += " over { " + e.over.map(P).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(gc).join(" ") + " }\n");
|
|
9033
8979
|
let n = e.evaluate.requirements, r = e.evaluate.promises;
|
|
9034
|
-
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " +
|
|
8980
|
+
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " + _c(n)), r.kind && (t += " promises " + _c(r)), t += " }\n"), e.emit.length > 0 && (t += " emit { " + e.emit.map((e) => e.stream + " -> " + P(e.target)).join(" ") + " }\n"), e.escalate.length > 0 && (t += " escalate { " + e.escalate.map(vc).join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(P).join(" ") + " }\n"), t += "}\n", t;
|
|
9035
8981
|
}
|
|
9036
|
-
},
|
|
8982
|
+
}, bc = [
|
|
9037
8983
|
"identity",
|
|
9038
8984
|
"composition",
|
|
9039
8985
|
"promises_as_verified",
|
|
9040
8986
|
"live_compliance_status",
|
|
9041
8987
|
"artifacts",
|
|
9042
8988
|
"sustainability"
|
|
9043
|
-
],
|
|
8989
|
+
], xc = [
|
|
9044
8990
|
"public",
|
|
9045
8991
|
"restricted",
|
|
9046
8992
|
"authority"
|
|
9047
|
-
],
|
|
8993
|
+
], Sc = [
|
|
9048
8994
|
"model",
|
|
9049
8995
|
"batch",
|
|
9050
8996
|
"item"
|
|
9051
8997
|
];
|
|
9052
8998
|
//#endregion
|
|
9053
8999
|
//#region src/ser-des/config/passport.ts
|
|
9054
|
-
function
|
|
9000
|
+
function Cc(e, t) {
|
|
9055
9001
|
return I(t).map((t) => {
|
|
9056
9002
|
let n = t.indexOf(".");
|
|
9057
9003
|
return n === -1 ? {
|
|
@@ -9065,7 +9011,7 @@ function Dc(e, t) {
|
|
|
9065
9011
|
};
|
|
9066
9012
|
});
|
|
9067
9013
|
}
|
|
9068
|
-
var
|
|
9014
|
+
var wc = function(e, t) {
|
|
9069
9015
|
let n = {
|
|
9070
9016
|
id: e,
|
|
9071
9017
|
upi: {
|
|
@@ -9104,8 +9050,8 @@ var Oc = function(e, t) {
|
|
|
9104
9050
|
} else if (t === "reference") n.referenceIds = I(r());
|
|
9105
9051
|
else {
|
|
9106
9052
|
let i = r();
|
|
9107
|
-
if (
|
|
9108
|
-
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${
|
|
9053
|
+
if (xc.includes(t)) n.entries.push(...Cc(t, i));
|
|
9054
|
+
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${xc.join(" | ")} (fail-closed: an unknown access class is never served)`);
|
|
9109
9055
|
}
|
|
9110
9056
|
return !0;
|
|
9111
9057
|
}, {
|
|
@@ -9113,26 +9059,26 @@ var Oc = function(e, t) {
|
|
|
9113
9059
|
id: e
|
|
9114
9060
|
}), (t) => (t.passports[e] = n, t);
|
|
9115
9061
|
};
|
|
9116
|
-
function
|
|
9062
|
+
function Tc(e) {
|
|
9117
9063
|
return P(e.ref === "" ? e.contentClass : e.contentClass + "." + e.ref);
|
|
9118
9064
|
}
|
|
9119
|
-
var
|
|
9065
|
+
var Ec = {
|
|
9120
9066
|
keyword: "passport",
|
|
9121
9067
|
field: "passports",
|
|
9122
9068
|
takesID: !0,
|
|
9123
|
-
parse:
|
|
9069
|
+
parse: wc,
|
|
9124
9070
|
dump: function(e) {
|
|
9125
9071
|
let t = "passport " + e.id + " {\n";
|
|
9126
9072
|
(e.upi.pattern !== "" || e.upi.level !== "") && (t += " upi {", e.upi.pattern !== "" && (t += " pattern " + P(e.upi.pattern)), e.upi.level !== "" && (t += " level " + P(e.upi.level)), t += " }\n");
|
|
9127
9073
|
for (let n of e.carriers) t += " carrier { kind " + P(n.kind) + " payload " + P(n.payload) + " }\n";
|
|
9128
|
-
let n = [...
|
|
9074
|
+
let n = [...xc, ...[...new Set(e.entries.map((e) => e.access))].filter((e) => !xc.includes(e))];
|
|
9129
9075
|
for (let r of n) {
|
|
9130
9076
|
let n = e.entries.filter((e) => e.access === r);
|
|
9131
|
-
n.length > 0 && (t += " " + r + " { " + n.map(
|
|
9077
|
+
n.length > 0 && (t += " " + r + " { " + n.map(Tc).join(" ") + " }\n");
|
|
9132
9078
|
}
|
|
9133
9079
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(P).join(" ") + " }\n"), t += "}\n", t;
|
|
9134
9080
|
}
|
|
9135
|
-
},
|
|
9081
|
+
}, Dc = {
|
|
9136
9082
|
keyword: "invariant",
|
|
9137
9083
|
field: "invariants",
|
|
9138
9084
|
takesID: !0,
|
|
@@ -9172,7 +9118,7 @@ var Ac = {
|
|
|
9172
9118
|
};
|
|
9173
9119
|
//#endregion
|
|
9174
9120
|
//#region src/ser-des/config/testSequence.ts
|
|
9175
|
-
function
|
|
9121
|
+
function Oc(e, t, n) {
|
|
9176
9122
|
y(e, (e, n) => {
|
|
9177
9123
|
if (e === "test") t.test = a(n());
|
|
9178
9124
|
else if (e === "phase") t.phase = a(n());
|
|
@@ -9185,7 +9131,7 @@ function Mc(e, t, n) {
|
|
|
9185
9131
|
id: n
|
|
9186
9132
|
});
|
|
9187
9133
|
}
|
|
9188
|
-
var
|
|
9134
|
+
var kc = {
|
|
9189
9135
|
keyword: "test_sequence",
|
|
9190
9136
|
field: "testSequences",
|
|
9191
9137
|
takesID: !0,
|
|
@@ -9219,7 +9165,7 @@ var Nc = {
|
|
|
9219
9165
|
role: "",
|
|
9220
9166
|
dependsOn: null
|
|
9221
9167
|
}, r = o[s++];
|
|
9222
|
-
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") &&
|
|
9168
|
+
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") && Oc(i(r), t, e), n.steps.push(t);
|
|
9223
9169
|
} else s++;
|
|
9224
9170
|
}
|
|
9225
9171
|
return (t) => (t.testSequences[e] = n, t);
|
|
@@ -9233,7 +9179,7 @@ var Nc = {
|
|
|
9233
9179
|
for (let n of e.sourceRefs) t += D(n, " ", s);
|
|
9234
9180
|
return t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9235
9181
|
}
|
|
9236
|
-
},
|
|
9182
|
+
}, Ac = {
|
|
9237
9183
|
keyword: "formulas_used",
|
|
9238
9184
|
field: "formulasUsed",
|
|
9239
9185
|
takesID: !0,
|
|
@@ -9268,7 +9214,7 @@ var Nc = {
|
|
|
9268
9214
|
for (let n of e.sourceRefs) t += D(n, " ", s);
|
|
9269
9215
|
return t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9270
9216
|
}
|
|
9271
|
-
},
|
|
9217
|
+
}, jc = function(e, t) {
|
|
9272
9218
|
let n = {
|
|
9273
9219
|
id: e,
|
|
9274
9220
|
entries: []
|
|
@@ -9297,14 +9243,14 @@ var Nc = {
|
|
|
9297
9243
|
let r = t.texts[e];
|
|
9298
9244
|
return r ? r.entries.push(...n.entries) : t.texts[e] = n, t;
|
|
9299
9245
|
};
|
|
9300
|
-
},
|
|
9246
|
+
}, Mc = function(e) {
|
|
9301
9247
|
let t = "text " + e.id + " {\n";
|
|
9302
9248
|
for (let n of e.entries) t += " spell " + n.spelling + (n.via ? " via " + n.via : "") + " \"" + s(n.value) + "\"\n";
|
|
9303
9249
|
return t += "}\n", t;
|
|
9304
9250
|
};
|
|
9305
9251
|
//#endregion
|
|
9306
9252
|
//#region src/ser-des/config/quantityRegister.ts
|
|
9307
|
-
function
|
|
9253
|
+
function Nc(e) {
|
|
9308
9254
|
let t = {}, r = n(e);
|
|
9309
9255
|
for (let e = 0; e + 1 < r.length; e += 2) {
|
|
9310
9256
|
let n = F(r[e]), i = Number(r[e + 1]);
|
|
@@ -9312,11 +9258,11 @@ function Lc(e) {
|
|
|
9312
9258
|
}
|
|
9313
9259
|
return t;
|
|
9314
9260
|
}
|
|
9315
|
-
function
|
|
9261
|
+
function Pc(e, t) {
|
|
9316
9262
|
let n = Number(a(e));
|
|
9317
9263
|
return Number.isNaN(n) ? t : n;
|
|
9318
9264
|
}
|
|
9319
|
-
function
|
|
9265
|
+
function Fc(e, t) {
|
|
9320
9266
|
let r = {
|
|
9321
9267
|
id: e,
|
|
9322
9268
|
dimensions: {},
|
|
@@ -9326,7 +9272,7 @@ function zc(e, t) {
|
|
|
9326
9272
|
for (; s < o.length;) {
|
|
9327
9273
|
let e = o[s++];
|
|
9328
9274
|
if (s >= o.length) break;
|
|
9329
|
-
if (e === "dimensions") r.dimensions =
|
|
9275
|
+
if (e === "dimensions") r.dimensions = Nc(i(o[s++]));
|
|
9330
9276
|
else if (e === "si_unit") r.siUnit = a(o[s++]);
|
|
9331
9277
|
else if (e === "description") r.description = a(o[s++]);
|
|
9332
9278
|
else if (e === "corresponds") {
|
|
@@ -9336,7 +9282,7 @@ function zc(e, t) {
|
|
|
9336
9282
|
}
|
|
9337
9283
|
return r;
|
|
9338
9284
|
}
|
|
9339
|
-
function
|
|
9285
|
+
function Ic(e, t) {
|
|
9340
9286
|
let r = {
|
|
9341
9287
|
id: e,
|
|
9342
9288
|
symbol: "",
|
|
@@ -9352,8 +9298,8 @@ function Bc(e, t) {
|
|
|
9352
9298
|
if (e === "symbol") r.symbol = a(o[s++]);
|
|
9353
9299
|
else if (e === "label") r.label = a(o[s++]);
|
|
9354
9300
|
else if (e === "kind") r.kind = a(o[s++]);
|
|
9355
|
-
else if (e === "factor") r.factorToSI =
|
|
9356
|
-
else if (e === "offset") r.offsetToSI =
|
|
9301
|
+
else if (e === "factor") r.factorToSI = Pc(o[s++], 1);
|
|
9302
|
+
else if (e === "offset") r.offsetToSI = Pc(o[s++], 0);
|
|
9357
9303
|
else if (e === "definition") r.definition = a(o[s++]);
|
|
9358
9304
|
else if (e === "corresponds") {
|
|
9359
9305
|
let { corr: e, next: t } = O(o, s, a);
|
|
@@ -9362,7 +9308,7 @@ function Bc(e, t) {
|
|
|
9362
9308
|
}
|
|
9363
9309
|
return r;
|
|
9364
9310
|
}
|
|
9365
|
-
var
|
|
9311
|
+
var Lc = function(e, t) {
|
|
9366
9312
|
let o = {
|
|
9367
9313
|
id: e,
|
|
9368
9314
|
kinds: [],
|
|
@@ -9372,11 +9318,11 @@ var Vc = function(e, t) {
|
|
|
9372
9318
|
for (; c < s.length;) {
|
|
9373
9319
|
let e = s[c++];
|
|
9374
9320
|
if (c >= s.length) break;
|
|
9375
|
-
e === "kind" ? o.kinds.push(
|
|
9321
|
+
e === "kind" ? o.kinds.push(Fc(F(s[c++]), i(s[c++]))) : e === "unit" ? o.units.push(Ic(F(s[c++]), i(s[c++]))) : e === "reference" ? o.referenceIds = n(a(s[c++])).map(a).filter((e) => e.length > 0) : i(s[c++]);
|
|
9376
9322
|
}
|
|
9377
9323
|
return (t) => (t.quantityRegisters[e] = o, t);
|
|
9378
9324
|
};
|
|
9379
|
-
function
|
|
9325
|
+
function Rc(e) {
|
|
9380
9326
|
let t = "";
|
|
9381
9327
|
for (let n of e ?? []) if (t += " corresponds " + P(n.scheme) + " \"" + s(n.concept) + "\"", n.projections.length > 0) {
|
|
9382
9328
|
t += " {";
|
|
@@ -9389,28 +9335,28 @@ function Hc(e) {
|
|
|
9389
9335
|
}
|
|
9390
9336
|
return t;
|
|
9391
9337
|
}
|
|
9392
|
-
function
|
|
9338
|
+
function zc(e) {
|
|
9393
9339
|
let t = Object.keys(e);
|
|
9394
9340
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " " + e[t]).join(" ") + " }";
|
|
9395
9341
|
}
|
|
9396
|
-
var
|
|
9342
|
+
var Bc = {
|
|
9397
9343
|
keyword: "quantity_register",
|
|
9398
9344
|
field: "quantityRegisters",
|
|
9399
9345
|
takesID: !0,
|
|
9400
|
-
parse:
|
|
9346
|
+
parse: Lc,
|
|
9401
9347
|
dump: function(e) {
|
|
9402
9348
|
let t = "quantity_register " + e.id + " {\n";
|
|
9403
9349
|
for (let n of e.kinds) {
|
|
9404
|
-
let e = " kind " + n.id + " {" +
|
|
9405
|
-
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e +=
|
|
9350
|
+
let e = " kind " + n.id + " {" + zc(n.dimensions);
|
|
9351
|
+
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e += Rc(n.correspondences), t += e + " }\n";
|
|
9406
9352
|
}
|
|
9407
9353
|
for (let n of e.units) {
|
|
9408
9354
|
let e = " unit " + P(n.id) + " {";
|
|
9409
|
-
n.symbol && (e += " symbol \"" + s(n.symbol) + "\""), n.label && (e += " label \"" + s(n.label) + "\""), n.kind && (e += " kind " + n.kind), n.factorToSI !== 1 && (e += " factor " + n.factorToSI), n.offsetToSI !== 0 && (e += " offset " + n.offsetToSI), n.definition && (e += " definition \"" + s(n.definition) + "\""), e +=
|
|
9355
|
+
n.symbol && (e += " symbol \"" + s(n.symbol) + "\""), n.label && (e += " label \"" + s(n.label) + "\""), n.kind && (e += " kind " + n.kind), n.factorToSI !== 1 && (e += " factor " + n.factorToSI), n.offsetToSI !== 0 && (e += " offset " + n.offsetToSI), n.definition && (e += " definition \"" + s(n.definition) + "\""), e += Rc(n.correspondences), t += e + " }\n";
|
|
9410
9356
|
}
|
|
9411
9357
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
9412
9358
|
}
|
|
9413
|
-
},
|
|
9359
|
+
}, Vc = {
|
|
9414
9360
|
keyword: "dual",
|
|
9415
9361
|
field: "duals",
|
|
9416
9362
|
takesID: !0,
|
|
@@ -9434,18 +9380,18 @@ var Wc = {
|
|
|
9434
9380
|
};
|
|
9435
9381
|
//#endregion
|
|
9436
9382
|
//#region src/ser-des/config/trustRef.ts
|
|
9437
|
-
function
|
|
9383
|
+
function Hc(e, t, n) {
|
|
9438
9384
|
let r = {
|
|
9439
9385
|
org: n(e()),
|
|
9440
9386
|
kid: ""
|
|
9441
9387
|
};
|
|
9442
9388
|
return t() === "key" && (e(), r.kid = n(e())), r;
|
|
9443
9389
|
}
|
|
9444
|
-
function
|
|
9390
|
+
function Uc(e, t, n) {
|
|
9445
9391
|
let r = `${t}trust_ref ${n(e.org)}`;
|
|
9446
9392
|
return e.kid !== "" && (r += ` key ${n(e.kid)}`), r + "\n";
|
|
9447
9393
|
}
|
|
9448
|
-
var
|
|
9394
|
+
var Wc = {
|
|
9449
9395
|
keyword: "dataspace",
|
|
9450
9396
|
field: "dataspaces",
|
|
9451
9397
|
takesID: !0,
|
|
@@ -9510,7 +9456,7 @@ var Jc = {
|
|
|
9510
9456
|
description: ""
|
|
9511
9457
|
}, o = r();
|
|
9512
9458
|
o && o.startsWith("{") && y(i(t()), (t, n, r) => {
|
|
9513
|
-
if (t === "trust_ref") e.trustRef =
|
|
9459
|
+
if (t === "trust_ref") e.trustRef = Hc(n, r, a);
|
|
9514
9460
|
else if (t === "role") e.role = a(n());
|
|
9515
9461
|
else if (t === "description") e.description = x(n);
|
|
9516
9462
|
else return !1;
|
|
@@ -9540,17 +9486,17 @@ var Jc = {
|
|
|
9540
9486
|
for (let n of e.participantClasses) t += " participant_class " + P(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
9541
9487
|
for (let n of e.artifactClasses) t += " artifact_class " + P(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.element && (t += " element " + P(n.element) + "\n"), n.policy && (t += " policy " + P(n.policy) + "\n"), t += " }\n";
|
|
9542
9488
|
e.policies.length > 0 && (t += " policies { " + e.policies.map(P).join(" ") + " }\n"), e.defaultPolicy && (t += " default_policy " + P(e.defaultPolicy) + "\n");
|
|
9543
|
-
for (let n of e.trustAnchors) t += " trust_anchor " + P(n.id) + " {\n", n.trustRef && (t +=
|
|
9489
|
+
for (let n of e.trustAnchors) t += " trust_anchor " + P(n.id) + " {\n", n.trustRef && (t += Uc(n.trustRef, " ", P)), n.role && (t += " role " + P(n.role) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
9544
9490
|
e.compatibleWith.length > 0 && (t += " compatible_with { " + e.compatibleWith.map(P).join(" ") + " }\n");
|
|
9545
9491
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
9546
9492
|
for (let e of n) t += D(e, " ", s);
|
|
9547
9493
|
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9548
9494
|
}
|
|
9549
|
-
},
|
|
9495
|
+
}, Gc = [
|
|
9550
9496
|
"permission",
|
|
9551
9497
|
"obligation",
|
|
9552
9498
|
"prohibition"
|
|
9553
|
-
],
|
|
9499
|
+
], Kc = {
|
|
9554
9500
|
keyword: "policy",
|
|
9555
9501
|
field: "policies",
|
|
9556
9502
|
takesID: !0,
|
|
@@ -9584,7 +9530,7 @@ var Jc = {
|
|
|
9584
9530
|
t && t.startsWith("{") && y(i(r()), (t, n) => {
|
|
9585
9531
|
if (t === "kind") {
|
|
9586
9532
|
let t = a(n());
|
|
9587
|
-
if (!
|
|
9533
|
+
if (!Gc.includes(t)) throw Error(`Parsing error: policy.rule. ID ${e.id}: unknown rule kind "${t}" — rule kinds are ${Gc.join(" | ")} (fail-closed: a misspelt kind never parses into a rule that says nothing)`);
|
|
9588
9534
|
e.kind = t;
|
|
9589
9535
|
} else if (t === "action") e.action = a(n());
|
|
9590
9536
|
else if (t === "artifact") e.artifact = a(n());
|
|
@@ -9621,7 +9567,7 @@ var Jc = {
|
|
|
9621
9567
|
for (let e of n) t += D(e, " ", s);
|
|
9622
9568
|
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9623
9569
|
}
|
|
9624
|
-
},
|
|
9570
|
+
}, qc = {
|
|
9625
9571
|
keyword: "dimension",
|
|
9626
9572
|
field: "dimensions",
|
|
9627
9573
|
takesID: !0,
|
|
@@ -9632,7 +9578,7 @@ var Jc = {
|
|
|
9632
9578
|
dump: function(e) {
|
|
9633
9579
|
return _o(e, "");
|
|
9634
9580
|
}
|
|
9635
|
-
},
|
|
9581
|
+
}, Jc = (e, t) => {
|
|
9636
9582
|
let n = {
|
|
9637
9583
|
id: e,
|
|
9638
9584
|
label: "",
|
|
@@ -9651,13 +9597,13 @@ var Jc = {
|
|
|
9651
9597
|
construct: "activity_archetype",
|
|
9652
9598
|
id: e
|
|
9653
9599
|
}), (t) => (t.activityArchetypes[e] = n, t);
|
|
9654
|
-
},
|
|
9600
|
+
}, Yc = function(e) {
|
|
9655
9601
|
let t = "activity_archetype " + e.id + " {\n";
|
|
9656
9602
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.parent && (t += " parent " + P(e.parent) + "\n"), t += "}\n", t;
|
|
9657
9603
|
};
|
|
9658
9604
|
//#endregion
|
|
9659
9605
|
//#region src/ser-des/config/participantKind.ts
|
|
9660
|
-
function
|
|
9606
|
+
function Xc(e) {
|
|
9661
9607
|
let t = {
|
|
9662
9608
|
delegates_to: "",
|
|
9663
9609
|
clause: "",
|
|
@@ -9674,7 +9620,7 @@ function el(e) {
|
|
|
9674
9620
|
id: ""
|
|
9675
9621
|
}), t;
|
|
9676
9622
|
}
|
|
9677
|
-
function
|
|
9623
|
+
function Zc(e) {
|
|
9678
9624
|
let t = {
|
|
9679
9625
|
decided_by: "",
|
|
9680
9626
|
on_recommendation_of: "",
|
|
@@ -9693,7 +9639,7 @@ function tl(e) {
|
|
|
9693
9639
|
id: ""
|
|
9694
9640
|
}), t;
|
|
9695
9641
|
}
|
|
9696
|
-
function
|
|
9642
|
+
function Qc(e, t) {
|
|
9697
9643
|
let n = {
|
|
9698
9644
|
id: e,
|
|
9699
9645
|
label: "",
|
|
@@ -9717,7 +9663,7 @@ function nl(e, t) {
|
|
|
9717
9663
|
id: e
|
|
9718
9664
|
}), n;
|
|
9719
9665
|
}
|
|
9720
|
-
var
|
|
9666
|
+
var $c = (e, t) => {
|
|
9721
9667
|
let n = {
|
|
9722
9668
|
id: e,
|
|
9723
9669
|
label: "",
|
|
@@ -9745,8 +9691,8 @@ var rl = (e, t) => {
|
|
|
9745
9691
|
else if (t === "clause") n.clause = a(r());
|
|
9746
9692
|
else if (t === "definition") n.definition = a(r());
|
|
9747
9693
|
else if (t === "member") n.member = a(r());
|
|
9748
|
-
else if (t === "competence") n.competence =
|
|
9749
|
-
else if (t === "approval") n.approval =
|
|
9694
|
+
else if (t === "competence") n.competence = Xc(i(r()));
|
|
9695
|
+
else if (t === "approval") n.approval = Zc(i(r()));
|
|
9750
9696
|
else if (t === "approved_by") n.approved_by = a(r());
|
|
9751
9697
|
else if (t === "designated_by") n.designated_by = a(r());
|
|
9752
9698
|
else if (t === "declaration") n.declaration = a(r());
|
|
@@ -9756,7 +9702,7 @@ var rl = (e, t) => {
|
|
|
9756
9702
|
else if (t === "subkind") {
|
|
9757
9703
|
let t = a(r()), s = o();
|
|
9758
9704
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: participant_kind. ID ${e}: subkind ${t} is missing its block`);
|
|
9759
|
-
n.subkinds.push(
|
|
9705
|
+
n.subkinds.push(Qc(t, i(r())));
|
|
9760
9706
|
} else if (t === "source") n.source = L(i(r()));
|
|
9761
9707
|
else return !1;
|
|
9762
9708
|
return !0;
|
|
@@ -9765,24 +9711,24 @@ var rl = (e, t) => {
|
|
|
9765
9711
|
id: e
|
|
9766
9712
|
}), (t) => (t.participantKinds[e] = n, t);
|
|
9767
9713
|
};
|
|
9768
|
-
function
|
|
9714
|
+
function el(e) {
|
|
9769
9715
|
let t = " competence {\n";
|
|
9770
9716
|
return e.delegates_to && (t += " delegates_to " + P(e.delegates_to) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += " }\n", t;
|
|
9771
9717
|
}
|
|
9772
|
-
function
|
|
9718
|
+
function tl(e) {
|
|
9773
9719
|
let t = " approval {\n";
|
|
9774
9720
|
return e.decided_by && (t += " decided_by " + P(e.decided_by) + "\n"), e.on_recommendation_of && (t += " on_recommendation_of " + P(e.on_recommendation_of) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
9775
9721
|
}
|
|
9776
|
-
function
|
|
9722
|
+
function nl(e) {
|
|
9777
9723
|
let t = " subkind " + P(e.id) + " {\n";
|
|
9778
9724
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.data_flag && (t += " data_flag \"" + s(e.data_flag) + "\"\n"), e.acceptance && (t += " acceptance " + P(e.acceptance) + "\n"), e.acceptance_note && (t += " acceptance_note \"" + s(e.acceptance_note) + "\"\n"), t += " }\n", t;
|
|
9779
9725
|
}
|
|
9780
|
-
var
|
|
9726
|
+
var rl = function(e) {
|
|
9781
9727
|
let t = "participant_kind " + e.id + " {\n";
|
|
9782
|
-
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + P(e.member) + "\n"), e.competence && (t +=
|
|
9783
|
-
for (let n of e.subkinds) t +=
|
|
9728
|
+
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + P(e.member) + "\n"), e.competence && (t += el(e.competence)), e.approval && (t += tl(e.approval)), e.approved_by && (t += " approved_by " + P(e.approved_by) + "\n"), e.designated_by && (t += " designated_by " + P(e.designated_by) + "\n"), e.declaration && (t += " declaration " + P(e.declaration) + "\n"), e.admission && (t += " admission \"" + s(e.admission) + "\"\n"), e.becomes && (t += " becomes " + P(e.becomes) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n");
|
|
9729
|
+
for (let n of e.subkinds) t += nl(n);
|
|
9784
9730
|
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
9785
|
-
},
|
|
9731
|
+
}, il = (e, t) => {
|
|
9786
9732
|
let n = {
|
|
9787
9733
|
id: e,
|
|
9788
9734
|
label: "",
|
|
@@ -9810,13 +9756,13 @@ var sl = function(e) {
|
|
|
9810
9756
|
construct: "governance_organ",
|
|
9811
9757
|
id: e
|
|
9812
9758
|
}), (t) => (t.governanceOrgans[e] = n, t);
|
|
9813
|
-
},
|
|
9759
|
+
}, al = function(e) {
|
|
9814
9760
|
let t = "governance_organ " + e.id + " {\n";
|
|
9815
9761
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.mandate && (t += " mandate \"" + s(e.mandate) + "\"\n"), e.sub_committee_of && (t += " sub_committee_of " + P(e.sub_committee_of) + "\n"), e.independent_of && (t += " independent_of " + P(e.independent_of) + "\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
9816
9762
|
};
|
|
9817
9763
|
//#endregion
|
|
9818
9764
|
//#region src/ser-des/config/declaration.ts
|
|
9819
|
-
function
|
|
9765
|
+
function ol(e, t) {
|
|
9820
9766
|
let n = {
|
|
9821
9767
|
id: e,
|
|
9822
9768
|
clause: "",
|
|
@@ -9832,7 +9778,7 @@ function ul(e, t) {
|
|
|
9832
9778
|
id: e
|
|
9833
9779
|
}), n;
|
|
9834
9780
|
}
|
|
9835
|
-
var
|
|
9781
|
+
var sl = (e, t) => {
|
|
9836
9782
|
let n = {
|
|
9837
9783
|
id: e,
|
|
9838
9784
|
label: "",
|
|
@@ -9859,7 +9805,7 @@ var dl = (e, t) => {
|
|
|
9859
9805
|
else if (t === "content") {
|
|
9860
9806
|
let t = a(r()), s = o();
|
|
9861
9807
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: declaration_kind. ID ${e}: content ${t} is missing its block`);
|
|
9862
|
-
n.content.push(
|
|
9808
|
+
n.content.push(ol(t, i(r())));
|
|
9863
9809
|
} else if (t === "source") n.source = L(i(r()));
|
|
9864
9810
|
else return !1;
|
|
9865
9811
|
return !0;
|
|
@@ -9868,20 +9814,20 @@ var dl = (e, t) => {
|
|
|
9868
9814
|
id: e
|
|
9869
9815
|
}), (t) => (t.declarationKinds[e] = n, t);
|
|
9870
9816
|
};
|
|
9871
|
-
function
|
|
9817
|
+
function cl(e) {
|
|
9872
9818
|
let t = " content " + P(e.id) + " {\n";
|
|
9873
9819
|
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), t += " }\n", t;
|
|
9874
9820
|
}
|
|
9875
|
-
function
|
|
9821
|
+
function ll(e) {
|
|
9876
9822
|
let t = " source {\n";
|
|
9877
9823
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
9878
9824
|
}
|
|
9879
|
-
var
|
|
9825
|
+
var ul = function(e) {
|
|
9880
9826
|
let t = "declaration_kind " + e.id + " {\n";
|
|
9881
9827
|
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.holder && (t += " holder " + P(e.holder) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.scope_model && (t += " scope_model " + P(e.scope_model) + "\n"), e.scheme_a_obligation && (t += " scheme_a_obligation \"" + s(e.scheme_a_obligation) + "\"\n");
|
|
9882
|
-
for (let n of e.content) t +=
|
|
9883
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
9884
|
-
},
|
|
9828
|
+
for (let n of e.content) t += cl(n);
|
|
9829
|
+
return (e.source.doc || e.source.clause) && (t += ll(e.source)), t += "}\n", t;
|
|
9830
|
+
}, dl = (e, t) => {
|
|
9885
9831
|
let n = {
|
|
9886
9832
|
id: e,
|
|
9887
9833
|
description: ""
|
|
@@ -9894,10 +9840,10 @@ var ml = function(e) {
|
|
|
9894
9840
|
construct: "declaration_status",
|
|
9895
9841
|
id: e
|
|
9896
9842
|
}), (t) => (t.declarationStatuses[e] = n, t);
|
|
9897
|
-
},
|
|
9843
|
+
}, fl = function(e) {
|
|
9898
9844
|
let t = "declaration_status " + e.id + " {\n";
|
|
9899
9845
|
return e.description && (t += " description \"" + s(e.description) + "\"\n"), t += "}\n", t;
|
|
9900
|
-
},
|
|
9846
|
+
}, pl = (e, t) => {
|
|
9901
9847
|
let n = {
|
|
9902
9848
|
id: e,
|
|
9903
9849
|
clause: "",
|
|
@@ -9927,13 +9873,13 @@ var ml = function(e) {
|
|
|
9927
9873
|
construct: "declaration_gate",
|
|
9928
9874
|
id: e
|
|
9929
9875
|
}), (t) => (t.declarationGates[e] = n, t);
|
|
9930
|
-
},
|
|
9876
|
+
}, ml = function(e) {
|
|
9931
9877
|
let t = "declaration_gate " + e.id + " {\n";
|
|
9932
|
-
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + P(e.holder) + "\n"), e.declaration && (t += " declaration " + P(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(P).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(P).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t +=
|
|
9878
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + P(e.holder) + "\n"), e.declaration && (t += " declaration " + P(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(P).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(P).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t += ll(e.source)), t += "}\n", t;
|
|
9933
9879
|
};
|
|
9934
9880
|
//#endregion
|
|
9935
9881
|
//#region src/ser-des/config/scheme.ts
|
|
9936
|
-
function
|
|
9882
|
+
function hl(e) {
|
|
9937
9883
|
let t = {
|
|
9938
9884
|
method: "",
|
|
9939
9885
|
clause: "",
|
|
@@ -9952,7 +9898,7 @@ function yl(e) {
|
|
|
9952
9898
|
id: ""
|
|
9953
9899
|
}), t;
|
|
9954
9900
|
}
|
|
9955
|
-
var
|
|
9901
|
+
var gl = (e, t) => {
|
|
9956
9902
|
let n = {
|
|
9957
9903
|
id: e,
|
|
9958
9904
|
label: "",
|
|
@@ -9970,7 +9916,7 @@ var bl = (e, t) => {
|
|
|
9970
9916
|
else if (e === "term") n.term = a(t());
|
|
9971
9917
|
else if (e === "clause") n.clause = a(t());
|
|
9972
9918
|
else if (e === "definition") n.definition = a(t());
|
|
9973
|
-
else if (e === "demonstration") n.demonstration =
|
|
9919
|
+
else if (e === "demonstration") n.demonstration = hl(i(t()));
|
|
9974
9920
|
else if (e === "source") n.source = L(i(t()));
|
|
9975
9921
|
else return !1;
|
|
9976
9922
|
return !0;
|
|
@@ -9979,19 +9925,19 @@ var bl = (e, t) => {
|
|
|
9979
9925
|
id: e
|
|
9980
9926
|
}), (t) => (t.schemeDefinitions[e] = n, t);
|
|
9981
9927
|
};
|
|
9982
|
-
function
|
|
9928
|
+
function _l(e) {
|
|
9983
9929
|
let t = " source {\n";
|
|
9984
9930
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
9985
9931
|
}
|
|
9986
|
-
var
|
|
9932
|
+
var vl = function(e) {
|
|
9987
9933
|
let t = "scheme_definition " + e.id + " {\n";
|
|
9988
9934
|
if (e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.demonstration) {
|
|
9989
9935
|
let n = e.demonstration;
|
|
9990
9936
|
t += " demonstration {\n", n.method && (t += " method " + P(n.method) + "\n"), n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.basis.length > 0 && (t += " basis { " + n.basis.map(P).join(" ") + " }\n"), n.note && (t += " note \"" + s(n.note) + "\"\n"), t += " }\n";
|
|
9991
9937
|
}
|
|
9992
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
9938
|
+
return (e.source.doc || e.source.clause) && (t += _l(e.source)), t += "}\n", t;
|
|
9993
9939
|
};
|
|
9994
|
-
function
|
|
9940
|
+
function yl(e) {
|
|
9995
9941
|
let t = {
|
|
9996
9942
|
action: "",
|
|
9997
9943
|
automatic: !1,
|
|
@@ -10012,7 +9958,7 @@ function Cl(e) {
|
|
|
10012
9958
|
id: ""
|
|
10013
9959
|
}), t;
|
|
10014
9960
|
}
|
|
10015
|
-
function
|
|
9961
|
+
function bl(e) {
|
|
10016
9962
|
let t = {
|
|
10017
9963
|
clause: "",
|
|
10018
9964
|
decided_by: "",
|
|
@@ -10031,7 +9977,7 @@ function wl(e) {
|
|
|
10031
9977
|
id: ""
|
|
10032
9978
|
}), t;
|
|
10033
9979
|
}
|
|
10034
|
-
function
|
|
9980
|
+
function xl(e, t) {
|
|
10035
9981
|
let n = {
|
|
10036
9982
|
id: e,
|
|
10037
9983
|
kind: "",
|
|
@@ -10060,7 +10006,7 @@ function Tl(e, t) {
|
|
|
10060
10006
|
id: e
|
|
10061
10007
|
}), n;
|
|
10062
10008
|
}
|
|
10063
|
-
var
|
|
10009
|
+
var Sl = (e, t) => {
|
|
10064
10010
|
let n = {
|
|
10065
10011
|
id: e,
|
|
10066
10012
|
applies_to: "",
|
|
@@ -10076,7 +10022,7 @@ var El = (e, t) => {
|
|
|
10076
10022
|
return y(t, (t, r, o) => {
|
|
10077
10023
|
if (t === "applies_to") n.applies_to = a(r());
|
|
10078
10024
|
else if (t === "initial") n.initial = a(r());
|
|
10079
|
-
else if (t === "entry") n.entry =
|
|
10025
|
+
else if (t === "entry") n.entry = yl(i(r()));
|
|
10080
10026
|
else if (t === "transition") {
|
|
10081
10027
|
let t = a(r()), s = o();
|
|
10082
10028
|
if (s === void 0 || s !== "->" && s !== "→") throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} is missing its '->'`);
|
|
@@ -10085,7 +10031,7 @@ var El = (e, t) => {
|
|
|
10085
10031
|
o() === "action" && (r(), l = a(r()));
|
|
10086
10032
|
let u = o();
|
|
10087
10033
|
if (u === void 0 || !u.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} -> ${c} is missing its block`);
|
|
10088
|
-
let d =
|
|
10034
|
+
let d = bl(i(r()));
|
|
10089
10035
|
n.transitions.push({
|
|
10090
10036
|
from: t,
|
|
10091
10037
|
to: c,
|
|
@@ -10095,7 +10041,7 @@ var El = (e, t) => {
|
|
|
10095
10041
|
} else if (t === "trigger") {
|
|
10096
10042
|
let t = a(r()), s = o();
|
|
10097
10043
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: trigger ${t} is missing its block`);
|
|
10098
|
-
n.triggers.push(
|
|
10044
|
+
n.triggers.push(xl(t, i(r())));
|
|
10099
10045
|
} else if (t === "source") n.source = L(i(r()));
|
|
10100
10046
|
else return !1;
|
|
10101
10047
|
return !0;
|
|
@@ -10103,7 +10049,7 @@ var El = (e, t) => {
|
|
|
10103
10049
|
construct: "scheme_lifecycle",
|
|
10104
10050
|
id: e
|
|
10105
10051
|
}), (t) => (t.schemeLifecycles[e] = n, t);
|
|
10106
|
-
},
|
|
10052
|
+
}, Cl = function(e) {
|
|
10107
10053
|
let t = "scheme_lifecycle " + e.id + " {\n";
|
|
10108
10054
|
if (e.applies_to && (t += " applies_to " + P(e.applies_to) + "\n"), e.initial && (t += " initial " + P(e.initial) + "\n"), e.entry) {
|
|
10109
10055
|
let n = e.entry;
|
|
@@ -10117,15 +10063,15 @@ var El = (e, t) => {
|
|
|
10117
10063
|
}
|
|
10118
10064
|
n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.deferrable && (t += " deferrable true\n"), n.deferral_note && (t += " deferral_note \"" + s(n.deferral_note) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10119
10065
|
}
|
|
10120
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
10066
|
+
return (e.source.doc || e.source.clause) && (t += _l(e.source)), t += "}\n", t;
|
|
10121
10067
|
};
|
|
10122
10068
|
//#endregion
|
|
10123
10069
|
//#region src/ser-des/config/frameworkDocument.ts
|
|
10124
|
-
function
|
|
10070
|
+
function wl(e) {
|
|
10125
10071
|
let t = " source {\n";
|
|
10126
10072
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
10127
10073
|
}
|
|
10128
|
-
var
|
|
10074
|
+
var Tl = (e, t) => {
|
|
10129
10075
|
let n = {
|
|
10130
10076
|
id: e,
|
|
10131
10077
|
rank: 0,
|
|
@@ -10153,10 +10099,10 @@ var kl = (e, t) => {
|
|
|
10153
10099
|
construct: "framework_document",
|
|
10154
10100
|
id: e
|
|
10155
10101
|
}), (t) => (t.frameworkDocuments[e] = n, t);
|
|
10156
|
-
},
|
|
10102
|
+
}, El = function(e) {
|
|
10157
10103
|
let t = "framework_document " + e.id + " {\n";
|
|
10158
|
-
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + P(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
10159
|
-
},
|
|
10104
|
+
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + P(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += wl(e.source)), t += "}\n", t;
|
|
10105
|
+
}, Dl = (e, t) => {
|
|
10160
10106
|
let n = {
|
|
10161
10107
|
id: e,
|
|
10162
10108
|
clause: "",
|
|
@@ -10176,11 +10122,11 @@ var kl = (e, t) => {
|
|
|
10176
10122
|
construct: "document_precedence",
|
|
10177
10123
|
id: e
|
|
10178
10124
|
}), (t) => (t.documentPrecedences[e] = n, t);
|
|
10179
|
-
},
|
|
10125
|
+
}, Ol = function(e) {
|
|
10180
10126
|
let t = "document_precedence " + e.id + " {\n";
|
|
10181
|
-
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
10127
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t += wl(e.source)), t += "}\n", t;
|
|
10182
10128
|
};
|
|
10183
|
-
function
|
|
10129
|
+
function kl(e, t) {
|
|
10184
10130
|
let n = {
|
|
10185
10131
|
id: e,
|
|
10186
10132
|
clause: "",
|
|
@@ -10196,7 +10142,7 @@ function Nl(e, t) {
|
|
|
10196
10142
|
id: e
|
|
10197
10143
|
}), n;
|
|
10198
10144
|
}
|
|
10199
|
-
var
|
|
10145
|
+
var Al = (e, t) => {
|
|
10200
10146
|
let n = {
|
|
10201
10147
|
id: e,
|
|
10202
10148
|
clause: "",
|
|
@@ -10214,7 +10160,7 @@ var Pl = (e, t) => {
|
|
|
10214
10160
|
else if (t === "condition") {
|
|
10215
10161
|
let t = a(r()), s = o();
|
|
10216
10162
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: auto_inclusion. ID ${e}: condition ${t} is missing its block`);
|
|
10217
|
-
n.conditions.push(
|
|
10163
|
+
n.conditions.push(kl(t, i(r())));
|
|
10218
10164
|
} else if (t === "note") n.note = a(r());
|
|
10219
10165
|
else if (t === "source") n.source = L(i(r()));
|
|
10220
10166
|
else return !1;
|
|
@@ -10223,15 +10169,15 @@ var Pl = (e, t) => {
|
|
|
10223
10169
|
construct: "auto_inclusion",
|
|
10224
10170
|
id: e
|
|
10225
10171
|
}), (t) => (t.autoInclusions[e] = n, t);
|
|
10226
|
-
},
|
|
10172
|
+
}, jl = function(e) {
|
|
10227
10173
|
let t = "auto_inclusion " + e.id + " {\n";
|
|
10228
10174
|
e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n");
|
|
10229
10175
|
for (let n of e.conditions) t += " condition " + P(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10230
|
-
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
10176
|
+
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += wl(e.source)), t += "}\n", t;
|
|
10231
10177
|
};
|
|
10232
10178
|
//#endregion
|
|
10233
10179
|
//#region src/ser-des/config/decisionRule.ts
|
|
10234
|
-
function
|
|
10180
|
+
function Ml(e) {
|
|
10235
10181
|
let t = {
|
|
10236
10182
|
threshold: 0,
|
|
10237
10183
|
base: "",
|
|
@@ -10250,7 +10196,7 @@ function Il(e) {
|
|
|
10250
10196
|
id: ""
|
|
10251
10197
|
}), t;
|
|
10252
10198
|
}
|
|
10253
|
-
function
|
|
10199
|
+
function Nl(e) {
|
|
10254
10200
|
let t = {
|
|
10255
10201
|
in_meeting: 0,
|
|
10256
10202
|
by_correspondence: "",
|
|
@@ -10267,7 +10213,7 @@ function Ll(e) {
|
|
|
10267
10213
|
id: ""
|
|
10268
10214
|
}), t;
|
|
10269
10215
|
}
|
|
10270
|
-
function
|
|
10216
|
+
function Pl(e) {
|
|
10271
10217
|
let t = {
|
|
10272
10218
|
in_meeting: null,
|
|
10273
10219
|
by_correspondence: null,
|
|
@@ -10277,9 +10223,9 @@ function Rl(e) {
|
|
|
10277
10223
|
reason_on_against_or_abstain: !1
|
|
10278
10224
|
};
|
|
10279
10225
|
return y(e, (e, n) => {
|
|
10280
|
-
if (e === "in_meeting") t.in_meeting =
|
|
10281
|
-
else if (e === "by_correspondence") t.by_correspondence =
|
|
10282
|
-
else if (e === "other_proposals") t.other_proposals =
|
|
10226
|
+
if (e === "in_meeting") t.in_meeting = Ml(i(n()));
|
|
10227
|
+
else if (e === "by_correspondence") t.by_correspondence = Ml(i(n()));
|
|
10228
|
+
else if (e === "other_proposals") t.other_proposals = Nl(i(n()));
|
|
10283
10229
|
else if (e === "proxies_max") t.proxies_max = parseInt(a(n()), 10) || 0;
|
|
10284
10230
|
else if (e === "abstentions") t.abstentions = a(n());
|
|
10285
10231
|
else if (e === "reason_on_against_or_abstain") t.reason_on_against_or_abstain = n() === "true";
|
|
@@ -10290,7 +10236,7 @@ function Rl(e) {
|
|
|
10290
10236
|
id: ""
|
|
10291
10237
|
}), t;
|
|
10292
10238
|
}
|
|
10293
|
-
function
|
|
10239
|
+
function Fl(e, t) {
|
|
10294
10240
|
let n = {
|
|
10295
10241
|
id: e,
|
|
10296
10242
|
clause: "",
|
|
@@ -10306,10 +10252,10 @@ function zl(e, t) {
|
|
|
10306
10252
|
id: e
|
|
10307
10253
|
}), n;
|
|
10308
10254
|
}
|
|
10309
|
-
function
|
|
10255
|
+
function Il(e) {
|
|
10310
10256
|
return r(i(e)).filter((e) => e.length > 0);
|
|
10311
10257
|
}
|
|
10312
|
-
var
|
|
10258
|
+
var Ll = (e, t) => {
|
|
10313
10259
|
let n = {
|
|
10314
10260
|
id: e,
|
|
10315
10261
|
organ: "",
|
|
@@ -10338,17 +10284,17 @@ var Vl = (e, t) => {
|
|
|
10338
10284
|
else if (t === "description") n.description = a(r());
|
|
10339
10285
|
else if (t === "on_recommendation_of") n.on_recommendation_of = a(r());
|
|
10340
10286
|
else if (t === "independent_of") n.independent_of = a(r());
|
|
10341
|
-
else if (t === "decides") n.decides =
|
|
10342
|
-
else if (t === "voting") n.voting =
|
|
10343
|
-
else if (t === "tasks") n.tasks =
|
|
10344
|
-
else if (t === "scope") n.scope =
|
|
10287
|
+
else if (t === "decides") n.decides = Il(r());
|
|
10288
|
+
else if (t === "voting") n.voting = Pl(i(r()));
|
|
10289
|
+
else if (t === "tasks") n.tasks = Il(r());
|
|
10290
|
+
else if (t === "scope") n.scope = Il(r());
|
|
10345
10291
|
else if (t === "principle") n.principle = a(r());
|
|
10346
10292
|
else if (t === "legacy_kind") {
|
|
10347
10293
|
let t = a(r()), s = o();
|
|
10348
10294
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: decision_rule. ID ${e}: legacy_kind ${t} is missing its block`);
|
|
10349
|
-
n.legacy_kinds.push(
|
|
10295
|
+
n.legacy_kinds.push(Fl(t, i(r())));
|
|
10350
10296
|
} else if (t === "income") n.income = a(r());
|
|
10351
|
-
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for =
|
|
10297
|
+
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for = Il(r());
|
|
10352
10298
|
else if (t === "source") n.source = L(i(r()));
|
|
10353
10299
|
else return !1;
|
|
10354
10300
|
return !0;
|
|
@@ -10357,33 +10303,33 @@ var Vl = (e, t) => {
|
|
|
10357
10303
|
id: e
|
|
10358
10304
|
}), (t) => (t.decisionRules[e] = n, t);
|
|
10359
10305
|
};
|
|
10360
|
-
function
|
|
10306
|
+
function Rl(e, t) {
|
|
10361
10307
|
let n = " " + e + " {\n";
|
|
10362
10308
|
return t.threshold > 0 && (n += " threshold " + t.threshold + "\n"), t.base && (n += " base " + P(t.base) + "\n"), t.clause && (n += " clause \"" + s(t.clause) + "\"\n"), t.description && (n += " description \"" + s(t.description) + "\"\n"), n += " }\n", n;
|
|
10363
10309
|
}
|
|
10364
|
-
function
|
|
10310
|
+
function zl(e) {
|
|
10365
10311
|
let t = " voting {\n";
|
|
10366
|
-
if (e.in_meeting && (t +=
|
|
10312
|
+
if (e.in_meeting && (t += Rl("in_meeting", e.in_meeting)), e.by_correspondence && (t += Rl("by_correspondence", e.by_correspondence)), e.other_proposals) {
|
|
10367
10313
|
let n = e.other_proposals;
|
|
10368
10314
|
t += " other_proposals {\n", n.in_meeting > 0 && (t += " in_meeting " + n.in_meeting + "\n"), n.by_correspondence && (t += " by_correspondence " + P(n.by_correspondence) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10369
10315
|
}
|
|
10370
10316
|
return e.proxies_max > 0 && (t += " proxies_max " + e.proxies_max + "\n"), e.abstentions && (t += " abstentions " + P(e.abstentions) + "\n"), e.reason_on_against_or_abstain && (t += " reason_on_against_or_abstain true\n"), t += " }\n", t;
|
|
10371
10317
|
}
|
|
10372
|
-
function
|
|
10318
|
+
function Bl(e, t, n) {
|
|
10373
10319
|
return n + e + " { " + t.map(P).join(" ") + " }\n";
|
|
10374
10320
|
}
|
|
10375
|
-
var
|
|
10321
|
+
var Vl = function(e) {
|
|
10376
10322
|
let t = "decision_rule " + e.id + " {\n";
|
|
10377
|
-
e.organ && (t += " organ " + P(e.organ) + "\n"), e.kind && (t += " kind " + P(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + P(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + P(e.independent_of) + "\n"), e.decides.length > 0 && (t +=
|
|
10323
|
+
e.organ && (t += " organ " + P(e.organ) + "\n"), e.kind && (t += " kind " + P(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + P(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + P(e.independent_of) + "\n"), e.decides.length > 0 && (t += Bl("decides", e.decides, " ")), e.voting && (t += zl(e.voting)), e.tasks.length > 0 && (t += Bl("tasks", e.tasks, " ")), e.scope.length > 0 && (t += Bl("scope", e.scope, " ")), e.principle && (t += " principle " + P(e.principle) + "\n");
|
|
10378
10324
|
for (let n of e.legacy_kinds) t += " legacy_kind " + P(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10379
|
-
return e.income && (t += " income " + P(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t +=
|
|
10325
|
+
return e.income && (t += " income " + P(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t += Bl("no_entrance_fees_for", e.no_entrance_fees_for, " ")), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
10380
10326
|
};
|
|
10381
10327
|
//#endregion
|
|
10382
10328
|
//#region src/ser-des/config/processSequence.ts
|
|
10383
|
-
function
|
|
10329
|
+
function Hl(e) {
|
|
10384
10330
|
return r(e).map(F).map(a).filter((e) => e.length > 0);
|
|
10385
10331
|
}
|
|
10386
|
-
function
|
|
10332
|
+
function Ul(e, t) {
|
|
10387
10333
|
let n = {
|
|
10388
10334
|
id: e,
|
|
10389
10335
|
label: "",
|
|
@@ -10405,16 +10351,16 @@ function ql(e, t) {
|
|
|
10405
10351
|
id: e
|
|
10406
10352
|
}), n;
|
|
10407
10353
|
}
|
|
10408
|
-
function
|
|
10354
|
+
function Wl(e) {
|
|
10409
10355
|
return e.length === 0 ? "" : "sequence { " + e.map(P).join(" ") + " }";
|
|
10410
10356
|
}
|
|
10411
|
-
function
|
|
10357
|
+
function Gl(e, t) {
|
|
10412
10358
|
let n = t + "register " + P(e.id) + " {\n";
|
|
10413
10359
|
return e.label && (n += t + " label \"" + s(e.label) + "\"\n"), e.clause && (n += t + " clause \"" + s(e.clause) + "\"\n"), e.maintainer && (n += t + " maintainer " + P(e.maintainer) + "\n"), e.published && (n += t + " published \"" + s(e.published) + "\"\n"), e.entries && (n += t + " entries \"" + s(e.entries) + "\"\n"), n += t + "}\n", n;
|
|
10414
10360
|
}
|
|
10415
10361
|
//#endregion
|
|
10416
10362
|
//#region src/ser-des/config/documentModule.ts
|
|
10417
|
-
var
|
|
10363
|
+
var Kl = (e, t) => {
|
|
10418
10364
|
let n = {
|
|
10419
10365
|
id: e,
|
|
10420
10366
|
document: "",
|
|
@@ -10435,11 +10381,11 @@ var Xl = (e, t) => {
|
|
|
10435
10381
|
else if (t === "edition") n.edition = a(r());
|
|
10436
10382
|
else if (t === "year") n.year = parseInt(a(r()), 10) || 0;
|
|
10437
10383
|
else if (t === "namespace") n.namespace = a(r());
|
|
10438
|
-
else if (t === "sequence") n.sequence =
|
|
10384
|
+
else if (t === "sequence") n.sequence = Hl(i(r()));
|
|
10439
10385
|
else if (t === "register") {
|
|
10440
10386
|
let t = a(r()), s = o();
|
|
10441
10387
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: document_module. ID ${e}: register ${t} is missing its block`);
|
|
10442
|
-
n.registers.push(
|
|
10388
|
+
n.registers.push(Ul(t, i(r())));
|
|
10443
10389
|
} else if (t === "source") n.source = L(i(r()));
|
|
10444
10390
|
else return !1;
|
|
10445
10391
|
return !0;
|
|
@@ -10447,15 +10393,15 @@ var Xl = (e, t) => {
|
|
|
10447
10393
|
construct: "document_module",
|
|
10448
10394
|
id: e
|
|
10449
10395
|
}), (t) => (t.documentModules[e] = n, t);
|
|
10450
|
-
},
|
|
10396
|
+
}, ql = function(e) {
|
|
10451
10397
|
let t = "document_module " + e.id + " {\n";
|
|
10452
10398
|
e.document && (t += " document \"" + s(e.document) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.edition && (t += " edition \"" + s(e.edition) + "\"\n"), e.year && (t += " year " + e.year + "\n"), e.namespace && (t += " namespace " + P(e.namespace) + "\n");
|
|
10453
|
-
let n =
|
|
10399
|
+
let n = Wl(e.sequence);
|
|
10454
10400
|
n && (t += " " + n + "\n");
|
|
10455
|
-
for (let n of e.registers) t +=
|
|
10401
|
+
for (let n of e.registers) t += Gl(n, " ");
|
|
10456
10402
|
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
10457
|
-
},
|
|
10458
|
-
function
|
|
10403
|
+
}, Jl = ["informative"];
|
|
10404
|
+
function Yl(e, t) {
|
|
10459
10405
|
let n = {
|
|
10460
10406
|
id: "",
|
|
10461
10407
|
title: "",
|
|
@@ -10471,7 +10417,7 @@ function $l(e, t) {
|
|
|
10471
10417
|
else if (e === "year") n.year = parseInt(a(r()), 10) || 0;
|
|
10472
10418
|
else if (e === "role") {
|
|
10473
10419
|
let e = a(r());
|
|
10474
|
-
if (!
|
|
10420
|
+
if (!Jl.includes(e)) throw Error(`Parsing error: informative_annex. ID ${t}: Unknown document role "${e}" (valid: ${Jl.join(", ")})`);
|
|
10475
10421
|
n.role = e;
|
|
10476
10422
|
} else if (e === "source") n.source = a(r());
|
|
10477
10423
|
else return !1;
|
|
@@ -10481,7 +10427,7 @@ function $l(e, t) {
|
|
|
10481
10427
|
id: t
|
|
10482
10428
|
}), n;
|
|
10483
10429
|
}
|
|
10484
|
-
function
|
|
10430
|
+
function Xl(e, t) {
|
|
10485
10431
|
let n = {
|
|
10486
10432
|
id: e,
|
|
10487
10433
|
clause: "",
|
|
@@ -10501,7 +10447,7 @@ function eu(e, t) {
|
|
|
10501
10447
|
id: e
|
|
10502
10448
|
}), n;
|
|
10503
10449
|
}
|
|
10504
|
-
var
|
|
10450
|
+
var Zl = (e, t) => {
|
|
10505
10451
|
let n = {
|
|
10506
10452
|
id: e,
|
|
10507
10453
|
document: {
|
|
@@ -10519,7 +10465,7 @@ var tu = (e, t) => {
|
|
|
10519
10465
|
highlights: []
|
|
10520
10466
|
};
|
|
10521
10467
|
return y(t, (t, r, o) => {
|
|
10522
|
-
if (t === "document") n.document =
|
|
10468
|
+
if (t === "document") n.document = Yl(i(r()), e);
|
|
10523
10469
|
else if (t === "applies_to") n.appliesTo = a(r());
|
|
10524
10470
|
else if (t === "applied_by") n.appliedBy = a(r());
|
|
10525
10471
|
else if (t === "scope") n.scope = a(r());
|
|
@@ -10527,19 +10473,19 @@ var tu = (e, t) => {
|
|
|
10527
10473
|
else if (t === "highlight") {
|
|
10528
10474
|
let t = a(r()), s = o();
|
|
10529
10475
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: informative_annex. ID ${e}: highlight ${t} is missing its block`);
|
|
10530
|
-
n.highlights.push(
|
|
10476
|
+
n.highlights.push(Xl(t, i(r())));
|
|
10531
10477
|
} else return !1;
|
|
10532
10478
|
return !0;
|
|
10533
10479
|
}, {
|
|
10534
10480
|
construct: "informative_annex",
|
|
10535
10481
|
id: e
|
|
10536
10482
|
}), (t) => (t.informativeAnnexes[e] = n, t);
|
|
10537
|
-
},
|
|
10483
|
+
}, Ql = function(e) {
|
|
10538
10484
|
let t = "informative_annex " + e.id + " {\n";
|
|
10539
10485
|
t += " document {\n", e.document.id && (t += " id \"" + s(e.document.id) + "\"\n"), e.document.title && (t += " title \"" + s(e.document.title) + "\"\n"), e.document.edition && (t += " edition " + e.document.edition + "\n"), e.document.year && (t += " year " + e.document.year + "\n"), e.document.role && (t += " role " + P(e.document.role) + "\n"), e.document.source && (t += " source \"" + s(e.document.source) + "\"\n"), t += " }\n", e.appliesTo && (t += " applies_to " + P(e.appliesTo) + "\n"), e.appliedBy && (t += " applied_by \"" + s(e.appliedBy) + "\"\n"), e.scope && (t += " scope \"" + s(e.scope) + "\"\n"), e.numberingCaution && (t += " numbering_caution \"" + s(e.numberingCaution) + "\"\n");
|
|
10540
10486
|
for (let n of e.highlights) t += " highlight " + P(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.title && (t += " title \"" + s(n.title) + "\"\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), n.dischargedBy && (t += " discharged_by \"" + s(n.dischargedBy) + "\"\n"), t += " }\n";
|
|
10541
10487
|
return t += "}\n", t;
|
|
10542
|
-
},
|
|
10488
|
+
}, $l = ["normative", "informative"], eu = (e, t) => {
|
|
10543
10489
|
let n = {
|
|
10544
10490
|
id: e,
|
|
10545
10491
|
letter: "",
|
|
@@ -10557,7 +10503,7 @@ var tu = (e, t) => {
|
|
|
10557
10503
|
else if (t === "title") n.title = a(r());
|
|
10558
10504
|
else if (t === "obligation") {
|
|
10559
10505
|
let t = a(r());
|
|
10560
|
-
if (
|
|
10506
|
+
if (!$l.includes(t)) throw Error(`Parsing error: part_annex. ID ${e}: Unknown obligation "${t}" (valid: ${$l.join(", ")})`);
|
|
10561
10507
|
n.obligation = t;
|
|
10562
10508
|
} else if (t === "summary") n.summary = a(r());
|
|
10563
10509
|
else if (t === "realization") n.realization = a(r());
|
|
@@ -10568,25 +10514,25 @@ var tu = (e, t) => {
|
|
|
10568
10514
|
construct: "part_annex",
|
|
10569
10515
|
id: e
|
|
10570
10516
|
}), (t) => (t.partAnnexes[e] = n, t);
|
|
10571
|
-
},
|
|
10517
|
+
}, tu = function(e) {
|
|
10572
10518
|
let t = "part_annex " + e.id + " {\n";
|
|
10573
10519
|
return e.letter && (t += " letter \"" + s(e.letter) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.obligation && (t += " obligation " + P(e.obligation) + "\n"), e.summary && (t += " summary \"" + s(e.summary) + "\"\n"), e.realization && (t += " realization \"" + s(e.realization) + "\"\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
10574
|
-
},
|
|
10520
|
+
}, nu = [
|
|
10575
10521
|
"asciimath",
|
|
10576
10522
|
"latex",
|
|
10577
10523
|
"unicodemath",
|
|
10578
10524
|
"mathml",
|
|
10579
10525
|
"omml"
|
|
10580
10526
|
];
|
|
10581
|
-
function
|
|
10527
|
+
function ru(e) {
|
|
10582
10528
|
let t = e.indexOf(":");
|
|
10583
10529
|
return {
|
|
10584
10530
|
format: t === -1 ? "xml" : e.slice(0, t),
|
|
10585
10531
|
target: t === -1 ? e : e.slice(t + 1)
|
|
10586
10532
|
};
|
|
10587
10533
|
}
|
|
10588
|
-
var
|
|
10589
|
-
let { format: n, target: r } =
|
|
10534
|
+
var iu = function(e, t) {
|
|
10535
|
+
let { format: n, target: r } = ru(e), i = {
|
|
10590
10536
|
id: e,
|
|
10591
10537
|
format: n,
|
|
10592
10538
|
target: r,
|
|
@@ -10626,7 +10572,7 @@ var cu = function(e, t) {
|
|
|
10626
10572
|
construct: "mapping",
|
|
10627
10573
|
id: e
|
|
10628
10574
|
}), (t) => (t.wireMappings[e] = i, t);
|
|
10629
|
-
},
|
|
10575
|
+
}, au = function(e) {
|
|
10630
10576
|
let t = [`mapping ${e.format} ${e.target} {`];
|
|
10631
10577
|
e.element && t.push(` element "${s(e.element)}"`), e.namespaceRef && t.push(` namespace ${e.namespaceRef}`);
|
|
10632
10578
|
for (let n of e.entries) if (n.kind === "map" && n.modifier) t.push(` ${n.wire} ${n.modifier} ${n.name}`);
|
|
@@ -10635,7 +10581,7 @@ var cu = function(e, t) {
|
|
|
10635
10581
|
t.push(` ${e} "${s(n.wire)}" ${n.name}`);
|
|
10636
10582
|
}
|
|
10637
10583
|
return e.content && t.push(` map_content ${e.content}`), e.mixed && t.push(" mixed_content"), e.renderNil !== null && t.push(` render_nil ${e.renderNil}`), t.push("}"), t.join("\n");
|
|
10638
|
-
},
|
|
10584
|
+
}, ou = function(e, t) {
|
|
10639
10585
|
if (!e.startsWith(":")) throw Error(`Parsing error: string_format. ID ${e}: the registered format name carries the colon sigil (string_format :${e})`);
|
|
10640
10586
|
let n = e.slice(1), r = {
|
|
10641
10587
|
id: n,
|
|
@@ -10652,14 +10598,14 @@ var cu = function(e, t) {
|
|
|
10652
10598
|
construct: "string_format",
|
|
10653
10599
|
id: n
|
|
10654
10600
|
}), (e) => (e.stringFormats[n] = r, e);
|
|
10655
|
-
},
|
|
10601
|
+
}, su = function(e) {
|
|
10656
10602
|
return [
|
|
10657
10603
|
`string_format :${e.id} {`,
|
|
10658
10604
|
` artifact "${s(e.artifact)}"`,
|
|
10659
10605
|
` root "${s(e.root)}"`,
|
|
10660
10606
|
"}"
|
|
10661
10607
|
].join("\n");
|
|
10662
|
-
},
|
|
10608
|
+
}, cu = function(e, t) {
|
|
10663
10609
|
let n = {
|
|
10664
10610
|
id: e,
|
|
10665
10611
|
uri: "",
|
|
@@ -10677,10 +10623,10 @@ var cu = function(e, t) {
|
|
|
10677
10623
|
construct: "namespace",
|
|
10678
10624
|
id: e
|
|
10679
10625
|
}), (t) => (t.namespaces[e] = n, t);
|
|
10680
|
-
},
|
|
10626
|
+
}, lu = function(e) {
|
|
10681
10627
|
let t = [`namespace ${e.id} {`, ` uri "${s(e.uri)}"`];
|
|
10682
10628
|
return e.prefix && t.push(` prefix "${s(e.prefix)}"`), e.isDefault && t.push(" default"), t.push("}"), t.join("\n");
|
|
10683
|
-
},
|
|
10629
|
+
}, uu = function(e, t) {
|
|
10684
10630
|
let n = t.replace(/^\s*:\s*\S+\s*/, ""), r = {
|
|
10685
10631
|
id: e,
|
|
10686
10632
|
type: "",
|
|
@@ -10696,7 +10642,7 @@ var cu = function(e, t) {
|
|
|
10696
10642
|
return y(n, (e, t, n) => {
|
|
10697
10643
|
if (e === "render") {
|
|
10698
10644
|
let e = a(t()), i = n() === void 0 ? "" : a(t());
|
|
10699
|
-
|
|
10645
|
+
nu.includes(e) && r.renders.push({
|
|
10700
10646
|
notation: e,
|
|
10701
10647
|
text: i
|
|
10702
10648
|
});
|
|
@@ -10721,12 +10667,12 @@ var cu = function(e, t) {
|
|
|
10721
10667
|
construct: "datum",
|
|
10722
10668
|
id: e
|
|
10723
10669
|
}), (t) => (t.datums[e] = r, t);
|
|
10724
|
-
},
|
|
10670
|
+
}, du = function(e) {
|
|
10725
10671
|
let t = [`datum ${e.id}${e.type ? ` : ${e.type}` : ""} {`];
|
|
10726
10672
|
e.quantityKind && t.push(` quantity_kind ${e.quantityKind}`), e.unit && t.push(` unit ${e.unit}`), e.origin !== "declared" && t.push(` origin ${e.origin}`), e.scope && t.push(` scope ${e.scope}`);
|
|
10727
10673
|
for (let n of e.renders) t.push(` render ${n.notation} "${s(n.text)}"`);
|
|
10728
10674
|
return e.label && t.push(` label "${s(e.label)}"`), e.description && t.push(` description { ${e.description} }`), t.push("}"), t.join("\n");
|
|
10729
|
-
},
|
|
10675
|
+
}, fu = function(e, t) {
|
|
10730
10676
|
let n = {
|
|
10731
10677
|
id: e,
|
|
10732
10678
|
inputs: [],
|
|
@@ -10750,7 +10696,7 @@ var cu = function(e, t) {
|
|
|
10750
10696
|
construct: "check",
|
|
10751
10697
|
id: e
|
|
10752
10698
|
}), (t) => (t.checks[e] = n, t);
|
|
10753
|
-
},
|
|
10699
|
+
}, pu = function(e) {
|
|
10754
10700
|
let t = [`check ${e.id} {`];
|
|
10755
10701
|
return e.inputs.length && t.push(` inputs { ${e.inputs.join(" ")} }`), e.expression && t.push(` expression "${s(e.expression)}"`), e.operator && t.push(` operator ${e.operator}`), e.threshold && t.push(` threshold ${e.threshold}`), t.push("}"), t.join("\n");
|
|
10756
10702
|
};
|
|
@@ -10759,7 +10705,7 @@ var cu = function(e, t) {
|
|
|
10759
10705
|
function J(e) {
|
|
10760
10706
|
return e;
|
|
10761
10707
|
}
|
|
10762
|
-
var
|
|
10708
|
+
var mu = [
|
|
10763
10709
|
J({
|
|
10764
10710
|
keyword: "role",
|
|
10765
10711
|
field: "roles",
|
|
@@ -10953,15 +10899,15 @@ var vu = [
|
|
|
10953
10899
|
keyword: "attestation",
|
|
10954
10900
|
field: "attestations",
|
|
10955
10901
|
takesID: !0,
|
|
10956
|
-
parse:
|
|
10957
|
-
dump:
|
|
10902
|
+
parse: Us,
|
|
10903
|
+
dump: Ws
|
|
10958
10904
|
}),
|
|
10959
10905
|
J({
|
|
10960
10906
|
keyword: "certificate_template",
|
|
10961
10907
|
field: "certificateTemplates",
|
|
10962
10908
|
takesID: !0,
|
|
10963
|
-
parse:
|
|
10964
|
-
dump:
|
|
10909
|
+
parse: qs,
|
|
10910
|
+
dump: Js
|
|
10965
10911
|
}),
|
|
10966
10912
|
J({
|
|
10967
10913
|
keyword: "subform",
|
|
@@ -11011,22 +10957,22 @@ var vu = [
|
|
|
11011
10957
|
keyword: "calculation_context",
|
|
11012
10958
|
field: "calculationContexts",
|
|
11013
10959
|
takesID: !0,
|
|
11014
|
-
parse:
|
|
11015
|
-
dump:
|
|
10960
|
+
parse: Fs,
|
|
10961
|
+
dump: Is
|
|
11016
10962
|
}),
|
|
11017
10963
|
J({
|
|
11018
10964
|
keyword: "evaluation_dimensions",
|
|
11019
10965
|
field: "evaluationDimensions",
|
|
11020
10966
|
takesID: !0,
|
|
11021
|
-
parse:
|
|
11022
|
-
dump:
|
|
10967
|
+
parse: zs,
|
|
10968
|
+
dump: Bs
|
|
11023
10969
|
}),
|
|
11024
10970
|
J({
|
|
11025
10971
|
keyword: "evaluation_profile",
|
|
11026
10972
|
field: "evaluationProfiles",
|
|
11027
10973
|
takesID: !0,
|
|
11028
|
-
parse:
|
|
11029
|
-
dump:
|
|
10974
|
+
parse: Vs,
|
|
10975
|
+
dump: Hs
|
|
11030
10976
|
}),
|
|
11031
10977
|
J({
|
|
11032
10978
|
keyword: "verdict",
|
|
@@ -11114,11 +11060,10 @@ var vu = [
|
|
|
11114
11060
|
}),
|
|
11115
11061
|
Ra,
|
|
11116
11062
|
za,
|
|
11063
|
+
cs,
|
|
11064
|
+
ls,
|
|
11065
|
+
us,
|
|
11117
11066
|
ds,
|
|
11118
|
-
fs,
|
|
11119
|
-
ps,
|
|
11120
|
-
ms,
|
|
11121
|
-
hs,
|
|
11122
11067
|
Ga,
|
|
11123
11068
|
J({
|
|
11124
11069
|
keyword: "conformance_test",
|
|
@@ -11155,200 +11100,200 @@ var vu = [
|
|
|
11155
11100
|
parse: rn,
|
|
11156
11101
|
dump: an
|
|
11157
11102
|
}),
|
|
11158
|
-
|
|
11103
|
+
fs,
|
|
11159
11104
|
J({
|
|
11160
11105
|
keyword: "identity_slot",
|
|
11161
11106
|
field: "identitySlots",
|
|
11162
11107
|
takesID: !0,
|
|
11163
|
-
parse:
|
|
11164
|
-
dump:
|
|
11108
|
+
parse: Ts,
|
|
11109
|
+
dump: Es
|
|
11165
11110
|
}),
|
|
11166
11111
|
J({
|
|
11167
11112
|
keyword: "aspect",
|
|
11168
11113
|
field: "aspects",
|
|
11169
11114
|
takesID: !0,
|
|
11170
|
-
parse:
|
|
11171
|
-
dump:
|
|
11115
|
+
parse: Os,
|
|
11116
|
+
dump: ks
|
|
11172
11117
|
}),
|
|
11173
11118
|
J({
|
|
11174
11119
|
keyword: "promise_set",
|
|
11175
11120
|
field: "promiseSets",
|
|
11176
11121
|
takesID: !0,
|
|
11177
|
-
parse:
|
|
11178
|
-
dump:
|
|
11122
|
+
parse: As,
|
|
11123
|
+
dump: js
|
|
11179
11124
|
}),
|
|
11180
11125
|
J({
|
|
11181
11126
|
keyword: "application_declaration",
|
|
11182
11127
|
field: "applicationDeclarations",
|
|
11183
11128
|
takesID: !0,
|
|
11184
|
-
parse:
|
|
11185
|
-
dump:
|
|
11129
|
+
parse: Ns,
|
|
11130
|
+
dump: Ps
|
|
11186
11131
|
}),
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11132
|
+
Ss,
|
|
11133
|
+
oc,
|
|
11134
|
+
sc,
|
|
11135
|
+
Bc,
|
|
11136
|
+
Vc,
|
|
11192
11137
|
J({
|
|
11193
11138
|
keyword: "activity_archetype",
|
|
11194
11139
|
field: "activityArchetypes",
|
|
11195
11140
|
takesID: !0,
|
|
11196
|
-
parse:
|
|
11197
|
-
dump:
|
|
11141
|
+
parse: Jc,
|
|
11142
|
+
dump: Yc
|
|
11198
11143
|
}),
|
|
11199
11144
|
J({
|
|
11200
11145
|
keyword: "participant_kind",
|
|
11201
11146
|
field: "participantKinds",
|
|
11202
11147
|
takesID: !0,
|
|
11203
|
-
parse:
|
|
11204
|
-
dump:
|
|
11148
|
+
parse: $c,
|
|
11149
|
+
dump: rl
|
|
11205
11150
|
}),
|
|
11206
11151
|
J({
|
|
11207
11152
|
keyword: "governance_organ",
|
|
11208
11153
|
field: "governanceOrgans",
|
|
11209
11154
|
takesID: !0,
|
|
11210
|
-
parse:
|
|
11211
|
-
dump:
|
|
11155
|
+
parse: il,
|
|
11156
|
+
dump: al
|
|
11212
11157
|
}),
|
|
11213
11158
|
J({
|
|
11214
11159
|
keyword: "declaration_kind",
|
|
11215
11160
|
field: "declarationKinds",
|
|
11216
11161
|
takesID: !0,
|
|
11217
|
-
parse:
|
|
11218
|
-
dump:
|
|
11162
|
+
parse: sl,
|
|
11163
|
+
dump: ul
|
|
11219
11164
|
}),
|
|
11220
11165
|
J({
|
|
11221
11166
|
keyword: "declaration_status",
|
|
11222
11167
|
field: "declarationStatuses",
|
|
11223
11168
|
takesID: !0,
|
|
11224
|
-
parse:
|
|
11225
|
-
dump:
|
|
11169
|
+
parse: dl,
|
|
11170
|
+
dump: fl
|
|
11226
11171
|
}),
|
|
11227
11172
|
J({
|
|
11228
11173
|
keyword: "declaration_gate",
|
|
11229
11174
|
field: "declarationGates",
|
|
11230
11175
|
takesID: !0,
|
|
11231
|
-
parse:
|
|
11232
|
-
dump:
|
|
11176
|
+
parse: pl,
|
|
11177
|
+
dump: ml
|
|
11233
11178
|
}),
|
|
11234
11179
|
J({
|
|
11235
11180
|
keyword: "scheme_definition",
|
|
11236
11181
|
field: "schemeDefinitions",
|
|
11237
11182
|
takesID: !0,
|
|
11238
|
-
parse:
|
|
11239
|
-
dump:
|
|
11183
|
+
parse: gl,
|
|
11184
|
+
dump: vl
|
|
11240
11185
|
}),
|
|
11241
11186
|
J({
|
|
11242
11187
|
keyword: "scheme_lifecycle",
|
|
11243
11188
|
field: "schemeLifecycles",
|
|
11244
11189
|
takesID: !0,
|
|
11245
|
-
parse:
|
|
11246
|
-
dump:
|
|
11190
|
+
parse: Sl,
|
|
11191
|
+
dump: Cl
|
|
11247
11192
|
}),
|
|
11248
11193
|
J({
|
|
11249
11194
|
keyword: "framework_document",
|
|
11250
11195
|
field: "frameworkDocuments",
|
|
11251
11196
|
takesID: !0,
|
|
11252
|
-
parse:
|
|
11253
|
-
dump:
|
|
11197
|
+
parse: Tl,
|
|
11198
|
+
dump: El
|
|
11254
11199
|
}),
|
|
11255
11200
|
J({
|
|
11256
11201
|
keyword: "document_precedence",
|
|
11257
11202
|
field: "documentPrecedences",
|
|
11258
11203
|
takesID: !0,
|
|
11259
|
-
parse:
|
|
11260
|
-
dump:
|
|
11204
|
+
parse: Dl,
|
|
11205
|
+
dump: Ol
|
|
11261
11206
|
}),
|
|
11262
11207
|
J({
|
|
11263
11208
|
keyword: "auto_inclusion",
|
|
11264
11209
|
field: "autoInclusions",
|
|
11265
11210
|
takesID: !0,
|
|
11266
|
-
parse:
|
|
11267
|
-
dump:
|
|
11211
|
+
parse: Al,
|
|
11212
|
+
dump: jl
|
|
11268
11213
|
}),
|
|
11269
11214
|
J({
|
|
11270
11215
|
keyword: "decision_rule",
|
|
11271
11216
|
field: "decisionRules",
|
|
11272
11217
|
takesID: !0,
|
|
11273
|
-
parse:
|
|
11274
|
-
dump:
|
|
11218
|
+
parse: Ll,
|
|
11219
|
+
dump: Vl
|
|
11275
11220
|
}),
|
|
11276
11221
|
J({
|
|
11277
11222
|
keyword: "document_module",
|
|
11278
11223
|
field: "documentModules",
|
|
11279
11224
|
takesID: !0,
|
|
11280
|
-
parse:
|
|
11281
|
-
dump:
|
|
11225
|
+
parse: Kl,
|
|
11226
|
+
dump: ql
|
|
11282
11227
|
}),
|
|
11283
11228
|
J({
|
|
11284
11229
|
keyword: "informative_annex",
|
|
11285
11230
|
field: "informativeAnnexes",
|
|
11286
11231
|
takesID: !0,
|
|
11287
|
-
parse:
|
|
11288
|
-
dump:
|
|
11232
|
+
parse: Zl,
|
|
11233
|
+
dump: Ql
|
|
11289
11234
|
}),
|
|
11290
11235
|
J({
|
|
11291
11236
|
keyword: "part_annex",
|
|
11292
11237
|
field: "partAnnexes",
|
|
11293
11238
|
takesID: !0,
|
|
11294
|
-
parse:
|
|
11295
|
-
dump:
|
|
11239
|
+
parse: eu,
|
|
11240
|
+
dump: tu
|
|
11296
11241
|
}),
|
|
11297
11242
|
ro,
|
|
11298
|
-
|
|
11243
|
+
yc,
|
|
11244
|
+
Ec,
|
|
11245
|
+
Dc,
|
|
11246
|
+
kc,
|
|
11299
11247
|
Ac,
|
|
11300
|
-
jc,
|
|
11301
|
-
Nc,
|
|
11302
|
-
Pc,
|
|
11303
11248
|
J({
|
|
11304
11249
|
keyword: "text",
|
|
11305
11250
|
field: "texts",
|
|
11306
11251
|
takesID: !0,
|
|
11307
|
-
parse:
|
|
11308
|
-
dump:
|
|
11252
|
+
parse: jc,
|
|
11253
|
+
dump: Mc
|
|
11309
11254
|
}),
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11255
|
+
Wc,
|
|
11256
|
+
Kc,
|
|
11257
|
+
qc,
|
|
11313
11258
|
J({
|
|
11314
11259
|
keyword: "mapping",
|
|
11315
11260
|
field: "wireMappings",
|
|
11316
11261
|
takesID: !0,
|
|
11317
11262
|
takesFormat: !0,
|
|
11318
|
-
parse:
|
|
11319
|
-
dump:
|
|
11263
|
+
parse: iu,
|
|
11264
|
+
dump: au
|
|
11320
11265
|
}),
|
|
11321
11266
|
J({
|
|
11322
11267
|
keyword: "string_format",
|
|
11323
11268
|
field: "stringFormats",
|
|
11324
11269
|
takesID: !0,
|
|
11325
|
-
parse:
|
|
11326
|
-
dump:
|
|
11270
|
+
parse: ou,
|
|
11271
|
+
dump: su
|
|
11327
11272
|
}),
|
|
11328
11273
|
J({
|
|
11329
11274
|
keyword: "namespace",
|
|
11330
11275
|
field: "namespaces",
|
|
11331
11276
|
takesID: !0,
|
|
11332
|
-
parse:
|
|
11333
|
-
dump:
|
|
11277
|
+
parse: cu,
|
|
11278
|
+
dump: lu
|
|
11334
11279
|
}),
|
|
11335
11280
|
J({
|
|
11336
11281
|
keyword: "datum",
|
|
11337
11282
|
field: "datums",
|
|
11338
11283
|
takesID: !0,
|
|
11339
11284
|
optionalTypedId: !0,
|
|
11340
|
-
parse:
|
|
11341
|
-
dump:
|
|
11285
|
+
parse: uu,
|
|
11286
|
+
dump: du
|
|
11342
11287
|
}),
|
|
11343
11288
|
J({
|
|
11344
11289
|
keyword: "check",
|
|
11345
11290
|
field: "checks",
|
|
11346
11291
|
takesID: !0,
|
|
11347
|
-
parse:
|
|
11348
|
-
dump:
|
|
11292
|
+
parse: fu,
|
|
11293
|
+
dump: pu
|
|
11349
11294
|
})
|
|
11350
11295
|
];
|
|
11351
|
-
function
|
|
11296
|
+
function hu(e) {
|
|
11352
11297
|
let t = {};
|
|
11353
11298
|
for (let n of e) {
|
|
11354
11299
|
if (!n.field) continue;
|
|
@@ -11365,61 +11310,61 @@ function yu(e) {
|
|
|
11365
11310
|
}
|
|
11366
11311
|
return t;
|
|
11367
11312
|
}
|
|
11368
|
-
function
|
|
11313
|
+
function gu(e) {
|
|
11369
11314
|
let t = {};
|
|
11370
11315
|
for (let n of e) n.field && (t[n.field] = { resolve: n.resolve ?? ((e, t) => t) });
|
|
11371
11316
|
return t;
|
|
11372
11317
|
}
|
|
11373
|
-
function
|
|
11318
|
+
function _u(e) {
|
|
11374
11319
|
let t = {};
|
|
11375
11320
|
for (let n of e) n.field && (t[n.field] = n.dump);
|
|
11376
11321
|
return t;
|
|
11377
11322
|
}
|
|
11378
|
-
var
|
|
11323
|
+
var vu = {
|
|
11379
11324
|
package: { parse: Ua },
|
|
11380
11325
|
root: { parse: (e) => (t) => (t.root = e.trim(), t) },
|
|
11381
11326
|
metadata: { parse: h },
|
|
11382
11327
|
version: { parse: () => (e) => e },
|
|
11383
|
-
...
|
|
11384
|
-
},
|
|
11328
|
+
...hu(mu)
|
|
11329
|
+
}, yu = gu(mu), bu = _u(mu), Y = (/* @__PURE__ */ e(((e, t) => {
|
|
11385
11330
|
t.exports = {};
|
|
11386
|
-
})))(),
|
|
11387
|
-
function
|
|
11331
|
+
})))(), xu = /^include\s+"([^"]+)"/gm, Su = /^[ \t]*(#|\/\/)/;
|
|
11332
|
+
function Cu(e, t = /* @__PURE__ */ new Set()) {
|
|
11388
11333
|
let n = (0, Y.resolve)(e);
|
|
11389
11334
|
if (t.has(n)) throw Error(`Include cycle detected: ${n} (chain: ${[...t, n].map((e) => e.split("/").pop()).join(" → ")})`);
|
|
11390
11335
|
if (t.add(n), !(0, Y.existsSync)(n)) throw Error(`Include file not found: ${n}`);
|
|
11391
11336
|
let r = (0, Y.readFileSync)(n, "utf8"), i = (0, Y.dirname)(n);
|
|
11392
|
-
return r.replace(
|
|
11337
|
+
return r.replace(xu, (e, n, a) => {
|
|
11393
11338
|
let o = r.lastIndexOf("\n", a) + 1, s = r.slice(o, a);
|
|
11394
|
-
if (
|
|
11339
|
+
if (Su.test(s)) return e;
|
|
11395
11340
|
let c = (0, Y.isAbsolute)(n) ? n : (0, Y.resolve)(i, n);
|
|
11396
|
-
return
|
|
11341
|
+
return Cu(c.endsWith(".prl") || c.endsWith(".mmel") ? c : (0, Y.existsSync)(`${c}.prl`) ? `${c}.prl` : `${c}.mmel`, new Set(t));
|
|
11397
11342
|
});
|
|
11398
11343
|
}
|
|
11399
11344
|
//#endregion
|
|
11400
11345
|
//#region src/validate.ts
|
|
11401
|
-
function
|
|
11346
|
+
function wu(e) {
|
|
11402
11347
|
let t = [];
|
|
11403
|
-
for (let n of
|
|
11348
|
+
for (let n of Tu) t.push(...n.check(e));
|
|
11404
11349
|
return t;
|
|
11405
11350
|
}
|
|
11406
|
-
var
|
|
11351
|
+
var Tu = [
|
|
11407
11352
|
{
|
|
11408
11353
|
name: "empty-ids",
|
|
11409
|
-
check:
|
|
11354
|
+
check: Eu
|
|
11410
11355
|
},
|
|
11411
11356
|
{
|
|
11412
11357
|
name: "form-references",
|
|
11413
|
-
check:
|
|
11358
|
+
check: Du
|
|
11414
11359
|
},
|
|
11415
11360
|
{
|
|
11416
11361
|
name: "state-machine-cascades",
|
|
11417
|
-
check:
|
|
11362
|
+
check: Ou
|
|
11418
11363
|
}
|
|
11419
11364
|
];
|
|
11420
|
-
function
|
|
11365
|
+
function Eu(e) {
|
|
11421
11366
|
let t = [];
|
|
11422
|
-
for (let [n, r] of
|
|
11367
|
+
for (let [n, r] of ku(e)) for (let e of r) (!e.id || e.id.trim() === "") && t.push({
|
|
11423
11368
|
severity: "error",
|
|
11424
11369
|
code: "empty-id",
|
|
11425
11370
|
construct: n,
|
|
@@ -11427,7 +11372,7 @@ function Au(e) {
|
|
|
11427
11372
|
});
|
|
11428
11373
|
return t;
|
|
11429
11374
|
}
|
|
11430
|
-
function
|
|
11375
|
+
function Du(e) {
|
|
11431
11376
|
let t = [], n = new Set(e.calculations.map((e) => e.id)), r = new Set(e.processes.map((e) => e.id));
|
|
11432
11377
|
for (let t of e.conformanceTests ?? []) r.add(t.id);
|
|
11433
11378
|
let i = new Set(e.subforms.map((e) => e.id));
|
|
@@ -11439,7 +11384,7 @@ function ju(e) {
|
|
|
11439
11384
|
message: `Form "${a.id}" references conformance process "${a.conformanceProcessId}" which does not exist`,
|
|
11440
11385
|
id: a.id
|
|
11441
11386
|
});
|
|
11442
|
-
for (let e of
|
|
11387
|
+
for (let e of Au(a)) {
|
|
11443
11388
|
let r = e.calculationId;
|
|
11444
11389
|
r && !r.startsWith("ocl{") && !n.has(r) && t.push({
|
|
11445
11390
|
severity: "error",
|
|
@@ -11458,7 +11403,7 @@ function ju(e) {
|
|
|
11458
11403
|
}
|
|
11459
11404
|
return t;
|
|
11460
11405
|
}
|
|
11461
|
-
function
|
|
11406
|
+
function Ou(e) {
|
|
11462
11407
|
let t = [];
|
|
11463
11408
|
for (let n of e.stateMachines) {
|
|
11464
11409
|
let e = new Set(n.states.map((e) => e.name));
|
|
@@ -11479,10 +11424,10 @@ function Mu(e) {
|
|
|
11479
11424
|
}
|
|
11480
11425
|
return t;
|
|
11481
11426
|
}
|
|
11482
|
-
function*
|
|
11427
|
+
function* ku(e) {
|
|
11483
11428
|
for (let [t, n] of Object.entries(e)) Array.isArray(n) && n.length > 0 && typeof n[0]?.id == "string" && (yield [t, n]);
|
|
11484
11429
|
}
|
|
11485
|
-
function*
|
|
11430
|
+
function* Au(e) {
|
|
11486
11431
|
let t = [...e.fields];
|
|
11487
11432
|
for (; t.length > 0;) {
|
|
11488
11433
|
let e = t.pop();
|
|
@@ -11491,7 +11436,7 @@ function* Pu(e) {
|
|
|
11491
11436
|
}
|
|
11492
11437
|
//#endregion
|
|
11493
11438
|
//#region src/ser-des/package.ts
|
|
11494
|
-
var
|
|
11439
|
+
var ju = [
|
|
11495
11440
|
"model",
|
|
11496
11441
|
"entities",
|
|
11497
11442
|
"specification",
|
|
@@ -11499,23 +11444,23 @@ var Fu = [
|
|
|
11499
11444
|
"evaluation",
|
|
11500
11445
|
"framework"
|
|
11501
11446
|
];
|
|
11502
|
-
function
|
|
11447
|
+
function Mu(e) {
|
|
11503
11448
|
let t = [];
|
|
11504
11449
|
if (!(0, Y.existsSync)(e)) return t;
|
|
11505
11450
|
for (let n of (0, Y.readdirSync)(e).sort()) {
|
|
11506
11451
|
let r = (0, Y.join)(e, n);
|
|
11507
|
-
(0, Y.statSync)(r).isDirectory() ? t.push(...
|
|
11452
|
+
(0, Y.statSync)(r).isDirectory() ? t.push(...Mu(r)) : (n.endsWith(".prl") || n.endsWith(".mmel")) && t.push(r);
|
|
11508
11453
|
}
|
|
11509
11454
|
return t;
|
|
11510
11455
|
}
|
|
11511
|
-
function
|
|
11456
|
+
function Nu(e) {
|
|
11512
11457
|
let t = (0, Y.resolve)(e), n = [], r = (0, Y.join)(t, "package.primmel");
|
|
11513
11458
|
(0, Y.existsSync)(r) && n.push({
|
|
11514
11459
|
path: r,
|
|
11515
11460
|
role: "manifest"
|
|
11516
11461
|
});
|
|
11517
11462
|
let i = [];
|
|
11518
|
-
for (let e of
|
|
11463
|
+
for (let e of ju) i.push(...Mu((0, Y.join)(t, e)));
|
|
11519
11464
|
for (let e of (0, Y.readdirSync)(t).sort()) {
|
|
11520
11465
|
let n = (0, Y.join)(t, e);
|
|
11521
11466
|
(0, Y.statSync)(n).isFile() && (e.endsWith(".prl") || e.endsWith(".mmel")) && e !== "package.primmel" && e !== ".primmel-allowlist.prl" && i.push(n);
|
|
@@ -11527,10 +11472,10 @@ function Lu(e) {
|
|
|
11527
11472
|
});
|
|
11528
11473
|
return n;
|
|
11529
11474
|
}
|
|
11530
|
-
function
|
|
11531
|
-
return
|
|
11475
|
+
function Pu(e, t = {}) {
|
|
11476
|
+
return Hu(e, t).standard;
|
|
11532
11477
|
}
|
|
11533
|
-
function
|
|
11478
|
+
function Fu(e, t) {
|
|
11534
11479
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
11535
11480
|
for (let i of t) {
|
|
11536
11481
|
let t = e.constructs[i.field]?.[i.id];
|
|
@@ -11546,37 +11491,37 @@ function zu(e, t) {
|
|
|
11546
11491
|
unassigned: r
|
|
11547
11492
|
};
|
|
11548
11493
|
}
|
|
11549
|
-
function
|
|
11550
|
-
let n =
|
|
11494
|
+
function Iu(e, t = {}) {
|
|
11495
|
+
let n = Hu(e, t, !0);
|
|
11551
11496
|
if (!n.provenance) throw Error("loadPackageWithProvenance: provenance not collected");
|
|
11552
11497
|
return {
|
|
11553
11498
|
...n,
|
|
11554
11499
|
provenance: n.provenance
|
|
11555
11500
|
};
|
|
11556
11501
|
}
|
|
11557
|
-
function
|
|
11502
|
+
function Lu(e) {
|
|
11558
11503
|
let t = 0;
|
|
11559
11504
|
for (let n = 0; n < e.length; n++) e.charAt(n) === "\n" && t++;
|
|
11560
11505
|
return t;
|
|
11561
11506
|
}
|
|
11562
|
-
function
|
|
11507
|
+
function Ru(e) {
|
|
11563
11508
|
let t = [], n = 0, r = 1;
|
|
11564
11509
|
for (let i of e) {
|
|
11565
11510
|
if (i.role !== "content") continue;
|
|
11566
|
-
let e =
|
|
11511
|
+
let e = Cu(i.path);
|
|
11567
11512
|
t.push({
|
|
11568
11513
|
path: i.path,
|
|
11569
11514
|
text: e,
|
|
11570
11515
|
start: n,
|
|
11571
11516
|
lineStart: r
|
|
11572
|
-
}), n += e.length + 2, r +=
|
|
11517
|
+
}), n += e.length + 2, r += Lu(e) + 2;
|
|
11573
11518
|
}
|
|
11574
11519
|
return t;
|
|
11575
11520
|
}
|
|
11576
|
-
function
|
|
11521
|
+
function zu(e) {
|
|
11577
11522
|
return e.map((e) => e.text).join("\n\n");
|
|
11578
11523
|
}
|
|
11579
|
-
function
|
|
11524
|
+
function Bu(e, t, n) {
|
|
11580
11525
|
let r = {}, i = 0;
|
|
11581
11526
|
for (let a of e) {
|
|
11582
11527
|
for (; i + 1 < t.length && a.start.offset >= t[i + 1].start;) i++;
|
|
@@ -11596,7 +11541,7 @@ function Wu(e, t, n) {
|
|
|
11596
11541
|
}
|
|
11597
11542
|
return r;
|
|
11598
11543
|
}
|
|
11599
|
-
function
|
|
11544
|
+
function Vu(e) {
|
|
11600
11545
|
let t = (0, Y.join)((0, Y.resolve)(e), "package.primmel");
|
|
11601
11546
|
if (!(0, Y.existsSync)(t)) throw Error(`loadPackage: no package.primmel found in ${(0, Y.resolve)(e)}`);
|
|
11602
11547
|
let n = (0, Y.readFileSync)(t, "utf8"), r = { packageManifest: null };
|
|
@@ -11605,39 +11550,39 @@ function Gu(e) {
|
|
|
11605
11550
|
if (!i || !i.id) throw Error(`loadPackage: ${t} is not a valid package manifest`);
|
|
11606
11551
|
return i;
|
|
11607
11552
|
}
|
|
11608
|
-
function
|
|
11609
|
-
let r =
|
|
11553
|
+
function Hu(e, t = {}, n = !1) {
|
|
11554
|
+
let r = Nu(e);
|
|
11610
11555
|
if (r.length === 0) throw Error(`loadPackage: no package files found in ${(0, Y.resolve)(e)}`);
|
|
11611
11556
|
let i = null;
|
|
11612
|
-
r.some((e) => e.role === "manifest") && (i =
|
|
11613
|
-
let a =
|
|
11614
|
-
if (i && t.resolvePackage &&
|
|
11557
|
+
r.some((e) => e.role === "manifest") && (i = Vu(e));
|
|
11558
|
+
let a = Ru(r);
|
|
11559
|
+
if (i && t.resolvePackage && Wu(i).length > 0) return Zu(e, t, i, n);
|
|
11615
11560
|
let o = n ? {
|
|
11616
11561
|
...t,
|
|
11617
11562
|
withProvenance: !0
|
|
11618
11563
|
} : t;
|
|
11619
11564
|
i?.language && (o.strict = !0);
|
|
11620
|
-
let s = u(
|
|
11565
|
+
let s = u(zu(a), vu, o);
|
|
11621
11566
|
if (i) {
|
|
11622
11567
|
s.packageManifest = i;
|
|
11623
|
-
let e =
|
|
11568
|
+
let e = Gu(i);
|
|
11624
11569
|
e && s.issues.push(e);
|
|
11625
11570
|
}
|
|
11626
11571
|
let c = {
|
|
11627
|
-
standard: m(s,
|
|
11572
|
+
standard: m(s, yu),
|
|
11628
11573
|
issues: s.issues
|
|
11629
11574
|
};
|
|
11630
11575
|
if (n) {
|
|
11631
11576
|
let e = r.find((e) => e.role === "manifest")?.path;
|
|
11632
11577
|
c.provenance = {
|
|
11633
11578
|
...e === void 0 ? {} : { manifest: e },
|
|
11634
|
-
constructs:
|
|
11579
|
+
constructs: Bu(s.constructs ?? [], a, i?.id)
|
|
11635
11580
|
};
|
|
11636
11581
|
}
|
|
11637
11582
|
return c;
|
|
11638
11583
|
}
|
|
11639
|
-
function
|
|
11640
|
-
return
|
|
11584
|
+
function Uu(e, t = {}) {
|
|
11585
|
+
return Hu(e, t);
|
|
11641
11586
|
}
|
|
11642
11587
|
var X = class extends Error {
|
|
11643
11588
|
rule;
|
|
@@ -11645,12 +11590,12 @@ var X = class extends Error {
|
|
|
11645
11590
|
super(t), this.rule = e, this.name = "CompositionError";
|
|
11646
11591
|
}
|
|
11647
11592
|
};
|
|
11648
|
-
function
|
|
11593
|
+
function Wu(e) {
|
|
11649
11594
|
let t = [];
|
|
11650
11595
|
for (let n of [...e.uses ?? [], ...e.extends ? [e.extends] : []]) t.includes(n) || t.push(n);
|
|
11651
11596
|
return t;
|
|
11652
11597
|
}
|
|
11653
|
-
function
|
|
11598
|
+
function Gu(e) {
|
|
11654
11599
|
return e.extends ? {
|
|
11655
11600
|
severity: "warning",
|
|
11656
11601
|
code: "extends-deprecated",
|
|
@@ -11659,51 +11604,51 @@ function Yu(e) {
|
|
|
11659
11604
|
message: `package "${e.id}": 'extends ${e.extends}' is deprecated — declare 'uses { ${e.extends} }' instead (extends is treated as a single-entry uses)`
|
|
11660
11605
|
} : null;
|
|
11661
11606
|
}
|
|
11662
|
-
var
|
|
11607
|
+
var Ku = /* @__PURE__ */ "approvals.roles.processes.pages.gateways.regs.references.provisions.dataclasses.events.enums.variables.notes.tables.figures.links.mapProfiles.viewProfiles.terms.forms.subforms.symbols.formulaNotes.calculations.verdicts.referenceMaterials.wireMappings.stringFormats.namespaces.datums.checks.testPointSets.commonTestConditions.competenceKinds.schemeActivityKinds.schemeTypes.constraints.uncertaintyBudgets.discrepancyRecords.stateMachines.conformanceTests.conformanceClasses.requirements.requirementClasses.instruments.attributeDefinitions.capabilities.behaviors.subjects.identitySlots.aspects.promiseSets.attestations.applicationDeclarations.calculationContexts.evaluationDimensions.evaluationProfiles.certificateTemplates.verificationPathways.labSelectionCriteria.sampleSelectionRules.specimenGovernanceRules.testReportSkeletons.testReportChecklists.instances.quantityRegisters.duals.invariants.testSequences.formulasUsed.texts.participantKinds.governanceOrgans.declarationKinds.declarationStatuses.declarationGates.schemeDefinitions.schemeLifecycles.frameworkDocuments.documentPrecedences.autoInclusions.decisionRules.documentModules.informativeAnnexes.partAnnexes.comments.predicates.artifactDefinitions.artifactInstances.activityArchetypes.connectorProfiles.monitors.passports.dataspaces.policies.dimensions".split("."), qu = /* @__PURE__ */ new Set([
|
|
11663
11608
|
"testReportChecklists",
|
|
11664
11609
|
"dataclasses",
|
|
11665
11610
|
"quantityRegisters"
|
|
11666
11611
|
]);
|
|
11667
|
-
function
|
|
11612
|
+
function Ju(e) {
|
|
11668
11613
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
11669
11614
|
}
|
|
11670
|
-
function
|
|
11615
|
+
function Yu(e, t) {
|
|
11671
11616
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
11672
|
-
let n = (e) =>
|
|
11617
|
+
let n = (e) => Ju(e) && typeof e.id == "string", r = [...e, ...t];
|
|
11673
11618
|
if (r.length > 0 && r.every(n)) {
|
|
11674
11619
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
11675
|
-
for (let n of r) t.has(n.id) ? t.set(n.id,
|
|
11620
|
+
for (let n of r) t.has(n.id) ? t.set(n.id, Yu(t.get(n.id), n)) : (e.push(n.id), t.set(n.id, n));
|
|
11676
11621
|
return e.map((e) => t.get(e));
|
|
11677
11622
|
}
|
|
11678
11623
|
let i = [...e];
|
|
11679
11624
|
for (let e of t) i.includes(e) || i.push(e);
|
|
11680
11625
|
return i;
|
|
11681
11626
|
}
|
|
11682
|
-
if (
|
|
11627
|
+
if (Ju(e) && Ju(t)) {
|
|
11683
11628
|
let n = { ...e };
|
|
11684
|
-
for (let [e, r] of Object.entries(t)) e !== "overlay" && r != null && (n[e] = e in n ?
|
|
11629
|
+
for (let [e, r] of Object.entries(t)) e !== "overlay" && r != null && (n[e] = e in n ? Yu(n[e], r) : r);
|
|
11685
11630
|
return n;
|
|
11686
11631
|
}
|
|
11687
11632
|
return t;
|
|
11688
11633
|
}
|
|
11689
|
-
function
|
|
11690
|
-
let n =
|
|
11634
|
+
function Xu(e, t) {
|
|
11635
|
+
let n = Ru(Nu(e));
|
|
11691
11636
|
return {
|
|
11692
|
-
ctx: u(
|
|
11637
|
+
ctx: u(zu(n), vu, t),
|
|
11693
11638
|
chunks: n
|
|
11694
11639
|
};
|
|
11695
11640
|
}
|
|
11696
|
-
function
|
|
11641
|
+
function Zu(e, t, n, r = !1) {
|
|
11697
11642
|
let i = t.resolvePackage, a = n.id, o = /* @__PURE__ */ new Map([[a, (0, Y.resolve)(e)]]), s = /* @__PURE__ */ new Map([[a, n]]), c = [], l = /* @__PURE__ */ new Map(), u = [], d = (e) => {
|
|
11698
11643
|
l.set(e, 1), u.push(e);
|
|
11699
|
-
for (let t of
|
|
11644
|
+
for (let t of Wu(s.get(e))) {
|
|
11700
11645
|
let n = l.get(t) ?? 0;
|
|
11701
11646
|
if (n === 1) throw new X("uses-cycle", `uses cycle: ${[...u.slice(u.indexOf(t)), t].join(" → ")} — package composition must be acyclic (uses-cycle)`);
|
|
11702
11647
|
if (n !== 2) {
|
|
11703
11648
|
if (!o.has(t)) {
|
|
11704
11649
|
let n = i(t);
|
|
11705
11650
|
if (!n) throw new X("uses-resolves", `package "${e}" uses "${t}", which the package locator cannot resolve (uses-resolves)`);
|
|
11706
|
-
let r =
|
|
11651
|
+
let r = Vu(n);
|
|
11707
11652
|
if (r.id !== t) throw new X("uses-resolves", `package "${e}" uses "${t}", but the located package (${(0, Y.resolve)(n)}) declares id "${r.id}" (uses-resolves)`);
|
|
11708
11653
|
if (o.set(t, n), s.set(t, r), r.kind === "product_reference") {
|
|
11709
11654
|
l.set(t, 2);
|
|
@@ -11723,13 +11668,13 @@ function td(e, t, n, r = !1) {
|
|
|
11723
11668
|
for (let e of c) {
|
|
11724
11669
|
let t = { ...f };
|
|
11725
11670
|
s.get(e)?.language && (t.strict = !0);
|
|
11726
|
-
let n =
|
|
11671
|
+
let n = Xu(o.get(e), t);
|
|
11727
11672
|
p.set(e, n.ctx), h.set(e, n.chunks);
|
|
11728
11673
|
}
|
|
11729
11674
|
let g = /* @__PURE__ */ new Map();
|
|
11730
|
-
for (let e of
|
|
11675
|
+
for (let e of Ku) g.set(e, /* @__PURE__ */ new Map());
|
|
11731
11676
|
let _ = p.get(c[0]);
|
|
11732
|
-
for (let e of
|
|
11677
|
+
for (let e of Ku) for (let t of Object.keys(_[e])) g.get(e).set(t, c[0]);
|
|
11733
11678
|
let v = /* @__PURE__ */ new Map(), y = (e, t) => {
|
|
11734
11679
|
for (let n of Object.values(t.documentModules)) n.namespace !== "" && !v.has(n.namespace) && v.set(n.namespace, e);
|
|
11735
11680
|
for (let n of Object.keys(t.requirementClasses)) v.has(n) || v.set(n, e);
|
|
@@ -11743,13 +11688,13 @@ function td(e, t, n, r = !1) {
|
|
|
11743
11688
|
for (let e of c.slice(1)) {
|
|
11744
11689
|
let t = p.get(e);
|
|
11745
11690
|
b(e, t);
|
|
11746
|
-
for (let n of
|
|
11691
|
+
for (let n of Ku) {
|
|
11747
11692
|
let r = _[n], i = g.get(n);
|
|
11748
11693
|
for (let [a, o] of Object.entries(t[n])) {
|
|
11749
11694
|
let t = i.get(a);
|
|
11750
11695
|
if (t !== void 0) {
|
|
11751
|
-
if (!(typeof o == "object" && o && o.overlay === !0 && (n === "terms" || n === "processes" || n === "attributeDefinitions" || n === "certificateTemplates" ||
|
|
11752
|
-
if (
|
|
11696
|
+
if (!(typeof o == "object" && o && o.overlay === !0 && (n === "terms" || n === "processes" || n === "attributeDefinitions" || n === "certificateTemplates" || qu.has(n)))) throw new X("uses-no-redefine", `package "${e}" redefines ${String(n)} id "${a}" already declared by package "${t}" — an overlay may reference upstream ids, never redefine them (uses-no-redefine)`);
|
|
11697
|
+
if (qu.has(n)) {
|
|
11753
11698
|
if (n === "testReportChecklists") {
|
|
11754
11699
|
let t = new Set((r[a].entries ?? []).map((e) => e.id));
|
|
11755
11700
|
for (let n of o.entries ?? []) t.has(n.id) || _.issues.push({
|
|
@@ -11760,7 +11705,7 @@ function td(e, t, n, r = !1) {
|
|
|
11760
11705
|
message: `package "${e}" overlay test_report_checklist "${a}" declares entry "${n.id}", which no upstream package's checklist carries — an overlay adds rec-bound strings to an upstream entry, never a fresh entry (orphan-overlay-entry)`
|
|
11761
11706
|
});
|
|
11762
11707
|
}
|
|
11763
|
-
r[a] =
|
|
11708
|
+
r[a] = Yu(r[a], o), i.set(a, e);
|
|
11764
11709
|
continue;
|
|
11765
11710
|
}
|
|
11766
11711
|
}
|
|
@@ -11779,7 +11724,7 @@ function td(e, t, n, r = !1) {
|
|
|
11779
11724
|
if (r && !c.includes(r.pkg)) try {
|
|
11780
11725
|
let e = i(r.pkg);
|
|
11781
11726
|
if (e) {
|
|
11782
|
-
let t =
|
|
11727
|
+
let t = Vu(e);
|
|
11783
11728
|
a = t.provides ?? [], s.set(r.pkg, t);
|
|
11784
11729
|
}
|
|
11785
11730
|
} catch {}
|
|
@@ -11802,12 +11747,12 @@ function td(e, t, n, r = !1) {
|
|
|
11802
11747
|
}
|
|
11803
11748
|
});
|
|
11804
11749
|
for (let e of s.values()) {
|
|
11805
|
-
let t =
|
|
11750
|
+
let t = Gu(e);
|
|
11806
11751
|
t && ee.push(t);
|
|
11807
11752
|
}
|
|
11808
11753
|
_.packageManifest = n;
|
|
11809
11754
|
let x = {
|
|
11810
|
-
standard: m(_,
|
|
11755
|
+
standard: m(_, yu),
|
|
11811
11756
|
issues: [..._.issues, ...ee],
|
|
11812
11757
|
composition: {
|
|
11813
11758
|
root: a,
|
|
@@ -11821,7 +11766,7 @@ function td(e, t, n, r = !1) {
|
|
|
11821
11766
|
if (r) {
|
|
11822
11767
|
let t = {};
|
|
11823
11768
|
for (let e of c) {
|
|
11824
|
-
let n =
|
|
11769
|
+
let n = Bu(p.get(e).constructs ?? [], h.get(e), e);
|
|
11825
11770
|
for (let [e, r] of Object.entries(n)) {
|
|
11826
11771
|
let n = t[e] ??= {};
|
|
11827
11772
|
for (let [e, t] of Object.entries(r)) n[e] = t;
|
|
@@ -11836,7 +11781,7 @@ function td(e, t, n, r = !1) {
|
|
|
11836
11781
|
}
|
|
11837
11782
|
//#endregion
|
|
11838
11783
|
//#region src/ser-des/prm.ts
|
|
11839
|
-
var
|
|
11784
|
+
var Qu = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), $u = /* @__PURE__ */ new Set([
|
|
11840
11785
|
"full",
|
|
11841
11786
|
"minimal",
|
|
11842
11787
|
"partial",
|
|
@@ -11845,7 +11790,7 @@ var nd = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), rd = /* @__PURE__
|
|
|
11845
11790
|
function Z(e) {
|
|
11846
11791
|
throw Error(`.prm parse error: ${e}`);
|
|
11847
11792
|
}
|
|
11848
|
-
function
|
|
11793
|
+
function ed(e, t) {
|
|
11849
11794
|
let n = {
|
|
11850
11795
|
description: "",
|
|
11851
11796
|
justification: "",
|
|
@@ -11854,9 +11799,9 @@ function id(e, t) {
|
|
|
11854
11799
|
if (e == null) return n;
|
|
11855
11800
|
(typeof e != "object" || Array.isArray(e)) && Z(`${t}: pair metadata must be an object`);
|
|
11856
11801
|
let r = e;
|
|
11857
|
-
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" ||
|
|
11802
|
+
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" || !$u.has(r.coverage)) && Z(`${t}: "coverage" must be one of full | minimal | partial | none`), n.coverage = r.coverage), n;
|
|
11858
11803
|
}
|
|
11859
|
-
function
|
|
11804
|
+
function td(e) {
|
|
11860
11805
|
let t;
|
|
11861
11806
|
try {
|
|
11862
11807
|
t = JSON.parse(e);
|
|
@@ -11865,7 +11810,7 @@ function ad(e) {
|
|
|
11865
11810
|
}
|
|
11866
11811
|
(typeof t != "object" || !t || Array.isArray(t)) && Z("top level must be an object");
|
|
11867
11812
|
let n = t, r = typeof n["@type"] == "string" ? n["@type"] : "";
|
|
11868
|
-
|
|
11813
|
+
Qu.has(r) || Z(`"@type" must be MMEL_MAP or Primmel_MAP (got "${r}")`);
|
|
11869
11814
|
let i = {
|
|
11870
11815
|
context: typeof n["@context"] == "string" ? n["@context"] : "",
|
|
11871
11816
|
type: r,
|
|
@@ -11881,20 +11826,20 @@ function ad(e) {
|
|
|
11881
11826
|
coverage: {}
|
|
11882
11827
|
}, a = n.coverage ?? {};
|
|
11883
11828
|
(typeof a != "object" || !a || Array.isArray(a)) && Z(`mapSet."${e}".coverage: must be an object`);
|
|
11884
|
-
for (let [t, n] of Object.entries(a)) (typeof n != "string" ||
|
|
11829
|
+
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !$u.has(n)) && Z(`mapSet."${e}".coverage."${t}": must be one of full | minimal | partial | none`), r.coverage[t] = n;
|
|
11885
11830
|
let o = n.mappings ?? {};
|
|
11886
11831
|
(typeof o != "object" || !o || Array.isArray(o)) && Z(`mapSet."${e}".mappings: must be an object`);
|
|
11887
11832
|
for (let [t, n] of Object.entries(o)) {
|
|
11888
11833
|
(typeof n != "object" || !n || Array.isArray(n)) && Z(`mapSet."${e}".mappings."${t}": must be an object`);
|
|
11889
11834
|
let i = {};
|
|
11890
|
-
for (let [r, a] of Object.entries(n)) i[r] =
|
|
11835
|
+
for (let [r, a] of Object.entries(n)) i[r] = ed(a, `mapSet."${e}".mappings."${t}"."${r}"`);
|
|
11891
11836
|
r.mappings[t] = i;
|
|
11892
11837
|
}
|
|
11893
11838
|
i.mapSet[e] = r;
|
|
11894
11839
|
}
|
|
11895
11840
|
return i;
|
|
11896
11841
|
}
|
|
11897
|
-
function
|
|
11842
|
+
function nd(e) {
|
|
11898
11843
|
let t = {};
|
|
11899
11844
|
e.context && (t["@context"] = e.context), t["@type"] = e.type || "Primmel_MAP", t.id = e.id;
|
|
11900
11845
|
let n = {};
|
|
@@ -11919,7 +11864,7 @@ function od(e) {
|
|
|
11919
11864
|
}
|
|
11920
11865
|
return t.mapSet = n, JSON.stringify(t, null, 2) + "\n";
|
|
11921
11866
|
}
|
|
11922
|
-
function
|
|
11867
|
+
function rd(e) {
|
|
11923
11868
|
let t = [];
|
|
11924
11869
|
for (let [n, r] of Object.entries(e.mapSet)) {
|
|
11925
11870
|
let e = {};
|
|
@@ -11938,7 +11883,7 @@ function sd(e) {
|
|
|
11938
11883
|
}
|
|
11939
11884
|
return t;
|
|
11940
11885
|
}
|
|
11941
|
-
function
|
|
11886
|
+
function id(e, t) {
|
|
11942
11887
|
let n = {
|
|
11943
11888
|
context: "",
|
|
11944
11889
|
type: "Primmel_MAP",
|
|
@@ -11966,7 +11911,7 @@ function cd(e, t) {
|
|
|
11966
11911
|
}
|
|
11967
11912
|
//#endregion
|
|
11968
11913
|
//#region src/type-expr.ts
|
|
11969
|
-
var
|
|
11914
|
+
var ad = [
|
|
11970
11915
|
"integer",
|
|
11971
11916
|
"float",
|
|
11972
11917
|
"double",
|
|
@@ -11981,8 +11926,8 @@ var ld = [
|
|
|
11981
11926
|
"reference",
|
|
11982
11927
|
"object",
|
|
11983
11928
|
"any"
|
|
11984
|
-
],
|
|
11985
|
-
function
|
|
11929
|
+
], od = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
11930
|
+
function sd(e) {
|
|
11986
11931
|
let t = 0;
|
|
11987
11932
|
for (let n = 0; n < e.length; n++) {
|
|
11988
11933
|
let r = e[n];
|
|
@@ -11992,33 +11937,33 @@ function dd(e) {
|
|
|
11992
11937
|
}
|
|
11993
11938
|
return null;
|
|
11994
11939
|
}
|
|
11995
|
-
function
|
|
11940
|
+
function cd(e) {
|
|
11996
11941
|
let t = e.trim();
|
|
11997
11942
|
if (t === "QuantityValue") return { kind: "quantity" };
|
|
11998
|
-
if (
|
|
11943
|
+
if (ad.includes(t)) return {
|
|
11999
11944
|
kind: "primitive",
|
|
12000
11945
|
name: t
|
|
12001
11946
|
};
|
|
12002
11947
|
let n = /^reference\(([^)]+)\)$/.exec(t);
|
|
12003
11948
|
if (n) {
|
|
12004
11949
|
let e = n[1].trim();
|
|
12005
|
-
return
|
|
11950
|
+
return od.test(e) ? {
|
|
12006
11951
|
kind: "reference",
|
|
12007
11952
|
target: e
|
|
12008
11953
|
} : null;
|
|
12009
11954
|
}
|
|
12010
11955
|
if (t.startsWith("map<") && t.endsWith(">")) {
|
|
12011
|
-
let e =
|
|
11956
|
+
let e = sd(t.slice(4, -1));
|
|
12012
11957
|
if (!e) return null;
|
|
12013
11958
|
let n = e[0].trim(), r = null;
|
|
12014
11959
|
n === "string" ? r = {
|
|
12015
11960
|
kind: "primitive",
|
|
12016
11961
|
name: "string"
|
|
12017
|
-
} :
|
|
11962
|
+
} : od.test(n) && (r = {
|
|
12018
11963
|
kind: "reference",
|
|
12019
11964
|
target: n
|
|
12020
11965
|
});
|
|
12021
|
-
let i =
|
|
11966
|
+
let i = cd(e[1]);
|
|
12022
11967
|
return !r || !i ? null : {
|
|
12023
11968
|
kind: "map",
|
|
12024
11969
|
key: r,
|
|
@@ -12027,13 +11972,13 @@ function fd(e) {
|
|
|
12027
11972
|
}
|
|
12028
11973
|
return null;
|
|
12029
11974
|
}
|
|
12030
|
-
function
|
|
12031
|
-
let t =
|
|
11975
|
+
function ld(e) {
|
|
11976
|
+
let t = cd(e);
|
|
12032
11977
|
return t !== null && t.kind === "map";
|
|
12033
11978
|
}
|
|
12034
11979
|
//#endregion
|
|
12035
11980
|
//#region src/mapping-coverage.ts
|
|
12036
|
-
function
|
|
11981
|
+
function ud(e, t) {
|
|
12037
11982
|
let n = e.indexOf("#");
|
|
12038
11983
|
if (n >= 0) {
|
|
12039
11984
|
let t = e.slice(0, n), r = e.slice(n + 1);
|
|
@@ -12049,12 +11994,12 @@ function md(e, t) {
|
|
|
12049
11994
|
qualified: t + "#" + e
|
|
12050
11995
|
};
|
|
12051
11996
|
}
|
|
12052
|
-
function
|
|
11997
|
+
function dd(e, t) {
|
|
12053
11998
|
let n = [];
|
|
12054
11999
|
for (let [r, i] of Object.entries(e.mappings)) for (let a of i) n.push({
|
|
12055
12000
|
source: r,
|
|
12056
12001
|
sourceModel: t,
|
|
12057
|
-
target:
|
|
12002
|
+
target: ud(a.target, e.namespace).qualified,
|
|
12058
12003
|
targetModel: e.namespace,
|
|
12059
12004
|
description: a.description,
|
|
12060
12005
|
justification: a.justification,
|
|
@@ -12062,12 +12007,12 @@ function hd(e, t) {
|
|
|
12062
12007
|
});
|
|
12063
12008
|
return n;
|
|
12064
12009
|
}
|
|
12065
|
-
function
|
|
12010
|
+
function fd(e, t = {}) {
|
|
12066
12011
|
let n = t.modelId ?? e.packageManifest?.id ?? e.meta?.namespace ?? "", r = [...e.mapProfiles ?? []], i = t.prm ? Array.isArray(t.prm) ? t.prm : [t.prm] : [];
|
|
12067
|
-
for (let e of i) r.push(...
|
|
12068
|
-
return r.flatMap((e) =>
|
|
12012
|
+
for (let e of i) r.push(...rd(e));
|
|
12013
|
+
return r.flatMap((e) => dd(e, n));
|
|
12069
12014
|
}
|
|
12070
|
-
function
|
|
12015
|
+
function pd(e, t = {}) {
|
|
12071
12016
|
let n = t.idPrefix ?? "", r = (e.processes ?? []).filter((e) => !n || e.id.startsWith(n)), i = new Set(r.map((e) => e.id)), a = /* @__PURE__ */ new Map();
|
|
12072
12017
|
for (let e of r) a.set(e.id, {
|
|
12073
12018
|
id: e.id.slice(n.length),
|
|
@@ -12081,18 +12026,18 @@ function _d(e, t = {}) {
|
|
|
12081
12026
|
}
|
|
12082
12027
|
return o;
|
|
12083
12028
|
}
|
|
12084
|
-
function
|
|
12029
|
+
function md(e, t) {
|
|
12085
12030
|
return t.length === 0 ? "none" : t.every((e) => e === "full") ? "full" : e === "gateway" && t.some((e) => e === "full" || e === "minimal") ? "minimal" : t.some((e) => e !== "none") ? "partial" : "none";
|
|
12086
12031
|
}
|
|
12087
|
-
function
|
|
12088
|
-
let a = Array.isArray(t) ? t :
|
|
12032
|
+
function hd(e, t, n, r, i = {}) {
|
|
12033
|
+
let a = Array.isArray(t) ? t : pd(t), o = n.filter((e) => e.targetModel === r), s = /* @__PURE__ */ new Map();
|
|
12089
12034
|
for (let e of o) {
|
|
12090
|
-
let t =
|
|
12035
|
+
let t = ud(e.target, r).id;
|
|
12091
12036
|
(s.get(t) ?? s.set(t, []).get(t)).push(e.source);
|
|
12092
12037
|
}
|
|
12093
12038
|
let c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = (e, t) => {
|
|
12094
12039
|
let n = s.has(e.id), r = n ? e.id : t, i = e.children.map((e) => u(e, r)), a;
|
|
12095
|
-
return r === null ? a = e.children.length === 0 ? "none" :
|
|
12040
|
+
return r === null ? a = e.children.length === 0 ? "none" : md(e.composition, i) : (a = "full", !n && t !== null && l.set(e.id, t)), c.set(e.id, a), a;
|
|
12096
12041
|
};
|
|
12097
12042
|
for (let e of a) u(e, null);
|
|
12098
12043
|
let d = [], f = /* @__PURE__ */ new Map(), p = (e) => {
|
|
@@ -12114,7 +12059,7 @@ function yd(e, t, n, r, i = {}) {
|
|
|
12114
12059
|
for (let e of d) m[e.coverage]++;
|
|
12115
12060
|
let h = [], g = /* @__PURE__ */ new Set();
|
|
12116
12061
|
for (let e of o) {
|
|
12117
|
-
let t =
|
|
12062
|
+
let t = ud(e.target, r).id;
|
|
12118
12063
|
f.has(t) ? g.add(e.source) : h.push({
|
|
12119
12064
|
source: e.source,
|
|
12120
12065
|
target: e.target
|
|
@@ -12125,7 +12070,7 @@ function yd(e, t, n, r, i = {}) {
|
|
|
12125
12070
|
y.has(t) || (y.add(t), v.push(e));
|
|
12126
12071
|
};
|
|
12127
12072
|
for (let e of o) {
|
|
12128
|
-
let t =
|
|
12073
|
+
let t = ud(e.target, r).id, n = f.get(t);
|
|
12129
12074
|
if (!n) continue;
|
|
12130
12075
|
let i = (e, t) => {
|
|
12131
12076
|
for (let n of e.children) t.push(n), i(n, t);
|
|
@@ -12172,7 +12117,7 @@ function yd(e, t, n, r, i = {}) {
|
|
|
12172
12117
|
summary: m
|
|
12173
12118
|
};
|
|
12174
12119
|
}
|
|
12175
|
-
function
|
|
12120
|
+
function gd(e) {
|
|
12176
12121
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
12177
12122
|
for (let r of e) for (let i of r.mappings) for (let r of e) if (r.modelId === i.targetModel) for (let e of r.mappings) {
|
|
12178
12123
|
if (i.target !== `${r.modelId}#${e.source}`) continue;
|
|
@@ -12190,7 +12135,7 @@ function bd(e) {
|
|
|
12190
12135
|
}
|
|
12191
12136
|
return t;
|
|
12192
12137
|
}
|
|
12193
|
-
function
|
|
12138
|
+
function _d(e) {
|
|
12194
12139
|
let t = /* @__PURE__ */ new Map();
|
|
12195
12140
|
for (let n of e) for (let e of n.mappings) {
|
|
12196
12141
|
let r = `${n.modelId}→${e.targetModel}`, i = t.get(r) ?? {
|
|
@@ -12202,14 +12147,14 @@ function xd(e) {
|
|
|
12202
12147
|
}
|
|
12203
12148
|
return [...t.values()];
|
|
12204
12149
|
}
|
|
12205
|
-
function
|
|
12150
|
+
function vd(e) {
|
|
12206
12151
|
if (e && typeof e == "object") {
|
|
12207
|
-
for (let t of Object.values(e))
|
|
12152
|
+
for (let t of Object.values(e)) vd(t);
|
|
12208
12153
|
Object.freeze(e);
|
|
12209
12154
|
}
|
|
12210
12155
|
return e;
|
|
12211
12156
|
}
|
|
12212
|
-
function
|
|
12157
|
+
function yd(e, t, n = null) {
|
|
12213
12158
|
let r = new Set(t.visibleElements ?? []), i = r.size > 0, a = i ? [...r] : (e.processes ?? []).map((e) => e.id), o = null;
|
|
12214
12159
|
if (n) {
|
|
12215
12160
|
let e = n.components.filter((e) => !i || r.has(e.id) || e.mappedBy.some((e) => r.has(e))), t = {
|
|
@@ -12227,14 +12172,14 @@ function Cd(e, t, n = null) {
|
|
|
12227
12172
|
summary: t
|
|
12228
12173
|
};
|
|
12229
12174
|
}
|
|
12230
|
-
return
|
|
12175
|
+
return vd({
|
|
12231
12176
|
id: t.id,
|
|
12232
12177
|
against: t.against ?? "",
|
|
12233
12178
|
elements: a,
|
|
12234
12179
|
coverage: o
|
|
12235
12180
|
});
|
|
12236
12181
|
}
|
|
12237
|
-
function
|
|
12182
|
+
function bd(e) {
|
|
12238
12183
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
12239
12184
|
for (let n of e ?? []) t.add(n.id);
|
|
12240
12185
|
};
|
|
@@ -12251,13 +12196,13 @@ function wd(e) {
|
|
|
12251
12196
|
}
|
|
12252
12197
|
//#endregion
|
|
12253
12198
|
//#region src/model-diff.ts
|
|
12254
|
-
var
|
|
12199
|
+
var xd = [
|
|
12255
12200
|
"foundations",
|
|
12256
12201
|
"primary",
|
|
12257
12202
|
"secondary",
|
|
12258
12203
|
"tertiary",
|
|
12259
12204
|
"cross-cutting"
|
|
12260
|
-
],
|
|
12205
|
+
], Sd = {
|
|
12261
12206
|
terms: "foundations",
|
|
12262
12207
|
references: "foundations",
|
|
12263
12208
|
roles: "foundations",
|
|
@@ -12288,7 +12233,6 @@ var Td = [
|
|
|
12288
12233
|
attributeDefinitions: "primary",
|
|
12289
12234
|
capabilities: "primary",
|
|
12290
12235
|
behaviors: "primary",
|
|
12291
|
-
conditionSets: "primary",
|
|
12292
12236
|
instances: "primary",
|
|
12293
12237
|
duals: "primary",
|
|
12294
12238
|
artifactDefinitions: "primary",
|
|
@@ -12341,9 +12285,9 @@ function Q(e) {
|
|
|
12341
12285
|
};
|
|
12342
12286
|
return n(e);
|
|
12343
12287
|
}
|
|
12344
|
-
var
|
|
12345
|
-
function
|
|
12346
|
-
let r = e ?? "", i = n ?? "", a =
|
|
12288
|
+
var Cd = /#([^#]*)$/;
|
|
12289
|
+
function wd(e, t, n = "") {
|
|
12290
|
+
let r = e ?? "", i = n ?? "", a = Cd.exec(r);
|
|
12347
12291
|
a && (r = r.slice(0, a.index), i ||= a[1]);
|
|
12348
12292
|
let o = r.lastIndexOf(":"), s = r, c = "";
|
|
12349
12293
|
if (o >= 0) {
|
|
@@ -12357,11 +12301,11 @@ function Od(e, t, n = "") {
|
|
|
12357
12301
|
fragment: i
|
|
12358
12302
|
};
|
|
12359
12303
|
}
|
|
12360
|
-
var
|
|
12304
|
+
var Td = [
|
|
12361
12305
|
"source",
|
|
12362
12306
|
"sourceRef",
|
|
12363
12307
|
"sourceRefs"
|
|
12364
|
-
],
|
|
12308
|
+
], Ed = {
|
|
12365
12309
|
requirements: {
|
|
12366
12310
|
statement: [
|
|
12367
12311
|
"name",
|
|
@@ -12410,7 +12354,7 @@ var kd = [
|
|
|
12410
12354
|
"profile"
|
|
12411
12355
|
]
|
|
12412
12356
|
}
|
|
12413
|
-
},
|
|
12357
|
+
}, Dd = [
|
|
12414
12358
|
"name",
|
|
12415
12359
|
"label",
|
|
12416
12360
|
"title",
|
|
@@ -12419,16 +12363,16 @@ var kd = [
|
|
|
12419
12363
|
"statement",
|
|
12420
12364
|
"purpose",
|
|
12421
12365
|
"text"
|
|
12422
|
-
],
|
|
12366
|
+
], Od = [
|
|
12423
12367
|
"parent",
|
|
12424
12368
|
"bindsTo",
|
|
12425
12369
|
"targets",
|
|
12426
12370
|
"conformanceProcessId",
|
|
12427
12371
|
"conformanceProcessIds"
|
|
12428
12372
|
];
|
|
12429
|
-
function
|
|
12373
|
+
function kd(e) {
|
|
12430
12374
|
let t = {}, n = (e, n) => {
|
|
12431
|
-
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(
|
|
12375
|
+
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(wd(n.doc ?? "", n.clause ?? "", n.fragment));
|
|
12432
12376
|
};
|
|
12433
12377
|
n("source", e.source), n("sourceRef", e.sourceRef);
|
|
12434
12378
|
for (let t of e.sourceRefs ?? []) n("sourceRefs", t);
|
|
@@ -12440,7 +12384,7 @@ function Nd(e) {
|
|
|
12440
12384
|
let i = (e) => {
|
|
12441
12385
|
let t = /* @__PURE__ */ new Set();
|
|
12442
12386
|
return e.filter((e) => {
|
|
12443
|
-
let n =
|
|
12387
|
+
let n = Ad(e);
|
|
12444
12388
|
return !t.has(n) && (t.add(n), !0);
|
|
12445
12389
|
});
|
|
12446
12390
|
};
|
|
@@ -12450,17 +12394,17 @@ function Nd(e) {
|
|
|
12450
12394
|
channels: t
|
|
12451
12395
|
};
|
|
12452
12396
|
}
|
|
12453
|
-
function
|
|
12397
|
+
function Ad(e) {
|
|
12454
12398
|
return Q({
|
|
12455
12399
|
basis: e.basis,
|
|
12456
12400
|
clause: e.clause,
|
|
12457
12401
|
fragment: e.fragment
|
|
12458
12402
|
});
|
|
12459
12403
|
}
|
|
12460
|
-
function
|
|
12461
|
-
let n = String(t.id ?? t.entityName ?? ""), r =
|
|
12404
|
+
function jd(e, t) {
|
|
12405
|
+
let n = String(t.id ?? t.entityName ?? ""), r = Sd[e] ?? "cross-cutting", { edges: i, channels: a } = kd(t), o = new Set(Td);
|
|
12462
12406
|
typeof t.reference == "string" && t.reference.startsWith("urn:") && o.add("reference");
|
|
12463
|
-
let s = {}, c = {}, l =
|
|
12407
|
+
let s = {}, c = {}, l = Ed[e], u = (e) => {
|
|
12464
12408
|
let n = {};
|
|
12465
12409
|
for (let r of e) t[r] !== void 0 && (n[r] = t[r], o.add(r), s[r] = t[r]);
|
|
12466
12410
|
return n;
|
|
@@ -12480,9 +12424,9 @@ function Fd(e, t) {
|
|
|
12480
12424
|
c[`spelling:${t.spelling}`] = Q(e), s[`spelling:${t.spelling}`] = e;
|
|
12481
12425
|
}
|
|
12482
12426
|
} else {
|
|
12483
|
-
let e = u(
|
|
12427
|
+
let e = u(Dd);
|
|
12484
12428
|
Object.keys(e).length > 0 && (c.statement = Q(e));
|
|
12485
|
-
let t = u(
|
|
12429
|
+
let t = u(Od);
|
|
12486
12430
|
Object.keys(t).length > 0 && (c.anchor = Q(t));
|
|
12487
12431
|
}
|
|
12488
12432
|
if (i.length > 0) {
|
|
@@ -12509,31 +12453,31 @@ function Fd(e, t) {
|
|
|
12509
12453
|
provenance: i
|
|
12510
12454
|
};
|
|
12511
12455
|
}
|
|
12512
|
-
function
|
|
12456
|
+
function Md(e, t) {
|
|
12513
12457
|
let n = /* @__PURE__ */ new Map();
|
|
12514
|
-
for (let r of Object.keys(
|
|
12458
|
+
for (let r of Object.keys(Sd)) {
|
|
12515
12459
|
let i = e[r];
|
|
12516
12460
|
if (Array.isArray(i)) {
|
|
12517
12461
|
for (let e of i) if (e && typeof e == "object" && ("id" in e || "entityName" in e)) {
|
|
12518
|
-
let i =
|
|
12462
|
+
let i = jd(r, e);
|
|
12519
12463
|
n.has(i.key) && t?.push(i.key), n.set(i.key, i);
|
|
12520
12464
|
}
|
|
12521
12465
|
}
|
|
12522
12466
|
}
|
|
12523
12467
|
return n;
|
|
12524
12468
|
}
|
|
12525
|
-
function
|
|
12469
|
+
function Nd(e, t) {
|
|
12526
12470
|
return `${e}#${t}`;
|
|
12527
12471
|
}
|
|
12528
|
-
function
|
|
12472
|
+
function Pd(e) {
|
|
12529
12473
|
return e?.version ?? "";
|
|
12530
12474
|
}
|
|
12531
|
-
function
|
|
12475
|
+
function Fd(e) {
|
|
12532
12476
|
let t = [...new Set(e)].sort();
|
|
12533
12477
|
return t.filter((e) => !t.some((t) => t !== e && e.startsWith(t + ".")));
|
|
12534
12478
|
}
|
|
12535
|
-
function
|
|
12536
|
-
let r = n.mappingsA ??
|
|
12479
|
+
function Id(e, t, n) {
|
|
12480
|
+
let r = n.mappingsA ?? fd(e), i = n.mappingsB ?? fd(t), a = (e) => `${e.sourceModel}#${e.source}⇒${e.target}`, o = new Map(r.map((e) => [a(e), e])), s = new Map(i.map((e) => [a(e), e])), c = [], l = [], u = [];
|
|
12537
12481
|
for (let [e, t] of s) o.has(e) || c.push(t);
|
|
12538
12482
|
for (let [e, t] of o) {
|
|
12539
12483
|
let n = s.get(e);
|
|
@@ -12554,7 +12498,7 @@ function Bd(e, t, n) {
|
|
|
12554
12498
|
let o = (e) => {
|
|
12555
12499
|
let t = n.references?.[a];
|
|
12556
12500
|
if (t) return t;
|
|
12557
|
-
let r =
|
|
12501
|
+
let r = pd(e, { idPrefix: `${a}#` });
|
|
12558
12502
|
return r.length > 0 ? r : null;
|
|
12559
12503
|
}, s = o(e), c = o(t);
|
|
12560
12504
|
if (!s && !c) {
|
|
@@ -12563,11 +12507,11 @@ function Bd(e, t, n) {
|
|
|
12563
12507
|
}
|
|
12564
12508
|
let l = /* @__PURE__ */ new Map();
|
|
12565
12509
|
if (s) {
|
|
12566
|
-
let t =
|
|
12510
|
+
let t = hd(e, s, r, a);
|
|
12567
12511
|
for (let e of t.components) l.set(e.id, { from: e.coverage });
|
|
12568
12512
|
}
|
|
12569
12513
|
if (c) {
|
|
12570
|
-
let e =
|
|
12514
|
+
let e = hd(t, c, i, a);
|
|
12571
12515
|
for (let t of e.components) {
|
|
12572
12516
|
let e = l.get(t.id) ?? {};
|
|
12573
12517
|
e.to = t.coverage, l.set(t.id, e);
|
|
@@ -12591,12 +12535,12 @@ function Bd(e, t, n) {
|
|
|
12591
12535
|
namespacesSkipped: p
|
|
12592
12536
|
};
|
|
12593
12537
|
}
|
|
12594
|
-
function
|
|
12538
|
+
function Ld(e, t) {
|
|
12595
12539
|
let n = [];
|
|
12596
12540
|
for (let [t, r] of e) {
|
|
12597
12541
|
let e = /* @__PURE__ */ new Set([...t.provenance.map((e) => e.basis), ...r.provenance.map((e) => e.basis)]);
|
|
12598
12542
|
for (let i of [...e].sort()) {
|
|
12599
|
-
let e = (e) =>
|
|
12543
|
+
let e = (e) => Fd(e.provenance.filter((e) => e.basis === i).map((e) => e.clause)).filter((e) => e.length > 0), a = e(t), o = e(r), s = a.filter((e) => !o.includes(e)), c = o.filter((e) => !a.includes(e));
|
|
12600
12544
|
if (s.length === 0 && c.length === 0) continue;
|
|
12601
12545
|
let l = {
|
|
12602
12546
|
key: t.key,
|
|
@@ -12646,7 +12590,7 @@ function Vd(e, t) {
|
|
|
12646
12590
|
}
|
|
12647
12591
|
let r = (e) => {
|
|
12648
12592
|
if (e.kind !== "renumbered" || !t.sentencesA || !t.sentencesB) return "unavailable";
|
|
12649
|
-
let n = t.sentencesA.get(
|
|
12593
|
+
let n = t.sentencesA.get(Nd(e.doc, e.from)), r = t.sentencesB.get(Nd(e.doc, e.to));
|
|
12650
12594
|
return n === void 0 || r === void 0 ? "unavailable" : n.replace(/\s+/g, " ").trim() === r.replace(/\s+/g, " ").trim() ? "same" : "differed";
|
|
12651
12595
|
}, i = /* @__PURE__ */ new Map();
|
|
12652
12596
|
for (let e of n) {
|
|
@@ -12662,21 +12606,21 @@ function Vd(e, t) {
|
|
|
12662
12606
|
}
|
|
12663
12607
|
return [...i.values()].sort((e, t) => `${e.doc} ${e.from} ${e.to}`.localeCompare(`${t.doc} ${t.from} ${t.to}`));
|
|
12664
12608
|
}
|
|
12665
|
-
function
|
|
12609
|
+
function Rd(e, t, n) {
|
|
12666
12610
|
return e.kind !== "texts" || !n.startsWith("spelling:") ? n : n in e.aspects ? n in t.aspects ? `${n} (changed)` : `${n} (removed)` : `${n} (added)`;
|
|
12667
12611
|
}
|
|
12668
|
-
var
|
|
12669
|
-
function
|
|
12670
|
-
if (
|
|
12612
|
+
var zd = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
12613
|
+
function Bd(e, t, n, r) {
|
|
12614
|
+
if (zd(t) && zd(n)) {
|
|
12671
12615
|
let i = [.../* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])].sort();
|
|
12672
|
-
for (let a of i)
|
|
12616
|
+
for (let a of i) Bd(`${e}.${a}`, t[a], n[a], r);
|
|
12673
12617
|
return;
|
|
12674
12618
|
}
|
|
12675
12619
|
Q(t) !== Q(n) && r.push(e);
|
|
12676
12620
|
}
|
|
12677
|
-
function
|
|
12621
|
+
function Vd(e, t) {
|
|
12678
12622
|
let n = [.../* @__PURE__ */ new Set([...Object.keys(e.fields), ...Object.keys(t.fields)])].sort(), r = [];
|
|
12679
|
-
for (let i of n)
|
|
12623
|
+
for (let i of n) Bd(i, e.fields[i], t.fields[i], r);
|
|
12680
12624
|
let i = [
|
|
12681
12625
|
"source",
|
|
12682
12626
|
"sourceRef",
|
|
@@ -12689,8 +12633,8 @@ function Gd(e, t) {
|
|
|
12689
12633
|
return !a.has(r) && (a.add(r), !0);
|
|
12690
12634
|
});
|
|
12691
12635
|
}
|
|
12692
|
-
function
|
|
12693
|
-
let r = [], i = [], a =
|
|
12636
|
+
function Hd(e, t, n = {}) {
|
|
12637
|
+
let r = [], i = [], a = Md(e, r), o = Md(t, i), s = [], c = [], l = [], u = [], d = [], f = 0, p = Object.fromEntries(xd.map((e) => [e, {
|
|
12694
12638
|
added: 0,
|
|
12695
12639
|
removed: 0,
|
|
12696
12640
|
changed: 0,
|
|
@@ -12728,17 +12672,17 @@ function Kd(e, t, n = {}) {
|
|
|
12728
12672
|
id: t.id,
|
|
12729
12673
|
kind: t.kind,
|
|
12730
12674
|
tier: t.tier,
|
|
12731
|
-
aspects: r.map((e) =>
|
|
12732
|
-
fields:
|
|
12675
|
+
aspects: r.map((e) => Rd(t, n, e)).sort(),
|
|
12676
|
+
fields: Vd(t, n)
|
|
12733
12677
|
}), p[t.tier].changed++);
|
|
12734
12678
|
}
|
|
12735
|
-
let m =
|
|
12679
|
+
let m = Id(e, t, n), h = Ld(d, n), g = s.length === 0 && c.length === 0 && l.length === 0 && u.length === 0 && m.added.length === 0 && m.removed.length === 0 && m.changed.length === 0 && m.coverageDelta.length === 0 && h.length === 0, _ = e.packageManifest, v = t.packageManifest, y = n.aLabel ?? (_?.id ? `${_.id}@${Pd(_) || "?"}` : "a"), b = n.bLabel ?? (v?.id ? `${v.id}@${Pd(v) || "?"}` : "b"), ee = !!_?.id && _.id === v?.id && Pd(_) !== Pd(v), x = (e, t) => `${e}: duplicate element ${t} — the last declaration wins (a data error the duplicate-id linter owns); this side under-reports`, te = [...r.map((e) => x(y, e)), ...i.map((e) => x(b, e))];
|
|
12736
12680
|
return {
|
|
12737
12681
|
aLabel: y,
|
|
12738
12682
|
bLabel: b,
|
|
12739
12683
|
editionComparison: ee,
|
|
12740
|
-
aVersion:
|
|
12741
|
-
bVersion:
|
|
12684
|
+
aVersion: Pd(_),
|
|
12685
|
+
bVersion: Pd(v),
|
|
12742
12686
|
added: s.sort((e, t) => e.key.localeCompare(t.key)),
|
|
12743
12687
|
removed: c.sort((e, t) => e.key.localeCompare(t.key)),
|
|
12744
12688
|
changed: l.sort((e, t) => e.key.localeCompare(t.key)),
|
|
@@ -12751,40 +12695,40 @@ function Kd(e, t, n = {}) {
|
|
|
12751
12695
|
empty: g
|
|
12752
12696
|
};
|
|
12753
12697
|
}
|
|
12754
|
-
function
|
|
12698
|
+
function Ud(e) {
|
|
12755
12699
|
return `[${e.tier}/${e.kind}] ${e.id}`;
|
|
12756
12700
|
}
|
|
12757
|
-
function
|
|
12701
|
+
function Wd(e, t) {
|
|
12758
12702
|
try {
|
|
12759
12703
|
let n = e ? JSON.parse(e) : {}, r = t ? JSON.parse(t) : {}, i = [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].sort().filter((e) => Q(n[e]) !== Q(r[e])).map((e) => `${e}: ${Q(n[e])} → ${Q(r[e])}`);
|
|
12760
12704
|
if (i.length > 0) return i;
|
|
12761
12705
|
} catch {}
|
|
12762
12706
|
return [`from ${e}`, `to ${t}`];
|
|
12763
12707
|
}
|
|
12764
|
-
function
|
|
12708
|
+
function Gd(e) {
|
|
12765
12709
|
let t = [], n = e.editionComparison ? `edition comparison — ${e.aLabel} → ${e.bLabel}` : `model diff — ${e.aLabel} → ${e.bLabel}`;
|
|
12766
12710
|
t.push(`primmel diff: ${n}`), t.push(""), t.push(`elements: +${e.added.length} -${e.removed.length} ~${e.changed.length} >${e.moved.length} (${e.unchanged} unchanged)`), t.push(""), t.push("by tier: added removed changed moved unchanged");
|
|
12767
|
-
for (let n of
|
|
12711
|
+
for (let n of xd) {
|
|
12768
12712
|
let r = e.byTier[n];
|
|
12769
12713
|
t.push(` ${n.padEnd(13)} ${String(r.added).padStart(5)} ${String(r.removed).padStart(8)} ${String(r.changed).padStart(8)} ${String(r.moved).padStart(6)} ${String(r.unchanged).padStart(9)}`);
|
|
12770
12714
|
}
|
|
12771
12715
|
if (e.added.length > 0) {
|
|
12772
12716
|
t.push("", "added:");
|
|
12773
|
-
for (let n of e.added) t.push(` + ${
|
|
12717
|
+
for (let n of e.added) t.push(` + ${Ud(n)}`);
|
|
12774
12718
|
}
|
|
12775
12719
|
if (e.removed.length > 0) {
|
|
12776
12720
|
t.push("", "removed:");
|
|
12777
|
-
for (let n of e.removed) t.push(` - ${
|
|
12721
|
+
for (let n of e.removed) t.push(` - ${Ud(n)}`);
|
|
12778
12722
|
}
|
|
12779
12723
|
if (e.changed.length > 0) {
|
|
12780
12724
|
t.push("", "changed:");
|
|
12781
|
-
for (let n of e.changed) t.push(` ~ ${
|
|
12725
|
+
for (let n of e.changed) t.push(` ~ ${Ud(n)} — ${n.aspects.join(", ")} (fields: ${n.fields.join(", ")})`);
|
|
12782
12726
|
}
|
|
12783
12727
|
if (e.moved.length > 0) {
|
|
12784
12728
|
t.push("", "moved (re-anchored):");
|
|
12785
12729
|
for (let n of e.moved) {
|
|
12786
|
-
t.push(` > ${
|
|
12787
|
-
for (let e of
|
|
12730
|
+
t.push(` > ${Ud(n)}`);
|
|
12731
|
+
for (let e of Wd(n.from, n.to)) t.push(` ${e}`);
|
|
12788
12732
|
}
|
|
12789
12733
|
}
|
|
12790
12734
|
if (e.warnings.length > 0) {
|
|
@@ -12809,12 +12753,12 @@ function Yd(e) {
|
|
|
12809
12753
|
}
|
|
12810
12754
|
//#endregion
|
|
12811
12755
|
//#region src/operational-state.ts
|
|
12812
|
-
var
|
|
12756
|
+
var Kd = class extends Error {
|
|
12813
12757
|
constructor(e) {
|
|
12814
12758
|
super(e), this.name = "StateTrajectoryError";
|
|
12815
12759
|
}
|
|
12816
12760
|
};
|
|
12817
|
-
function
|
|
12761
|
+
function qd(e, t, n) {
|
|
12818
12762
|
let r = t.state ?? e.initialState, i = [{
|
|
12819
12763
|
state: r,
|
|
12820
12764
|
at: t.at,
|
|
@@ -12823,9 +12767,9 @@ function Zd(e, t, n) {
|
|
|
12823
12767
|
for (let t of n) {
|
|
12824
12768
|
if (!t.fires) continue;
|
|
12825
12769
|
let n = e.transitions.filter((e) => e.actionName === t.fires);
|
|
12826
|
-
if (n.length === 0) throw new
|
|
12770
|
+
if (n.length === 0) throw new Kd(`step "${t.id}" fires "${t.fires}", which state machine "${e.entityName}" does not declare as a transition action`);
|
|
12827
12771
|
let a = n.find((e) => e.from === r || e.from === "*");
|
|
12828
|
-
if (!a) throw new
|
|
12772
|
+
if (!a) throw new Kd(`step "${t.id}" fires "${t.fires}", but state machine "${e.entityName}" is in state "${r}" — no such transition is enabled (from: ${n.map((e) => e.from).join(", ")})`);
|
|
12829
12773
|
r = a.to, i.push({
|
|
12830
12774
|
state: r,
|
|
12831
12775
|
at: t.at,
|
|
@@ -12836,7 +12780,7 @@ function Zd(e, t, n) {
|
|
|
12836
12780
|
}
|
|
12837
12781
|
//#endregion
|
|
12838
12782
|
//#region src/runtime.ts
|
|
12839
|
-
function
|
|
12783
|
+
function Jd(e) {
|
|
12840
12784
|
let t = [], n = 0, r = e;
|
|
12841
12785
|
for (; n < r.length;) {
|
|
12842
12786
|
let e = r[n];
|
|
@@ -12880,7 +12824,7 @@ function Qd(e) {
|
|
|
12880
12824
|
}
|
|
12881
12825
|
return t;
|
|
12882
12826
|
}
|
|
12883
|
-
var
|
|
12827
|
+
var Yd = class {
|
|
12884
12828
|
toks;
|
|
12885
12829
|
constructor(e) {
|
|
12886
12830
|
this.toks = e;
|
|
@@ -12902,24 +12846,24 @@ var $d = class {
|
|
|
12902
12846
|
if (t.t !== "op" || t.v !== e) throw Error(`runtime: the derivation expected "${e}"`);
|
|
12903
12847
|
}
|
|
12904
12848
|
};
|
|
12905
|
-
function
|
|
12906
|
-
return
|
|
12849
|
+
function Xd(e, t) {
|
|
12850
|
+
return Zd(e, t);
|
|
12907
12851
|
}
|
|
12908
|
-
function
|
|
12852
|
+
function Zd(e, t) {
|
|
12909
12853
|
let n = e.peek();
|
|
12910
12854
|
if (n && n.t === "id" && n.v === "if") {
|
|
12911
12855
|
e.next();
|
|
12912
|
-
let n =
|
|
12856
|
+
let n = Qd(e, t), r = e.next();
|
|
12913
12857
|
if (r.t !== "id" || r.v !== "then") throw Error("runtime: the derivation expected \"then\"");
|
|
12914
|
-
let i =
|
|
12858
|
+
let i = Zd(e, t), a = e.next();
|
|
12915
12859
|
if (a.t !== "id" || a.v !== "else") throw Error("runtime: the derivation expected \"else\"");
|
|
12916
|
-
let o =
|
|
12860
|
+
let o = Zd(e, t);
|
|
12917
12861
|
return n ? i : o;
|
|
12918
12862
|
}
|
|
12919
|
-
return
|
|
12863
|
+
return Qd(e, t);
|
|
12920
12864
|
}
|
|
12921
|
-
function
|
|
12922
|
-
let n =
|
|
12865
|
+
function Qd(e, t) {
|
|
12866
|
+
let n = $d(e, t), r = e.peek();
|
|
12923
12867
|
if (r && r.t === "op" && [
|
|
12924
12868
|
"<=",
|
|
12925
12869
|
">=",
|
|
@@ -12929,7 +12873,7 @@ function nf(e, t) {
|
|
|
12929
12873
|
"!="
|
|
12930
12874
|
].includes(r.v)) {
|
|
12931
12875
|
e.next();
|
|
12932
|
-
let i =
|
|
12876
|
+
let i = $d(e, t);
|
|
12933
12877
|
switch (r.v) {
|
|
12934
12878
|
case "<=": return +(n <= i);
|
|
12935
12879
|
case ">=": return +(n >= i);
|
|
@@ -12941,43 +12885,43 @@ function nf(e, t) {
|
|
|
12941
12885
|
}
|
|
12942
12886
|
return n;
|
|
12943
12887
|
}
|
|
12944
|
-
function
|
|
12945
|
-
let n =
|
|
12888
|
+
function $d(e, t) {
|
|
12889
|
+
let n = ef(e, t);
|
|
12946
12890
|
for (;;) {
|
|
12947
12891
|
let r = e.peek();
|
|
12948
12892
|
if (r && r.t === "op" && (r.v === "+" || r.v === "-")) {
|
|
12949
12893
|
e.next();
|
|
12950
|
-
let i =
|
|
12894
|
+
let i = ef(e, t);
|
|
12951
12895
|
n = r.v === "+" ? n + i : n - i;
|
|
12952
12896
|
continue;
|
|
12953
12897
|
}
|
|
12954
12898
|
return n;
|
|
12955
12899
|
}
|
|
12956
12900
|
}
|
|
12957
|
-
function
|
|
12958
|
-
let n =
|
|
12901
|
+
function ef(e, t) {
|
|
12902
|
+
let n = tf(e, t);
|
|
12959
12903
|
for (;;) {
|
|
12960
12904
|
let r = e.peek();
|
|
12961
12905
|
if (r && r.t === "op" && (r.v === "*" || r.v === "/")) {
|
|
12962
12906
|
e.next();
|
|
12963
|
-
let i =
|
|
12907
|
+
let i = tf(e, t);
|
|
12964
12908
|
n = r.v === "*" ? n * i : n / i;
|
|
12965
12909
|
continue;
|
|
12966
12910
|
}
|
|
12967
12911
|
return n;
|
|
12968
12912
|
}
|
|
12969
12913
|
}
|
|
12970
|
-
function
|
|
12914
|
+
function tf(e, t) {
|
|
12971
12915
|
let n = e.peek();
|
|
12972
12916
|
if (n && n.t === "op" && (n.v === "-" || n.v === "+")) {
|
|
12973
12917
|
e.next();
|
|
12974
|
-
let r =
|
|
12918
|
+
let r = tf(e, t);
|
|
12975
12919
|
return n.v === "-" ? -r : r;
|
|
12976
12920
|
}
|
|
12977
|
-
return
|
|
12921
|
+
return nf(e, t);
|
|
12978
12922
|
}
|
|
12979
|
-
function
|
|
12980
|
-
let n =
|
|
12923
|
+
function nf(e, t) {
|
|
12924
|
+
let n = af(e, t);
|
|
12981
12925
|
for (;;) {
|
|
12982
12926
|
let t = e.peek();
|
|
12983
12927
|
if (t && t.t === "op" && t.v === ".") {
|
|
@@ -12993,15 +12937,15 @@ function sf(e, t) {
|
|
|
12993
12937
|
return n;
|
|
12994
12938
|
}
|
|
12995
12939
|
}
|
|
12996
|
-
function
|
|
12940
|
+
function rf(e, t) {
|
|
12997
12941
|
let n = e.peek(), r = e.peekAt(1), i = e.peekAt(2);
|
|
12998
12942
|
return n?.t === "op" && n.v === "(" && r?.t === "id" && i?.t === "op" && i.v === ")" && Array.isArray(t[r.v]);
|
|
12999
12943
|
}
|
|
13000
|
-
function
|
|
12944
|
+
function af(e, t) {
|
|
13001
12945
|
let n = e.next();
|
|
13002
12946
|
if (n.t === "num") return n.v;
|
|
13003
12947
|
if (n.t === "id") {
|
|
13004
|
-
if (n.v === "sum" || n.v === "count" || n.v === "average" || (n.v === "min" || n.v === "max") &&
|
|
12948
|
+
if (n.v === "sum" || n.v === "count" || n.v === "average" || (n.v === "min" || n.v === "max") && rf(e, t)) {
|
|
13005
12949
|
e.expectOp("(");
|
|
13006
12950
|
let r = e.next();
|
|
13007
12951
|
e.expectOp(")");
|
|
@@ -13014,14 +12958,14 @@ function lf(e, t) {
|
|
|
13014
12958
|
}
|
|
13015
12959
|
if (n.v === "abs" || n.v === "min" || n.v === "max") {
|
|
13016
12960
|
e.expectOp("(");
|
|
13017
|
-
let r =
|
|
13018
|
-
if (a && a.t === "op" && a.v === "," && (e.next(), i =
|
|
12961
|
+
let r = Xd(e, t), i = null, a = e.peek();
|
|
12962
|
+
if (a && a.t === "op" && a.v === "," && (e.next(), i = Xd(e, t)), e.expectOp(")"), n.v === "abs") return Math.abs(r);
|
|
13019
12963
|
if (i === null) throw Error(`runtime: ${n.v} needs two arguments`);
|
|
13020
12964
|
return n.v === "min" ? Math.min(r, i) : Math.max(r, i);
|
|
13021
12965
|
}
|
|
13022
12966
|
if (n.v === "ocl") {
|
|
13023
12967
|
e.expectOp("(");
|
|
13024
|
-
let n =
|
|
12968
|
+
let n = Xd(e, t);
|
|
13025
12969
|
return e.expectOp(")"), n;
|
|
13026
12970
|
}
|
|
13027
12971
|
if (n.v === "true") return 1;
|
|
@@ -13031,20 +12975,20 @@ function lf(e, t) {
|
|
|
13031
12975
|
return typeof r == "object" ? r : typeof r == "string" ? Number(r) : r;
|
|
13032
12976
|
}
|
|
13033
12977
|
if (n.t === "op" && n.v === "(") {
|
|
13034
|
-
let n =
|
|
12978
|
+
let n = Xd(e, t);
|
|
13035
12979
|
return e.expectOp(")"), n;
|
|
13036
12980
|
}
|
|
13037
12981
|
throw Error("runtime: the derivation has an unexpected token");
|
|
13038
12982
|
}
|
|
13039
|
-
function
|
|
12983
|
+
function of(e) {
|
|
13040
12984
|
return e.type === "TABLE_OPTIONS" || e.type === "TABLE_REFERENCE";
|
|
13041
12985
|
}
|
|
13042
|
-
function
|
|
13043
|
-
if (!
|
|
12986
|
+
function sf(e, t, n) {
|
|
12987
|
+
if (!of(e)) throw Error(`runtime: ${e.id} declares type ${e.type} — the table evaluation takes the TABLE variable family (TABLE_OPTIONS / TABLE_REFERENCE)`);
|
|
13044
12988
|
if (e.definition === "") throw Error(`runtime: the table variable ${e.id} carries no definition`);
|
|
13045
|
-
return
|
|
12989
|
+
return cf(t, e.definition, n);
|
|
13046
12990
|
}
|
|
13047
|
-
function
|
|
12991
|
+
function cf(e, t, n) {
|
|
13048
12992
|
let r = t.split(",");
|
|
13049
12993
|
if (r.length < 3) throw Error(`runtime: the table lookup definition needs tableId,targetCol,matchCol,var — got "${t}"`);
|
|
13050
12994
|
let i = e.find((e) => e.id === r[0].trim()), a = Number(r[1].trim());
|
|
@@ -13059,15 +13003,15 @@ function ff(e, t, n) {
|
|
|
13059
13003
|
return s !== "" && !Number.isNaN(c) ? c : s;
|
|
13060
13004
|
}
|
|
13061
13005
|
function $(e, t) {
|
|
13062
|
-
let n = new
|
|
13006
|
+
let n = new Yd(Jd(e.replace(/^ocl\{/, "").replace(/\}$/, "").trim())), r = Xd(n, t);
|
|
13063
13007
|
if (n.peek() !== void 0) throw Error("runtime: the derivation has trailing tokens");
|
|
13064
13008
|
return r;
|
|
13065
13009
|
}
|
|
13066
|
-
function
|
|
13010
|
+
function lf(e, t) {
|
|
13067
13011
|
let n = e.has?.attributes?.[t];
|
|
13068
13012
|
return typeof n == "object" && n && "value" in n ? n : n === void 0 ? void 0 : { value: n };
|
|
13069
13013
|
}
|
|
13070
|
-
function
|
|
13014
|
+
function uf(e, t) {
|
|
13071
13015
|
let n = e.instruments[0]?.dimensions.find((e) => e.id === "accuracy_class"), r = t, i = n?.values.find((e) => e.id === r), a = {}, o = i?.payload ?? {};
|
|
13072
13016
|
for (let [e, t] of Object.entries(o)) {
|
|
13073
13017
|
let n = Number(t);
|
|
@@ -13075,15 +13019,15 @@ function mf(e, t) {
|
|
|
13075
13019
|
}
|
|
13076
13020
|
return a;
|
|
13077
13021
|
}
|
|
13078
|
-
function
|
|
13022
|
+
function df(e, t) {
|
|
13079
13023
|
let n = e.instances.find((e) => e.id === t.instance);
|
|
13080
13024
|
if (!n) throw Error(`runtime: no instance "${t.instance}" is declared`);
|
|
13081
|
-
let r = n.has?.dimensions?.accuracy_class, i =
|
|
13025
|
+
let r = n.has?.dimensions?.accuracy_class, i = uf(e, r), a = {
|
|
13082
13026
|
...i,
|
|
13083
13027
|
accuracy_class: i
|
|
13084
13028
|
};
|
|
13085
13029
|
for (let [e] of Object.entries(n.has?.attributes ?? {})) {
|
|
13086
|
-
let t =
|
|
13030
|
+
let t = lf(n, e);
|
|
13087
13031
|
if (t === void 0) continue;
|
|
13088
13032
|
let r = Number(typeof t.value == "object" ? t.value.value : t.value);
|
|
13089
13033
|
Number.isNaN(r) || (a[e] = r);
|
|
@@ -13239,7 +13183,7 @@ function hf(e, t) {
|
|
|
13239
13183
|
});
|
|
13240
13184
|
}
|
|
13241
13185
|
if (e.length > 0) try {
|
|
13242
|
-
f =
|
|
13186
|
+
f = qd(m, {
|
|
13243
13187
|
state: m.initialState,
|
|
13244
13188
|
at: "0"
|
|
13245
13189
|
}, e);
|
|
@@ -13276,27 +13220,27 @@ function hf(e, t) {
|
|
|
13276
13220
|
}
|
|
13277
13221
|
//#endregion
|
|
13278
13222
|
//#region src/ser-des/index.ts
|
|
13279
|
-
function
|
|
13280
|
-
return m(u(e,
|
|
13223
|
+
function ff(e, t = {}) {
|
|
13224
|
+
return m(u(e, vu, t), yu);
|
|
13281
13225
|
}
|
|
13282
|
-
function
|
|
13283
|
-
let n = u(e,
|
|
13226
|
+
function pf(e, t = {}) {
|
|
13227
|
+
let n = u(e, vu, t);
|
|
13284
13228
|
return {
|
|
13285
|
-
standard: m(n,
|
|
13229
|
+
standard: m(n, yu),
|
|
13286
13230
|
issues: n.issues
|
|
13287
13231
|
};
|
|
13288
13232
|
}
|
|
13289
|
-
function
|
|
13290
|
-
return
|
|
13233
|
+
function mf(e, t = {}) {
|
|
13234
|
+
return ff(Cu(e), t);
|
|
13291
13235
|
}
|
|
13292
|
-
function
|
|
13293
|
-
return
|
|
13236
|
+
function hf(e, t = {}) {
|
|
13237
|
+
return pf(Cu(e), t);
|
|
13294
13238
|
}
|
|
13295
|
-
function
|
|
13296
|
-
return ct(e,
|
|
13239
|
+
function gf(e) {
|
|
13240
|
+
return ct(e, bu);
|
|
13297
13241
|
}
|
|
13298
|
-
function
|
|
13299
|
-
return
|
|
13242
|
+
function _f(e) {
|
|
13243
|
+
return wu(e);
|
|
13300
13244
|
}
|
|
13301
13245
|
//#endregion
|
|
13302
|
-
export { X as CompositionError, qa as ENDPOINT_ACCESS_SCOPES, Ka as ENDPOINT_OPERATION_KINDS,
|
|
13246
|
+
export { X as CompositionError, qa as ENDPOINT_ACCESS_SCOPES, Ka as ENDPOINT_OPERATION_KINDS, xc as PASSPORT_ACCESS_CLASSES, bc as PASSPORT_CONTENT_CLASSES, Sc as PASSPORT_UPI_LEVELS, ad as PRIMITIVE_TYPES, Sd as TIER_BY_FIELD, xd as TIER_ORDER, yd as applyView, pd as buildProcessTree, Q as canonical, Nd as clauseTextKey, fd as collectMappings, bd as componentIds, hd as computeCoverage, Hd as diffStandards, gd as discoverTransitive, gf as dump, Wa as dumpPackage, nd as dumpPrm, Wu as effectiveUses, Md as elementIndex, $ as evaluateExpression, sf as evaluateTableVariable, df as executeRun, Gd as formatDiffReport, Fu as groupBySourceFile, of as isTableVariable, ld as isWellFormedMapType, ff as load, mf as loadFile, hf as loadFileWithIssues, Pu as loadPackage, Uu as loadPackageWithIssues, Iu as loadPackageWithProvenance, td as loadPrm, pf as loadWithIssues, cf as lookupTable, id as mapProfilesToPrm, dd as mappingsFromProfile, wd as normalizeSourceRef, Nu as packageFiles, d as parseDeclarations, ud as parseTargetRef, cd as parseTypeExpression, rd as prmToMapProfiles, Vu as readPackageManifest, _d as repoMap, _f as validate };
|