@primmel/primmel 1.9.0 → 1.9.1
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/ser-des/config/requirement.d.ts.map +1 -1
- package/dist/src/ser-des/config/requirement.js +5 -1
- package/dist/src/ser-des/config/requirement.js.map +1 -1
- package/dist/src/ser-des/config/viewProfile.d.ts.map +1 -1
- package/dist/src/ser-des/config/viewProfile.js +22 -5
- package/dist/src/ser-des/config/viewProfile.js.map +1 -1
- package/dist-browser/index.mjs +672 -666
- package/dist-cli/primmel.mjs +9 -6
- package/package.json +1 -1
package/dist-browser/index.mjs
CHANGED
|
@@ -2426,7 +2426,13 @@ var pn = function(e, t) {
|
|
|
2426
2426
|
t += " }\n";
|
|
2427
2427
|
}
|
|
2428
2428
|
return t += "}\n", t;
|
|
2429
|
-
}
|
|
2429
|
+
};
|
|
2430
|
+
//#endregion
|
|
2431
|
+
//#region src/ser-des/config/viewProfile.ts
|
|
2432
|
+
function hn(e) {
|
|
2433
|
+
return e.startsWith("{") || e.startsWith("[") ? r(e).map(a) : [a(e)];
|
|
2434
|
+
}
|
|
2435
|
+
var gn = function(e, t) {
|
|
2430
2436
|
let n = {
|
|
2431
2437
|
id: e,
|
|
2432
2438
|
description: "",
|
|
@@ -2436,8 +2442,8 @@ var pn = function(e, t) {
|
|
|
2436
2442
|
};
|
|
2437
2443
|
return v(t, (e, t) => {
|
|
2438
2444
|
if (e === "description") n.description = b(t);
|
|
2439
|
-
else if (e === "roles") n.roles =
|
|
2440
|
-
else if (e === "visible") n.visibleElements =
|
|
2445
|
+
else if (e === "roles") n.roles = hn(t());
|
|
2446
|
+
else if (e === "visible") n.visibleElements = hn(t());
|
|
2441
2447
|
else if (e === "against") n.against = t().trim();
|
|
2442
2448
|
else return !1;
|
|
2443
2449
|
return !0;
|
|
@@ -2445,10 +2451,10 @@ var pn = function(e, t) {
|
|
|
2445
2451
|
construct: "view_profile",
|
|
2446
2452
|
id: e
|
|
2447
2453
|
}), (t) => (t.viewProfiles[e] = n, t);
|
|
2448
|
-
},
|
|
2454
|
+
}, _n = function(e) {
|
|
2449
2455
|
let t = "view_profile " + e.id + " {\n";
|
|
2450
|
-
return e.description && (t += " description \"" + e.description + "\"\n"), e.roles.length > 0 && (t += " roles " + e.roles.join(" ") + "\n"), e.visibleElements.length > 0 && (t += " visible " + e.visibleElements.join(" ") + "\n"), e.against && (t += " against " + e.against + "\n"), t += "}\n", t;
|
|
2451
|
-
},
|
|
2456
|
+
return e.description && (t += " description \"" + s(e.description) + "\"\n"), e.roles.length > 0 && (t += " roles { " + e.roles.map(N).join(" ") + " }\n"), e.visibleElements.length > 0 && (t += " visible { " + e.visibleElements.map(N).join(" ") + " }\n"), e.against && (t += " against " + e.against + "\n"), t += "}\n", t;
|
|
2457
|
+
}, vn = function(e, t) {
|
|
2452
2458
|
let o = {
|
|
2453
2459
|
id: e,
|
|
2454
2460
|
name: "",
|
|
@@ -2497,9 +2503,9 @@ var pn = function(e, t) {
|
|
|
2497
2503
|
} else if (t === "corresponds") {
|
|
2498
2504
|
let e = D(s, c, a);
|
|
2499
2505
|
o.correspondences = [...o.correspondences ?? [], e.corr], c = e.next;
|
|
2500
|
-
} else if (t === "calculation_context") o.calculationContext =
|
|
2501
|
-
else if (t === "instances") o.formInstances =
|
|
2502
|
-
else if (t === "constraints") o.formConstraints =
|
|
2506
|
+
} else if (t === "calculation_context") o.calculationContext = yn(i(s[c++]));
|
|
2507
|
+
else if (t === "instances") o.formInstances = bn(i(s[c++]));
|
|
2508
|
+
else if (t === "constraints") o.formConstraints = xn(i(s[c++]));
|
|
2503
2509
|
else if (t === "conformance_process") {
|
|
2504
2510
|
let e = s[c++];
|
|
2505
2511
|
e.startsWith("{") ? (o.conformanceProcessIds = n(i(e)).map(a), o.conformanceProcessId = o.conformanceProcessIds[0] ?? "") : o.conformanceProcessId = a(e);
|
|
@@ -2509,14 +2515,14 @@ var pn = function(e, t) {
|
|
|
2509
2515
|
e ? (o.fields.push(le(e.name, e.block, e.type || void 0)), c = e.next) : c++;
|
|
2510
2516
|
} else if (t === "subform_ref") {
|
|
2511
2517
|
let e = s[c++], t = c < s.length ? i(s[c++]) : "";
|
|
2512
|
-
o.fields.push(
|
|
2513
|
-
} else t === "pass_fail" ? o.passFail =
|
|
2518
|
+
o.fields.push(wn(e, t));
|
|
2519
|
+
} else t === "pass_fail" ? o.passFail = Sn(i(s[c++])) : t === "reference" ? o.referenceIds = r(s[c++]).map(a) : c++;
|
|
2514
2520
|
} else throw Error(`Parsing error: form. ID ${e}: Expecting value for ${t}`);
|
|
2515
2521
|
}
|
|
2516
2522
|
}
|
|
2517
2523
|
return (t) => (t.forms[e] = o, t);
|
|
2518
2524
|
};
|
|
2519
|
-
function
|
|
2525
|
+
function yn(e) {
|
|
2520
2526
|
let t = {
|
|
2521
2527
|
header: "",
|
|
2522
2528
|
dimensions: !1,
|
|
@@ -2529,7 +2535,7 @@ function vn(e) {
|
|
|
2529
2535
|
}
|
|
2530
2536
|
return t;
|
|
2531
2537
|
}
|
|
2532
|
-
function
|
|
2538
|
+
function bn(e) {
|
|
2533
2539
|
let t = [], r = n(e), o = 0;
|
|
2534
2540
|
for (; o < r.length;) {
|
|
2535
2541
|
if (r[o++] !== "instance") {
|
|
@@ -2552,7 +2558,7 @@ function yn(e) {
|
|
|
2552
2558
|
}
|
|
2553
2559
|
return t;
|
|
2554
2560
|
}
|
|
2555
|
-
function
|
|
2561
|
+
function xn(e) {
|
|
2556
2562
|
let t = [], r = n(e), o = 0;
|
|
2557
2563
|
for (; o < r.length;) {
|
|
2558
2564
|
if (r[o++] !== "constraint") {
|
|
@@ -2578,7 +2584,7 @@ function bn(e) {
|
|
|
2578
2584
|
}
|
|
2579
2585
|
return t;
|
|
2580
2586
|
}
|
|
2581
|
-
function
|
|
2587
|
+
function Sn(e) {
|
|
2582
2588
|
let t = {
|
|
2583
2589
|
criteria: "",
|
|
2584
2590
|
passIf: "",
|
|
@@ -2586,11 +2592,11 @@ function xn(e) {
|
|
|
2586
2592
|
}, r = n(e), o = 0;
|
|
2587
2593
|
for (; o < r.length;) {
|
|
2588
2594
|
let e = r[o++];
|
|
2589
|
-
o < r.length && (e === "criteria" ? t.criteria = a(r[o++]) : e === "pass_if" ? t.passIf = a(r[o++]) : e === "derivation" ? t.derivations =
|
|
2595
|
+
o < r.length && (e === "criteria" ? t.criteria = a(r[o++]) : e === "pass_if" ? t.passIf = a(r[o++]) : e === "derivation" ? t.derivations = Cn(i(r[o++])) : i(r[o++]));
|
|
2590
2596
|
}
|
|
2591
2597
|
return t;
|
|
2592
2598
|
}
|
|
2593
|
-
function
|
|
2599
|
+
function Cn(e) {
|
|
2594
2600
|
let t = [], r = n(e), o = 0;
|
|
2595
2601
|
for (; o < r.length;) {
|
|
2596
2602
|
if (r[o++] !== "value") {
|
|
@@ -2615,7 +2621,7 @@ function Sn(e) {
|
|
|
2615
2621
|
}
|
|
2616
2622
|
return t;
|
|
2617
2623
|
}
|
|
2618
|
-
function
|
|
2624
|
+
function wn(e, t) {
|
|
2619
2625
|
return {
|
|
2620
2626
|
name: "",
|
|
2621
2627
|
type: "array",
|
|
@@ -2652,7 +2658,7 @@ function Cn(e, t) {
|
|
|
2652
2658
|
subformRef: pe(e, t)
|
|
2653
2659
|
};
|
|
2654
2660
|
}
|
|
2655
|
-
var
|
|
2661
|
+
var Tn = function(e) {
|
|
2656
2662
|
let t = "form " + e.id + " {\n";
|
|
2657
2663
|
t += " name \"" + s(e.name) + "\"\n", e.description && (t += " description \"" + s(e.description) + "\"\n"), e.dataClassId && (t += " data_class " + e.dataClassId + "\n"), e.headerFormId && (t += " header " + e.headerFormId + "\n"), e.section && (t += " section \"" + s(e.section) + "\"\n"), e.requirements.length > 0 && (t += " requirements { " + e.requirements.join(" ") + " }\n");
|
|
2658
2664
|
for (let n of e.formNotes) t += " note \"" + s(n) + "\"\n";
|
|
@@ -2677,9 +2683,9 @@ var wn = function(e) {
|
|
|
2677
2683
|
}
|
|
2678
2684
|
e.conformanceProcessIds && e.conformanceProcessIds.length > 1 ? t += " conformance_process { " + e.conformanceProcessIds.join(" ") + " }\n" : e.conformanceProcessId && (t += " conformance_process " + e.conformanceProcessId + "\n"), e.applicability.length > 0 && (t += " applicability {\n " + R(e.applicability).trim() + "\n }\n");
|
|
2679
2685
|
for (let n of e.fields) t += me(n, " ");
|
|
2680
|
-
return e.passFail && (t +=
|
|
2686
|
+
return e.passFail && (t += En(e.passFail)), t += "}\n", t;
|
|
2681
2687
|
};
|
|
2682
|
-
function
|
|
2688
|
+
function En(e) {
|
|
2683
2689
|
if (e.derivations.length === 0) return " pass_fail { criteria \"" + s(e.criteria) + "\" pass_if \"" + s(e.passIf) + "\" }\n";
|
|
2684
2690
|
let t = " pass_fail {\n";
|
|
2685
2691
|
t += " criteria \"" + s(e.criteria) + "\"\n", t += " pass_if \"" + s(e.passIf) + "\"\n", t += " derivation {\n";
|
|
@@ -2691,7 +2697,7 @@ function Tn(e) {
|
|
|
2691
2697
|
}
|
|
2692
2698
|
//#endregion
|
|
2693
2699
|
//#region src/ser-des/config/subform.ts
|
|
2694
|
-
var
|
|
2700
|
+
var Dn = function(e, t) {
|
|
2695
2701
|
let n = {
|
|
2696
2702
|
id: e,
|
|
2697
2703
|
description: "",
|
|
@@ -2709,7 +2715,7 @@ var En = function(e, t) {
|
|
|
2709
2715
|
let t = o[s++];
|
|
2710
2716
|
if (t === "object" || t === "array") n.shapeType = t;
|
|
2711
2717
|
else throw Error(`Parsing error: subform. ID ${e}: type must be object or array (got ${t})`);
|
|
2712
|
-
} else if (t === "parameters") n.parameters =
|
|
2718
|
+
} else if (t === "parameters") n.parameters = On(i(o[s++]));
|
|
2713
2719
|
else if (t === "field") {
|
|
2714
2720
|
let e = ce(o, s);
|
|
2715
2721
|
e ? (n.fields.push(le(e.name, e.block, e.type || void 0)), s = e.next) : s++;
|
|
@@ -2719,7 +2725,7 @@ var En = function(e, t) {
|
|
|
2719
2725
|
}
|
|
2720
2726
|
return (t) => (t.subforms[e] = n, t);
|
|
2721
2727
|
};
|
|
2722
|
-
function
|
|
2728
|
+
function On(e) {
|
|
2723
2729
|
let t = [], o = n(e), s = 0;
|
|
2724
2730
|
for (; s < o.length;) {
|
|
2725
2731
|
let e = P(o[s++]);
|
|
@@ -2756,7 +2762,7 @@ function Dn(e) {
|
|
|
2756
2762
|
}
|
|
2757
2763
|
return t;
|
|
2758
2764
|
}
|
|
2759
|
-
var
|
|
2765
|
+
var kn = function(e) {
|
|
2760
2766
|
let t = "subform " + e.id + " {\n";
|
|
2761
2767
|
if (t += " type " + e.shapeType + "\n", e.description && (t += " description \"" + s(e.description) + "\"\n"), e.parameters.length > 0) {
|
|
2762
2768
|
t += " parameters {\n";
|
|
@@ -2773,7 +2779,7 @@ var On = function(e) {
|
|
|
2773
2779
|
}
|
|
2774
2780
|
for (let n of e.fields) t += me(n, " ");
|
|
2775
2781
|
return t += "}\n", t;
|
|
2776
|
-
},
|
|
2782
|
+
}, An = [
|
|
2777
2783
|
"number",
|
|
2778
2784
|
"integer",
|
|
2779
2785
|
"string",
|
|
@@ -2781,7 +2787,7 @@ var On = function(e) {
|
|
|
2781
2787
|
"enum",
|
|
2782
2788
|
"collection",
|
|
2783
2789
|
"array"
|
|
2784
|
-
],
|
|
2790
|
+
], jn = function(e, t) {
|
|
2785
2791
|
let o = {
|
|
2786
2792
|
id: e,
|
|
2787
2793
|
name: "",
|
|
@@ -2814,7 +2820,7 @@ var On = function(e) {
|
|
|
2814
2820
|
else if (t === "definition") o.definition = b(s);
|
|
2815
2821
|
else if (t === "type") {
|
|
2816
2822
|
let t = s();
|
|
2817
|
-
if (!
|
|
2823
|
+
if (!An.includes(t)) throw Error(`Parsing error: symbol. ID ${e}: Unknown type ${t} (valid: ${An.join(", ")})`);
|
|
2818
2824
|
o.type = t;
|
|
2819
2825
|
} else if (t === "unit") o.unit = b(s);
|
|
2820
2826
|
else if (t === "latex") o.latex = b(s);
|
|
@@ -2850,7 +2856,7 @@ var On = function(e) {
|
|
|
2850
2856
|
construct: "symbol",
|
|
2851
2857
|
id: e
|
|
2852
2858
|
}), (t) => (t.symbols[e] = o, t);
|
|
2853
|
-
},
|
|
2859
|
+
}, Mn = function(e, t) {
|
|
2854
2860
|
let n = [];
|
|
2855
2861
|
for (let r of t._relations.ref) {
|
|
2856
2862
|
let t = f(e, "references", r);
|
|
@@ -2860,7 +2866,7 @@ var On = function(e) {
|
|
|
2860
2866
|
...t,
|
|
2861
2867
|
ref: n
|
|
2862
2868
|
};
|
|
2863
|
-
},
|
|
2869
|
+
}, Nn = function(e) {
|
|
2864
2870
|
let t = "symbol " + e.id + " {\n";
|
|
2865
2871
|
if (t += " name \"" + s(e.name) + "\"\n", e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), t += " type " + e.type + "\n", e.unit && e.unit !== "1" && (t += " unit \"" + s(e.unit) + "\"\n"), e.latex && (t += " latex \"" + s(e.latex) + "\"\n"), e.values.length > 0 && (t += " values { " + e.values.map(N).join(" ") + " }\n"), e.series && (t += " " + ne(e.series) + "\n"), e.kind && (t += " kind " + e.kind + "\n"), e.quantityKind && (t += " quantity_kind " + e.quantityKind + "\n"), e.origin && (t += " origin " + e.origin + "\n"), e.legacyId && (t += " legacy_id " + e.legacyId + "\n"), e.attribute && (t += " attribute " + e.attribute + "\n"), e.calculation && (t += " calculation " + e.calculation + "\n"), e.profile && (t += " profile " + e.profile + "\n"), e.sourceRef && (e.sourceRef.doc || e.sourceRef.clause) && (t += " source { doc \"" + s(e.sourceRef.doc) + "\" clause \"" + s(e.sourceRef.clause) + "\"" + (e.sourceRef.fragment ? " fragment \"" + s(e.sourceRef.fragment) + "\"" : "") + " }\n"), e.formula) {
|
|
2866
2872
|
let n = " formula { ";
|
|
@@ -2873,7 +2879,7 @@ var On = function(e) {
|
|
|
2873
2879
|
t += " }\n";
|
|
2874
2880
|
}
|
|
2875
2881
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
2876
|
-
},
|
|
2882
|
+
}, Pn = function(e, t) {
|
|
2877
2883
|
let o = {
|
|
2878
2884
|
id: e,
|
|
2879
2885
|
name: "",
|
|
@@ -2917,17 +2923,17 @@ var On = function(e) {
|
|
|
2917
2923
|
};
|
|
2918
2924
|
for (let n = 0; n + 1 < e.length; n += 2) e[n] === "doc" ? t.doc = a(e[n + 1]) : e[n] === "clause" ? t.clause = a(e[n + 1]) : e[n] === "fragment" && (t.fragment = a(e[n + 1]));
|
|
2919
2925
|
o.sourceRef ||= t, (o.sourceRefs ??= []).push(t);
|
|
2920
|
-
} else if (t === "inputs") o.inputs =
|
|
2926
|
+
} else if (t === "inputs") o.inputs = Fn(i(s[c++]));
|
|
2921
2927
|
else if (t === "output") {
|
|
2922
2928
|
let e = "";
|
|
2923
|
-
s[c] === ":" && (e += s[c++]), c < s.length && !s[c].startsWith("{") && (e += " " + s[c++]), c < s.length && s[c].startsWith("{") && (e += " " + s[c++]), o.output =
|
|
2924
|
-
} else t === "params" ? o.params = n(a(s[c++])).map(a).filter((e) => e.length > 0) : t === "lookup" ? o.lookup =
|
|
2929
|
+
s[c] === ":" && (e += s[c++]), c < s.length && !s[c].startsWith("{") && (e += " " + s[c++]), c < s.length && s[c].startsWith("{") && (e += " " + s[c++]), o.output = In(e);
|
|
2930
|
+
} else t === "params" ? o.params = n(a(s[c++])).map(a).filter((e) => e.length > 0) : t === "lookup" ? o.lookup = Ln(i(s[c++])) : t === "profile" ? o.profile = a(s[c++]) : c++;
|
|
2925
2931
|
} else throw Error(`Parsing error: calculation. ID ${e}: Expecting value for ${t}`);
|
|
2926
2932
|
}
|
|
2927
2933
|
}
|
|
2928
2934
|
return (t) => (t.calculations[e] = o, t);
|
|
2929
2935
|
};
|
|
2930
|
-
function
|
|
2936
|
+
function Fn(e) {
|
|
2931
2937
|
let t = [], n = r(e), o = 0;
|
|
2932
2938
|
for (; o < n.length;) {
|
|
2933
2939
|
let e = n[o++];
|
|
@@ -2965,7 +2971,7 @@ function Pn(e) {
|
|
|
2965
2971
|
}
|
|
2966
2972
|
return t;
|
|
2967
2973
|
}
|
|
2968
|
-
function
|
|
2974
|
+
function In(e) {
|
|
2969
2975
|
let t = n(e), o = 0, s = "number", c = "1", l = "", u = "", d, f, p, m = !1;
|
|
2970
2976
|
if (t[o] === ":" && o++, o < t.length && (s = t[o++]), o < t.length && t[o].startsWith("{")) {
|
|
2971
2977
|
let e = r(i(t[o++])), n = 0;
|
|
@@ -2991,7 +2997,7 @@ function Fn(e) {
|
|
|
2991
2997
|
};
|
|
2992
2998
|
return l && (h.name = l), u && (h.description = u), d !== void 0 && (h.quantityKind = d), m && (h.hasRange = !0, f !== void 0 && (h.rangeMin = f), p !== void 0 && (h.rangeMax = p)), h;
|
|
2993
2999
|
}
|
|
2994
|
-
function
|
|
3000
|
+
function Ln(e) {
|
|
2995
3001
|
let t = {
|
|
2996
3002
|
key: "",
|
|
2997
3003
|
variable: "",
|
|
@@ -3011,7 +3017,7 @@ function In(e) {
|
|
|
3011
3017
|
}
|
|
3012
3018
|
return t;
|
|
3013
3019
|
}
|
|
3014
|
-
var
|
|
3020
|
+
var Rn = function(e, t) {
|
|
3015
3021
|
let n = [];
|
|
3016
3022
|
for (let r of t._relations.ref) {
|
|
3017
3023
|
let t = f(e, "references", r);
|
|
@@ -3021,7 +3027,7 @@ var Ln = function(e, t) {
|
|
|
3021
3027
|
...t,
|
|
3022
3028
|
ref: n
|
|
3023
3029
|
};
|
|
3024
|
-
},
|
|
3030
|
+
}, zn = function(e) {
|
|
3025
3031
|
let t = "calculation " + e.id + " {\n";
|
|
3026
3032
|
if (t += " name \"" + s(e.name) + "\"\n", e.identifier && (t += " identifier \"" + s(e.identifier) + "\"\n"), e.ruleType && (t += " type " + e.ruleType + "\n"), e.category && (t += " category " + e.category + "\n"), e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.inputs.length > 0) {
|
|
3027
3033
|
t += " inputs {\n";
|
|
@@ -3041,12 +3047,12 @@ var Ln = function(e, t) {
|
|
|
3041
3047
|
t += " }\n";
|
|
3042
3048
|
}
|
|
3043
3049
|
return t += "}\n", t;
|
|
3044
|
-
},
|
|
3050
|
+
}, Bn = [
|
|
3045
3051
|
"lock",
|
|
3046
3052
|
"submit",
|
|
3047
3053
|
"notify",
|
|
3048
3054
|
"record"
|
|
3049
|
-
],
|
|
3055
|
+
], Vn = function(e, t) {
|
|
3050
3056
|
let n = {
|
|
3051
3057
|
entityName: e,
|
|
3052
3058
|
kind: "lifecycle",
|
|
@@ -3089,7 +3095,7 @@ var Ln = function(e, t) {
|
|
|
3089
3095
|
let n = e[t++];
|
|
3090
3096
|
if (t < e.length) {
|
|
3091
3097
|
let r = i(e[t++]);
|
|
3092
|
-
u.push(
|
|
3098
|
+
u.push(Hn(n, r));
|
|
3093
3099
|
}
|
|
3094
3100
|
} else n === "reference" ? d.push(...r(e[t++])) : i(e[t++]);
|
|
3095
3101
|
}
|
|
@@ -3112,7 +3118,7 @@ var Ln = function(e, t) {
|
|
|
3112
3118
|
}
|
|
3113
3119
|
return (t) => (t.stateMachines[e] = n, t);
|
|
3114
3120
|
};
|
|
3115
|
-
function
|
|
3121
|
+
function Hn(e, t) {
|
|
3116
3122
|
let o = {
|
|
3117
3123
|
action: null,
|
|
3118
3124
|
targetEntity: e,
|
|
@@ -3127,11 +3133,11 @@ function Vn(e, t) {
|
|
|
3127
3133
|
if (c < s.length) {
|
|
3128
3134
|
if (e === "action") {
|
|
3129
3135
|
let e = s[c++];
|
|
3130
|
-
if (!
|
|
3136
|
+
if (!Bn.includes(e)) throw Error(`Parsing error: state_machine cascade. Unknown action ${e} (valid: ${Bn.join(", ")})`);
|
|
3131
3137
|
o.action = e;
|
|
3132
3138
|
} else if (e === "where") o.where = i(s[c++]);
|
|
3133
3139
|
else if (e === "via") o.via = s[c++];
|
|
3134
|
-
else if (e === "with") o.with =
|
|
3140
|
+
else if (e === "with") o.with = Un(s[c++]);
|
|
3135
3141
|
else if (e === "set") {
|
|
3136
3142
|
let e = n(i(s[c++])), t = 0;
|
|
3137
3143
|
for (; t < e.length;) {
|
|
@@ -3144,13 +3150,13 @@ function Vn(e, t) {
|
|
|
3144
3150
|
o.set.push(r);
|
|
3145
3151
|
}
|
|
3146
3152
|
}
|
|
3147
|
-
} else e === "create" ? o.create =
|
|
3153
|
+
} else e === "create" ? o.create = Un(s[c++]) : i(s[c++]);
|
|
3148
3154
|
}
|
|
3149
3155
|
}
|
|
3150
3156
|
if (o.action && (o.set.length > 0 || o.create !== null)) throw Error(`Parsing error: state_machine cascade. Target ${e} mixes action with set/create — the two forms are mutually exclusive (schema oneOf)`);
|
|
3151
3157
|
return o;
|
|
3152
3158
|
}
|
|
3153
|
-
function
|
|
3159
|
+
function Un(e) {
|
|
3154
3160
|
let t = {}, r = n(i(e)), o = 0;
|
|
3155
3161
|
for (; o < r.length;) {
|
|
3156
3162
|
let e = P(r[o++]);
|
|
@@ -3159,7 +3165,7 @@ function Hn(e) {
|
|
|
3159
3165
|
}
|
|
3160
3166
|
return t;
|
|
3161
3167
|
}
|
|
3162
|
-
var
|
|
3168
|
+
var Wn = function(e) {
|
|
3163
3169
|
let t = "state_machine " + e.entityName + " {\n";
|
|
3164
3170
|
if (e.kind === "operational" && (t += " kind operational\n"), e.initialState && (t += " initial " + e.initialState + "\n"), e.states.length > 0) {
|
|
3165
3171
|
t += " states {\n";
|
|
@@ -3214,18 +3220,18 @@ var Un = function(e) {
|
|
|
3214
3220
|
t += " }\n";
|
|
3215
3221
|
}
|
|
3216
3222
|
return t += "}\n", t;
|
|
3217
|
-
},
|
|
3223
|
+
}, Gn = ["shared_risk", "guarded"], Kn = [
|
|
3218
3224
|
"NSFa",
|
|
3219
3225
|
"NSFd",
|
|
3220
3226
|
"absolute",
|
|
3221
3227
|
"ratio"
|
|
3222
|
-
],
|
|
3228
|
+
], qn = [
|
|
3223
3229
|
"I/MPE",
|
|
3224
3230
|
"D/NSFa",
|
|
3225
3231
|
"D/NSFd",
|
|
3226
3232
|
"n/a"
|
|
3227
3233
|
];
|
|
3228
|
-
function
|
|
3234
|
+
function Jn(e) {
|
|
3229
3235
|
let t = {
|
|
3230
3236
|
rule: "",
|
|
3231
3237
|
guardBand: null,
|
|
@@ -3238,7 +3244,7 @@ function qn(e) {
|
|
|
3238
3244
|
if (o >= r.length) break;
|
|
3239
3245
|
if (e === "rule") {
|
|
3240
3246
|
let e = a(r[o++]);
|
|
3241
|
-
if (!
|
|
3247
|
+
if (!Gn.includes(e)) throw Error(`Parsing error: acceptance: Unknown rule ${e} (valid: ${Gn.join(", ")})`);
|
|
3242
3248
|
t.rule = e;
|
|
3243
3249
|
} else if (e === "guard_band") {
|
|
3244
3250
|
let e = n(i(r[o++])), s = {
|
|
@@ -3250,7 +3256,7 @@ function qn(e) {
|
|
|
3250
3256
|
if (c >= e.length) break;
|
|
3251
3257
|
t === "kind" ? s.kind = a(e[c++]) : t === "value" ? s.value = Number(a(e[c++])) : i(e[c++]);
|
|
3252
3258
|
}
|
|
3253
|
-
if (!
|
|
3259
|
+
if (!Kn.includes(s.kind)) throw Error(`Parsing error: acceptance: Unknown guard_band kind ${s.kind} (valid: ${Kn.join(", ")})`);
|
|
3254
3260
|
t.guardBand = s;
|
|
3255
3261
|
} else if (e === "uncertainty") {
|
|
3256
3262
|
let e = n(i(r[o++])), s = 0;
|
|
@@ -3261,7 +3267,7 @@ function qn(e) {
|
|
|
3261
3267
|
}
|
|
3262
3268
|
} else if (e === "criterion") {
|
|
3263
3269
|
let e = a(r[o++]);
|
|
3264
|
-
if (!
|
|
3270
|
+
if (!qn.includes(e)) throw Error(`Parsing error: acceptance: Unknown criterion ${e} (valid: ${qn.join(", ")})`);
|
|
3265
3271
|
t.criterion = e;
|
|
3266
3272
|
} else if (e === "statistics") {
|
|
3267
3273
|
let e = n(i(r[o++])), s = {
|
|
@@ -3279,16 +3285,16 @@ function qn(e) {
|
|
|
3279
3285
|
}
|
|
3280
3286
|
return t;
|
|
3281
3287
|
}
|
|
3282
|
-
function
|
|
3288
|
+
function Yn(e, t) {
|
|
3283
3289
|
let n = t + "acceptance { ";
|
|
3284
3290
|
return e.rule && (n += "rule " + e.rule + " "), e.guardBand && (n += "guard_band { kind " + e.guardBand.kind + " value " + e.guardBand.value + " } "), e.uncertainty && (n += "uncertainty { max_ratio_to_mpe " + e.uncertainty.maxRatioToMpe + " } "), e.criterion && (n += "criterion " + e.criterion + " "), e.statistics && (n += "statistics { method " + e.statistics.method + " on_basis_of " + e.statistics.onBasisOf + " permits " + e.statistics.permits + " } "), n += "}", n;
|
|
3285
3291
|
}
|
|
3286
3292
|
//#endregion
|
|
3287
3293
|
//#region src/ser-des/config/design.ts
|
|
3288
|
-
function
|
|
3294
|
+
function Xn(e) {
|
|
3289
3295
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
3290
3296
|
}
|
|
3291
|
-
function
|
|
3297
|
+
function Zn(e) {
|
|
3292
3298
|
let t = {
|
|
3293
3299
|
level: null,
|
|
3294
3300
|
code: "",
|
|
@@ -3304,7 +3310,7 @@ function Xn(e) {
|
|
|
3304
3310
|
}
|
|
3305
3311
|
return t;
|
|
3306
3312
|
}
|
|
3307
|
-
function
|
|
3313
|
+
function Qn(e) {
|
|
3308
3314
|
let t = {
|
|
3309
3315
|
level: null,
|
|
3310
3316
|
code: "",
|
|
@@ -3332,7 +3338,7 @@ function Zn(e) {
|
|
|
3332
3338
|
for (; s < e.length;) {
|
|
3333
3339
|
let t = P(e[s++]);
|
|
3334
3340
|
if (s >= e.length) break;
|
|
3335
|
-
let n = e[s++], r = n.startsWith("{") ?
|
|
3341
|
+
let n = e[s++], r = n.startsWith("{") ? Zn(i(n)) : null;
|
|
3336
3342
|
t === "ac" ? a.ac = r : t === "dc" ? a.dc = r : t === "vehicle_dc" && (a.vehicleDc = r);
|
|
3337
3343
|
}
|
|
3338
3344
|
t.columns = a;
|
|
@@ -3340,7 +3346,7 @@ function Zn(e) {
|
|
|
3340
3346
|
}
|
|
3341
3347
|
return t;
|
|
3342
3348
|
}
|
|
3343
|
-
function
|
|
3349
|
+
function $n(e) {
|
|
3344
3350
|
let t = [], r = n(e), o = 0;
|
|
3345
3351
|
for (; o < r.length;) {
|
|
3346
3352
|
if (r[o++] !== "count") {
|
|
@@ -3381,7 +3387,7 @@ function Qn(e) {
|
|
|
3381
3387
|
}
|
|
3382
3388
|
return t;
|
|
3383
3389
|
}
|
|
3384
|
-
function
|
|
3390
|
+
function er(e) {
|
|
3385
3391
|
let t = [], r = n(e), o = 0;
|
|
3386
3392
|
for (; o < r.length;) {
|
|
3387
3393
|
if (r[o++] !== "severity") {
|
|
@@ -3400,10 +3406,10 @@ function $n(e) {
|
|
|
3400
3406
|
let n = t[s++];
|
|
3401
3407
|
if (s >= t.length) break;
|
|
3402
3408
|
if (n === "criterion") e.criterion = a(t[s++]);
|
|
3403
|
-
else if (n === "footnotes") e.footnotes =
|
|
3409
|
+
else if (n === "footnotes") e.footnotes = Xn(t[s++]);
|
|
3404
3410
|
else if (n === "env") {
|
|
3405
3411
|
let n = a(t[s++]), r = t[s++] ?? "";
|
|
3406
|
-
e.envClassValues[n] = r.startsWith("{") ?
|
|
3412
|
+
e.envClassValues[n] = r.startsWith("{") ? Qn(i(r)) : null;
|
|
3407
3413
|
} else i(t[s++]);
|
|
3408
3414
|
}
|
|
3409
3415
|
}
|
|
@@ -3411,7 +3417,7 @@ function $n(e) {
|
|
|
3411
3417
|
}
|
|
3412
3418
|
return t;
|
|
3413
3419
|
}
|
|
3414
|
-
function
|
|
3420
|
+
function tr(e) {
|
|
3415
3421
|
let t = {
|
|
3416
3422
|
duration: "",
|
|
3417
3423
|
cadence: "",
|
|
@@ -3445,11 +3451,11 @@ function er(e) {
|
|
|
3445
3451
|
}
|
|
3446
3452
|
t.phases.push(r);
|
|
3447
3453
|
}
|
|
3448
|
-
} else e === "constraints" ? t.constraints =
|
|
3454
|
+
} else e === "constraints" ? t.constraints = Xn(r[o++]) : i(r[o++]);
|
|
3449
3455
|
}
|
|
3450
3456
|
return t;
|
|
3451
3457
|
}
|
|
3452
|
-
function
|
|
3458
|
+
function nr(e) {
|
|
3453
3459
|
let t = {
|
|
3454
3460
|
count: null,
|
|
3455
3461
|
maxAdditional: null,
|
|
@@ -3473,11 +3479,11 @@ function tr(e) {
|
|
|
3473
3479
|
e === "ref" ? t.selectionRef = a(r[o++]) : i(r[o++]);
|
|
3474
3480
|
}
|
|
3475
3481
|
} else t.selection = a(e);
|
|
3476
|
-
} else e === "continuity" ? t.continuity = a(r[o++]) : e === "rules" ? t.rules =
|
|
3482
|
+
} else e === "continuity" ? t.continuity = a(r[o++]) : e === "rules" ? t.rules = Xn(r[o++]) : i(r[o++]);
|
|
3477
3483
|
}
|
|
3478
3484
|
return t;
|
|
3479
3485
|
}
|
|
3480
|
-
function
|
|
3486
|
+
function rr(e) {
|
|
3481
3487
|
let t = {
|
|
3482
3488
|
counts: [],
|
|
3483
3489
|
severities: [],
|
|
@@ -3491,8 +3497,8 @@ function nr(e) {
|
|
|
3491
3497
|
for (; o < r.length;) {
|
|
3492
3498
|
let e = r[o++];
|
|
3493
3499
|
if (o >= r.length) break;
|
|
3494
|
-
if (e === "counts") t.counts =
|
|
3495
|
-
else if (e === "severities") t.severities =
|
|
3500
|
+
if (e === "counts") t.counts = $n(i(r[o++]));
|
|
3501
|
+
else if (e === "severities") t.severities = er(i(r[o++]));
|
|
3496
3502
|
else if (e === "test_points") {
|
|
3497
3503
|
let e = n(i(r[o++])), s = 0;
|
|
3498
3504
|
for (; s < e.length;) {
|
|
@@ -3500,11 +3506,11 @@ function nr(e) {
|
|
|
3500
3506
|
if (s >= e.length) break;
|
|
3501
3507
|
n === "ref" ? t.testPointsRef = a(e[s++]) : i(e[s++]);
|
|
3502
3508
|
}
|
|
3503
|
-
} else e === "schedule" ? t.schedule =
|
|
3509
|
+
} else e === "schedule" ? t.schedule = tr(i(r[o++])) : e === "specimens" ? t.specimens = nr(i(r[o++])) : e === "field" ? t.field = ir(i(r[o++])) : e === "simulation" ? t.simulation = ar(i(r[o++])) : e === "software" ? t.software = or(i(r[o++])) : i(r[o++]);
|
|
3504
3510
|
}
|
|
3505
3511
|
return t;
|
|
3506
3512
|
}
|
|
3507
|
-
function
|
|
3513
|
+
function ir(e) {
|
|
3508
3514
|
let t = {
|
|
3509
3515
|
siteSelection: "",
|
|
3510
3516
|
trafficConditions: "",
|
|
@@ -3530,7 +3536,7 @@ function rr(e) {
|
|
|
3530
3536
|
}
|
|
3531
3537
|
return t;
|
|
3532
3538
|
}
|
|
3533
|
-
function
|
|
3539
|
+
function ar(e) {
|
|
3534
3540
|
let t = {
|
|
3535
3541
|
simulatorKind: "",
|
|
3536
3542
|
signal: "",
|
|
@@ -3544,7 +3550,7 @@ function ir(e) {
|
|
|
3544
3550
|
}
|
|
3545
3551
|
return t;
|
|
3546
3552
|
}
|
|
3547
|
-
function
|
|
3553
|
+
function or(e) {
|
|
3548
3554
|
let t = {
|
|
3549
3555
|
level: "",
|
|
3550
3556
|
items: []
|
|
@@ -3573,7 +3579,7 @@ function ar(e) {
|
|
|
3573
3579
|
for (; o < t.length;) {
|
|
3574
3580
|
let e = t[o++];
|
|
3575
3581
|
if (o >= t.length) break;
|
|
3576
|
-
e === "name" ? r.name = a(t[o++]) : e === "d31" ? r.d31 = a(t[o++]) : e === "obligation" ? r.obligation = a(t[o++]) : e === "methods" ? r.methods =
|
|
3582
|
+
e === "name" ? r.name = a(t[o++]) : e === "d31" ? r.d31 = a(t[o++]) : e === "obligation" ? r.obligation = a(t[o++]) : e === "methods" ? r.methods = Xn(t[o++]) : e === "clause" ? r.clause = a(t[o++]) : i(t[o++]);
|
|
3577
3583
|
}
|
|
3578
3584
|
}
|
|
3579
3585
|
t.items.push(r);
|
|
@@ -3582,15 +3588,15 @@ function ar(e) {
|
|
|
3582
3588
|
}
|
|
3583
3589
|
return t;
|
|
3584
3590
|
}
|
|
3585
|
-
function
|
|
3591
|
+
function sr(e) {
|
|
3586
3592
|
let t = "";
|
|
3587
3593
|
return e.level !== null && (t += "level " + e.level + " "), e.code && (t += "code \"" + s(e.code) + "\" "), e.amplitude !== null && (t += "amplitude " + e.amplitude + " "), e.unit && (t += "unit \"" + s(e.unit) + "\" "), e.note && (t += "note \"" + s(e.note) + "\" "), e.variable && (t += "variable " + e.variable + " "), t;
|
|
3588
3594
|
}
|
|
3589
|
-
function
|
|
3590
|
-
let t =
|
|
3591
|
-
return e.columns && (t += "columns { ", t += e.columns.ac ? "ac { " +
|
|
3595
|
+
function cr(e) {
|
|
3596
|
+
let t = sr(e);
|
|
3597
|
+
return e.columns && (t += "columns { ", t += e.columns.ac ? "ac { " + sr(e.columns.ac) + "} " : "ac null ", t += e.columns.dc ? "dc { " + sr(e.columns.dc) + "} " : "dc null ", t += e.columns.vehicleDc ? "vehicle_dc { " + sr(e.columns.vehicleDc) + "} " : "vehicle_dc null ", t += "} "), t;
|
|
3592
3598
|
}
|
|
3593
|
-
function
|
|
3599
|
+
function lr(e, t) {
|
|
3594
3600
|
let n = t + "design {\n";
|
|
3595
3601
|
if (e.counts.length > 0) {
|
|
3596
3602
|
n += t + " counts {\n";
|
|
@@ -3605,7 +3611,7 @@ function cr(e, t) {
|
|
|
3605
3611
|
for (let r of e.severities) {
|
|
3606
3612
|
let e = t + " severity \"" + s(r.row) + "\" { ";
|
|
3607
3613
|
r.criterion && (e += "criterion " + r.criterion + " "), r.footnotes.length > 0 && (e += "footnotes { " + r.footnotes.join(" ") + " } ");
|
|
3608
|
-
for (let [t, n] of Object.entries(r.envClassValues)) e += "env " + t + " " + (n ? "{ " +
|
|
3614
|
+
for (let [t, n] of Object.entries(r.envClassValues)) e += "env " + t + " " + (n ? "{ " + cr(n) + "}" : "null") + " ";
|
|
3609
3615
|
n += e + "}\n";
|
|
3610
3616
|
}
|
|
3611
3617
|
n += t + " }\n";
|
|
@@ -3651,11 +3657,11 @@ function cr(e, t) {
|
|
|
3651
3657
|
}
|
|
3652
3658
|
//#endregion
|
|
3653
3659
|
//#region src/ser-des/config/competenceKind.ts
|
|
3654
|
-
function
|
|
3660
|
+
function ur(e) {
|
|
3655
3661
|
let t = a(e);
|
|
3656
3662
|
return t.trim() !== "" && !isNaN(Number(t)) ? Number(t) : t;
|
|
3657
3663
|
}
|
|
3658
|
-
function
|
|
3664
|
+
function dr(e) {
|
|
3659
3665
|
let t = {
|
|
3660
3666
|
value: 0,
|
|
3661
3667
|
unit: ""
|
|
@@ -3667,7 +3673,7 @@ function ur(e) {
|
|
|
3667
3673
|
}
|
|
3668
3674
|
return t;
|
|
3669
3675
|
}
|
|
3670
|
-
function
|
|
3676
|
+
function fr(e) {
|
|
3671
3677
|
let t = [], r = n(e), o = 0;
|
|
3672
3678
|
for (; o < r.length;) {
|
|
3673
3679
|
if (r[o++] !== "competence") {
|
|
@@ -3696,37 +3702,37 @@ function dr(e) {
|
|
|
3696
3702
|
for (; c < r.length;) {
|
|
3697
3703
|
let e = r[c++];
|
|
3698
3704
|
if (c >= r.length) break;
|
|
3699
|
-
e === "min" ? o.min =
|
|
3705
|
+
e === "min" ? o.min = ur(r[c++]) : e === "max" ? o.max = ur(r[c++]) : e === "unit" ? o.unit = a(r[c++]) : i(r[c++]);
|
|
3700
3706
|
}
|
|
3701
3707
|
e.range = o;
|
|
3702
|
-
} else r === "method_standard" ? e.methodStandard = a(t[s++]) : r === "resolution" ? e.resolution =
|
|
3708
|
+
} else r === "method_standard" ? e.methodStandard = a(t[s++]) : r === "resolution" ? e.resolution = dr(i(t[s++])) : r === "stability" ? e.stability = dr(i(t[s++])) : r === "description" ? e.description = a(t[s++]) : i(t[s++]);
|
|
3703
3709
|
}
|
|
3704
3710
|
}
|
|
3705
3711
|
t.push(e);
|
|
3706
3712
|
}
|
|
3707
3713
|
return t;
|
|
3708
3714
|
}
|
|
3709
|
-
function
|
|
3715
|
+
function pr(e, t) {
|
|
3710
3716
|
return t ? " " + e + " { value " + String(t.value) + " unit \"" + s(t.unit) + "\" }\n" : "";
|
|
3711
3717
|
}
|
|
3712
|
-
function
|
|
3718
|
+
function mr(e) {
|
|
3713
3719
|
return e === null ? "" : typeof e == "number" ? String(e) : "\"" + s(e) + "\"";
|
|
3714
3720
|
}
|
|
3715
|
-
function
|
|
3721
|
+
function hr(e) {
|
|
3716
3722
|
let t = " required_competence {\n";
|
|
3717
3723
|
for (let n of e) {
|
|
3718
3724
|
if (t += " competence " + n.kind + " {\n", n.range) {
|
|
3719
3725
|
let e = " range {";
|
|
3720
|
-
n.range.min !== null && (e += " min " +
|
|
3726
|
+
n.range.min !== null && (e += " min " + mr(n.range.min)), n.range.max !== null && (e += " max " + mr(n.range.max)), e += " unit \"" + s(n.range.unit) + "\" }\n", t += e;
|
|
3721
3727
|
}
|
|
3722
|
-
n.methodStandard && (t += " method_standard \"" + s(n.methodStandard) + "\"\n"), t +=
|
|
3728
|
+
n.methodStandard && (t += " method_standard \"" + s(n.methodStandard) + "\"\n"), t += pr("resolution", n.resolution), t += pr("stability", n.stability), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
3723
3729
|
}
|
|
3724
3730
|
return t += " }\n", t;
|
|
3725
3731
|
}
|
|
3726
|
-
function
|
|
3732
|
+
function gr(e) {
|
|
3727
3733
|
return e.length >= 2 && e.charAt(0) === "\"" && e.charAt(e.length - 1) === "\"" ? o(e.substr(1, e.length - 2)) : i(e);
|
|
3728
3734
|
}
|
|
3729
|
-
var
|
|
3735
|
+
var _r = function(e, t) {
|
|
3730
3736
|
let n = {
|
|
3731
3737
|
id: e,
|
|
3732
3738
|
label: "",
|
|
@@ -3737,15 +3743,15 @@ var gr = function(e, t) {
|
|
|
3737
3743
|
for (; s < o.length;) {
|
|
3738
3744
|
let t = o[s++];
|
|
3739
3745
|
if (s >= o.length) throw Error(`Parsing error: competence_kind. ID ${e}: Expecting value for ${t}`);
|
|
3740
|
-
if (t === "label") n.label =
|
|
3741
|
-
else if (t === "definition") n.definition =
|
|
3746
|
+
if (t === "label") n.label = gr(o[s++]);
|
|
3747
|
+
else if (t === "definition") n.definition = gr(o[s++]);
|
|
3742
3748
|
else if (t === "source") n.source = I(i(o[s++]));
|
|
3743
3749
|
else if (t === "method_standard") {
|
|
3744
3750
|
let t = a(o[s++]);
|
|
3745
3751
|
if (s >= o.length) throw Error(`Parsing error: competence_kind. ID ${e}: Expecting title for method_standard ${t}`);
|
|
3746
3752
|
n.methodStandards.push({
|
|
3747
3753
|
id: t,
|
|
3748
|
-
title:
|
|
3754
|
+
title: gr(o[s++])
|
|
3749
3755
|
});
|
|
3750
3756
|
} else if (t === "ref") {
|
|
3751
3757
|
let e = x(o, s, a, i);
|
|
@@ -3756,7 +3762,7 @@ var gr = function(e, t) {
|
|
|
3756
3762
|
} else s = y(o, s, t);
|
|
3757
3763
|
}
|
|
3758
3764
|
return (t) => (t.competenceKinds[e] = n, t);
|
|
3759
|
-
},
|
|
3765
|
+
}, vr = function(e) {
|
|
3760
3766
|
let t = "competence_kind " + e.id + " {\n";
|
|
3761
3767
|
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.source && (e.source.doc || e.source.clause) && (t += " source { doc \"" + s(e.source.doc) + "\" clause \"" + s(e.source.clause) + "\"" + (e.source.fragment ? " fragment \"" + s(e.source.fragment) + "\"" : "") + " }\n");
|
|
3762
3768
|
for (let n of e.methodStandards) t += " method_standard " + n.id + " \"" + s(n.title) + "\"\n";
|
|
@@ -3767,10 +3773,10 @@ var gr = function(e, t) {
|
|
|
3767
3773
|
function V(e) {
|
|
3768
3774
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
3769
3775
|
}
|
|
3770
|
-
function
|
|
3776
|
+
function yr(e) {
|
|
3771
3777
|
return e.trim() !== "" && !isNaN(Number(e)) ? Number(e) : e;
|
|
3772
3778
|
}
|
|
3773
|
-
function
|
|
3779
|
+
function br(e) {
|
|
3774
3780
|
let t = [], r = n(e), o = 0;
|
|
3775
3781
|
for (; o < r.length;) {
|
|
3776
3782
|
if (r[o++] !== "variable") {
|
|
@@ -3816,7 +3822,7 @@ function yr(e) {
|
|
|
3816
3822
|
}
|
|
3817
3823
|
return t;
|
|
3818
3824
|
}
|
|
3819
|
-
function
|
|
3825
|
+
function xr(e) {
|
|
3820
3826
|
let t = [], r = n(e), o = 0;
|
|
3821
3827
|
for (; o < r.length;) {
|
|
3822
3828
|
if (r[o++] !== "precondition") {
|
|
@@ -3841,7 +3847,7 @@ function br(e) {
|
|
|
3841
3847
|
}
|
|
3842
3848
|
return t;
|
|
3843
3849
|
}
|
|
3844
|
-
function
|
|
3850
|
+
function Sr(e) {
|
|
3845
3851
|
let t = [], r = n(e), o = 0;
|
|
3846
3852
|
for (; o < r.length;) {
|
|
3847
3853
|
if (r[o++] !== "observable") {
|
|
@@ -3866,7 +3872,7 @@ function xr(e) {
|
|
|
3866
3872
|
}
|
|
3867
3873
|
return t;
|
|
3868
3874
|
}
|
|
3869
|
-
function
|
|
3875
|
+
function Cr(e, t) {
|
|
3870
3876
|
let r = n(e), o = 0;
|
|
3871
3877
|
for (; o < r.length;) {
|
|
3872
3878
|
let e = r[o++];
|
|
@@ -3923,7 +3929,7 @@ function Sr(e, t) {
|
|
|
3923
3929
|
t.acceptanceCriteria.push(c);
|
|
3924
3930
|
}
|
|
3925
3931
|
}
|
|
3926
|
-
function
|
|
3932
|
+
function wr(e) {
|
|
3927
3933
|
let t = [], r = n(e), o = 0;
|
|
3928
3934
|
for (; o < r.length;) {
|
|
3929
3935
|
if (r[o++] !== "value") {
|
|
@@ -3946,7 +3952,7 @@ function Cr(e) {
|
|
|
3946
3952
|
}
|
|
3947
3953
|
return t;
|
|
3948
3954
|
}
|
|
3949
|
-
function
|
|
3955
|
+
function Tr(e) {
|
|
3950
3956
|
let t = {}, r = n(e), i = 0;
|
|
3951
3957
|
for (; i < r.length;) {
|
|
3952
3958
|
let e = P(r[i++]);
|
|
@@ -3955,7 +3961,7 @@ function wr(e) {
|
|
|
3955
3961
|
}
|
|
3956
3962
|
return t;
|
|
3957
3963
|
}
|
|
3958
|
-
function
|
|
3964
|
+
function Er(e) {
|
|
3959
3965
|
let t = {
|
|
3960
3966
|
by: "",
|
|
3961
3967
|
values: {}
|
|
@@ -3974,7 +3980,7 @@ function Tr(e) {
|
|
|
3974
3980
|
for (; l < o.length;) {
|
|
3975
3981
|
let e = P(o[l++]);
|
|
3976
3982
|
if (l >= o.length) break;
|
|
3977
|
-
o[l] === ":" && l++, l < o.length && (c[e] =
|
|
3983
|
+
o[l] === ":" && l++, l < o.length && (c[e] = yr(a(o[l++])));
|
|
3978
3984
|
}
|
|
3979
3985
|
t.values[r] = c;
|
|
3980
3986
|
}
|
|
@@ -3983,7 +3989,7 @@ function Tr(e) {
|
|
|
3983
3989
|
}
|
|
3984
3990
|
return t;
|
|
3985
3991
|
}
|
|
3986
|
-
var
|
|
3992
|
+
var Dr = function(e, t) {
|
|
3987
3993
|
let o = {
|
|
3988
3994
|
id: e,
|
|
3989
3995
|
name: "",
|
|
@@ -4063,23 +4069,23 @@ var Er = function(e, t) {
|
|
|
4063
4069
|
else if (e === "kind") o.kind = a(t());
|
|
4064
4070
|
else if (e === "obligation") o.obligation = a(t());
|
|
4065
4071
|
else if (e === "obligation_note") o.obligationNote = b(t);
|
|
4066
|
-
else if (e === "test_subject") o.testSubject =
|
|
4067
|
-
else if (e === "variables") o.variables =
|
|
4068
|
-
else if (e === "observables") o.observables =
|
|
4072
|
+
else if (e === "test_subject") o.testSubject = Tr(i(t()));
|
|
4073
|
+
else if (e === "variables") o.variables = br(i(t()));
|
|
4074
|
+
else if (e === "observables") o.observables = Sr(i(t()));
|
|
4069
4075
|
else if (e === "conditions_to_enforce" || e === "conditionsToEnforce") o.conditionsToEnforce = V(t());
|
|
4070
|
-
else if (e === "preconditions") o.preconditions =
|
|
4076
|
+
else if (e === "preconditions") o.preconditions = xr(i(t()));
|
|
4071
4077
|
else if (e === "reference_materials") o.referenceMaterials = V(t());
|
|
4072
|
-
else if (e === "required_competence") o.requiredCompetence =
|
|
4073
|
-
else if (e === "acceptance_criteria")
|
|
4074
|
-
else if (e === "design") o.design =
|
|
4075
|
-
else if (e === "acceptance") o.acceptance =
|
|
4078
|
+
else if (e === "required_competence") o.requiredCompetence = fr(i(t()));
|
|
4079
|
+
else if (e === "acceptance_criteria") Cr(i(t()), o);
|
|
4080
|
+
else if (e === "design") o.design = rr(i(t()));
|
|
4081
|
+
else if (e === "acceptance") o.acceptance = Jn(i(t()));
|
|
4076
4082
|
else if (e === "dependencies") o.dependencies = V(t());
|
|
4077
|
-
else if (e === "instances") o.instances =
|
|
4083
|
+
else if (e === "instances") o.instances = Er(i(t()));
|
|
4078
4084
|
else if (e === "inherits_from") o.inheritsFrom = a(t());
|
|
4079
4085
|
else if (e === "result_forms") o.resultForms = V(t());
|
|
4080
4086
|
else if (e === "produces_artifacts") o.producesArtifacts = V(t());
|
|
4081
4087
|
else if (e === "report_rows") o.reportRows = V(t());
|
|
4082
|
-
else if (e === "derived_values") o.derivedValues =
|
|
4088
|
+
else if (e === "derived_values") o.derivedValues = wr(i(t()));
|
|
4083
4089
|
else if (e === "validate_measurement") {
|
|
4084
4090
|
let e = r(t());
|
|
4085
4091
|
for (let t of e) t.startsWith("\"") && o.measurements.push(i(t));
|
|
@@ -4090,7 +4096,7 @@ var Er = function(e, t) {
|
|
|
4090
4096
|
construct: "conformance_test",
|
|
4091
4097
|
id: e
|
|
4092
4098
|
}), (t) => (t.conformanceTests[e] = o, t);
|
|
4093
|
-
},
|
|
4099
|
+
}, Or = function(e) {
|
|
4094
4100
|
let t = "conformance_test " + e.id + " {\n";
|
|
4095
4101
|
if (e.name && (t += " name \"" + s(e.name) + "\"\n"), e.type && (t += " type " + e.type + "\n"), e.purpose && (t += " purpose \"" + s(e.purpose) + "\"\n"), e.method && (t += " method \"" + s(e.method) + "\"\n"), e.methodRef && (t += " method_ref " + e.methodRef + "\n"), e.guidance && (t += " guidance \"" + s(e.guidance) + "\"\n"), e.sourceRefs && e.sourceRefs.length > 0) for (let n of e.sourceRefs) t += E(n, " ", s);
|
|
4096
4102
|
else e.sourceRef && e.sourceRef.doc ? t += E(e.sourceRef, " ", s) : e.reference && (t += " reference " + e.reference + "\n");
|
|
@@ -4151,7 +4157,7 @@ var Er = function(e, t) {
|
|
|
4151
4157
|
}
|
|
4152
4158
|
t += " }\n";
|
|
4153
4159
|
}
|
|
4154
|
-
if (e.referenceMaterials.length > 0 && (t += " reference_materials { " + e.referenceMaterials.join(" ") + " }\n"), e.requiredCompetence.length > 0 && (t +=
|
|
4160
|
+
if (e.referenceMaterials.length > 0 && (t += " reference_materials { " + e.referenceMaterials.join(" ") + " }\n"), e.requiredCompetence.length > 0 && (t += hr(e.requiredCompetence)), e.acceptanceCriteria.length > 0 || e.acceptanceCriteriaType || e.acceptancePassIf) {
|
|
4155
4161
|
t += " acceptance_criteria {\n", e.acceptanceCriteriaType && (t += " type " + e.acceptanceCriteriaType + "\n"), e.acceptanceCriteriaDescription && (t += " description \"" + s(e.acceptanceCriteriaDescription) + "\"\n"), e.acceptancePassIf && (t += " pass_if \"" + s(e.acceptancePassIf) + "\"\n");
|
|
4156
4162
|
for (let n of e.acceptanceCriteria) {
|
|
4157
4163
|
let e = " criterion " + (n.item || "\"\"") + " { ";
|
|
@@ -4159,7 +4165,7 @@ var Er = function(e, t) {
|
|
|
4159
4165
|
}
|
|
4160
4166
|
t += " }\n";
|
|
4161
4167
|
}
|
|
4162
|
-
if (e.design && (t +=
|
|
4168
|
+
if (e.design && (t += lr(e.design, " ")), e.acceptance && (t += Yn(e.acceptance, " ") + "\n"), e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.instances) {
|
|
4163
4169
|
let n = " instances { by " + e.instances.by + " values { ";
|
|
4164
4170
|
for (let [t, r] of Object.entries(e.instances.values)) {
|
|
4165
4171
|
n += t + " { ";
|
|
@@ -4174,23 +4180,23 @@ var Er = function(e, t) {
|
|
|
4174
4180
|
t += " }\n";
|
|
4175
4181
|
}
|
|
4176
4182
|
return e.sourceDiscrepancy && (t += j(e.sourceDiscrepancy, " ") + "\n"), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4177
|
-
},
|
|
4183
|
+
}, kr = {
|
|
4178
4184
|
aliases: "aliases",
|
|
4179
4185
|
alt: "aliases",
|
|
4180
4186
|
colloquial: "colloquial",
|
|
4181
4187
|
abbreviations: "abbreviations",
|
|
4182
4188
|
deprecated: "deprecated"
|
|
4183
4189
|
};
|
|
4184
|
-
function
|
|
4185
|
-
return e in
|
|
4190
|
+
function Ar(e) {
|
|
4191
|
+
return e in kr;
|
|
4186
4192
|
}
|
|
4187
|
-
function
|
|
4193
|
+
function jr(e, t, n) {
|
|
4188
4194
|
if (t === "aliases") {
|
|
4189
4195
|
let t = [...e.aliases ?? [], ...n];
|
|
4190
4196
|
e.aliases = t, e.alt = t;
|
|
4191
4197
|
} else (e[t] ??= []).push(...n);
|
|
4192
4198
|
}
|
|
4193
|
-
var
|
|
4199
|
+
var Mr = function(e, t) {
|
|
4194
4200
|
let n = {
|
|
4195
4201
|
id: e,
|
|
4196
4202
|
label: "",
|
|
@@ -4225,7 +4231,7 @@ var jr = function(e, t) {
|
|
|
4225
4231
|
else if (t === "language") n.language = b(o);
|
|
4226
4232
|
else if (t === "form_type") n.formType = b(o);
|
|
4227
4233
|
else if (t === "part_of_speech") n.partOfSpeech = b(o);
|
|
4228
|
-
else if (
|
|
4234
|
+
else if (Ar(t)) {
|
|
4229
4235
|
let i = o(), c, l = i;
|
|
4230
4236
|
if (!i.startsWith("{")) {
|
|
4231
4237
|
c = i;
|
|
@@ -4233,8 +4239,8 @@ var jr = function(e, t) {
|
|
|
4233
4239
|
if (n === void 0 || !n.startsWith("{")) throw Error(`Parsing error: term. ID ${e}: alias-family facet "${t}" with spelling code "${c}" expects a list block`);
|
|
4234
4240
|
l = o();
|
|
4235
4241
|
}
|
|
4236
|
-
let u = r(l).map(a), d =
|
|
4237
|
-
if (c === void 0)
|
|
4242
|
+
let u = r(l).map(a), d = kr[t];
|
|
4243
|
+
if (c === void 0) jr(n, d, u);
|
|
4238
4244
|
else {
|
|
4239
4245
|
let e = (n.aliasSpellings ??= {})[c] ??= {};
|
|
4240
4246
|
(e[d] ??= []).push(...u);
|
|
@@ -4246,7 +4252,7 @@ var jr = function(e, t) {
|
|
|
4246
4252
|
construct: "term",
|
|
4247
4253
|
id: e
|
|
4248
4254
|
}), (t) => (t.terms[e] = n, t);
|
|
4249
|
-
},
|
|
4255
|
+
}, Nr = function(e) {
|
|
4250
4256
|
let t = "term " + e.id + " {\n";
|
|
4251
4257
|
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.symbolId && (t += " symbol " + e.symbolId + "\n"), e.vocabRef && (t += " vocab_ref { register " + e.vocabRef.register + " clause \"" + s(e.vocabRef.clause) + "\" }\n"), e.vocabTerm && (t += " vocab_term \"" + s(e.vocabTerm) + "\"\n"), e.section && (t += " section \"" + s(e.section) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), e.source && (t += " source \"" + s(e.source) + "\"\n"), e.overlay && (t += " overlay true\n"), e.scopeNote && (t += " scope_note \"" + s(e.scopeNote) + "\"\n"), e.language && (t += " language \"" + s(e.language) + "\"\n"), e.formType && (t += " form_type \"" + s(e.formType) + "\"\n"), e.partOfSpeech && (t += " part_of_speech \"" + s(e.partOfSpeech) + "\"\n");
|
|
4252
4258
|
let n = (e) => /\s/.test(e) ? "\"" + s(e) + "\"" : e, r = (e, t, r) => " " + e + (r ? " " + r : "") + " { " + t.map(n).join(" ") + " }\n", i = e.aliases ?? e.alt;
|
|
@@ -4269,17 +4275,17 @@ var jr = function(e, t) {
|
|
|
4269
4275
|
t += " }\n";
|
|
4270
4276
|
}
|
|
4271
4277
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4272
|
-
},
|
|
4278
|
+
}, Pr = [
|
|
4273
4279
|
"none",
|
|
4274
4280
|
"max",
|
|
4275
4281
|
"mean",
|
|
4276
4282
|
"worst_case",
|
|
4277
4283
|
"max_abs_over_window"
|
|
4278
4284
|
];
|
|
4279
|
-
function
|
|
4285
|
+
function Fr(e) {
|
|
4280
4286
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
4281
4287
|
}
|
|
4282
|
-
var
|
|
4288
|
+
var Ir = function(e, t) {
|
|
4283
4289
|
let r = {
|
|
4284
4290
|
id: e,
|
|
4285
4291
|
quantityKind: "",
|
|
@@ -4301,12 +4307,12 @@ var Fr = function(e, t) {
|
|
|
4301
4307
|
} else if (t === "symbol") r.symbol = b(o);
|
|
4302
4308
|
else if (t === "behavior") r.behavior = o();
|
|
4303
4309
|
else if (t === "derive" || t === "expression") r.derive = b(o);
|
|
4304
|
-
else if (t === "inputs" || t === "uses") r.inputs =
|
|
4310
|
+
else if (t === "inputs" || t === "uses") r.inputs = Fr(o());
|
|
4305
4311
|
else if (t === "series_reduction") {
|
|
4306
4312
|
let t = o();
|
|
4307
|
-
if (!
|
|
4313
|
+
if (!Pr.includes(t)) throw Error(`Parsing error: verdict. ID ${e}: Unknown series_reduction ${t} (valid: ${Pr.join(", ")})`);
|
|
4308
4314
|
r.seriesReduction = t;
|
|
4309
|
-
} else if (t === "acceptance") r.acceptance =
|
|
4315
|
+
} else if (t === "acceptance") r.acceptance = Jn(i(o()));
|
|
4310
4316
|
else if (t === "source" || t === "reference") {
|
|
4311
4317
|
let e = I(i(o()));
|
|
4312
4318
|
(r.sourceRefs ??= []).push(e), r.source ||= e;
|
|
@@ -4320,16 +4326,16 @@ var Fr = function(e, t) {
|
|
|
4320
4326
|
construct: "verdict",
|
|
4321
4327
|
id: e
|
|
4322
4328
|
}), (t) => (t.verdicts[e] = r, t);
|
|
4323
|
-
},
|
|
4329
|
+
}, Lr = function(e) {
|
|
4324
4330
|
let t = "verdict " + e.id + " {\n";
|
|
4325
|
-
e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.behavior && (t += " behavior " + e.behavior + "\n"), e.quantityKind && (t += " quantity { kind " + e.quantityKind, e.unit && (t += " unit \"" + s(e.unit) + "\""), t += " }\n"), e.derive && (t += " derive \"" + s(e.derive) + "\"\n"), e.inputs.length > 0 && (t += " inputs { " + e.inputs.join(" ") + " }\n"), e.seriesReduction && (t += " series_reduction " + e.seriesReduction + "\n"), e.acceptance && (t +=
|
|
4331
|
+
e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.behavior && (t += " behavior " + e.behavior + "\n"), e.quantityKind && (t += " quantity { kind " + e.quantityKind, e.unit && (t += " unit \"" + s(e.unit) + "\""), t += " }\n"), e.derive && (t += " derive \"" + s(e.derive) + "\"\n"), e.inputs.length > 0 && (t += " inputs { " + e.inputs.join(" ") + " }\n"), e.seriesReduction && (t += " series_reduction " + e.seriesReduction + "\n"), e.acceptance && (t += Yn(e.acceptance, " ") + "\n");
|
|
4326
4332
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source && (e.source.doc || e.source.clause) ? [e.source] : [];
|
|
4327
4333
|
for (let e of n) t += E(e, " ", s);
|
|
4328
4334
|
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4329
4335
|
};
|
|
4330
4336
|
//#endregion
|
|
4331
4337
|
//#region src/ser-des/config/referenceMaterial.ts
|
|
4332
|
-
function
|
|
4338
|
+
function Rr(e) {
|
|
4333
4339
|
let t = [], r = n(e), o = 0;
|
|
4334
4340
|
for (; o < r.length;) {
|
|
4335
4341
|
if (r[o++] !== "field") {
|
|
@@ -4355,7 +4361,7 @@ function Lr(e) {
|
|
|
4355
4361
|
}
|
|
4356
4362
|
return t;
|
|
4357
4363
|
}
|
|
4358
|
-
function
|
|
4364
|
+
function zr(e) {
|
|
4359
4365
|
let t = [], r = n(e), o = 0;
|
|
4360
4366
|
for (; o < r.length;) {
|
|
4361
4367
|
if (r[o++] !== "constraint") {
|
|
@@ -4412,7 +4418,7 @@ function Rr(e) {
|
|
|
4412
4418
|
}
|
|
4413
4419
|
return t;
|
|
4414
4420
|
}
|
|
4415
|
-
var
|
|
4421
|
+
var Br = function(e, t) {
|
|
4416
4422
|
let n = {
|
|
4417
4423
|
id: e,
|
|
4418
4424
|
kind: "",
|
|
@@ -4433,15 +4439,15 @@ var zr = function(e, t) {
|
|
|
4433
4439
|
let e = S(t, r, a, i);
|
|
4434
4440
|
T(n, e) || (n.refs ??= []).push(e);
|
|
4435
4441
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
4436
|
-
else if (e === "identity_fields") n.identityFields =
|
|
4437
|
-
else if (e === "constraints") n.constraints =
|
|
4442
|
+
else if (e === "identity_fields") n.identityFields = Rr(i(t()));
|
|
4443
|
+
else if (e === "constraints") n.constraints = zr(i(t()));
|
|
4438
4444
|
else return !1;
|
|
4439
4445
|
return !0;
|
|
4440
4446
|
}, {
|
|
4441
4447
|
construct: "reference_material",
|
|
4442
4448
|
id: e
|
|
4443
4449
|
}), (t) => (t.referenceMaterials[e] = n, t);
|
|
4444
|
-
},
|
|
4450
|
+
}, Vr = function(e) {
|
|
4445
4451
|
let t = "reference_material " + e.id + " {\n";
|
|
4446
4452
|
e.kind && (t += " kind " + e.kind + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n");
|
|
4447
4453
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
@@ -4464,7 +4470,7 @@ var zr = function(e, t) {
|
|
|
4464
4470
|
t += " }\n";
|
|
4465
4471
|
}
|
|
4466
4472
|
return t += "}\n", t;
|
|
4467
|
-
},
|
|
4473
|
+
}, Hr = function(e, t) {
|
|
4468
4474
|
let n = {
|
|
4469
4475
|
id: e,
|
|
4470
4476
|
kind: "",
|
|
@@ -4486,16 +4492,16 @@ var zr = function(e, t) {
|
|
|
4486
4492
|
} else t === "description" || t === "definition" ? n.description = a(o[s++]) : t === "subject_kinds" ? n.subjectKinds = r(i(o[s++])).map(a) : t === "target_kinds" ? n.targetKinds = r(i(o[s++])).map(a) : t === "resolution" ? n.resolution = a(o[s++]) : t === "inverse" ? n.inverse = a(o[s++]) : t === "transitive" ? n.transitive = a(o[s++]) === "true" : t === "symmetric" ? n.symmetric = a(o[s++]) === "true" : s++;
|
|
4487
4493
|
}
|
|
4488
4494
|
return (t) => (t.predicates ??= {}, t.predicates[e] = n, t);
|
|
4489
|
-
},
|
|
4495
|
+
}, Ur = function(e) {
|
|
4490
4496
|
let t = "predicate " + e.id + " {\n";
|
|
4491
4497
|
return e.kind && (t += " kind " + e.kind + "\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.subjectKinds.length > 0 && (t += " subject_kinds { " + e.subjectKinds.join(" ") + " }\n"), e.targetKinds.length > 0 && (t += " target_kinds { " + e.targetKinds.join(" ") + " }\n"), e.resolution && (t += " resolution " + e.resolution + "\n"), e.inverse && (t += " inverse " + e.inverse + "\n"), e.transitive && (t += " transitive true\n"), e.symmetric && (t += " symmetric true\n"), t += "}\n", t;
|
|
4492
4498
|
};
|
|
4493
4499
|
//#endregion
|
|
4494
4500
|
//#region src/ser-des/config/constraint.ts
|
|
4495
|
-
function
|
|
4501
|
+
function Wr(e) {
|
|
4496
4502
|
return e.length >= 2 && e.charAt(0) === "\"" && e.charAt(e.length - 1) === "\"" ? o(e.substr(1, e.length - 2)) : i(e);
|
|
4497
4503
|
}
|
|
4498
|
-
var
|
|
4504
|
+
var Gr = function(e, t) {
|
|
4499
4505
|
let n = {
|
|
4500
4506
|
id: e,
|
|
4501
4507
|
stereotype: "",
|
|
@@ -4509,9 +4515,9 @@ var Wr = function(e, t) {
|
|
|
4509
4515
|
let t = o[s++];
|
|
4510
4516
|
if (s >= o.length) throw Error(`Parsing error: constraint. ID ${e}: Expecting value for ${t}`);
|
|
4511
4517
|
if (t === "stereotype") n.stereotype = a(o[s++]);
|
|
4512
|
-
else if (t === "name") n.name =
|
|
4513
|
-
else if (t === "check") n.check =
|
|
4514
|
-
else if (t === "violation_meaning") n.violationMeaning =
|
|
4518
|
+
else if (t === "name") n.name = Wr(o[s++]);
|
|
4519
|
+
else if (t === "check") n.check = Wr(o[s++]);
|
|
4520
|
+
else if (t === "violation_meaning") n.violationMeaning = Wr(o[s++]);
|
|
4515
4521
|
else if (t === "on_violation") n.onViolation = a(o[s++]);
|
|
4516
4522
|
else if (t === "source") n.source = I(i(o[s++]));
|
|
4517
4523
|
else if (t === "ref") {
|
|
@@ -4523,10 +4529,10 @@ var Wr = function(e, t) {
|
|
|
4523
4529
|
} else s = y(o, s, t);
|
|
4524
4530
|
}
|
|
4525
4531
|
return (t) => (t.constraints[e] = n, t);
|
|
4526
|
-
},
|
|
4532
|
+
}, Kr = function(e) {
|
|
4527
4533
|
let t = "constraint " + e.id + " {\n";
|
|
4528
4534
|
return e.stereotype && (t += " stereotype " + e.stereotype + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.check && (t += " check \"" + s(e.check) + "\"\n"), e.violationMeaning && (t += " violation_meaning \"" + s(e.violationMeaning) + "\"\n"), t += " on_violation " + (e.onViolation || "invalid") + "\n", e.source && (e.source.doc || e.source.clause) && (t += " source { doc \"" + s(e.source.doc) + "\" clause \"" + s(e.source.clause) + "\"" + (e.source.fragment ? " fragment \"" + s(e.source.fragment) + "\"" : "") + " }\n"), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4529
|
-
},
|
|
4535
|
+
}, qr = ["open", "resolved"], Jr = function(e, t) {
|
|
4530
4536
|
let i = {
|
|
4531
4537
|
id: e,
|
|
4532
4538
|
status: "",
|
|
@@ -4541,7 +4547,7 @@ var Wr = function(e, t) {
|
|
|
4541
4547
|
if (s >= o.length) throw Error(`Parsing error: discrepancy_record. ID ${e}: Expecting value for ${t}`);
|
|
4542
4548
|
if (t === "status") {
|
|
4543
4549
|
let t = a(o[s++]);
|
|
4544
|
-
if (!
|
|
4550
|
+
if (!qr.includes(t)) throw Error(`Parsing error: discrepancy_record. ID ${e}: Unknown status ${t} (valid: ${qr.join(", ")})`);
|
|
4545
4551
|
i.status = t;
|
|
4546
4552
|
} else if (t === "summary") i.summary = a(o[s++]);
|
|
4547
4553
|
else if (t === "sources") i.sources = n(a(o[s++])).map(a).filter((e) => e.length > 0);
|
|
@@ -4552,13 +4558,13 @@ var Wr = function(e, t) {
|
|
|
4552
4558
|
} else t === "governing" ? i.governing = a(o[s++]) : t === "rationale" ? i.rationale = a(o[s++]) : s++;
|
|
4553
4559
|
}
|
|
4554
4560
|
return (t) => (t.discrepancyRecords[e] = i, t);
|
|
4555
|
-
},
|
|
4561
|
+
}, Yr = function(e) {
|
|
4556
4562
|
let t = "discrepancy_record " + e.id + " {\n";
|
|
4557
4563
|
return e.status && (t += " status " + e.status + "\n"), e.summary && (t += " summary \"" + s(e.summary) + "\"\n"), t += " sources { " + e.sources.map((e) => "\"" + s(e) + "\"").join(" ") + " }\n", e.resolution && (t += " resolution " + e.resolution + "\n"), e.governing && (t += " governing \"" + s(e.governing) + "\"\n"), e.rationale && (t += " rationale \"" + s(e.rationale) + "\"\n"), t += "}\n", t;
|
|
4558
4564
|
};
|
|
4559
4565
|
//#endregion
|
|
4560
4566
|
//#region src/ser-des/config/testPointSet.ts
|
|
4561
|
-
function
|
|
4567
|
+
function Xr(e) {
|
|
4562
4568
|
let t = {}, r = n(e), o = 0;
|
|
4563
4569
|
for (; o < r.length;) {
|
|
4564
4570
|
let e = P(r[o++]);
|
|
@@ -4578,7 +4584,7 @@ function Yr(e) {
|
|
|
4578
4584
|
}
|
|
4579
4585
|
return t;
|
|
4580
4586
|
}
|
|
4581
|
-
function
|
|
4587
|
+
function Zr(e) {
|
|
4582
4588
|
let t = [], r = n(e), o = 0;
|
|
4583
4589
|
for (; o < r.length;) {
|
|
4584
4590
|
if (r[o++] !== "point") {
|
|
@@ -4603,7 +4609,7 @@ function Xr(e) {
|
|
|
4603
4609
|
}
|
|
4604
4610
|
return t;
|
|
4605
4611
|
}
|
|
4606
|
-
var
|
|
4612
|
+
var Qr = function(e, t) {
|
|
4607
4613
|
let n = {
|
|
4608
4614
|
id: e,
|
|
4609
4615
|
description: "",
|
|
@@ -4621,16 +4627,16 @@ var Zr = function(e, t) {
|
|
|
4621
4627
|
let e = S(t, r, a, i);
|
|
4622
4628
|
T(n, e) || (n.refs ??= []).push(e);
|
|
4623
4629
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
4624
|
-
else if (e === "cardinality") n.cardinality =
|
|
4630
|
+
else if (e === "cardinality") n.cardinality = Xr(i(t()));
|
|
4625
4631
|
else if (e === "repetitions_per_point") n.repetitionsPerPoint = Number(a(t()));
|
|
4626
|
-
else if (e === "points") n.points =
|
|
4632
|
+
else if (e === "points") n.points = Zr(i(t()));
|
|
4627
4633
|
else return !1;
|
|
4628
4634
|
return !0;
|
|
4629
4635
|
}, {
|
|
4630
4636
|
construct: "test_point_set",
|
|
4631
4637
|
id: e
|
|
4632
4638
|
}), (t) => (t.testPointSets[e] = n, t);
|
|
4633
|
-
},
|
|
4639
|
+
}, $r = function(e) {
|
|
4634
4640
|
let t = "test_point_set " + e.id + " {\n";
|
|
4635
4641
|
e.description && (t += " description \"" + s(e.description) + "\"\n");
|
|
4636
4642
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source && (e.source.doc || e.source.clause) ? [e.source] : [];
|
|
@@ -4660,7 +4666,7 @@ var Zr = function(e, t) {
|
|
|
4660
4666
|
function H(e) {
|
|
4661
4667
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
4662
4668
|
}
|
|
4663
|
-
function
|
|
4669
|
+
function ei(e) {
|
|
4664
4670
|
let t = {
|
|
4665
4671
|
verdict: "",
|
|
4666
4672
|
op: "",
|
|
@@ -4674,7 +4680,7 @@ function $r(e) {
|
|
|
4674
4680
|
}
|
|
4675
4681
|
return t;
|
|
4676
4682
|
}
|
|
4677
|
-
function
|
|
4683
|
+
function ti(e) {
|
|
4678
4684
|
let t = {
|
|
4679
4685
|
expression: "",
|
|
4680
4686
|
uses: [],
|
|
@@ -4705,11 +4711,11 @@ function ei(e) {
|
|
|
4705
4711
|
t === "kind" ? e.kind = a(s[c++]) : t === "unit" ? e.unit = a(s[c++]) : i(s[c++]);
|
|
4706
4712
|
}
|
|
4707
4713
|
t.quantity = e;
|
|
4708
|
-
} else e === "accepts" ? t.accepts =
|
|
4714
|
+
} else e === "accepts" ? t.accepts = ei(i(r[o++])) : e === "acceptance" ? t.acceptance = Jn(i(r[o++])) : e === "source_discrepancy" ? t.sourceDiscrepancy = A(i(r[o++])) : o = y(r, o, e);
|
|
4709
4715
|
}
|
|
4710
4716
|
return t;
|
|
4711
4717
|
}
|
|
4712
|
-
function
|
|
4718
|
+
function ni(e) {
|
|
4713
4719
|
let t = [], r = n(e), o = 0;
|
|
4714
4720
|
for (; o < r.length;) {
|
|
4715
4721
|
if (r[o++] !== "subject") {
|
|
@@ -4733,7 +4739,7 @@ function ti(e) {
|
|
|
4733
4739
|
}
|
|
4734
4740
|
return t;
|
|
4735
4741
|
}
|
|
4736
|
-
function
|
|
4742
|
+
function ri(e) {
|
|
4737
4743
|
let t = [], r = n(e), o = 0;
|
|
4738
4744
|
for (; o < r.length;) {
|
|
4739
4745
|
if (r[o++] !== "param") {
|
|
@@ -4776,7 +4782,7 @@ function ni(e) {
|
|
|
4776
4782
|
}
|
|
4777
4783
|
return t;
|
|
4778
4784
|
}
|
|
4779
|
-
var
|
|
4785
|
+
var ii = function(e, t) {
|
|
4780
4786
|
let o = {
|
|
4781
4787
|
id: e,
|
|
4782
4788
|
name: "",
|
|
@@ -4803,9 +4809,9 @@ var ri = function(e, t) {
|
|
|
4803
4809
|
else if (e === "statement") o.statement = a(s[c++]);
|
|
4804
4810
|
else if (e === "guidance") o.guidance = a(s[c++]);
|
|
4805
4811
|
else if (e === "binds_to") o.bindsTo = H(s[c++]);
|
|
4806
|
-
else if (e === "subjects") o.subjects =
|
|
4807
|
-
else if (e === "parameters") o.parameters =
|
|
4808
|
-
else if (e === "limit") o.limit =
|
|
4812
|
+
else if (e === "subjects") o.subjects = ni(i(s[c++]));
|
|
4813
|
+
else if (e === "parameters") o.parameters = ri(i(s[c++]));
|
|
4814
|
+
else if (e === "limit") o.limit = ti(i(s[c++]));
|
|
4809
4815
|
else if (e === "applicability") o.applicability = L(i(s[c++]));
|
|
4810
4816
|
else if (e === "channel") o.channel = a(s[c++]);
|
|
4811
4817
|
else if (e === "report_row") o.reportRow = a(s[c++]);
|
|
@@ -4833,19 +4839,19 @@ var ri = function(e, t) {
|
|
|
4833
4839
|
}
|
|
4834
4840
|
return (t) => (t.requirements[e] = o, t);
|
|
4835
4841
|
};
|
|
4836
|
-
function
|
|
4842
|
+
function ai(e) {
|
|
4837
4843
|
let t = " limit {\n";
|
|
4838
4844
|
if (e.expression && (t += " expression \"" + s(e.expression) + "\"\n"), e.uses.length > 0 && (t += " uses { " + e.uses.join(" ") + " }\n"), e.modality && (t += " modality " + e.modality + "\n"), e.relativeTo && (t += " relative_to " + e.relativeTo + "\n"), e.notes && (t += " notes \"" + s(e.notes) + "\"\n"), e.quantity) {
|
|
4839
4845
|
let n = " quantity {";
|
|
4840
|
-
e.quantity.kind && (n += " kind " + e.quantity.kind), e.quantity.unit && (n += " unit " + e.quantity.unit), t += n + " }\n";
|
|
4846
|
+
e.quantity.kind && (n += " kind " + e.quantity.kind), e.quantity.unit && (n += " unit \"" + s(e.quantity.unit) + "\""), t += n + " }\n";
|
|
4841
4847
|
}
|
|
4842
4848
|
if (e.accepts) {
|
|
4843
4849
|
let n = e.accepts, r = " accepts { verdict " + n.verdict;
|
|
4844
4850
|
n.op && (r += " op " + n.op), n.limit && (r += " limit \"" + s(n.limit) + "\""), n.sourceDiscrepancy && (r += " " + j(n.sourceDiscrepancy, "")), t += r + " }\n";
|
|
4845
4851
|
}
|
|
4846
|
-
return e.acceptance && (t +=
|
|
4852
|
+
return e.acceptance && (t += Yn(e.acceptance, " ") + "\n"), e.sourceDiscrepancy && (t += j(e.sourceDiscrepancy, " ") + "\n"), t += " }\n", t;
|
|
4847
4853
|
}
|
|
4848
|
-
var
|
|
4854
|
+
var oi = function(e) {
|
|
4849
4855
|
let t = "requirement " + e.id + " {\n";
|
|
4850
4856
|
if (e.name && (t += " name \"" + s(e.name) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.guidance && (t += " guidance \"" + s(e.guidance) + "\"\n"), e.bindsTo.length > 0 && (t += " binds_to { " + e.bindsTo.join(" ") + " }\n"), e.subjects.length > 0) {
|
|
4851
4857
|
t += " subjects { ";
|
|
@@ -4860,7 +4866,7 @@ var ai = function(e) {
|
|
|
4860
4866
|
}
|
|
4861
4867
|
t += " }\n";
|
|
4862
4868
|
}
|
|
4863
|
-
if (e.limit && (t +=
|
|
4869
|
+
if (e.limit && (t += ai(e.limit)), e.applicability.length > 0 && (t += " applicability {\n " + R(e.applicability).trim() + "\n }\n"), e.channel && (t += " channel " + e.channel + "\n"), e.reportRow && (t += " report_row " + e.reportRow + "\n"), e.obligation && (t += " obligation " + e.obligation + "\n"), e.acceptanceCriteria && (t += " acceptance_criteria {\n " + e.acceptanceCriteria + "\n }\n"), e.verificationMethod) {
|
|
4864
4870
|
let n = " verification { method " + e.verificationMethod;
|
|
4865
4871
|
e.verificationDescription && (n += " description \"" + s(e.verificationDescription) + "\""), t += n + " }\n";
|
|
4866
4872
|
}
|
|
@@ -4868,7 +4874,7 @@ var ai = function(e) {
|
|
|
4868
4874
|
for (let n of e.sourceRefs ?? (e.source && (e.source.doc || e.source.clause) ? [e.source] : [])) t += E(n, " ", s);
|
|
4869
4875
|
for (let n of e.refs ?? []) t += " ref " + n.predicate + " \"" + s(n.target) + "\"" + (n.note ? " { note \"" + s(n.note) + "\" }" : "") + "\n";
|
|
4870
4876
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4871
|
-
},
|
|
4877
|
+
}, si = function(e, t) {
|
|
4872
4878
|
let n = {
|
|
4873
4879
|
id: e,
|
|
4874
4880
|
name: "",
|
|
@@ -4883,43 +4889,43 @@ var ai = function(e) {
|
|
|
4883
4889
|
e === "name" ? n.name = a(o[s++]) : e === "title" ? n.title = a(o[s++]) : e === "description" ? n.description = a(o[s++]) : e === "subject" ? n.subject = a(o[s++]) : e === "guidance" ? n.guidance = a(o[s++]) : e === "applicability" ? n.applicability = L(i(o[s++])) : e === "dependencies" ? n.dependencies = H(o[s++]) : e === "reference" ? n.referenceIds = H(o[s++]) : s = y(o, s, e);
|
|
4884
4890
|
}
|
|
4885
4891
|
return (t) => (t.requirementClasses[e] = n, t);
|
|
4886
|
-
},
|
|
4892
|
+
}, ci = function(e) {
|
|
4887
4893
|
let t = "requirement_class " + e.id + " {\n";
|
|
4888
4894
|
return e.name && (t += " name \"" + s(e.name) + "\"\n"), e.subject && (t += " subject \"" + s(e.subject) + "\"\n"), e.guidance && (t += " guidance \"" + s(e.guidance) + "\"\n"), e.applicability && e.applicability.length > 0 && (t += " applicability {\n " + R(e.applicability).trim() + "\n }\n"), e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
4889
|
-
},
|
|
4895
|
+
}, li = {
|
|
4890
4896
|
keyword: "requirement",
|
|
4891
4897
|
field: "requirements",
|
|
4892
4898
|
takesID: !0,
|
|
4893
|
-
parse:
|
|
4894
|
-
dump:
|
|
4895
|
-
},
|
|
4899
|
+
parse: ii,
|
|
4900
|
+
dump: oi
|
|
4901
|
+
}, ui = {
|
|
4896
4902
|
keyword: "requirement_class",
|
|
4897
4903
|
field: "requirementClasses",
|
|
4898
4904
|
takesID: !0,
|
|
4899
|
-
parse:
|
|
4900
|
-
dump:
|
|
4905
|
+
parse: si,
|
|
4906
|
+
dump: ci
|
|
4901
4907
|
};
|
|
4902
4908
|
//#endregion
|
|
4903
4909
|
//#region src/ser-des/config/packageManifest.ts
|
|
4904
4910
|
function U(e) {
|
|
4905
4911
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
4906
4912
|
}
|
|
4907
|
-
var
|
|
4913
|
+
var di = [
|
|
4908
4914
|
"core",
|
|
4909
4915
|
"module",
|
|
4910
4916
|
"rec",
|
|
4911
4917
|
"product_reference",
|
|
4912
4918
|
"certification_program"
|
|
4913
|
-
],
|
|
4919
|
+
], fi = [
|
|
4914
4920
|
"current",
|
|
4915
4921
|
"preview",
|
|
4916
4922
|
"superseded",
|
|
4917
4923
|
"withdrawn"
|
|
4918
4924
|
];
|
|
4919
|
-
function
|
|
4925
|
+
function pi(e) {
|
|
4920
4926
|
return e.startsWith("{") ? U(e) : [a(e)];
|
|
4921
4927
|
}
|
|
4922
|
-
var
|
|
4928
|
+
var mi = function(e) {
|
|
4923
4929
|
let t = {
|
|
4924
4930
|
id: "",
|
|
4925
4931
|
title: "",
|
|
@@ -4956,7 +4962,7 @@ var pi = function(e) {
|
|
|
4956
4962
|
t.uses = e, Object.keys(n).length > 0 && (t.usePins = n);
|
|
4957
4963
|
} else if (e === "kind") {
|
|
4958
4964
|
let e = a(r[o++]);
|
|
4959
|
-
if (!
|
|
4965
|
+
if (!di.includes(e)) throw Error(`Parsing error: package: Expected kind ${di.join("|")}, got "${e}"`);
|
|
4960
4966
|
t.kind = e;
|
|
4961
4967
|
} else if (e === "manufacturer") t.manufacturer = a(r[o++]);
|
|
4962
4968
|
else if (e === "product") t.product = a(r[o++]);
|
|
@@ -4971,9 +4977,9 @@ var pi = function(e) {
|
|
|
4971
4977
|
else if (e === "provides") t.provides = U(r[o++]);
|
|
4972
4978
|
else if (e === "requires") t.requires = U(r[o++]);
|
|
4973
4979
|
else if (e === "waives") t.waives = U(r[o++]);
|
|
4974
|
-
else if (e === "supersedes") t.supersedes =
|
|
4975
|
-
else if (e === "replaces") t.replaces =
|
|
4976
|
-
else if (e === "superseded_by") t.supersededBy =
|
|
4980
|
+
else if (e === "supersedes") t.supersedes = pi(r[o++]);
|
|
4981
|
+
else if (e === "replaces") t.replaces = pi(r[o++]);
|
|
4982
|
+
else if (e === "superseded_by") t.supersededBy = pi(r[o++]);
|
|
4977
4983
|
else if (e === "validity") {
|
|
4978
4984
|
let e = n(i(r[o++])), s = { from: "" }, c = 0;
|
|
4979
4985
|
for (; c < e.length;) {
|
|
@@ -4984,7 +4990,7 @@ var pi = function(e) {
|
|
|
4984
4990
|
t.validity = s;
|
|
4985
4991
|
} else if (e === "status") {
|
|
4986
4992
|
let e = a(r[o++]);
|
|
4987
|
-
if (!
|
|
4993
|
+
if (!fi.includes(e)) throw Error(`Parsing error: package: Expected status ${fi.join("|")}, got "${e}"`);
|
|
4988
4994
|
t.status = e;
|
|
4989
4995
|
} else if (e === "default_spelling" || e === "defaultSpelling") t.defaultSpelling = a(r[o++]);
|
|
4990
4996
|
else if (e === "spellings") t.spellings = U(r[o++]);
|
|
@@ -5004,13 +5010,13 @@ var pi = function(e) {
|
|
|
5004
5010
|
}
|
|
5005
5011
|
return (e) => (e.packageManifest = t, e);
|
|
5006
5012
|
};
|
|
5007
|
-
function
|
|
5013
|
+
function hi(e) {
|
|
5008
5014
|
let t = "package {\n";
|
|
5009
5015
|
e.id && (t += " id " + e.id + "\n"), e.kind && (t += " kind " + e.kind + "\n"), e.manufacturer && (t += " manufacturer \"" + e.manufacturer.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"\n"), e.product && (t += " product \"" + e.product.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"\n"), e.mapsTo && e.mapsTo.length > 0 && (t += " maps_to { " + e.mapsTo.join(" ") + " }\n");
|
|
5010
5016
|
for (let n of e.refs ?? []) t += " ref " + n.predicate + " \"" + n.target.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"" + (n.note ? " { note \"" + n.note.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\" }" : "") + "\n";
|
|
5011
5017
|
return t += k(e.correspondences, " ", s, N), e.schemeType && (t += " scheme_type " + e.schemeType + "\n"), e.title && (t += " title \"" + e.title.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"\n"), e.version && (t += " version \"" + e.version + "\"\n"), e.editions.length > 0 && (t += " editions { " + e.editions.join(" ") + " }\n"), e.baseUrn && (t += " baseUrn \"" + e.baseUrn + "\"\n"), e.extends && (t += " extends " + e.extends + "\n"), e.uses && e.uses.length > 0 && (t += " uses { " + e.uses.map((t) => e.usePins?.[t] ? `${t}@${e.usePins[t]}` : t).join(" ") + " }\n"), e.provides && e.provides.length > 0 && (t += " provides { " + e.provides.join(" ") + " }\n"), e.requires && e.requires.length > 0 && (t += " requires { " + e.requires.join(" ") + " }\n"), e.waives && e.waives.length > 0 && (t += " waives { " + e.waives.join(" ") + " }\n"), e.supersedes && e.supersedes.length > 0 && (t += " supersedes { " + e.supersedes.join(" ") + " }\n"), e.replaces && e.replaces.length > 0 && (t += " replaces { " + e.replaces.join(" ") + " }\n"), e.supersededBy && e.supersededBy.length > 0 && (t += " superseded_by { " + e.supersededBy.join(" ") + " }\n"), e.validity && e.validity.from && (t += " validity { from " + e.validity.from + (e.validity.to ? " to " + e.validity.to : "") + " }\n"), e.status && (t += " status " + e.status + "\n"), e.defaultSpelling && (t += " default_spelling " + e.defaultSpelling + "\n"), e.spellings && e.spellings.length > 0 && (t += " spellings { " + e.spellings.join(" ") + " }\n"), e.description && (t += " description \"" + e.description.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"\n"), e.source && (t += " source { collection \"" + e.source.collection + "\" parts { " + e.source.parts.join(" ") + " } }\n"), t += "}\n", t;
|
|
5012
5018
|
}
|
|
5013
|
-
var
|
|
5019
|
+
var gi = {
|
|
5014
5020
|
keyword: "conformance_class",
|
|
5015
5021
|
field: "conformanceClasses",
|
|
5016
5022
|
takesID: !0,
|
|
@@ -5030,7 +5036,7 @@ var hi = {
|
|
|
5030
5036
|
for (; c < s.length;) {
|
|
5031
5037
|
let e = s[c++];
|
|
5032
5038
|
if (c >= s.length) break;
|
|
5033
|
-
e === "name" ? o.name = a(s[c++]) : e === "title" ? o.title = a(s[c++]) : e === "description" ? o.description = a(s[c++]) : e === "target" ? o.target = a(s[c++]) : e === "subject" ? o.subject = a(s[c++]) : e === "applicability" ? o.applicability = L(i(s[c++])) : e === "test_subject" ? o.testSubject =
|
|
5039
|
+
e === "name" ? o.name = a(s[c++]) : e === "title" ? o.title = a(s[c++]) : e === "description" ? o.description = a(s[c++]) : e === "target" ? o.target = a(s[c++]) : e === "subject" ? o.subject = a(s[c++]) : e === "applicability" ? o.applicability = L(i(s[c++])) : e === "test_subject" ? o.testSubject = Tr(i(s[c++])) : e === "guidance" ? o.guidance = a(s[c++]) : e === "dependencies" ? o.dependencies = n(a(s[c++])).map(a) : e === "reference" ? o.referenceIds = n(a(s[c++])).map(a) : c = y(s, c, e);
|
|
5034
5040
|
}
|
|
5035
5041
|
return (t) => (t.conformanceClasses[e] = o, t);
|
|
5036
5042
|
},
|
|
@@ -5043,28 +5049,28 @@ var hi = {
|
|
|
5043
5049
|
}
|
|
5044
5050
|
return e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
5045
5051
|
}
|
|
5046
|
-
},
|
|
5052
|
+
}, _i = [
|
|
5047
5053
|
"query",
|
|
5048
5054
|
"subscribe",
|
|
5049
5055
|
"invoke"
|
|
5050
|
-
],
|
|
5056
|
+
], vi = [
|
|
5051
5057
|
"public",
|
|
5052
5058
|
"registered",
|
|
5053
5059
|
"authority"
|
|
5054
|
-
],
|
|
5060
|
+
], yi = /* @__PURE__ */ new Set([
|
|
5055
5061
|
"kind",
|
|
5056
5062
|
"serves",
|
|
5057
5063
|
"does",
|
|
5058
5064
|
"payload"
|
|
5059
5065
|
]);
|
|
5060
|
-
function
|
|
5066
|
+
function bi(e, t) {
|
|
5061
5067
|
let r = e[t] ?? "";
|
|
5062
5068
|
if (r.startsWith("{")) return {
|
|
5063
5069
|
names: n(i(r)).flatMap((e) => e.split(",")).map((e) => a(e.trim())).filter((e) => e.length > 0),
|
|
5064
5070
|
next: t + 1
|
|
5065
5071
|
};
|
|
5066
5072
|
let o = [], s = t;
|
|
5067
|
-
for (; s < e.length && !
|
|
5073
|
+
for (; s < e.length && !yi.has(e[s]) && !e[s].startsWith("{");) {
|
|
5068
5074
|
for (let t of e[s].split(",")) {
|
|
5069
5075
|
let e = a(t.trim());
|
|
5070
5076
|
e && o.push(e);
|
|
@@ -5076,7 +5082,7 @@ function yi(e, t) {
|
|
|
5076
5082
|
next: s
|
|
5077
5083
|
};
|
|
5078
5084
|
}
|
|
5079
|
-
function
|
|
5085
|
+
function xi(e, t) {
|
|
5080
5086
|
let r = {
|
|
5081
5087
|
name: e,
|
|
5082
5088
|
kind: "",
|
|
@@ -5089,10 +5095,10 @@ function bi(e, t) {
|
|
|
5089
5095
|
if (s > o.length) break;
|
|
5090
5096
|
if (e === "kind") r.kind = a(o[s++] ?? "");
|
|
5091
5097
|
else if (e === "serves") {
|
|
5092
|
-
let e =
|
|
5098
|
+
let e = bi(o, s);
|
|
5093
5099
|
r.serves = e.names, s = e.next;
|
|
5094
5100
|
} else if (e === "does") {
|
|
5095
|
-
let e =
|
|
5101
|
+
let e = bi(o, s);
|
|
5096
5102
|
r.does = e.names, s = e.next;
|
|
5097
5103
|
} else if (e === "payload") {
|
|
5098
5104
|
let e = n(i(o[s++] ?? "")), t = {
|
|
@@ -5110,7 +5116,7 @@ function bi(e, t) {
|
|
|
5110
5116
|
}
|
|
5111
5117
|
return r;
|
|
5112
5118
|
}
|
|
5113
|
-
function
|
|
5119
|
+
function Si(e) {
|
|
5114
5120
|
let t = {}, r = n(e), o = 0;
|
|
5115
5121
|
for (; o < r.length;) {
|
|
5116
5122
|
let e = P(r[o++]);
|
|
@@ -5122,7 +5128,7 @@ function xi(e) {
|
|
|
5122
5128
|
}
|
|
5123
5129
|
return t;
|
|
5124
5130
|
}
|
|
5125
|
-
function
|
|
5131
|
+
function Ci(e, t) {
|
|
5126
5132
|
let r = {
|
|
5127
5133
|
id: e,
|
|
5128
5134
|
operations: [],
|
|
@@ -5134,19 +5140,19 @@ function Si(e, t) {
|
|
|
5134
5140
|
if (s > o.length) break;
|
|
5135
5141
|
if (e === "operation") {
|
|
5136
5142
|
let e = P(o[s++] ?? ""), t = s < o.length ? i(o[s++]) : "";
|
|
5137
|
-
e && r.operations.push(
|
|
5138
|
-
} else e === "access" ? r.access =
|
|
5143
|
+
e && r.operations.push(xi(e, t));
|
|
5144
|
+
} else e === "access" ? r.access = Si(i(o[s++] ?? "")) : e === "profile" ? r.profile = a(o[s++] ?? "") : i(o[s++] ?? "");
|
|
5139
5145
|
}
|
|
5140
5146
|
return r;
|
|
5141
5147
|
}
|
|
5142
|
-
function
|
|
5148
|
+
function wi(e, t) {
|
|
5143
5149
|
let n = t + "operation " + N(e.name) + " {";
|
|
5144
5150
|
return e.kind && (n += " kind " + N(e.kind)), e.serves.length > 0 && (n += " serves { " + e.serves.map(N).join(" ") + " }"), e.does.length > 0 && (n += " does { " + e.does.map(N).join(" ") + " }"), e.payload && (n += " payload { quantity_kind " + N(e.payload.quantityKind) + " unit " + N(e.payload.unit) + " timestamp " + (e.payload.timestamp ? "true" : "false") + " }"), n + " }\n";
|
|
5145
5151
|
}
|
|
5146
|
-
function
|
|
5152
|
+
function Ti(e, t) {
|
|
5147
5153
|
let n = t + "endpoint " + N(e.id) + " {\n";
|
|
5148
|
-
for (let r of e.operations) n +=
|
|
5149
|
-
let r =
|
|
5154
|
+
for (let r of e.operations) n += wi(r, t + " ");
|
|
5155
|
+
let r = vi.filter((t) => (e.access[t] ?? []).length > 0), i = Object.keys(e.access).filter((e) => !vi.includes(e));
|
|
5150
5156
|
if (r.length + i.length > 0) {
|
|
5151
5157
|
n += t + " access {";
|
|
5152
5158
|
for (let t of [...r, ...i]) n += " " + t + " { " + (e.access[t] ?? []).map(N).join(" ") + " }";
|
|
@@ -5154,7 +5160,7 @@ function wi(e, t) {
|
|
|
5154
5160
|
}
|
|
5155
5161
|
return e.profile && (n += t + " profile " + N(e.profile) + "\n"), n + t + "}\n";
|
|
5156
5162
|
}
|
|
5157
|
-
function
|
|
5163
|
+
function Ei(e, t) {
|
|
5158
5164
|
let r = {
|
|
5159
5165
|
aspect: "",
|
|
5160
5166
|
via: "",
|
|
@@ -5173,11 +5179,11 @@ function Ti(e, t) {
|
|
|
5173
5179
|
next: t
|
|
5174
5180
|
};
|
|
5175
5181
|
}
|
|
5176
|
-
function
|
|
5182
|
+
function Di(e, t) {
|
|
5177
5183
|
let n = t + "serve " + N(e.aspect) + " via " + N(e.via);
|
|
5178
5184
|
return e.freshWithin && (n += " { fresh_within " + N(e.freshWithin) + " }"), n + "\n";
|
|
5179
5185
|
}
|
|
5180
|
-
var
|
|
5186
|
+
var Oi = {
|
|
5181
5187
|
keyword: "connector_profile",
|
|
5182
5188
|
field: "connectorProfiles",
|
|
5183
5189
|
takesID: !0,
|
|
@@ -5202,7 +5208,7 @@ var Di = {
|
|
|
5202
5208
|
};
|
|
5203
5209
|
//#endregion
|
|
5204
5210
|
//#region src/ser-des/config/composition.ts
|
|
5205
|
-
function
|
|
5211
|
+
function ki(e, t) {
|
|
5206
5212
|
let r = {
|
|
5207
5213
|
id: e,
|
|
5208
5214
|
product: "",
|
|
@@ -5222,7 +5228,7 @@ function Oi(e, t) {
|
|
|
5222
5228
|
}
|
|
5223
5229
|
return r;
|
|
5224
5230
|
}
|
|
5225
|
-
function
|
|
5231
|
+
function Ai(e) {
|
|
5226
5232
|
let t = [];
|
|
5227
5233
|
for (let n of e.split("\n")) {
|
|
5228
5234
|
let e = n.trim();
|
|
@@ -5245,7 +5251,7 @@ function ki(e) {
|
|
|
5245
5251
|
}
|
|
5246
5252
|
return t;
|
|
5247
5253
|
}
|
|
5248
|
-
function
|
|
5254
|
+
function ji(e) {
|
|
5249
5255
|
let t = {
|
|
5250
5256
|
components: [],
|
|
5251
5257
|
decomposition: []
|
|
@@ -5254,8 +5260,8 @@ function Ai(e) {
|
|
|
5254
5260
|
let e = n[a++];
|
|
5255
5261
|
if (e === "component") {
|
|
5256
5262
|
let e = n[a++] ?? "", r = a < n.length ? i(n[a++]) : "";
|
|
5257
|
-
e && t.components.push(
|
|
5258
|
-
} else if (e === "decomposition") t.decomposition =
|
|
5263
|
+
e && t.components.push(ki(e, r));
|
|
5264
|
+
} else if (e === "decomposition") t.decomposition = Ai(i(n[a++] ?? ""));
|
|
5259
5265
|
else if (e === "revision") {
|
|
5260
5266
|
let e = Number(n[a++] ?? "");
|
|
5261
5267
|
Number.isFinite(e) && (t.revision = e);
|
|
@@ -5263,13 +5269,13 @@ function Ai(e) {
|
|
|
5263
5269
|
}
|
|
5264
5270
|
return t;
|
|
5265
5271
|
}
|
|
5266
|
-
function
|
|
5272
|
+
function Mi(e, t) {
|
|
5267
5273
|
let n = t + "component " + N(e.id) + " {\n";
|
|
5268
5274
|
return n += t + " product " + N(e.product) + "\n", n += t + " endpoint " + N(e.endpoint) + "\n", n += t + " serial " + s(e.serial) + "\n", n += t + " certificate " + (e.certificate === null ? "null" : s(e.certificate)) + "\n", n + t + "}\n";
|
|
5269
5275
|
}
|
|
5270
|
-
function
|
|
5276
|
+
function Ni(e, t) {
|
|
5271
5277
|
let n = t + "composed_of {\n";
|
|
5272
|
-
for (let r of e.components) n +=
|
|
5278
|
+
for (let r of e.components) n += Mi(r, t + " ");
|
|
5273
5279
|
if (e.decomposition.length > 0) {
|
|
5274
5280
|
n += t + " decomposition {\n";
|
|
5275
5281
|
for (let r of e.decomposition) n += t + " " + N(r.register) + " -> " + (r.component === "composite" ? "rule " + N(r.rule ?? "") : N(r.component) + "." + N(r.componentRegister ?? "")) + "\n";
|
|
@@ -5293,7 +5299,7 @@ function K(e, t, n) {
|
|
|
5293
5299
|
function q(e) {
|
|
5294
5300
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
5295
5301
|
}
|
|
5296
|
-
var
|
|
5302
|
+
var Pi = function(e, t) {
|
|
5297
5303
|
let o = {
|
|
5298
5304
|
id: e,
|
|
5299
5305
|
extends: "",
|
|
@@ -5316,9 +5322,9 @@ var Ni = function(e, t) {
|
|
|
5316
5322
|
if (c >= s.length) break;
|
|
5317
5323
|
if (e === "extends") o.extends = a(s[c++]);
|
|
5318
5324
|
else if (e === "measurand_kind") o.measurandKind = a(s[c++]);
|
|
5319
|
-
else if (e === "measurand") o.measurand =
|
|
5320
|
-
else if (e === "component") o.components.push(
|
|
5321
|
-
else if (e === "structure") o.structure.push(
|
|
5325
|
+
else if (e === "measurand") o.measurand = Fi(i(s[c++]));
|
|
5326
|
+
else if (e === "component") o.components.push(Ii(a(s[c++]), i(s[c++])));
|
|
5327
|
+
else if (e === "structure") o.structure.push(Li(a(s[c++]), i(s[c++])));
|
|
5322
5328
|
else if (e === "definition") o.definition = a(s[c++]);
|
|
5323
5329
|
else if (e === "note") o.note = a(s[c++]);
|
|
5324
5330
|
else if (e === "source") {
|
|
@@ -5335,7 +5341,7 @@ var Ni = function(e, t) {
|
|
|
5335
5341
|
e === "name" ? r.name = a(l[u++]) : e === "definition" ? r.definition = a(l[u++]) : e === "note" ? r.note = a(l[u++]) : e === "source" ? r.source = I(i(l[u++])) : i(l[u++]);
|
|
5336
5342
|
}
|
|
5337
5343
|
o.variants.push(r);
|
|
5338
|
-
} else if (e === "dimension") o.dimensions.push(
|
|
5344
|
+
} else if (e === "dimension") o.dimensions.push(Ri(a(s[c++]), i(s[c++])));
|
|
5339
5345
|
else if (e === "per_channel") o.perChannel = a(s[c++]);
|
|
5340
5346
|
else if (e === "family_criteria") o.familyCriteria = q(s[c++]);
|
|
5341
5347
|
else if (e === "family") {
|
|
@@ -5362,7 +5368,7 @@ var Ni = function(e, t) {
|
|
|
5362
5368
|
if (t >= e.length) break;
|
|
5363
5369
|
n === "dimensions" ? o.familyDefaultDimensions = G(e[t++]) : n === "parameters" ? o.familyDefaultParameters = G(e[t++]) : i(e[t++]);
|
|
5364
5370
|
}
|
|
5365
|
-
} else if (e === "model_group") o.modelGroup =
|
|
5371
|
+
} else if (e === "model_group") o.modelGroup = Vi(i(s[c++]));
|
|
5366
5372
|
else if (e === "reference") o.referenceIds = q(s[c++]);
|
|
5367
5373
|
else if (e === "ref") {
|
|
5368
5374
|
let e = x(s, c, a, i);
|
|
@@ -5374,7 +5380,7 @@ var Ni = function(e, t) {
|
|
|
5374
5380
|
}
|
|
5375
5381
|
return (t) => (t.instruments[e] = o, t);
|
|
5376
5382
|
};
|
|
5377
|
-
function
|
|
5383
|
+
function Fi(e) {
|
|
5378
5384
|
let t = {
|
|
5379
5385
|
kind: "",
|
|
5380
5386
|
description: "",
|
|
@@ -5401,7 +5407,7 @@ function Pi(e) {
|
|
|
5401
5407
|
}
|
|
5402
5408
|
return t;
|
|
5403
5409
|
}
|
|
5404
|
-
function
|
|
5410
|
+
function Ii(e, t) {
|
|
5405
5411
|
let r = {
|
|
5406
5412
|
id: e,
|
|
5407
5413
|
classId: "",
|
|
@@ -5415,7 +5421,7 @@ function Fi(e, t) {
|
|
|
5415
5421
|
}
|
|
5416
5422
|
return r;
|
|
5417
5423
|
}
|
|
5418
|
-
function
|
|
5424
|
+
function Li(e, t) {
|
|
5419
5425
|
let r = {
|
|
5420
5426
|
id: e,
|
|
5421
5427
|
predicate: "",
|
|
@@ -5443,7 +5449,7 @@ function Ii(e, t) {
|
|
|
5443
5449
|
}
|
|
5444
5450
|
return r;
|
|
5445
5451
|
}
|
|
5446
|
-
function
|
|
5452
|
+
function Ri(e, t) {
|
|
5447
5453
|
let r = {
|
|
5448
5454
|
id: e,
|
|
5449
5455
|
label: "",
|
|
@@ -5466,7 +5472,7 @@ function Li(e, t) {
|
|
|
5466
5472
|
} else if (t === "label_separator") r.labelSeparator = a(o[s++]);
|
|
5467
5473
|
else if (t === "description") r.description = a(o[s++]);
|
|
5468
5474
|
else if (t === "reference" || t === "source") r.source = I(i(o[s++]));
|
|
5469
|
-
else if (t === "values") r.values =
|
|
5475
|
+
else if (t === "values") r.values = zi(i(o[s++]));
|
|
5470
5476
|
else if (t === "values_of") r.valuesOf = a(o[s++]);
|
|
5471
5477
|
else if (t === "ref") {
|
|
5472
5478
|
let e = x(o, s, a, i);
|
|
@@ -5475,7 +5481,7 @@ function Li(e, t) {
|
|
|
5475
5481
|
}
|
|
5476
5482
|
return r;
|
|
5477
5483
|
}
|
|
5478
|
-
function
|
|
5484
|
+
function zi(e) {
|
|
5479
5485
|
let t = [], r = n(e), o = 0;
|
|
5480
5486
|
for (; o < r.length;) {
|
|
5481
5487
|
let e = P(r[o++]);
|
|
@@ -5518,7 +5524,7 @@ function Ri(e) {
|
|
|
5518
5524
|
}
|
|
5519
5525
|
return t;
|
|
5520
5526
|
}
|
|
5521
|
-
function
|
|
5527
|
+
function Bi(e, t) {
|
|
5522
5528
|
let n = t + " ", r = t + " ", i = t + "dimension " + e.id + " {\n";
|
|
5523
5529
|
if (e.label && (i += n + "label \"" + s(e.label) + "\"\n"), e.scope && (i += n + "scope " + e.scope + "\n"), e.cardinality && (i += n + "cardinality " + e.cardinality + "\n"), e.labelSeparator && (i += n + "label_separator \"" + s(e.labelSeparator) + "\"\n"), e.description && (i += n + "description \"" + s(e.description) + "\"\n"), i += W("reference", e.source, n), e.valuesOf && (i += n + "values_of " + e.valuesOf + "\n"), e.values.length > 0) {
|
|
5524
5530
|
i += n + "values {\n";
|
|
@@ -5542,7 +5548,7 @@ function zi(e, t) {
|
|
|
5542
5548
|
}
|
|
5543
5549
|
return i += C(e.refs, n, s), i += t + "}\n", i;
|
|
5544
5550
|
}
|
|
5545
|
-
function
|
|
5551
|
+
function Vi(e) {
|
|
5546
5552
|
let t = {
|
|
5547
5553
|
definition: "",
|
|
5548
5554
|
identicalCharacteristics: [],
|
|
@@ -5569,7 +5575,7 @@ function Bi(e) {
|
|
|
5569
5575
|
}
|
|
5570
5576
|
return t;
|
|
5571
5577
|
}
|
|
5572
|
-
var
|
|
5578
|
+
var Hi = function(e) {
|
|
5573
5579
|
let t = "instrument " + e.id + " {\n";
|
|
5574
5580
|
if (e.extends && (t += " extends " + e.extends + "\n"), e.perChannel && (t += " per_channel " + e.perChannel + "\n"), e.measurandKind && (t += " measurand_kind " + e.measurandKind + "\n"), e.measurand) {
|
|
5575
5581
|
let n = e.measurand;
|
|
@@ -5592,7 +5598,7 @@ var Vi = function(e) {
|
|
|
5592
5598
|
let e = " variant " + n.id + " { ";
|
|
5593
5599
|
n.name && (e += "name \"" + s(n.name) + "\" "), e += "definition \"" + s(n.definition) + "\" ", n.note && (e += "note \"" + s(n.note) + "\" "), n.source && (n.source.doc || n.source.clause) && (e += "source { doc \"" + s(n.source.doc) + "\" clause \"" + s(n.source.clause) + "\" } "), t += e + "}\n";
|
|
5594
5600
|
}
|
|
5595
|
-
for (let n of e.dimensions) t +=
|
|
5601
|
+
for (let n of e.dimensions) t += Bi(n, " ");
|
|
5596
5602
|
if ((e.familyMetamodelClass || e.familyDefinition || e.familyNote || e.familySource && (e.familySource.doc || e.familySource.clause)) && (t += " family {\n", e.familyMetamodelClass && (t += " metamodel_class " + e.familyMetamodelClass + "\n"), e.familyDefinition && (t += " definition \"" + s(e.familyDefinition) + "\"\n"), e.familyNote && (t += " note \"" + s(e.familyNote) + "\"\n"), e.familySource && (e.familySource.doc || e.familySource.clause) && (t += E(e.familySource, " ", s)), t += " }\n"), e.familyCriteria.length > 0) {
|
|
5597
5603
|
t += " family_criteria {\n";
|
|
5598
5604
|
for (let n of e.familyCriteria) t += " \"" + s(n) + "\"\n";
|
|
@@ -5607,7 +5613,7 @@ var Vi = function(e) {
|
|
|
5607
5613
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5608
5614
|
for (let e of n) t += E(e, " ", s);
|
|
5609
5615
|
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5610
|
-
},
|
|
5616
|
+
}, Ui = function(e, t) {
|
|
5611
5617
|
let n = {
|
|
5612
5618
|
id: e,
|
|
5613
5619
|
symbol: "",
|
|
@@ -5656,14 +5662,14 @@ var Vi = function(e) {
|
|
|
5656
5662
|
} else s = y(o, s, e);
|
|
5657
5663
|
}
|
|
5658
5664
|
return (t) => (t.attributeDefinitions[e] = n, t);
|
|
5659
|
-
},
|
|
5665
|
+
}, Wi = function(e) {
|
|
5660
5666
|
let t = "attribute_definition " + e.id + " {\n";
|
|
5661
5667
|
e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n");
|
|
5662
5668
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5663
5669
|
for (let e of n) t += E(e, " ", s);
|
|
5664
5670
|
for (let n of e.referenceIds) t += " ref cites \"" + s(n) + "\"\n";
|
|
5665
5671
|
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), e.quantityKind && (t += " quantity_kind " + e.quantityKind + "\n"), e.unit && (t += " unit \"" + s(e.unit) + "\"\n"), e.valueType && (t += " value_type " + e.valueType + "\n"), e.origin && (t += " origin " + e.origin + "\n"), e.scope && (t += " scope " + e.scope + "\n"), e.category && (t += " category " + e.category + "\n"), e.isDimension !== null && e.isDimension !== void 0 && (t += " is_dimension " + (e.isDimension ? "true" : "false") + "\n"), e.enumRef && (t += " enum " + e.enumRef + "\n"), e.enumValues && e.enumValues.length > 0 && (t += " enum_values { " + e.enumValues.map(N).join(" ") + " }\n"), e.irdi && (t += " irdi \"" + s(e.irdi) + "\"\n"), e.derived && (t += " derived \"" + s(e.derived) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += "}\n", t;
|
|
5666
|
-
},
|
|
5672
|
+
}, Gi = function(e, t) {
|
|
5667
5673
|
let n = {
|
|
5668
5674
|
id: e,
|
|
5669
5675
|
label: "",
|
|
@@ -5697,10 +5703,10 @@ var Vi = function(e) {
|
|
|
5697
5703
|
} else s = y(o, s, e);
|
|
5698
5704
|
}
|
|
5699
5705
|
return (t) => (t.capabilities[e] = n, t);
|
|
5700
|
-
},
|
|
5706
|
+
}, Ki = function(e) {
|
|
5701
5707
|
let t = "capability " + e.id + " {\n";
|
|
5702
5708
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.abstract && (t += " abstract true\n"), t += K("extends", e.extends, " "), t += K("requires", e.requires, " "), t += K("has_parameters", e.hasParameters, " "), t += K("satisfies_requirements", e.satisfiesRequirements, " "), t += K("verified_by_tests", e.verifiedByTests, " "), t += K("reference", e.referenceIds, " "), t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
5703
|
-
},
|
|
5709
|
+
}, qi = function(e, t) {
|
|
5704
5710
|
let n = {
|
|
5705
5711
|
id: e,
|
|
5706
5712
|
kind: "",
|
|
@@ -5729,13 +5735,13 @@ var Vi = function(e) {
|
|
|
5729
5735
|
} else s = y(o, s, e);
|
|
5730
5736
|
}
|
|
5731
5737
|
return (t) => (t.behaviors[e] = n, t);
|
|
5732
|
-
},
|
|
5738
|
+
}, Ji = function(e) {
|
|
5733
5739
|
let t = "behavior " + e.id + " {\n";
|
|
5734
5740
|
e.kind && (t += " kind " + e.kind + "\n"), e.stimulus && (t += " stimulus " + e.stimulus + "\n"), e.response && (t += " response \"" + s(e.response) + "\"\n");
|
|
5735
5741
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5736
5742
|
for (let e of n) t += E(e, " ", s);
|
|
5737
5743
|
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += K("verified_by", e.verifiedBy, " "), t += "}\n", t;
|
|
5738
|
-
},
|
|
5744
|
+
}, Yi = function(e, t) {
|
|
5739
5745
|
let n = {
|
|
5740
5746
|
id: e,
|
|
5741
5747
|
role: "",
|
|
@@ -5750,7 +5756,7 @@ var Vi = function(e) {
|
|
|
5750
5756
|
if (e === "role") n.role = a(o[s++]);
|
|
5751
5757
|
else if (e === "subject") n.subject = a(o[s++]);
|
|
5752
5758
|
else if (e === "description") n.description = a(o[s++]);
|
|
5753
|
-
else if (e === "entries") n.entries =
|
|
5759
|
+
else if (e === "entries") n.entries = Xi(i(o[s++]));
|
|
5754
5760
|
else if (e === "source") {
|
|
5755
5761
|
let e = I(i(o[s++]));
|
|
5756
5762
|
n.sources.push(e), n.source ||= e;
|
|
@@ -5767,7 +5773,7 @@ var Vi = function(e) {
|
|
|
5767
5773
|
}
|
|
5768
5774
|
return (t) => (t.conditionSets[e] = n, t);
|
|
5769
5775
|
};
|
|
5770
|
-
function
|
|
5776
|
+
function Xi(e) {
|
|
5771
5777
|
let t = [], r = n(e), o = 0;
|
|
5772
5778
|
for (; o < r.length;) {
|
|
5773
5779
|
let e = P(r[o++]);
|
|
@@ -5790,7 +5796,7 @@ function Yi(e) {
|
|
|
5790
5796
|
}
|
|
5791
5797
|
return t;
|
|
5792
5798
|
}
|
|
5793
|
-
var
|
|
5799
|
+
var Zi = function(e) {
|
|
5794
5800
|
let t = "condition_set " + e.id + " {\n";
|
|
5795
5801
|
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) {
|
|
5796
5802
|
t += " entries {\n";
|
|
@@ -5804,7 +5810,7 @@ var Xi = function(e) {
|
|
|
5804
5810
|
for (let e of n) t += E(e, " ", s);
|
|
5805
5811
|
return t += K("reference", e.referenceIds, " "), t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
5806
5812
|
};
|
|
5807
|
-
function
|
|
5813
|
+
function Qi(e) {
|
|
5808
5814
|
let t = {}, r = n(e), i = 0;
|
|
5809
5815
|
for (; i < r.length;) {
|
|
5810
5816
|
let e = P(r[i++]);
|
|
@@ -5813,7 +5819,7 @@ function Zi(e) {
|
|
|
5813
5819
|
}
|
|
5814
5820
|
return t;
|
|
5815
5821
|
}
|
|
5816
|
-
function
|
|
5822
|
+
function $i(e) {
|
|
5817
5823
|
let t = {}, r = n(e), i = 0;
|
|
5818
5824
|
for (; i < r.length;) {
|
|
5819
5825
|
let e = P(r[i++]);
|
|
@@ -5825,10 +5831,10 @@ function Qi(e) {
|
|
|
5825
5831
|
}
|
|
5826
5832
|
return t;
|
|
5827
5833
|
}
|
|
5828
|
-
function
|
|
5834
|
+
function ea(e) {
|
|
5829
5835
|
return n(e).map(a).filter((e) => e.length > 0);
|
|
5830
5836
|
}
|
|
5831
|
-
function
|
|
5837
|
+
function ta(e) {
|
|
5832
5838
|
let t = {}, r = n(e), o = 0;
|
|
5833
5839
|
for (; o < r.length;) {
|
|
5834
5840
|
let e = P(r[o++]);
|
|
@@ -5840,13 +5846,13 @@ function ea(e) {
|
|
|
5840
5846
|
}
|
|
5841
5847
|
return t;
|
|
5842
5848
|
}
|
|
5843
|
-
function
|
|
5849
|
+
function na(e) {
|
|
5844
5850
|
let t = {}, r = n(e), o = 0;
|
|
5845
5851
|
for (; o < r.length;) {
|
|
5846
5852
|
let e = P(r[o++]);
|
|
5847
5853
|
if (!e) break;
|
|
5848
5854
|
if (o < r.length && r[o].startsWith("{")) {
|
|
5849
|
-
t[e] =
|
|
5855
|
+
t[e] = ra(i(r[o++]));
|
|
5850
5856
|
continue;
|
|
5851
5857
|
}
|
|
5852
5858
|
let n = "", s = "", c = !1;
|
|
@@ -5862,7 +5868,7 @@ function ta(e) {
|
|
|
5862
5868
|
}
|
|
5863
5869
|
return t;
|
|
5864
5870
|
}
|
|
5865
|
-
function
|
|
5871
|
+
function ra(e) {
|
|
5866
5872
|
let t = {
|
|
5867
5873
|
symbol: "",
|
|
5868
5874
|
derivation: ""
|
|
@@ -5878,18 +5884,18 @@ function na(e) {
|
|
|
5878
5884
|
}
|
|
5879
5885
|
return t;
|
|
5880
5886
|
}
|
|
5881
|
-
var
|
|
5882
|
-
function
|
|
5887
|
+
var ia = /* @__PURE__ */ new Set(["state", "behavior"]);
|
|
5888
|
+
function aa(e, t, n) {
|
|
5883
5889
|
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;
|
|
5884
5890
|
}
|
|
5885
|
-
function
|
|
5891
|
+
function oa(e, t, n, r, i) {
|
|
5886
5892
|
let a = P(n);
|
|
5887
5893
|
return e.misplacedAspects.push({
|
|
5888
5894
|
family: t,
|
|
5889
5895
|
aspect: a
|
|
5890
|
-
}), i < r.length && r[i].startsWith("{") ||
|
|
5896
|
+
}), i < r.length && r[i].startsWith("{") || ia.has(a) ? i++ : i = aa(a, r, i), i;
|
|
5891
5897
|
}
|
|
5892
|
-
function
|
|
5898
|
+
function sa(e, t) {
|
|
5893
5899
|
let r = e[t] ?? "";
|
|
5894
5900
|
if (r === "symbolic") return {
|
|
5895
5901
|
level: {
|
|
@@ -5918,7 +5924,7 @@ function oa(e, t) {
|
|
|
5918
5924
|
next: t + 1
|
|
5919
5925
|
};
|
|
5920
5926
|
}
|
|
5921
|
-
function
|
|
5927
|
+
function ca(e) {
|
|
5922
5928
|
let t = [], r = n(e), o = 0;
|
|
5923
5929
|
for (; o < r.length;) {
|
|
5924
5930
|
let e = r[o++];
|
|
@@ -5949,7 +5955,7 @@ function sa(e) {
|
|
|
5949
5955
|
if (l >= c.length) break;
|
|
5950
5956
|
if (e === "target") s.target = a(c[l++]);
|
|
5951
5957
|
else if (e === "level") {
|
|
5952
|
-
let e =
|
|
5958
|
+
let e = sa(c, l);
|
|
5953
5959
|
s.level = e.level, l = e.next;
|
|
5954
5960
|
} else if (e === "conditions") {
|
|
5955
5961
|
let e = M(c, l);
|
|
@@ -5960,53 +5966,53 @@ function sa(e) {
|
|
|
5960
5966
|
}
|
|
5961
5967
|
return t;
|
|
5962
5968
|
}
|
|
5963
|
-
function
|
|
5969
|
+
function la(e) {
|
|
5964
5970
|
return e.id === "" && !e.target && !e.level && !e.conditions && e.verifiedBy.length === 0 && !e.source;
|
|
5965
5971
|
}
|
|
5966
|
-
function
|
|
5972
|
+
function ua(e, t) {
|
|
5967
5973
|
let r = n(e), a = 0;
|
|
5968
5974
|
for (; a < r.length;) {
|
|
5969
5975
|
let e = r[a++];
|
|
5970
5976
|
if (a >= r.length) break;
|
|
5971
|
-
if (e === "metadata") t.is.metadata =
|
|
5972
|
-
else if (e === "provenance") t.is.provenance =
|
|
5973
|
-
else if (e === "structure") t.is.structure =
|
|
5974
|
-
else if (e === "design_parameters") t.is.designParameters =
|
|
5975
|
-
else if (e === "designed_conditions") t.is.designedConditions =
|
|
5976
|
-
else if (e === "promises") t.is.promises =
|
|
5977
|
-
else if (e === "artifacts") t.is.artifacts =
|
|
5977
|
+
if (e === "metadata") t.is.metadata = Qi(i(r[a++]));
|
|
5978
|
+
else if (e === "provenance") t.is.provenance = Qi(i(r[a++]));
|
|
5979
|
+
else if (e === "structure") t.is.structure = ea(i(r[a++]));
|
|
5980
|
+
else if (e === "design_parameters") t.is.designParameters = $i(i(r[a++]));
|
|
5981
|
+
else if (e === "designed_conditions") t.is.designedConditions = Qi(i(r[a++]));
|
|
5982
|
+
else if (e === "promises") t.is.promises = ca(i(r[a++]));
|
|
5983
|
+
else if (e === "artifacts") t.is.artifacts = ea(i(r[a++]));
|
|
5978
5984
|
else if (e === "endpoint") {
|
|
5979
5985
|
let e = P(r[a++] ?? ""), n = a < r.length ? i(r[a++]) : "";
|
|
5980
|
-
e && t.is.endpoints.push(
|
|
5981
|
-
} else e === "composed_of" ? t.is.composedOf =
|
|
5986
|
+
e && t.is.endpoints.push(Ci(e, n));
|
|
5987
|
+
} else e === "composed_of" ? t.is.composedOf = ji(i(r[a++] ?? "")) : a = oa(t, "is", e, r, a);
|
|
5982
5988
|
}
|
|
5983
5989
|
}
|
|
5984
|
-
function
|
|
5990
|
+
function da(e, t) {
|
|
5985
5991
|
let r = n(e), o = 0;
|
|
5986
5992
|
for (; o < r.length;) {
|
|
5987
5993
|
let e = r[o++];
|
|
5988
5994
|
if (o >= r.length) break;
|
|
5989
|
-
if (e === "attributes") t.has.attributes =
|
|
5990
|
-
else if (e === "dimensions") t.has.dimensions =
|
|
5995
|
+
if (e === "attributes") t.has.attributes = $i(i(r[o++]));
|
|
5996
|
+
else if (e === "dimensions") t.has.dimensions = ta(i(r[o++]));
|
|
5991
5997
|
else if (e === "state") t.has.state = a(r[o++]);
|
|
5992
|
-
else if (e === "characteristics") t.has.characteristics =
|
|
5993
|
-
else if (e === "environmental_context") t.has.environmentalContext =
|
|
5994
|
-
else if (e === "artifact_instances") t.has.artifactInstances =
|
|
5998
|
+
else if (e === "characteristics") t.has.characteristics = na(i(r[o++]));
|
|
5999
|
+
else if (e === "environmental_context") t.has.environmentalContext = ea(i(r[o++]));
|
|
6000
|
+
else if (e === "artifact_instances") t.has.artifactInstances = ea(i(r[o++]));
|
|
5995
6001
|
else if (e === "serve") {
|
|
5996
|
-
let e =
|
|
6002
|
+
let e = Ei(r, o);
|
|
5997
6003
|
t.has.serves.push(e.binding), o = e.next;
|
|
5998
|
-
} else o =
|
|
6004
|
+
} else o = oa(t, "has", e, r, o);
|
|
5999
6005
|
}
|
|
6000
6006
|
}
|
|
6001
|
-
function
|
|
6007
|
+
function fa(e, t) {
|
|
6002
6008
|
let r = n(e), i = 0;
|
|
6003
6009
|
for (; i < r.length;) {
|
|
6004
6010
|
let e = r[i++];
|
|
6005
6011
|
if (i >= r.length) break;
|
|
6006
|
-
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i =
|
|
6012
|
+
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i = oa(t, "does", e, r, i);
|
|
6007
6013
|
}
|
|
6008
6014
|
}
|
|
6009
|
-
var
|
|
6015
|
+
var pa = function(e, t) {
|
|
6010
6016
|
let n = {
|
|
6011
6017
|
id: e,
|
|
6012
6018
|
extends: "",
|
|
@@ -6036,11 +6042,11 @@ var fa = function(e, t) {
|
|
|
6036
6042
|
for (; s < o.length;) {
|
|
6037
6043
|
let e = o[s++];
|
|
6038
6044
|
if (s >= o.length) break;
|
|
6039
|
-
e === "extends" ? n.extends = a(o[s++]) : e === "is" ?
|
|
6045
|
+
e === "extends" ? n.extends = a(o[s++]) : e === "is" ? ua(i(o[s++]), n) : e === "has" ? da(i(o[s++]), n) : e === "does" ? fa(i(o[s++]), n) : e === "reference" ? n.referenceIds = q(o[s++]) : s = y(o, s, e);
|
|
6040
6046
|
}
|
|
6041
6047
|
return (t) => (t.subjects[e] = n, t);
|
|
6042
6048
|
};
|
|
6043
|
-
function
|
|
6049
|
+
function ma(e, t) {
|
|
6044
6050
|
return {
|
|
6045
6051
|
id: t.id,
|
|
6046
6052
|
extends: "",
|
|
@@ -6090,34 +6096,34 @@ function pa(e, t) {
|
|
|
6090
6096
|
misplacedAspects: t.misplacedAspects
|
|
6091
6097
|
};
|
|
6092
6098
|
}
|
|
6093
|
-
function
|
|
6099
|
+
function ha(e, t) {
|
|
6094
6100
|
let n = (t, r) => {
|
|
6095
6101
|
let i = t.extends;
|
|
6096
6102
|
if (!i || r.has(i)) return t;
|
|
6097
6103
|
let a = e.subjects[i];
|
|
6098
|
-
return a ? (r.add(i),
|
|
6104
|
+
return a ? (r.add(i), ma(n(a, r), t)) : t;
|
|
6099
6105
|
};
|
|
6100
6106
|
return n(t, /* @__PURE__ */ new Set([t.id]));
|
|
6101
6107
|
}
|
|
6102
|
-
function
|
|
6108
|
+
function ga(e, t) {
|
|
6103
6109
|
let n = Object.keys(t);
|
|
6104
6110
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " " + N(t[e])).join(" ") + " }\n";
|
|
6105
6111
|
}
|
|
6106
|
-
function
|
|
6112
|
+
function _a(e, t) {
|
|
6107
6113
|
let n = Object.keys(t);
|
|
6108
6114
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " :" + (t[e] ? " " + N(t[e]) : "")).join(" ") + " }\n";
|
|
6109
6115
|
}
|
|
6110
|
-
function
|
|
6116
|
+
function va(e, t) {
|
|
6111
6117
|
return t.length === 0 ? "" : " " + e + " { " + t.map(N).join(" ") + " }\n";
|
|
6112
6118
|
}
|
|
6113
|
-
function
|
|
6119
|
+
function ya(e) {
|
|
6114
6120
|
let t = Object.keys(e);
|
|
6115
6121
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " in { " + e[t].join(", ") + " }").join(" ") + " }\n";
|
|
6116
6122
|
}
|
|
6117
|
-
function
|
|
6123
|
+
function ba(e) {
|
|
6118
6124
|
return /^ocl\{[\s\S]*\}$/.test(e) ? e : N(e);
|
|
6119
6125
|
}
|
|
6120
|
-
function
|
|
6126
|
+
function xa(e) {
|
|
6121
6127
|
if (e.kind === "symbolic") return "symbolic " + N(e.symbolic ?? "");
|
|
6122
6128
|
if (e.kind === "range") {
|
|
6123
6129
|
let t = "";
|
|
@@ -6125,104 +6131,104 @@ function ba(e) {
|
|
|
6125
6131
|
}
|
|
6126
6132
|
return xe(e.quantity ?? { value: "" });
|
|
6127
6133
|
}
|
|
6128
|
-
function
|
|
6134
|
+
function Sa(e) {
|
|
6129
6135
|
if (e.length === 0) return "";
|
|
6130
|
-
if (e.every(
|
|
6136
|
+
if (e.every(la)) return " promises { " + e.map((e) => N(e.statement)).join(" ") + " }\n";
|
|
6131
6137
|
let t = " promises {\n";
|
|
6132
6138
|
for (let n of e) {
|
|
6133
|
-
if (
|
|
6139
|
+
if (la(n)) {
|
|
6134
6140
|
t += " " + N(n.statement) + "\n";
|
|
6135
6141
|
continue;
|
|
6136
6142
|
}
|
|
6137
|
-
t += " " + N(n.id) + " {\n", n.target && (t += " target " + N(n.target) + "\n"), n.level && (t += " level " +
|
|
6143
|
+
t += " " + N(n.id) + " {\n", n.target && (t += " target " + N(n.target) + "\n"), n.level && (t += " level " + xa(n.level) + "\n"), n.conditions && (t += " conditions " + ba(n.conditions) + "\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), t += K("verified_by", n.verifiedBy, " "), t += W("source", n.source ?? null, " "), t += " }\n";
|
|
6138
6144
|
}
|
|
6139
6145
|
return t += " }\n", t;
|
|
6140
6146
|
}
|
|
6141
|
-
function
|
|
6147
|
+
function Ca(e) {
|
|
6142
6148
|
let t = Object.keys(e);
|
|
6143
6149
|
if (t.length === 0) return "";
|
|
6144
6150
|
let n = " characteristics {\n";
|
|
6145
6151
|
for (let r of t) {
|
|
6146
6152
|
let t = e[r];
|
|
6147
6153
|
if (t.behavior || t.quantityKind || t.unit || t.source && (t.source.doc || t.source.clause)) {
|
|
6148
|
-
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " +
|
|
6154
|
+
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " + ba(t.derivation) + "\n"), t.behavior && (n += " behavior " + N(t.behavior) + "\n"), t.quantityKind && (n += " quantity_kind " + N(t.quantityKind) + "\n"), t.unit && (n += " unit \"" + s(t.unit) + "\"\n"), n += W("source", t.source ?? null, " "), n += " }\n";
|
|
6149
6155
|
continue;
|
|
6150
6156
|
}
|
|
6151
|
-
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " +
|
|
6157
|
+
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " + ba(t.derivation)), n += "\n";
|
|
6152
6158
|
}
|
|
6153
6159
|
return n += " }\n", n;
|
|
6154
6160
|
}
|
|
6155
|
-
function
|
|
6161
|
+
function wa(e) {
|
|
6156
6162
|
let t = "";
|
|
6157
|
-
for (let n of e) t +=
|
|
6163
|
+
for (let n of e) t += Ti(n, " ");
|
|
6158
6164
|
return t;
|
|
6159
6165
|
}
|
|
6160
|
-
function
|
|
6166
|
+
function Ta(e) {
|
|
6161
6167
|
let t = "";
|
|
6162
|
-
for (let n of e) t +=
|
|
6168
|
+
for (let n of e) t += Di(n, " ");
|
|
6163
6169
|
return t;
|
|
6164
6170
|
}
|
|
6165
|
-
var
|
|
6171
|
+
var Ea = function(e) {
|
|
6166
6172
|
let t = "subject " + e.id + " {\n";
|
|
6167
6173
|
e.extends && (t += " extends " + e.extends + "\n");
|
|
6168
|
-
let n =
|
|
6174
|
+
let n = ga("metadata", e.is.metadata) + ga("provenance", e.is.provenance) + va("structure", e.is.structure) + _a("design_parameters", e.is.designParameters) + ga("designed_conditions", e.is.designedConditions) + Sa(e.is.promises) + va("artifacts", e.is.artifacts) + wa(e.is.endpoints) + (e.is.composedOf ? Ni(e.is.composedOf, " ") : "");
|
|
6169
6175
|
n && (t += " is {\n" + n + " }\n");
|
|
6170
|
-
let r =
|
|
6176
|
+
let r = _a("attributes", e.has.attributes) + ya(e.has.dimensions) + (e.has.state ? " state " + N(e.has.state) + "\n" : "") + Ca(e.has.characteristics) + va("environmental_context", e.has.environmentalContext) + va("artifact_instances", e.has.artifactInstances) + Ta(e.has.serves);
|
|
6171
6177
|
r && (t += " has {\n" + r + " }\n");
|
|
6172
6178
|
let i = "";
|
|
6173
6179
|
for (let t of e.does.behaviors) i += " behavior " + N(t) + "\n";
|
|
6174
6180
|
return i && (t += " does {\n" + i + " }\n"), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6175
|
-
},
|
|
6181
|
+
}, Da = {
|
|
6176
6182
|
keyword: "instrument",
|
|
6177
6183
|
field: "instruments",
|
|
6178
6184
|
takesID: !0,
|
|
6179
|
-
parse:
|
|
6180
|
-
dump:
|
|
6181
|
-
},
|
|
6185
|
+
parse: Pi,
|
|
6186
|
+
dump: Hi
|
|
6187
|
+
}, Oa = {
|
|
6182
6188
|
keyword: "attribute_definition",
|
|
6183
6189
|
field: "attributeDefinitions",
|
|
6184
6190
|
takesID: !0,
|
|
6185
|
-
parse:
|
|
6186
|
-
dump:
|
|
6187
|
-
},
|
|
6191
|
+
parse: Ui,
|
|
6192
|
+
dump: Wi
|
|
6193
|
+
}, ka = {
|
|
6188
6194
|
keyword: "capability",
|
|
6189
6195
|
field: "capabilities",
|
|
6190
6196
|
takesID: !0,
|
|
6191
|
-
parse:
|
|
6192
|
-
dump:
|
|
6193
|
-
},
|
|
6197
|
+
parse: Gi,
|
|
6198
|
+
dump: Ki
|
|
6199
|
+
}, Aa = {
|
|
6194
6200
|
keyword: "behavior",
|
|
6195
6201
|
field: "behaviors",
|
|
6196
6202
|
takesID: !0,
|
|
6197
|
-
parse:
|
|
6198
|
-
dump:
|
|
6199
|
-
},
|
|
6203
|
+
parse: qi,
|
|
6204
|
+
dump: Ji
|
|
6205
|
+
}, ja = {
|
|
6200
6206
|
keyword: "condition_set",
|
|
6201
6207
|
field: "conditionSets",
|
|
6202
6208
|
takesID: !0,
|
|
6203
|
-
parse:
|
|
6204
|
-
dump:
|
|
6205
|
-
},
|
|
6209
|
+
parse: Yi,
|
|
6210
|
+
dump: Zi
|
|
6211
|
+
}, Ma = {
|
|
6206
6212
|
keyword: "subject",
|
|
6207
6213
|
field: "subjects",
|
|
6208
6214
|
takesID: !0,
|
|
6209
|
-
parse:
|
|
6210
|
-
resolve:
|
|
6211
|
-
dump:
|
|
6215
|
+
parse: pa,
|
|
6216
|
+
resolve: ha,
|
|
6217
|
+
dump: Ea
|
|
6212
6218
|
};
|
|
6213
6219
|
//#endregion
|
|
6214
6220
|
//#region src/ser-des/config/instance.ts
|
|
6215
|
-
function
|
|
6221
|
+
function Na(e) {
|
|
6216
6222
|
return !e.startsWith("\"") && e.endsWith(":") && e.length > 1;
|
|
6217
6223
|
}
|
|
6218
|
-
function
|
|
6224
|
+
function Pa(e) {
|
|
6219
6225
|
let t = {}, r = n(e), o = 0;
|
|
6220
6226
|
for (; o < r.length;) {
|
|
6221
6227
|
let e = P(r[o++]);
|
|
6222
6228
|
if (!e) break;
|
|
6223
6229
|
r[o] === ":" && o++;
|
|
6224
6230
|
let n = [];
|
|
6225
|
-
for (; o < r.length && r[o + 1] !== ":" && !
|
|
6231
|
+
for (; o < r.length && r[o + 1] !== ":" && !Na(r[o]);) n.push(r[o++]);
|
|
6226
6232
|
if (n.length === 0) {
|
|
6227
6233
|
t[e] = { value: "" };
|
|
6228
6234
|
continue;
|
|
@@ -6240,7 +6246,7 @@ function Na(e) {
|
|
|
6240
6246
|
}
|
|
6241
6247
|
return t;
|
|
6242
6248
|
}
|
|
6243
|
-
function
|
|
6249
|
+
function Fa(e) {
|
|
6244
6250
|
let t = {}, r = n(e), i = 0;
|
|
6245
6251
|
for (; i < r.length;) {
|
|
6246
6252
|
let e = P(r[i++]);
|
|
@@ -6249,18 +6255,18 @@ function Pa(e) {
|
|
|
6249
6255
|
}
|
|
6250
6256
|
return t;
|
|
6251
6257
|
}
|
|
6252
|
-
function
|
|
6258
|
+
function Ia(e) {
|
|
6253
6259
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
6254
6260
|
}
|
|
6255
|
-
function
|
|
6261
|
+
function La(e, t) {
|
|
6256
6262
|
let r = n(e), a = 0;
|
|
6257
6263
|
for (; a < r.length;) {
|
|
6258
6264
|
let e = r[a++];
|
|
6259
6265
|
if (a >= r.length) break;
|
|
6260
|
-
e === "attributes" ? t.has.attributes =
|
|
6266
|
+
e === "attributes" ? t.has.attributes = Pa(i(r[a++])) : e === "dimensions" ? t.has.dimensions = Fa(i(r[a++])) : e === "test_context" ? t.has.testContext = Pa(i(r[a++])) : i(r[a++]);
|
|
6261
6267
|
}
|
|
6262
6268
|
}
|
|
6263
|
-
var
|
|
6269
|
+
var Ra = function(e, t) {
|
|
6264
6270
|
let n = {
|
|
6265
6271
|
id: e,
|
|
6266
6272
|
of: "",
|
|
@@ -6279,44 +6285,44 @@ var La = function(e, t) {
|
|
|
6279
6285
|
for (; s < o.length;) {
|
|
6280
6286
|
let e = o[s++];
|
|
6281
6287
|
if (s >= o.length) break;
|
|
6282
|
-
e === "of" ? n.of = a(o[s++]) : 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 =
|
|
6288
|
+
e === "of" ? n.of = a(o[s++]) : 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 = Fa(i(o[s++])) : e === "has" ? La(i(o[s++]), n) : e === "reference" ? n.referenceIds = Ia(o[s++]) : i(o[s++]);
|
|
6283
6289
|
}
|
|
6284
6290
|
return (t) => (t.instances[e] = n, t);
|
|
6285
6291
|
};
|
|
6286
|
-
function
|
|
6292
|
+
function za(e, t) {
|
|
6287
6293
|
let n = Object.keys(t);
|
|
6288
6294
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + be(t[e])).join(" ") + " }\n";
|
|
6289
6295
|
}
|
|
6290
|
-
function
|
|
6296
|
+
function Ba(e, t) {
|
|
6291
6297
|
let n = Object.keys(t);
|
|
6292
6298
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + N(t[e])).join(" ") + " }\n";
|
|
6293
6299
|
}
|
|
6294
|
-
var
|
|
6300
|
+
var Va = {
|
|
6295
6301
|
keyword: "instance",
|
|
6296
6302
|
field: "instances",
|
|
6297
6303
|
takesID: !0,
|
|
6298
|
-
parse:
|
|
6304
|
+
parse: Ra,
|
|
6299
6305
|
dump: function(e) {
|
|
6300
6306
|
let t = "instance " + e.id + " {\n";
|
|
6301
6307
|
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");
|
|
6302
6308
|
let n = Object.keys(e.definitionVersions);
|
|
6303
6309
|
n.length > 0 && (t += " definition_versions { " + n.map((t) => t + " : " + N(e.definitionVersions[t])).join(" ") + " }\n");
|
|
6304
|
-
let r =
|
|
6310
|
+
let r = za("attributes", e.has.attributes) + Ba("dimensions", e.has.dimensions) + za("test_context", e.has.testContext);
|
|
6305
6311
|
return r && (t += " has {\n" + r + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
6306
6312
|
}
|
|
6307
6313
|
};
|
|
6308
6314
|
//#endregion
|
|
6309
6315
|
//#region src/ser-des/config/artifact.ts
|
|
6310
|
-
function
|
|
6316
|
+
function Ha(e) {
|
|
6311
6317
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
6312
6318
|
}
|
|
6313
|
-
function
|
|
6319
|
+
function Ua(e, t, n) {
|
|
6314
6320
|
return t.length === 0 ? "" : `${n}${e} { ${t.join(" ")} }\n`;
|
|
6315
6321
|
}
|
|
6316
|
-
function
|
|
6322
|
+
function Wa(e) {
|
|
6317
6323
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
6318
6324
|
}
|
|
6319
|
-
function
|
|
6325
|
+
function Ga(e) {
|
|
6320
6326
|
let t = [], r = n(e), i = 0;
|
|
6321
6327
|
for (; i < r.length;) {
|
|
6322
6328
|
let e = P(r[i++]);
|
|
@@ -6336,7 +6342,7 @@ function Wa(e) {
|
|
|
6336
6342
|
}
|
|
6337
6343
|
return t;
|
|
6338
6344
|
}
|
|
6339
|
-
function
|
|
6345
|
+
function Ka(e) {
|
|
6340
6346
|
let t = [], r = n(e), o = 0;
|
|
6341
6347
|
for (; o < r.length;) {
|
|
6342
6348
|
let e = P(r[o++]);
|
|
@@ -6351,14 +6357,14 @@ function Ga(e) {
|
|
|
6351
6357
|
for (; t < e.length;) {
|
|
6352
6358
|
let n = e[t++];
|
|
6353
6359
|
if (t >= e.length) break;
|
|
6354
|
-
n === "kinds" ? s.kinds =
|
|
6360
|
+
n === "kinds" ? s.kinds = Ha(e[t++]) : n === "role" ? s.role = a(e[t++]) : i(e[t++]);
|
|
6355
6361
|
}
|
|
6356
6362
|
}
|
|
6357
6363
|
t.push(s);
|
|
6358
6364
|
}
|
|
6359
6365
|
return t;
|
|
6360
6366
|
}
|
|
6361
|
-
function
|
|
6367
|
+
function qa(e) {
|
|
6362
6368
|
let t = {
|
|
6363
6369
|
fields: [],
|
|
6364
6370
|
structure: "",
|
|
@@ -6367,11 +6373,11 @@ function Ka(e) {
|
|
|
6367
6373
|
for (; o < r.length;) {
|
|
6368
6374
|
let e = r[o++];
|
|
6369
6375
|
if (o >= r.length) break;
|
|
6370
|
-
e === "fields" ? t.fields =
|
|
6376
|
+
e === "fields" ? t.fields = Ga(i(r[o++])) : e === "structure" ? t.structure = a(r[o++]) : e === "media" ? t.media = Ka(i(r[o++])) : o = y(r, o, e);
|
|
6371
6377
|
}
|
|
6372
6378
|
return t;
|
|
6373
6379
|
}
|
|
6374
|
-
var
|
|
6380
|
+
var Ja = function(e, t) {
|
|
6375
6381
|
let n = {
|
|
6376
6382
|
id: e,
|
|
6377
6383
|
name: "",
|
|
@@ -6391,7 +6397,7 @@ var qa = function(e, t) {
|
|
|
6391
6397
|
if (s >= o.length) break;
|
|
6392
6398
|
if (e === "name") n.name = a(o[s++]);
|
|
6393
6399
|
else if (e === "description") n.description = a(o[s++]);
|
|
6394
|
-
else if (e === "content_contract") n.contentContract =
|
|
6400
|
+
else if (e === "content_contract") n.contentContract = qa(i(o[s++]));
|
|
6395
6401
|
else if (e === "produced_when") {
|
|
6396
6402
|
let e = a(o[s++] ?? "");
|
|
6397
6403
|
n.producedWhen = e === "per_interval" ? {
|
|
@@ -6405,7 +6411,7 @@ var qa = function(e, t) {
|
|
|
6405
6411
|
else if (e === "source") {
|
|
6406
6412
|
let e = I(i(o[s++]));
|
|
6407
6413
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
6408
|
-
} else if (e === "reference") n.referenceIds =
|
|
6414
|
+
} else if (e === "reference") n.referenceIds = Wa(o[s++]);
|
|
6409
6415
|
else if (e === "ref") {
|
|
6410
6416
|
let e = x(o, s, a, i);
|
|
6411
6417
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
@@ -6416,10 +6422,10 @@ var qa = function(e, t) {
|
|
|
6416
6422
|
}
|
|
6417
6423
|
return (t) => (t.artifactDefinitions[e] = n, t);
|
|
6418
6424
|
};
|
|
6419
|
-
function
|
|
6425
|
+
function Ya(e) {
|
|
6420
6426
|
return e.kind === "per_interval" ? `per_interval ${N(e.interval ?? "")}` : e.kind === "on_event" ? `on_event ${N(e.event ?? "")}` : e.kind;
|
|
6421
6427
|
}
|
|
6422
|
-
var
|
|
6428
|
+
var Xa = function(e) {
|
|
6423
6429
|
let t = "artifact_definition " + e.id + " {\n";
|
|
6424
6430
|
e.name && (t += " name \"" + s(e.name) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n");
|
|
6425
6431
|
let n = e.contentContract;
|
|
@@ -6439,11 +6445,11 @@ var Ya = function(e) {
|
|
|
6439
6445
|
}
|
|
6440
6446
|
t += " }\n";
|
|
6441
6447
|
}
|
|
6442
|
-
e.producedWhen.kind && (t += " produced_when " +
|
|
6448
|
+
e.producedWhen.kind && (t += " produced_when " + Ya(e.producedWhen) + "\n"), e.retention && (t += " retention \"" + s(e.retention) + "\"\n");
|
|
6443
6449
|
let r = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
6444
6450
|
for (let e of r) t += E(e, " ", s);
|
|
6445
|
-
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t +=
|
|
6446
|
-
},
|
|
6451
|
+
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += Ua("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6452
|
+
}, Za = function(e, t) {
|
|
6447
6453
|
let n = {
|
|
6448
6454
|
id: e,
|
|
6449
6455
|
of: "",
|
|
@@ -6456,34 +6462,34 @@ var Ya = function(e) {
|
|
|
6456
6462
|
for (; s < o.length;) {
|
|
6457
6463
|
let e = o[s++];
|
|
6458
6464
|
if (s >= o.length) break;
|
|
6459
|
-
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 =
|
|
6465
|
+
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 = Pa(i(o[s++])) : e === "links" ? n.links = Ha(o[s++]) : e === "reference" ? n.referenceIds = Wa(o[s++]) : s = y(o, s, e);
|
|
6460
6466
|
}
|
|
6461
6467
|
return (t) => (t.artifactInstances[e] = n, t);
|
|
6462
|
-
},
|
|
6468
|
+
}, Qa = function(e) {
|
|
6463
6469
|
let t = "artifact_instance " + e.id + " {\n";
|
|
6464
6470
|
e.of && (t += " of " + e.of + "\n"), e.producedAt && (t += " produced_at " + N(e.producedAt) + "\n"), e.by && (t += " by " + N(e.by) + "\n");
|
|
6465
6471
|
let n = Object.keys(e.content);
|
|
6466
|
-
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + be(e.content[t])).join(" ") + " }\n"), t +=
|
|
6467
|
-
},
|
|
6472
|
+
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + be(e.content[t])).join(" ") + " }\n"), t += Ua("links", e.links, " "), t += Ua("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6473
|
+
}, $a = {
|
|
6468
6474
|
keyword: "artifact_definition",
|
|
6469
6475
|
field: "artifactDefinitions",
|
|
6470
6476
|
takesID: !0,
|
|
6471
|
-
parse:
|
|
6472
|
-
dump:
|
|
6473
|
-
},
|
|
6477
|
+
parse: Ja,
|
|
6478
|
+
dump: Xa
|
|
6479
|
+
}, eo = {
|
|
6474
6480
|
keyword: "artifact_instance",
|
|
6475
6481
|
field: "artifactInstances",
|
|
6476
6482
|
takesID: !0,
|
|
6477
|
-
parse:
|
|
6478
|
-
dump:
|
|
6479
|
-
},
|
|
6480
|
-
function
|
|
6483
|
+
parse: Za,
|
|
6484
|
+
dump: Qa
|
|
6485
|
+
}, to = F;
|
|
6486
|
+
function no(e, t) {
|
|
6481
6487
|
let n = e[t] ?? "";
|
|
6482
6488
|
if (n.startsWith("{")) return {
|
|
6483
6489
|
selector: {
|
|
6484
6490
|
kind: "refs",
|
|
6485
6491
|
expression: "",
|
|
6486
|
-
refs:
|
|
6492
|
+
refs: to(n)
|
|
6487
6493
|
},
|
|
6488
6494
|
next: t + 1
|
|
6489
6495
|
};
|
|
@@ -6508,7 +6514,7 @@ function to(e, t) {
|
|
|
6508
6514
|
next: t + 1
|
|
6509
6515
|
};
|
|
6510
6516
|
}
|
|
6511
|
-
function
|
|
6517
|
+
function ro(e) {
|
|
6512
6518
|
let t = [], n = se(e), r = 0;
|
|
6513
6519
|
for (; r < n.length;) {
|
|
6514
6520
|
let e = n[r++];
|
|
@@ -6540,7 +6546,7 @@ function no(e) {
|
|
|
6540
6546
|
}
|
|
6541
6547
|
return t;
|
|
6542
6548
|
}
|
|
6543
|
-
function
|
|
6549
|
+
function io(e) {
|
|
6544
6550
|
let t = {
|
|
6545
6551
|
requirements: {
|
|
6546
6552
|
kind: "",
|
|
@@ -6556,13 +6562,13 @@ function ro(e) {
|
|
|
6556
6562
|
for (; r < n.length;) {
|
|
6557
6563
|
let e = n[r++];
|
|
6558
6564
|
if (e === "requirements" || e === "promises") {
|
|
6559
|
-
let i =
|
|
6565
|
+
let i = no(n, r);
|
|
6560
6566
|
t[e] = i.selector, r = i.next;
|
|
6561
6567
|
}
|
|
6562
6568
|
}
|
|
6563
6569
|
return t;
|
|
6564
6570
|
}
|
|
6565
|
-
function
|
|
6571
|
+
function ao(e) {
|
|
6566
6572
|
let t = [], n = se(e), r = 0;
|
|
6567
6573
|
for (; r < n.length;) {
|
|
6568
6574
|
let e = n[r++];
|
|
@@ -6576,7 +6582,7 @@ function io(e) {
|
|
|
6576
6582
|
}
|
|
6577
6583
|
return t;
|
|
6578
6584
|
}
|
|
6579
|
-
function
|
|
6585
|
+
function oo(e) {
|
|
6580
6586
|
let t = [], n = se(e), r = 0;
|
|
6581
6587
|
for (; r < n.length;) {
|
|
6582
6588
|
let e = n[r++];
|
|
@@ -6590,7 +6596,7 @@ function ao(e) {
|
|
|
6590
6596
|
}
|
|
6591
6597
|
return t;
|
|
6592
6598
|
}
|
|
6593
|
-
function
|
|
6599
|
+
function so(e) {
|
|
6594
6600
|
let t = [], n = r(e), o = 0;
|
|
6595
6601
|
for (; o < n.length;) {
|
|
6596
6602
|
if (n[o++] !== "on") continue;
|
|
@@ -6598,7 +6604,7 @@ function oo(e) {
|
|
|
6598
6604
|
if (o < n.length && n[o].startsWith("{")) {
|
|
6599
6605
|
t.push({
|
|
6600
6606
|
outcome: e,
|
|
6601
|
-
actions:
|
|
6607
|
+
actions: oo(i(n[o++]))
|
|
6602
6608
|
});
|
|
6603
6609
|
continue;
|
|
6604
6610
|
}
|
|
@@ -6620,7 +6626,7 @@ function oo(e) {
|
|
|
6620
6626
|
}
|
|
6621
6627
|
return t;
|
|
6622
6628
|
}
|
|
6623
|
-
var
|
|
6629
|
+
var co = function(e, t) {
|
|
6624
6630
|
let n = {
|
|
6625
6631
|
id: e,
|
|
6626
6632
|
over: [],
|
|
@@ -6642,12 +6648,12 @@ var so = function(e, t) {
|
|
|
6642
6648
|
referenceIds: []
|
|
6643
6649
|
};
|
|
6644
6650
|
return v(t, (e, t) => {
|
|
6645
|
-
if (e === "over") n.over =
|
|
6646
|
-
else if (e === "triggers") n.triggers =
|
|
6647
|
-
else if (e === "evaluate") n.evaluate =
|
|
6648
|
-
else if (e === "emit") n.emit =
|
|
6649
|
-
else if (e === "escalate") n.escalate =
|
|
6650
|
-
else if (e === "reference") n.referenceIds =
|
|
6651
|
+
if (e === "over") n.over = to(t());
|
|
6652
|
+
else if (e === "triggers") n.triggers = ro(i(t()));
|
|
6653
|
+
else if (e === "evaluate") n.evaluate = io(i(t()));
|
|
6654
|
+
else if (e === "emit") n.emit = ao(i(t()));
|
|
6655
|
+
else if (e === "escalate") n.escalate = so(i(t()));
|
|
6656
|
+
else if (e === "reference") n.referenceIds = to(t());
|
|
6651
6657
|
else return !1;
|
|
6652
6658
|
return !0;
|
|
6653
6659
|
}, {
|
|
@@ -6655,46 +6661,46 @@ var so = function(e, t) {
|
|
|
6655
6661
|
id: e
|
|
6656
6662
|
}), (t) => (t.monitors[e] = n, t);
|
|
6657
6663
|
};
|
|
6658
|
-
function
|
|
6664
|
+
function lo(e) {
|
|
6659
6665
|
return e.kind === "timer" ? "every " + N(e.every) : e.kind === "signal" ? "on signal " + N(e.signal) : e.kind === "change" ? "on change " + N(e.aspect) : "on " + N(e.kind);
|
|
6660
6666
|
}
|
|
6661
|
-
function
|
|
6667
|
+
function uo(e) {
|
|
6662
6668
|
return e.kind === "applicable_to" ? "applicable_to(" + e.expression + ")" : e.kind === "refs" ? "{ " + e.refs.map(N).join(" ") + " }" : N(e.kind);
|
|
6663
6669
|
}
|
|
6664
|
-
function
|
|
6670
|
+
function fo(e) {
|
|
6665
6671
|
let t = e.actions.map((e) => e.action === "notify" ? "notify " + N(e.role) : N(e.action)).join(" ");
|
|
6666
6672
|
return "on " + N(e.outcome) + " { " + t + " }";
|
|
6667
6673
|
}
|
|
6668
|
-
var
|
|
6674
|
+
var po = {
|
|
6669
6675
|
keyword: "monitor",
|
|
6670
6676
|
field: "monitors",
|
|
6671
6677
|
takesID: !0,
|
|
6672
|
-
parse:
|
|
6678
|
+
parse: co,
|
|
6673
6679
|
dump: function(e) {
|
|
6674
6680
|
let t = "monitor " + e.id + " {\n";
|
|
6675
|
-
e.over.length > 0 && (t += " over { " + e.over.map(N).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(
|
|
6681
|
+
e.over.length > 0 && (t += " over { " + e.over.map(N).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(lo).join(" ") + " }\n");
|
|
6676
6682
|
let n = e.evaluate.requirements, r = e.evaluate.promises;
|
|
6677
|
-
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " +
|
|
6683
|
+
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " + uo(n)), r.kind && (t += " promises " + uo(r)), t += " }\n"), e.emit.length > 0 && (t += " emit { " + e.emit.map((e) => e.stream + " -> " + N(e.target)).join(" ") + " }\n"), e.escalate.length > 0 && (t += " escalate { " + e.escalate.map(fo).join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(N).join(" ") + " }\n"), t += "}\n", t;
|
|
6678
6684
|
}
|
|
6679
|
-
},
|
|
6685
|
+
}, mo = [
|
|
6680
6686
|
"identity",
|
|
6681
6687
|
"composition",
|
|
6682
6688
|
"promises_as_verified",
|
|
6683
6689
|
"live_compliance_status",
|
|
6684
6690
|
"artifacts",
|
|
6685
6691
|
"sustainability"
|
|
6686
|
-
],
|
|
6692
|
+
], ho = [
|
|
6687
6693
|
"public",
|
|
6688
6694
|
"restricted",
|
|
6689
6695
|
"authority"
|
|
6690
|
-
],
|
|
6696
|
+
], go = [
|
|
6691
6697
|
"model",
|
|
6692
6698
|
"batch",
|
|
6693
6699
|
"item"
|
|
6694
6700
|
];
|
|
6695
6701
|
//#endregion
|
|
6696
6702
|
//#region src/ser-des/config/passport.ts
|
|
6697
|
-
function
|
|
6703
|
+
function _o(e, t) {
|
|
6698
6704
|
return F(t).map((t) => {
|
|
6699
6705
|
let n = t.indexOf(".");
|
|
6700
6706
|
return n === -1 ? {
|
|
@@ -6708,7 +6714,7 @@ function go(e, t) {
|
|
|
6708
6714
|
};
|
|
6709
6715
|
});
|
|
6710
6716
|
}
|
|
6711
|
-
var
|
|
6717
|
+
var vo = function(e, t) {
|
|
6712
6718
|
let n = {
|
|
6713
6719
|
id: e,
|
|
6714
6720
|
upi: {
|
|
@@ -6747,8 +6753,8 @@ var _o = function(e, t) {
|
|
|
6747
6753
|
} else if (t === "reference") n.referenceIds = F(r());
|
|
6748
6754
|
else {
|
|
6749
6755
|
let i = r();
|
|
6750
|
-
if (
|
|
6751
|
-
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${
|
|
6756
|
+
if (ho.includes(t)) n.entries.push(..._o(t, i));
|
|
6757
|
+
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${ho.join(" | ")} (fail-closed: an unknown access class is never served)`);
|
|
6752
6758
|
}
|
|
6753
6759
|
return !0;
|
|
6754
6760
|
}, {
|
|
@@ -6756,26 +6762,26 @@ var _o = function(e, t) {
|
|
|
6756
6762
|
id: e
|
|
6757
6763
|
}), (t) => (t.passports[e] = n, t);
|
|
6758
6764
|
};
|
|
6759
|
-
function
|
|
6765
|
+
function yo(e) {
|
|
6760
6766
|
return N(e.ref === "" ? e.contentClass : e.contentClass + "." + e.ref);
|
|
6761
6767
|
}
|
|
6762
|
-
var
|
|
6768
|
+
var bo = {
|
|
6763
6769
|
keyword: "passport",
|
|
6764
6770
|
field: "passports",
|
|
6765
6771
|
takesID: !0,
|
|
6766
|
-
parse:
|
|
6772
|
+
parse: vo,
|
|
6767
6773
|
dump: function(e) {
|
|
6768
6774
|
let t = "passport " + e.id + " {\n";
|
|
6769
6775
|
(e.upi.pattern !== "" || e.upi.level !== "") && (t += " upi {", e.upi.pattern !== "" && (t += " pattern " + N(e.upi.pattern)), e.upi.level !== "" && (t += " level " + N(e.upi.level)), t += " }\n");
|
|
6770
6776
|
for (let n of e.carriers) t += " carrier { kind " + N(n.kind) + " payload " + N(n.payload) + " }\n";
|
|
6771
|
-
let n = [...
|
|
6777
|
+
let n = [...ho, ...[...new Set(e.entries.map((e) => e.access))].filter((e) => !ho.includes(e))];
|
|
6772
6778
|
for (let r of n) {
|
|
6773
6779
|
let n = e.entries.filter((e) => e.access === r);
|
|
6774
|
-
n.length > 0 && (t += " " + r + " { " + n.map(
|
|
6780
|
+
n.length > 0 && (t += " " + r + " { " + n.map(yo).join(" ") + " }\n");
|
|
6775
6781
|
}
|
|
6776
6782
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(N).join(" ") + " }\n"), t += "}\n", t;
|
|
6777
6783
|
}
|
|
6778
|
-
},
|
|
6784
|
+
}, xo = {
|
|
6779
6785
|
keyword: "invariant",
|
|
6780
6786
|
field: "invariants",
|
|
6781
6787
|
takesID: !0,
|
|
@@ -6815,7 +6821,7 @@ var yo = {
|
|
|
6815
6821
|
};
|
|
6816
6822
|
//#endregion
|
|
6817
6823
|
//#region src/ser-des/config/testSequence.ts
|
|
6818
|
-
function
|
|
6824
|
+
function So(e, t, n) {
|
|
6819
6825
|
v(e, (e, n) => {
|
|
6820
6826
|
if (e === "test") t.test = a(n());
|
|
6821
6827
|
else if (e === "phase") t.phase = a(n());
|
|
@@ -6828,7 +6834,7 @@ function xo(e, t, n) {
|
|
|
6828
6834
|
id: n
|
|
6829
6835
|
});
|
|
6830
6836
|
}
|
|
6831
|
-
var
|
|
6837
|
+
var Co = {
|
|
6832
6838
|
keyword: "test_sequence",
|
|
6833
6839
|
field: "testSequences",
|
|
6834
6840
|
takesID: !0,
|
|
@@ -6862,7 +6868,7 @@ var So = {
|
|
|
6862
6868
|
role: "",
|
|
6863
6869
|
dependsOn: null
|
|
6864
6870
|
}, r = o[s++];
|
|
6865
|
-
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") &&
|
|
6871
|
+
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") && So(i(r), t, e), n.steps.push(t);
|
|
6866
6872
|
} else s++;
|
|
6867
6873
|
}
|
|
6868
6874
|
return (t) => (t.testSequences[e] = n, t);
|
|
@@ -6876,7 +6882,7 @@ var So = {
|
|
|
6876
6882
|
for (let n of e.sourceRefs) t += E(n, " ", s);
|
|
6877
6883
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
6878
6884
|
}
|
|
6879
|
-
},
|
|
6885
|
+
}, wo = {
|
|
6880
6886
|
keyword: "formulas_used",
|
|
6881
6887
|
field: "formulasUsed",
|
|
6882
6888
|
takesID: !0,
|
|
@@ -6911,7 +6917,7 @@ var So = {
|
|
|
6911
6917
|
for (let n of e.sourceRefs) t += E(n, " ", s);
|
|
6912
6918
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
6913
6919
|
}
|
|
6914
|
-
},
|
|
6920
|
+
}, To = function(e, t) {
|
|
6915
6921
|
let n = {
|
|
6916
6922
|
id: e,
|
|
6917
6923
|
entries: []
|
|
@@ -6940,14 +6946,14 @@ var So = {
|
|
|
6940
6946
|
let r = t.texts[e];
|
|
6941
6947
|
return r ? r.entries.push(...n.entries) : t.texts[e] = n, t;
|
|
6942
6948
|
};
|
|
6943
|
-
},
|
|
6949
|
+
}, Eo = function(e) {
|
|
6944
6950
|
let t = "text " + e.id + " {\n";
|
|
6945
6951
|
for (let n of e.entries) t += " spell " + n.spelling + (n.via ? " via " + n.via : "") + " \"" + s(n.value) + "\"\n";
|
|
6946
6952
|
return t += "}\n", t;
|
|
6947
6953
|
};
|
|
6948
6954
|
//#endregion
|
|
6949
6955
|
//#region src/ser-des/config/quantityRegister.ts
|
|
6950
|
-
function
|
|
6956
|
+
function Do(e) {
|
|
6951
6957
|
let t = {}, r = n(e);
|
|
6952
6958
|
for (let e = 0; e + 1 < r.length; e += 2) {
|
|
6953
6959
|
let n = P(r[e]), i = Number(r[e + 1]);
|
|
@@ -6955,11 +6961,11 @@ function Eo(e) {
|
|
|
6955
6961
|
}
|
|
6956
6962
|
return t;
|
|
6957
6963
|
}
|
|
6958
|
-
function
|
|
6964
|
+
function Oo(e, t) {
|
|
6959
6965
|
let n = Number(a(e));
|
|
6960
6966
|
return Number.isNaN(n) ? t : n;
|
|
6961
6967
|
}
|
|
6962
|
-
function
|
|
6968
|
+
function ko(e, t) {
|
|
6963
6969
|
let r = {
|
|
6964
6970
|
id: e,
|
|
6965
6971
|
dimensions: {},
|
|
@@ -6969,7 +6975,7 @@ function Oo(e, t) {
|
|
|
6969
6975
|
for (; s < o.length;) {
|
|
6970
6976
|
let e = o[s++];
|
|
6971
6977
|
if (s >= o.length) break;
|
|
6972
|
-
if (e === "dimensions") r.dimensions =
|
|
6978
|
+
if (e === "dimensions") r.dimensions = Do(i(o[s++]));
|
|
6973
6979
|
else if (e === "si_unit") r.siUnit = a(o[s++]);
|
|
6974
6980
|
else if (e === "description") r.description = a(o[s++]);
|
|
6975
6981
|
else if (e === "corresponds") {
|
|
@@ -6979,7 +6985,7 @@ function Oo(e, t) {
|
|
|
6979
6985
|
}
|
|
6980
6986
|
return r;
|
|
6981
6987
|
}
|
|
6982
|
-
function
|
|
6988
|
+
function Ao(e, t) {
|
|
6983
6989
|
let r = {
|
|
6984
6990
|
id: e,
|
|
6985
6991
|
symbol: "",
|
|
@@ -6995,8 +7001,8 @@ function ko(e, t) {
|
|
|
6995
7001
|
if (e === "symbol") r.symbol = a(o[s++]);
|
|
6996
7002
|
else if (e === "label") r.label = a(o[s++]);
|
|
6997
7003
|
else if (e === "kind") r.kind = a(o[s++]);
|
|
6998
|
-
else if (e === "factor") r.factorToSI =
|
|
6999
|
-
else if (e === "offset") r.offsetToSI =
|
|
7004
|
+
else if (e === "factor") r.factorToSI = Oo(o[s++], 1);
|
|
7005
|
+
else if (e === "offset") r.offsetToSI = Oo(o[s++], 0);
|
|
7000
7006
|
else if (e === "definition") r.definition = a(o[s++]);
|
|
7001
7007
|
else if (e === "corresponds") {
|
|
7002
7008
|
let { corr: e, next: t } = D(o, s, a);
|
|
@@ -7005,7 +7011,7 @@ function ko(e, t) {
|
|
|
7005
7011
|
}
|
|
7006
7012
|
return r;
|
|
7007
7013
|
}
|
|
7008
|
-
var
|
|
7014
|
+
var jo = function(e, t) {
|
|
7009
7015
|
let o = {
|
|
7010
7016
|
id: e,
|
|
7011
7017
|
kinds: [],
|
|
@@ -7015,11 +7021,11 @@ var Ao = function(e, t) {
|
|
|
7015
7021
|
for (; c < s.length;) {
|
|
7016
7022
|
let e = s[c++];
|
|
7017
7023
|
if (c >= s.length) break;
|
|
7018
|
-
e === "kind" ? o.kinds.push(
|
|
7024
|
+
e === "kind" ? o.kinds.push(ko(P(s[c++]), i(s[c++]))) : e === "unit" ? o.units.push(Ao(P(s[c++]), i(s[c++]))) : e === "reference" ? o.referenceIds = n(a(s[c++])).map(a).filter((e) => e.length > 0) : i(s[c++]);
|
|
7019
7025
|
}
|
|
7020
7026
|
return (t) => (t.quantityRegisters[e] = o, t);
|
|
7021
7027
|
};
|
|
7022
|
-
function
|
|
7028
|
+
function Mo(e) {
|
|
7023
7029
|
let t = "";
|
|
7024
7030
|
for (let n of e ?? []) if (t += " corresponds " + N(n.scheme) + " \"" + s(n.concept) + "\"", n.projections.length > 0) {
|
|
7025
7031
|
t += " {";
|
|
@@ -7032,28 +7038,28 @@ function jo(e) {
|
|
|
7032
7038
|
}
|
|
7033
7039
|
return t;
|
|
7034
7040
|
}
|
|
7035
|
-
function
|
|
7041
|
+
function No(e) {
|
|
7036
7042
|
let t = Object.keys(e);
|
|
7037
7043
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " " + e[t]).join(" ") + " }";
|
|
7038
7044
|
}
|
|
7039
|
-
var
|
|
7045
|
+
var Po = {
|
|
7040
7046
|
keyword: "quantity_register",
|
|
7041
7047
|
field: "quantityRegisters",
|
|
7042
7048
|
takesID: !0,
|
|
7043
|
-
parse:
|
|
7049
|
+
parse: jo,
|
|
7044
7050
|
dump: function(e) {
|
|
7045
7051
|
let t = "quantity_register " + e.id + " {\n";
|
|
7046
7052
|
for (let n of e.kinds) {
|
|
7047
|
-
let e = " kind " + n.id + " {" +
|
|
7048
|
-
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e +=
|
|
7053
|
+
let e = " kind " + n.id + " {" + No(n.dimensions);
|
|
7054
|
+
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e += Mo(n.correspondences), t += e + " }\n";
|
|
7049
7055
|
}
|
|
7050
7056
|
for (let n of e.units) {
|
|
7051
7057
|
let e = " unit " + N(n.id) + " {";
|
|
7052
|
-
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 +=
|
|
7058
|
+
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 += Mo(n.correspondences), t += e + " }\n";
|
|
7053
7059
|
}
|
|
7054
7060
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
7055
7061
|
}
|
|
7056
|
-
},
|
|
7062
|
+
}, Fo = {
|
|
7057
7063
|
keyword: "dual",
|
|
7058
7064
|
field: "duals",
|
|
7059
7065
|
takesID: !0,
|
|
@@ -7077,18 +7083,18 @@ var No = {
|
|
|
7077
7083
|
};
|
|
7078
7084
|
//#endregion
|
|
7079
7085
|
//#region src/ser-des/config/trustRef.ts
|
|
7080
|
-
function
|
|
7086
|
+
function Io(e, t, n) {
|
|
7081
7087
|
let r = {
|
|
7082
7088
|
org: n(e()),
|
|
7083
7089
|
kid: ""
|
|
7084
7090
|
};
|
|
7085
7091
|
return t() === "key" && (e(), r.kid = n(e())), r;
|
|
7086
7092
|
}
|
|
7087
|
-
function
|
|
7093
|
+
function Lo(e, t, n) {
|
|
7088
7094
|
let r = `${t}trust_ref ${n(e.org)}`;
|
|
7089
7095
|
return e.kid !== "" && (r += ` key ${n(e.kid)}`), r + "\n";
|
|
7090
7096
|
}
|
|
7091
|
-
var
|
|
7097
|
+
var Ro = {
|
|
7092
7098
|
keyword: "dataspace",
|
|
7093
7099
|
field: "dataspaces",
|
|
7094
7100
|
takesID: !0,
|
|
@@ -7153,7 +7159,7 @@ var Lo = {
|
|
|
7153
7159
|
description: ""
|
|
7154
7160
|
}, o = r();
|
|
7155
7161
|
o && o.startsWith("{") && v(i(t()), (t, n, r) => {
|
|
7156
|
-
if (t === "trust_ref") e.trustRef =
|
|
7162
|
+
if (t === "trust_ref") e.trustRef = Io(n, r, a);
|
|
7157
7163
|
else if (t === "role") e.role = a(n());
|
|
7158
7164
|
else if (t === "description") e.description = b(n);
|
|
7159
7165
|
else return !1;
|
|
@@ -7183,17 +7189,17 @@ var Lo = {
|
|
|
7183
7189
|
for (let n of e.participantClasses) t += " participant_class " + N(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7184
7190
|
for (let n of e.artifactClasses) t += " artifact_class " + N(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.element && (t += " element " + N(n.element) + "\n"), n.policy && (t += " policy " + N(n.policy) + "\n"), t += " }\n";
|
|
7185
7191
|
e.policies.length > 0 && (t += " policies { " + e.policies.map(N).join(" ") + " }\n"), e.defaultPolicy && (t += " default_policy " + N(e.defaultPolicy) + "\n");
|
|
7186
|
-
for (let n of e.trustAnchors) t += " trust_anchor " + N(n.id) + " {\n", n.trustRef && (t +=
|
|
7192
|
+
for (let n of e.trustAnchors) t += " trust_anchor " + N(n.id) + " {\n", n.trustRef && (t += Lo(n.trustRef, " ", N)), n.role && (t += " role " + N(n.role) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7187
7193
|
e.compatibleWith.length > 0 && (t += " compatible_with { " + e.compatibleWith.map(N).join(" ") + " }\n");
|
|
7188
7194
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
7189
7195
|
for (let e of n) t += E(e, " ", s);
|
|
7190
7196
|
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7191
7197
|
}
|
|
7192
|
-
},
|
|
7198
|
+
}, zo = [
|
|
7193
7199
|
"permission",
|
|
7194
7200
|
"obligation",
|
|
7195
7201
|
"prohibition"
|
|
7196
|
-
],
|
|
7202
|
+
], Bo = {
|
|
7197
7203
|
keyword: "policy",
|
|
7198
7204
|
field: "policies",
|
|
7199
7205
|
takesID: !0,
|
|
@@ -7227,7 +7233,7 @@ var Lo = {
|
|
|
7227
7233
|
t && t.startsWith("{") && v(i(r()), (t, n) => {
|
|
7228
7234
|
if (t === "kind") {
|
|
7229
7235
|
let t = a(n());
|
|
7230
|
-
if (!
|
|
7236
|
+
if (!zo.includes(t)) throw Error(`Parsing error: policy.rule. ID ${e.id}: unknown rule kind "${t}" — rule kinds are ${zo.join(" | ")} (fail-closed: a misspelt kind never parses into a rule that says nothing)`);
|
|
7231
7237
|
e.kind = t;
|
|
7232
7238
|
} else if (t === "action") e.action = a(n());
|
|
7233
7239
|
else if (t === "artifact") e.artifact = a(n());
|
|
@@ -7264,18 +7270,18 @@ var Lo = {
|
|
|
7264
7270
|
for (let e of n) t += E(e, " ", s);
|
|
7265
7271
|
return t += C(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7266
7272
|
}
|
|
7267
|
-
},
|
|
7273
|
+
}, Vo = {
|
|
7268
7274
|
keyword: "dimension",
|
|
7269
7275
|
field: "dimensions",
|
|
7270
7276
|
takesID: !0,
|
|
7271
7277
|
parse: function(e, t) {
|
|
7272
|
-
let n =
|
|
7278
|
+
let n = Ri(e, i(t));
|
|
7273
7279
|
return (t) => (t.dimensions[e] = n, t);
|
|
7274
7280
|
},
|
|
7275
7281
|
dump: function(e) {
|
|
7276
|
-
return
|
|
7282
|
+
return Bi(e, "");
|
|
7277
7283
|
}
|
|
7278
|
-
},
|
|
7284
|
+
}, Ho = (e, t) => {
|
|
7279
7285
|
let n = {
|
|
7280
7286
|
id: e,
|
|
7281
7287
|
label: "",
|
|
@@ -7294,7 +7300,7 @@ var Lo = {
|
|
|
7294
7300
|
construct: "activity_archetype",
|
|
7295
7301
|
id: e
|
|
7296
7302
|
}), (t) => (t.activityArchetypes[e] = n, t);
|
|
7297
|
-
},
|
|
7303
|
+
}, Uo = function(e) {
|
|
7298
7304
|
let t = "activity_archetype " + e.id + " {\n";
|
|
7299
7305
|
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 " + N(e.parent) + "\n"), t += "}\n", t;
|
|
7300
7306
|
};
|
|
@@ -7303,7 +7309,7 @@ var Lo = {
|
|
|
7303
7309
|
function J(e) {
|
|
7304
7310
|
return e;
|
|
7305
7311
|
}
|
|
7306
|
-
var
|
|
7312
|
+
var Wo = [
|
|
7307
7313
|
J({
|
|
7308
7314
|
keyword: "role",
|
|
7309
7315
|
field: "roles",
|
|
@@ -7476,148 +7482,148 @@ var Uo = [
|
|
|
7476
7482
|
aliases: ["view"],
|
|
7477
7483
|
field: "viewProfiles",
|
|
7478
7484
|
takesID: !0,
|
|
7479
|
-
parse:
|
|
7480
|
-
dump:
|
|
7485
|
+
parse: gn,
|
|
7486
|
+
dump: _n
|
|
7481
7487
|
}),
|
|
7482
7488
|
J({
|
|
7483
7489
|
keyword: "term",
|
|
7484
7490
|
field: "terms",
|
|
7485
7491
|
takesID: !0,
|
|
7486
|
-
parse:
|
|
7487
|
-
dump:
|
|
7492
|
+
parse: Mr,
|
|
7493
|
+
dump: Nr
|
|
7488
7494
|
}),
|
|
7489
7495
|
J({
|
|
7490
7496
|
keyword: "form",
|
|
7491
7497
|
field: "forms",
|
|
7492
7498
|
takesID: !0,
|
|
7493
|
-
parse:
|
|
7494
|
-
dump:
|
|
7499
|
+
parse: vn,
|
|
7500
|
+
dump: Tn
|
|
7495
7501
|
}),
|
|
7496
7502
|
J({
|
|
7497
7503
|
keyword: "subform",
|
|
7498
7504
|
field: "subforms",
|
|
7499
7505
|
takesID: !0,
|
|
7500
|
-
parse:
|
|
7501
|
-
dump:
|
|
7506
|
+
parse: Dn,
|
|
7507
|
+
dump: kn
|
|
7502
7508
|
}),
|
|
7503
7509
|
J({
|
|
7504
7510
|
keyword: "symbol",
|
|
7505
7511
|
field: "symbols",
|
|
7506
7512
|
takesID: !0,
|
|
7507
|
-
parse:
|
|
7508
|
-
resolve:
|
|
7509
|
-
dump:
|
|
7513
|
+
parse: jn,
|
|
7514
|
+
resolve: Mn,
|
|
7515
|
+
dump: Nn
|
|
7510
7516
|
}),
|
|
7511
7517
|
J({
|
|
7512
7518
|
keyword: "calculation",
|
|
7513
7519
|
field: "calculations",
|
|
7514
7520
|
takesID: !0,
|
|
7515
|
-
parse:
|
|
7516
|
-
resolve:
|
|
7517
|
-
dump:
|
|
7521
|
+
parse: Pn,
|
|
7522
|
+
resolve: Rn,
|
|
7523
|
+
dump: zn
|
|
7518
7524
|
}),
|
|
7519
7525
|
J({
|
|
7520
7526
|
keyword: "verdict",
|
|
7521
7527
|
field: "verdicts",
|
|
7522
7528
|
takesID: !0,
|
|
7523
|
-
parse:
|
|
7524
|
-
dump:
|
|
7529
|
+
parse: Ir,
|
|
7530
|
+
dump: Lr
|
|
7525
7531
|
}),
|
|
7526
7532
|
J({
|
|
7527
7533
|
keyword: "reference_material",
|
|
7528
7534
|
field: "referenceMaterials",
|
|
7529
7535
|
takesID: !0,
|
|
7530
|
-
parse:
|
|
7531
|
-
dump:
|
|
7536
|
+
parse: Br,
|
|
7537
|
+
dump: Vr
|
|
7532
7538
|
}),
|
|
7533
7539
|
J({
|
|
7534
7540
|
keyword: "test_point_set",
|
|
7535
7541
|
field: "testPointSets",
|
|
7536
7542
|
takesID: !0,
|
|
7537
|
-
parse:
|
|
7538
|
-
dump:
|
|
7543
|
+
parse: Qr,
|
|
7544
|
+
dump: $r
|
|
7539
7545
|
}),
|
|
7540
7546
|
J({
|
|
7541
7547
|
keyword: "competence_kind",
|
|
7542
7548
|
field: "competenceKinds",
|
|
7543
7549
|
takesID: !0,
|
|
7544
|
-
parse:
|
|
7545
|
-
dump:
|
|
7550
|
+
parse: _r,
|
|
7551
|
+
dump: vr
|
|
7546
7552
|
}),
|
|
7547
7553
|
J({
|
|
7548
7554
|
keyword: "predicate",
|
|
7549
7555
|
field: "predicates",
|
|
7550
7556
|
takesID: !0,
|
|
7551
|
-
parse:
|
|
7552
|
-
dump:
|
|
7557
|
+
parse: Hr,
|
|
7558
|
+
dump: Ur
|
|
7553
7559
|
}),
|
|
7554
7560
|
J({
|
|
7555
7561
|
keyword: "constraint",
|
|
7556
7562
|
field: "constraints",
|
|
7557
7563
|
takesID: !0,
|
|
7558
|
-
parse:
|
|
7559
|
-
dump:
|
|
7564
|
+
parse: Gr,
|
|
7565
|
+
dump: Kr
|
|
7560
7566
|
}),
|
|
7561
7567
|
J({
|
|
7562
7568
|
keyword: "discrepancy_record",
|
|
7563
7569
|
field: "discrepancyRecords",
|
|
7564
7570
|
takesID: !0,
|
|
7565
|
-
parse:
|
|
7566
|
-
dump:
|
|
7571
|
+
parse: Jr,
|
|
7572
|
+
dump: Yr
|
|
7567
7573
|
}),
|
|
7568
7574
|
J({
|
|
7569
7575
|
keyword: "state_machine",
|
|
7570
7576
|
field: "stateMachines",
|
|
7571
7577
|
takesID: !0,
|
|
7572
|
-
parse:
|
|
7573
|
-
dump:
|
|
7578
|
+
parse: Vn,
|
|
7579
|
+
dump: Wn
|
|
7574
7580
|
}),
|
|
7575
|
-
ci,
|
|
7576
7581
|
li,
|
|
7577
|
-
|
|
7582
|
+
ui,
|
|
7578
7583
|
Da,
|
|
7579
7584
|
Oa,
|
|
7580
7585
|
ka,
|
|
7581
7586
|
Aa,
|
|
7582
|
-
|
|
7587
|
+
ja,
|
|
7588
|
+
gi,
|
|
7583
7589
|
J({
|
|
7584
7590
|
keyword: "conformance_test",
|
|
7585
7591
|
field: "conformanceTests",
|
|
7586
7592
|
takesID: !0,
|
|
7587
|
-
parse:
|
|
7588
|
-
dump:
|
|
7593
|
+
parse: Dr,
|
|
7594
|
+
dump: Or
|
|
7589
7595
|
}),
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
Qa,
|
|
7596
|
+
Ma,
|
|
7597
|
+
Va,
|
|
7593
7598
|
$a,
|
|
7594
|
-
|
|
7599
|
+
eo,
|
|
7595
7600
|
Po,
|
|
7601
|
+
Fo,
|
|
7596
7602
|
J({
|
|
7597
7603
|
keyword: "activity_archetype",
|
|
7598
7604
|
field: "activityArchetypes",
|
|
7599
7605
|
takesID: !0,
|
|
7600
|
-
parse:
|
|
7601
|
-
dump:
|
|
7606
|
+
parse: Ho,
|
|
7607
|
+
dump: Uo
|
|
7602
7608
|
}),
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
yo,
|
|
7609
|
+
Oi,
|
|
7610
|
+
po,
|
|
7606
7611
|
bo,
|
|
7607
|
-
|
|
7612
|
+
xo,
|
|
7608
7613
|
Co,
|
|
7614
|
+
wo,
|
|
7609
7615
|
J({
|
|
7610
7616
|
keyword: "text",
|
|
7611
7617
|
field: "texts",
|
|
7612
7618
|
takesID: !0,
|
|
7613
|
-
parse:
|
|
7614
|
-
dump:
|
|
7619
|
+
parse: To,
|
|
7620
|
+
dump: Eo
|
|
7615
7621
|
}),
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7622
|
+
Ro,
|
|
7623
|
+
Bo,
|
|
7624
|
+
Vo
|
|
7619
7625
|
];
|
|
7620
|
-
function
|
|
7626
|
+
function Go(e) {
|
|
7621
7627
|
let t = {};
|
|
7622
7628
|
for (let n of e) {
|
|
7623
7629
|
if (!n.field) continue;
|
|
@@ -7631,61 +7637,61 @@ function Wo(e) {
|
|
|
7631
7637
|
}
|
|
7632
7638
|
return t;
|
|
7633
7639
|
}
|
|
7634
|
-
function
|
|
7640
|
+
function Ko(e) {
|
|
7635
7641
|
let t = {};
|
|
7636
7642
|
for (let n of e) n.field && (t[n.field] = { resolve: n.resolve ?? ((e, t) => t) });
|
|
7637
7643
|
return t;
|
|
7638
7644
|
}
|
|
7639
|
-
function
|
|
7645
|
+
function qo(e) {
|
|
7640
7646
|
let t = {};
|
|
7641
7647
|
for (let n of e) n.field && (t[n.field] = n.dump);
|
|
7642
7648
|
return t;
|
|
7643
7649
|
}
|
|
7644
|
-
var
|
|
7645
|
-
package: { parse:
|
|
7650
|
+
var Jo = {
|
|
7651
|
+
package: { parse: mi },
|
|
7646
7652
|
root: { parse: (e) => (t) => (t.root = e.trim(), t) },
|
|
7647
7653
|
metadata: { parse: m },
|
|
7648
7654
|
version: { parse: () => (e) => e },
|
|
7649
|
-
...Wo
|
|
7650
|
-
},
|
|
7655
|
+
...Go(Wo)
|
|
7656
|
+
}, Yo = Ko(Wo), Xo = qo(Wo), Y = (/* @__PURE__ */ e(((e, t) => {
|
|
7651
7657
|
t.exports = {};
|
|
7652
|
-
})))(),
|
|
7653
|
-
function
|
|
7658
|
+
})))(), Zo = /^include\s+"([^"]+)"/gm, Qo = /^[ \t]*(#|\/\/)/;
|
|
7659
|
+
function $o(e, t = /* @__PURE__ */ new Set()) {
|
|
7654
7660
|
let n = (0, Y.resolve)(e);
|
|
7655
7661
|
if (t.has(n)) throw Error(`Include cycle detected: ${n} (chain: ${[...t, n].map((e) => e.split("/").pop()).join(" → ")})`);
|
|
7656
7662
|
if (t.add(n), !(0, Y.existsSync)(n)) throw Error(`Include file not found: ${n}`);
|
|
7657
7663
|
let r = (0, Y.readFileSync)(n, "utf8"), i = (0, Y.dirname)(n);
|
|
7658
|
-
return r.replace(
|
|
7664
|
+
return r.replace(Zo, (e, n, a) => {
|
|
7659
7665
|
let o = r.lastIndexOf("\n", a) + 1, s = r.slice(o, a);
|
|
7660
|
-
if (
|
|
7666
|
+
if (Qo.test(s)) return e;
|
|
7661
7667
|
let c = (0, Y.isAbsolute)(n) ? n : (0, Y.resolve)(i, n);
|
|
7662
|
-
return
|
|
7668
|
+
return $o(c.endsWith(".prl") || c.endsWith(".mmel") ? c : (0, Y.existsSync)(`${c}.prl`) ? `${c}.prl` : `${c}.mmel`, new Set(t));
|
|
7663
7669
|
});
|
|
7664
7670
|
}
|
|
7665
7671
|
//#endregion
|
|
7666
7672
|
//#region src/validate.ts
|
|
7667
|
-
function
|
|
7673
|
+
function es(e) {
|
|
7668
7674
|
let t = [];
|
|
7669
|
-
for (let n of
|
|
7675
|
+
for (let n of ts) t.push(...n.check(e));
|
|
7670
7676
|
return t;
|
|
7671
7677
|
}
|
|
7672
|
-
var
|
|
7678
|
+
var ts = [
|
|
7673
7679
|
{
|
|
7674
7680
|
name: "empty-ids",
|
|
7675
|
-
check:
|
|
7681
|
+
check: ns
|
|
7676
7682
|
},
|
|
7677
7683
|
{
|
|
7678
7684
|
name: "form-references",
|
|
7679
|
-
check:
|
|
7685
|
+
check: rs
|
|
7680
7686
|
},
|
|
7681
7687
|
{
|
|
7682
7688
|
name: "state-machine-cascades",
|
|
7683
|
-
check:
|
|
7689
|
+
check: is
|
|
7684
7690
|
}
|
|
7685
7691
|
];
|
|
7686
|
-
function
|
|
7692
|
+
function ns(e) {
|
|
7687
7693
|
let t = [];
|
|
7688
|
-
for (let [n, r] of
|
|
7694
|
+
for (let [n, r] of as(e)) for (let e of r) (!e.id || e.id.trim() === "") && t.push({
|
|
7689
7695
|
severity: "error",
|
|
7690
7696
|
code: "empty-id",
|
|
7691
7697
|
construct: n,
|
|
@@ -7693,7 +7699,7 @@ function ts(e) {
|
|
|
7693
7699
|
});
|
|
7694
7700
|
return t;
|
|
7695
7701
|
}
|
|
7696
|
-
function
|
|
7702
|
+
function rs(e) {
|
|
7697
7703
|
let t = [], n = new Set(e.calculations.map((e) => e.id)), r = new Set(e.processes.map((e) => e.id));
|
|
7698
7704
|
for (let t of e.conformanceTests ?? []) r.add(t.id);
|
|
7699
7705
|
let i = new Set(e.subforms.map((e) => e.id));
|
|
@@ -7705,7 +7711,7 @@ function ns(e) {
|
|
|
7705
7711
|
message: `Form "${a.id}" references conformance process "${a.conformanceProcessId}" which does not exist`,
|
|
7706
7712
|
id: a.id
|
|
7707
7713
|
});
|
|
7708
|
-
for (let e of
|
|
7714
|
+
for (let e of os(a)) {
|
|
7709
7715
|
let r = e.calculationId;
|
|
7710
7716
|
r && !r.startsWith("ocl{") && !n.has(r) && t.push({
|
|
7711
7717
|
severity: "error",
|
|
@@ -7724,7 +7730,7 @@ function ns(e) {
|
|
|
7724
7730
|
}
|
|
7725
7731
|
return t;
|
|
7726
7732
|
}
|
|
7727
|
-
function
|
|
7733
|
+
function is(e) {
|
|
7728
7734
|
let t = [];
|
|
7729
7735
|
for (let n of e.stateMachines) {
|
|
7730
7736
|
let e = new Set(n.states.map((e) => e.name));
|
|
@@ -7745,10 +7751,10 @@ function rs(e) {
|
|
|
7745
7751
|
}
|
|
7746
7752
|
return t;
|
|
7747
7753
|
}
|
|
7748
|
-
function*
|
|
7754
|
+
function* as(e) {
|
|
7749
7755
|
for (let [t, n] of Object.entries(e)) Array.isArray(n) && n.length > 0 && typeof n[0]?.id == "string" && (yield [t, n]);
|
|
7750
7756
|
}
|
|
7751
|
-
function*
|
|
7757
|
+
function* os(e) {
|
|
7752
7758
|
let t = [...e.fields];
|
|
7753
7759
|
for (; t.length > 0;) {
|
|
7754
7760
|
let e = t.pop();
|
|
@@ -7757,30 +7763,30 @@ function* as(e) {
|
|
|
7757
7763
|
}
|
|
7758
7764
|
//#endregion
|
|
7759
7765
|
//#region src/ser-des/package.ts
|
|
7760
|
-
var
|
|
7766
|
+
var ss = [
|
|
7761
7767
|
"model",
|
|
7762
7768
|
"entities",
|
|
7763
7769
|
"specification",
|
|
7764
7770
|
"execution",
|
|
7765
7771
|
"evaluation"
|
|
7766
7772
|
];
|
|
7767
|
-
function
|
|
7773
|
+
function cs(e) {
|
|
7768
7774
|
let t = [];
|
|
7769
7775
|
if (!(0, Y.existsSync)(e)) return t;
|
|
7770
7776
|
for (let n of (0, Y.readdirSync)(e).sort()) {
|
|
7771
7777
|
let r = (0, Y.join)(e, n);
|
|
7772
|
-
(0, Y.statSync)(r).isDirectory() ? t.push(...
|
|
7778
|
+
(0, Y.statSync)(r).isDirectory() ? t.push(...cs(r)) : (n.endsWith(".prl") || n.endsWith(".mmel")) && t.push(r);
|
|
7773
7779
|
}
|
|
7774
7780
|
return t;
|
|
7775
7781
|
}
|
|
7776
|
-
function
|
|
7782
|
+
function ls(e) {
|
|
7777
7783
|
let t = (0, Y.resolve)(e), n = [], r = (0, Y.join)(t, "package.primmel");
|
|
7778
7784
|
(0, Y.existsSync)(r) && n.push({
|
|
7779
7785
|
path: r,
|
|
7780
7786
|
role: "manifest"
|
|
7781
7787
|
});
|
|
7782
7788
|
let i = [];
|
|
7783
|
-
for (let e of
|
|
7789
|
+
for (let e of ss) i.push(...cs((0, Y.join)(t, e)));
|
|
7784
7790
|
for (let e of (0, Y.readdirSync)(t).sort()) {
|
|
7785
7791
|
let n = (0, Y.join)(t, e);
|
|
7786
7792
|
(0, Y.statSync)(n).isFile() && (e.endsWith(".prl") || e.endsWith(".mmel")) && e !== "package.primmel" && e !== ".primmel-allowlist.prl" && i.push(n);
|
|
@@ -7792,10 +7798,10 @@ function cs(e) {
|
|
|
7792
7798
|
});
|
|
7793
7799
|
return n;
|
|
7794
7800
|
}
|
|
7795
|
-
function
|
|
7796
|
-
return
|
|
7801
|
+
function us(e, t = {}) {
|
|
7802
|
+
return vs(e, t).standard;
|
|
7797
7803
|
}
|
|
7798
|
-
function
|
|
7804
|
+
function ds(e, t) {
|
|
7799
7805
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
7800
7806
|
for (let i of t) {
|
|
7801
7807
|
let t = e.constructs[i.field]?.[i.id];
|
|
@@ -7811,37 +7817,37 @@ function us(e, t) {
|
|
|
7811
7817
|
unassigned: r
|
|
7812
7818
|
};
|
|
7813
7819
|
}
|
|
7814
|
-
function
|
|
7815
|
-
let n =
|
|
7820
|
+
function fs(e, t = {}) {
|
|
7821
|
+
let n = vs(e, t, !0);
|
|
7816
7822
|
if (!n.provenance) throw Error("loadPackageWithProvenance: provenance not collected");
|
|
7817
7823
|
return {
|
|
7818
7824
|
...n,
|
|
7819
7825
|
provenance: n.provenance
|
|
7820
7826
|
};
|
|
7821
7827
|
}
|
|
7822
|
-
function
|
|
7828
|
+
function ps(e) {
|
|
7823
7829
|
let t = 0;
|
|
7824
7830
|
for (let n = 0; n < e.length; n++) e.charAt(n) === "\n" && t++;
|
|
7825
7831
|
return t;
|
|
7826
7832
|
}
|
|
7827
|
-
function
|
|
7833
|
+
function ms(e) {
|
|
7828
7834
|
let t = [], n = 0, r = 1;
|
|
7829
7835
|
for (let i of e) {
|
|
7830
7836
|
if (i.role !== "content") continue;
|
|
7831
|
-
let e =
|
|
7837
|
+
let e = $o(i.path);
|
|
7832
7838
|
t.push({
|
|
7833
7839
|
path: i.path,
|
|
7834
7840
|
text: e,
|
|
7835
7841
|
start: n,
|
|
7836
7842
|
lineStart: r
|
|
7837
|
-
}), n += e.length + 2, r +=
|
|
7843
|
+
}), n += e.length + 2, r += ps(e) + 2;
|
|
7838
7844
|
}
|
|
7839
7845
|
return t;
|
|
7840
7846
|
}
|
|
7841
|
-
function
|
|
7847
|
+
function hs(e) {
|
|
7842
7848
|
return e.map((e) => e.text).join("\n\n");
|
|
7843
7849
|
}
|
|
7844
|
-
function
|
|
7850
|
+
function gs(e, t, n) {
|
|
7845
7851
|
let r = {}, i = 0;
|
|
7846
7852
|
for (let a of e) {
|
|
7847
7853
|
for (; i + 1 < t.length && a.start.offset >= t[i + 1].start;) i++;
|
|
@@ -7861,46 +7867,46 @@ function hs(e, t, n) {
|
|
|
7861
7867
|
}
|
|
7862
7868
|
return r;
|
|
7863
7869
|
}
|
|
7864
|
-
function
|
|
7870
|
+
function _s(e) {
|
|
7865
7871
|
let t = (0, Y.join)((0, Y.resolve)(e), "package.primmel");
|
|
7866
7872
|
if (!(0, Y.existsSync)(t)) throw Error(`loadPackage: no package.primmel found in ${(0, Y.resolve)(e)}`);
|
|
7867
7873
|
let n = (0, Y.readFileSync)(t, "utf8"), r = { packageManifest: null };
|
|
7868
|
-
|
|
7874
|
+
mi(n)(r);
|
|
7869
7875
|
let i = r.packageManifest;
|
|
7870
7876
|
if (!i || !i.id) throw Error(`loadPackage: ${t} is not a valid package manifest`);
|
|
7871
7877
|
return i;
|
|
7872
7878
|
}
|
|
7873
|
-
function
|
|
7874
|
-
let r =
|
|
7879
|
+
function vs(e, t = {}, n = !1) {
|
|
7880
|
+
let r = ls(e);
|
|
7875
7881
|
if (r.length === 0) throw Error(`loadPackage: no package files found in ${(0, Y.resolve)(e)}`);
|
|
7876
7882
|
let i = null;
|
|
7877
|
-
r.some((e) => e.role === "manifest") && (i =
|
|
7878
|
-
let a =
|
|
7879
|
-
if (i && t.resolvePackage &&
|
|
7883
|
+
r.some((e) => e.role === "manifest") && (i = _s(e));
|
|
7884
|
+
let a = ms(r);
|
|
7885
|
+
if (i && t.resolvePackage && bs(i).length > 0) return ws(e, t, i, n);
|
|
7880
7886
|
let o = n ? {
|
|
7881
7887
|
...t,
|
|
7882
7888
|
withProvenance: !0
|
|
7883
|
-
} : t, s = u(
|
|
7889
|
+
} : t, s = u(hs(a), Jo, o);
|
|
7884
7890
|
if (i) {
|
|
7885
7891
|
s.packageManifest = i;
|
|
7886
|
-
let e =
|
|
7892
|
+
let e = xs(i);
|
|
7887
7893
|
e && s.issues.push(e);
|
|
7888
7894
|
}
|
|
7889
7895
|
let c = {
|
|
7890
|
-
standard: p(s,
|
|
7896
|
+
standard: p(s, Yo),
|
|
7891
7897
|
issues: s.issues
|
|
7892
7898
|
};
|
|
7893
7899
|
if (n) {
|
|
7894
7900
|
let e = r.find((e) => e.role === "manifest")?.path;
|
|
7895
7901
|
c.provenance = {
|
|
7896
7902
|
...e === void 0 ? {} : { manifest: e },
|
|
7897
|
-
constructs:
|
|
7903
|
+
constructs: gs(s.constructs ?? [], a, i?.id)
|
|
7898
7904
|
};
|
|
7899
7905
|
}
|
|
7900
7906
|
return c;
|
|
7901
7907
|
}
|
|
7902
|
-
function
|
|
7903
|
-
return
|
|
7908
|
+
function ys(e, t = {}) {
|
|
7909
|
+
return vs(e, t);
|
|
7904
7910
|
}
|
|
7905
7911
|
var X = class extends Error {
|
|
7906
7912
|
rule;
|
|
@@ -7908,12 +7914,12 @@ var X = class extends Error {
|
|
|
7908
7914
|
super(t), this.rule = e, this.name = "CompositionError";
|
|
7909
7915
|
}
|
|
7910
7916
|
};
|
|
7911
|
-
function
|
|
7917
|
+
function bs(e) {
|
|
7912
7918
|
let t = [];
|
|
7913
7919
|
for (let n of [...e.uses ?? [], ...e.extends ? [e.extends] : []]) t.includes(n) || t.push(n);
|
|
7914
7920
|
return t;
|
|
7915
7921
|
}
|
|
7916
|
-
function
|
|
7922
|
+
function xs(e) {
|
|
7917
7923
|
return e.extends ? {
|
|
7918
7924
|
severity: "warning",
|
|
7919
7925
|
code: "extends-deprecated",
|
|
@@ -7922,25 +7928,25 @@ function bs(e) {
|
|
|
7922
7928
|
message: `package "${e.id}": 'extends ${e.extends}' is deprecated — declare 'uses { ${e.extends} }' instead (extends is treated as a single-entry uses)`
|
|
7923
7929
|
} : null;
|
|
7924
7930
|
}
|
|
7925
|
-
var
|
|
7926
|
-
function
|
|
7927
|
-
let n =
|
|
7931
|
+
var Ss = /* @__PURE__ */ "approvals.roles.processes.pages.gateways.regs.references.provisions.dataclasses.events.enums.variables.notes.tables.figures.links.mapProfiles.viewProfiles.terms.forms.subforms.symbols.calculations.verdicts.referenceMaterials.testPointSets.competenceKinds.constraints.discrepancyRecords.stateMachines.conformanceTests.conformanceClasses.requirements.requirementClasses.instruments.attributeDefinitions.capabilities.behaviors.conditionSets.subjects.instances.quantityRegisters.duals.invariants.testSequences.formulasUsed.texts".split(".");
|
|
7932
|
+
function Cs(e, t) {
|
|
7933
|
+
let n = ms(ls(e));
|
|
7928
7934
|
return {
|
|
7929
|
-
ctx: u(
|
|
7935
|
+
ctx: u(hs(n), Jo, t),
|
|
7930
7936
|
chunks: n
|
|
7931
7937
|
};
|
|
7932
7938
|
}
|
|
7933
|
-
function
|
|
7939
|
+
function ws(e, t, n, r = !1) {
|
|
7934
7940
|
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) => {
|
|
7935
7941
|
l.set(e, 1), u.push(e);
|
|
7936
|
-
for (let t of
|
|
7942
|
+
for (let t of bs(s.get(e))) {
|
|
7937
7943
|
let n = l.get(t) ?? 0;
|
|
7938
7944
|
if (n === 1) throw new X("uses-cycle", `uses cycle: ${[...u.slice(u.indexOf(t)), t].join(" → ")} — package composition must be acyclic (uses-cycle)`);
|
|
7939
7945
|
if (n !== 2) {
|
|
7940
7946
|
if (!o.has(t)) {
|
|
7941
7947
|
let n = i(t);
|
|
7942
7948
|
if (!n) throw new X("uses-resolves", `package "${e}" uses "${t}", which the package locator cannot resolve (uses-resolves)`);
|
|
7943
|
-
let r =
|
|
7949
|
+
let r = _s(n);
|
|
7944
7950
|
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)`);
|
|
7945
7951
|
if (o.set(t, n), s.set(t, r), r.kind === "product_reference") {
|
|
7946
7952
|
l.set(t, 2);
|
|
@@ -7958,16 +7964,16 @@ function Cs(e, t, n, r = !1) {
|
|
|
7958
7964
|
withProvenance: !0
|
|
7959
7965
|
} : t, m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
7960
7966
|
for (let e of c) {
|
|
7961
|
-
let t =
|
|
7967
|
+
let t = Cs(o.get(e), f);
|
|
7962
7968
|
m.set(e, t.ctx), h.set(e, t.chunks);
|
|
7963
7969
|
}
|
|
7964
7970
|
let g = /* @__PURE__ */ new Map();
|
|
7965
|
-
for (let e of
|
|
7971
|
+
for (let e of Ss) g.set(e, /* @__PURE__ */ new Map());
|
|
7966
7972
|
let _ = m.get(c[0]);
|
|
7967
|
-
for (let e of
|
|
7973
|
+
for (let e of Ss) for (let t of Object.keys(_[e])) g.get(e).set(t, c[0]);
|
|
7968
7974
|
for (let e of c.slice(1)) {
|
|
7969
7975
|
let t = m.get(e);
|
|
7970
|
-
for (let n of
|
|
7976
|
+
for (let n of Ss) {
|
|
7971
7977
|
let r = _[n], i = g.get(n);
|
|
7972
7978
|
for (let [a, o] of Object.entries(t[n])) {
|
|
7973
7979
|
let t = i.get(a);
|
|
@@ -7996,12 +8002,12 @@ function Cs(e, t, n, r = !1) {
|
|
|
7996
8002
|
}
|
|
7997
8003
|
});
|
|
7998
8004
|
for (let e of s.values()) {
|
|
7999
|
-
let t =
|
|
8005
|
+
let t = xs(e);
|
|
8000
8006
|
t && v.push(t);
|
|
8001
8007
|
}
|
|
8002
8008
|
_.packageManifest = n;
|
|
8003
8009
|
let y = {
|
|
8004
|
-
standard: p(_,
|
|
8010
|
+
standard: p(_, Yo),
|
|
8005
8011
|
issues: [..._.issues, ...v],
|
|
8006
8012
|
composition: {
|
|
8007
8013
|
root: a,
|
|
@@ -8011,7 +8017,7 @@ function Cs(e, t, n, r = !1) {
|
|
|
8011
8017
|
if (r) {
|
|
8012
8018
|
let t = {};
|
|
8013
8019
|
for (let e of c) {
|
|
8014
|
-
let n =
|
|
8020
|
+
let n = gs(m.get(e).constructs ?? [], h.get(e), e);
|
|
8015
8021
|
for (let [e, r] of Object.entries(n)) {
|
|
8016
8022
|
let n = t[e] ??= {};
|
|
8017
8023
|
for (let [e, t] of Object.entries(r)) n[e] = t;
|
|
@@ -8026,7 +8032,7 @@ function Cs(e, t, n, r = !1) {
|
|
|
8026
8032
|
}
|
|
8027
8033
|
//#endregion
|
|
8028
8034
|
//#region src/ser-des/prm.ts
|
|
8029
|
-
var
|
|
8035
|
+
var Ts = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), Es = /* @__PURE__ */ new Set([
|
|
8030
8036
|
"full",
|
|
8031
8037
|
"minimal",
|
|
8032
8038
|
"partial",
|
|
@@ -8035,7 +8041,7 @@ var ws = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), Ts = /* @__PURE__
|
|
|
8035
8041
|
function Z(e) {
|
|
8036
8042
|
throw Error(`.prm parse error: ${e}`);
|
|
8037
8043
|
}
|
|
8038
|
-
function
|
|
8044
|
+
function Ds(e, t) {
|
|
8039
8045
|
let n = {
|
|
8040
8046
|
description: "",
|
|
8041
8047
|
justification: "",
|
|
@@ -8044,9 +8050,9 @@ function Es(e, t) {
|
|
|
8044
8050
|
if (e == null) return n;
|
|
8045
8051
|
(typeof e != "object" || Array.isArray(e)) && Z(`${t}: pair metadata must be an object`);
|
|
8046
8052
|
let r = e;
|
|
8047
|
-
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" || !
|
|
8053
|
+
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" || !Es.has(r.coverage)) && Z(`${t}: "coverage" must be one of full | minimal | partial | none`), n.coverage = r.coverage), n;
|
|
8048
8054
|
}
|
|
8049
|
-
function
|
|
8055
|
+
function Os(e) {
|
|
8050
8056
|
let t;
|
|
8051
8057
|
try {
|
|
8052
8058
|
t = JSON.parse(e);
|
|
@@ -8055,7 +8061,7 @@ function Ds(e) {
|
|
|
8055
8061
|
}
|
|
8056
8062
|
(typeof t != "object" || !t || Array.isArray(t)) && Z("top level must be an object");
|
|
8057
8063
|
let n = t, r = typeof n["@type"] == "string" ? n["@type"] : "";
|
|
8058
|
-
|
|
8064
|
+
Ts.has(r) || Z(`"@type" must be MMEL_MAP or Primmel_MAP (got "${r}")`);
|
|
8059
8065
|
let i = {
|
|
8060
8066
|
context: typeof n["@context"] == "string" ? n["@context"] : "",
|
|
8061
8067
|
type: r,
|
|
@@ -8071,20 +8077,20 @@ function Ds(e) {
|
|
|
8071
8077
|
coverage: {}
|
|
8072
8078
|
}, a = n.coverage ?? {};
|
|
8073
8079
|
(typeof a != "object" || !a || Array.isArray(a)) && Z(`mapSet."${e}".coverage: must be an object`);
|
|
8074
|
-
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !
|
|
8080
|
+
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !Es.has(n)) && Z(`mapSet."${e}".coverage."${t}": must be one of full | minimal | partial | none`), r.coverage[t] = n;
|
|
8075
8081
|
let o = n.mappings ?? {};
|
|
8076
8082
|
(typeof o != "object" || !o || Array.isArray(o)) && Z(`mapSet."${e}".mappings: must be an object`);
|
|
8077
8083
|
for (let [t, n] of Object.entries(o)) {
|
|
8078
8084
|
(typeof n != "object" || !n || Array.isArray(n)) && Z(`mapSet."${e}".mappings."${t}": must be an object`);
|
|
8079
8085
|
let i = {};
|
|
8080
|
-
for (let [r, a] of Object.entries(n)) i[r] =
|
|
8086
|
+
for (let [r, a] of Object.entries(n)) i[r] = Ds(a, `mapSet."${e}".mappings."${t}"."${r}"`);
|
|
8081
8087
|
r.mappings[t] = i;
|
|
8082
8088
|
}
|
|
8083
8089
|
i.mapSet[e] = r;
|
|
8084
8090
|
}
|
|
8085
8091
|
return i;
|
|
8086
8092
|
}
|
|
8087
|
-
function
|
|
8093
|
+
function ks(e) {
|
|
8088
8094
|
let t = {};
|
|
8089
8095
|
e.context && (t["@context"] = e.context), t["@type"] = e.type || "Primmel_MAP", t.id = e.id;
|
|
8090
8096
|
let n = {};
|
|
@@ -8109,7 +8115,7 @@ function Os(e) {
|
|
|
8109
8115
|
}
|
|
8110
8116
|
return t.mapSet = n, JSON.stringify(t, null, 2) + "\n";
|
|
8111
8117
|
}
|
|
8112
|
-
function
|
|
8118
|
+
function As(e) {
|
|
8113
8119
|
let t = [];
|
|
8114
8120
|
for (let [n, r] of Object.entries(e.mapSet)) {
|
|
8115
8121
|
let e = {};
|
|
@@ -8128,7 +8134,7 @@ function ks(e) {
|
|
|
8128
8134
|
}
|
|
8129
8135
|
return t;
|
|
8130
8136
|
}
|
|
8131
|
-
function
|
|
8137
|
+
function js(e, t) {
|
|
8132
8138
|
let n = {
|
|
8133
8139
|
context: "",
|
|
8134
8140
|
type: "Primmel_MAP",
|
|
@@ -8156,7 +8162,7 @@ function As(e, t) {
|
|
|
8156
8162
|
}
|
|
8157
8163
|
//#endregion
|
|
8158
8164
|
//#region src/type-expr.ts
|
|
8159
|
-
var
|
|
8165
|
+
var Ms = [
|
|
8160
8166
|
"integer",
|
|
8161
8167
|
"float",
|
|
8162
8168
|
"double",
|
|
@@ -8171,8 +8177,8 @@ var js = [
|
|
|
8171
8177
|
"reference",
|
|
8172
8178
|
"object",
|
|
8173
8179
|
"any"
|
|
8174
|
-
],
|
|
8175
|
-
function
|
|
8180
|
+
], Ns = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
8181
|
+
function Ps(e) {
|
|
8176
8182
|
let t = 0;
|
|
8177
8183
|
for (let n = 0; n < e.length; n++) {
|
|
8178
8184
|
let r = e[n];
|
|
@@ -8182,33 +8188,33 @@ function Ns(e) {
|
|
|
8182
8188
|
}
|
|
8183
8189
|
return null;
|
|
8184
8190
|
}
|
|
8185
|
-
function
|
|
8191
|
+
function Fs(e) {
|
|
8186
8192
|
let t = e.trim();
|
|
8187
8193
|
if (t === "QuantityValue") return { kind: "quantity" };
|
|
8188
|
-
if (
|
|
8194
|
+
if (Ms.includes(t)) return {
|
|
8189
8195
|
kind: "primitive",
|
|
8190
8196
|
name: t
|
|
8191
8197
|
};
|
|
8192
8198
|
let n = /^reference\(([^)]+)\)$/.exec(t);
|
|
8193
8199
|
if (n) {
|
|
8194
8200
|
let e = n[1].trim();
|
|
8195
|
-
return
|
|
8201
|
+
return Ns.test(e) ? {
|
|
8196
8202
|
kind: "reference",
|
|
8197
8203
|
target: e
|
|
8198
8204
|
} : null;
|
|
8199
8205
|
}
|
|
8200
8206
|
if (t.startsWith("map<") && t.endsWith(">")) {
|
|
8201
|
-
let e =
|
|
8207
|
+
let e = Ps(t.slice(4, -1));
|
|
8202
8208
|
if (!e) return null;
|
|
8203
8209
|
let n = e[0].trim(), r = null;
|
|
8204
8210
|
n === "string" ? r = {
|
|
8205
8211
|
kind: "primitive",
|
|
8206
8212
|
name: "string"
|
|
8207
|
-
} :
|
|
8213
|
+
} : Ns.test(n) && (r = {
|
|
8208
8214
|
kind: "reference",
|
|
8209
8215
|
target: n
|
|
8210
8216
|
});
|
|
8211
|
-
let i =
|
|
8217
|
+
let i = Fs(e[1]);
|
|
8212
8218
|
return !r || !i ? null : {
|
|
8213
8219
|
kind: "map",
|
|
8214
8220
|
key: r,
|
|
@@ -8217,13 +8223,13 @@ function Ps(e) {
|
|
|
8217
8223
|
}
|
|
8218
8224
|
return null;
|
|
8219
8225
|
}
|
|
8220
|
-
function
|
|
8221
|
-
let t =
|
|
8226
|
+
function Is(e) {
|
|
8227
|
+
let t = Fs(e);
|
|
8222
8228
|
return t !== null && t.kind === "map";
|
|
8223
8229
|
}
|
|
8224
8230
|
//#endregion
|
|
8225
8231
|
//#region src/mapping-coverage.ts
|
|
8226
|
-
function
|
|
8232
|
+
function Ls(e, t) {
|
|
8227
8233
|
let n = e.indexOf("#");
|
|
8228
8234
|
if (n >= 0) {
|
|
8229
8235
|
let t = e.slice(0, n), r = e.slice(n + 1);
|
|
@@ -8239,12 +8245,12 @@ function Is(e, t) {
|
|
|
8239
8245
|
qualified: t + "#" + e
|
|
8240
8246
|
};
|
|
8241
8247
|
}
|
|
8242
|
-
function
|
|
8248
|
+
function Rs(e, t) {
|
|
8243
8249
|
let n = [];
|
|
8244
8250
|
for (let [r, i] of Object.entries(e.mappings)) for (let a of i) n.push({
|
|
8245
8251
|
source: r,
|
|
8246
8252
|
sourceModel: t,
|
|
8247
|
-
target:
|
|
8253
|
+
target: Ls(a.target, e.namespace).qualified,
|
|
8248
8254
|
targetModel: e.namespace,
|
|
8249
8255
|
description: a.description,
|
|
8250
8256
|
justification: a.justification,
|
|
@@ -8252,12 +8258,12 @@ function Ls(e, t) {
|
|
|
8252
8258
|
});
|
|
8253
8259
|
return n;
|
|
8254
8260
|
}
|
|
8255
|
-
function
|
|
8261
|
+
function zs(e, t = {}) {
|
|
8256
8262
|
let n = t.modelId ?? e.packageManifest?.id ?? e.meta?.namespace ?? "", r = [...e.mapProfiles ?? []], i = t.prm ? Array.isArray(t.prm) ? t.prm : [t.prm] : [];
|
|
8257
|
-
for (let e of i) r.push(...
|
|
8258
|
-
return r.flatMap((e) =>
|
|
8263
|
+
for (let e of i) r.push(...As(e));
|
|
8264
|
+
return r.flatMap((e) => Rs(e, n));
|
|
8259
8265
|
}
|
|
8260
|
-
function
|
|
8266
|
+
function Bs(e, t = {}) {
|
|
8261
8267
|
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();
|
|
8262
8268
|
for (let e of r) a.set(e.id, {
|
|
8263
8269
|
id: e.id.slice(n.length),
|
|
@@ -8271,18 +8277,18 @@ function zs(e, t = {}) {
|
|
|
8271
8277
|
}
|
|
8272
8278
|
return o;
|
|
8273
8279
|
}
|
|
8274
|
-
function
|
|
8280
|
+
function Vs(e, t) {
|
|
8275
8281
|
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";
|
|
8276
8282
|
}
|
|
8277
|
-
function
|
|
8278
|
-
let a = Array.isArray(t) ? t :
|
|
8283
|
+
function Hs(e, t, n, r, i = {}) {
|
|
8284
|
+
let a = Array.isArray(t) ? t : Bs(t), o = n.filter((e) => e.targetModel === r), s = /* @__PURE__ */ new Map();
|
|
8279
8285
|
for (let e of o) {
|
|
8280
|
-
let t =
|
|
8286
|
+
let t = Ls(e.target, r).id;
|
|
8281
8287
|
(s.get(t) ?? s.set(t, []).get(t)).push(e.source);
|
|
8282
8288
|
}
|
|
8283
8289
|
let c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = (e, t) => {
|
|
8284
8290
|
let n = s.has(e.id), r = n ? e.id : t, i = e.children.map((e) => u(e, r)), a;
|
|
8285
|
-
return r === null ? a = e.children.length === 0 ? "none" :
|
|
8291
|
+
return r === null ? a = e.children.length === 0 ? "none" : Vs(e.composition, i) : (a = "full", !n && t !== null && l.set(e.id, t)), c.set(e.id, a), a;
|
|
8286
8292
|
};
|
|
8287
8293
|
for (let e of a) u(e, null);
|
|
8288
8294
|
let d = [], f = /* @__PURE__ */ new Map(), p = (e) => {
|
|
@@ -8304,7 +8310,7 @@ function Vs(e, t, n, r, i = {}) {
|
|
|
8304
8310
|
for (let e of d) m[e.coverage]++;
|
|
8305
8311
|
let h = [], g = /* @__PURE__ */ new Set();
|
|
8306
8312
|
for (let e of o) {
|
|
8307
|
-
let t =
|
|
8313
|
+
let t = Ls(e.target, r).id;
|
|
8308
8314
|
f.has(t) ? g.add(e.source) : h.push({
|
|
8309
8315
|
source: e.source,
|
|
8310
8316
|
target: e.target
|
|
@@ -8315,7 +8321,7 @@ function Vs(e, t, n, r, i = {}) {
|
|
|
8315
8321
|
y.has(t) || (y.add(t), v.push(e));
|
|
8316
8322
|
};
|
|
8317
8323
|
for (let e of o) {
|
|
8318
|
-
let t =
|
|
8324
|
+
let t = Ls(e.target, r).id, n = f.get(t);
|
|
8319
8325
|
if (!n) continue;
|
|
8320
8326
|
let i = (e, t) => {
|
|
8321
8327
|
for (let n of e.children) t.push(n), i(n, t);
|
|
@@ -8362,7 +8368,7 @@ function Vs(e, t, n, r, i = {}) {
|
|
|
8362
8368
|
summary: m
|
|
8363
8369
|
};
|
|
8364
8370
|
}
|
|
8365
|
-
function
|
|
8371
|
+
function Us(e) {
|
|
8366
8372
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
8367
8373
|
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) {
|
|
8368
8374
|
if (i.target !== `${r.modelId}#${e.source}`) continue;
|
|
@@ -8380,7 +8386,7 @@ function Hs(e) {
|
|
|
8380
8386
|
}
|
|
8381
8387
|
return t;
|
|
8382
8388
|
}
|
|
8383
|
-
function
|
|
8389
|
+
function Ws(e) {
|
|
8384
8390
|
let t = /* @__PURE__ */ new Map();
|
|
8385
8391
|
for (let n of e) for (let e of n.mappings) {
|
|
8386
8392
|
let r = `${n.modelId}→${e.targetModel}`, i = t.get(r) ?? {
|
|
@@ -8392,14 +8398,14 @@ function Us(e) {
|
|
|
8392
8398
|
}
|
|
8393
8399
|
return [...t.values()];
|
|
8394
8400
|
}
|
|
8395
|
-
function
|
|
8401
|
+
function Gs(e) {
|
|
8396
8402
|
if (e && typeof e == "object") {
|
|
8397
|
-
for (let t of Object.values(e))
|
|
8403
|
+
for (let t of Object.values(e)) Gs(t);
|
|
8398
8404
|
Object.freeze(e);
|
|
8399
8405
|
}
|
|
8400
8406
|
return e;
|
|
8401
8407
|
}
|
|
8402
|
-
function
|
|
8408
|
+
function Ks(e, t, n = null) {
|
|
8403
8409
|
let r = new Set(t.visibleElements ?? []), i = r.size > 0, a = i ? [...r] : (e.processes ?? []).map((e) => e.id), o = null;
|
|
8404
8410
|
if (n) {
|
|
8405
8411
|
let e = n.components.filter((e) => !i || r.has(e.id) || e.mappedBy.some((e) => r.has(e))), t = {
|
|
@@ -8417,14 +8423,14 @@ function Gs(e, t, n = null) {
|
|
|
8417
8423
|
summary: t
|
|
8418
8424
|
};
|
|
8419
8425
|
}
|
|
8420
|
-
return
|
|
8426
|
+
return Gs({
|
|
8421
8427
|
id: t.id,
|
|
8422
8428
|
against: t.against ?? "",
|
|
8423
8429
|
elements: a,
|
|
8424
8430
|
coverage: o
|
|
8425
8431
|
});
|
|
8426
8432
|
}
|
|
8427
|
-
function
|
|
8433
|
+
function qs(e) {
|
|
8428
8434
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
8429
8435
|
for (let n of e ?? []) t.add(n.id);
|
|
8430
8436
|
};
|
|
@@ -8441,13 +8447,13 @@ function Ks(e) {
|
|
|
8441
8447
|
}
|
|
8442
8448
|
//#endregion
|
|
8443
8449
|
//#region src/model-diff.ts
|
|
8444
|
-
var
|
|
8450
|
+
var Js = [
|
|
8445
8451
|
"foundations",
|
|
8446
8452
|
"primary",
|
|
8447
8453
|
"secondary",
|
|
8448
8454
|
"tertiary",
|
|
8449
8455
|
"cross-cutting"
|
|
8450
|
-
],
|
|
8456
|
+
], Ys = {
|
|
8451
8457
|
terms: "foundations",
|
|
8452
8458
|
references: "foundations",
|
|
8453
8459
|
roles: "foundations",
|
|
@@ -8510,9 +8516,9 @@ function Q(e) {
|
|
|
8510
8516
|
};
|
|
8511
8517
|
return n(e);
|
|
8512
8518
|
}
|
|
8513
|
-
var
|
|
8514
|
-
function
|
|
8515
|
-
let r = e ?? "", i = n ?? "", a =
|
|
8519
|
+
var Xs = /#([^#]*)$/;
|
|
8520
|
+
function Zs(e, t, n = "") {
|
|
8521
|
+
let r = e ?? "", i = n ?? "", a = Xs.exec(r);
|
|
8516
8522
|
a && (r = r.slice(0, a.index), i ||= a[1]);
|
|
8517
8523
|
let o = r.lastIndexOf(":"), s = r, c = "";
|
|
8518
8524
|
if (o >= 0) {
|
|
@@ -8526,11 +8532,11 @@ function Xs(e, t, n = "") {
|
|
|
8526
8532
|
fragment: i
|
|
8527
8533
|
};
|
|
8528
8534
|
}
|
|
8529
|
-
var
|
|
8535
|
+
var Qs = [
|
|
8530
8536
|
"source",
|
|
8531
8537
|
"sourceRef",
|
|
8532
8538
|
"sourceRefs"
|
|
8533
|
-
],
|
|
8539
|
+
], $s = {
|
|
8534
8540
|
requirements: {
|
|
8535
8541
|
statement: [
|
|
8536
8542
|
"name",
|
|
@@ -8579,7 +8585,7 @@ var Zs = [
|
|
|
8579
8585
|
"profile"
|
|
8580
8586
|
]
|
|
8581
8587
|
}
|
|
8582
|
-
},
|
|
8588
|
+
}, ec = [
|
|
8583
8589
|
"name",
|
|
8584
8590
|
"label",
|
|
8585
8591
|
"title",
|
|
@@ -8588,16 +8594,16 @@ var Zs = [
|
|
|
8588
8594
|
"statement",
|
|
8589
8595
|
"purpose",
|
|
8590
8596
|
"text"
|
|
8591
|
-
],
|
|
8597
|
+
], tc = [
|
|
8592
8598
|
"parent",
|
|
8593
8599
|
"bindsTo",
|
|
8594
8600
|
"targets",
|
|
8595
8601
|
"conformanceProcessId",
|
|
8596
8602
|
"conformanceProcessIds"
|
|
8597
8603
|
];
|
|
8598
|
-
function
|
|
8604
|
+
function nc(e) {
|
|
8599
8605
|
let t = {}, n = (e, n) => {
|
|
8600
|
-
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(
|
|
8606
|
+
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(Zs(n.doc ?? "", n.clause ?? "", n.fragment));
|
|
8601
8607
|
};
|
|
8602
8608
|
n("source", e.source), n("sourceRef", e.sourceRef);
|
|
8603
8609
|
for (let t of e.sourceRefs ?? []) n("sourceRefs", t);
|
|
@@ -8609,7 +8615,7 @@ function tc(e) {
|
|
|
8609
8615
|
let i = (e) => {
|
|
8610
8616
|
let t = /* @__PURE__ */ new Set();
|
|
8611
8617
|
return e.filter((e) => {
|
|
8612
|
-
let n =
|
|
8618
|
+
let n = rc(e);
|
|
8613
8619
|
return !t.has(n) && (t.add(n), !0);
|
|
8614
8620
|
});
|
|
8615
8621
|
};
|
|
@@ -8619,17 +8625,17 @@ function tc(e) {
|
|
|
8619
8625
|
channels: t
|
|
8620
8626
|
};
|
|
8621
8627
|
}
|
|
8622
|
-
function
|
|
8628
|
+
function rc(e) {
|
|
8623
8629
|
return Q({
|
|
8624
8630
|
basis: e.basis,
|
|
8625
8631
|
clause: e.clause,
|
|
8626
8632
|
fragment: e.fragment
|
|
8627
8633
|
});
|
|
8628
8634
|
}
|
|
8629
|
-
function
|
|
8630
|
-
let n = String(t.id ?? t.entityName ?? ""), r =
|
|
8635
|
+
function ic(e, t) {
|
|
8636
|
+
let n = String(t.id ?? t.entityName ?? ""), r = Ys[e] ?? "cross-cutting", { edges: i, channels: a } = nc(t), o = new Set(Qs);
|
|
8631
8637
|
typeof t.reference == "string" && t.reference.startsWith("urn:") && o.add("reference");
|
|
8632
|
-
let s = {}, c = {}, l =
|
|
8638
|
+
let s = {}, c = {}, l = $s[e], u = (e) => {
|
|
8633
8639
|
let n = {};
|
|
8634
8640
|
for (let r of e) t[r] !== void 0 && (n[r] = t[r], o.add(r), s[r] = t[r]);
|
|
8635
8641
|
return n;
|
|
@@ -8649,9 +8655,9 @@ function rc(e, t) {
|
|
|
8649
8655
|
c[`spelling:${t.spelling}`] = Q(e), s[`spelling:${t.spelling}`] = e;
|
|
8650
8656
|
}
|
|
8651
8657
|
} else {
|
|
8652
|
-
let e = u(
|
|
8658
|
+
let e = u(ec);
|
|
8653
8659
|
Object.keys(e).length > 0 && (c.statement = Q(e));
|
|
8654
|
-
let t = u(
|
|
8660
|
+
let t = u(tc);
|
|
8655
8661
|
Object.keys(t).length > 0 && (c.anchor = Q(t));
|
|
8656
8662
|
}
|
|
8657
8663
|
if (i.length > 0) {
|
|
@@ -8678,31 +8684,31 @@ function rc(e, t) {
|
|
|
8678
8684
|
provenance: i
|
|
8679
8685
|
};
|
|
8680
8686
|
}
|
|
8681
|
-
function
|
|
8687
|
+
function ac(e, t) {
|
|
8682
8688
|
let n = /* @__PURE__ */ new Map();
|
|
8683
|
-
for (let r of Object.keys(
|
|
8689
|
+
for (let r of Object.keys(Ys)) {
|
|
8684
8690
|
let i = e[r];
|
|
8685
8691
|
if (Array.isArray(i)) {
|
|
8686
8692
|
for (let e of i) if (e && typeof e == "object" && ("id" in e || "entityName" in e)) {
|
|
8687
|
-
let i =
|
|
8693
|
+
let i = ic(r, e);
|
|
8688
8694
|
n.has(i.key) && t?.push(i.key), n.set(i.key, i);
|
|
8689
8695
|
}
|
|
8690
8696
|
}
|
|
8691
8697
|
}
|
|
8692
8698
|
return n;
|
|
8693
8699
|
}
|
|
8694
|
-
function
|
|
8700
|
+
function oc(e, t) {
|
|
8695
8701
|
return `${e}#${t}`;
|
|
8696
8702
|
}
|
|
8697
8703
|
function $(e) {
|
|
8698
8704
|
return e?.version ?? "";
|
|
8699
8705
|
}
|
|
8700
|
-
function
|
|
8706
|
+
function sc(e) {
|
|
8701
8707
|
let t = [...new Set(e)].sort();
|
|
8702
8708
|
return t.filter((e) => !t.some((t) => t !== e && e.startsWith(t + ".")));
|
|
8703
8709
|
}
|
|
8704
|
-
function
|
|
8705
|
-
let r = n.mappingsA ??
|
|
8710
|
+
function cc(e, t, n) {
|
|
8711
|
+
let r = n.mappingsA ?? zs(e), i = n.mappingsB ?? zs(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 = [];
|
|
8706
8712
|
for (let [e, t] of s) o.has(e) || c.push(t);
|
|
8707
8713
|
for (let [e, t] of o) {
|
|
8708
8714
|
let n = s.get(e);
|
|
@@ -8723,7 +8729,7 @@ function sc(e, t, n) {
|
|
|
8723
8729
|
let o = (e) => {
|
|
8724
8730
|
let t = n.references?.[a];
|
|
8725
8731
|
if (t) return t;
|
|
8726
|
-
let r =
|
|
8732
|
+
let r = Bs(e, { idPrefix: `${a}#` });
|
|
8727
8733
|
return r.length > 0 ? r : null;
|
|
8728
8734
|
}, s = o(e), c = o(t);
|
|
8729
8735
|
if (!s && !c) {
|
|
@@ -8732,11 +8738,11 @@ function sc(e, t, n) {
|
|
|
8732
8738
|
}
|
|
8733
8739
|
let l = /* @__PURE__ */ new Map();
|
|
8734
8740
|
if (s) {
|
|
8735
|
-
let t =
|
|
8741
|
+
let t = Hs(e, s, r, a);
|
|
8736
8742
|
for (let e of t.components) l.set(e.id, { from: e.coverage });
|
|
8737
8743
|
}
|
|
8738
8744
|
if (c) {
|
|
8739
|
-
let e =
|
|
8745
|
+
let e = Hs(t, c, i, a);
|
|
8740
8746
|
for (let t of e.components) {
|
|
8741
8747
|
let e = l.get(t.id) ?? {};
|
|
8742
8748
|
e.to = t.coverage, l.set(t.id, e);
|
|
@@ -8760,12 +8766,12 @@ function sc(e, t, n) {
|
|
|
8760
8766
|
namespacesSkipped: p
|
|
8761
8767
|
};
|
|
8762
8768
|
}
|
|
8763
|
-
function
|
|
8769
|
+
function lc(e, t) {
|
|
8764
8770
|
let n = [];
|
|
8765
8771
|
for (let [t, r] of e) {
|
|
8766
8772
|
let e = /* @__PURE__ */ new Set([...t.provenance.map((e) => e.basis), ...r.provenance.map((e) => e.basis)]);
|
|
8767
8773
|
for (let i of [...e].sort()) {
|
|
8768
|
-
let e = (e) =>
|
|
8774
|
+
let e = (e) => sc(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));
|
|
8769
8775
|
if (s.length === 0 && c.length === 0) continue;
|
|
8770
8776
|
let l = {
|
|
8771
8777
|
key: t.key,
|
|
@@ -8815,7 +8821,7 @@ function cc(e, t) {
|
|
|
8815
8821
|
}
|
|
8816
8822
|
let r = (e) => {
|
|
8817
8823
|
if (e.kind !== "renumbered" || !t.sentencesA || !t.sentencesB) return "unavailable";
|
|
8818
|
-
let n = t.sentencesA.get(
|
|
8824
|
+
let n = t.sentencesA.get(oc(e.doc, e.from)), r = t.sentencesB.get(oc(e.doc, e.to));
|
|
8819
8825
|
return n === void 0 || r === void 0 ? "unavailable" : n.replace(/\s+/g, " ").trim() === r.replace(/\s+/g, " ").trim() ? "same" : "differed";
|
|
8820
8826
|
}, i = /* @__PURE__ */ new Map();
|
|
8821
8827
|
for (let e of n) {
|
|
@@ -8831,21 +8837,21 @@ function cc(e, t) {
|
|
|
8831
8837
|
}
|
|
8832
8838
|
return [...i.values()].sort((e, t) => `${e.doc} ${e.from} ${e.to}`.localeCompare(`${t.doc} ${t.from} ${t.to}`));
|
|
8833
8839
|
}
|
|
8834
|
-
function
|
|
8840
|
+
function uc(e, t, n) {
|
|
8835
8841
|
return e.kind !== "texts" || !n.startsWith("spelling:") ? n : n in e.aspects ? n in t.aspects ? `${n} (changed)` : `${n} (removed)` : `${n} (added)`;
|
|
8836
8842
|
}
|
|
8837
|
-
var
|
|
8838
|
-
function
|
|
8839
|
-
if (
|
|
8843
|
+
var dc = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
8844
|
+
function fc(e, t, n, r) {
|
|
8845
|
+
if (dc(t) && dc(n)) {
|
|
8840
8846
|
let i = [.../* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])].sort();
|
|
8841
|
-
for (let a of i)
|
|
8847
|
+
for (let a of i) fc(`${e}.${a}`, t[a], n[a], r);
|
|
8842
8848
|
return;
|
|
8843
8849
|
}
|
|
8844
8850
|
Q(t) !== Q(n) && r.push(e);
|
|
8845
8851
|
}
|
|
8846
|
-
function
|
|
8852
|
+
function pc(e, t) {
|
|
8847
8853
|
let n = [.../* @__PURE__ */ new Set([...Object.keys(e.fields), ...Object.keys(t.fields)])].sort(), r = [];
|
|
8848
|
-
for (let i of n)
|
|
8854
|
+
for (let i of n) fc(i, e.fields[i], t.fields[i], r);
|
|
8849
8855
|
let i = [
|
|
8850
8856
|
"source",
|
|
8851
8857
|
"sourceRef",
|
|
@@ -8858,8 +8864,8 @@ function fc(e, t) {
|
|
|
8858
8864
|
return !a.has(r) && (a.add(r), !0);
|
|
8859
8865
|
});
|
|
8860
8866
|
}
|
|
8861
|
-
function
|
|
8862
|
-
let r = [], i = [], a =
|
|
8867
|
+
function mc(e, t, n = {}) {
|
|
8868
|
+
let r = [], i = [], a = ac(e, r), o = ac(t, i), s = [], c = [], l = [], u = [], d = [], f = 0, p = Object.fromEntries(Js.map((e) => [e, {
|
|
8863
8869
|
added: 0,
|
|
8864
8870
|
removed: 0,
|
|
8865
8871
|
changed: 0,
|
|
@@ -8897,11 +8903,11 @@ function pc(e, t, n = {}) {
|
|
|
8897
8903
|
id: t.id,
|
|
8898
8904
|
kind: t.kind,
|
|
8899
8905
|
tier: t.tier,
|
|
8900
|
-
aspects: r.map((e) =>
|
|
8901
|
-
fields:
|
|
8906
|
+
aspects: r.map((e) => uc(t, n, e)).sort(),
|
|
8907
|
+
fields: pc(t, n)
|
|
8902
8908
|
}), p[t.tier].changed++);
|
|
8903
8909
|
}
|
|
8904
|
-
let m =
|
|
8910
|
+
let m = cc(e, t, n), h = lc(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}@${$(_) || "?"}` : "a"), ee = n.bLabel ?? (v?.id ? `${v.id}@${$(v) || "?"}` : "b"), b = !!_?.id && _.id === v?.id && $(_) !== $(v), x = (e, t) => `${e}: duplicate element ${t} — the last declaration wins (a data error the duplicate-id linter owns); this side under-reports`, S = [...r.map((e) => x(y, e)), ...i.map((e) => x(ee, e))];
|
|
8905
8911
|
return {
|
|
8906
8912
|
aLabel: y,
|
|
8907
8913
|
bLabel: ee,
|
|
@@ -8920,40 +8926,40 @@ function pc(e, t, n = {}) {
|
|
|
8920
8926
|
empty: g
|
|
8921
8927
|
};
|
|
8922
8928
|
}
|
|
8923
|
-
function
|
|
8929
|
+
function hc(e) {
|
|
8924
8930
|
return `[${e.tier}/${e.kind}] ${e.id}`;
|
|
8925
8931
|
}
|
|
8926
|
-
function
|
|
8932
|
+
function gc(e, t) {
|
|
8927
8933
|
try {
|
|
8928
8934
|
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])}`);
|
|
8929
8935
|
if (i.length > 0) return i;
|
|
8930
8936
|
} catch {}
|
|
8931
8937
|
return [`from ${e}`, `to ${t}`];
|
|
8932
8938
|
}
|
|
8933
|
-
function
|
|
8939
|
+
function _c(e) {
|
|
8934
8940
|
let t = [], n = e.editionComparison ? `edition comparison — ${e.aLabel} → ${e.bLabel}` : `model diff — ${e.aLabel} → ${e.bLabel}`;
|
|
8935
8941
|
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");
|
|
8936
|
-
for (let n of
|
|
8942
|
+
for (let n of Js) {
|
|
8937
8943
|
let r = e.byTier[n];
|
|
8938
8944
|
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)}`);
|
|
8939
8945
|
}
|
|
8940
8946
|
if (e.added.length > 0) {
|
|
8941
8947
|
t.push("", "added:");
|
|
8942
|
-
for (let n of e.added) t.push(` + ${
|
|
8948
|
+
for (let n of e.added) t.push(` + ${hc(n)}`);
|
|
8943
8949
|
}
|
|
8944
8950
|
if (e.removed.length > 0) {
|
|
8945
8951
|
t.push("", "removed:");
|
|
8946
|
-
for (let n of e.removed) t.push(` - ${
|
|
8952
|
+
for (let n of e.removed) t.push(` - ${hc(n)}`);
|
|
8947
8953
|
}
|
|
8948
8954
|
if (e.changed.length > 0) {
|
|
8949
8955
|
t.push("", "changed:");
|
|
8950
|
-
for (let n of e.changed) t.push(` ~ ${
|
|
8956
|
+
for (let n of e.changed) t.push(` ~ ${hc(n)} — ${n.aspects.join(", ")} (fields: ${n.fields.join(", ")})`);
|
|
8951
8957
|
}
|
|
8952
8958
|
if (e.moved.length > 0) {
|
|
8953
8959
|
t.push("", "moved (re-anchored):");
|
|
8954
8960
|
for (let n of e.moved) {
|
|
8955
|
-
t.push(` > ${
|
|
8956
|
-
for (let e of
|
|
8961
|
+
t.push(` > ${hc(n)}`);
|
|
8962
|
+
for (let e of gc(n.from, n.to)) t.push(` ${e}`);
|
|
8957
8963
|
}
|
|
8958
8964
|
}
|
|
8959
8965
|
if (e.warnings.length > 0) {
|
|
@@ -8978,27 +8984,27 @@ function gc(e) {
|
|
|
8978
8984
|
}
|
|
8979
8985
|
//#endregion
|
|
8980
8986
|
//#region src/ser-des/index.ts
|
|
8981
|
-
function _c(e, t = {}) {
|
|
8982
|
-
return p(u(e, qo, t), Jo);
|
|
8983
|
-
}
|
|
8984
8987
|
function vc(e, t = {}) {
|
|
8985
|
-
|
|
8988
|
+
return p(u(e, Jo, t), Yo);
|
|
8989
|
+
}
|
|
8990
|
+
function yc(e, t = {}) {
|
|
8991
|
+
let n = u(e, Jo, t);
|
|
8986
8992
|
return {
|
|
8987
|
-
standard: p(n,
|
|
8993
|
+
standard: p(n, Yo),
|
|
8988
8994
|
issues: n.issues
|
|
8989
8995
|
};
|
|
8990
8996
|
}
|
|
8991
|
-
function yc(e, t = {}) {
|
|
8992
|
-
return _c(Qo(e), t);
|
|
8993
|
-
}
|
|
8994
8997
|
function bc(e, t = {}) {
|
|
8995
|
-
return vc(
|
|
8998
|
+
return vc($o(e), t);
|
|
8996
8999
|
}
|
|
8997
|
-
function xc(e) {
|
|
8998
|
-
return
|
|
9000
|
+
function xc(e, t = {}) {
|
|
9001
|
+
return yc($o(e), t);
|
|
8999
9002
|
}
|
|
9000
9003
|
function Sc(e) {
|
|
9001
|
-
return
|
|
9004
|
+
return Ue(e, Xo);
|
|
9005
|
+
}
|
|
9006
|
+
function Cc(e) {
|
|
9007
|
+
return es(e);
|
|
9002
9008
|
}
|
|
9003
9009
|
//#endregion
|
|
9004
|
-
export { X as CompositionError,
|
|
9010
|
+
export { X as CompositionError, vi as ENDPOINT_ACCESS_SCOPES, _i as ENDPOINT_OPERATION_KINDS, ho as PASSPORT_ACCESS_CLASSES, mo as PASSPORT_CONTENT_CLASSES, go as PASSPORT_UPI_LEVELS, Ms as PRIMITIVE_TYPES, Ys as TIER_BY_FIELD, Js as TIER_ORDER, Ks as applyView, Bs as buildProcessTree, Q as canonical, oc as clauseTextKey, zs as collectMappings, qs as componentIds, Hs as computeCoverage, mc as diffStandards, Us as discoverTransitive, Sc as dump, hi as dumpPackage, ks as dumpPrm, bs as effectiveUses, ac as elementIndex, _c as formatDiffReport, ds as groupBySourceFile, Is as isWellFormedMapType, vc as load, bc as loadFile, xc as loadFileWithIssues, us as loadPackage, ys as loadPackageWithIssues, fs as loadPackageWithProvenance, Os as loadPrm, yc as loadWithIssues, js as mapProfilesToPrm, Rs as mappingsFromProfile, Zs as normalizeSourceRef, ls as packageFiles, Ls as parseTargetRef, Fs as parseTypeExpression, As as prmToMapProfiles, _s as readPackageManifest, Ws as repoMap, Cc as validate };
|