@primmel/primmel 1.4.0 → 1.4.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/field-parser.d.ts.map +1 -1
- package/dist/src/ser-des/config/field-parser.js +12 -0
- package/dist/src/ser-des/config/field-parser.js.map +1 -1
- package/dist/src/ser-des/config/form.d.ts.map +1 -1
- package/dist/src/ser-des/config/form.js +1 -0
- package/dist/src/ser-des/config/form.js.map +1 -1
- package/dist/src/types/Form.d.ts +5 -0
- package/dist/src/types/Form.d.ts.map +1 -1
- package/dist-browser/index.mjs +298 -293
- package/dist-cli/primmel.mjs +9 -0
- package/package.json +1 -1
package/dist-browser/index.mjs
CHANGED
|
@@ -466,6 +466,7 @@ function ie(e, t, o) {
|
|
|
466
466
|
enumRef: "",
|
|
467
467
|
pattern: "",
|
|
468
468
|
required: !1,
|
|
469
|
+
requiredWhen: "",
|
|
469
470
|
measurementMethod: "",
|
|
470
471
|
calculationId: null,
|
|
471
472
|
calculationBindings: [],
|
|
@@ -506,7 +507,10 @@ function ie(e, t, o) {
|
|
|
506
507
|
else if (e === "examples") s.examples = a(c[l++]);
|
|
507
508
|
else if (e === "bind") s.bind = a(c[l++]);
|
|
508
509
|
else if (e === "required") s.required = a(c[l++]) === "true";
|
|
509
|
-
else if (e === "
|
|
510
|
+
else if (e === "required_when") {
|
|
511
|
+
let e = w(c, l);
|
|
512
|
+
s.requiredWhen = a(e.text), l = e.next;
|
|
513
|
+
} else if (e === "measurement_method") s.measurementMethod = a(c[l++]);
|
|
510
514
|
else if (e === "calculation") {
|
|
511
515
|
let e = w(c, l);
|
|
512
516
|
s.calculationId = a(e.text), l = e.next;
|
|
@@ -660,7 +664,7 @@ function le(e, t) {
|
|
|
660
664
|
}
|
|
661
665
|
t.applicability.length > 0 && (n += "applicability { " + j(t.applicability) + "} "), r.push(n + "}");
|
|
662
666
|
}
|
|
663
|
-
if (e.label && r.push("label \"" + s(e.label) + "\""), e.definition && r.push("definition \"" + s(e.definition) + "\""), e.description && r.push("description \"" + s(e.description) + "\""), e.unit && r.push("unit \"" + s(e.unit) + "\""), e.symbol && r.push("symbol " + e.symbol), e.verdict && r.push("verdict " + e.verdict), e.dimension && r.push("dimension " + e.dimension), e.enumRef && r.push("enum " + e.enumRef), e.pattern && r.push("pattern \"" + s(e.pattern) + "\""), e.scope && r.push("scope " + e.scope), e.examples && r.push("examples \"" + s(e.examples) + "\""), e.required && r.push("required true"), e.measurementMethod && r.push("measurement_method " + e.measurementMethod), e.calculationId && r.push("calculation " + T(e.calculationId)), e.calculationBindings.length > 0 && r.push("calculation_bindings { " + e.calculationBindings.map((e) => e.inputName + ": " + e.pathExpr).join(" ") + "}"), e.derivation && r.push("derivation \"" + s(e.derivation) + "\""), e.evaluation) {
|
|
667
|
+
if (e.label && r.push("label \"" + s(e.label) + "\""), e.definition && r.push("definition \"" + s(e.definition) + "\""), e.description && r.push("description \"" + s(e.description) + "\""), e.unit && r.push("unit \"" + s(e.unit) + "\""), e.symbol && r.push("symbol " + e.symbol), e.verdict && r.push("verdict " + e.verdict), e.dimension && r.push("dimension " + e.dimension), e.enumRef && r.push("enum " + e.enumRef), e.pattern && r.push("pattern \"" + s(e.pattern) + "\""), e.scope && r.push("scope " + e.scope), e.examples && r.push("examples \"" + s(e.examples) + "\""), e.required && r.push("required true"), e.requiredWhen && r.push("required_when " + T(e.requiredWhen)), e.measurementMethod && r.push("measurement_method " + e.measurementMethod), e.calculationId && r.push("calculation " + T(e.calculationId)), e.calculationBindings.length > 0 && r.push("calculation_bindings { " + e.calculationBindings.map((e) => e.inputName + ": " + e.pathExpr).join(" ") + "}"), e.derivation && r.push("derivation \"" + s(e.derivation) + "\""), e.evaluation) {
|
|
664
668
|
let t = "evaluation { rule \"" + s(e.evaluation.rule) + "\"";
|
|
665
669
|
e.evaluation.verdict && (t += " verdict " + e.evaluation.verdict), e.evaluation.op && (t += " op " + e.evaluation.op), e.evaluation.limit && (t += " limit \"" + s(e.evaluation.limit) + "\""), e.evaluation.condition && (t += " condition \"" + s(e.evaluation.condition) + "\""), e.evaluation.referenceId && (t += " reference { " + e.evaluation.referenceId + " }"), e.evaluation.specificationReference && (t += " specification_reference \"" + s(e.evaluation.specificationReference) + "\""), e.evaluation.sourceDiscrepancy && (t += " " + C(e.evaluation.sourceDiscrepancy, "")), r.push(t + " }");
|
|
666
670
|
}
|
|
@@ -2396,6 +2400,7 @@ function hn(e, t) {
|
|
|
2396
2400
|
enumRef: "",
|
|
2397
2401
|
pattern: "",
|
|
2398
2402
|
required: !1,
|
|
2403
|
+
requiredWhen: "",
|
|
2399
2404
|
measurementMethod: "",
|
|
2400
2405
|
calculationId: null,
|
|
2401
2406
|
calculationBindings: [],
|
|
@@ -3295,15 +3300,15 @@ function Zn(e) {
|
|
|
3295
3300
|
}
|
|
3296
3301
|
return t;
|
|
3297
3302
|
}
|
|
3298
|
-
function
|
|
3303
|
+
function Qn(e) {
|
|
3299
3304
|
let t = "";
|
|
3300
3305
|
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;
|
|
3301
3306
|
}
|
|
3302
|
-
function
|
|
3303
|
-
let t =
|
|
3304
|
-
return e.columns && (t += "columns { ", t += e.columns.ac ? "ac { " +
|
|
3307
|
+
function $n(e) {
|
|
3308
|
+
let t = Qn(e);
|
|
3309
|
+
return e.columns && (t += "columns { ", t += e.columns.ac ? "ac { " + Qn(e.columns.ac) + "} " : "ac null ", t += e.columns.dc ? "dc { " + Qn(e.columns.dc) + "} " : "dc null ", t += e.columns.vehicleDc ? "vehicle_dc { " + Qn(e.columns.vehicleDc) + "} " : "vehicle_dc null ", t += "} "), t;
|
|
3305
3310
|
}
|
|
3306
|
-
function
|
|
3311
|
+
function er(e, t) {
|
|
3307
3312
|
let n = t + "design {\n";
|
|
3308
3313
|
if (e.counts.length > 0) {
|
|
3309
3314
|
n += t + " counts {\n";
|
|
@@ -3318,7 +3323,7 @@ function $n(e, t) {
|
|
|
3318
3323
|
for (let r of e.severities) {
|
|
3319
3324
|
let e = t + " severity \"" + s(r.row) + "\" { ";
|
|
3320
3325
|
r.criterion && (e += "criterion " + r.criterion + " "), r.footnotes.length > 0 && (e += "footnotes { " + r.footnotes.join(" ") + " } ");
|
|
3321
|
-
for (let [t, n] of Object.entries(r.envClassValues)) e += "env " + t + " " + (n ? "{ " +
|
|
3326
|
+
for (let [t, n] of Object.entries(r.envClassValues)) e += "env " + t + " " + (n ? "{ " + $n(n) + "}" : "null") + " ";
|
|
3322
3327
|
n += e + "}\n";
|
|
3323
3328
|
}
|
|
3324
3329
|
n += t + " }\n";
|
|
@@ -3364,11 +3369,11 @@ function $n(e, t) {
|
|
|
3364
3369
|
}
|
|
3365
3370
|
//#endregion
|
|
3366
3371
|
//#region src/ser-des/config/competenceKind.ts
|
|
3367
|
-
function
|
|
3372
|
+
function tr(e) {
|
|
3368
3373
|
let t = a(e);
|
|
3369
3374
|
return t.trim() !== "" && !isNaN(Number(t)) ? Number(t) : t;
|
|
3370
3375
|
}
|
|
3371
|
-
function
|
|
3376
|
+
function nr(e) {
|
|
3372
3377
|
let t = {
|
|
3373
3378
|
value: 0,
|
|
3374
3379
|
unit: ""
|
|
@@ -3380,7 +3385,7 @@ function tr(e) {
|
|
|
3380
3385
|
}
|
|
3381
3386
|
return t;
|
|
3382
3387
|
}
|
|
3383
|
-
function
|
|
3388
|
+
function rr(e) {
|
|
3384
3389
|
let t = [], r = n(e), o = 0;
|
|
3385
3390
|
for (; o < r.length;) {
|
|
3386
3391
|
if (r[o++] !== "competence") {
|
|
@@ -3409,37 +3414,37 @@ function nr(e) {
|
|
|
3409
3414
|
for (; c < r.length;) {
|
|
3410
3415
|
let e = r[c++];
|
|
3411
3416
|
if (c >= r.length) break;
|
|
3412
|
-
e === "min" ? o.min =
|
|
3417
|
+
e === "min" ? o.min = tr(r[c++]) : e === "max" ? o.max = tr(r[c++]) : e === "unit" ? o.unit = a(r[c++]) : i(r[c++]);
|
|
3413
3418
|
}
|
|
3414
3419
|
e.range = o;
|
|
3415
|
-
} else r === "method_standard" ? e.methodStandard = a(t[s++]) : r === "resolution" ? e.resolution =
|
|
3420
|
+
} else r === "method_standard" ? e.methodStandard = a(t[s++]) : r === "resolution" ? e.resolution = nr(i(t[s++])) : r === "stability" ? e.stability = nr(i(t[s++])) : r === "description" ? e.description = a(t[s++]) : i(t[s++]);
|
|
3416
3421
|
}
|
|
3417
3422
|
}
|
|
3418
3423
|
t.push(e);
|
|
3419
3424
|
}
|
|
3420
3425
|
return t;
|
|
3421
3426
|
}
|
|
3422
|
-
function
|
|
3427
|
+
function ir(e, t) {
|
|
3423
3428
|
return t ? " " + e + " { value " + String(t.value) + " unit \"" + s(t.unit) + "\" }\n" : "";
|
|
3424
3429
|
}
|
|
3425
|
-
function
|
|
3430
|
+
function ar(e) {
|
|
3426
3431
|
return e === null ? "" : typeof e == "number" ? String(e) : "\"" + s(e) + "\"";
|
|
3427
3432
|
}
|
|
3428
|
-
function
|
|
3433
|
+
function or(e) {
|
|
3429
3434
|
let t = " required_competence {\n";
|
|
3430
3435
|
for (let n of e) {
|
|
3431
3436
|
if (t += " competence " + n.kind + " {\n", n.range) {
|
|
3432
3437
|
let e = " range {";
|
|
3433
|
-
n.range.min !== null && (e += " min " +
|
|
3438
|
+
n.range.min !== null && (e += " min " + ar(n.range.min)), n.range.max !== null && (e += " max " + ar(n.range.max)), e += " unit \"" + s(n.range.unit) + "\" }\n", t += e;
|
|
3434
3439
|
}
|
|
3435
|
-
n.methodStandard && (t += " method_standard \"" + s(n.methodStandard) + "\"\n"), t +=
|
|
3440
|
+
n.methodStandard && (t += " method_standard \"" + s(n.methodStandard) + "\"\n"), t += ir("resolution", n.resolution), t += ir("stability", n.stability), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
3436
3441
|
}
|
|
3437
3442
|
return t += " }\n", t;
|
|
3438
3443
|
}
|
|
3439
|
-
function
|
|
3444
|
+
function sr(e) {
|
|
3440
3445
|
return e.length >= 2 && e.charAt(0) === "\"" && e.charAt(e.length - 1) === "\"" ? o(e.substr(1, e.length - 2)) : i(e);
|
|
3441
3446
|
}
|
|
3442
|
-
var
|
|
3447
|
+
var cr = function(e, t) {
|
|
3443
3448
|
let n = {
|
|
3444
3449
|
id: e,
|
|
3445
3450
|
label: "",
|
|
@@ -3450,20 +3455,20 @@ var sr = function(e, t) {
|
|
|
3450
3455
|
for (; s < o.length;) {
|
|
3451
3456
|
let t = o[s++];
|
|
3452
3457
|
if (s >= o.length) throw Error(`Parsing error: competence_kind. ID ${e}: Expecting value for ${t}`);
|
|
3453
|
-
if (t === "label") n.label =
|
|
3454
|
-
else if (t === "definition") n.definition =
|
|
3458
|
+
if (t === "label") n.label = sr(o[s++]);
|
|
3459
|
+
else if (t === "definition") n.definition = sr(o[s++]);
|
|
3455
3460
|
else if (t === "source") n.source = k(i(o[s++]));
|
|
3456
3461
|
else if (t === "method_standard") {
|
|
3457
3462
|
let t = a(o[s++]);
|
|
3458
3463
|
if (s >= o.length) throw Error(`Parsing error: competence_kind. ID ${e}: Expecting title for method_standard ${t}`);
|
|
3459
3464
|
n.methodStandards.push({
|
|
3460
3465
|
id: t,
|
|
3461
|
-
title:
|
|
3466
|
+
title: sr(o[s++])
|
|
3462
3467
|
});
|
|
3463
3468
|
} else s++;
|
|
3464
3469
|
}
|
|
3465
3470
|
return (t) => (t.competenceKinds[e] = n, t);
|
|
3466
|
-
},
|
|
3471
|
+
}, lr = function(e) {
|
|
3467
3472
|
let t = "competence_kind " + e.id + " {\n";
|
|
3468
3473
|
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");
|
|
3469
3474
|
for (let n of e.methodStandards) t += " method_standard " + n.id + " \"" + s(n.title) + "\"\n";
|
|
@@ -3471,13 +3476,13 @@ var sr = function(e, t) {
|
|
|
3471
3476
|
};
|
|
3472
3477
|
//#endregion
|
|
3473
3478
|
//#region src/ser-des/config/conformanceTest.ts
|
|
3474
|
-
function
|
|
3479
|
+
function L(e) {
|
|
3475
3480
|
return n(a(e)).map(E).map(a).filter((e) => e.length > 0);
|
|
3476
3481
|
}
|
|
3477
|
-
function
|
|
3482
|
+
function ur(e) {
|
|
3478
3483
|
return e.trim() !== "" && !isNaN(Number(e)) ? Number(e) : e;
|
|
3479
3484
|
}
|
|
3480
|
-
function
|
|
3485
|
+
function dr(e) {
|
|
3481
3486
|
let t = [], r = n(e), o = 0;
|
|
3482
3487
|
for (; o < r.length;) {
|
|
3483
3488
|
if (r[o++] !== "variable") {
|
|
@@ -3523,7 +3528,7 @@ function ur(e) {
|
|
|
3523
3528
|
}
|
|
3524
3529
|
return t;
|
|
3525
3530
|
}
|
|
3526
|
-
function
|
|
3531
|
+
function fr(e) {
|
|
3527
3532
|
let t = [], r = n(e), o = 0;
|
|
3528
3533
|
for (; o < r.length;) {
|
|
3529
3534
|
if (r[o++] !== "precondition") {
|
|
@@ -3548,7 +3553,7 @@ function dr(e) {
|
|
|
3548
3553
|
}
|
|
3549
3554
|
return t;
|
|
3550
3555
|
}
|
|
3551
|
-
function
|
|
3556
|
+
function pr(e) {
|
|
3552
3557
|
let t = [], r = n(e), o = 0;
|
|
3553
3558
|
for (; o < r.length;) {
|
|
3554
3559
|
if (r[o++] !== "observable") {
|
|
@@ -3573,7 +3578,7 @@ function fr(e) {
|
|
|
3573
3578
|
}
|
|
3574
3579
|
return t;
|
|
3575
3580
|
}
|
|
3576
|
-
function
|
|
3581
|
+
function mr(e, t) {
|
|
3577
3582
|
let r = n(e), o = 0;
|
|
3578
3583
|
for (; o < r.length;) {
|
|
3579
3584
|
let e = r[o++];
|
|
@@ -3630,7 +3635,7 @@ function pr(e, t) {
|
|
|
3630
3635
|
t.acceptanceCriteria.push(c);
|
|
3631
3636
|
}
|
|
3632
3637
|
}
|
|
3633
|
-
function
|
|
3638
|
+
function hr(e) {
|
|
3634
3639
|
let t = [], r = n(e), o = 0;
|
|
3635
3640
|
for (; o < r.length;) {
|
|
3636
3641
|
if (r[o++] !== "value") {
|
|
@@ -3653,7 +3658,7 @@ function mr(e) {
|
|
|
3653
3658
|
}
|
|
3654
3659
|
return t;
|
|
3655
3660
|
}
|
|
3656
|
-
function
|
|
3661
|
+
function gr(e) {
|
|
3657
3662
|
let t = {}, r = n(e), i = 0;
|
|
3658
3663
|
for (; i < r.length;) {
|
|
3659
3664
|
let e = E(r[i++]);
|
|
@@ -3662,7 +3667,7 @@ function hr(e) {
|
|
|
3662
3667
|
}
|
|
3663
3668
|
return t;
|
|
3664
3669
|
}
|
|
3665
|
-
function
|
|
3670
|
+
function _r(e) {
|
|
3666
3671
|
let t = {
|
|
3667
3672
|
by: "",
|
|
3668
3673
|
values: {}
|
|
@@ -3681,7 +3686,7 @@ function gr(e) {
|
|
|
3681
3686
|
for (; l < o.length;) {
|
|
3682
3687
|
let e = E(o[l++]);
|
|
3683
3688
|
if (l >= o.length) break;
|
|
3684
|
-
o[l] === ":" && l++, l < o.length && (c[e] =
|
|
3689
|
+
o[l] === ":" && l++, l < o.length && (c[e] = ur(a(o[l++])));
|
|
3685
3690
|
}
|
|
3686
3691
|
t.values[r] = c;
|
|
3687
3692
|
}
|
|
@@ -3690,7 +3695,7 @@ function gr(e) {
|
|
|
3690
3695
|
}
|
|
3691
3696
|
return t;
|
|
3692
3697
|
}
|
|
3693
|
-
var
|
|
3698
|
+
var vr = function(e, t) {
|
|
3694
3699
|
let o = {
|
|
3695
3700
|
id: e,
|
|
3696
3701
|
name: "",
|
|
@@ -3758,30 +3763,30 @@ var _r = function(e, t) {
|
|
|
3758
3763
|
action: v(() => e[n + 1]),
|
|
3759
3764
|
outputs: []
|
|
3760
3765
|
};
|
|
3761
|
-
n += 2, e[n] === "inputs" && n + 1 < e.length && (r.inputs =
|
|
3766
|
+
n += 2, e[n] === "inputs" && n + 1 < e.length && (r.inputs = L(e[n + 1]), n += 2), e[n] === "outputs" && n + 1 < e.length && (r.outputs = L(e[n + 1]), n += 2), o.procedure.push(r);
|
|
3762
3767
|
} else n++;
|
|
3763
3768
|
}
|
|
3764
|
-
} else if (e === "procedure_steps") o.procedureSteps =
|
|
3769
|
+
} else if (e === "procedure_steps") o.procedureSteps = L(t());
|
|
3765
3770
|
else if (e === "kind") o.kind = a(t());
|
|
3766
3771
|
else if (e === "obligation") o.obligation = a(t());
|
|
3767
3772
|
else if (e === "obligation_note") o.obligationNote = v(t);
|
|
3768
|
-
else if (e === "test_subject") o.testSubject =
|
|
3769
|
-
else if (e === "variables") o.variables =
|
|
3770
|
-
else if (e === "observables") o.observables =
|
|
3771
|
-
else if (e === "conditions_to_enforce" || e === "conditionsToEnforce") o.conditionsToEnforce =
|
|
3772
|
-
else if (e === "preconditions") o.preconditions =
|
|
3773
|
-
else if (e === "reference_materials") o.referenceMaterials =
|
|
3774
|
-
else if (e === "required_competence") o.requiredCompetence =
|
|
3775
|
-
else if (e === "acceptance_criteria")
|
|
3773
|
+
else if (e === "test_subject") o.testSubject = gr(i(t()));
|
|
3774
|
+
else if (e === "variables") o.variables = dr(i(t()));
|
|
3775
|
+
else if (e === "observables") o.observables = pr(i(t()));
|
|
3776
|
+
else if (e === "conditions_to_enforce" || e === "conditionsToEnforce") o.conditionsToEnforce = L(t());
|
|
3777
|
+
else if (e === "preconditions") o.preconditions = fr(i(t()));
|
|
3778
|
+
else if (e === "reference_materials") o.referenceMaterials = L(t());
|
|
3779
|
+
else if (e === "required_competence") o.requiredCompetence = rr(i(t()));
|
|
3780
|
+
else if (e === "acceptance_criteria") mr(i(t()), o);
|
|
3776
3781
|
else if (e === "design") o.design = Jn(i(t()));
|
|
3777
3782
|
else if (e === "acceptance") o.acceptance = zn(i(t()));
|
|
3778
|
-
else if (e === "dependencies") o.dependencies =
|
|
3779
|
-
else if (e === "instances") o.instances =
|
|
3783
|
+
else if (e === "dependencies") o.dependencies = L(t());
|
|
3784
|
+
else if (e === "instances") o.instances = _r(i(t()));
|
|
3780
3785
|
else if (e === "inherits_from") o.inheritsFrom = a(t());
|
|
3781
|
-
else if (e === "result_forms") o.resultForms =
|
|
3782
|
-
else if (e === "produces_artifacts") o.producesArtifacts =
|
|
3783
|
-
else if (e === "report_rows") o.reportRows =
|
|
3784
|
-
else if (e === "derived_values") o.derivedValues =
|
|
3786
|
+
else if (e === "result_forms") o.resultForms = L(t());
|
|
3787
|
+
else if (e === "produces_artifacts") o.producesArtifacts = L(t());
|
|
3788
|
+
else if (e === "report_rows") o.reportRows = L(t());
|
|
3789
|
+
else if (e === "derived_values") o.derivedValues = hr(i(t()));
|
|
3785
3790
|
else if (e === "validate_measurement") {
|
|
3786
3791
|
let e = r(t());
|
|
3787
3792
|
for (let t of e) t.startsWith("\"") && o.measurements.push(i(t));
|
|
@@ -3792,7 +3797,7 @@ var _r = function(e, t) {
|
|
|
3792
3797
|
construct: "conformance_test",
|
|
3793
3798
|
id: e
|
|
3794
3799
|
}), (t) => (t.conformanceTests[e] = o, t);
|
|
3795
|
-
},
|
|
3800
|
+
}, yr = function(e) {
|
|
3796
3801
|
let t = "conformance_test " + e.id + " {\n";
|
|
3797
3802
|
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 += " reference { doc \"" + s(n.doc) + "\" clause \"" + s(n.clause) + "\"" + (n.fragment ? " fragment \"" + s(n.fragment) + "\"" : "") + " }\n";
|
|
3798
3803
|
else e.sourceRef && e.sourceRef.doc ? t += " reference { doc \"" + s(e.sourceRef.doc) + "\" clause \"" + s(e.sourceRef.clause) + "\"" + (e.sourceRef.fragment ? " fragment \"" + s(e.sourceRef.fragment) + "\"" : "") + " }\n" : e.reference && (t += " reference " + e.reference + "\n");
|
|
@@ -3852,7 +3857,7 @@ var _r = function(e, t) {
|
|
|
3852
3857
|
}
|
|
3853
3858
|
t += " }\n";
|
|
3854
3859
|
}
|
|
3855
|
-
if (e.referenceMaterials.length > 0 && (t += " reference_materials { " + e.referenceMaterials.join(" ") + " }\n"), e.requiredCompetence.length > 0 && (t +=
|
|
3860
|
+
if (e.referenceMaterials.length > 0 && (t += " reference_materials { " + e.referenceMaterials.join(" ") + " }\n"), e.requiredCompetence.length > 0 && (t += or(e.requiredCompetence)), e.acceptanceCriteria.length > 0 || e.acceptanceCriteriaType || e.acceptancePassIf) {
|
|
3856
3861
|
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");
|
|
3857
3862
|
for (let n of e.acceptanceCriteria) {
|
|
3858
3863
|
let e = " criterion " + (n.item || "\"\"") + " { ";
|
|
@@ -3860,7 +3865,7 @@ var _r = function(e, t) {
|
|
|
3860
3865
|
}
|
|
3861
3866
|
t += " }\n";
|
|
3862
3867
|
}
|
|
3863
|
-
if (e.design && (t +=
|
|
3868
|
+
if (e.design && (t += er(e.design, " ")), e.acceptance && (t += Bn(e.acceptance, " ") + "\n"), e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.instances) {
|
|
3864
3869
|
let n = " instances { by " + e.instances.by + " values { ";
|
|
3865
3870
|
for (let [t, r] of Object.entries(e.instances.values)) {
|
|
3866
3871
|
n += t + " { ";
|
|
@@ -3875,7 +3880,7 @@ var _r = function(e, t) {
|
|
|
3875
3880
|
t += " }\n";
|
|
3876
3881
|
}
|
|
3877
3882
|
return e.sourceDiscrepancy && (t += C(e.sourceDiscrepancy, " ") + "\n"), t += "}\n", t;
|
|
3878
|
-
},
|
|
3883
|
+
}, br = function(e, t) {
|
|
3879
3884
|
let n = {
|
|
3880
3885
|
id: e,
|
|
3881
3886
|
label: "",
|
|
@@ -3914,7 +3919,7 @@ var _r = function(e, t) {
|
|
|
3914
3919
|
construct: "term",
|
|
3915
3920
|
id: e
|
|
3916
3921
|
}), (t) => (t.terms[e] = n, t);
|
|
3917
|
-
},
|
|
3922
|
+
}, xr = function(e) {
|
|
3918
3923
|
let t = "term " + e.id + " {\n";
|
|
3919
3924
|
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.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");
|
|
3920
3925
|
let n = (e) => /\s/.test(e) ? "\"" + s(e) + "\"" : e;
|
|
@@ -3924,17 +3929,17 @@ var _r = function(e, t) {
|
|
|
3924
3929
|
t += " }\n";
|
|
3925
3930
|
}
|
|
3926
3931
|
return t += "}\n", t;
|
|
3927
|
-
},
|
|
3932
|
+
}, Sr = [
|
|
3928
3933
|
"none",
|
|
3929
3934
|
"max",
|
|
3930
3935
|
"mean",
|
|
3931
3936
|
"worst_case",
|
|
3932
3937
|
"max_abs_over_window"
|
|
3933
3938
|
];
|
|
3934
|
-
function
|
|
3939
|
+
function Cr(e) {
|
|
3935
3940
|
return n(a(e)).map(E).map(a).filter((e) => e.length > 0);
|
|
3936
3941
|
}
|
|
3937
|
-
var
|
|
3942
|
+
var wr = function(e, t) {
|
|
3938
3943
|
let r = {
|
|
3939
3944
|
id: e,
|
|
3940
3945
|
quantityKind: "",
|
|
@@ -3956,10 +3961,10 @@ var Cr = function(e, t) {
|
|
|
3956
3961
|
} else if (t === "symbol") r.symbol = v(o);
|
|
3957
3962
|
else if (t === "behavior") r.behavior = o();
|
|
3958
3963
|
else if (t === "derive" || t === "expression") r.derive = v(o);
|
|
3959
|
-
else if (t === "inputs" || t === "uses") r.inputs =
|
|
3964
|
+
else if (t === "inputs" || t === "uses") r.inputs = Cr(o());
|
|
3960
3965
|
else if (t === "series_reduction") {
|
|
3961
3966
|
let t = o();
|
|
3962
|
-
if (!
|
|
3967
|
+
if (!Sr.includes(t)) throw Error(`Parsing error: verdict. ID ${e}: Unknown series_reduction ${t} (valid: ${Sr.join(", ")})`);
|
|
3963
3968
|
r.seriesReduction = t;
|
|
3964
3969
|
} else if (t === "acceptance") r.acceptance = zn(i(o()));
|
|
3965
3970
|
else if (t === "source" || t === "reference") r.source = k(i(o()));
|
|
@@ -3969,13 +3974,13 @@ var Cr = function(e, t) {
|
|
|
3969
3974
|
construct: "verdict",
|
|
3970
3975
|
id: e
|
|
3971
3976
|
}), (t) => (t.verdicts[e] = r, t);
|
|
3972
|
-
},
|
|
3977
|
+
}, Tr = function(e) {
|
|
3973
3978
|
let t = "verdict " + e.id + " {\n";
|
|
3974
3979
|
return 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 += Bn(e.acceptance, " ") + "\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 += "}\n", t;
|
|
3975
3980
|
};
|
|
3976
3981
|
//#endregion
|
|
3977
3982
|
//#region src/ser-des/config/referenceMaterial.ts
|
|
3978
|
-
function
|
|
3983
|
+
function Er(e) {
|
|
3979
3984
|
let t = [], r = n(e), o = 0;
|
|
3980
3985
|
for (; o < r.length;) {
|
|
3981
3986
|
if (r[o++] !== "field") {
|
|
@@ -4001,7 +4006,7 @@ function Tr(e) {
|
|
|
4001
4006
|
}
|
|
4002
4007
|
return t;
|
|
4003
4008
|
}
|
|
4004
|
-
function
|
|
4009
|
+
function Dr(e) {
|
|
4005
4010
|
let t = [], r = n(e), o = 0;
|
|
4006
4011
|
for (; o < r.length;) {
|
|
4007
4012
|
if (r[o++] !== "constraint") {
|
|
@@ -4050,7 +4055,7 @@ function Er(e) {
|
|
|
4050
4055
|
}
|
|
4051
4056
|
return t;
|
|
4052
4057
|
}
|
|
4053
|
-
var
|
|
4058
|
+
var Or = function(e, t) {
|
|
4054
4059
|
let n = {
|
|
4055
4060
|
id: e,
|
|
4056
4061
|
kind: "",
|
|
@@ -4065,8 +4070,8 @@ var Dr = function(e, t) {
|
|
|
4065
4070
|
else if (e === "name") n.name = v(t);
|
|
4066
4071
|
else if (e === "definition") n.definition = v(t);
|
|
4067
4072
|
else if (e === "source") n.source = k(i(t()));
|
|
4068
|
-
else if (e === "identity_fields") n.identityFields =
|
|
4069
|
-
else if (e === "constraints") n.constraints =
|
|
4073
|
+
else if (e === "identity_fields") n.identityFields = Er(i(t()));
|
|
4074
|
+
else if (e === "constraints") n.constraints = Dr(i(t()));
|
|
4070
4075
|
else return !1;
|
|
4071
4076
|
return !0;
|
|
4072
4077
|
}, {
|
|
@@ -4074,12 +4079,12 @@ var Dr = function(e, t) {
|
|
|
4074
4079
|
id: e
|
|
4075
4080
|
}), (t) => (t.referenceMaterials[e] = n, t);
|
|
4076
4081
|
};
|
|
4077
|
-
function
|
|
4082
|
+
function kr(e, t) {
|
|
4078
4083
|
return !e || !e.doc && !e.clause ? "" : t + "source { doc \"" + s(e.doc) + "\" clause \"" + s(e.clause) + "\"" + (e.fragment ? " fragment \"" + s(e.fragment) + "\"" : "") + " }\n";
|
|
4079
4084
|
}
|
|
4080
|
-
var
|
|
4085
|
+
var Ar = function(e) {
|
|
4081
4086
|
let t = "reference_material " + e.id + " {\n";
|
|
4082
|
-
if (e.kind && (t += " kind " + e.kind + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), t +=
|
|
4087
|
+
if (e.kind && (t += " kind " + e.kind + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), t += kr(e.source, " "), e.identityFields.length > 0) {
|
|
4083
4088
|
t += " identity_fields {\n";
|
|
4084
4089
|
for (let n of e.identityFields) {
|
|
4085
4090
|
let e = " field " + n.name + " { ";
|
|
@@ -4092,7 +4097,7 @@ var kr = function(e) {
|
|
|
4092
4097
|
for (let n of e.constraints) {
|
|
4093
4098
|
t += " constraint " + n.id + " {\n", n.description && (t += " description \"" + s(n.description) + "\"\n"), n.rule && (t += " rule \"" + s(n.rule) + "\"\n");
|
|
4094
4099
|
let e = Object.keys(n.evidence);
|
|
4095
|
-
e.length > 0 && (t += " evidence { " + e.map((e) => e + ": " + n.evidence[e]).join(" ") + " }\n"), n.override && (t += " override { rule \"" + s(n.override.rule) + "\"", t += " by " + n.override.by, n.override.evidence && (t += " evidence " + n.override.evidence), t += " }\n"), n.onViolation && (t += " on_violation " + n.onViolation + "\n"), t +=
|
|
4100
|
+
e.length > 0 && (t += " evidence { " + e.map((e) => e + ": " + n.evidence[e]).join(" ") + " }\n"), n.override && (t += " override { rule \"" + s(n.override.rule) + "\"", t += " by " + n.override.by, n.override.evidence && (t += " evidence " + n.override.evidence), t += " }\n"), n.onViolation && (t += " on_violation " + n.onViolation + "\n"), t += kr(n.source, " "), t += " }\n";
|
|
4096
4101
|
}
|
|
4097
4102
|
t += " }\n";
|
|
4098
4103
|
}
|
|
@@ -4100,10 +4105,10 @@ var kr = function(e) {
|
|
|
4100
4105
|
};
|
|
4101
4106
|
//#endregion
|
|
4102
4107
|
//#region src/ser-des/config/constraint.ts
|
|
4103
|
-
function
|
|
4108
|
+
function jr(e) {
|
|
4104
4109
|
return e.length >= 2 && e.charAt(0) === "\"" && e.charAt(e.length - 1) === "\"" ? o(e.substr(1, e.length - 2)) : i(e);
|
|
4105
4110
|
}
|
|
4106
|
-
var
|
|
4111
|
+
var Mr = function(e, t) {
|
|
4107
4112
|
let n = {
|
|
4108
4113
|
id: e,
|
|
4109
4114
|
stereotype: "",
|
|
@@ -4116,13 +4121,13 @@ var jr = function(e, t) {
|
|
|
4116
4121
|
for (; s < o.length;) {
|
|
4117
4122
|
let t = o[s++];
|
|
4118
4123
|
if (s >= o.length) throw Error(`Parsing error: constraint. ID ${e}: Expecting value for ${t}`);
|
|
4119
|
-
t === "stereotype" ? n.stereotype = a(o[s++]) : t === "name" ? n.name =
|
|
4124
|
+
t === "stereotype" ? n.stereotype = a(o[s++]) : t === "name" ? n.name = jr(o[s++]) : t === "check" ? n.check = jr(o[s++]) : t === "violation_meaning" ? n.violationMeaning = jr(o[s++]) : t === "on_violation" ? n.onViolation = a(o[s++]) : t === "source" ? n.source = k(i(o[s++])) : s++;
|
|
4120
4125
|
}
|
|
4121
4126
|
return (t) => (t.constraints[e] = n, t);
|
|
4122
|
-
},
|
|
4127
|
+
}, Nr = function(e) {
|
|
4123
4128
|
let t = "constraint " + e.id + " {\n";
|
|
4124
4129
|
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 += "}\n", t;
|
|
4125
|
-
},
|
|
4130
|
+
}, Pr = ["open", "resolved"], Fr = function(e, t) {
|
|
4126
4131
|
let i = {
|
|
4127
4132
|
id: e,
|
|
4128
4133
|
status: "",
|
|
@@ -4137,7 +4142,7 @@ var jr = function(e, t) {
|
|
|
4137
4142
|
if (s >= o.length) throw Error(`Parsing error: discrepancy_record. ID ${e}: Expecting value for ${t}`);
|
|
4138
4143
|
if (t === "status") {
|
|
4139
4144
|
let t = a(o[s++]);
|
|
4140
|
-
if (!
|
|
4145
|
+
if (!Pr.includes(t)) throw Error(`Parsing error: discrepancy_record. ID ${e}: Unknown status ${t} (valid: ${Pr.join(", ")})`);
|
|
4141
4146
|
i.status = t;
|
|
4142
4147
|
} else if (t === "summary") i.summary = a(o[s++]);
|
|
4143
4148
|
else if (t === "sources") i.sources = n(a(o[s++])).map(a).filter((e) => e.length > 0);
|
|
@@ -4148,13 +4153,13 @@ var jr = function(e, t) {
|
|
|
4148
4153
|
} else t === "governing" ? i.governing = a(o[s++]) : t === "rationale" ? i.rationale = a(o[s++]) : s++;
|
|
4149
4154
|
}
|
|
4150
4155
|
return (t) => (t.discrepancyRecords[e] = i, t);
|
|
4151
|
-
},
|
|
4156
|
+
}, Ir = function(e) {
|
|
4152
4157
|
let t = "discrepancy_record " + e.id + " {\n";
|
|
4153
4158
|
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;
|
|
4154
4159
|
};
|
|
4155
4160
|
//#endregion
|
|
4156
4161
|
//#region src/ser-des/config/testPointSet.ts
|
|
4157
|
-
function
|
|
4162
|
+
function Lr(e) {
|
|
4158
4163
|
let t = {}, r = n(e), o = 0;
|
|
4159
4164
|
for (; o < r.length;) {
|
|
4160
4165
|
let e = E(r[o++]);
|
|
@@ -4174,7 +4179,7 @@ function Ir(e) {
|
|
|
4174
4179
|
}
|
|
4175
4180
|
return t;
|
|
4176
4181
|
}
|
|
4177
|
-
function
|
|
4182
|
+
function Rr(e) {
|
|
4178
4183
|
let t = [], r = n(e), o = 0;
|
|
4179
4184
|
for (; o < r.length;) {
|
|
4180
4185
|
if (r[o++] !== "point") {
|
|
@@ -4199,7 +4204,7 @@ function Lr(e) {
|
|
|
4199
4204
|
}
|
|
4200
4205
|
return t;
|
|
4201
4206
|
}
|
|
4202
|
-
var
|
|
4207
|
+
var zr = function(e, t) {
|
|
4203
4208
|
let n = {
|
|
4204
4209
|
id: e,
|
|
4205
4210
|
description: "",
|
|
@@ -4211,16 +4216,16 @@ var Rr = function(e, t) {
|
|
|
4211
4216
|
return g(t, (e, t) => {
|
|
4212
4217
|
if (e === "description") n.description = v(t);
|
|
4213
4218
|
else if (e === "source") n.source = k(i(t()));
|
|
4214
|
-
else if (e === "cardinality") n.cardinality =
|
|
4219
|
+
else if (e === "cardinality") n.cardinality = Lr(i(t()));
|
|
4215
4220
|
else if (e === "repetitions_per_point") n.repetitionsPerPoint = Number(a(t()));
|
|
4216
|
-
else if (e === "points") n.points =
|
|
4221
|
+
else if (e === "points") n.points = Rr(i(t()));
|
|
4217
4222
|
else return !1;
|
|
4218
4223
|
return !0;
|
|
4219
4224
|
}, {
|
|
4220
4225
|
construct: "test_point_set",
|
|
4221
4226
|
id: e
|
|
4222
4227
|
}), (t) => (t.testPointSets[e] = n, t);
|
|
4223
|
-
},
|
|
4228
|
+
}, Br = function(e) {
|
|
4224
4229
|
let t = "test_point_set " + e.id + " {\n";
|
|
4225
4230
|
e.description && (t += " description \"" + s(e.description) + "\"\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");
|
|
4226
4231
|
let n = Object.keys(e.cardinality);
|
|
@@ -4244,10 +4249,10 @@ var Rr = function(e, t) {
|
|
|
4244
4249
|
};
|
|
4245
4250
|
//#endregion
|
|
4246
4251
|
//#region src/ser-des/config/requirement.ts
|
|
4247
|
-
function
|
|
4252
|
+
function R(e) {
|
|
4248
4253
|
return n(a(e)).map(E).map(a).filter((e) => e.length > 0);
|
|
4249
4254
|
}
|
|
4250
|
-
function
|
|
4255
|
+
function Vr(e) {
|
|
4251
4256
|
let t = {
|
|
4252
4257
|
verdict: "",
|
|
4253
4258
|
op: "",
|
|
@@ -4261,7 +4266,7 @@ function Br(e) {
|
|
|
4261
4266
|
}
|
|
4262
4267
|
return t;
|
|
4263
4268
|
}
|
|
4264
|
-
function
|
|
4269
|
+
function Hr(e) {
|
|
4265
4270
|
let t = {
|
|
4266
4271
|
expression: "",
|
|
4267
4272
|
uses: [],
|
|
@@ -4275,11 +4280,11 @@ function Vr(e) {
|
|
|
4275
4280
|
for (; o < r.length;) {
|
|
4276
4281
|
let e = r[o++];
|
|
4277
4282
|
if (o >= r.length) break;
|
|
4278
|
-
e === "expression" ? t.expression = a(r[o++]) : e === "uses" ? t.uses =
|
|
4283
|
+
e === "expression" ? t.expression = a(r[o++]) : e === "uses" ? t.uses = R(r[o++]) : e === "modality" ? t.modality = a(r[o++]) : e === "relative_to" ? t.relativeTo = a(r[o++]) : e === "notes" ? t.notes = a(r[o++]) : e === "accepts" ? t.accepts = Vr(i(r[o++])) : e === "acceptance" ? t.acceptance = zn(i(r[o++])) : e === "source_discrepancy" ? t.sourceDiscrepancy = S(i(r[o++])) : i(r[o++]);
|
|
4279
4284
|
}
|
|
4280
4285
|
return t;
|
|
4281
4286
|
}
|
|
4282
|
-
function
|
|
4287
|
+
function Ur(e) {
|
|
4283
4288
|
let t = [], r = n(e), o = 0;
|
|
4284
4289
|
for (; o < r.length;) {
|
|
4285
4290
|
if (r[o++] !== "subject") {
|
|
@@ -4303,7 +4308,7 @@ function Hr(e) {
|
|
|
4303
4308
|
}
|
|
4304
4309
|
return t;
|
|
4305
4310
|
}
|
|
4306
|
-
function
|
|
4311
|
+
function Wr(e) {
|
|
4307
4312
|
let t = [], r = n(e), o = 0;
|
|
4308
4313
|
for (; o < r.length;) {
|
|
4309
4314
|
if (r[o++] !== "param") {
|
|
@@ -4337,14 +4342,14 @@ function Ur(e) {
|
|
|
4337
4342
|
if (o >= r.length) break;
|
|
4338
4343
|
t === "min" ? (e.rangeMin = a(r[o++]), e.hasRange = !0) : t === "max" ? (e.rangeMax = a(r[o++]), e.hasRange = !0) : i(r[o++]);
|
|
4339
4344
|
}
|
|
4340
|
-
} else r === "enum_values" ? e.enumValues =
|
|
4345
|
+
} else r === "enum_values" ? e.enumValues = R(t[s++]) : i(t[s++]);
|
|
4341
4346
|
}
|
|
4342
4347
|
}
|
|
4343
4348
|
t.push(e);
|
|
4344
4349
|
}
|
|
4345
4350
|
return t;
|
|
4346
4351
|
}
|
|
4347
|
-
var
|
|
4352
|
+
var Gr = function(e, t) {
|
|
4348
4353
|
let o = {
|
|
4349
4354
|
id: e,
|
|
4350
4355
|
name: "",
|
|
@@ -4370,10 +4375,10 @@ var Wr = function(e, t) {
|
|
|
4370
4375
|
if (e === "name") o.name = a(s[c++]);
|
|
4371
4376
|
else if (e === "statement") o.statement = a(s[c++]);
|
|
4372
4377
|
else if (e === "guidance") o.guidance = a(s[c++]);
|
|
4373
|
-
else if (e === "binds_to") o.bindsTo =
|
|
4374
|
-
else if (e === "subjects") o.subjects =
|
|
4375
|
-
else if (e === "parameters") o.parameters =
|
|
4376
|
-
else if (e === "limit") o.limit =
|
|
4378
|
+
else if (e === "binds_to") o.bindsTo = R(s[c++]);
|
|
4379
|
+
else if (e === "subjects") o.subjects = Ur(i(s[c++]));
|
|
4380
|
+
else if (e === "parameters") o.parameters = Wr(i(s[c++]));
|
|
4381
|
+
else if (e === "limit") o.limit = Hr(i(s[c++]));
|
|
4377
4382
|
else if (e === "applicability") o.applicability = A(i(s[c++]));
|
|
4378
4383
|
else if (e === "channel") o.channel = a(s[c++]);
|
|
4379
4384
|
else if (e === "report_row") o.reportRow = a(s[c++]);
|
|
@@ -4386,7 +4391,7 @@ var Wr = function(e, t) {
|
|
|
4386
4391
|
if (t >= e.length) break;
|
|
4387
4392
|
n === "method" ? o.verificationMethod = a(e[t++]) : n === "description" ? o.verificationDescription = a(e[t++]) : i(e[t++]);
|
|
4388
4393
|
}
|
|
4389
|
-
} else if (e === "dependencies") o.dependencies =
|
|
4394
|
+
} else if (e === "dependencies") o.dependencies = R(s[c++]);
|
|
4390
4395
|
else if (e === "source_discrepancy") o.sourceDiscrepancy = S(i(s[c++]));
|
|
4391
4396
|
else if (e === "source" || e === "reference") {
|
|
4392
4397
|
let e = k(i(s[c++]));
|
|
@@ -4395,7 +4400,7 @@ var Wr = function(e, t) {
|
|
|
4395
4400
|
}
|
|
4396
4401
|
return (t) => (t.requirements[e] = o, t);
|
|
4397
4402
|
};
|
|
4398
|
-
function
|
|
4403
|
+
function Kr(e) {
|
|
4399
4404
|
let t = " limit {\n";
|
|
4400
4405
|
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.accepts) {
|
|
4401
4406
|
let n = e.accepts, r = " accepts { verdict " + n.verdict;
|
|
@@ -4403,7 +4408,7 @@ function Gr(e) {
|
|
|
4403
4408
|
}
|
|
4404
4409
|
return e.acceptance && (t += Bn(e.acceptance, " ") + "\n"), e.sourceDiscrepancy && (t += C(e.sourceDiscrepancy, " ") + "\n"), t += " }\n", t;
|
|
4405
4410
|
}
|
|
4406
|
-
var
|
|
4411
|
+
var qr = function(e) {
|
|
4407
4412
|
let t = "requirement " + e.id + " {\n";
|
|
4408
4413
|
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) {
|
|
4409
4414
|
t += " subjects { ";
|
|
@@ -4418,14 +4423,14 @@ var Kr = function(e) {
|
|
|
4418
4423
|
}
|
|
4419
4424
|
t += " }\n";
|
|
4420
4425
|
}
|
|
4421
|
-
if (e.limit && (t +=
|
|
4426
|
+
if (e.limit && (t += Kr(e.limit)), e.applicability.length > 0 && (t += " applicability {\n " + j(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) {
|
|
4422
4427
|
let n = " verification { method " + e.verificationMethod;
|
|
4423
4428
|
e.verificationDescription && (n += " description \"" + s(e.verificationDescription) + "\""), t += n + " }\n";
|
|
4424
4429
|
}
|
|
4425
4430
|
e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.sourceDiscrepancy && (t += C(e.sourceDiscrepancy, " ") + "\n");
|
|
4426
4431
|
for (let n of e.sourceRefs ?? (e.source && (e.source.doc || e.source.clause) ? [e.source] : [])) t += " source { doc \"" + s(n.doc) + "\" clause \"" + s(n.clause) + "\"" + (n.fragment ? " fragment \"" + s(n.fragment) + "\"" : "") + " }\n";
|
|
4427
4432
|
return t += "}\n", t;
|
|
4428
|
-
},
|
|
4433
|
+
}, Jr = function(e, t) {
|
|
4429
4434
|
let n = {
|
|
4430
4435
|
id: e,
|
|
4431
4436
|
name: "",
|
|
@@ -4437,46 +4442,46 @@ var Kr = function(e) {
|
|
|
4437
4442
|
for (; s < o.length;) {
|
|
4438
4443
|
let e = o[s++];
|
|
4439
4444
|
if (s >= o.length) break;
|
|
4440
|
-
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 = A(i(o[s++])) : e === "dependencies" ? n.dependencies =
|
|
4445
|
+
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 = A(i(o[s++])) : e === "dependencies" ? n.dependencies = R(o[s++]) : e === "reference" ? n.referenceIds = R(o[s++]) : i(o[s++]);
|
|
4441
4446
|
}
|
|
4442
4447
|
return (t) => (t.requirementClasses[e] = n, t);
|
|
4443
|
-
},
|
|
4448
|
+
}, Yr = function(e) {
|
|
4444
4449
|
let t = "requirement_class " + e.id + " {\n";
|
|
4445
4450
|
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 " + j(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;
|
|
4446
|
-
},
|
|
4451
|
+
}, Xr = {
|
|
4447
4452
|
keyword: "requirement",
|
|
4448
4453
|
field: "requirements",
|
|
4449
4454
|
takesID: !0,
|
|
4450
|
-
parse:
|
|
4451
|
-
dump:
|
|
4452
|
-
},
|
|
4455
|
+
parse: Gr,
|
|
4456
|
+
dump: qr
|
|
4457
|
+
}, Zr = {
|
|
4453
4458
|
keyword: "requirement_class",
|
|
4454
4459
|
field: "requirementClasses",
|
|
4455
4460
|
takesID: !0,
|
|
4456
|
-
parse:
|
|
4457
|
-
dump:
|
|
4461
|
+
parse: Jr,
|
|
4462
|
+
dump: Yr
|
|
4458
4463
|
};
|
|
4459
4464
|
//#endregion
|
|
4460
4465
|
//#region src/ser-des/config/packageManifest.ts
|
|
4461
|
-
function
|
|
4466
|
+
function z(e) {
|
|
4462
4467
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
4463
4468
|
}
|
|
4464
|
-
var
|
|
4469
|
+
var Qr = [
|
|
4465
4470
|
"core",
|
|
4466
4471
|
"module",
|
|
4467
4472
|
"rec",
|
|
4468
4473
|
"product_reference",
|
|
4469
4474
|
"certification_program"
|
|
4470
|
-
],
|
|
4475
|
+
], $r = [
|
|
4471
4476
|
"current",
|
|
4472
4477
|
"preview",
|
|
4473
4478
|
"superseded",
|
|
4474
4479
|
"withdrawn"
|
|
4475
4480
|
];
|
|
4476
|
-
function
|
|
4477
|
-
return e.startsWith("{") ?
|
|
4481
|
+
function ei(e) {
|
|
4482
|
+
return e.startsWith("{") ? z(e) : [a(e)];
|
|
4478
4483
|
}
|
|
4479
|
-
var
|
|
4484
|
+
var ti = function(e) {
|
|
4480
4485
|
let t = {
|
|
4481
4486
|
id: "",
|
|
4482
4487
|
title: "",
|
|
@@ -4495,12 +4500,12 @@ var ei = function(e) {
|
|
|
4495
4500
|
if (e === "id") t.id = a(r[o++]);
|
|
4496
4501
|
else if (e === "title") t.title = a(r[o++]);
|
|
4497
4502
|
else if (e === "version") t.version = a(r[o++]);
|
|
4498
|
-
else if (e === "editions") t.editions =
|
|
4503
|
+
else if (e === "editions") t.editions = z(r[o++]);
|
|
4499
4504
|
else if (e === "baseUrn" || e === "base_urn") t.baseUrn = a(r[o++]);
|
|
4500
4505
|
else if (e === "extends") t.extends = a(r[o++]);
|
|
4501
4506
|
else if (e === "uses") {
|
|
4502
4507
|
let e = [], n = {};
|
|
4503
|
-
for (let t of
|
|
4508
|
+
for (let t of z(r[o++])) {
|
|
4504
4509
|
let r = t.indexOf("@");
|
|
4505
4510
|
if (r === -1) {
|
|
4506
4511
|
e.push(t);
|
|
@@ -4513,17 +4518,17 @@ var ei = function(e) {
|
|
|
4513
4518
|
t.uses = e, Object.keys(n).length > 0 && (t.usePins = n);
|
|
4514
4519
|
} else if (e === "kind") {
|
|
4515
4520
|
let e = a(r[o++]);
|
|
4516
|
-
if (!
|
|
4521
|
+
if (!Qr.includes(e)) throw Error(`Parsing error: package: Expected kind ${Qr.join("|")}, got "${e}"`);
|
|
4517
4522
|
t.kind = e;
|
|
4518
4523
|
} else if (e === "manufacturer") t.manufacturer = a(r[o++]);
|
|
4519
4524
|
else if (e === "product") t.product = a(r[o++]);
|
|
4520
|
-
else if (e === "maps_to" || e === "mapsTo") t.mapsTo =
|
|
4525
|
+
else if (e === "maps_to" || e === "mapsTo") t.mapsTo = z(r[o++]);
|
|
4521
4526
|
else if (e === "scheme_type" || e === "schemeType") t.schemeType = a(r[o++]);
|
|
4522
|
-
else if (e === "provides") t.provides =
|
|
4523
|
-
else if (e === "requires") t.requires =
|
|
4524
|
-
else if (e === "waives") t.waives =
|
|
4525
|
-
else if (e === "supersedes") t.supersedes =
|
|
4526
|
-
else if (e === "replaces") t.replaces =
|
|
4527
|
+
else if (e === "provides") t.provides = z(r[o++]);
|
|
4528
|
+
else if (e === "requires") t.requires = z(r[o++]);
|
|
4529
|
+
else if (e === "waives") t.waives = z(r[o++]);
|
|
4530
|
+
else if (e === "supersedes") t.supersedes = ei(r[o++]);
|
|
4531
|
+
else if (e === "replaces") t.replaces = ei(r[o++]);
|
|
4527
4532
|
else if (e === "validity") {
|
|
4528
4533
|
let e = n(i(r[o++])), s = { from: "" }, c = 0;
|
|
4529
4534
|
for (; c < e.length;) {
|
|
@@ -4534,10 +4539,10 @@ var ei = function(e) {
|
|
|
4534
4539
|
t.validity = s;
|
|
4535
4540
|
} else if (e === "status") {
|
|
4536
4541
|
let e = a(r[o++]);
|
|
4537
|
-
if (
|
|
4542
|
+
if (!$r.includes(e)) throw Error(`Parsing error: package: Expected status ${$r.join("|")}, got "${e}"`);
|
|
4538
4543
|
t.status = e;
|
|
4539
4544
|
} else if (e === "default_spelling" || e === "defaultSpelling") t.defaultSpelling = a(r[o++]);
|
|
4540
|
-
else if (e === "spellings") t.spellings =
|
|
4545
|
+
else if (e === "spellings") t.spellings = z(r[o++]);
|
|
4541
4546
|
else if (e === "description") t.description = a(r[o++]);
|
|
4542
4547
|
else if (e === "source") {
|
|
4543
4548
|
let e = {
|
|
@@ -4547,18 +4552,18 @@ var ei = function(e) {
|
|
|
4547
4552
|
for (; c < s.length;) {
|
|
4548
4553
|
let t = s[c++];
|
|
4549
4554
|
if (c >= s.length) break;
|
|
4550
|
-
t === "collection" ? e.collection = a(s[c++]) : t === "parts" ? e.parts =
|
|
4555
|
+
t === "collection" ? e.collection = a(s[c++]) : t === "parts" ? e.parts = z(s[c++]) : i(s[c++]);
|
|
4551
4556
|
}
|
|
4552
4557
|
t.source = e;
|
|
4553
4558
|
} else i(r[o++]);
|
|
4554
4559
|
}
|
|
4555
4560
|
return (e) => (e.packageManifest = t, e);
|
|
4556
4561
|
};
|
|
4557
|
-
function
|
|
4562
|
+
function ni(e) {
|
|
4558
4563
|
let t = "package {\n";
|
|
4559
4564
|
return 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"), 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.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;
|
|
4560
4565
|
}
|
|
4561
|
-
var
|
|
4566
|
+
var ri = {
|
|
4562
4567
|
keyword: "conformance_class",
|
|
4563
4568
|
field: "conformanceClasses",
|
|
4564
4569
|
takesID: !0,
|
|
@@ -4578,7 +4583,7 @@ var ni = {
|
|
|
4578
4583
|
for (; c < s.length;) {
|
|
4579
4584
|
let e = s[c++];
|
|
4580
4585
|
if (c >= s.length) break;
|
|
4581
|
-
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 = A(i(s[c++])) : e === "test_subject" ? o.testSubject =
|
|
4586
|
+
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 = A(i(s[c++])) : e === "test_subject" ? o.testSubject = gr(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) : i(s[c++]);
|
|
4582
4587
|
}
|
|
4583
4588
|
return (t) => (t.conformanceClasses[e] = o, t);
|
|
4584
4589
|
},
|
|
@@ -4591,24 +4596,24 @@ var ni = {
|
|
|
4591
4596
|
}
|
|
4592
4597
|
return e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
4593
4598
|
}
|
|
4594
|
-
},
|
|
4599
|
+
}, ii = [
|
|
4595
4600
|
"public",
|
|
4596
4601
|
"registered",
|
|
4597
4602
|
"authority"
|
|
4598
|
-
],
|
|
4603
|
+
], ai = /* @__PURE__ */ new Set([
|
|
4599
4604
|
"kind",
|
|
4600
4605
|
"serves",
|
|
4601
4606
|
"does",
|
|
4602
4607
|
"payload"
|
|
4603
4608
|
]);
|
|
4604
|
-
function
|
|
4609
|
+
function oi(e, t) {
|
|
4605
4610
|
let r = e[t] ?? "";
|
|
4606
4611
|
if (r.startsWith("{")) return {
|
|
4607
4612
|
names: n(i(r)).flatMap((e) => e.split(",")).map((e) => a(e.trim())).filter((e) => e.length > 0),
|
|
4608
4613
|
next: t + 1
|
|
4609
4614
|
};
|
|
4610
4615
|
let o = [], s = t;
|
|
4611
|
-
for (; s < e.length && !
|
|
4616
|
+
for (; s < e.length && !ai.has(e[s]) && !e[s].startsWith("{");) {
|
|
4612
4617
|
for (let t of e[s].split(",")) {
|
|
4613
4618
|
let e = a(t.trim());
|
|
4614
4619
|
e && o.push(e);
|
|
@@ -4620,7 +4625,7 @@ function ai(e, t) {
|
|
|
4620
4625
|
next: s
|
|
4621
4626
|
};
|
|
4622
4627
|
}
|
|
4623
|
-
function
|
|
4628
|
+
function si(e, t) {
|
|
4624
4629
|
let r = {
|
|
4625
4630
|
name: e,
|
|
4626
4631
|
kind: "",
|
|
@@ -4633,10 +4638,10 @@ function oi(e, t) {
|
|
|
4633
4638
|
if (s > o.length) break;
|
|
4634
4639
|
if (e === "kind") r.kind = a(o[s++] ?? "");
|
|
4635
4640
|
else if (e === "serves") {
|
|
4636
|
-
let e =
|
|
4641
|
+
let e = oi(o, s);
|
|
4637
4642
|
r.serves = e.names, s = e.next;
|
|
4638
4643
|
} else if (e === "does") {
|
|
4639
|
-
let e =
|
|
4644
|
+
let e = oi(o, s);
|
|
4640
4645
|
r.does = e.names, s = e.next;
|
|
4641
4646
|
} else if (e === "payload") {
|
|
4642
4647
|
let e = n(i(o[s++] ?? "")), t = {
|
|
@@ -4654,7 +4659,7 @@ function oi(e, t) {
|
|
|
4654
4659
|
}
|
|
4655
4660
|
return r;
|
|
4656
4661
|
}
|
|
4657
|
-
function
|
|
4662
|
+
function ci(e) {
|
|
4658
4663
|
let t = {}, r = n(e), o = 0;
|
|
4659
4664
|
for (; o < r.length;) {
|
|
4660
4665
|
let e = E(r[o++]);
|
|
@@ -4666,7 +4671,7 @@ function si(e) {
|
|
|
4666
4671
|
}
|
|
4667
4672
|
return t;
|
|
4668
4673
|
}
|
|
4669
|
-
function
|
|
4674
|
+
function li(e, t) {
|
|
4670
4675
|
let r = {
|
|
4671
4676
|
id: e,
|
|
4672
4677
|
operations: [],
|
|
@@ -4678,19 +4683,19 @@ function ci(e, t) {
|
|
|
4678
4683
|
if (s > o.length) break;
|
|
4679
4684
|
if (e === "operation") {
|
|
4680
4685
|
let e = E(o[s++] ?? ""), t = s < o.length ? i(o[s++]) : "";
|
|
4681
|
-
e && r.operations.push(
|
|
4682
|
-
} else e === "access" ? r.access =
|
|
4686
|
+
e && r.operations.push(si(e, t));
|
|
4687
|
+
} else e === "access" ? r.access = ci(i(o[s++] ?? "")) : e === "profile" ? r.profile = a(o[s++] ?? "") : i(o[s++] ?? "");
|
|
4683
4688
|
}
|
|
4684
4689
|
return r;
|
|
4685
4690
|
}
|
|
4686
|
-
function
|
|
4691
|
+
function ui(e, t) {
|
|
4687
4692
|
let n = t + "operation " + T(e.name) + " {";
|
|
4688
4693
|
return e.kind && (n += " kind " + T(e.kind)), e.serves.length > 0 && (n += " serves { " + e.serves.map(T).join(" ") + " }"), e.does.length > 0 && (n += " does { " + e.does.map(T).join(" ") + " }"), e.payload && (n += " payload { quantity_kind " + T(e.payload.quantityKind) + " unit " + T(e.payload.unit) + " timestamp " + (e.payload.timestamp ? "true" : "false") + " }"), n + " }\n";
|
|
4689
4694
|
}
|
|
4690
|
-
function
|
|
4695
|
+
function di(e, t) {
|
|
4691
4696
|
let n = t + "endpoint " + T(e.id) + " {\n";
|
|
4692
|
-
for (let r of e.operations) n +=
|
|
4693
|
-
let r =
|
|
4697
|
+
for (let r of e.operations) n += ui(r, t + " ");
|
|
4698
|
+
let r = ii.filter((t) => (e.access[t] ?? []).length > 0), i = Object.keys(e.access).filter((e) => !ii.includes(e));
|
|
4694
4699
|
if (r.length + i.length > 0) {
|
|
4695
4700
|
n += t + " access {";
|
|
4696
4701
|
for (let t of [...r, ...i]) n += " " + t + " { " + (e.access[t] ?? []).map(T).join(" ") + " }";
|
|
@@ -4698,7 +4703,7 @@ function ui(e, t) {
|
|
|
4698
4703
|
}
|
|
4699
4704
|
return e.profile && (n += t + " profile " + T(e.profile) + "\n"), n + t + "}\n";
|
|
4700
4705
|
}
|
|
4701
|
-
function
|
|
4706
|
+
function fi(e, t) {
|
|
4702
4707
|
let r = {
|
|
4703
4708
|
aspect: "",
|
|
4704
4709
|
via: "",
|
|
@@ -4717,11 +4722,11 @@ function di(e, t) {
|
|
|
4717
4722
|
next: t
|
|
4718
4723
|
};
|
|
4719
4724
|
}
|
|
4720
|
-
function
|
|
4725
|
+
function pi(e, t) {
|
|
4721
4726
|
let n = t + "serve " + T(e.aspect) + " via " + T(e.via);
|
|
4722
4727
|
return e.freshWithin && (n += " { fresh_within " + T(e.freshWithin) + " }"), n + "\n";
|
|
4723
4728
|
}
|
|
4724
|
-
var
|
|
4729
|
+
var mi = {
|
|
4725
4730
|
keyword: "connector_profile",
|
|
4726
4731
|
field: "connectorProfiles",
|
|
4727
4732
|
takesID: !0,
|
|
@@ -4746,7 +4751,7 @@ var pi = {
|
|
|
4746
4751
|
};
|
|
4747
4752
|
//#endregion
|
|
4748
4753
|
//#region src/ser-des/config/composition.ts
|
|
4749
|
-
function
|
|
4754
|
+
function hi(e, t) {
|
|
4750
4755
|
let r = {
|
|
4751
4756
|
id: e,
|
|
4752
4757
|
product: "",
|
|
@@ -4766,7 +4771,7 @@ function mi(e, t) {
|
|
|
4766
4771
|
}
|
|
4767
4772
|
return r;
|
|
4768
4773
|
}
|
|
4769
|
-
function
|
|
4774
|
+
function gi(e) {
|
|
4770
4775
|
let t = [];
|
|
4771
4776
|
for (let n of e.split("\n")) {
|
|
4772
4777
|
let e = n.trim();
|
|
@@ -4789,7 +4794,7 @@ function hi(e) {
|
|
|
4789
4794
|
}
|
|
4790
4795
|
return t;
|
|
4791
4796
|
}
|
|
4792
|
-
function
|
|
4797
|
+
function _i(e) {
|
|
4793
4798
|
let t = {
|
|
4794
4799
|
components: [],
|
|
4795
4800
|
decomposition: []
|
|
@@ -4798,8 +4803,8 @@ function gi(e) {
|
|
|
4798
4803
|
let e = n[a++];
|
|
4799
4804
|
if (e === "component") {
|
|
4800
4805
|
let e = n[a++] ?? "", r = a < n.length ? i(n[a++]) : "";
|
|
4801
|
-
e && t.components.push(
|
|
4802
|
-
} else if (e === "decomposition") t.decomposition =
|
|
4806
|
+
e && t.components.push(hi(e, r));
|
|
4807
|
+
} else if (e === "decomposition") t.decomposition = gi(i(n[a++] ?? ""));
|
|
4803
4808
|
else if (e === "revision") {
|
|
4804
4809
|
let e = Number(n[a++] ?? "");
|
|
4805
4810
|
Number.isFinite(e) && (t.revision = e);
|
|
@@ -4807,13 +4812,13 @@ function gi(e) {
|
|
|
4807
4812
|
}
|
|
4808
4813
|
return t;
|
|
4809
4814
|
}
|
|
4810
|
-
function
|
|
4815
|
+
function vi(e, t) {
|
|
4811
4816
|
let n = t + "component " + T(e.id) + " {\n";
|
|
4812
4817
|
return n += t + " product " + T(e.product) + "\n", n += t + " endpoint " + T(e.endpoint) + "\n", n += t + " serial " + s(e.serial) + "\n", n += t + " certificate " + (e.certificate === null ? "null" : s(e.certificate)) + "\n", n + t + "}\n";
|
|
4813
4818
|
}
|
|
4814
|
-
function
|
|
4819
|
+
function yi(e, t) {
|
|
4815
4820
|
let n = t + "composed_of {\n";
|
|
4816
|
-
for (let r of e.components) n +=
|
|
4821
|
+
for (let r of e.components) n += vi(r, t + " ");
|
|
4817
4822
|
if (e.decomposition.length > 0) {
|
|
4818
4823
|
n += t + " decomposition {\n";
|
|
4819
4824
|
for (let r of e.decomposition) n += t + " " + T(r.register) + " -> " + (r.component === "composite" ? "rule " + T(r.rule ?? "") : T(r.component) + "." + T(r.componentRegister ?? "")) + "\n";
|
|
@@ -4823,21 +4828,21 @@ function vi(e, t) {
|
|
|
4823
4828
|
}
|
|
4824
4829
|
//#endregion
|
|
4825
4830
|
//#region src/ser-des/config/subject.ts
|
|
4826
|
-
function
|
|
4831
|
+
function B(e, t, n) {
|
|
4827
4832
|
if (!t || !t.doc && !t.clause) return "";
|
|
4828
4833
|
let r = t.fragment ? ` fragment "${s(t.fragment)}"` : "";
|
|
4829
4834
|
return `${n}${e} { doc "${s(t.doc)}" clause "${s(t.clause)}"${r} }\n`;
|
|
4830
4835
|
}
|
|
4831
|
-
function
|
|
4836
|
+
function V(e) {
|
|
4832
4837
|
return n(a(e)).map(E).map(a).filter((e) => e.length > 0);
|
|
4833
4838
|
}
|
|
4834
|
-
function
|
|
4839
|
+
function H(e, t, n) {
|
|
4835
4840
|
return t.length === 0 ? "" : `${n}${e} { ${t.join(" ")} }\n`;
|
|
4836
4841
|
}
|
|
4837
|
-
function
|
|
4842
|
+
function U(e) {
|
|
4838
4843
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
4839
4844
|
}
|
|
4840
|
-
var
|
|
4845
|
+
var bi = function(e, t) {
|
|
4841
4846
|
let o = {
|
|
4842
4847
|
id: e,
|
|
4843
4848
|
extends: "",
|
|
@@ -4859,9 +4864,9 @@ var yi = function(e, t) {
|
|
|
4859
4864
|
if (c >= s.length) break;
|
|
4860
4865
|
if (e === "extends") o.extends = a(s[c++]);
|
|
4861
4866
|
else if (e === "measurand_kind") o.measurandKind = a(s[c++]);
|
|
4862
|
-
else if (e === "measurand") o.measurand =
|
|
4863
|
-
else if (e === "component") o.components.push(
|
|
4864
|
-
else if (e === "structure") o.structure.push(
|
|
4867
|
+
else if (e === "measurand") o.measurand = xi(i(s[c++]));
|
|
4868
|
+
else if (e === "component") o.components.push(Si(a(s[c++]), i(s[c++])));
|
|
4869
|
+
else if (e === "structure") o.structure.push(Ci(a(s[c++]), i(s[c++])));
|
|
4865
4870
|
else if (e === "definition") o.definition = a(s[c++]);
|
|
4866
4871
|
else if (e === "note") o.note = a(s[c++]);
|
|
4867
4872
|
else if (e === "source") o.source = k(i(s[c++]));
|
|
@@ -4876,9 +4881,9 @@ var yi = function(e, t) {
|
|
|
4876
4881
|
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 = k(i(l[u++])) : i(l[u++]);
|
|
4877
4882
|
}
|
|
4878
4883
|
o.variants.push(r);
|
|
4879
|
-
} else if (e === "dimension") o.dimensions.push(
|
|
4884
|
+
} else if (e === "dimension") o.dimensions.push(wi(a(s[c++]), i(s[c++])));
|
|
4880
4885
|
else if (e === "per_channel") o.perChannel = a(s[c++]);
|
|
4881
|
-
else if (e === "family_criteria") o.familyCriteria =
|
|
4886
|
+
else if (e === "family_criteria") o.familyCriteria = U(s[c++]);
|
|
4882
4887
|
else if (e === "family") {
|
|
4883
4888
|
let e = n(i(s[c++])), t = 0;
|
|
4884
4889
|
for (; t < e.length;) {
|
|
@@ -4891,13 +4896,13 @@ var yi = function(e, t) {
|
|
|
4891
4896
|
for (; t < e.length;) {
|
|
4892
4897
|
let n = e[t++];
|
|
4893
4898
|
if (t >= e.length) break;
|
|
4894
|
-
n === "dimensions" ? o.familyDefaultDimensions =
|
|
4899
|
+
n === "dimensions" ? o.familyDefaultDimensions = V(e[t++]) : n === "parameters" ? o.familyDefaultParameters = V(e[t++]) : i(e[t++]);
|
|
4895
4900
|
}
|
|
4896
|
-
} else e === "model_group" ? o.modelGroup =
|
|
4901
|
+
} else e === "model_group" ? o.modelGroup = Ei(i(s[c++])) : e === "reference" ? o.referenceIds = U(s[c++]) : i(s[c++]);
|
|
4897
4902
|
}
|
|
4898
4903
|
return (t) => (t.instruments[e] = o, t);
|
|
4899
4904
|
};
|
|
4900
|
-
function
|
|
4905
|
+
function xi(e) {
|
|
4901
4906
|
let t = {
|
|
4902
4907
|
kind: "",
|
|
4903
4908
|
description: "",
|
|
@@ -4924,7 +4929,7 @@ function bi(e) {
|
|
|
4924
4929
|
}
|
|
4925
4930
|
return t;
|
|
4926
4931
|
}
|
|
4927
|
-
function
|
|
4932
|
+
function Si(e, t) {
|
|
4928
4933
|
let r = {
|
|
4929
4934
|
id: e,
|
|
4930
4935
|
classId: "",
|
|
@@ -4938,7 +4943,7 @@ function xi(e, t) {
|
|
|
4938
4943
|
}
|
|
4939
4944
|
return r;
|
|
4940
4945
|
}
|
|
4941
|
-
function
|
|
4946
|
+
function Ci(e, t) {
|
|
4942
4947
|
let r = {
|
|
4943
4948
|
id: e,
|
|
4944
4949
|
predicate: "",
|
|
@@ -4966,7 +4971,7 @@ function Si(e, t) {
|
|
|
4966
4971
|
}
|
|
4967
4972
|
return r;
|
|
4968
4973
|
}
|
|
4969
|
-
function
|
|
4974
|
+
function wi(e, t) {
|
|
4970
4975
|
let r = {
|
|
4971
4976
|
id: e,
|
|
4972
4977
|
label: "",
|
|
@@ -4986,11 +4991,11 @@ function Ci(e, t) {
|
|
|
4986
4991
|
let t = a(o[s++]);
|
|
4987
4992
|
if (t !== "single" && t !== "set") throw Error(`Parsing error: dimension. ID ${e}: Unknown cardinality ${t} (valid: single, set)`);
|
|
4988
4993
|
r.cardinality = t;
|
|
4989
|
-
} else t === "label_separator" ? r.labelSeparator = a(o[s++]) : t === "description" ? r.description = a(o[s++]) : t === "reference" || t === "source" ? r.source = k(i(o[s++])) : t === "values" ? r.values =
|
|
4994
|
+
} else t === "label_separator" ? r.labelSeparator = a(o[s++]) : t === "description" ? r.description = a(o[s++]) : t === "reference" || t === "source" ? r.source = k(i(o[s++])) : t === "values" ? r.values = Ti(i(o[s++])) : i(o[s++]);
|
|
4990
4995
|
}
|
|
4991
4996
|
return r;
|
|
4992
4997
|
}
|
|
4993
|
-
function
|
|
4998
|
+
function Ti(e) {
|
|
4994
4999
|
let t = [], r = n(e), o = 0;
|
|
4995
5000
|
for (; o < r.length;) {
|
|
4996
5001
|
let e = E(r[o++]);
|
|
@@ -5009,7 +5014,7 @@ function wi(e) {
|
|
|
5009
5014
|
if (t >= e.length) break;
|
|
5010
5015
|
if (r === "label") s.label = a(e[t++]);
|
|
5011
5016
|
else if (r === "description") s.description = a(e[t++]);
|
|
5012
|
-
else if (r === "implies") s.implies =
|
|
5017
|
+
else if (r === "implies") s.implies = V(e[t++]);
|
|
5013
5018
|
else if (r === "term_ref") s.termRef = a(e[t++]);
|
|
5014
5019
|
else if (r === "payload") {
|
|
5015
5020
|
let r = n(i(e[t++])), o = 0;
|
|
@@ -5033,7 +5038,7 @@ function wi(e) {
|
|
|
5033
5038
|
}
|
|
5034
5039
|
return t;
|
|
5035
5040
|
}
|
|
5036
|
-
function
|
|
5041
|
+
function Ei(e) {
|
|
5037
5042
|
let t = {
|
|
5038
5043
|
definition: "",
|
|
5039
5044
|
identicalCharacteristics: [],
|
|
@@ -5044,15 +5049,15 @@ function Ti(e) {
|
|
|
5044
5049
|
for (; o < r.length;) {
|
|
5045
5050
|
let e = r[o++];
|
|
5046
5051
|
if (o >= r.length) break;
|
|
5047
|
-
e === "definition" ? t.definition = a(r[o++]) : e === "identical_characteristics" ? t.identicalCharacteristics =
|
|
5052
|
+
e === "definition" ? t.definition = a(r[o++]) : e === "identical_characteristics" ? t.identicalCharacteristics = V(r[o++]) : e === "identical_attributes" ? t.identicalAttributes = V(r[o++]) : e === "group_by" ? t.groupBy = a(r[o++]) : e === "note" ? t.note = a(r[o++]) : e === "source" ? t.sources.push(k(i(r[o++]))) : e === "sample_selection" ? t.sampleSelection.push(k(i(r[o++]))) : i(r[o++]);
|
|
5048
5053
|
}
|
|
5049
5054
|
return t;
|
|
5050
5055
|
}
|
|
5051
|
-
var
|
|
5056
|
+
var Di = function(e) {
|
|
5052
5057
|
let t = "instrument " + e.id + " {\n";
|
|
5053
5058
|
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) {
|
|
5054
5059
|
let n = e.measurand;
|
|
5055
|
-
t += " measurand {\n", n.kind && (t += " kind " + n.kind + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.context && (t += " context {", n.context.targetObject && (t += " target_object \"" + s(n.context.targetObject) + "\""), n.context.identificationMethod && (t += " identification_method \"" + s(n.context.identificationMethod) + "\""), t += " }\n"), t +=
|
|
5060
|
+
t += " measurand {\n", n.kind && (t += " kind " + n.kind + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.context && (t += " context {", n.context.targetObject && (t += " target_object \"" + s(n.context.targetObject) + "\""), n.context.identificationMethod && (t += " identification_method \"" + s(n.context.identificationMethod) + "\""), t += " }\n"), t += B("source", n.source, " "), t += " }\n";
|
|
5056
5061
|
}
|
|
5057
5062
|
for (let n of e.components ?? []) {
|
|
5058
5063
|
let e = " component " + n.id + " { ";
|
|
@@ -5064,7 +5069,7 @@ var Ei = function(e) {
|
|
|
5064
5069
|
for (let e of n.propagation) t += e.property + " " + e.direction + " ";
|
|
5065
5070
|
t += "}\n";
|
|
5066
5071
|
}
|
|
5067
|
-
n.note && (t += " note \"" + s(n.note) + "\"\n"), t +=
|
|
5072
|
+
n.note && (t += " note \"" + s(n.note) + "\"\n"), t += B("source", n.source, " "), t += " }\n";
|
|
5068
5073
|
}
|
|
5069
5074
|
e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n");
|
|
5070
5075
|
for (let n of e.variants) {
|
|
@@ -5072,7 +5077,7 @@ var Ei = function(e) {
|
|
|
5072
5077
|
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";
|
|
5073
5078
|
}
|
|
5074
5079
|
for (let n of e.dimensions) {
|
|
5075
|
-
if (t += " dimension " + n.id + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.scope && (t += " scope " + n.scope + "\n"), n.cardinality && (t += " cardinality " + n.cardinality + "\n"), n.labelSeparator && (t += " label_separator \"" + s(n.labelSeparator) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t +=
|
|
5080
|
+
if (t += " dimension " + n.id + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.scope && (t += " scope " + n.scope + "\n"), n.cardinality && (t += " cardinality " + n.cardinality + "\n"), n.labelSeparator && (t += " label_separator \"" + s(n.labelSeparator) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += B("reference", n.source, " "), n.values.length > 0) {
|
|
5076
5081
|
t += " values {\n";
|
|
5077
5082
|
for (let e of n.values) {
|
|
5078
5083
|
let n = " " + e.id;
|
|
@@ -5094,19 +5099,19 @@ var Ei = function(e) {
|
|
|
5094
5099
|
}
|
|
5095
5100
|
t += " }\n";
|
|
5096
5101
|
}
|
|
5097
|
-
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"), t +=
|
|
5102
|
+
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"), t += B("source", e.familySource ?? null, " "), t += " }\n"), e.familyCriteria.length > 0) {
|
|
5098
5103
|
t += " family_criteria {\n";
|
|
5099
5104
|
for (let n of e.familyCriteria) t += " \"" + s(n) + "\"\n";
|
|
5100
5105
|
t += " }\n";
|
|
5101
5106
|
}
|
|
5102
|
-
if ((e.familyDefaultDimensions.length > 0 || e.familyDefaultParameters.length > 0) && (t += " family_defaults {\n", t +=
|
|
5103
|
-
t += " model_group {\n", e.modelGroup.definition && (t += " definition \"" + s(e.modelGroup.definition) + "\"\n"), e.modelGroup.groupBy && (t += " group_by " + e.modelGroup.groupBy + "\n"), e.modelGroup.note && (t += " note \"" + s(e.modelGroup.note) + "\"\n"), t +=
|
|
5104
|
-
for (let n of e.modelGroup.sources ?? []) t +=
|
|
5105
|
-
for (let n of e.modelGroup.sampleSelection ?? []) t +=
|
|
5107
|
+
if ((e.familyDefaultDimensions.length > 0 || e.familyDefaultParameters.length > 0) && (t += " family_defaults {\n", t += H("dimensions", e.familyDefaultDimensions, " "), t += H("parameters", e.familyDefaultParameters, " "), t += " }\n"), e.modelGroup) {
|
|
5108
|
+
t += " model_group {\n", e.modelGroup.definition && (t += " definition \"" + s(e.modelGroup.definition) + "\"\n"), e.modelGroup.groupBy && (t += " group_by " + e.modelGroup.groupBy + "\n"), e.modelGroup.note && (t += " note \"" + s(e.modelGroup.note) + "\"\n"), t += H("identical_characteristics", e.modelGroup.identicalCharacteristics, " "), t += H("identical_attributes", e.modelGroup.identicalAttributes, " ");
|
|
5109
|
+
for (let n of e.modelGroup.sources ?? []) t += B("source", n, " ");
|
|
5110
|
+
for (let n of e.modelGroup.sampleSelection ?? []) t += B("sample_selection", n, " ");
|
|
5106
5111
|
t += " }\n";
|
|
5107
5112
|
}
|
|
5108
|
-
return t +=
|
|
5109
|
-
},
|
|
5113
|
+
return t += B("source", e.source ?? null, " "), t += H("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5114
|
+
}, Oi = function(e, t) {
|
|
5110
5115
|
let n = {
|
|
5111
5116
|
id: e,
|
|
5112
5117
|
symbol: "",
|
|
@@ -5128,13 +5133,13 @@ var Ei = function(e) {
|
|
|
5128
5133
|
for (; s < o.length;) {
|
|
5129
5134
|
let e = o[s++];
|
|
5130
5135
|
if (s >= o.length) break;
|
|
5131
|
-
e === "symbol" ? n.symbol = a(o[s++]) : e === "name" ? n.name = a(o[s++]) : e === "definition" ? n.definition = a(o[s++]) : e === "source" || e === "reference" ? n.source = k(i(o[s++])) : e === "quantity_kind" ? n.quantityKind = a(o[s++]) : e === "unit" ? n.unit = a(o[s++]) : e === "value_type" ? n.valueType = a(o[s++]) : e === "origin" ? n.origin = a(o[s++]) : e === "scope" ? n.scope = a(o[s++]) : e === "category" ? n.category = a(o[s++]) : e === "is_dimension" ? n.isDimension = a(o[s++]) === "true" : e === "enum" ? n.enumRef = a(o[s++]) : e === "enum_values" ? n.enumValues =
|
|
5136
|
+
e === "symbol" ? n.symbol = a(o[s++]) : e === "name" ? n.name = a(o[s++]) : e === "definition" ? n.definition = a(o[s++]) : e === "source" || e === "reference" ? n.source = k(i(o[s++])) : e === "quantity_kind" ? n.quantityKind = a(o[s++]) : e === "unit" ? n.unit = a(o[s++]) : e === "value_type" ? n.valueType = a(o[s++]) : e === "origin" ? n.origin = a(o[s++]) : e === "scope" ? n.scope = a(o[s++]) : e === "category" ? n.category = a(o[s++]) : e === "is_dimension" ? n.isDimension = a(o[s++]) === "true" : e === "enum" ? n.enumRef = a(o[s++]) : e === "enum_values" ? n.enumValues = V(o[s++]) : e === "note" ? n.note = a(o[s++]) : e === "irdi" ? n.irdi = a(o[s++]) : e === "derived" ? n.derived = a(o[s++]) : i(o[s++]);
|
|
5132
5137
|
}
|
|
5133
5138
|
return (t) => (t.attributeDefinitions[e] = n, t);
|
|
5134
|
-
},
|
|
5139
|
+
}, ki = function(e) {
|
|
5135
5140
|
let t = "attribute_definition " + e.id + " {\n";
|
|
5136
|
-
return e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), t +=
|
|
5137
|
-
},
|
|
5141
|
+
return e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), t += B("source", e.source, " "), 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.irdi && (t += " irdi \"" + s(e.irdi) + "\"\n"), e.derived && (t += " derived \"" + s(e.derived) + "\"\n"), t += "}\n", t;
|
|
5142
|
+
}, Ai = function(e, t) {
|
|
5138
5143
|
let n = {
|
|
5139
5144
|
id: e,
|
|
5140
5145
|
label: "",
|
|
@@ -5150,13 +5155,13 @@ var Ei = function(e) {
|
|
|
5150
5155
|
for (; s < o.length;) {
|
|
5151
5156
|
let e = o[s++];
|
|
5152
5157
|
if (s >= o.length) break;
|
|
5153
|
-
e === "label" ? n.label = a(o[s++]) : e === "description" ? n.description = a(o[s++]) : e === "abstract" ? n.abstract = a(o[s++]) === "true" : e === "extends" ? n.extends =
|
|
5158
|
+
e === "label" ? n.label = a(o[s++]) : e === "description" ? n.description = a(o[s++]) : e === "abstract" ? n.abstract = a(o[s++]) === "true" : e === "extends" ? n.extends = V(o[s++]) : e === "requires" ? n.requires = V(o[s++]) : e === "has_parameters" ? n.hasParameters = V(o[s++]) : e === "satisfies_requirements" ? n.satisfiesRequirements = U(o[s++]) : e === "verified_by_tests" || e === "verified_by" ? n.verifiedByTests = U(o[s++]) : e === "reference" ? n.referenceIds = U(o[s++]) : i(o[s++]);
|
|
5154
5159
|
}
|
|
5155
5160
|
return (t) => (t.capabilities[e] = n, t);
|
|
5156
|
-
},
|
|
5161
|
+
}, ji = function(e) {
|
|
5157
5162
|
let t = "capability " + e.id + " {\n";
|
|
5158
|
-
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.abstract && (t += " abstract true\n"), t +=
|
|
5159
|
-
},
|
|
5163
|
+
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.abstract && (t += " abstract true\n"), t += H("extends", e.extends, " "), t += H("requires", e.requires, " "), t += H("has_parameters", e.hasParameters, " "), t += H("satisfies_requirements", e.satisfiesRequirements, " "), t += H("verified_by_tests", e.verifiedByTests, " "), t += H("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5164
|
+
}, Mi = function(e, t) {
|
|
5160
5165
|
let n = {
|
|
5161
5166
|
id: e,
|
|
5162
5167
|
kind: "",
|
|
@@ -5169,13 +5174,13 @@ var Ei = function(e) {
|
|
|
5169
5174
|
for (; s < o.length;) {
|
|
5170
5175
|
let e = o[s++];
|
|
5171
5176
|
if (s >= o.length) break;
|
|
5172
|
-
e === "kind" ? n.kind = a(o[s++]) : e === "stimulus" ? n.stimulus = a(o[s++]) : e === "response" ? n.response = a(o[s++]) : e === "source" || e === "reference" ? n.source = k(i(o[s++])) : e === "verified_by" || e === "verified_by_tests" ? n.verifiedBy =
|
|
5177
|
+
e === "kind" ? n.kind = a(o[s++]) : e === "stimulus" ? n.stimulus = a(o[s++]) : e === "response" ? n.response = a(o[s++]) : e === "source" || e === "reference" ? n.source = k(i(o[s++])) : e === "verified_by" || e === "verified_by_tests" ? n.verifiedBy = U(o[s++]) : i(o[s++]);
|
|
5173
5178
|
}
|
|
5174
5179
|
return (t) => (t.behaviors[e] = n, t);
|
|
5175
|
-
},
|
|
5180
|
+
}, Ni = function(e) {
|
|
5176
5181
|
let t = "behavior " + e.id + " {\n";
|
|
5177
|
-
return e.kind && (t += " kind " + e.kind + "\n"), e.stimulus && (t += " stimulus " + e.stimulus + "\n"), e.response && (t += " response \"" + s(e.response) + "\"\n"), t +=
|
|
5178
|
-
},
|
|
5182
|
+
return e.kind && (t += " kind " + e.kind + "\n"), e.stimulus && (t += " stimulus " + e.stimulus + "\n"), e.response && (t += " response \"" + s(e.response) + "\"\n"), t += B("source", e.source, " "), t += H("verified_by", e.verifiedBy, " "), t += "}\n", t;
|
|
5183
|
+
}, Pi = function(e, t) {
|
|
5179
5184
|
let n = {
|
|
5180
5185
|
id: e,
|
|
5181
5186
|
role: "",
|
|
@@ -5190,15 +5195,15 @@ var Ei = function(e) {
|
|
|
5190
5195
|
if (e === "role") n.role = a(o[s++]);
|
|
5191
5196
|
else if (e === "subject") n.subject = a(o[s++]);
|
|
5192
5197
|
else if (e === "description") n.description = a(o[s++]);
|
|
5193
|
-
else if (e === "entries") n.entries =
|
|
5198
|
+
else if (e === "entries") n.entries = Fi(i(o[s++]));
|
|
5194
5199
|
else if (e === "source") {
|
|
5195
5200
|
let e = k(i(o[s++]));
|
|
5196
5201
|
n.sources.push(e), n.source ||= e;
|
|
5197
|
-
} else e === "reference" ? n.referenceIds =
|
|
5202
|
+
} else e === "reference" ? n.referenceIds = U(o[s++]) : i(o[s++]);
|
|
5198
5203
|
}
|
|
5199
5204
|
return (t) => (t.conditionSets[e] = n, t);
|
|
5200
5205
|
};
|
|
5201
|
-
function
|
|
5206
|
+
function Fi(e) {
|
|
5202
5207
|
let t = [], r = n(e), o = 0;
|
|
5203
5208
|
for (; o < r.length;) {
|
|
5204
5209
|
let e = E(r[o++]);
|
|
@@ -5221,7 +5226,7 @@ function Pi(e) {
|
|
|
5221
5226
|
}
|
|
5222
5227
|
return t;
|
|
5223
5228
|
}
|
|
5224
|
-
var
|
|
5229
|
+
var Ii = function(e) {
|
|
5225
5230
|
let t = "condition_set " + e.id + " {\n";
|
|
5226
5231
|
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) {
|
|
5227
5232
|
t += " entries {\n";
|
|
@@ -5232,10 +5237,10 @@ var Fi = function(e) {
|
|
|
5232
5237
|
t += " }\n";
|
|
5233
5238
|
}
|
|
5234
5239
|
let n = e.sources && e.sources.length > 0 ? e.sources : e.source ? [e.source] : [];
|
|
5235
|
-
for (let e of n) t +=
|
|
5236
|
-
return t +=
|
|
5240
|
+
for (let e of n) t += B("source", e, " ");
|
|
5241
|
+
return t += H("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5237
5242
|
};
|
|
5238
|
-
function
|
|
5243
|
+
function Li(e) {
|
|
5239
5244
|
let t = {}, r = n(e), i = 0;
|
|
5240
5245
|
for (; i < r.length;) {
|
|
5241
5246
|
let e = E(r[i++]);
|
|
@@ -5244,7 +5249,7 @@ function Ii(e) {
|
|
|
5244
5249
|
}
|
|
5245
5250
|
return t;
|
|
5246
5251
|
}
|
|
5247
|
-
function
|
|
5252
|
+
function Ri(e) {
|
|
5248
5253
|
let t = {}, r = n(e), i = 0;
|
|
5249
5254
|
for (; i < r.length;) {
|
|
5250
5255
|
let e = E(r[i++]);
|
|
@@ -5256,10 +5261,10 @@ function Li(e) {
|
|
|
5256
5261
|
}
|
|
5257
5262
|
return t;
|
|
5258
5263
|
}
|
|
5259
|
-
function
|
|
5264
|
+
function W(e) {
|
|
5260
5265
|
return n(e).map(a).filter((e) => e.length > 0);
|
|
5261
5266
|
}
|
|
5262
|
-
function
|
|
5267
|
+
function zi(e) {
|
|
5263
5268
|
let t = {}, r = n(e), o = 0;
|
|
5264
5269
|
for (; o < r.length;) {
|
|
5265
5270
|
let e = E(r[o++]);
|
|
@@ -5271,13 +5276,13 @@ function Ri(e) {
|
|
|
5271
5276
|
}
|
|
5272
5277
|
return t;
|
|
5273
5278
|
}
|
|
5274
|
-
function
|
|
5279
|
+
function Bi(e) {
|
|
5275
5280
|
let t = {}, r = n(e), o = 0;
|
|
5276
5281
|
for (; o < r.length;) {
|
|
5277
5282
|
let e = E(r[o++]);
|
|
5278
5283
|
if (!e) break;
|
|
5279
5284
|
if (o < r.length && r[o].startsWith("{")) {
|
|
5280
|
-
t[e] =
|
|
5285
|
+
t[e] = Vi(i(r[o++]));
|
|
5281
5286
|
continue;
|
|
5282
5287
|
}
|
|
5283
5288
|
let n = "", s = "", c = !1;
|
|
@@ -5293,7 +5298,7 @@ function zi(e) {
|
|
|
5293
5298
|
}
|
|
5294
5299
|
return t;
|
|
5295
5300
|
}
|
|
5296
|
-
function
|
|
5301
|
+
function Vi(e) {
|
|
5297
5302
|
let t = {
|
|
5298
5303
|
symbol: "",
|
|
5299
5304
|
derivation: ""
|
|
@@ -5309,18 +5314,18 @@ function Bi(e) {
|
|
|
5309
5314
|
}
|
|
5310
5315
|
return t;
|
|
5311
5316
|
}
|
|
5312
|
-
var
|
|
5313
|
-
function
|
|
5317
|
+
var Hi = /* @__PURE__ */ new Set(["state", "behavior"]);
|
|
5318
|
+
function Ui(e, t, n) {
|
|
5314
5319
|
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;
|
|
5315
5320
|
}
|
|
5316
|
-
function
|
|
5321
|
+
function Wi(e, t, n, r, i) {
|
|
5317
5322
|
let a = E(n);
|
|
5318
5323
|
return e.misplacedAspects.push({
|
|
5319
5324
|
family: t,
|
|
5320
5325
|
aspect: a
|
|
5321
|
-
}), i < r.length && r[i].startsWith("{") ||
|
|
5326
|
+
}), i < r.length && r[i].startsWith("{") || Hi.has(a) ? i++ : i = Ui(a, r, i), i;
|
|
5322
5327
|
}
|
|
5323
|
-
function
|
|
5328
|
+
function Gi(e, t) {
|
|
5324
5329
|
let r = e[t] ?? "";
|
|
5325
5330
|
if (r === "symbolic") return {
|
|
5326
5331
|
level: {
|
|
@@ -5349,7 +5354,7 @@ function Wi(e, t) {
|
|
|
5349
5354
|
next: t + 1
|
|
5350
5355
|
};
|
|
5351
5356
|
}
|
|
5352
|
-
function
|
|
5357
|
+
function Ki(e) {
|
|
5353
5358
|
let t = [], r = n(e), o = 0;
|
|
5354
5359
|
for (; o < r.length;) {
|
|
5355
5360
|
let e = r[o++];
|
|
@@ -5380,64 +5385,64 @@ function Gi(e) {
|
|
|
5380
5385
|
if (l >= c.length) break;
|
|
5381
5386
|
if (e === "target") s.target = a(c[l++]);
|
|
5382
5387
|
else if (e === "level") {
|
|
5383
|
-
let e =
|
|
5388
|
+
let e = Gi(c, l);
|
|
5384
5389
|
s.level = e.level, l = e.next;
|
|
5385
5390
|
} else if (e === "conditions") {
|
|
5386
5391
|
let e = w(c, l);
|
|
5387
5392
|
s.conditions = a(e.text), l = e.next;
|
|
5388
|
-
} else e === "statement" ? s.statement = a(c[l++]) : e === "verified_by" ? s.verifiedBy =
|
|
5393
|
+
} else e === "statement" ? s.statement = a(c[l++]) : e === "verified_by" ? s.verifiedBy = V(c[l++]) : e === "source" ? s.source = k(i(c[l++])) : i(c[l++]);
|
|
5389
5394
|
}
|
|
5390
5395
|
t.push(s);
|
|
5391
5396
|
}
|
|
5392
5397
|
return t;
|
|
5393
5398
|
}
|
|
5394
|
-
function
|
|
5399
|
+
function qi(e) {
|
|
5395
5400
|
return e.id === "" && !e.target && !e.level && !e.conditions && e.verifiedBy.length === 0 && !e.source;
|
|
5396
5401
|
}
|
|
5397
|
-
function
|
|
5402
|
+
function Ji(e, t) {
|
|
5398
5403
|
let r = n(e), a = 0;
|
|
5399
5404
|
for (; a < r.length;) {
|
|
5400
5405
|
let e = r[a++];
|
|
5401
5406
|
if (a >= r.length) break;
|
|
5402
|
-
if (e === "metadata") t.is.metadata =
|
|
5403
|
-
else if (e === "provenance") t.is.provenance =
|
|
5404
|
-
else if (e === "structure") t.is.structure =
|
|
5405
|
-
else if (e === "design_parameters") t.is.designParameters =
|
|
5406
|
-
else if (e === "designed_conditions") t.is.designedConditions =
|
|
5407
|
-
else if (e === "promises") t.is.promises =
|
|
5408
|
-
else if (e === "artifacts") t.is.artifacts =
|
|
5407
|
+
if (e === "metadata") t.is.metadata = Li(i(r[a++]));
|
|
5408
|
+
else if (e === "provenance") t.is.provenance = Li(i(r[a++]));
|
|
5409
|
+
else if (e === "structure") t.is.structure = W(i(r[a++]));
|
|
5410
|
+
else if (e === "design_parameters") t.is.designParameters = Ri(i(r[a++]));
|
|
5411
|
+
else if (e === "designed_conditions") t.is.designedConditions = Li(i(r[a++]));
|
|
5412
|
+
else if (e === "promises") t.is.promises = Ki(i(r[a++]));
|
|
5413
|
+
else if (e === "artifacts") t.is.artifacts = W(i(r[a++]));
|
|
5409
5414
|
else if (e === "endpoint") {
|
|
5410
5415
|
let e = E(r[a++] ?? ""), n = a < r.length ? i(r[a++]) : "";
|
|
5411
|
-
e && t.is.endpoints.push(
|
|
5412
|
-
} else e === "composed_of" ? t.is.composedOf =
|
|
5416
|
+
e && t.is.endpoints.push(li(e, n));
|
|
5417
|
+
} else e === "composed_of" ? t.is.composedOf = _i(i(r[a++] ?? "")) : a = Wi(t, "is", e, r, a);
|
|
5413
5418
|
}
|
|
5414
5419
|
}
|
|
5415
|
-
function
|
|
5420
|
+
function Yi(e, t) {
|
|
5416
5421
|
let r = n(e), o = 0;
|
|
5417
5422
|
for (; o < r.length;) {
|
|
5418
5423
|
let e = r[o++];
|
|
5419
5424
|
if (o >= r.length) break;
|
|
5420
|
-
if (e === "attributes") t.has.attributes =
|
|
5421
|
-
else if (e === "dimensions") t.has.dimensions =
|
|
5425
|
+
if (e === "attributes") t.has.attributes = Ri(i(r[o++]));
|
|
5426
|
+
else if (e === "dimensions") t.has.dimensions = zi(i(r[o++]));
|
|
5422
5427
|
else if (e === "state") t.has.state = a(r[o++]);
|
|
5423
|
-
else if (e === "characteristics") t.has.characteristics =
|
|
5424
|
-
else if (e === "environmental_context") t.has.environmentalContext =
|
|
5425
|
-
else if (e === "artifact_instances") t.has.artifactInstances =
|
|
5428
|
+
else if (e === "characteristics") t.has.characteristics = Bi(i(r[o++]));
|
|
5429
|
+
else if (e === "environmental_context") t.has.environmentalContext = W(i(r[o++]));
|
|
5430
|
+
else if (e === "artifact_instances") t.has.artifactInstances = W(i(r[o++]));
|
|
5426
5431
|
else if (e === "serve") {
|
|
5427
|
-
let e =
|
|
5432
|
+
let e = fi(r, o);
|
|
5428
5433
|
t.has.serves.push(e.binding), o = e.next;
|
|
5429
|
-
} else o =
|
|
5434
|
+
} else o = Wi(t, "has", e, r, o);
|
|
5430
5435
|
}
|
|
5431
5436
|
}
|
|
5432
|
-
function
|
|
5437
|
+
function Xi(e, t) {
|
|
5433
5438
|
let r = n(e), i = 0;
|
|
5434
5439
|
for (; i < r.length;) {
|
|
5435
5440
|
let e = r[i++];
|
|
5436
5441
|
if (i >= r.length) break;
|
|
5437
|
-
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i =
|
|
5442
|
+
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i = Wi(t, "does", e, r, i);
|
|
5438
5443
|
}
|
|
5439
5444
|
}
|
|
5440
|
-
var
|
|
5445
|
+
var Zi = function(e, t) {
|
|
5441
5446
|
let n = {
|
|
5442
5447
|
id: e,
|
|
5443
5448
|
extends: "",
|
|
@@ -5467,11 +5472,11 @@ var Xi = function(e, t) {
|
|
|
5467
5472
|
for (; s < o.length;) {
|
|
5468
5473
|
let e = o[s++];
|
|
5469
5474
|
if (s >= o.length) break;
|
|
5470
|
-
e === "extends" ? n.extends = a(o[s++]) : e === "is" ?
|
|
5475
|
+
e === "extends" ? n.extends = a(o[s++]) : e === "is" ? Ji(i(o[s++]), n) : e === "has" ? Yi(i(o[s++]), n) : e === "does" ? Xi(i(o[s++]), n) : e === "reference" ? n.referenceIds = U(o[s++]) : i(o[s++]);
|
|
5471
5476
|
}
|
|
5472
5477
|
return (t) => (t.subjects[e] = n, t);
|
|
5473
5478
|
};
|
|
5474
|
-
function
|
|
5479
|
+
function Qi(e, t) {
|
|
5475
5480
|
return {
|
|
5476
5481
|
id: t.id,
|
|
5477
5482
|
extends: "",
|
|
@@ -5521,24 +5526,24 @@ function Zi(e, t) {
|
|
|
5521
5526
|
misplacedAspects: t.misplacedAspects
|
|
5522
5527
|
};
|
|
5523
5528
|
}
|
|
5524
|
-
function
|
|
5529
|
+
function $i(e, t) {
|
|
5525
5530
|
let n = (t, r) => {
|
|
5526
5531
|
let i = t.extends;
|
|
5527
5532
|
if (!i || r.has(i)) return t;
|
|
5528
5533
|
let a = e.subjects[i];
|
|
5529
|
-
return a ? (r.add(i),
|
|
5534
|
+
return a ? (r.add(i), Qi(n(a, r), t)) : t;
|
|
5530
5535
|
};
|
|
5531
5536
|
return n(t, /* @__PURE__ */ new Set([t.id]));
|
|
5532
5537
|
}
|
|
5533
|
-
function
|
|
5538
|
+
function ea(e, t) {
|
|
5534
5539
|
let n = Object.keys(t);
|
|
5535
5540
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " " + T(t[e])).join(" ") + " }\n";
|
|
5536
5541
|
}
|
|
5537
|
-
function
|
|
5542
|
+
function ta(e, t) {
|
|
5538
5543
|
let n = Object.keys(t);
|
|
5539
5544
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " :" + (t[e] ? " " + T(t[e]) : "")).join(" ") + " }\n";
|
|
5540
5545
|
}
|
|
5541
|
-
function
|
|
5546
|
+
function G(e, t) {
|
|
5542
5547
|
return t.length === 0 ? "" : " " + e + " { " + t.map(T).join(" ") + " }\n";
|
|
5543
5548
|
}
|
|
5544
5549
|
function na(e) {
|
|
@@ -5558,14 +5563,14 @@ function ia(e) {
|
|
|
5558
5563
|
}
|
|
5559
5564
|
function aa(e) {
|
|
5560
5565
|
if (e.length === 0) return "";
|
|
5561
|
-
if (e.every(
|
|
5566
|
+
if (e.every(qi)) return " promises { " + e.map((e) => T(e.statement)).join(" ") + " }\n";
|
|
5562
5567
|
let t = " promises {\n";
|
|
5563
5568
|
for (let n of e) {
|
|
5564
|
-
if (
|
|
5569
|
+
if (qi(n)) {
|
|
5565
5570
|
t += " " + T(n.statement) + "\n";
|
|
5566
5571
|
continue;
|
|
5567
5572
|
}
|
|
5568
|
-
t += " " + T(n.id) + " {\n", n.target && (t += " target " + T(n.target) + "\n"), n.level && (t += " level " + ia(n.level) + "\n"), n.conditions && (t += " conditions " + ra(n.conditions) + "\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), t +=
|
|
5573
|
+
t += " " + T(n.id) + " {\n", n.target && (t += " target " + T(n.target) + "\n"), n.level && (t += " level " + ia(n.level) + "\n"), n.conditions && (t += " conditions " + ra(n.conditions) + "\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), t += H("verified_by", n.verifiedBy, " "), t += B("source", n.source ?? null, " "), t += " }\n";
|
|
5569
5574
|
}
|
|
5570
5575
|
return t += " }\n", t;
|
|
5571
5576
|
}
|
|
@@ -5576,7 +5581,7 @@ function oa(e) {
|
|
|
5576
5581
|
for (let r of t) {
|
|
5577
5582
|
let t = e[r];
|
|
5578
5583
|
if (t.behavior || t.quantityKind || t.unit || t.source && (t.source.doc || t.source.clause)) {
|
|
5579
|
-
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " + ra(t.derivation) + "\n"), t.behavior && (n += " behavior " + T(t.behavior) + "\n"), t.quantityKind && (n += " quantity_kind " + T(t.quantityKind) + "\n"), t.unit && (n += " unit \"" + s(t.unit) + "\"\n"), n +=
|
|
5584
|
+
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " + ra(t.derivation) + "\n"), t.behavior && (n += " behavior " + T(t.behavior) + "\n"), t.quantityKind && (n += " quantity_kind " + T(t.quantityKind) + "\n"), t.unit && (n += " unit \"" + s(t.unit) + "\"\n"), n += B("source", t.source ?? null, " "), n += " }\n";
|
|
5580
5585
|
continue;
|
|
5581
5586
|
}
|
|
5582
5587
|
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " + ra(t.derivation)), n += "\n";
|
|
@@ -5585,60 +5590,60 @@ function oa(e) {
|
|
|
5585
5590
|
}
|
|
5586
5591
|
function sa(e) {
|
|
5587
5592
|
let t = "";
|
|
5588
|
-
for (let n of e) t +=
|
|
5593
|
+
for (let n of e) t += di(n, " ");
|
|
5589
5594
|
return t;
|
|
5590
5595
|
}
|
|
5591
5596
|
function ca(e) {
|
|
5592
5597
|
let t = "";
|
|
5593
|
-
for (let n of e) t +=
|
|
5598
|
+
for (let n of e) t += pi(n, " ");
|
|
5594
5599
|
return t;
|
|
5595
5600
|
}
|
|
5596
5601
|
var la = function(e) {
|
|
5597
5602
|
let t = "subject " + e.id + " {\n";
|
|
5598
5603
|
e.extends && (t += " extends " + e.extends + "\n");
|
|
5599
|
-
let n =
|
|
5604
|
+
let n = ea("metadata", e.is.metadata) + ea("provenance", e.is.provenance) + G("structure", e.is.structure) + ta("design_parameters", e.is.designParameters) + ea("designed_conditions", e.is.designedConditions) + aa(e.is.promises) + G("artifacts", e.is.artifacts) + sa(e.is.endpoints) + (e.is.composedOf ? yi(e.is.composedOf, " ") : "");
|
|
5600
5605
|
n && (t += " is {\n" + n + " }\n");
|
|
5601
|
-
let r =
|
|
5606
|
+
let r = ta("attributes", e.has.attributes) + na(e.has.dimensions) + (e.has.state ? " state " + T(e.has.state) + "\n" : "") + oa(e.has.characteristics) + G("environmental_context", e.has.environmentalContext) + G("artifact_instances", e.has.artifactInstances) + ca(e.has.serves);
|
|
5602
5607
|
r && (t += " has {\n" + r + " }\n");
|
|
5603
5608
|
let i = "";
|
|
5604
5609
|
for (let t of e.does.behaviors) i += " behavior " + T(t) + "\n";
|
|
5605
|
-
return i && (t += " does {\n" + i + " }\n"), t +=
|
|
5610
|
+
return i && (t += " does {\n" + i + " }\n"), t += H("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5606
5611
|
}, ua = {
|
|
5607
5612
|
keyword: "instrument",
|
|
5608
5613
|
field: "instruments",
|
|
5609
5614
|
takesID: !0,
|
|
5610
|
-
parse:
|
|
5611
|
-
dump:
|
|
5615
|
+
parse: bi,
|
|
5616
|
+
dump: Di
|
|
5612
5617
|
}, da = {
|
|
5613
5618
|
keyword: "attribute_definition",
|
|
5614
5619
|
field: "attributeDefinitions",
|
|
5615
5620
|
takesID: !0,
|
|
5616
|
-
parse:
|
|
5617
|
-
dump:
|
|
5621
|
+
parse: Oi,
|
|
5622
|
+
dump: ki
|
|
5618
5623
|
}, fa = {
|
|
5619
5624
|
keyword: "capability",
|
|
5620
5625
|
field: "capabilities",
|
|
5621
5626
|
takesID: !0,
|
|
5622
|
-
parse:
|
|
5623
|
-
dump:
|
|
5627
|
+
parse: Ai,
|
|
5628
|
+
dump: ji
|
|
5624
5629
|
}, pa = {
|
|
5625
5630
|
keyword: "behavior",
|
|
5626
5631
|
field: "behaviors",
|
|
5627
5632
|
takesID: !0,
|
|
5628
|
-
parse:
|
|
5629
|
-
dump:
|
|
5633
|
+
parse: Mi,
|
|
5634
|
+
dump: Ni
|
|
5630
5635
|
}, ma = {
|
|
5631
5636
|
keyword: "condition_set",
|
|
5632
5637
|
field: "conditionSets",
|
|
5633
5638
|
takesID: !0,
|
|
5634
|
-
parse:
|
|
5635
|
-
dump:
|
|
5639
|
+
parse: Pi,
|
|
5640
|
+
dump: Ii
|
|
5636
5641
|
}, ha = {
|
|
5637
5642
|
keyword: "subject",
|
|
5638
5643
|
field: "subjects",
|
|
5639
5644
|
takesID: !0,
|
|
5640
|
-
parse:
|
|
5641
|
-
resolve:
|
|
5645
|
+
parse: Zi,
|
|
5646
|
+
resolve: $i,
|
|
5642
5647
|
dump: la
|
|
5643
5648
|
};
|
|
5644
5649
|
//#endregion
|
|
@@ -6653,8 +6658,8 @@ var yo = [
|
|
|
6653
6658
|
keyword: "term",
|
|
6654
6659
|
field: "terms",
|
|
6655
6660
|
takesID: !0,
|
|
6656
|
-
parse:
|
|
6657
|
-
dump:
|
|
6661
|
+
parse: br,
|
|
6662
|
+
dump: xr
|
|
6658
6663
|
}),
|
|
6659
6664
|
K({
|
|
6660
6665
|
keyword: "form",
|
|
@@ -6690,43 +6695,43 @@ var yo = [
|
|
|
6690
6695
|
keyword: "verdict",
|
|
6691
6696
|
field: "verdicts",
|
|
6692
6697
|
takesID: !0,
|
|
6693
|
-
parse:
|
|
6694
|
-
dump:
|
|
6698
|
+
parse: wr,
|
|
6699
|
+
dump: Tr
|
|
6695
6700
|
}),
|
|
6696
6701
|
K({
|
|
6697
6702
|
keyword: "reference_material",
|
|
6698
6703
|
field: "referenceMaterials",
|
|
6699
6704
|
takesID: !0,
|
|
6700
|
-
parse:
|
|
6701
|
-
dump:
|
|
6705
|
+
parse: Or,
|
|
6706
|
+
dump: Ar
|
|
6702
6707
|
}),
|
|
6703
6708
|
K({
|
|
6704
6709
|
keyword: "test_point_set",
|
|
6705
6710
|
field: "testPointSets",
|
|
6706
6711
|
takesID: !0,
|
|
6707
|
-
parse:
|
|
6708
|
-
dump:
|
|
6712
|
+
parse: zr,
|
|
6713
|
+
dump: Br
|
|
6709
6714
|
}),
|
|
6710
6715
|
K({
|
|
6711
6716
|
keyword: "competence_kind",
|
|
6712
6717
|
field: "competenceKinds",
|
|
6713
6718
|
takesID: !0,
|
|
6714
|
-
parse:
|
|
6715
|
-
dump:
|
|
6719
|
+
parse: cr,
|
|
6720
|
+
dump: lr
|
|
6716
6721
|
}),
|
|
6717
6722
|
K({
|
|
6718
6723
|
keyword: "constraint",
|
|
6719
6724
|
field: "constraints",
|
|
6720
6725
|
takesID: !0,
|
|
6721
|
-
parse:
|
|
6722
|
-
dump:
|
|
6726
|
+
parse: Mr,
|
|
6727
|
+
dump: Nr
|
|
6723
6728
|
}),
|
|
6724
6729
|
K({
|
|
6725
6730
|
keyword: "discrepancy_record",
|
|
6726
6731
|
field: "discrepancyRecords",
|
|
6727
6732
|
takesID: !0,
|
|
6728
|
-
parse:
|
|
6729
|
-
dump:
|
|
6733
|
+
parse: Fr,
|
|
6734
|
+
dump: Ir
|
|
6730
6735
|
}),
|
|
6731
6736
|
K({
|
|
6732
6737
|
keyword: "state_machine",
|
|
@@ -6735,20 +6740,20 @@ var yo = [
|
|
|
6735
6740
|
parse: Mn,
|
|
6736
6741
|
dump: Fn
|
|
6737
6742
|
}),
|
|
6738
|
-
Yr,
|
|
6739
6743
|
Xr,
|
|
6744
|
+
Zr,
|
|
6740
6745
|
ua,
|
|
6741
6746
|
da,
|
|
6742
6747
|
fa,
|
|
6743
6748
|
pa,
|
|
6744
6749
|
ma,
|
|
6745
|
-
|
|
6750
|
+
ri,
|
|
6746
6751
|
K({
|
|
6747
6752
|
keyword: "conformance_test",
|
|
6748
6753
|
field: "conformanceTests",
|
|
6749
6754
|
takesID: !0,
|
|
6750
|
-
parse:
|
|
6751
|
-
dump:
|
|
6755
|
+
parse: vr,
|
|
6756
|
+
dump: yr
|
|
6752
6757
|
}),
|
|
6753
6758
|
ha,
|
|
6754
6759
|
wa,
|
|
@@ -6763,7 +6768,7 @@ var yo = [
|
|
|
6763
6768
|
parse: _o,
|
|
6764
6769
|
dump: vo
|
|
6765
6770
|
}),
|
|
6766
|
-
|
|
6771
|
+
mi,
|
|
6767
6772
|
Xa,
|
|
6768
6773
|
to,
|
|
6769
6774
|
no,
|
|
@@ -6802,7 +6807,7 @@ function So(e) {
|
|
|
6802
6807
|
return t;
|
|
6803
6808
|
}
|
|
6804
6809
|
var Co = {
|
|
6805
|
-
package: { parse:
|
|
6810
|
+
package: { parse: ti },
|
|
6806
6811
|
root: { parse: (e) => (t) => (t.root = e.trim(), t) },
|
|
6807
6812
|
metadata: { parse: m },
|
|
6808
6813
|
version: { parse: () => (e) => e },
|
|
@@ -6954,7 +6959,7 @@ function zo(e) {
|
|
|
6954
6959
|
let t = (0, q.join)((0, q.resolve)(e), "package.primmel");
|
|
6955
6960
|
if (!(0, q.existsSync)(t)) throw Error(`loadPackage: no package.primmel found in ${(0, q.resolve)(e)}`);
|
|
6956
6961
|
let n = (0, q.readFileSync)(t, "utf8"), r = { packageManifest: null };
|
|
6957
|
-
|
|
6962
|
+
ti(n)(r);
|
|
6958
6963
|
let i = r.packageManifest;
|
|
6959
6964
|
if (!i || !i.id) throw Error(`loadPackage: ${t} is not a valid package manifest`);
|
|
6960
6965
|
return i;
|
|
@@ -8011,4 +8016,4 @@ function Vs(e) {
|
|
|
8011
8016
|
return Oo(e);
|
|
8012
8017
|
}
|
|
8013
8018
|
//#endregion
|
|
8014
|
-
export { Y as CompositionError, es as PRIMITIVE_TYPES, gs as TIER_BY_FIELD, hs as TIER_ORDER, ps as applyView, ss as buildProcessTree, Q as canonical, Ds as clauseTextKey, os as collectMappings, ms as componentIds, ls as computeCoverage, Ms as diffStandards, us as discoverTransitive, Bs as dump,
|
|
8019
|
+
export { Y as CompositionError, es as PRIMITIVE_TYPES, gs as TIER_BY_FIELD, hs as TIER_ORDER, ps as applyView, ss as buildProcessTree, Q as canonical, Ds as clauseTextKey, os as collectMappings, ms as componentIds, ls as computeCoverage, Ms as diffStandards, us as discoverTransitive, Bs as dump, ni as dumpPackage, Zo as dumpPrm, Ho as effectiveUses, Es as elementIndex, Fs as formatDiffReport, is as isWellFormedMapType, Is as load, Rs as loadFile, zs as loadFileWithIssues, Ro as loadPackage, Vo as loadPackageWithIssues, Xo as loadPrm, Ls as loadWithIssues, $o as mapProfilesToPrm, as as mappingsFromProfile, vs as normalizeSourceRef, Lo as packageFiles, Z as parseTargetRef, rs as parseTypeExpression, Qo as prmToMapProfiles, zo as readPackageManifest, ds as repoMap, Vs as validate };
|