@primmel/primmel 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/check-rules.d.ts.map +1 -1
- package/dist/src/check-rules.js +42 -0
- package/dist/src/check-rules.js.map +1 -1
- package/dist/src/check.d.ts.map +1 -1
- package/dist/src/check.js +203 -0
- package/dist/src/check.js.map +1 -1
- package/dist/src/model-diff.d.ts.map +1 -1
- package/dist/src/model-diff.js +5 -0
- package/dist/src/model-diff.js.map +1 -1
- package/dist/src/ser-des/config/calculation.d.ts.map +1 -1
- package/dist/src/ser-des/config/calculation.js +134 -18
- package/dist/src/ser-des/config/calculation.js.map +1 -1
- package/dist/src/ser-des/config/commonTestCondition.d.ts +5 -0
- package/dist/src/ser-des/config/commonTestCondition.d.ts.map +1 -0
- package/dist/src/ser-des/config/commonTestCondition.js +75 -0
- package/dist/src/ser-des/config/commonTestCondition.js.map +1 -0
- package/dist/src/ser-des/config/formulaNote.d.ts +5 -0
- package/dist/src/ser-des/config/formulaNote.d.ts.map +1 -0
- package/dist/src/ser-des/config/formulaNote.js +66 -0
- package/dist/src/ser-des/config/formulaNote.js.map +1 -0
- package/dist/src/ser-des/config/index.d.ts.map +1 -1
- package/dist/src/ser-des/config/index.js +52 -0
- package/dist/src/ser-des/config/index.js.map +1 -1
- package/dist/src/ser-des/config/partAnnex.d.ts +5 -0
- package/dist/src/ser-des/config/partAnnex.d.ts.map +1 -0
- package/dist/src/ser-des/config/partAnnex.js +91 -0
- package/dist/src/ser-des/config/partAnnex.js.map +1 -0
- package/dist/src/ser-des/config/storyline.d.ts +7 -0
- package/dist/src/ser-des/config/storyline.d.ts.map +1 -0
- package/dist/src/ser-des/config/storyline.js +264 -0
- package/dist/src/ser-des/config/storyline.js.map +1 -0
- package/dist/src/ser-des/config/subject.d.ts.map +1 -1
- package/dist/src/ser-des/config/subject.js +93 -0
- package/dist/src/ser-des/config/subject.js.map +1 -1
- package/dist/src/ser-des/package.d.ts.map +1 -1
- package/dist/src/ser-des/package.js +5 -0
- package/dist/src/ser-des/package.js.map +1 -1
- package/dist/src/ser-des/parse.d.ts.map +1 -1
- package/dist/src/ser-des/parse.js +5 -0
- package/dist/src/ser-des/parse.js.map +1 -1
- package/dist/src/ser-des/types.d.ts +10 -0
- package/dist/src/ser-des/types.d.ts.map +1 -1
- package/dist/src/types/Calculation.d.ts +35 -0
- package/dist/src/types/Calculation.d.ts.map +1 -1
- package/dist/src/types/CommonTestCondition.d.ts +15 -0
- package/dist/src/types/CommonTestCondition.d.ts.map +1 -0
- package/dist/src/types/CommonTestCondition.js +22 -0
- package/dist/src/types/CommonTestCondition.js.map +1 -0
- package/dist/src/types/PartAnnex.d.ts +18 -0
- package/dist/src/types/PartAnnex.d.ts.map +1 -0
- package/dist/src/types/PartAnnex.js +29 -0
- package/dist/src/types/PartAnnex.js.map +1 -0
- package/dist/src/types/Standard.d.ts +20 -0
- package/dist/src/types/Standard.d.ts.map +1 -1
- package/dist/src/types/Storyline.d.ts +62 -0
- package/dist/src/types/Storyline.d.ts.map +1 -0
- package/dist/src/types/Storyline.js +51 -0
- package/dist/src/types/Storyline.js.map +1 -0
- package/dist/src/types/Subject.d.ts +33 -0
- package/dist/src/types/Subject.d.ts.map +1 -1
- package/dist/src/types/Symbol.d.ts +17 -0
- package/dist/src/types/Symbol.d.ts.map +1 -1
- package/dist-browser/index.mjs +1110 -771
- package/dist-cli/primmel.mjs +924 -41
- package/package.json +1 -1
package/dist-browser/index.mjs
CHANGED
|
@@ -134,10 +134,12 @@ function u(e, n, r = {}) {
|
|
|
134
134
|
forms: {},
|
|
135
135
|
subforms: {},
|
|
136
136
|
symbols: {},
|
|
137
|
+
formulaNotes: {},
|
|
137
138
|
calculations: {},
|
|
138
139
|
verdicts: {},
|
|
139
140
|
referenceMaterials: {},
|
|
140
141
|
testPointSets: {},
|
|
142
|
+
commonTestConditions: {},
|
|
141
143
|
competenceKinds: {},
|
|
142
144
|
schemeActivityKinds: {},
|
|
143
145
|
schemeTypes: {},
|
|
@@ -174,6 +176,9 @@ function u(e, n, r = {}) {
|
|
|
174
176
|
decisionRules: {},
|
|
175
177
|
documentModules: {},
|
|
176
178
|
informativeAnnexes: {},
|
|
179
|
+
partAnnexes: {},
|
|
180
|
+
demoWorlds: {},
|
|
181
|
+
storylines: {},
|
|
177
182
|
connectorProfiles: {},
|
|
178
183
|
monitors: {},
|
|
179
184
|
passports: {},
|
|
@@ -3079,7 +3084,31 @@ var zn = function(e) {
|
|
|
3079
3084
|
t += " }\n";
|
|
3080
3085
|
}
|
|
3081
3086
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
3082
|
-
}
|
|
3087
|
+
};
|
|
3088
|
+
//#endregion
|
|
3089
|
+
//#region src/ser-des/config/formulaNote.ts
|
|
3090
|
+
function Wn(e) {
|
|
3091
|
+
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
3092
|
+
}
|
|
3093
|
+
var Gn = (e, t) => {
|
|
3094
|
+
let n = {
|
|
3095
|
+
id: e,
|
|
3096
|
+
text: "",
|
|
3097
|
+
appliesTo: []
|
|
3098
|
+
};
|
|
3099
|
+
return v(t, (e, t) => {
|
|
3100
|
+
if (e === "text") n.text = a(t());
|
|
3101
|
+
else if (e === "applies_to") n.appliesTo = Wn(t());
|
|
3102
|
+
else return !1;
|
|
3103
|
+
return !0;
|
|
3104
|
+
}, {
|
|
3105
|
+
construct: "formula_note",
|
|
3106
|
+
id: e
|
|
3107
|
+
}), (t) => (t.formulaNotes[e] = n, t);
|
|
3108
|
+
}, Kn = function(e) {
|
|
3109
|
+
let t = "formula_note " + e.id + " {\n";
|
|
3110
|
+
return e.text && (t += " text \"" + s(e.text) + "\"\n"), e.appliesTo.length > 0 && (t += " applies_to { " + e.appliesTo.map(N).join(" ") + " }\n"), t += "}\n", t;
|
|
3111
|
+
}, qn = function(e, t) {
|
|
3083
3112
|
let o = {
|
|
3084
3113
|
id: e,
|
|
3085
3114
|
name: "",
|
|
@@ -3123,17 +3152,24 @@ var zn = function(e) {
|
|
|
3123
3152
|
};
|
|
3124
3153
|
for (let n = 0; n + 1 < e.length; n += 2) e[n] === "doc" ? t.doc = a(e[n + 1]) : e[n] === "clause" ? t.clause = a(e[n + 1]) : e[n] === "fragment" && (t.fragment = a(e[n + 1]));
|
|
3125
3154
|
o.sourceRef ||= t, (o.sourceRefs ??= []).push(t);
|
|
3126
|
-
} else if (t === "inputs") o.inputs =
|
|
3155
|
+
} else if (t === "inputs") o.inputs = Jn(i(s[c++]));
|
|
3127
3156
|
else if (t === "output") {
|
|
3128
3157
|
let e = "";
|
|
3129
|
-
s[c] === ":" && (e += s[c++]), c < s.length && !s[c].startsWith("{") && (e += " " + s[c++]), c < s.length && s[c].startsWith("{") && (e += " " + s[c++]), o.output =
|
|
3130
|
-
} else t === "params"
|
|
3158
|
+
s[c] === ":" && (e += s[c++]), c < s.length && !s[c].startsWith("{") && (e += " " + s[c++]), c < s.length && s[c].startsWith("{") && (e += " " + s[c++]), o.output = Yn(e);
|
|
3159
|
+
} else if (t === "params") o.params = n(a(s[c++])).map(a).filter((e) => e.length > 0);
|
|
3160
|
+
else if (t === "lookup") o.lookup = Xn(i(s[c++]));
|
|
3161
|
+
else if (t === "profile") o.profile = a(s[c++]);
|
|
3162
|
+
else if (t === "variant") {
|
|
3163
|
+
let t = a(s[c++]);
|
|
3164
|
+
if (c >= s.length || !s[c].startsWith("{")) throw Error(`Parsing error: calculation. ID ${e}: variant ${t} is missing its block`);
|
|
3165
|
+
(o.variants ??= []).push(Qn(t, i(s[c++]), e));
|
|
3166
|
+
} else c++;
|
|
3131
3167
|
} else throw Error(`Parsing error: calculation. ID ${e}: Expecting value for ${t}`);
|
|
3132
3168
|
}
|
|
3133
3169
|
}
|
|
3134
3170
|
return (t) => (t.calculations[e] = o, t);
|
|
3135
3171
|
};
|
|
3136
|
-
function
|
|
3172
|
+
function Jn(e) {
|
|
3137
3173
|
let t = [], n = r(e), o = 0;
|
|
3138
3174
|
for (; o < n.length;) {
|
|
3139
3175
|
let e = n[o++];
|
|
@@ -3171,7 +3207,7 @@ function Gn(e) {
|
|
|
3171
3207
|
}
|
|
3172
3208
|
return t;
|
|
3173
3209
|
}
|
|
3174
|
-
function
|
|
3210
|
+
function Yn(e) {
|
|
3175
3211
|
let t = n(e), o = 0, s = "number", c = "1", l = "", u = "", d, f, p, m = !1;
|
|
3176
3212
|
if (t[o] === ":" && o++, o < t.length && (s = t[o++]), o < t.length && t[o].startsWith("{")) {
|
|
3177
3213
|
let e = r(i(t[o++])), n = 0;
|
|
@@ -3197,7 +3233,7 @@ function Kn(e) {
|
|
|
3197
3233
|
};
|
|
3198
3234
|
return l && (h.name = l), u && (h.description = u), d !== void 0 && (h.quantityKind = d), m && (h.hasRange = !0, f !== void 0 && (h.rangeMin = f), p !== void 0 && (h.rangeMax = p)), h;
|
|
3199
3235
|
}
|
|
3200
|
-
function
|
|
3236
|
+
function Xn(e) {
|
|
3201
3237
|
let t = {
|
|
3202
3238
|
key: "",
|
|
3203
3239
|
variable: "",
|
|
@@ -3217,7 +3253,43 @@ function qn(e) {
|
|
|
3217
3253
|
}
|
|
3218
3254
|
return t;
|
|
3219
3255
|
}
|
|
3220
|
-
var
|
|
3256
|
+
var Zn = [
|
|
3257
|
+
"expression",
|
|
3258
|
+
"table_lookup",
|
|
3259
|
+
"profile_lookup",
|
|
3260
|
+
"pass_fail"
|
|
3261
|
+
];
|
|
3262
|
+
function Qn(e, t, o) {
|
|
3263
|
+
let s = {
|
|
3264
|
+
id: e,
|
|
3265
|
+
type: "",
|
|
3266
|
+
label: "",
|
|
3267
|
+
description: "",
|
|
3268
|
+
params: [],
|
|
3269
|
+
expression: "",
|
|
3270
|
+
lookup: null,
|
|
3271
|
+
profile: ""
|
|
3272
|
+
}, c = r(t), l = 0;
|
|
3273
|
+
for (; l < c.length;) {
|
|
3274
|
+
let t = c[l++];
|
|
3275
|
+
if (l >= c.length) break;
|
|
3276
|
+
if (t === "type") {
|
|
3277
|
+
let t = a(c[l++]);
|
|
3278
|
+
if (!Zn.includes(t)) throw Error(`Parsing error: calculation. ID ${o}: variant ${e}: Unknown variant type "${t}" (valid: ${Zn.join(", ")})`);
|
|
3279
|
+
s.type = t;
|
|
3280
|
+
} else t === "label" ? s.label = a(c[l++]) : t === "description" ? s.description = a(c[l++]) : t === "params" ? s.params = n(a(c[l++])).map(a).filter((e) => e.length > 0) : t === "expression" ? s.expression = a(c[l++]) : t === "lookup" ? s.lookup = Xn(i(c[l++])) : t === "profile" ? s.profile = a(c[l++]) : i(c[l++]);
|
|
3281
|
+
}
|
|
3282
|
+
return s;
|
|
3283
|
+
}
|
|
3284
|
+
function $n(e) {
|
|
3285
|
+
let t = "";
|
|
3286
|
+
return e.key && (t += "key " + e.key + " "), e.variable && (t += "variable " + e.variable + " "), e.multiplier && (t += "multiplier " + e.multiplier + " "), e.defaultTier && (t += "default_tier { factor " + e.defaultTier.factor, e.defaultTier.mode && (t += " mode " + e.defaultTier.mode), t += " } "), t;
|
|
3287
|
+
}
|
|
3288
|
+
function er(e) {
|
|
3289
|
+
let t = " variant " + N(e.id) + " {\n";
|
|
3290
|
+
return e.type && (t += " type " + e.type + "\n"), e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.params.length > 0 && (t += " params { " + e.params.map(N).join(" ") + " }\n"), e.expression && (t += " expression \"" + s(e.expression) + "\"\n"), e.lookup && (t += " lookup { " + $n(e.lookup) + "}\n"), e.profile && (t += " profile " + N(e.profile) + "\n"), t += " }\n", t;
|
|
3291
|
+
}
|
|
3292
|
+
var tr = function(e, t) {
|
|
3221
3293
|
let n = [];
|
|
3222
3294
|
for (let r of t._relations.ref) {
|
|
3223
3295
|
let t = f(e, "references", r);
|
|
@@ -3227,7 +3299,7 @@ var Jn = function(e, t) {
|
|
|
3227
3299
|
...t,
|
|
3228
3300
|
ref: n
|
|
3229
3301
|
};
|
|
3230
|
-
},
|
|
3302
|
+
}, nr = function(e) {
|
|
3231
3303
|
let t = "calculation " + e.id + " {\n";
|
|
3232
3304
|
if (t += " name \"" + s(e.name) + "\"\n", e.identifier && (t += " identifier \"" + s(e.identifier) + "\"\n"), e.ruleType && (t += " type " + e.ruleType + "\n"), e.category && (t += " category " + e.category + "\n"), e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.inputs.length > 0) {
|
|
3233
3305
|
t += " inputs {\n";
|
|
@@ -3238,7 +3310,8 @@ var Jn = function(e, t) {
|
|
|
3238
3310
|
t += " }\n";
|
|
3239
3311
|
}
|
|
3240
3312
|
let n = " output : " + e.output.type + " { unit \"" + s(e.output.unit) + "\"";
|
|
3241
|
-
e.output.quantityKind && (n += " quantity_kind " + e.output.quantityKind), e.output.name && (n += " name \"" + s(e.output.name) + "\""), e.output.description && (n += " description \"" + s(e.output.description) + "\""), e.output.hasRange && (n += " range {", e.output.rangeMin && (n += " min " + N(e.output.rangeMin)), e.output.rangeMax && (n += " max " + N(e.output.rangeMax)), n += " }"), t += n + " }\n", e.expression && (t += " expression \"" + s(e.expression) + "\"\n"), e.params && e.params.length > 0 && (t += " params { " + e.params.join(" ") + " }\n"), e.lookup && (t += " lookup { "
|
|
3313
|
+
e.output.quantityKind && (n += " quantity_kind " + e.output.quantityKind), e.output.name && (n += " name \"" + s(e.output.name) + "\""), e.output.description && (n += " description \"" + s(e.output.description) + "\""), e.output.hasRange && (n += " range {", e.output.rangeMin && (n += " min " + N(e.output.rangeMin)), e.output.rangeMax && (n += " max " + N(e.output.rangeMax)), n += " }"), t += n + " }\n", e.expression && (t += " expression \"" + s(e.expression) + "\"\n"), e.params && e.params.length > 0 && (t += " params { " + e.params.join(" ") + " }\n"), e.lookup && (t += " lookup { " + $n(e.lookup) + "}\n"), e.profile && (t += " profile " + e.profile + "\n");
|
|
3314
|
+
for (let n of e.variants ?? []) t += er(n);
|
|
3242
3315
|
for (let n of e.sourceRefs ?? (e.sourceRef && (e.sourceRef.doc || e.sourceRef.clause) ? [e.sourceRef] : [])) t += E(n, " ", s);
|
|
3243
3316
|
for (let n of e.refs ?? []) t += " ref " + n.predicate + " \"" + s(n.target) + "\"" + (n.note ? " { note \"" + s(n.note) + "\" }" : "") + "\n";
|
|
3244
3317
|
if (t += k(e.correspondences, " ", s, N), e.ref.length > 0) {
|
|
@@ -3247,12 +3320,12 @@ var Jn = function(e, t) {
|
|
|
3247
3320
|
t += " }\n";
|
|
3248
3321
|
}
|
|
3249
3322
|
return t += "}\n", t;
|
|
3250
|
-
},
|
|
3323
|
+
}, rr = [
|
|
3251
3324
|
"lock",
|
|
3252
3325
|
"submit",
|
|
3253
3326
|
"notify",
|
|
3254
3327
|
"record"
|
|
3255
|
-
],
|
|
3328
|
+
], ir = function(e, t) {
|
|
3256
3329
|
let n = {
|
|
3257
3330
|
entityName: e,
|
|
3258
3331
|
kind: "lifecycle",
|
|
@@ -3295,7 +3368,7 @@ var Jn = function(e, t) {
|
|
|
3295
3368
|
let n = e[t++];
|
|
3296
3369
|
if (t < e.length) {
|
|
3297
3370
|
let r = i(e[t++]);
|
|
3298
|
-
u.push(
|
|
3371
|
+
u.push(ar(n, r));
|
|
3299
3372
|
}
|
|
3300
3373
|
} else n === "reference" ? d.push(...r(e[t++])) : i(e[t++]);
|
|
3301
3374
|
}
|
|
@@ -3318,7 +3391,7 @@ var Jn = function(e, t) {
|
|
|
3318
3391
|
}
|
|
3319
3392
|
return (t) => (t.stateMachines[e] = n, t);
|
|
3320
3393
|
};
|
|
3321
|
-
function
|
|
3394
|
+
function ar(e, t) {
|
|
3322
3395
|
let o = {
|
|
3323
3396
|
action: null,
|
|
3324
3397
|
targetEntity: e,
|
|
@@ -3333,11 +3406,11 @@ function Qn(e, t) {
|
|
|
3333
3406
|
if (c < s.length) {
|
|
3334
3407
|
if (e === "action") {
|
|
3335
3408
|
let e = s[c++];
|
|
3336
|
-
if (!
|
|
3409
|
+
if (!rr.includes(e)) throw Error(`Parsing error: state_machine cascade. Unknown action ${e} (valid: ${rr.join(", ")})`);
|
|
3337
3410
|
o.action = e;
|
|
3338
3411
|
} else if (e === "where") o.where = i(s[c++]);
|
|
3339
3412
|
else if (e === "via") o.via = s[c++];
|
|
3340
|
-
else if (e === "with") o.with =
|
|
3413
|
+
else if (e === "with") o.with = or(s[c++]);
|
|
3341
3414
|
else if (e === "set") {
|
|
3342
3415
|
let e = n(i(s[c++])), t = 0;
|
|
3343
3416
|
for (; t < e.length;) {
|
|
@@ -3350,13 +3423,13 @@ function Qn(e, t) {
|
|
|
3350
3423
|
o.set.push(r);
|
|
3351
3424
|
}
|
|
3352
3425
|
}
|
|
3353
|
-
} else e === "create" ? o.create =
|
|
3426
|
+
} else e === "create" ? o.create = or(s[c++]) : i(s[c++]);
|
|
3354
3427
|
}
|
|
3355
3428
|
}
|
|
3356
3429
|
if (o.action && (o.set.length > 0 || o.create !== null)) throw Error(`Parsing error: state_machine cascade. Target ${e} mixes action with set/create — the two forms are mutually exclusive (schema oneOf)`);
|
|
3357
3430
|
return o;
|
|
3358
3431
|
}
|
|
3359
|
-
function
|
|
3432
|
+
function or(e) {
|
|
3360
3433
|
let t = {}, r = n(i(e)), o = 0;
|
|
3361
3434
|
for (; o < r.length;) {
|
|
3362
3435
|
let e = P(r[o++]);
|
|
@@ -3365,7 +3438,7 @@ function $n(e) {
|
|
|
3365
3438
|
}
|
|
3366
3439
|
return t;
|
|
3367
3440
|
}
|
|
3368
|
-
var
|
|
3441
|
+
var sr = function(e) {
|
|
3369
3442
|
let t = "state_machine " + e.entityName + " {\n";
|
|
3370
3443
|
if (e.kind === "operational" && (t += " kind operational\n"), e.initialState && (t += " initial " + e.initialState + "\n"), e.states.length > 0) {
|
|
3371
3444
|
t += " states {\n";
|
|
@@ -3420,18 +3493,18 @@ var er = function(e) {
|
|
|
3420
3493
|
t += " }\n";
|
|
3421
3494
|
}
|
|
3422
3495
|
return t += "}\n", t;
|
|
3423
|
-
},
|
|
3496
|
+
}, cr = ["shared_risk", "guarded"], lr = [
|
|
3424
3497
|
"NSFa",
|
|
3425
3498
|
"NSFd",
|
|
3426
3499
|
"absolute",
|
|
3427
3500
|
"ratio"
|
|
3428
|
-
],
|
|
3501
|
+
], ur = [
|
|
3429
3502
|
"I/MPE",
|
|
3430
3503
|
"D/NSFa",
|
|
3431
3504
|
"D/NSFd",
|
|
3432
3505
|
"n/a"
|
|
3433
3506
|
];
|
|
3434
|
-
function
|
|
3507
|
+
function dr(e) {
|
|
3435
3508
|
let t = {
|
|
3436
3509
|
rule: "",
|
|
3437
3510
|
guardBand: null,
|
|
@@ -3444,7 +3517,7 @@ function ir(e) {
|
|
|
3444
3517
|
if (o >= r.length) break;
|
|
3445
3518
|
if (e === "rule") {
|
|
3446
3519
|
let e = a(r[o++]);
|
|
3447
|
-
if (!
|
|
3520
|
+
if (!cr.includes(e)) throw Error(`Parsing error: acceptance: Unknown rule ${e} (valid: ${cr.join(", ")})`);
|
|
3448
3521
|
t.rule = e;
|
|
3449
3522
|
} else if (e === "guard_band") {
|
|
3450
3523
|
let e = n(i(r[o++])), s = {
|
|
@@ -3456,7 +3529,7 @@ function ir(e) {
|
|
|
3456
3529
|
if (c >= e.length) break;
|
|
3457
3530
|
t === "kind" ? s.kind = a(e[c++]) : t === "value" ? s.value = Number(a(e[c++])) : i(e[c++]);
|
|
3458
3531
|
}
|
|
3459
|
-
if (!
|
|
3532
|
+
if (!lr.includes(s.kind)) throw Error(`Parsing error: acceptance: Unknown guard_band kind ${s.kind} (valid: ${lr.join(", ")})`);
|
|
3460
3533
|
t.guardBand = s;
|
|
3461
3534
|
} else if (e === "uncertainty") {
|
|
3462
3535
|
let e = n(i(r[o++])), s = 0;
|
|
@@ -3467,7 +3540,7 @@ function ir(e) {
|
|
|
3467
3540
|
}
|
|
3468
3541
|
} else if (e === "criterion") {
|
|
3469
3542
|
let e = a(r[o++]);
|
|
3470
|
-
if (!
|
|
3543
|
+
if (!ur.includes(e)) throw Error(`Parsing error: acceptance: Unknown criterion ${e} (valid: ${ur.join(", ")})`);
|
|
3471
3544
|
t.criterion = e;
|
|
3472
3545
|
} else if (e === "statistics") {
|
|
3473
3546
|
let e = n(i(r[o++])), s = {
|
|
@@ -3485,16 +3558,16 @@ function ir(e) {
|
|
|
3485
3558
|
}
|
|
3486
3559
|
return t;
|
|
3487
3560
|
}
|
|
3488
|
-
function
|
|
3561
|
+
function fr(e, t) {
|
|
3489
3562
|
let n = t + "acceptance { ";
|
|
3490
3563
|
return e.rule && (n += "rule " + e.rule + " "), e.guardBand && (n += "guard_band { kind " + e.guardBand.kind + " value " + e.guardBand.value + " } "), e.uncertainty && (n += "uncertainty { max_ratio_to_mpe " + e.uncertainty.maxRatioToMpe + " } "), e.criterion && (n += "criterion " + e.criterion + " "), e.statistics && (n += "statistics { method " + e.statistics.method + " on_basis_of " + e.statistics.onBasisOf + " permits " + e.statistics.permits + " } "), n += "}", n;
|
|
3491
3564
|
}
|
|
3492
3565
|
//#endregion
|
|
3493
3566
|
//#region src/ser-des/config/design.ts
|
|
3494
|
-
function
|
|
3567
|
+
function pr(e) {
|
|
3495
3568
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
3496
3569
|
}
|
|
3497
|
-
function
|
|
3570
|
+
function mr(e) {
|
|
3498
3571
|
let t = {
|
|
3499
3572
|
level: null,
|
|
3500
3573
|
code: "",
|
|
@@ -3510,7 +3583,7 @@ function sr(e) {
|
|
|
3510
3583
|
}
|
|
3511
3584
|
return t;
|
|
3512
3585
|
}
|
|
3513
|
-
function
|
|
3586
|
+
function hr(e) {
|
|
3514
3587
|
let t = {
|
|
3515
3588
|
level: null,
|
|
3516
3589
|
code: "",
|
|
@@ -3538,7 +3611,7 @@ function cr(e) {
|
|
|
3538
3611
|
for (; s < e.length;) {
|
|
3539
3612
|
let t = P(e[s++]);
|
|
3540
3613
|
if (s >= e.length) break;
|
|
3541
|
-
let n = e[s++], r = n.startsWith("{") ?
|
|
3614
|
+
let n = e[s++], r = n.startsWith("{") ? mr(i(n)) : null;
|
|
3542
3615
|
t === "ac" ? a.ac = r : t === "dc" ? a.dc = r : t === "vehicle_dc" && (a.vehicleDc = r);
|
|
3543
3616
|
}
|
|
3544
3617
|
t.columns = a;
|
|
@@ -3546,7 +3619,7 @@ function cr(e) {
|
|
|
3546
3619
|
}
|
|
3547
3620
|
return t;
|
|
3548
3621
|
}
|
|
3549
|
-
function
|
|
3622
|
+
function gr(e) {
|
|
3550
3623
|
let t = [], r = n(e), o = 0;
|
|
3551
3624
|
for (; o < r.length;) {
|
|
3552
3625
|
if (r[o++] !== "count") {
|
|
@@ -3587,7 +3660,7 @@ function lr(e) {
|
|
|
3587
3660
|
}
|
|
3588
3661
|
return t;
|
|
3589
3662
|
}
|
|
3590
|
-
function
|
|
3663
|
+
function _r(e) {
|
|
3591
3664
|
let t = [], r = n(e), o = 0;
|
|
3592
3665
|
for (; o < r.length;) {
|
|
3593
3666
|
if (r[o++] !== "severity") {
|
|
@@ -3606,10 +3679,10 @@ function ur(e) {
|
|
|
3606
3679
|
let n = t[s++];
|
|
3607
3680
|
if (s >= t.length) break;
|
|
3608
3681
|
if (n === "criterion") e.criterion = a(t[s++]);
|
|
3609
|
-
else if (n === "footnotes") e.footnotes =
|
|
3682
|
+
else if (n === "footnotes") e.footnotes = pr(t[s++]);
|
|
3610
3683
|
else if (n === "env") {
|
|
3611
3684
|
let n = a(t[s++]), r = t[s++] ?? "";
|
|
3612
|
-
e.envClassValues[n] = r.startsWith("{") ?
|
|
3685
|
+
e.envClassValues[n] = r.startsWith("{") ? hr(i(r)) : null;
|
|
3613
3686
|
} else i(t[s++]);
|
|
3614
3687
|
}
|
|
3615
3688
|
}
|
|
@@ -3617,7 +3690,7 @@ function ur(e) {
|
|
|
3617
3690
|
}
|
|
3618
3691
|
return t;
|
|
3619
3692
|
}
|
|
3620
|
-
function
|
|
3693
|
+
function vr(e) {
|
|
3621
3694
|
let t = {
|
|
3622
3695
|
duration: "",
|
|
3623
3696
|
cadence: "",
|
|
@@ -3651,11 +3724,11 @@ function dr(e) {
|
|
|
3651
3724
|
}
|
|
3652
3725
|
t.phases.push(r);
|
|
3653
3726
|
}
|
|
3654
|
-
} else e === "constraints" ? t.constraints =
|
|
3727
|
+
} else e === "constraints" ? t.constraints = pr(r[o++]) : i(r[o++]);
|
|
3655
3728
|
}
|
|
3656
3729
|
return t;
|
|
3657
3730
|
}
|
|
3658
|
-
function
|
|
3731
|
+
function yr(e) {
|
|
3659
3732
|
let t = {
|
|
3660
3733
|
count: null,
|
|
3661
3734
|
maxAdditional: null,
|
|
@@ -3679,11 +3752,11 @@ function fr(e) {
|
|
|
3679
3752
|
e === "ref" ? t.selectionRef = a(r[o++]) : i(r[o++]);
|
|
3680
3753
|
}
|
|
3681
3754
|
} else t.selection = a(e);
|
|
3682
|
-
} else e === "continuity" ? t.continuity = a(r[o++]) : e === "rules" ? t.rules =
|
|
3755
|
+
} else e === "continuity" ? t.continuity = a(r[o++]) : e === "rules" ? t.rules = pr(r[o++]) : i(r[o++]);
|
|
3683
3756
|
}
|
|
3684
3757
|
return t;
|
|
3685
3758
|
}
|
|
3686
|
-
function
|
|
3759
|
+
function br(e) {
|
|
3687
3760
|
let t = {
|
|
3688
3761
|
counts: [],
|
|
3689
3762
|
severities: [],
|
|
@@ -3697,8 +3770,8 @@ function pr(e) {
|
|
|
3697
3770
|
for (; o < r.length;) {
|
|
3698
3771
|
let e = r[o++];
|
|
3699
3772
|
if (o >= r.length) break;
|
|
3700
|
-
if (e === "counts") t.counts =
|
|
3701
|
-
else if (e === "severities") t.severities =
|
|
3773
|
+
if (e === "counts") t.counts = gr(i(r[o++]));
|
|
3774
|
+
else if (e === "severities") t.severities = _r(i(r[o++]));
|
|
3702
3775
|
else if (e === "test_points") {
|
|
3703
3776
|
let e = n(i(r[o++])), s = 0;
|
|
3704
3777
|
for (; s < e.length;) {
|
|
@@ -3706,11 +3779,11 @@ function pr(e) {
|
|
|
3706
3779
|
if (s >= e.length) break;
|
|
3707
3780
|
n === "ref" ? t.testPointsRef = a(e[s++]) : i(e[s++]);
|
|
3708
3781
|
}
|
|
3709
|
-
} else e === "schedule" ? t.schedule =
|
|
3782
|
+
} else e === "schedule" ? t.schedule = vr(i(r[o++])) : e === "specimens" ? t.specimens = yr(i(r[o++])) : e === "field" ? t.field = xr(i(r[o++])) : e === "simulation" ? t.simulation = Sr(i(r[o++])) : e === "software" ? t.software = Cr(i(r[o++])) : i(r[o++]);
|
|
3710
3783
|
}
|
|
3711
3784
|
return t;
|
|
3712
3785
|
}
|
|
3713
|
-
function
|
|
3786
|
+
function xr(e) {
|
|
3714
3787
|
let t = {
|
|
3715
3788
|
siteSelection: "",
|
|
3716
3789
|
trafficConditions: "",
|
|
@@ -3736,7 +3809,7 @@ function mr(e) {
|
|
|
3736
3809
|
}
|
|
3737
3810
|
return t;
|
|
3738
3811
|
}
|
|
3739
|
-
function
|
|
3812
|
+
function Sr(e) {
|
|
3740
3813
|
let t = {
|
|
3741
3814
|
simulatorKind: "",
|
|
3742
3815
|
signal: "",
|
|
@@ -3750,7 +3823,7 @@ function hr(e) {
|
|
|
3750
3823
|
}
|
|
3751
3824
|
return t;
|
|
3752
3825
|
}
|
|
3753
|
-
function
|
|
3826
|
+
function Cr(e) {
|
|
3754
3827
|
let t = {
|
|
3755
3828
|
level: "",
|
|
3756
3829
|
items: []
|
|
@@ -3779,7 +3852,7 @@ function gr(e) {
|
|
|
3779
3852
|
for (; o < t.length;) {
|
|
3780
3853
|
let e = t[o++];
|
|
3781
3854
|
if (o >= t.length) break;
|
|
3782
|
-
e === "name" ? r.name = a(t[o++]) : e === "d31" ? r.d31 = a(t[o++]) : e === "obligation" ? r.obligation = a(t[o++]) : e === "methods" ? r.methods =
|
|
3855
|
+
e === "name" ? r.name = a(t[o++]) : e === "d31" ? r.d31 = a(t[o++]) : e === "obligation" ? r.obligation = a(t[o++]) : e === "methods" ? r.methods = pr(t[o++]) : e === "clause" ? r.clause = a(t[o++]) : i(t[o++]);
|
|
3783
3856
|
}
|
|
3784
3857
|
}
|
|
3785
3858
|
t.items.push(r);
|
|
@@ -3788,15 +3861,15 @@ function gr(e) {
|
|
|
3788
3861
|
}
|
|
3789
3862
|
return t;
|
|
3790
3863
|
}
|
|
3791
|
-
function
|
|
3864
|
+
function wr(e) {
|
|
3792
3865
|
let t = "";
|
|
3793
3866
|
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;
|
|
3794
3867
|
}
|
|
3795
|
-
function
|
|
3796
|
-
let t =
|
|
3797
|
-
return e.columns && (t += "columns { ", t += e.columns.ac ? "ac { " +
|
|
3868
|
+
function Tr(e) {
|
|
3869
|
+
let t = wr(e);
|
|
3870
|
+
return e.columns && (t += "columns { ", t += e.columns.ac ? "ac { " + wr(e.columns.ac) + "} " : "ac null ", t += e.columns.dc ? "dc { " + wr(e.columns.dc) + "} " : "dc null ", t += e.columns.vehicleDc ? "vehicle_dc { " + wr(e.columns.vehicleDc) + "} " : "vehicle_dc null ", t += "} "), t;
|
|
3798
3871
|
}
|
|
3799
|
-
function
|
|
3872
|
+
function Er(e, t) {
|
|
3800
3873
|
let n = t + "design {\n";
|
|
3801
3874
|
if (e.counts.length > 0) {
|
|
3802
3875
|
n += t + " counts {\n";
|
|
@@ -3811,7 +3884,7 @@ function yr(e, t) {
|
|
|
3811
3884
|
for (let r of e.severities) {
|
|
3812
3885
|
let e = t + " severity \"" + s(r.row) + "\" { ";
|
|
3813
3886
|
r.criterion && (e += "criterion " + r.criterion + " "), r.footnotes.length > 0 && (e += "footnotes { " + r.footnotes.join(" ") + " } ");
|
|
3814
|
-
for (let [t, n] of Object.entries(r.envClassValues)) e += "env " + t + " " + (n ? "{ " +
|
|
3887
|
+
for (let [t, n] of Object.entries(r.envClassValues)) e += "env " + t + " " + (n ? "{ " + Tr(n) + "}" : "null") + " ";
|
|
3815
3888
|
n += e + "}\n";
|
|
3816
3889
|
}
|
|
3817
3890
|
n += t + " }\n";
|
|
@@ -3857,11 +3930,11 @@ function yr(e, t) {
|
|
|
3857
3930
|
}
|
|
3858
3931
|
//#endregion
|
|
3859
3932
|
//#region src/ser-des/config/competenceKind.ts
|
|
3860
|
-
function
|
|
3933
|
+
function Dr(e) {
|
|
3861
3934
|
let t = a(e);
|
|
3862
3935
|
return t.trim() !== "" && !isNaN(Number(t)) ? Number(t) : t;
|
|
3863
3936
|
}
|
|
3864
|
-
function
|
|
3937
|
+
function Or(e) {
|
|
3865
3938
|
let t = {
|
|
3866
3939
|
value: 0,
|
|
3867
3940
|
unit: ""
|
|
@@ -3873,7 +3946,7 @@ function xr(e) {
|
|
|
3873
3946
|
}
|
|
3874
3947
|
return t;
|
|
3875
3948
|
}
|
|
3876
|
-
function
|
|
3949
|
+
function kr(e) {
|
|
3877
3950
|
let t = [], r = n(e), o = 0;
|
|
3878
3951
|
for (; o < r.length;) {
|
|
3879
3952
|
if (r[o++] !== "competence") {
|
|
@@ -3902,37 +3975,37 @@ function Sr(e) {
|
|
|
3902
3975
|
for (; c < r.length;) {
|
|
3903
3976
|
let e = r[c++];
|
|
3904
3977
|
if (c >= r.length) break;
|
|
3905
|
-
e === "min" ? o.min =
|
|
3978
|
+
e === "min" ? o.min = Dr(r[c++]) : e === "max" ? o.max = Dr(r[c++]) : e === "unit" ? o.unit = a(r[c++]) : i(r[c++]);
|
|
3906
3979
|
}
|
|
3907
3980
|
e.range = o;
|
|
3908
|
-
} else r === "method_standard" ? e.methodStandard = a(t[s++]) : r === "resolution" ? e.resolution =
|
|
3981
|
+
} else r === "method_standard" ? e.methodStandard = a(t[s++]) : r === "resolution" ? e.resolution = Or(i(t[s++])) : r === "stability" ? e.stability = Or(i(t[s++])) : r === "description" ? e.description = a(t[s++]) : i(t[s++]);
|
|
3909
3982
|
}
|
|
3910
3983
|
}
|
|
3911
3984
|
t.push(e);
|
|
3912
3985
|
}
|
|
3913
3986
|
return t;
|
|
3914
3987
|
}
|
|
3915
|
-
function
|
|
3988
|
+
function Ar(e, t) {
|
|
3916
3989
|
return t ? " " + e + " { value " + String(t.value) + " unit \"" + s(t.unit) + "\" }\n" : "";
|
|
3917
3990
|
}
|
|
3918
|
-
function
|
|
3991
|
+
function jr(e) {
|
|
3919
3992
|
return e === null ? "" : typeof e == "number" ? String(e) : "\"" + s(e) + "\"";
|
|
3920
3993
|
}
|
|
3921
|
-
function
|
|
3994
|
+
function Mr(e) {
|
|
3922
3995
|
let t = " required_competence {\n";
|
|
3923
3996
|
for (let n of e) {
|
|
3924
3997
|
if (t += " competence " + n.kind + " {\n", n.range) {
|
|
3925
3998
|
let e = " range {";
|
|
3926
|
-
n.range.min !== null && (e += " min " +
|
|
3999
|
+
n.range.min !== null && (e += " min " + jr(n.range.min)), n.range.max !== null && (e += " max " + jr(n.range.max)), e += " unit \"" + s(n.range.unit) + "\" }\n", t += e;
|
|
3927
4000
|
}
|
|
3928
|
-
n.methodStandard && (t += " method_standard \"" + s(n.methodStandard) + "\"\n"), t +=
|
|
4001
|
+
n.methodStandard && (t += " method_standard \"" + s(n.methodStandard) + "\"\n"), t += Ar("resolution", n.resolution), t += Ar("stability", n.stability), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
3929
4002
|
}
|
|
3930
4003
|
return t += " }\n", t;
|
|
3931
4004
|
}
|
|
3932
|
-
function
|
|
4005
|
+
function Nr(e) {
|
|
3933
4006
|
return e.length >= 2 && e.charAt(0) === "\"" && e.charAt(e.length - 1) === "\"" ? o(e.substr(1, e.length - 2)) : i(e);
|
|
3934
4007
|
}
|
|
3935
|
-
var
|
|
4008
|
+
var Pr = function(e, t) {
|
|
3936
4009
|
let n = {
|
|
3937
4010
|
id: e,
|
|
3938
4011
|
label: "",
|
|
@@ -3943,15 +4016,15 @@ var Dr = function(e, t) {
|
|
|
3943
4016
|
for (; s < o.length;) {
|
|
3944
4017
|
let t = o[s++];
|
|
3945
4018
|
if (s >= o.length) throw Error(`Parsing error: competence_kind. ID ${e}: Expecting value for ${t}`);
|
|
3946
|
-
if (t === "label") n.label =
|
|
3947
|
-
else if (t === "definition") n.definition =
|
|
4019
|
+
if (t === "label") n.label = Nr(o[s++]);
|
|
4020
|
+
else if (t === "definition") n.definition = Nr(o[s++]);
|
|
3948
4021
|
else if (t === "source") n.source = I(i(o[s++]));
|
|
3949
4022
|
else if (t === "method_standard") {
|
|
3950
4023
|
let t = a(o[s++]);
|
|
3951
4024
|
if (s >= o.length) throw Error(`Parsing error: competence_kind. ID ${e}: Expecting title for method_standard ${t}`);
|
|
3952
4025
|
n.methodStandards.push({
|
|
3953
4026
|
id: t,
|
|
3954
|
-
title:
|
|
4027
|
+
title: Nr(o[s++])
|
|
3955
4028
|
});
|
|
3956
4029
|
} else if (t === "ref") {
|
|
3957
4030
|
let e = S(o, s, a, i);
|
|
@@ -3962,7 +4035,7 @@ var Dr = function(e, t) {
|
|
|
3962
4035
|
} else s = y(o, s, t);
|
|
3963
4036
|
}
|
|
3964
4037
|
return (t) => (t.competenceKinds[e] = n, t);
|
|
3965
|
-
},
|
|
4038
|
+
}, Fr = function(e) {
|
|
3966
4039
|
let t = "competence_kind " + e.id + " {\n";
|
|
3967
4040
|
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");
|
|
3968
4041
|
for (let n of e.methodStandards) t += " method_standard " + n.id + " \"" + s(n.title) + "\"\n";
|
|
@@ -3973,10 +4046,10 @@ var Dr = function(e, t) {
|
|
|
3973
4046
|
function V(e) {
|
|
3974
4047
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
3975
4048
|
}
|
|
3976
|
-
function
|
|
4049
|
+
function Ir(e) {
|
|
3977
4050
|
return e.trim() !== "" && !isNaN(Number(e)) ? Number(e) : e;
|
|
3978
4051
|
}
|
|
3979
|
-
function
|
|
4052
|
+
function Lr(e) {
|
|
3980
4053
|
let t = [], r = n(e), o = 0;
|
|
3981
4054
|
for (; o < r.length;) {
|
|
3982
4055
|
if (r[o++] !== "variable") {
|
|
@@ -4022,7 +4095,7 @@ function Ar(e) {
|
|
|
4022
4095
|
}
|
|
4023
4096
|
return t;
|
|
4024
4097
|
}
|
|
4025
|
-
function
|
|
4098
|
+
function Rr(e) {
|
|
4026
4099
|
let t = [], r = n(e), o = 0;
|
|
4027
4100
|
for (; o < r.length;) {
|
|
4028
4101
|
if (r[o++] !== "precondition") {
|
|
@@ -4047,7 +4120,7 @@ function jr(e) {
|
|
|
4047
4120
|
}
|
|
4048
4121
|
return t;
|
|
4049
4122
|
}
|
|
4050
|
-
function
|
|
4123
|
+
function zr(e) {
|
|
4051
4124
|
let t = [], r = n(e), o = 0;
|
|
4052
4125
|
for (; o < r.length;) {
|
|
4053
4126
|
if (r[o++] !== "observable") {
|
|
@@ -4072,7 +4145,7 @@ function Mr(e) {
|
|
|
4072
4145
|
}
|
|
4073
4146
|
return t;
|
|
4074
4147
|
}
|
|
4075
|
-
function
|
|
4148
|
+
function Br(e, t) {
|
|
4076
4149
|
let r = n(e), o = 0;
|
|
4077
4150
|
for (; o < r.length;) {
|
|
4078
4151
|
let e = r[o++];
|
|
@@ -4129,7 +4202,7 @@ function Nr(e, t) {
|
|
|
4129
4202
|
t.acceptanceCriteria.push(c);
|
|
4130
4203
|
}
|
|
4131
4204
|
}
|
|
4132
|
-
function
|
|
4205
|
+
function Vr(e) {
|
|
4133
4206
|
let t = [], r = n(e), o = 0;
|
|
4134
4207
|
for (; o < r.length;) {
|
|
4135
4208
|
if (r[o++] !== "value") {
|
|
@@ -4152,7 +4225,7 @@ function Pr(e) {
|
|
|
4152
4225
|
}
|
|
4153
4226
|
return t;
|
|
4154
4227
|
}
|
|
4155
|
-
function
|
|
4228
|
+
function Hr(e) {
|
|
4156
4229
|
let t = {}, r = n(e), i = 0;
|
|
4157
4230
|
for (; i < r.length;) {
|
|
4158
4231
|
let e = P(r[i++]);
|
|
@@ -4161,7 +4234,7 @@ function Fr(e) {
|
|
|
4161
4234
|
}
|
|
4162
4235
|
return t;
|
|
4163
4236
|
}
|
|
4164
|
-
function
|
|
4237
|
+
function Ur(e) {
|
|
4165
4238
|
let t = {
|
|
4166
4239
|
by: "",
|
|
4167
4240
|
values: {}
|
|
@@ -4180,7 +4253,7 @@ function Ir(e) {
|
|
|
4180
4253
|
for (; l < o.length;) {
|
|
4181
4254
|
let e = P(o[l++]);
|
|
4182
4255
|
if (l >= o.length) break;
|
|
4183
|
-
o[l] === ":" && l++, l < o.length && (c[e] =
|
|
4256
|
+
o[l] === ":" && l++, l < o.length && (c[e] = Ir(a(o[l++])));
|
|
4184
4257
|
}
|
|
4185
4258
|
t.values[r] = c;
|
|
4186
4259
|
}
|
|
@@ -4189,7 +4262,7 @@ function Ir(e) {
|
|
|
4189
4262
|
}
|
|
4190
4263
|
return t;
|
|
4191
4264
|
}
|
|
4192
|
-
var
|
|
4265
|
+
var Wr = function(e, t) {
|
|
4193
4266
|
let o = {
|
|
4194
4267
|
id: e,
|
|
4195
4268
|
name: "",
|
|
@@ -4269,23 +4342,23 @@ var Lr = function(e, t) {
|
|
|
4269
4342
|
else if (e === "kind") o.kind = a(t());
|
|
4270
4343
|
else if (e === "obligation") o.obligation = a(t());
|
|
4271
4344
|
else if (e === "obligation_note") o.obligationNote = x(t);
|
|
4272
|
-
else if (e === "test_subject") o.testSubject =
|
|
4273
|
-
else if (e === "variables") o.variables =
|
|
4274
|
-
else if (e === "observables") o.observables =
|
|
4345
|
+
else if (e === "test_subject") o.testSubject = Hr(i(t()));
|
|
4346
|
+
else if (e === "variables") o.variables = Lr(i(t()));
|
|
4347
|
+
else if (e === "observables") o.observables = zr(i(t()));
|
|
4275
4348
|
else if (e === "conditions_to_enforce" || e === "conditionsToEnforce") o.conditionsToEnforce = V(t());
|
|
4276
|
-
else if (e === "preconditions") o.preconditions =
|
|
4349
|
+
else if (e === "preconditions") o.preconditions = Rr(i(t()));
|
|
4277
4350
|
else if (e === "reference_materials") o.referenceMaterials = V(t());
|
|
4278
|
-
else if (e === "required_competence") o.requiredCompetence =
|
|
4279
|
-
else if (e === "acceptance_criteria")
|
|
4280
|
-
else if (e === "design") o.design =
|
|
4281
|
-
else if (e === "acceptance") o.acceptance =
|
|
4351
|
+
else if (e === "required_competence") o.requiredCompetence = kr(i(t()));
|
|
4352
|
+
else if (e === "acceptance_criteria") Br(i(t()), o);
|
|
4353
|
+
else if (e === "design") o.design = br(i(t()));
|
|
4354
|
+
else if (e === "acceptance") o.acceptance = dr(i(t()));
|
|
4282
4355
|
else if (e === "dependencies") o.dependencies = V(t());
|
|
4283
|
-
else if (e === "instances") o.instances =
|
|
4356
|
+
else if (e === "instances") o.instances = Ur(i(t()));
|
|
4284
4357
|
else if (e === "inherits_from") o.inheritsFrom = a(t());
|
|
4285
4358
|
else if (e === "result_forms") o.resultForms = V(t());
|
|
4286
4359
|
else if (e === "produces_artifacts") o.producesArtifacts = V(t());
|
|
4287
4360
|
else if (e === "report_rows") o.reportRows = V(t());
|
|
4288
|
-
else if (e === "derived_values") o.derivedValues =
|
|
4361
|
+
else if (e === "derived_values") o.derivedValues = Vr(i(t()));
|
|
4289
4362
|
else if (e === "validate_measurement") {
|
|
4290
4363
|
let e = r(t());
|
|
4291
4364
|
for (let t of e) t.startsWith("\"") && o.measurements.push(i(t));
|
|
@@ -4296,7 +4369,7 @@ var Lr = function(e, t) {
|
|
|
4296
4369
|
construct: "conformance_test",
|
|
4297
4370
|
id: e
|
|
4298
4371
|
}), (t) => (t.conformanceTests[e] = o, t);
|
|
4299
|
-
},
|
|
4372
|
+
}, Gr = function(e) {
|
|
4300
4373
|
let t = "conformance_test " + e.id + " {\n";
|
|
4301
4374
|
if (e.name && (t += " name \"" + s(e.name) + "\"\n"), e.type && (t += " type " + e.type + "\n"), e.purpose && (t += " purpose \"" + s(e.purpose) + "\"\n"), e.method && (t += " method \"" + s(e.method) + "\"\n"), e.methodRef && (t += " method_ref " + e.methodRef + "\n"), e.guidance && (t += " guidance \"" + s(e.guidance) + "\"\n"), e.sourceRefs && e.sourceRefs.length > 0) for (let n of e.sourceRefs) t += E(n, " ", s);
|
|
4302
4375
|
else e.sourceRef && e.sourceRef.doc ? t += E(e.sourceRef, " ", s) : e.reference && (t += " reference " + e.reference + "\n");
|
|
@@ -4357,7 +4430,7 @@ var Lr = function(e, t) {
|
|
|
4357
4430
|
}
|
|
4358
4431
|
t += " }\n";
|
|
4359
4432
|
}
|
|
4360
|
-
if (e.referenceMaterials.length > 0 && (t += " reference_materials { " + e.referenceMaterials.join(" ") + " }\n"), e.requiredCompetence.length > 0 && (t +=
|
|
4433
|
+
if (e.referenceMaterials.length > 0 && (t += " reference_materials { " + e.referenceMaterials.join(" ") + " }\n"), e.requiredCompetence.length > 0 && (t += Mr(e.requiredCompetence)), e.acceptanceCriteria.length > 0 || e.acceptanceCriteriaType || e.acceptancePassIf) {
|
|
4361
4434
|
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");
|
|
4362
4435
|
for (let n of e.acceptanceCriteria) {
|
|
4363
4436
|
let e = " criterion " + (n.item || "\"\"") + " { ";
|
|
@@ -4365,7 +4438,7 @@ var Lr = function(e, t) {
|
|
|
4365
4438
|
}
|
|
4366
4439
|
t += " }\n";
|
|
4367
4440
|
}
|
|
4368
|
-
if (e.design && (t +=
|
|
4441
|
+
if (e.design && (t += Er(e.design, " ")), e.acceptance && (t += fr(e.acceptance, " ") + "\n"), e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.instances) {
|
|
4369
4442
|
let n = " instances { by " + e.instances.by + " values { ";
|
|
4370
4443
|
for (let [t, r] of Object.entries(e.instances.values)) {
|
|
4371
4444
|
n += t + " { ";
|
|
@@ -4380,23 +4453,23 @@ var Lr = function(e, t) {
|
|
|
4380
4453
|
t += " }\n";
|
|
4381
4454
|
}
|
|
4382
4455
|
return e.sourceDiscrepancy && (t += j(e.sourceDiscrepancy, " ") + "\n"), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4383
|
-
},
|
|
4456
|
+
}, Kr = {
|
|
4384
4457
|
aliases: "aliases",
|
|
4385
4458
|
alt: "aliases",
|
|
4386
4459
|
colloquial: "colloquial",
|
|
4387
4460
|
abbreviations: "abbreviations",
|
|
4388
4461
|
deprecated: "deprecated"
|
|
4389
4462
|
};
|
|
4390
|
-
function
|
|
4391
|
-
return e in
|
|
4463
|
+
function qr(e) {
|
|
4464
|
+
return e in Kr;
|
|
4392
4465
|
}
|
|
4393
|
-
function
|
|
4466
|
+
function Jr(e, t, n) {
|
|
4394
4467
|
if (t === "aliases") {
|
|
4395
4468
|
let t = [...e.aliases ?? [], ...n];
|
|
4396
4469
|
e.aliases = t, e.alt = t;
|
|
4397
4470
|
} else (e[t] ??= []).push(...n);
|
|
4398
4471
|
}
|
|
4399
|
-
var
|
|
4472
|
+
var Yr = function(e, t) {
|
|
4400
4473
|
let n = {
|
|
4401
4474
|
id: e,
|
|
4402
4475
|
label: "",
|
|
@@ -4431,7 +4504,7 @@ var Hr = function(e, t) {
|
|
|
4431
4504
|
else if (t === "language") n.language = x(o);
|
|
4432
4505
|
else if (t === "form_type") n.formType = x(o);
|
|
4433
4506
|
else if (t === "part_of_speech") n.partOfSpeech = x(o);
|
|
4434
|
-
else if (
|
|
4507
|
+
else if (qr(t)) {
|
|
4435
4508
|
let i = o(), c, l = i;
|
|
4436
4509
|
if (!i.startsWith("{")) {
|
|
4437
4510
|
c = i;
|
|
@@ -4439,8 +4512,8 @@ var Hr = function(e, t) {
|
|
|
4439
4512
|
if (n === void 0 || !n.startsWith("{")) throw Error(`Parsing error: term. ID ${e}: alias-family facet "${t}" with spelling code "${c}" expects a list block`);
|
|
4440
4513
|
l = o();
|
|
4441
4514
|
}
|
|
4442
|
-
let u = r(l).map(a), d =
|
|
4443
|
-
if (c === void 0)
|
|
4515
|
+
let u = r(l).map(a), d = Kr[t];
|
|
4516
|
+
if (c === void 0) Jr(n, d, u);
|
|
4444
4517
|
else {
|
|
4445
4518
|
let e = (n.aliasSpellings ??= {})[c] ??= {};
|
|
4446
4519
|
(e[d] ??= []).push(...u);
|
|
@@ -4452,7 +4525,7 @@ var Hr = function(e, t) {
|
|
|
4452
4525
|
construct: "term",
|
|
4453
4526
|
id: e
|
|
4454
4527
|
}), (t) => (t.terms[e] = n, t);
|
|
4455
|
-
},
|
|
4528
|
+
}, Xr = function(e) {
|
|
4456
4529
|
let t = "term " + e.id + " {\n";
|
|
4457
4530
|
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.symbolId && (t += " symbol " + e.symbolId + "\n"), e.vocabRef && (t += " vocab_ref { register " + e.vocabRef.register + " clause \"" + s(e.vocabRef.clause) + "\" }\n"), e.vocabTerm && (t += " vocab_term \"" + s(e.vocabTerm) + "\"\n"), e.section && (t += " section \"" + s(e.section) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), e.source && (t += " source \"" + s(e.source) + "\"\n"), e.overlay && (t += " overlay true\n"), e.scopeNote && (t += " scope_note \"" + s(e.scopeNote) + "\"\n"), e.language && (t += " language \"" + s(e.language) + "\"\n"), e.formType && (t += " form_type \"" + s(e.formType) + "\"\n"), e.partOfSpeech && (t += " part_of_speech \"" + s(e.partOfSpeech) + "\"\n");
|
|
4458
4531
|
let n = (e) => /\s/.test(e) ? "\"" + s(e) + "\"" : e, r = (e, t, r) => " " + e + (r ? " " + r : "") + " { " + t.map(n).join(" ") + " }\n", i = e.aliases ?? e.alt;
|
|
@@ -4475,17 +4548,17 @@ var Hr = function(e, t) {
|
|
|
4475
4548
|
t += " }\n";
|
|
4476
4549
|
}
|
|
4477
4550
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4478
|
-
},
|
|
4551
|
+
}, Zr = [
|
|
4479
4552
|
"none",
|
|
4480
4553
|
"max",
|
|
4481
4554
|
"mean",
|
|
4482
4555
|
"worst_case",
|
|
4483
4556
|
"max_abs_over_window"
|
|
4484
4557
|
];
|
|
4485
|
-
function
|
|
4558
|
+
function Qr(e) {
|
|
4486
4559
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
4487
4560
|
}
|
|
4488
|
-
var
|
|
4561
|
+
var $r = function(e, t) {
|
|
4489
4562
|
let r = {
|
|
4490
4563
|
id: e,
|
|
4491
4564
|
quantityKind: "",
|
|
@@ -4507,12 +4580,12 @@ var Kr = function(e, t) {
|
|
|
4507
4580
|
} else if (t === "symbol") r.symbol = x(o);
|
|
4508
4581
|
else if (t === "behavior") r.behavior = o();
|
|
4509
4582
|
else if (t === "derive" || t === "expression") r.derive = x(o);
|
|
4510
|
-
else if (t === "inputs" || t === "uses") r.inputs =
|
|
4583
|
+
else if (t === "inputs" || t === "uses") r.inputs = Qr(o());
|
|
4511
4584
|
else if (t === "series_reduction") {
|
|
4512
4585
|
let t = o();
|
|
4513
|
-
if (!
|
|
4586
|
+
if (!Zr.includes(t)) throw Error(`Parsing error: verdict. ID ${e}: Unknown series_reduction ${t} (valid: ${Zr.join(", ")})`);
|
|
4514
4587
|
r.seriesReduction = t;
|
|
4515
|
-
} else if (t === "acceptance") r.acceptance =
|
|
4588
|
+
} else if (t === "acceptance") r.acceptance = dr(i(o()));
|
|
4516
4589
|
else if (t === "source" || t === "reference") {
|
|
4517
4590
|
let e = I(i(o()));
|
|
4518
4591
|
(r.sourceRefs ??= []).push(e), r.source ||= e;
|
|
@@ -4526,16 +4599,16 @@ var Kr = function(e, t) {
|
|
|
4526
4599
|
construct: "verdict",
|
|
4527
4600
|
id: e
|
|
4528
4601
|
}), (t) => (t.verdicts[e] = r, t);
|
|
4529
|
-
},
|
|
4602
|
+
}, ei = function(e) {
|
|
4530
4603
|
let t = "verdict " + e.id + " {\n";
|
|
4531
|
-
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 +=
|
|
4604
|
+
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 += fr(e.acceptance, " ") + "\n");
|
|
4532
4605
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source && (e.source.doc || e.source.clause) ? [e.source] : [];
|
|
4533
4606
|
for (let e of n) t += E(e, " ", s);
|
|
4534
4607
|
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4535
4608
|
};
|
|
4536
4609
|
//#endregion
|
|
4537
4610
|
//#region src/ser-des/config/referenceMaterial.ts
|
|
4538
|
-
function
|
|
4611
|
+
function ti(e) {
|
|
4539
4612
|
let t = [], r = n(e), o = 0;
|
|
4540
4613
|
for (; o < r.length;) {
|
|
4541
4614
|
if (r[o++] !== "field") {
|
|
@@ -4561,7 +4634,7 @@ function Jr(e) {
|
|
|
4561
4634
|
}
|
|
4562
4635
|
return t;
|
|
4563
4636
|
}
|
|
4564
|
-
function
|
|
4637
|
+
function ni(e) {
|
|
4565
4638
|
let t = [], r = n(e), o = 0;
|
|
4566
4639
|
for (; o < r.length;) {
|
|
4567
4640
|
if (r[o++] !== "constraint") {
|
|
@@ -4618,7 +4691,7 @@ function Yr(e) {
|
|
|
4618
4691
|
}
|
|
4619
4692
|
return t;
|
|
4620
4693
|
}
|
|
4621
|
-
var
|
|
4694
|
+
var ri = function(e, t) {
|
|
4622
4695
|
let n = {
|
|
4623
4696
|
id: e,
|
|
4624
4697
|
kind: "",
|
|
@@ -4639,15 +4712,15 @@ var Xr = function(e, t) {
|
|
|
4639
4712
|
let e = C(t, r, a, i);
|
|
4640
4713
|
T(n, e) || (n.refs ??= []).push(e);
|
|
4641
4714
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
4642
|
-
else if (e === "identity_fields") n.identityFields =
|
|
4643
|
-
else if (e === "constraints") n.constraints =
|
|
4715
|
+
else if (e === "identity_fields") n.identityFields = ti(i(t()));
|
|
4716
|
+
else if (e === "constraints") n.constraints = ni(i(t()));
|
|
4644
4717
|
else return !1;
|
|
4645
4718
|
return !0;
|
|
4646
4719
|
}, {
|
|
4647
4720
|
construct: "reference_material",
|
|
4648
4721
|
id: e
|
|
4649
4722
|
}), (t) => (t.referenceMaterials[e] = n, t);
|
|
4650
|
-
},
|
|
4723
|
+
}, ii = function(e) {
|
|
4651
4724
|
let t = "reference_material " + e.id + " {\n";
|
|
4652
4725
|
e.kind && (t += " kind " + e.kind + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n");
|
|
4653
4726
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
@@ -4670,21 +4743,21 @@ var Xr = function(e, t) {
|
|
|
4670
4743
|
t += " }\n";
|
|
4671
4744
|
}
|
|
4672
4745
|
return t += "}\n", t;
|
|
4673
|
-
},
|
|
4746
|
+
}, ai = [
|
|
4674
4747
|
"common",
|
|
4675
4748
|
"determination",
|
|
4676
4749
|
"attestation",
|
|
4677
4750
|
"surveillance"
|
|
4678
|
-
],
|
|
4751
|
+
], oi = [
|
|
4679
4752
|
"product_type",
|
|
4680
4753
|
"batch",
|
|
4681
4754
|
"ongoing_production",
|
|
4682
4755
|
"service_or_process"
|
|
4683
4756
|
];
|
|
4684
|
-
function
|
|
4757
|
+
function si(e) {
|
|
4685
4758
|
return r(i(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
4686
4759
|
}
|
|
4687
|
-
var
|
|
4760
|
+
var ci = (e, t) => {
|
|
4688
4761
|
let n = {
|
|
4689
4762
|
id: e,
|
|
4690
4763
|
family: "common",
|
|
@@ -4698,7 +4771,7 @@ var ti = (e, t) => {
|
|
|
4698
4771
|
return v(t, (t, r) => {
|
|
4699
4772
|
if (t === "family") {
|
|
4700
4773
|
let t = a(r());
|
|
4701
|
-
if (!
|
|
4774
|
+
if (!ai.includes(t)) throw Error(`Parsing error: scheme_activity_kind. ID ${e}: Unknown family "${t}" (valid: ${ai.join(", ")})`);
|
|
4702
4775
|
n.family = t;
|
|
4703
4776
|
} else if (t === "row") n.row = a(r());
|
|
4704
4777
|
else if (t === "label") n.label = a(r());
|
|
@@ -4710,14 +4783,14 @@ var ti = (e, t) => {
|
|
|
4710
4783
|
id: e
|
|
4711
4784
|
}), (t) => (t.schemeActivityKinds[e] = n, t);
|
|
4712
4785
|
};
|
|
4713
|
-
function
|
|
4786
|
+
function li(e) {
|
|
4714
4787
|
let t = {
|
|
4715
4788
|
required: !1,
|
|
4716
4789
|
activities: []
|
|
4717
4790
|
};
|
|
4718
4791
|
return v(e, (e, n) => {
|
|
4719
4792
|
if (e === "required") t.required = a(n()) === "true";
|
|
4720
|
-
else if (e === "activities") t.activities =
|
|
4793
|
+
else if (e === "activities") t.activities = si(n());
|
|
4721
4794
|
else return !1;
|
|
4722
4795
|
return !0;
|
|
4723
4796
|
}, {
|
|
@@ -4725,7 +4798,7 @@ function ni(e) {
|
|
|
4725
4798
|
id: ""
|
|
4726
4799
|
}), t;
|
|
4727
4800
|
}
|
|
4728
|
-
var
|
|
4801
|
+
var ui = (e, t) => {
|
|
4729
4802
|
let n = {
|
|
4730
4803
|
id: e,
|
|
4731
4804
|
label: "",
|
|
@@ -4749,11 +4822,11 @@ var ri = (e, t) => {
|
|
|
4749
4822
|
else if (t === "sampling") n.sampling = a(o());
|
|
4750
4823
|
else if (t === "attestation_object") {
|
|
4751
4824
|
let t = a(o());
|
|
4752
|
-
if (
|
|
4825
|
+
if (!oi.includes(t)) throw Error(`Parsing error: scheme_type. ID ${e}: Unknown attestation_object "${t}" (valid: ${oi.join(", ")})`);
|
|
4753
4826
|
n.attestationObject = t;
|
|
4754
|
-
} else if (t === "determination") n.determination =
|
|
4755
|
-
else if (t === "attestation") n.attestation =
|
|
4756
|
-
else if (t === "surveillance") n.surveillance =
|
|
4827
|
+
} else if (t === "determination") n.determination = si(o());
|
|
4828
|
+
else if (t === "attestation") n.attestation = si(o());
|
|
4829
|
+
else if (t === "surveillance") n.surveillance = li(i(o()));
|
|
4757
4830
|
else if (t === "notes") n.notes = r(i(o())).map(a).filter((e) => e.length > 0);
|
|
4758
4831
|
else if (t === "source") n.source = I(i(o()));
|
|
4759
4832
|
else return !1;
|
|
@@ -4763,23 +4836,23 @@ var ri = (e, t) => {
|
|
|
4763
4836
|
id: e
|
|
4764
4837
|
}), (t) => (t.schemeTypes[e] = n, t);
|
|
4765
4838
|
};
|
|
4766
|
-
function
|
|
4839
|
+
function di(e, t) {
|
|
4767
4840
|
if (!e.doc && !e.clause) return "";
|
|
4768
4841
|
let n = t + "source {\n";
|
|
4769
4842
|
return e.doc && (n += t + " doc \"" + s(e.doc) + "\"\n"), e.clause && (n += t + " clause \"" + s(e.clause) + "\"\n"), n += t + "}\n", n;
|
|
4770
4843
|
}
|
|
4771
|
-
var
|
|
4844
|
+
var fi = function(e) {
|
|
4772
4845
|
let t = "scheme_activity_kind " + e.id + " {\n";
|
|
4773
|
-
return t += " family " + e.family + "\n", e.row && (t += " row \"" + s(e.row) + "\"\n"), e.label && (t += " label \"" + s(e.label) + "\"\n"), t +=
|
|
4774
|
-
},
|
|
4846
|
+
return t += " family " + e.family + "\n", e.row && (t += " row \"" + s(e.row) + "\"\n"), e.label && (t += " label \"" + s(e.label) + "\"\n"), t += di(e.source, " "), t += "}\n", t;
|
|
4847
|
+
}, pi = function(e) {
|
|
4775
4848
|
let t = "scheme_type " + e.id + " {\n";
|
|
4776
4849
|
if (e.label && (t += " label \"" + s(e.label) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.sampling && (t += " sampling \"" + s(e.sampling) + "\"\n"), e.attestationObject && (t += " attestation_object " + e.attestationObject + "\n"), e.determination.length > 0 && (t += " determination { " + e.determination.map(N).join(" ") + " }\n"), e.attestation.length > 0 && (t += " attestation { " + e.attestation.map(N).join(" ") + " }\n"), e.surveillance && (t += " surveillance {\n", t += " required " + (e.surveillance.required ? "true" : "false") + "\n", e.surveillance.activities.length > 0 && (t += " activities { " + e.surveillance.activities.map(N).join(" ") + " }\n"), t += " }\n"), e.notes.length > 0) {
|
|
4777
4850
|
t += " notes {\n";
|
|
4778
4851
|
for (let n of e.notes) t += " \"" + s(n) + "\"\n";
|
|
4779
4852
|
t += " }\n";
|
|
4780
4853
|
}
|
|
4781
|
-
return t +=
|
|
4782
|
-
},
|
|
4854
|
+
return t += di(e.source, " "), t += "}\n", t;
|
|
4855
|
+
}, mi = function(e, t) {
|
|
4783
4856
|
let n = {
|
|
4784
4857
|
id: e,
|
|
4785
4858
|
kind: "",
|
|
@@ -4801,16 +4874,16 @@ var ai = function(e) {
|
|
|
4801
4874
|
} else t === "description" || t === "definition" ? n.description = a(o[s++]) : t === "subject_kinds" ? n.subjectKinds = r(i(o[s++])).map(a) : t === "target_kinds" ? n.targetKinds = r(i(o[s++])).map(a) : t === "resolution" ? n.resolution = a(o[s++]) : t === "inverse" ? n.inverse = a(o[s++]) : t === "transitive" ? n.transitive = a(o[s++]) === "true" : t === "symmetric" ? n.symmetric = a(o[s++]) === "true" : s++;
|
|
4802
4875
|
}
|
|
4803
4876
|
return (t) => (t.predicates ??= {}, t.predicates[e] = n, t);
|
|
4804
|
-
},
|
|
4877
|
+
}, hi = function(e) {
|
|
4805
4878
|
let t = "predicate " + e.id + " {\n";
|
|
4806
4879
|
return e.kind && (t += " kind " + e.kind + "\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.subjectKinds.length > 0 && (t += " subject_kinds { " + e.subjectKinds.join(" ") + " }\n"), e.targetKinds.length > 0 && (t += " target_kinds { " + e.targetKinds.join(" ") + " }\n"), e.resolution && (t += " resolution " + e.resolution + "\n"), e.inverse && (t += " inverse " + e.inverse + "\n"), e.transitive && (t += " transitive true\n"), e.symmetric && (t += " symmetric true\n"), t += "}\n", t;
|
|
4807
4880
|
};
|
|
4808
4881
|
//#endregion
|
|
4809
4882
|
//#region src/ser-des/config/constraint.ts
|
|
4810
|
-
function
|
|
4883
|
+
function gi(e) {
|
|
4811
4884
|
return e.length >= 2 && e.charAt(0) === "\"" && e.charAt(e.length - 1) === "\"" ? o(e.substr(1, e.length - 2)) : i(e);
|
|
4812
4885
|
}
|
|
4813
|
-
var
|
|
4886
|
+
var _i = function(e, t) {
|
|
4814
4887
|
let n = {
|
|
4815
4888
|
id: e,
|
|
4816
4889
|
stereotype: "",
|
|
@@ -4824,9 +4897,9 @@ var ui = function(e, t) {
|
|
|
4824
4897
|
let t = o[s++];
|
|
4825
4898
|
if (s >= o.length) throw Error(`Parsing error: constraint. ID ${e}: Expecting value for ${t}`);
|
|
4826
4899
|
if (t === "stereotype") n.stereotype = a(o[s++]);
|
|
4827
|
-
else if (t === "name") n.name =
|
|
4828
|
-
else if (t === "check") n.check =
|
|
4829
|
-
else if (t === "violation_meaning") n.violationMeaning =
|
|
4900
|
+
else if (t === "name") n.name = gi(o[s++]);
|
|
4901
|
+
else if (t === "check") n.check = gi(o[s++]);
|
|
4902
|
+
else if (t === "violation_meaning") n.violationMeaning = gi(o[s++]);
|
|
4830
4903
|
else if (t === "on_violation") n.onViolation = a(o[s++]);
|
|
4831
4904
|
else if (t === "source") n.source = I(i(o[s++]));
|
|
4832
4905
|
else if (t === "ref") {
|
|
@@ -4838,10 +4911,10 @@ var ui = function(e, t) {
|
|
|
4838
4911
|
} else s = y(o, s, t);
|
|
4839
4912
|
}
|
|
4840
4913
|
return (t) => (t.constraints[e] = n, t);
|
|
4841
|
-
},
|
|
4914
|
+
}, vi = function(e) {
|
|
4842
4915
|
let t = "constraint " + e.id + " {\n";
|
|
4843
4916
|
return e.stereotype && (t += " stereotype " + e.stereotype + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.check && (t += " check \"" + s(e.check) + "\"\n"), e.violationMeaning && (t += " violation_meaning \"" + s(e.violationMeaning) + "\"\n"), t += " on_violation " + (e.onViolation || "invalid") + "\n", e.source && (e.source.doc || e.source.clause) && (t += " source { doc \"" + s(e.source.doc) + "\" clause \"" + s(e.source.clause) + "\"" + (e.source.fragment ? " fragment \"" + s(e.source.fragment) + "\"" : "") + " }\n"), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4844
|
-
},
|
|
4917
|
+
}, yi = ["open", "resolved"], bi = function(e, t) {
|
|
4845
4918
|
let i = {
|
|
4846
4919
|
id: e,
|
|
4847
4920
|
status: "",
|
|
@@ -4856,7 +4929,7 @@ var ui = function(e, t) {
|
|
|
4856
4929
|
if (s >= o.length) throw Error(`Parsing error: discrepancy_record. ID ${e}: Expecting value for ${t}`);
|
|
4857
4930
|
if (t === "status") {
|
|
4858
4931
|
let t = a(o[s++]);
|
|
4859
|
-
if (!
|
|
4932
|
+
if (!yi.includes(t)) throw Error(`Parsing error: discrepancy_record. ID ${e}: Unknown status ${t} (valid: ${yi.join(", ")})`);
|
|
4860
4933
|
i.status = t;
|
|
4861
4934
|
} else if (t === "summary") i.summary = a(o[s++]);
|
|
4862
4935
|
else if (t === "sources") i.sources = n(a(o[s++])).map(a).filter((e) => e.length > 0);
|
|
@@ -4867,13 +4940,13 @@ var ui = function(e, t) {
|
|
|
4867
4940
|
} else t === "governing" ? i.governing = a(o[s++]) : t === "rationale" ? i.rationale = a(o[s++]) : s++;
|
|
4868
4941
|
}
|
|
4869
4942
|
return (t) => (t.discrepancyRecords[e] = i, t);
|
|
4870
|
-
},
|
|
4943
|
+
}, xi = function(e) {
|
|
4871
4944
|
let t = "discrepancy_record " + e.id + " {\n";
|
|
4872
4945
|
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;
|
|
4873
4946
|
};
|
|
4874
4947
|
//#endregion
|
|
4875
4948
|
//#region src/ser-des/config/testPointSet.ts
|
|
4876
|
-
function
|
|
4949
|
+
function Si(e) {
|
|
4877
4950
|
let t = {}, r = n(e), o = 0;
|
|
4878
4951
|
for (; o < r.length;) {
|
|
4879
4952
|
let e = P(r[o++]);
|
|
@@ -4893,7 +4966,7 @@ function hi(e) {
|
|
|
4893
4966
|
}
|
|
4894
4967
|
return t;
|
|
4895
4968
|
}
|
|
4896
|
-
function
|
|
4969
|
+
function Ci(e) {
|
|
4897
4970
|
let t = [], r = n(e), o = 0;
|
|
4898
4971
|
for (; o < r.length;) {
|
|
4899
4972
|
if (r[o++] !== "point") {
|
|
@@ -4918,7 +4991,7 @@ function gi(e) {
|
|
|
4918
4991
|
}
|
|
4919
4992
|
return t;
|
|
4920
4993
|
}
|
|
4921
|
-
var
|
|
4994
|
+
var wi = function(e, t) {
|
|
4922
4995
|
let n = {
|
|
4923
4996
|
id: e,
|
|
4924
4997
|
description: "",
|
|
@@ -4936,16 +5009,16 @@ var _i = function(e, t) {
|
|
|
4936
5009
|
let e = C(t, r, a, i);
|
|
4937
5010
|
T(n, e) || (n.refs ??= []).push(e);
|
|
4938
5011
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
4939
|
-
else if (e === "cardinality") n.cardinality =
|
|
5012
|
+
else if (e === "cardinality") n.cardinality = Si(i(t()));
|
|
4940
5013
|
else if (e === "repetitions_per_point") n.repetitionsPerPoint = Number(a(t()));
|
|
4941
|
-
else if (e === "points") n.points =
|
|
5014
|
+
else if (e === "points") n.points = Ci(i(t()));
|
|
4942
5015
|
else return !1;
|
|
4943
5016
|
return !0;
|
|
4944
5017
|
}, {
|
|
4945
5018
|
construct: "test_point_set",
|
|
4946
5019
|
id: e
|
|
4947
5020
|
}), (t) => (t.testPointSets[e] = n, t);
|
|
4948
|
-
},
|
|
5021
|
+
}, Ti = function(e) {
|
|
4949
5022
|
let t = "test_point_set " + e.id + " {\n";
|
|
4950
5023
|
e.description && (t += " description \"" + s(e.description) + "\"\n");
|
|
4951
5024
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source && (e.source.doc || e.source.clause) ? [e.source] : [];
|
|
@@ -4969,13 +5042,35 @@ var _i = function(e, t) {
|
|
|
4969
5042
|
t += " }\n";
|
|
4970
5043
|
}
|
|
4971
5044
|
return t += "}\n", t;
|
|
5045
|
+
}, Ei = (e, t) => {
|
|
5046
|
+
let n = {
|
|
5047
|
+
id: e,
|
|
5048
|
+
title: "",
|
|
5049
|
+
reference: "",
|
|
5050
|
+
description: "",
|
|
5051
|
+
source: null
|
|
5052
|
+
};
|
|
5053
|
+
return v(t, (e, t) => {
|
|
5054
|
+
if (e === "title") n.title = a(t());
|
|
5055
|
+
else if (e === "reference") n.reference = a(t());
|
|
5056
|
+
else if (e === "description") n.description = a(t());
|
|
5057
|
+
else if (e === "source") n.source = I(i(t()));
|
|
5058
|
+
else return !1;
|
|
5059
|
+
return !0;
|
|
5060
|
+
}, {
|
|
5061
|
+
construct: "common_test_condition",
|
|
5062
|
+
id: e
|
|
5063
|
+
}), (t) => (t.commonTestConditions[e] = n, t);
|
|
5064
|
+
}, Di = function(e) {
|
|
5065
|
+
let t = "common_test_condition " + e.id + " {\n";
|
|
5066
|
+
return e.title && (t += " title \"" + s(e.title) + "\"\n"), e.reference && (t += " reference \"" + s(e.reference) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.source && (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
4972
5067
|
};
|
|
4973
5068
|
//#endregion
|
|
4974
5069
|
//#region src/ser-des/config/requirement.ts
|
|
4975
5070
|
function H(e) {
|
|
4976
5071
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
4977
5072
|
}
|
|
4978
|
-
function
|
|
5073
|
+
function Oi(e) {
|
|
4979
5074
|
let t = {
|
|
4980
5075
|
verdict: "",
|
|
4981
5076
|
op: "",
|
|
@@ -4989,7 +5084,7 @@ function yi(e) {
|
|
|
4989
5084
|
}
|
|
4990
5085
|
return t;
|
|
4991
5086
|
}
|
|
4992
|
-
function
|
|
5087
|
+
function ki(e) {
|
|
4993
5088
|
let t = {
|
|
4994
5089
|
expression: "",
|
|
4995
5090
|
uses: [],
|
|
@@ -5020,11 +5115,11 @@ function bi(e) {
|
|
|
5020
5115
|
t === "kind" ? e.kind = a(s[c++]) : t === "unit" ? e.unit = a(s[c++]) : i(s[c++]);
|
|
5021
5116
|
}
|
|
5022
5117
|
t.quantity = e;
|
|
5023
|
-
} else e === "accepts" ? t.accepts =
|
|
5118
|
+
} else e === "accepts" ? t.accepts = Oi(i(r[o++])) : e === "acceptance" ? t.acceptance = dr(i(r[o++])) : e === "source_discrepancy" ? t.sourceDiscrepancy = A(i(r[o++])) : o = y(r, o, e);
|
|
5024
5119
|
}
|
|
5025
5120
|
return t;
|
|
5026
5121
|
}
|
|
5027
|
-
function
|
|
5122
|
+
function Ai(e) {
|
|
5028
5123
|
let t = [], r = n(e), o = 0;
|
|
5029
5124
|
for (; o < r.length;) {
|
|
5030
5125
|
if (r[o++] !== "subject") {
|
|
@@ -5048,7 +5143,7 @@ function xi(e) {
|
|
|
5048
5143
|
}
|
|
5049
5144
|
return t;
|
|
5050
5145
|
}
|
|
5051
|
-
function
|
|
5146
|
+
function ji(e) {
|
|
5052
5147
|
let t = [], r = n(e), o = 0;
|
|
5053
5148
|
for (; o < r.length;) {
|
|
5054
5149
|
if (r[o++] !== "param") {
|
|
@@ -5091,7 +5186,7 @@ function Si(e) {
|
|
|
5091
5186
|
}
|
|
5092
5187
|
return t;
|
|
5093
5188
|
}
|
|
5094
|
-
var
|
|
5189
|
+
var Mi = function(e, t) {
|
|
5095
5190
|
let o = {
|
|
5096
5191
|
id: e,
|
|
5097
5192
|
name: "",
|
|
@@ -5118,9 +5213,9 @@ var Ci = function(e, t) {
|
|
|
5118
5213
|
else if (e === "statement") o.statement = a(s[c++]);
|
|
5119
5214
|
else if (e === "guidance") o.guidance = a(s[c++]);
|
|
5120
5215
|
else if (e === "binds_to") o.bindsTo = H(s[c++]);
|
|
5121
|
-
else if (e === "subjects") o.subjects =
|
|
5122
|
-
else if (e === "parameters") o.parameters =
|
|
5123
|
-
else if (e === "limit") o.limit =
|
|
5216
|
+
else if (e === "subjects") o.subjects = Ai(i(s[c++]));
|
|
5217
|
+
else if (e === "parameters") o.parameters = ji(i(s[c++]));
|
|
5218
|
+
else if (e === "limit") o.limit = ki(i(s[c++]));
|
|
5124
5219
|
else if (e === "applicability") o.applicability = L(i(s[c++]));
|
|
5125
5220
|
else if (e === "channel") o.channel = a(s[c++]);
|
|
5126
5221
|
else if (e === "report_row") o.reportRow = a(s[c++]);
|
|
@@ -5148,7 +5243,7 @@ var Ci = function(e, t) {
|
|
|
5148
5243
|
}
|
|
5149
5244
|
return (t) => (t.requirements[e] = o, t);
|
|
5150
5245
|
};
|
|
5151
|
-
function
|
|
5246
|
+
function Ni(e) {
|
|
5152
5247
|
let t = " limit {\n";
|
|
5153
5248
|
if (e.expression && (t += " expression \"" + s(e.expression) + "\"\n"), e.uses.length > 0 && (t += " uses { " + e.uses.join(" ") + " }\n"), e.modality && (t += " modality " + e.modality + "\n"), e.relativeTo && (t += " relative_to " + e.relativeTo + "\n"), e.notes && (t += " notes \"" + s(e.notes) + "\"\n"), e.quantity) {
|
|
5154
5249
|
let n = " quantity {";
|
|
@@ -5158,9 +5253,9 @@ function wi(e) {
|
|
|
5158
5253
|
let n = e.accepts, r = " accepts { verdict " + n.verdict;
|
|
5159
5254
|
n.op && (r += " op " + n.op), n.limit && (r += " limit \"" + s(n.limit) + "\""), n.sourceDiscrepancy && (r += " " + j(n.sourceDiscrepancy, "")), t += r + " }\n";
|
|
5160
5255
|
}
|
|
5161
|
-
return e.acceptance && (t +=
|
|
5256
|
+
return e.acceptance && (t += fr(e.acceptance, " ") + "\n"), e.sourceDiscrepancy && (t += j(e.sourceDiscrepancy, " ") + "\n"), t += " }\n", t;
|
|
5162
5257
|
}
|
|
5163
|
-
var
|
|
5258
|
+
var Pi = function(e) {
|
|
5164
5259
|
let t = "requirement " + e.id + " {\n";
|
|
5165
5260
|
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) {
|
|
5166
5261
|
t += " subjects { ";
|
|
@@ -5175,7 +5270,7 @@ var Ti = function(e) {
|
|
|
5175
5270
|
}
|
|
5176
5271
|
t += " }\n";
|
|
5177
5272
|
}
|
|
5178
|
-
if (e.limit && (t +=
|
|
5273
|
+
if (e.limit && (t += Ni(e.limit)), e.applicability.length > 0 && (t += " applicability {\n " + R(e.applicability).trim() + "\n }\n"), e.channel && (t += " channel " + e.channel + "\n"), e.reportRow && (t += " report_row " + e.reportRow + "\n"), e.obligation && (t += " obligation " + e.obligation + "\n"), e.acceptanceCriteria && (t += " acceptance_criteria {\n " + e.acceptanceCriteria + "\n }\n"), e.verificationMethod) {
|
|
5179
5274
|
let n = " verification { method " + e.verificationMethod;
|
|
5180
5275
|
e.verificationDescription && (n += " description \"" + s(e.verificationDescription) + "\""), t += n + " }\n";
|
|
5181
5276
|
}
|
|
@@ -5183,7 +5278,7 @@ var Ti = function(e) {
|
|
|
5183
5278
|
for (let n of e.sourceRefs ?? (e.source && (e.source.doc || e.source.clause) ? [e.source] : [])) t += E(n, " ", s);
|
|
5184
5279
|
for (let n of e.refs ?? []) t += " ref " + n.predicate + " \"" + s(n.target) + "\"" + (n.note ? " { note \"" + s(n.note) + "\" }" : "") + "\n";
|
|
5185
5280
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
5186
|
-
},
|
|
5281
|
+
}, Fi = function(e, t) {
|
|
5187
5282
|
let n = {
|
|
5188
5283
|
id: e,
|
|
5189
5284
|
name: "",
|
|
@@ -5198,43 +5293,43 @@ var Ti = function(e) {
|
|
|
5198
5293
|
e === "name" ? n.name = a(o[s++]) : e === "title" ? n.title = a(o[s++]) : e === "description" ? n.description = a(o[s++]) : e === "subject" ? n.subject = a(o[s++]) : e === "guidance" ? n.guidance = a(o[s++]) : e === "applicability" ? n.applicability = L(i(o[s++])) : e === "dependencies" ? n.dependencies = H(o[s++]) : e === "reference" ? n.referenceIds = H(o[s++]) : s = y(o, s, e);
|
|
5199
5294
|
}
|
|
5200
5295
|
return (t) => (t.requirementClasses[e] = n, t);
|
|
5201
|
-
},
|
|
5296
|
+
}, Ii = function(e) {
|
|
5202
5297
|
let t = "requirement_class " + e.id + " {\n";
|
|
5203
5298
|
return e.name && (t += " name \"" + s(e.name) + "\"\n"), e.subject && (t += " subject \"" + s(e.subject) + "\"\n"), e.guidance && (t += " guidance \"" + s(e.guidance) + "\"\n"), e.applicability && e.applicability.length > 0 && (t += " applicability {\n " + R(e.applicability).trim() + "\n }\n"), e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
5204
|
-
},
|
|
5299
|
+
}, Li = {
|
|
5205
5300
|
keyword: "requirement",
|
|
5206
5301
|
field: "requirements",
|
|
5207
5302
|
takesID: !0,
|
|
5208
|
-
parse:
|
|
5209
|
-
dump:
|
|
5210
|
-
},
|
|
5303
|
+
parse: Mi,
|
|
5304
|
+
dump: Pi
|
|
5305
|
+
}, Ri = {
|
|
5211
5306
|
keyword: "requirement_class",
|
|
5212
5307
|
field: "requirementClasses",
|
|
5213
5308
|
takesID: !0,
|
|
5214
|
-
parse:
|
|
5215
|
-
dump:
|
|
5309
|
+
parse: Fi,
|
|
5310
|
+
dump: Ii
|
|
5216
5311
|
};
|
|
5217
5312
|
//#endregion
|
|
5218
5313
|
//#region src/ser-des/config/packageManifest.ts
|
|
5219
5314
|
function U(e) {
|
|
5220
5315
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
5221
5316
|
}
|
|
5222
|
-
var
|
|
5317
|
+
var zi = [
|
|
5223
5318
|
"core",
|
|
5224
5319
|
"module",
|
|
5225
5320
|
"rec",
|
|
5226
5321
|
"product_reference",
|
|
5227
5322
|
"certification_program"
|
|
5228
|
-
],
|
|
5323
|
+
], Bi = [
|
|
5229
5324
|
"current",
|
|
5230
5325
|
"preview",
|
|
5231
5326
|
"superseded",
|
|
5232
5327
|
"withdrawn"
|
|
5233
5328
|
];
|
|
5234
|
-
function
|
|
5329
|
+
function Vi(e) {
|
|
5235
5330
|
return e.startsWith("{") ? U(e) : [a(e)];
|
|
5236
5331
|
}
|
|
5237
|
-
var
|
|
5332
|
+
var Hi = function(e) {
|
|
5238
5333
|
let t = {
|
|
5239
5334
|
id: "",
|
|
5240
5335
|
title: "",
|
|
@@ -5271,7 +5366,7 @@ var Ni = function(e) {
|
|
|
5271
5366
|
t.uses = e, Object.keys(n).length > 0 && (t.usePins = n);
|
|
5272
5367
|
} else if (e === "kind") {
|
|
5273
5368
|
let e = a(r[o++]);
|
|
5274
|
-
if (!
|
|
5369
|
+
if (!zi.includes(e)) throw Error(`Parsing error: package: Expected kind ${zi.join("|")}, got "${e}"`);
|
|
5275
5370
|
t.kind = e;
|
|
5276
5371
|
} else if (e === "manufacturer") t.manufacturer = a(r[o++]);
|
|
5277
5372
|
else if (e === "product") t.product = a(r[o++]);
|
|
@@ -5286,9 +5381,9 @@ var Ni = function(e) {
|
|
|
5286
5381
|
else if (e === "provides") t.provides = U(r[o++]);
|
|
5287
5382
|
else if (e === "requires") t.requires = U(r[o++]);
|
|
5288
5383
|
else if (e === "waives") t.waives = U(r[o++]);
|
|
5289
|
-
else if (e === "supersedes") t.supersedes =
|
|
5290
|
-
else if (e === "replaces") t.replaces =
|
|
5291
|
-
else if (e === "superseded_by") t.supersededBy =
|
|
5384
|
+
else if (e === "supersedes") t.supersedes = Vi(r[o++]);
|
|
5385
|
+
else if (e === "replaces") t.replaces = Vi(r[o++]);
|
|
5386
|
+
else if (e === "superseded_by") t.supersededBy = Vi(r[o++]);
|
|
5292
5387
|
else if (e === "validity") {
|
|
5293
5388
|
let e = n(i(r[o++])), s = { from: "" }, c = 0;
|
|
5294
5389
|
for (; c < e.length;) {
|
|
@@ -5299,7 +5394,7 @@ var Ni = function(e) {
|
|
|
5299
5394
|
t.validity = s;
|
|
5300
5395
|
} else if (e === "status") {
|
|
5301
5396
|
let e = a(r[o++]);
|
|
5302
|
-
if (!
|
|
5397
|
+
if (!Bi.includes(e)) throw Error(`Parsing error: package: Expected status ${Bi.join("|")}, got "${e}"`);
|
|
5303
5398
|
t.status = e;
|
|
5304
5399
|
} else if (e === "default_spelling" || e === "defaultSpelling") t.defaultSpelling = a(r[o++]);
|
|
5305
5400
|
else if (e === "spellings") t.spellings = U(r[o++]);
|
|
@@ -5319,13 +5414,13 @@ var Ni = function(e) {
|
|
|
5319
5414
|
}
|
|
5320
5415
|
return (e) => (e.packageManifest = t, e);
|
|
5321
5416
|
};
|
|
5322
|
-
function
|
|
5417
|
+
function Ui(e) {
|
|
5323
5418
|
let t = "package {\n";
|
|
5324
5419
|
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");
|
|
5325
5420
|
for (let n of e.refs ?? []) t += " ref " + n.predicate + " \"" + n.target.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"" + (n.note ? " { note \"" + n.note.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\" }" : "") + "\n";
|
|
5326
5421
|
return t += k(e.correspondences, " ", s, N), e.schemeType && (t += " scheme_type " + e.schemeType + "\n"), e.title && (t += " title \"" + e.title.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"\n"), e.version && (t += " version \"" + e.version + "\"\n"), e.editions.length > 0 && (t += " editions { " + e.editions.join(" ") + " }\n"), e.baseUrn && (t += " baseUrn \"" + e.baseUrn + "\"\n"), e.extends && (t += " extends " + e.extends + "\n"), e.uses && e.uses.length > 0 && (t += " uses { " + e.uses.map((t) => e.usePins?.[t] ? `${t}@${e.usePins[t]}` : t).join(" ") + " }\n"), e.provides && e.provides.length > 0 && (t += " provides { " + e.provides.join(" ") + " }\n"), e.requires && e.requires.length > 0 && (t += " requires { " + e.requires.join(" ") + " }\n"), e.waives && e.waives.length > 0 && (t += " waives { " + e.waives.join(" ") + " }\n"), e.supersedes && e.supersedes.length > 0 && (t += " supersedes { " + e.supersedes.join(" ") + " }\n"), e.replaces && e.replaces.length > 0 && (t += " replaces { " + e.replaces.join(" ") + " }\n"), e.supersededBy && e.supersededBy.length > 0 && (t += " superseded_by { " + e.supersededBy.join(" ") + " }\n"), e.validity && e.validity.from && (t += " validity { from " + e.validity.from + (e.validity.to ? " to " + e.validity.to : "") + " }\n"), e.status && (t += " status " + e.status + "\n"), e.defaultSpelling && (t += " default_spelling " + e.defaultSpelling + "\n"), e.spellings && e.spellings.length > 0 && (t += " spellings { " + e.spellings.join(" ") + " }\n"), e.description && (t += " description \"" + e.description.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"\n"), e.source && (t += " source { collection \"" + e.source.collection + "\" parts { " + e.source.parts.join(" ") + " } }\n"), t += "}\n", t;
|
|
5327
5422
|
}
|
|
5328
|
-
var
|
|
5423
|
+
var Wi = {
|
|
5329
5424
|
keyword: "conformance_class",
|
|
5330
5425
|
field: "conformanceClasses",
|
|
5331
5426
|
takesID: !0,
|
|
@@ -5345,7 +5440,7 @@ var Fi = {
|
|
|
5345
5440
|
for (; c < s.length;) {
|
|
5346
5441
|
let e = s[c++];
|
|
5347
5442
|
if (c >= s.length) break;
|
|
5348
|
-
e === "name" ? o.name = a(s[c++]) : e === "title" ? o.title = a(s[c++]) : e === "description" ? o.description = a(s[c++]) : e === "target" ? o.target = a(s[c++]) : e === "subject" ? o.subject = a(s[c++]) : e === "applicability" ? o.applicability = L(i(s[c++])) : e === "test_subject" ? o.testSubject =
|
|
5443
|
+
e === "name" ? o.name = a(s[c++]) : e === "title" ? o.title = a(s[c++]) : e === "description" ? o.description = a(s[c++]) : e === "target" ? o.target = a(s[c++]) : e === "subject" ? o.subject = a(s[c++]) : e === "applicability" ? o.applicability = L(i(s[c++])) : e === "test_subject" ? o.testSubject = Hr(i(s[c++])) : e === "guidance" ? o.guidance = a(s[c++]) : e === "dependencies" ? o.dependencies = n(a(s[c++])).map(a) : e === "reference" ? o.referenceIds = n(a(s[c++])).map(a) : c = y(s, c, e);
|
|
5349
5444
|
}
|
|
5350
5445
|
return (t) => (t.conformanceClasses[e] = o, t);
|
|
5351
5446
|
},
|
|
@@ -5358,28 +5453,28 @@ var Fi = {
|
|
|
5358
5453
|
}
|
|
5359
5454
|
return e.dependencies.length > 0 && (t += " dependencies { " + e.dependencies.join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
5360
5455
|
}
|
|
5361
|
-
},
|
|
5456
|
+
}, Gi = [
|
|
5362
5457
|
"query",
|
|
5363
5458
|
"subscribe",
|
|
5364
5459
|
"invoke"
|
|
5365
|
-
],
|
|
5460
|
+
], Ki = [
|
|
5366
5461
|
"public",
|
|
5367
5462
|
"registered",
|
|
5368
5463
|
"authority"
|
|
5369
|
-
],
|
|
5464
|
+
], qi = /* @__PURE__ */ new Set([
|
|
5370
5465
|
"kind",
|
|
5371
5466
|
"serves",
|
|
5372
5467
|
"does",
|
|
5373
5468
|
"payload"
|
|
5374
5469
|
]);
|
|
5375
|
-
function
|
|
5470
|
+
function Ji(e, t) {
|
|
5376
5471
|
let r = e[t] ?? "";
|
|
5377
5472
|
if (r.startsWith("{")) return {
|
|
5378
5473
|
names: n(i(r)).flatMap((e) => e.split(",")).map((e) => a(e.trim())).filter((e) => e.length > 0),
|
|
5379
5474
|
next: t + 1
|
|
5380
5475
|
};
|
|
5381
5476
|
let o = [], s = t;
|
|
5382
|
-
for (; s < e.length && !
|
|
5477
|
+
for (; s < e.length && !qi.has(e[s]) && !e[s].startsWith("{");) {
|
|
5383
5478
|
for (let t of e[s].split(",")) {
|
|
5384
5479
|
let e = a(t.trim());
|
|
5385
5480
|
e && o.push(e);
|
|
@@ -5391,7 +5486,7 @@ function zi(e, t) {
|
|
|
5391
5486
|
next: s
|
|
5392
5487
|
};
|
|
5393
5488
|
}
|
|
5394
|
-
function
|
|
5489
|
+
function Yi(e, t) {
|
|
5395
5490
|
let r = {
|
|
5396
5491
|
name: e,
|
|
5397
5492
|
kind: "",
|
|
@@ -5404,10 +5499,10 @@ function Bi(e, t) {
|
|
|
5404
5499
|
if (s > o.length) break;
|
|
5405
5500
|
if (e === "kind") r.kind = a(o[s++] ?? "");
|
|
5406
5501
|
else if (e === "serves") {
|
|
5407
|
-
let e =
|
|
5502
|
+
let e = Ji(o, s);
|
|
5408
5503
|
r.serves = e.names, s = e.next;
|
|
5409
5504
|
} else if (e === "does") {
|
|
5410
|
-
let e =
|
|
5505
|
+
let e = Ji(o, s);
|
|
5411
5506
|
r.does = e.names, s = e.next;
|
|
5412
5507
|
} else if (e === "payload") {
|
|
5413
5508
|
let e = n(i(o[s++] ?? "")), t = {
|
|
@@ -5425,7 +5520,7 @@ function Bi(e, t) {
|
|
|
5425
5520
|
}
|
|
5426
5521
|
return r;
|
|
5427
5522
|
}
|
|
5428
|
-
function
|
|
5523
|
+
function Xi(e) {
|
|
5429
5524
|
let t = {}, r = n(e), o = 0;
|
|
5430
5525
|
for (; o < r.length;) {
|
|
5431
5526
|
let e = P(r[o++]);
|
|
@@ -5437,7 +5532,7 @@ function Vi(e) {
|
|
|
5437
5532
|
}
|
|
5438
5533
|
return t;
|
|
5439
5534
|
}
|
|
5440
|
-
function
|
|
5535
|
+
function Zi(e, t) {
|
|
5441
5536
|
let r = {
|
|
5442
5537
|
id: e,
|
|
5443
5538
|
operations: [],
|
|
@@ -5449,19 +5544,19 @@ function Hi(e, t) {
|
|
|
5449
5544
|
if (s > o.length) break;
|
|
5450
5545
|
if (e === "operation") {
|
|
5451
5546
|
let e = P(o[s++] ?? ""), t = s < o.length ? i(o[s++]) : "";
|
|
5452
|
-
e && r.operations.push(
|
|
5453
|
-
} else e === "access" ? r.access =
|
|
5547
|
+
e && r.operations.push(Yi(e, t));
|
|
5548
|
+
} else e === "access" ? r.access = Xi(i(o[s++] ?? "")) : e === "profile" ? r.profile = a(o[s++] ?? "") : i(o[s++] ?? "");
|
|
5454
5549
|
}
|
|
5455
5550
|
return r;
|
|
5456
5551
|
}
|
|
5457
|
-
function
|
|
5552
|
+
function Qi(e, t) {
|
|
5458
5553
|
let n = t + "operation " + N(e.name) + " {";
|
|
5459
5554
|
return e.kind && (n += " kind " + N(e.kind)), e.serves.length > 0 && (n += " serves { " + e.serves.map(N).join(" ") + " }"), e.does.length > 0 && (n += " does { " + e.does.map(N).join(" ") + " }"), e.payload && (n += " payload { quantity_kind " + N(e.payload.quantityKind) + " unit " + N(e.payload.unit) + " timestamp " + (e.payload.timestamp ? "true" : "false") + " }"), n + " }\n";
|
|
5460
5555
|
}
|
|
5461
|
-
function
|
|
5556
|
+
function $i(e, t) {
|
|
5462
5557
|
let n = t + "endpoint " + N(e.id) + " {\n";
|
|
5463
|
-
for (let r of e.operations) n +=
|
|
5464
|
-
let r =
|
|
5558
|
+
for (let r of e.operations) n += Qi(r, t + " ");
|
|
5559
|
+
let r = Ki.filter((t) => (e.access[t] ?? []).length > 0), i = Object.keys(e.access).filter((e) => !Ki.includes(e));
|
|
5465
5560
|
if (r.length + i.length > 0) {
|
|
5466
5561
|
n += t + " access {";
|
|
5467
5562
|
for (let t of [...r, ...i]) n += " " + t + " { " + (e.access[t] ?? []).map(N).join(" ") + " }";
|
|
@@ -5469,7 +5564,7 @@ function Wi(e, t) {
|
|
|
5469
5564
|
}
|
|
5470
5565
|
return e.profile && (n += t + " profile " + N(e.profile) + "\n"), n + t + "}\n";
|
|
5471
5566
|
}
|
|
5472
|
-
function
|
|
5567
|
+
function ea(e, t) {
|
|
5473
5568
|
let r = {
|
|
5474
5569
|
aspect: "",
|
|
5475
5570
|
via: "",
|
|
@@ -5488,11 +5583,11 @@ function Gi(e, t) {
|
|
|
5488
5583
|
next: t
|
|
5489
5584
|
};
|
|
5490
5585
|
}
|
|
5491
|
-
function
|
|
5586
|
+
function ta(e, t) {
|
|
5492
5587
|
let n = t + "serve " + N(e.aspect) + " via " + N(e.via);
|
|
5493
5588
|
return e.freshWithin && (n += " { fresh_within " + N(e.freshWithin) + " }"), n + "\n";
|
|
5494
5589
|
}
|
|
5495
|
-
var
|
|
5590
|
+
var na = {
|
|
5496
5591
|
keyword: "connector_profile",
|
|
5497
5592
|
field: "connectorProfiles",
|
|
5498
5593
|
takesID: !0,
|
|
@@ -5517,7 +5612,7 @@ var qi = {
|
|
|
5517
5612
|
};
|
|
5518
5613
|
//#endregion
|
|
5519
5614
|
//#region src/ser-des/config/composition.ts
|
|
5520
|
-
function
|
|
5615
|
+
function ra(e, t) {
|
|
5521
5616
|
let r = {
|
|
5522
5617
|
id: e,
|
|
5523
5618
|
product: "",
|
|
@@ -5537,7 +5632,7 @@ function Ji(e, t) {
|
|
|
5537
5632
|
}
|
|
5538
5633
|
return r;
|
|
5539
5634
|
}
|
|
5540
|
-
function
|
|
5635
|
+
function ia(e) {
|
|
5541
5636
|
let t = [];
|
|
5542
5637
|
for (let n of e.split("\n")) {
|
|
5543
5638
|
let e = n.trim();
|
|
@@ -5560,7 +5655,7 @@ function Yi(e) {
|
|
|
5560
5655
|
}
|
|
5561
5656
|
return t;
|
|
5562
5657
|
}
|
|
5563
|
-
function
|
|
5658
|
+
function aa(e) {
|
|
5564
5659
|
let t = {
|
|
5565
5660
|
components: [],
|
|
5566
5661
|
decomposition: []
|
|
@@ -5569,8 +5664,8 @@ function Xi(e) {
|
|
|
5569
5664
|
let e = n[a++];
|
|
5570
5665
|
if (e === "component") {
|
|
5571
5666
|
let e = n[a++] ?? "", r = a < n.length ? i(n[a++]) : "";
|
|
5572
|
-
e && t.components.push(
|
|
5573
|
-
} else if (e === "decomposition") t.decomposition =
|
|
5667
|
+
e && t.components.push(ra(e, r));
|
|
5668
|
+
} else if (e === "decomposition") t.decomposition = ia(i(n[a++] ?? ""));
|
|
5574
5669
|
else if (e === "revision") {
|
|
5575
5670
|
let e = Number(n[a++] ?? "");
|
|
5576
5671
|
Number.isFinite(e) && (t.revision = e);
|
|
@@ -5578,13 +5673,13 @@ function Xi(e) {
|
|
|
5578
5673
|
}
|
|
5579
5674
|
return t;
|
|
5580
5675
|
}
|
|
5581
|
-
function
|
|
5676
|
+
function oa(e, t) {
|
|
5582
5677
|
let n = t + "component " + N(e.id) + " {\n";
|
|
5583
5678
|
return n += t + " product " + N(e.product) + "\n", n += t + " endpoint " + N(e.endpoint) + "\n", n += t + " serial " + s(e.serial) + "\n", n += t + " certificate " + (e.certificate === null ? "null" : s(e.certificate)) + "\n", n + t + "}\n";
|
|
5584
5679
|
}
|
|
5585
|
-
function
|
|
5680
|
+
function sa(e, t) {
|
|
5586
5681
|
let n = t + "composed_of {\n";
|
|
5587
|
-
for (let r of e.components) n +=
|
|
5682
|
+
for (let r of e.components) n += oa(r, t + " ");
|
|
5588
5683
|
if (e.decomposition.length > 0) {
|
|
5589
5684
|
n += t + " decomposition {\n";
|
|
5590
5685
|
for (let r of e.decomposition) n += t + " " + N(r.register) + " -> " + (r.component === "composite" ? "rule " + N(r.rule ?? "") : N(r.component) + "." + N(r.componentRegister ?? "")) + "\n";
|
|
@@ -5608,7 +5703,7 @@ function K(e, t, n) {
|
|
|
5608
5703
|
function q(e) {
|
|
5609
5704
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
5610
5705
|
}
|
|
5611
|
-
var
|
|
5706
|
+
var ca = function(e, t) {
|
|
5612
5707
|
let o = {
|
|
5613
5708
|
id: e,
|
|
5614
5709
|
extends: "",
|
|
@@ -5631,9 +5726,9 @@ var $i = function(e, t) {
|
|
|
5631
5726
|
if (c >= s.length) break;
|
|
5632
5727
|
if (e === "extends") o.extends = a(s[c++]);
|
|
5633
5728
|
else if (e === "measurand_kind") o.measurandKind = a(s[c++]);
|
|
5634
|
-
else if (e === "measurand") o.measurand =
|
|
5635
|
-
else if (e === "component") o.components.push(
|
|
5636
|
-
else if (e === "structure") o.structure.push(
|
|
5729
|
+
else if (e === "measurand") o.measurand = la(i(s[c++]));
|
|
5730
|
+
else if (e === "component") o.components.push(ua(a(s[c++]), i(s[c++])));
|
|
5731
|
+
else if (e === "structure") o.structure.push(da(a(s[c++]), i(s[c++])));
|
|
5637
5732
|
else if (e === "definition") o.definition = a(s[c++]);
|
|
5638
5733
|
else if (e === "note") o.note = a(s[c++]);
|
|
5639
5734
|
else if (e === "source") {
|
|
@@ -5650,7 +5745,7 @@ var $i = function(e, t) {
|
|
|
5650
5745
|
e === "name" ? r.name = a(l[u++]) : e === "definition" ? r.definition = a(l[u++]) : e === "note" ? r.note = a(l[u++]) : e === "source" ? r.source = I(i(l[u++])) : i(l[u++]);
|
|
5651
5746
|
}
|
|
5652
5747
|
o.variants.push(r);
|
|
5653
|
-
} else if (e === "dimension") o.dimensions.push(
|
|
5748
|
+
} else if (e === "dimension") o.dimensions.push(fa(a(s[c++]), i(s[c++])));
|
|
5654
5749
|
else if (e === "per_channel") o.perChannel = a(s[c++]);
|
|
5655
5750
|
else if (e === "family_criteria") o.familyCriteria = q(s[c++]);
|
|
5656
5751
|
else if (e === "family") {
|
|
@@ -5677,7 +5772,7 @@ var $i = function(e, t) {
|
|
|
5677
5772
|
if (t >= e.length) break;
|
|
5678
5773
|
n === "dimensions" ? o.familyDefaultDimensions = G(e[t++]) : n === "parameters" ? o.familyDefaultParameters = G(e[t++]) : i(e[t++]);
|
|
5679
5774
|
}
|
|
5680
|
-
} else if (e === "model_group") o.modelGroup =
|
|
5775
|
+
} else if (e === "model_group") o.modelGroup = ha(i(s[c++]));
|
|
5681
5776
|
else if (e === "reference") o.referenceIds = q(s[c++]);
|
|
5682
5777
|
else if (e === "ref") {
|
|
5683
5778
|
let e = S(s, c, a, i);
|
|
@@ -5689,7 +5784,7 @@ var $i = function(e, t) {
|
|
|
5689
5784
|
}
|
|
5690
5785
|
return (t) => (t.instruments[e] = o, t);
|
|
5691
5786
|
};
|
|
5692
|
-
function
|
|
5787
|
+
function la(e) {
|
|
5693
5788
|
let t = {
|
|
5694
5789
|
kind: "",
|
|
5695
5790
|
description: "",
|
|
@@ -5716,7 +5811,7 @@ function ea(e) {
|
|
|
5716
5811
|
}
|
|
5717
5812
|
return t;
|
|
5718
5813
|
}
|
|
5719
|
-
function
|
|
5814
|
+
function ua(e, t) {
|
|
5720
5815
|
let r = {
|
|
5721
5816
|
id: e,
|
|
5722
5817
|
classId: "",
|
|
@@ -5730,7 +5825,7 @@ function ta(e, t) {
|
|
|
5730
5825
|
}
|
|
5731
5826
|
return r;
|
|
5732
5827
|
}
|
|
5733
|
-
function
|
|
5828
|
+
function da(e, t) {
|
|
5734
5829
|
let r = {
|
|
5735
5830
|
id: e,
|
|
5736
5831
|
predicate: "",
|
|
@@ -5758,7 +5853,7 @@ function na(e, t) {
|
|
|
5758
5853
|
}
|
|
5759
5854
|
return r;
|
|
5760
5855
|
}
|
|
5761
|
-
function
|
|
5856
|
+
function fa(e, t) {
|
|
5762
5857
|
let r = {
|
|
5763
5858
|
id: e,
|
|
5764
5859
|
label: "",
|
|
@@ -5781,7 +5876,7 @@ function ra(e, t) {
|
|
|
5781
5876
|
} else if (t === "label_separator") r.labelSeparator = a(o[s++]);
|
|
5782
5877
|
else if (t === "description") r.description = a(o[s++]);
|
|
5783
5878
|
else if (t === "reference" || t === "source") r.source = I(i(o[s++]));
|
|
5784
|
-
else if (t === "values") r.values =
|
|
5879
|
+
else if (t === "values") r.values = pa(i(o[s++]));
|
|
5785
5880
|
else if (t === "values_of") r.valuesOf = a(o[s++]);
|
|
5786
5881
|
else if (t === "ref") {
|
|
5787
5882
|
let e = S(o, s, a, i);
|
|
@@ -5790,7 +5885,7 @@ function ra(e, t) {
|
|
|
5790
5885
|
}
|
|
5791
5886
|
return r;
|
|
5792
5887
|
}
|
|
5793
|
-
function
|
|
5888
|
+
function pa(e) {
|
|
5794
5889
|
let t = [], r = n(e), o = 0;
|
|
5795
5890
|
for (; o < r.length;) {
|
|
5796
5891
|
let e = P(r[o++]);
|
|
@@ -5833,7 +5928,7 @@ function ia(e) {
|
|
|
5833
5928
|
}
|
|
5834
5929
|
return t;
|
|
5835
5930
|
}
|
|
5836
|
-
function
|
|
5931
|
+
function ma(e, t) {
|
|
5837
5932
|
let n = t + " ", r = t + " ", i = t + "dimension " + e.id + " {\n";
|
|
5838
5933
|
if (e.label && (i += n + "label \"" + s(e.label) + "\"\n"), e.scope && (i += n + "scope " + e.scope + "\n"), e.cardinality && (i += n + "cardinality " + e.cardinality + "\n"), e.labelSeparator && (i += n + "label_separator \"" + s(e.labelSeparator) + "\"\n"), e.description && (i += n + "description \"" + s(e.description) + "\"\n"), i += W("reference", e.source, n), e.valuesOf && (i += n + "values_of " + e.valuesOf + "\n"), e.values.length > 0) {
|
|
5839
5934
|
i += n + "values {\n";
|
|
@@ -5857,7 +5952,7 @@ function aa(e, t) {
|
|
|
5857
5952
|
}
|
|
5858
5953
|
return i += w(e.refs, n, s), i += t + "}\n", i;
|
|
5859
5954
|
}
|
|
5860
|
-
function
|
|
5955
|
+
function ha(e) {
|
|
5861
5956
|
let t = {
|
|
5862
5957
|
definition: "",
|
|
5863
5958
|
identicalCharacteristics: [],
|
|
@@ -5884,7 +5979,7 @@ function oa(e) {
|
|
|
5884
5979
|
}
|
|
5885
5980
|
return t;
|
|
5886
5981
|
}
|
|
5887
|
-
var
|
|
5982
|
+
var ga = function(e) {
|
|
5888
5983
|
let t = "instrument " + e.id + " {\n";
|
|
5889
5984
|
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) {
|
|
5890
5985
|
let n = e.measurand;
|
|
@@ -5907,7 +6002,7 @@ var sa = function(e) {
|
|
|
5907
6002
|
let e = " variant " + n.id + " { ";
|
|
5908
6003
|
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";
|
|
5909
6004
|
}
|
|
5910
|
-
for (let n of e.dimensions) t +=
|
|
6005
|
+
for (let n of e.dimensions) t += ma(n, " ");
|
|
5911
6006
|
if ((e.familyMetamodelClass || e.familyDefinition || e.familyNote || e.familySource && (e.familySource.doc || e.familySource.clause)) && (t += " family {\n", e.familyMetamodelClass && (t += " metamodel_class " + e.familyMetamodelClass + "\n"), e.familyDefinition && (t += " definition \"" + s(e.familyDefinition) + "\"\n"), e.familyNote && (t += " note \"" + s(e.familyNote) + "\"\n"), e.familySource && (e.familySource.doc || e.familySource.clause) && (t += E(e.familySource, " ", s)), t += " }\n"), e.familyCriteria.length > 0) {
|
|
5912
6007
|
t += " family_criteria {\n";
|
|
5913
6008
|
for (let n of e.familyCriteria) t += " \"" + s(n) + "\"\n";
|
|
@@ -5922,7 +6017,46 @@ var sa = function(e) {
|
|
|
5922
6017
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5923
6018
|
for (let e of n) t += E(e, " ", s);
|
|
5924
6019
|
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5925
|
-
}
|
|
6020
|
+
};
|
|
6021
|
+
function _a(e) {
|
|
6022
|
+
let t = {
|
|
6023
|
+
key: "",
|
|
6024
|
+
value: "",
|
|
6025
|
+
keyDimension: "",
|
|
6026
|
+
components: []
|
|
6027
|
+
}, r = n(e), o = 0;
|
|
6028
|
+
for (; o < r.length;) {
|
|
6029
|
+
let e = r[o++];
|
|
6030
|
+
if (o > r.length) break;
|
|
6031
|
+
if (e === "key") t.key = a(r[o++]);
|
|
6032
|
+
else if (e === "value") t.value = a(r[o++]);
|
|
6033
|
+
else if (e === "key_dimension") t.keyDimension = a(r[o++]);
|
|
6034
|
+
else if (e === "component") {
|
|
6035
|
+
let e = {
|
|
6036
|
+
id: a(r[o++]),
|
|
6037
|
+
name: "",
|
|
6038
|
+
source: null
|
|
6039
|
+
};
|
|
6040
|
+
if (o < r.length && r[o].startsWith("{")) {
|
|
6041
|
+
let t = n(i(r[o++])), s = 0;
|
|
6042
|
+
for (; s < t.length;) {
|
|
6043
|
+
let n = t[s++];
|
|
6044
|
+
if (s >= t.length) break;
|
|
6045
|
+
n === "name" ? e.name = a(t[s++]) : n === "source" ? e.source = I(i(t[s++])) : i(t[s++]);
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6048
|
+
t.components.push(e);
|
|
6049
|
+
} else o = y(r, o, e);
|
|
6050
|
+
}
|
|
6051
|
+
return t;
|
|
6052
|
+
}
|
|
6053
|
+
function va(e) {
|
|
6054
|
+
let t = " pair_list {\n";
|
|
6055
|
+
t += " key " + N(e.key) + "\n", t += " value " + N(e.value) + "\n", e.keyDimension && (t += " key_dimension " + N(e.keyDimension) + "\n");
|
|
6056
|
+
for (let n of e.components) t += " component " + N(n.id) + " {\n", n.name && (t += " name \"" + s(n.name) + "\"\n"), n.source && (n.source.doc || n.source.clause) && (t += " source {\n", n.source.doc && (t += " doc \"" + s(n.source.doc) + "\"\n"), n.source.clause && (t += " clause \"" + s(n.source.clause) + "\"\n"), t += " }\n"), t += " }\n";
|
|
6057
|
+
return t += " }\n", t;
|
|
6058
|
+
}
|
|
6059
|
+
var ya = function(e, t) {
|
|
5926
6060
|
let n = {
|
|
5927
6061
|
id: e,
|
|
5928
6062
|
symbol: "",
|
|
@@ -5953,6 +6087,7 @@ var sa = function(e) {
|
|
|
5953
6087
|
} else if (e === "quantity_kind") n.quantityKind = a(o[s++]);
|
|
5954
6088
|
else if (e === "unit") n.unit = a(o[s++]);
|
|
5955
6089
|
else if (e === "value_type") n.valueType = a(o[s++]);
|
|
6090
|
+
else if (e === "pair_list") n.pairList = _a(i(o[s++]));
|
|
5956
6091
|
else if (e === "origin") n.origin = a(o[s++]);
|
|
5957
6092
|
else if (e === "scope") n.scope = a(o[s++]);
|
|
5958
6093
|
else if (e === "category") n.category = a(o[s++]);
|
|
@@ -5971,14 +6106,14 @@ var sa = function(e) {
|
|
|
5971
6106
|
} else s = y(o, s, e);
|
|
5972
6107
|
}
|
|
5973
6108
|
return (t) => (t.attributeDefinitions[e] = n, t);
|
|
5974
|
-
},
|
|
6109
|
+
}, ba = function(e) {
|
|
5975
6110
|
let t = "attribute_definition " + e.id + " {\n";
|
|
5976
6111
|
e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n");
|
|
5977
6112
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5978
6113
|
for (let e of n) t += E(e, " ", s);
|
|
5979
6114
|
for (let n of e.referenceIds) t += " ref cites \"" + s(n) + "\"\n";
|
|
5980
|
-
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), e.quantityKind && (t += " quantity_kind " + e.quantityKind + "\n"), e.unit && (t += " unit \"" + s(e.unit) + "\"\n"), e.valueType && (t += " value_type " + e.valueType + "\n"), e.origin && (t += " origin " + e.origin + "\n"), e.scope && (t += " scope " + e.scope + "\n"), e.category && (t += " category " + e.category + "\n"), e.isDimension !== null && e.isDimension !== void 0 && (t += " is_dimension " + (e.isDimension ? "true" : "false") + "\n"), e.enumRef && (t += " enum " + e.enumRef + "\n"), e.enumValues && e.enumValues.length > 0 && (t += " enum_values { " + e.enumValues.map(N).join(" ") + " }\n"), e.irdi && (t += " irdi \"" + s(e.irdi) + "\"\n"), e.derived && (t += " derived \"" + s(e.derived) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += "}\n", t;
|
|
5981
|
-
},
|
|
6115
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), e.quantityKind && (t += " quantity_kind " + e.quantityKind + "\n"), e.unit && (t += " unit \"" + s(e.unit) + "\"\n"), e.valueType && (t += " value_type " + e.valueType + "\n"), e.pairList && (t += va(e.pairList)), e.origin && (t += " origin " + e.origin + "\n"), e.scope && (t += " scope " + e.scope + "\n"), e.category && (t += " category " + e.category + "\n"), e.isDimension !== null && e.isDimension !== void 0 && (t += " is_dimension " + (e.isDimension ? "true" : "false") + "\n"), e.enumRef && (t += " enum " + e.enumRef + "\n"), e.enumValues && e.enumValues.length > 0 && (t += " enum_values { " + e.enumValues.map(N).join(" ") + " }\n"), e.irdi && (t += " irdi \"" + s(e.irdi) + "\"\n"), e.derived && (t += " derived \"" + s(e.derived) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += "}\n", t;
|
|
6116
|
+
}, xa = function(e, t) {
|
|
5982
6117
|
let n = {
|
|
5983
6118
|
id: e,
|
|
5984
6119
|
label: "",
|
|
@@ -6012,10 +6147,10 @@ var sa = function(e) {
|
|
|
6012
6147
|
} else s = y(o, s, e);
|
|
6013
6148
|
}
|
|
6014
6149
|
return (t) => (t.capabilities[e] = n, t);
|
|
6015
|
-
},
|
|
6150
|
+
}, Sa = function(e) {
|
|
6016
6151
|
let t = "capability " + e.id + " {\n";
|
|
6017
6152
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.abstract && (t += " abstract true\n"), t += K("extends", e.extends, " "), t += K("requires", e.requires, " "), t += K("has_parameters", e.hasParameters, " "), t += K("satisfies_requirements", e.satisfiesRequirements, " "), t += K("verified_by_tests", e.verifiedByTests, " "), t += K("reference", e.referenceIds, " "), t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
6018
|
-
},
|
|
6153
|
+
}, Ca = function(e, t) {
|
|
6019
6154
|
let n = {
|
|
6020
6155
|
id: e,
|
|
6021
6156
|
kind: "",
|
|
@@ -6044,13 +6179,13 @@ var sa = function(e) {
|
|
|
6044
6179
|
} else s = y(o, s, e);
|
|
6045
6180
|
}
|
|
6046
6181
|
return (t) => (t.behaviors[e] = n, t);
|
|
6047
|
-
},
|
|
6182
|
+
}, wa = function(e) {
|
|
6048
6183
|
let t = "behavior " + e.id + " {\n";
|
|
6049
6184
|
e.kind && (t += " kind " + e.kind + "\n"), e.stimulus && (t += " stimulus " + e.stimulus + "\n"), e.response && (t += " response \"" + s(e.response) + "\"\n");
|
|
6050
6185
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
6051
6186
|
for (let e of n) t += E(e, " ", s);
|
|
6052
6187
|
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += K("verified_by", e.verifiedBy, " "), t += "}\n", t;
|
|
6053
|
-
},
|
|
6188
|
+
}, Ta = function(e, t) {
|
|
6054
6189
|
let n = {
|
|
6055
6190
|
id: e,
|
|
6056
6191
|
role: "",
|
|
@@ -6065,7 +6200,7 @@ var sa = function(e) {
|
|
|
6065
6200
|
if (e === "role") n.role = a(o[s++]);
|
|
6066
6201
|
else if (e === "subject") n.subject = a(o[s++]);
|
|
6067
6202
|
else if (e === "description") n.description = a(o[s++]);
|
|
6068
|
-
else if (e === "entries") n.entries =
|
|
6203
|
+
else if (e === "entries") n.entries = Ea(i(o[s++]));
|
|
6069
6204
|
else if (e === "source") {
|
|
6070
6205
|
let e = I(i(o[s++]));
|
|
6071
6206
|
n.sources.push(e), n.source ||= e;
|
|
@@ -6082,7 +6217,7 @@ var sa = function(e) {
|
|
|
6082
6217
|
}
|
|
6083
6218
|
return (t) => (t.conditionSets[e] = n, t);
|
|
6084
6219
|
};
|
|
6085
|
-
function
|
|
6220
|
+
function Ea(e) {
|
|
6086
6221
|
let t = [], r = n(e), o = 0;
|
|
6087
6222
|
for (; o < r.length;) {
|
|
6088
6223
|
let e = P(r[o++]);
|
|
@@ -6105,7 +6240,7 @@ function ha(e) {
|
|
|
6105
6240
|
}
|
|
6106
6241
|
return t;
|
|
6107
6242
|
}
|
|
6108
|
-
var
|
|
6243
|
+
var Da = function(e) {
|
|
6109
6244
|
let t = "condition_set " + e.id + " {\n";
|
|
6110
6245
|
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) {
|
|
6111
6246
|
t += " entries {\n";
|
|
@@ -6119,7 +6254,7 @@ var ga = function(e) {
|
|
|
6119
6254
|
for (let e of n) t += E(e, " ", s);
|
|
6120
6255
|
return t += K("reference", e.referenceIds, " "), t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
6121
6256
|
};
|
|
6122
|
-
function
|
|
6257
|
+
function Oa(e) {
|
|
6123
6258
|
let t = {}, r = n(e), i = 0;
|
|
6124
6259
|
for (; i < r.length;) {
|
|
6125
6260
|
let e = P(r[i++]);
|
|
@@ -6128,7 +6263,7 @@ function _a(e) {
|
|
|
6128
6263
|
}
|
|
6129
6264
|
return t;
|
|
6130
6265
|
}
|
|
6131
|
-
function
|
|
6266
|
+
function ka(e) {
|
|
6132
6267
|
let t = {}, r = n(e), i = 0;
|
|
6133
6268
|
for (; i < r.length;) {
|
|
6134
6269
|
let e = P(r[i++]);
|
|
@@ -6140,10 +6275,10 @@ function va(e) {
|
|
|
6140
6275
|
}
|
|
6141
6276
|
return t;
|
|
6142
6277
|
}
|
|
6143
|
-
function
|
|
6278
|
+
function Aa(e) {
|
|
6144
6279
|
return n(e).map(a).filter((e) => e.length > 0);
|
|
6145
6280
|
}
|
|
6146
|
-
function
|
|
6281
|
+
function ja(e) {
|
|
6147
6282
|
let t = {}, r = n(e), o = 0;
|
|
6148
6283
|
for (; o < r.length;) {
|
|
6149
6284
|
let e = P(r[o++]);
|
|
@@ -6155,13 +6290,13 @@ function ba(e) {
|
|
|
6155
6290
|
}
|
|
6156
6291
|
return t;
|
|
6157
6292
|
}
|
|
6158
|
-
function
|
|
6293
|
+
function Ma(e) {
|
|
6159
6294
|
let t = {}, r = n(e), o = 0;
|
|
6160
6295
|
for (; o < r.length;) {
|
|
6161
6296
|
let e = P(r[o++]);
|
|
6162
6297
|
if (!e) break;
|
|
6163
6298
|
if (o < r.length && r[o].startsWith("{")) {
|
|
6164
|
-
t[e] =
|
|
6299
|
+
t[e] = Na(i(r[o++]));
|
|
6165
6300
|
continue;
|
|
6166
6301
|
}
|
|
6167
6302
|
let n = "", s = "", c = !1;
|
|
@@ -6177,7 +6312,7 @@ function xa(e) {
|
|
|
6177
6312
|
}
|
|
6178
6313
|
return t;
|
|
6179
6314
|
}
|
|
6180
|
-
function
|
|
6315
|
+
function Na(e) {
|
|
6181
6316
|
let t = {
|
|
6182
6317
|
symbol: "",
|
|
6183
6318
|
derivation: ""
|
|
@@ -6193,18 +6328,18 @@ function Sa(e) {
|
|
|
6193
6328
|
}
|
|
6194
6329
|
return t;
|
|
6195
6330
|
}
|
|
6196
|
-
var
|
|
6197
|
-
function
|
|
6331
|
+
var Pa = /* @__PURE__ */ new Set(["state", "behavior"]);
|
|
6332
|
+
function Fa(e, t, n) {
|
|
6198
6333
|
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;
|
|
6199
6334
|
}
|
|
6200
|
-
function
|
|
6335
|
+
function Ia(e, t, n, r, i) {
|
|
6201
6336
|
let a = P(n);
|
|
6202
6337
|
return e.misplacedAspects.push({
|
|
6203
6338
|
family: t,
|
|
6204
6339
|
aspect: a
|
|
6205
|
-
}), i < r.length && r[i].startsWith("{") ||
|
|
6340
|
+
}), i < r.length && r[i].startsWith("{") || Pa.has(a) ? i++ : i = Fa(a, r, i), i;
|
|
6206
6341
|
}
|
|
6207
|
-
function
|
|
6342
|
+
function La(e, t) {
|
|
6208
6343
|
let r = e[t] ?? "";
|
|
6209
6344
|
if (r === "symbolic") return {
|
|
6210
6345
|
level: {
|
|
@@ -6233,7 +6368,7 @@ function Ea(e, t) {
|
|
|
6233
6368
|
next: t + 1
|
|
6234
6369
|
};
|
|
6235
6370
|
}
|
|
6236
|
-
function
|
|
6371
|
+
function Ra(e) {
|
|
6237
6372
|
let t = [], r = n(e), o = 0;
|
|
6238
6373
|
for (; o < r.length;) {
|
|
6239
6374
|
let e = r[o++];
|
|
@@ -6264,7 +6399,7 @@ function Da(e) {
|
|
|
6264
6399
|
if (l >= c.length) break;
|
|
6265
6400
|
if (e === "target") s.target = a(c[l++]);
|
|
6266
6401
|
else if (e === "level") {
|
|
6267
|
-
let e =
|
|
6402
|
+
let e = La(c, l);
|
|
6268
6403
|
s.level = e.level, l = e.next;
|
|
6269
6404
|
} else if (e === "conditions") {
|
|
6270
6405
|
let e = M(c, l);
|
|
@@ -6275,53 +6410,53 @@ function Da(e) {
|
|
|
6275
6410
|
}
|
|
6276
6411
|
return t;
|
|
6277
6412
|
}
|
|
6278
|
-
function
|
|
6413
|
+
function za(e) {
|
|
6279
6414
|
return e.id === "" && !e.target && !e.level && !e.conditions && e.verifiedBy.length === 0 && !e.source;
|
|
6280
6415
|
}
|
|
6281
|
-
function
|
|
6416
|
+
function Ba(e, t) {
|
|
6282
6417
|
let r = n(e), a = 0;
|
|
6283
6418
|
for (; a < r.length;) {
|
|
6284
6419
|
let e = r[a++];
|
|
6285
6420
|
if (a >= r.length) break;
|
|
6286
|
-
if (e === "metadata") t.is.metadata =
|
|
6287
|
-
else if (e === "provenance") t.is.provenance =
|
|
6288
|
-
else if (e === "structure") t.is.structure =
|
|
6289
|
-
else if (e === "design_parameters") t.is.designParameters =
|
|
6290
|
-
else if (e === "designed_conditions") t.is.designedConditions =
|
|
6291
|
-
else if (e === "promises") t.is.promises =
|
|
6292
|
-
else if (e === "artifacts") t.is.artifacts =
|
|
6421
|
+
if (e === "metadata") t.is.metadata = Oa(i(r[a++]));
|
|
6422
|
+
else if (e === "provenance") t.is.provenance = Oa(i(r[a++]));
|
|
6423
|
+
else if (e === "structure") t.is.structure = Aa(i(r[a++]));
|
|
6424
|
+
else if (e === "design_parameters") t.is.designParameters = ka(i(r[a++]));
|
|
6425
|
+
else if (e === "designed_conditions") t.is.designedConditions = Oa(i(r[a++]));
|
|
6426
|
+
else if (e === "promises") t.is.promises = Ra(i(r[a++]));
|
|
6427
|
+
else if (e === "artifacts") t.is.artifacts = Aa(i(r[a++]));
|
|
6293
6428
|
else if (e === "endpoint") {
|
|
6294
6429
|
let e = P(r[a++] ?? ""), n = a < r.length ? i(r[a++]) : "";
|
|
6295
|
-
e && t.is.endpoints.push(
|
|
6296
|
-
} else e === "composed_of" ? t.is.composedOf =
|
|
6430
|
+
e && t.is.endpoints.push(Zi(e, n));
|
|
6431
|
+
} else e === "composed_of" ? t.is.composedOf = aa(i(r[a++] ?? "")) : a = Ia(t, "is", e, r, a);
|
|
6297
6432
|
}
|
|
6298
6433
|
}
|
|
6299
|
-
function
|
|
6434
|
+
function Va(e, t) {
|
|
6300
6435
|
let r = n(e), o = 0;
|
|
6301
6436
|
for (; o < r.length;) {
|
|
6302
6437
|
let e = r[o++];
|
|
6303
6438
|
if (o >= r.length) break;
|
|
6304
|
-
if (e === "attributes") t.has.attributes =
|
|
6305
|
-
else if (e === "dimensions") t.has.dimensions =
|
|
6439
|
+
if (e === "attributes") t.has.attributes = ka(i(r[o++]));
|
|
6440
|
+
else if (e === "dimensions") t.has.dimensions = ja(i(r[o++]));
|
|
6306
6441
|
else if (e === "state") t.has.state = a(r[o++]);
|
|
6307
|
-
else if (e === "characteristics") t.has.characteristics =
|
|
6308
|
-
else if (e === "environmental_context") t.has.environmentalContext =
|
|
6309
|
-
else if (e === "artifact_instances") t.has.artifactInstances =
|
|
6442
|
+
else if (e === "characteristics") t.has.characteristics = Ma(i(r[o++]));
|
|
6443
|
+
else if (e === "environmental_context") t.has.environmentalContext = Aa(i(r[o++]));
|
|
6444
|
+
else if (e === "artifact_instances") t.has.artifactInstances = Aa(i(r[o++]));
|
|
6310
6445
|
else if (e === "serve") {
|
|
6311
|
-
let e =
|
|
6446
|
+
let e = ea(r, o);
|
|
6312
6447
|
t.has.serves.push(e.binding), o = e.next;
|
|
6313
|
-
} else o =
|
|
6448
|
+
} else o = Ia(t, "has", e, r, o);
|
|
6314
6449
|
}
|
|
6315
6450
|
}
|
|
6316
|
-
function
|
|
6451
|
+
function Ha(e, t) {
|
|
6317
6452
|
let r = n(e), i = 0;
|
|
6318
6453
|
for (; i < r.length;) {
|
|
6319
6454
|
let e = r[i++];
|
|
6320
6455
|
if (i >= r.length) break;
|
|
6321
|
-
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i =
|
|
6456
|
+
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i = Ia(t, "does", e, r, i);
|
|
6322
6457
|
}
|
|
6323
6458
|
}
|
|
6324
|
-
var
|
|
6459
|
+
var Ua = function(e, t) {
|
|
6325
6460
|
let n = {
|
|
6326
6461
|
id: e,
|
|
6327
6462
|
extends: "",
|
|
@@ -6351,11 +6486,11 @@ var Ma = function(e, t) {
|
|
|
6351
6486
|
for (; s < o.length;) {
|
|
6352
6487
|
let e = o[s++];
|
|
6353
6488
|
if (s >= o.length) break;
|
|
6354
|
-
e === "extends" ? n.extends = a(o[s++]) : e === "is" ?
|
|
6489
|
+
e === "extends" ? n.extends = a(o[s++]) : e === "is" ? Ba(i(o[s++]), n) : e === "has" ? Va(i(o[s++]), n) : e === "does" ? Ha(i(o[s++]), n) : e === "reference" ? n.referenceIds = q(o[s++]) : s = y(o, s, e);
|
|
6355
6490
|
}
|
|
6356
6491
|
return (t) => (t.subjects[e] = n, t);
|
|
6357
6492
|
};
|
|
6358
|
-
function
|
|
6493
|
+
function Wa(e, t) {
|
|
6359
6494
|
return {
|
|
6360
6495
|
id: t.id,
|
|
6361
6496
|
extends: "",
|
|
@@ -6405,34 +6540,34 @@ function Na(e, t) {
|
|
|
6405
6540
|
misplacedAspects: t.misplacedAspects
|
|
6406
6541
|
};
|
|
6407
6542
|
}
|
|
6408
|
-
function
|
|
6543
|
+
function Ga(e, t) {
|
|
6409
6544
|
let n = (t, r) => {
|
|
6410
6545
|
let i = t.extends;
|
|
6411
6546
|
if (!i || r.has(i)) return t;
|
|
6412
6547
|
let a = e.subjects[i];
|
|
6413
|
-
return a ? (r.add(i),
|
|
6548
|
+
return a ? (r.add(i), Wa(n(a, r), t)) : t;
|
|
6414
6549
|
};
|
|
6415
6550
|
return n(t, /* @__PURE__ */ new Set([t.id]));
|
|
6416
6551
|
}
|
|
6417
|
-
function
|
|
6552
|
+
function Ka(e, t) {
|
|
6418
6553
|
let n = Object.keys(t);
|
|
6419
6554
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " " + N(t[e])).join(" ") + " }\n";
|
|
6420
6555
|
}
|
|
6421
|
-
function
|
|
6556
|
+
function qa(e, t) {
|
|
6422
6557
|
let n = Object.keys(t);
|
|
6423
6558
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " :" + (t[e] ? " " + N(t[e]) : "")).join(" ") + " }\n";
|
|
6424
6559
|
}
|
|
6425
|
-
function
|
|
6560
|
+
function Ja(e, t) {
|
|
6426
6561
|
return t.length === 0 ? "" : " " + e + " { " + t.map(N).join(" ") + " }\n";
|
|
6427
6562
|
}
|
|
6428
|
-
function
|
|
6563
|
+
function Ya(e) {
|
|
6429
6564
|
let t = Object.keys(e);
|
|
6430
6565
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " in { " + e[t].join(", ") + " }").join(" ") + " }\n";
|
|
6431
6566
|
}
|
|
6432
|
-
function
|
|
6567
|
+
function Xa(e) {
|
|
6433
6568
|
return /^ocl\{[\s\S]*\}$/.test(e) ? e : N(e);
|
|
6434
6569
|
}
|
|
6435
|
-
function
|
|
6570
|
+
function Za(e) {
|
|
6436
6571
|
if (e.kind === "symbolic") return "symbolic " + N(e.symbolic ?? "");
|
|
6437
6572
|
if (e.kind === "range") {
|
|
6438
6573
|
let t = "";
|
|
@@ -6440,104 +6575,104 @@ function Ba(e) {
|
|
|
6440
6575
|
}
|
|
6441
6576
|
return xe(e.quantity ?? { value: "" });
|
|
6442
6577
|
}
|
|
6443
|
-
function
|
|
6578
|
+
function Qa(e) {
|
|
6444
6579
|
if (e.length === 0) return "";
|
|
6445
|
-
if (e.every(
|
|
6580
|
+
if (e.every(za)) return " promises { " + e.map((e) => N(e.statement)).join(" ") + " }\n";
|
|
6446
6581
|
let t = " promises {\n";
|
|
6447
6582
|
for (let n of e) {
|
|
6448
|
-
if (
|
|
6583
|
+
if (za(n)) {
|
|
6449
6584
|
t += " " + N(n.statement) + "\n";
|
|
6450
6585
|
continue;
|
|
6451
6586
|
}
|
|
6452
|
-
t += " " + N(n.id) + " {\n", n.target && (t += " target " + N(n.target) + "\n"), n.level && (t += " level " +
|
|
6587
|
+
t += " " + N(n.id) + " {\n", n.target && (t += " target " + N(n.target) + "\n"), n.level && (t += " level " + Za(n.level) + "\n"), n.conditions && (t += " conditions " + Xa(n.conditions) + "\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), t += K("verified_by", n.verifiedBy, " "), t += W("source", n.source ?? null, " "), t += " }\n";
|
|
6453
6588
|
}
|
|
6454
6589
|
return t += " }\n", t;
|
|
6455
6590
|
}
|
|
6456
|
-
function
|
|
6591
|
+
function $a(e) {
|
|
6457
6592
|
let t = Object.keys(e);
|
|
6458
6593
|
if (t.length === 0) return "";
|
|
6459
6594
|
let n = " characteristics {\n";
|
|
6460
6595
|
for (let r of t) {
|
|
6461
6596
|
let t = e[r];
|
|
6462
6597
|
if (t.behavior || t.quantityKind || t.unit || t.source && (t.source.doc || t.source.clause)) {
|
|
6463
|
-
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " +
|
|
6598
|
+
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " + Xa(t.derivation) + "\n"), t.behavior && (n += " behavior " + N(t.behavior) + "\n"), t.quantityKind && (n += " quantity_kind " + N(t.quantityKind) + "\n"), t.unit && (n += " unit \"" + s(t.unit) + "\"\n"), n += W("source", t.source ?? null, " "), n += " }\n";
|
|
6464
6599
|
continue;
|
|
6465
6600
|
}
|
|
6466
|
-
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " +
|
|
6601
|
+
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " + Xa(t.derivation)), n += "\n";
|
|
6467
6602
|
}
|
|
6468
6603
|
return n += " }\n", n;
|
|
6469
6604
|
}
|
|
6470
|
-
function
|
|
6605
|
+
function eo(e) {
|
|
6471
6606
|
let t = "";
|
|
6472
|
-
for (let n of e) t +=
|
|
6607
|
+
for (let n of e) t += $i(n, " ");
|
|
6473
6608
|
return t;
|
|
6474
6609
|
}
|
|
6475
|
-
function
|
|
6610
|
+
function to(e) {
|
|
6476
6611
|
let t = "";
|
|
6477
|
-
for (let n of e) t +=
|
|
6612
|
+
for (let n of e) t += ta(n, " ");
|
|
6478
6613
|
return t;
|
|
6479
6614
|
}
|
|
6480
|
-
var
|
|
6615
|
+
var no = function(e) {
|
|
6481
6616
|
let t = "subject " + e.id + " {\n";
|
|
6482
6617
|
e.extends && (t += " extends " + e.extends + "\n");
|
|
6483
|
-
let n =
|
|
6618
|
+
let n = Ka("metadata", e.is.metadata) + Ka("provenance", e.is.provenance) + Ja("structure", e.is.structure) + qa("design_parameters", e.is.designParameters) + Ka("designed_conditions", e.is.designedConditions) + Qa(e.is.promises) + Ja("artifacts", e.is.artifacts) + eo(e.is.endpoints) + (e.is.composedOf ? sa(e.is.composedOf, " ") : "");
|
|
6484
6619
|
n && (t += " is {\n" + n + " }\n");
|
|
6485
|
-
let r =
|
|
6620
|
+
let r = qa("attributes", e.has.attributes) + Ya(e.has.dimensions) + (e.has.state ? " state " + N(e.has.state) + "\n" : "") + $a(e.has.characteristics) + Ja("environmental_context", e.has.environmentalContext) + Ja("artifact_instances", e.has.artifactInstances) + to(e.has.serves);
|
|
6486
6621
|
r && (t += " has {\n" + r + " }\n");
|
|
6487
6622
|
let i = "";
|
|
6488
6623
|
for (let t of e.does.behaviors) i += " behavior " + N(t) + "\n";
|
|
6489
6624
|
return i && (t += " does {\n" + i + " }\n"), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6490
|
-
},
|
|
6625
|
+
}, ro = {
|
|
6491
6626
|
keyword: "instrument",
|
|
6492
6627
|
field: "instruments",
|
|
6493
6628
|
takesID: !0,
|
|
6494
|
-
parse:
|
|
6495
|
-
dump:
|
|
6496
|
-
},
|
|
6629
|
+
parse: ca,
|
|
6630
|
+
dump: ga
|
|
6631
|
+
}, io = {
|
|
6497
6632
|
keyword: "attribute_definition",
|
|
6498
6633
|
field: "attributeDefinitions",
|
|
6499
6634
|
takesID: !0,
|
|
6500
|
-
parse:
|
|
6501
|
-
dump:
|
|
6502
|
-
},
|
|
6635
|
+
parse: ya,
|
|
6636
|
+
dump: ba
|
|
6637
|
+
}, ao = {
|
|
6503
6638
|
keyword: "capability",
|
|
6504
6639
|
field: "capabilities",
|
|
6505
6640
|
takesID: !0,
|
|
6506
|
-
parse:
|
|
6507
|
-
dump:
|
|
6508
|
-
},
|
|
6641
|
+
parse: xa,
|
|
6642
|
+
dump: Sa
|
|
6643
|
+
}, oo = {
|
|
6509
6644
|
keyword: "behavior",
|
|
6510
6645
|
field: "behaviors",
|
|
6511
6646
|
takesID: !0,
|
|
6512
|
-
parse:
|
|
6513
|
-
dump:
|
|
6514
|
-
},
|
|
6647
|
+
parse: Ca,
|
|
6648
|
+
dump: wa
|
|
6649
|
+
}, so = {
|
|
6515
6650
|
keyword: "condition_set",
|
|
6516
6651
|
field: "conditionSets",
|
|
6517
6652
|
takesID: !0,
|
|
6518
|
-
parse:
|
|
6519
|
-
dump:
|
|
6520
|
-
},
|
|
6653
|
+
parse: Ta,
|
|
6654
|
+
dump: Da
|
|
6655
|
+
}, co = {
|
|
6521
6656
|
keyword: "subject",
|
|
6522
6657
|
field: "subjects",
|
|
6523
6658
|
takesID: !0,
|
|
6524
|
-
parse:
|
|
6525
|
-
resolve:
|
|
6526
|
-
dump:
|
|
6659
|
+
parse: Ua,
|
|
6660
|
+
resolve: Ga,
|
|
6661
|
+
dump: no
|
|
6527
6662
|
};
|
|
6528
6663
|
//#endregion
|
|
6529
6664
|
//#region src/ser-des/config/instance.ts
|
|
6530
|
-
function
|
|
6665
|
+
function lo(e) {
|
|
6531
6666
|
return !e.startsWith("\"") && e.endsWith(":") && e.length > 1;
|
|
6532
6667
|
}
|
|
6533
|
-
function
|
|
6668
|
+
function uo(e) {
|
|
6534
6669
|
let t = {}, r = n(e), o = 0;
|
|
6535
6670
|
for (; o < r.length;) {
|
|
6536
6671
|
let e = P(r[o++]);
|
|
6537
6672
|
if (!e) break;
|
|
6538
6673
|
r[o] === ":" && o++;
|
|
6539
6674
|
let n = [];
|
|
6540
|
-
for (; o < r.length && r[o + 1] !== ":" && !
|
|
6675
|
+
for (; o < r.length && r[o + 1] !== ":" && !lo(r[o]);) n.push(r[o++]);
|
|
6541
6676
|
if (n.length === 0) {
|
|
6542
6677
|
t[e] = { value: "" };
|
|
6543
6678
|
continue;
|
|
@@ -6555,7 +6690,7 @@ function $a(e) {
|
|
|
6555
6690
|
}
|
|
6556
6691
|
return t;
|
|
6557
6692
|
}
|
|
6558
|
-
function
|
|
6693
|
+
function fo(e) {
|
|
6559
6694
|
let t = {}, r = n(e), i = 0;
|
|
6560
6695
|
for (; i < r.length;) {
|
|
6561
6696
|
let e = P(r[i++]);
|
|
@@ -6564,18 +6699,18 @@ function eo(e) {
|
|
|
6564
6699
|
}
|
|
6565
6700
|
return t;
|
|
6566
6701
|
}
|
|
6567
|
-
function
|
|
6702
|
+
function po(e) {
|
|
6568
6703
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
6569
6704
|
}
|
|
6570
|
-
function
|
|
6705
|
+
function mo(e, t) {
|
|
6571
6706
|
let r = n(e), a = 0;
|
|
6572
6707
|
for (; a < r.length;) {
|
|
6573
6708
|
let e = r[a++];
|
|
6574
6709
|
if (a >= r.length) break;
|
|
6575
|
-
e === "attributes" ? t.has.attributes =
|
|
6710
|
+
e === "attributes" ? t.has.attributes = uo(i(r[a++])) : e === "dimensions" ? t.has.dimensions = fo(i(r[a++])) : e === "test_context" ? t.has.testContext = uo(i(r[a++])) : i(r[a++]);
|
|
6576
6711
|
}
|
|
6577
6712
|
}
|
|
6578
|
-
var
|
|
6713
|
+
var ho = function(e, t) {
|
|
6579
6714
|
let n = {
|
|
6580
6715
|
id: e,
|
|
6581
6716
|
of: "",
|
|
@@ -6594,44 +6729,44 @@ var ro = function(e, t) {
|
|
|
6594
6729
|
for (; s < o.length;) {
|
|
6595
6730
|
let e = o[s++];
|
|
6596
6731
|
if (s >= o.length) break;
|
|
6597
|
-
e === "of" ? n.of = a(o[s++]) : e === "level" ? n.level = a(o[s++]) : e === "model" ? n.model = a(o[s++]) : e === "group" ? n.group = a(o[s++]) : e === "family" ? n.family = a(o[s++]) : e === "definition_versions" ? n.definitionVersions =
|
|
6732
|
+
e === "of" ? n.of = a(o[s++]) : e === "level" ? n.level = a(o[s++]) : e === "model" ? n.model = a(o[s++]) : e === "group" ? n.group = a(o[s++]) : e === "family" ? n.family = a(o[s++]) : e === "definition_versions" ? n.definitionVersions = fo(i(o[s++])) : e === "has" ? mo(i(o[s++]), n) : e === "reference" ? n.referenceIds = po(o[s++]) : i(o[s++]);
|
|
6598
6733
|
}
|
|
6599
6734
|
return (t) => (t.instances[e] = n, t);
|
|
6600
6735
|
};
|
|
6601
|
-
function
|
|
6736
|
+
function go(e, t) {
|
|
6602
6737
|
let n = Object.keys(t);
|
|
6603
6738
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + be(t[e])).join(" ") + " }\n";
|
|
6604
6739
|
}
|
|
6605
|
-
function
|
|
6740
|
+
function _o(e, t) {
|
|
6606
6741
|
let n = Object.keys(t);
|
|
6607
6742
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + N(t[e])).join(" ") + " }\n";
|
|
6608
6743
|
}
|
|
6609
|
-
var
|
|
6744
|
+
var vo = {
|
|
6610
6745
|
keyword: "instance",
|
|
6611
6746
|
field: "instances",
|
|
6612
6747
|
takesID: !0,
|
|
6613
|
-
parse:
|
|
6748
|
+
parse: ho,
|
|
6614
6749
|
dump: function(e) {
|
|
6615
6750
|
let t = "instance " + e.id + " {\n";
|
|
6616
6751
|
e.of && (t += " of " + e.of + "\n"), e.level && (t += " level " + e.level + "\n"), e.model && (t += " model " + e.model + "\n"), e.group && (t += " group " + e.group + "\n"), e.family && (t += " family " + e.family + "\n");
|
|
6617
6752
|
let n = Object.keys(e.definitionVersions);
|
|
6618
6753
|
n.length > 0 && (t += " definition_versions { " + n.map((t) => t + " : " + N(e.definitionVersions[t])).join(" ") + " }\n");
|
|
6619
|
-
let r =
|
|
6754
|
+
let r = go("attributes", e.has.attributes) + _o("dimensions", e.has.dimensions) + go("test_context", e.has.testContext);
|
|
6620
6755
|
return r && (t += " has {\n" + r + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
6621
6756
|
}
|
|
6622
6757
|
};
|
|
6623
6758
|
//#endregion
|
|
6624
6759
|
//#region src/ser-des/config/artifact.ts
|
|
6625
|
-
function
|
|
6760
|
+
function yo(e) {
|
|
6626
6761
|
return n(a(e)).map(P).map(a).filter((e) => e.length > 0);
|
|
6627
6762
|
}
|
|
6628
|
-
function
|
|
6763
|
+
function bo(e, t, n) {
|
|
6629
6764
|
return t.length === 0 ? "" : `${n}${e} { ${t.join(" ")} }\n`;
|
|
6630
6765
|
}
|
|
6631
|
-
function
|
|
6766
|
+
function xo(e) {
|
|
6632
6767
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
6633
6768
|
}
|
|
6634
|
-
function
|
|
6769
|
+
function So(e) {
|
|
6635
6770
|
let t = [], r = n(e), i = 0;
|
|
6636
6771
|
for (; i < r.length;) {
|
|
6637
6772
|
let e = P(r[i++]);
|
|
@@ -6651,7 +6786,7 @@ function uo(e) {
|
|
|
6651
6786
|
}
|
|
6652
6787
|
return t;
|
|
6653
6788
|
}
|
|
6654
|
-
function
|
|
6789
|
+
function Co(e) {
|
|
6655
6790
|
let t = [], r = n(e), o = 0;
|
|
6656
6791
|
for (; o < r.length;) {
|
|
6657
6792
|
let e = P(r[o++]);
|
|
@@ -6666,14 +6801,14 @@ function fo(e) {
|
|
|
6666
6801
|
for (; t < e.length;) {
|
|
6667
6802
|
let n = e[t++];
|
|
6668
6803
|
if (t >= e.length) break;
|
|
6669
|
-
n === "kinds" ? s.kinds =
|
|
6804
|
+
n === "kinds" ? s.kinds = yo(e[t++]) : n === "role" ? s.role = a(e[t++]) : i(e[t++]);
|
|
6670
6805
|
}
|
|
6671
6806
|
}
|
|
6672
6807
|
t.push(s);
|
|
6673
6808
|
}
|
|
6674
6809
|
return t;
|
|
6675
6810
|
}
|
|
6676
|
-
function
|
|
6811
|
+
function wo(e) {
|
|
6677
6812
|
let t = {
|
|
6678
6813
|
fields: [],
|
|
6679
6814
|
structure: "",
|
|
@@ -6682,11 +6817,11 @@ function po(e) {
|
|
|
6682
6817
|
for (; o < r.length;) {
|
|
6683
6818
|
let e = r[o++];
|
|
6684
6819
|
if (o >= r.length) break;
|
|
6685
|
-
e === "fields" ? t.fields =
|
|
6820
|
+
e === "fields" ? t.fields = So(i(r[o++])) : e === "structure" ? t.structure = a(r[o++]) : e === "media" ? t.media = Co(i(r[o++])) : o = y(r, o, e);
|
|
6686
6821
|
}
|
|
6687
6822
|
return t;
|
|
6688
6823
|
}
|
|
6689
|
-
var
|
|
6824
|
+
var To = function(e, t) {
|
|
6690
6825
|
let n = {
|
|
6691
6826
|
id: e,
|
|
6692
6827
|
name: "",
|
|
@@ -6706,7 +6841,7 @@ var mo = function(e, t) {
|
|
|
6706
6841
|
if (s >= o.length) break;
|
|
6707
6842
|
if (e === "name") n.name = a(o[s++]);
|
|
6708
6843
|
else if (e === "description") n.description = a(o[s++]);
|
|
6709
|
-
else if (e === "content_contract") n.contentContract =
|
|
6844
|
+
else if (e === "content_contract") n.contentContract = wo(i(o[s++]));
|
|
6710
6845
|
else if (e === "produced_when") {
|
|
6711
6846
|
let e = a(o[s++] ?? "");
|
|
6712
6847
|
n.producedWhen = e === "per_interval" ? {
|
|
@@ -6720,7 +6855,7 @@ var mo = function(e, t) {
|
|
|
6720
6855
|
else if (e === "source") {
|
|
6721
6856
|
let e = I(i(o[s++]));
|
|
6722
6857
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
6723
|
-
} else if (e === "reference") n.referenceIds =
|
|
6858
|
+
} else if (e === "reference") n.referenceIds = xo(o[s++]);
|
|
6724
6859
|
else if (e === "ref") {
|
|
6725
6860
|
let e = S(o, s, a, i);
|
|
6726
6861
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
@@ -6731,10 +6866,10 @@ var mo = function(e, t) {
|
|
|
6731
6866
|
}
|
|
6732
6867
|
return (t) => (t.artifactDefinitions[e] = n, t);
|
|
6733
6868
|
};
|
|
6734
|
-
function
|
|
6869
|
+
function Eo(e) {
|
|
6735
6870
|
return e.kind === "per_interval" ? `per_interval ${N(e.interval ?? "")}` : e.kind === "on_event" ? `on_event ${N(e.event ?? "")}` : e.kind;
|
|
6736
6871
|
}
|
|
6737
|
-
var
|
|
6872
|
+
var Do = function(e) {
|
|
6738
6873
|
let t = "artifact_definition " + e.id + " {\n";
|
|
6739
6874
|
e.name && (t += " name \"" + s(e.name) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n");
|
|
6740
6875
|
let n = e.contentContract;
|
|
@@ -6754,11 +6889,11 @@ var go = function(e) {
|
|
|
6754
6889
|
}
|
|
6755
6890
|
t += " }\n";
|
|
6756
6891
|
}
|
|
6757
|
-
e.producedWhen.kind && (t += " produced_when " +
|
|
6892
|
+
e.producedWhen.kind && (t += " produced_when " + Eo(e.producedWhen) + "\n"), e.retention && (t += " retention \"" + s(e.retention) + "\"\n");
|
|
6758
6893
|
let r = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
6759
6894
|
for (let e of r) t += E(e, " ", s);
|
|
6760
|
-
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t +=
|
|
6761
|
-
},
|
|
6895
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += bo("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6896
|
+
}, Oo = function(e, t) {
|
|
6762
6897
|
let n = {
|
|
6763
6898
|
id: e,
|
|
6764
6899
|
of: "",
|
|
@@ -6771,34 +6906,34 @@ var go = function(e) {
|
|
|
6771
6906
|
for (; s < o.length;) {
|
|
6772
6907
|
let e = o[s++];
|
|
6773
6908
|
if (s >= o.length) break;
|
|
6774
|
-
e === "of" ? n.of = a(o[s++]) : e === "produced_at" ? n.producedAt = a(o[s++]) : e === "by" ? n.by = a(o[s++]) : e === "content" ? n.content =
|
|
6909
|
+
e === "of" ? n.of = a(o[s++]) : e === "produced_at" ? n.producedAt = a(o[s++]) : e === "by" ? n.by = a(o[s++]) : e === "content" ? n.content = uo(i(o[s++])) : e === "links" ? n.links = yo(o[s++]) : e === "reference" ? n.referenceIds = xo(o[s++]) : s = y(o, s, e);
|
|
6775
6910
|
}
|
|
6776
6911
|
return (t) => (t.artifactInstances[e] = n, t);
|
|
6777
|
-
},
|
|
6912
|
+
}, ko = function(e) {
|
|
6778
6913
|
let t = "artifact_instance " + e.id + " {\n";
|
|
6779
6914
|
e.of && (t += " of " + e.of + "\n"), e.producedAt && (t += " produced_at " + N(e.producedAt) + "\n"), e.by && (t += " by " + N(e.by) + "\n");
|
|
6780
6915
|
let n = Object.keys(e.content);
|
|
6781
|
-
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + be(e.content[t])).join(" ") + " }\n"), t +=
|
|
6782
|
-
},
|
|
6916
|
+
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + be(e.content[t])).join(" ") + " }\n"), t += bo("links", e.links, " "), t += bo("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6917
|
+
}, Ao = {
|
|
6783
6918
|
keyword: "artifact_definition",
|
|
6784
6919
|
field: "artifactDefinitions",
|
|
6785
6920
|
takesID: !0,
|
|
6786
|
-
parse:
|
|
6787
|
-
dump:
|
|
6788
|
-
},
|
|
6921
|
+
parse: To,
|
|
6922
|
+
dump: Do
|
|
6923
|
+
}, jo = {
|
|
6789
6924
|
keyword: "artifact_instance",
|
|
6790
6925
|
field: "artifactInstances",
|
|
6791
6926
|
takesID: !0,
|
|
6792
|
-
parse:
|
|
6793
|
-
dump:
|
|
6794
|
-
},
|
|
6795
|
-
function
|
|
6927
|
+
parse: Oo,
|
|
6928
|
+
dump: ko
|
|
6929
|
+
}, Mo = F;
|
|
6930
|
+
function No(e, t) {
|
|
6796
6931
|
let n = e[t] ?? "";
|
|
6797
6932
|
if (n.startsWith("{")) return {
|
|
6798
6933
|
selector: {
|
|
6799
6934
|
kind: "refs",
|
|
6800
6935
|
expression: "",
|
|
6801
|
-
refs:
|
|
6936
|
+
refs: Mo(n)
|
|
6802
6937
|
},
|
|
6803
6938
|
next: t + 1
|
|
6804
6939
|
};
|
|
@@ -6823,7 +6958,7 @@ function So(e, t) {
|
|
|
6823
6958
|
next: t + 1
|
|
6824
6959
|
};
|
|
6825
6960
|
}
|
|
6826
|
-
function
|
|
6961
|
+
function Po(e) {
|
|
6827
6962
|
let t = [], n = se(e), r = 0;
|
|
6828
6963
|
for (; r < n.length;) {
|
|
6829
6964
|
let e = n[r++];
|
|
@@ -6855,7 +6990,7 @@ function Co(e) {
|
|
|
6855
6990
|
}
|
|
6856
6991
|
return t;
|
|
6857
6992
|
}
|
|
6858
|
-
function
|
|
6993
|
+
function Fo(e) {
|
|
6859
6994
|
let t = {
|
|
6860
6995
|
requirements: {
|
|
6861
6996
|
kind: "",
|
|
@@ -6871,13 +7006,13 @@ function wo(e) {
|
|
|
6871
7006
|
for (; r < n.length;) {
|
|
6872
7007
|
let e = n[r++];
|
|
6873
7008
|
if (e === "requirements" || e === "promises") {
|
|
6874
|
-
let i =
|
|
7009
|
+
let i = No(n, r);
|
|
6875
7010
|
t[e] = i.selector, r = i.next;
|
|
6876
7011
|
}
|
|
6877
7012
|
}
|
|
6878
7013
|
return t;
|
|
6879
7014
|
}
|
|
6880
|
-
function
|
|
7015
|
+
function Io(e) {
|
|
6881
7016
|
let t = [], n = se(e), r = 0;
|
|
6882
7017
|
for (; r < n.length;) {
|
|
6883
7018
|
let e = n[r++];
|
|
@@ -6891,7 +7026,7 @@ function To(e) {
|
|
|
6891
7026
|
}
|
|
6892
7027
|
return t;
|
|
6893
7028
|
}
|
|
6894
|
-
function
|
|
7029
|
+
function Lo(e) {
|
|
6895
7030
|
let t = [], n = se(e), r = 0;
|
|
6896
7031
|
for (; r < n.length;) {
|
|
6897
7032
|
let e = n[r++];
|
|
@@ -6905,7 +7040,7 @@ function Eo(e) {
|
|
|
6905
7040
|
}
|
|
6906
7041
|
return t;
|
|
6907
7042
|
}
|
|
6908
|
-
function
|
|
7043
|
+
function Ro(e) {
|
|
6909
7044
|
let t = [], n = r(e), o = 0;
|
|
6910
7045
|
for (; o < n.length;) {
|
|
6911
7046
|
if (n[o++] !== "on") continue;
|
|
@@ -6913,7 +7048,7 @@ function Do(e) {
|
|
|
6913
7048
|
if (o < n.length && n[o].startsWith("{")) {
|
|
6914
7049
|
t.push({
|
|
6915
7050
|
outcome: e,
|
|
6916
|
-
actions:
|
|
7051
|
+
actions: Lo(i(n[o++]))
|
|
6917
7052
|
});
|
|
6918
7053
|
continue;
|
|
6919
7054
|
}
|
|
@@ -6935,7 +7070,7 @@ function Do(e) {
|
|
|
6935
7070
|
}
|
|
6936
7071
|
return t;
|
|
6937
7072
|
}
|
|
6938
|
-
var
|
|
7073
|
+
var zo = function(e, t) {
|
|
6939
7074
|
let n = {
|
|
6940
7075
|
id: e,
|
|
6941
7076
|
over: [],
|
|
@@ -6957,12 +7092,12 @@ var Oo = function(e, t) {
|
|
|
6957
7092
|
referenceIds: []
|
|
6958
7093
|
};
|
|
6959
7094
|
return v(t, (e, t) => {
|
|
6960
|
-
if (e === "over") n.over =
|
|
6961
|
-
else if (e === "triggers") n.triggers =
|
|
6962
|
-
else if (e === "evaluate") n.evaluate =
|
|
6963
|
-
else if (e === "emit") n.emit =
|
|
6964
|
-
else if (e === "escalate") n.escalate =
|
|
6965
|
-
else if (e === "reference") n.referenceIds =
|
|
7095
|
+
if (e === "over") n.over = Mo(t());
|
|
7096
|
+
else if (e === "triggers") n.triggers = Po(i(t()));
|
|
7097
|
+
else if (e === "evaluate") n.evaluate = Fo(i(t()));
|
|
7098
|
+
else if (e === "emit") n.emit = Io(i(t()));
|
|
7099
|
+
else if (e === "escalate") n.escalate = Ro(i(t()));
|
|
7100
|
+
else if (e === "reference") n.referenceIds = Mo(t());
|
|
6966
7101
|
else return !1;
|
|
6967
7102
|
return !0;
|
|
6968
7103
|
}, {
|
|
@@ -6970,46 +7105,46 @@ var Oo = function(e, t) {
|
|
|
6970
7105
|
id: e
|
|
6971
7106
|
}), (t) => (t.monitors[e] = n, t);
|
|
6972
7107
|
};
|
|
6973
|
-
function
|
|
7108
|
+
function Bo(e) {
|
|
6974
7109
|
return e.kind === "timer" ? "every " + N(e.every) : e.kind === "signal" ? "on signal " + N(e.signal) : e.kind === "change" ? "on change " + N(e.aspect) : "on " + N(e.kind);
|
|
6975
7110
|
}
|
|
6976
|
-
function
|
|
7111
|
+
function Vo(e) {
|
|
6977
7112
|
return e.kind === "applicable_to" ? "applicable_to(" + e.expression + ")" : e.kind === "refs" ? "{ " + e.refs.map(N).join(" ") + " }" : N(e.kind);
|
|
6978
7113
|
}
|
|
6979
|
-
function
|
|
7114
|
+
function Ho(e) {
|
|
6980
7115
|
let t = e.actions.map((e) => e.action === "notify" ? "notify " + N(e.role) : N(e.action)).join(" ");
|
|
6981
7116
|
return "on " + N(e.outcome) + " { " + t + " }";
|
|
6982
7117
|
}
|
|
6983
|
-
var
|
|
7118
|
+
var Uo = {
|
|
6984
7119
|
keyword: "monitor",
|
|
6985
7120
|
field: "monitors",
|
|
6986
7121
|
takesID: !0,
|
|
6987
|
-
parse:
|
|
7122
|
+
parse: zo,
|
|
6988
7123
|
dump: function(e) {
|
|
6989
7124
|
let t = "monitor " + e.id + " {\n";
|
|
6990
|
-
e.over.length > 0 && (t += " over { " + e.over.map(N).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(
|
|
7125
|
+
e.over.length > 0 && (t += " over { " + e.over.map(N).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(Bo).join(" ") + " }\n");
|
|
6991
7126
|
let n = e.evaluate.requirements, r = e.evaluate.promises;
|
|
6992
|
-
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " +
|
|
7127
|
+
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " + Vo(n)), r.kind && (t += " promises " + Vo(r)), t += " }\n"), e.emit.length > 0 && (t += " emit { " + e.emit.map((e) => e.stream + " -> " + N(e.target)).join(" ") + " }\n"), e.escalate.length > 0 && (t += " escalate { " + e.escalate.map(Ho).join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(N).join(" ") + " }\n"), t += "}\n", t;
|
|
6993
7128
|
}
|
|
6994
|
-
},
|
|
7129
|
+
}, Wo = [
|
|
6995
7130
|
"identity",
|
|
6996
7131
|
"composition",
|
|
6997
7132
|
"promises_as_verified",
|
|
6998
7133
|
"live_compliance_status",
|
|
6999
7134
|
"artifacts",
|
|
7000
7135
|
"sustainability"
|
|
7001
|
-
],
|
|
7136
|
+
], Go = [
|
|
7002
7137
|
"public",
|
|
7003
7138
|
"restricted",
|
|
7004
7139
|
"authority"
|
|
7005
|
-
],
|
|
7140
|
+
], Ko = [
|
|
7006
7141
|
"model",
|
|
7007
7142
|
"batch",
|
|
7008
7143
|
"item"
|
|
7009
7144
|
];
|
|
7010
7145
|
//#endregion
|
|
7011
7146
|
//#region src/ser-des/config/passport.ts
|
|
7012
|
-
function
|
|
7147
|
+
function qo(e, t) {
|
|
7013
7148
|
return F(t).map((t) => {
|
|
7014
7149
|
let n = t.indexOf(".");
|
|
7015
7150
|
return n === -1 ? {
|
|
@@ -7023,7 +7158,7 @@ function Io(e, t) {
|
|
|
7023
7158
|
};
|
|
7024
7159
|
});
|
|
7025
7160
|
}
|
|
7026
|
-
var
|
|
7161
|
+
var Jo = function(e, t) {
|
|
7027
7162
|
let n = {
|
|
7028
7163
|
id: e,
|
|
7029
7164
|
upi: {
|
|
@@ -7062,8 +7197,8 @@ var Lo = function(e, t) {
|
|
|
7062
7197
|
} else if (t === "reference") n.referenceIds = F(r());
|
|
7063
7198
|
else {
|
|
7064
7199
|
let i = r();
|
|
7065
|
-
if (
|
|
7066
|
-
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${
|
|
7200
|
+
if (Go.includes(t)) n.entries.push(...qo(t, i));
|
|
7201
|
+
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${Go.join(" | ")} (fail-closed: an unknown access class is never served)`);
|
|
7067
7202
|
}
|
|
7068
7203
|
return !0;
|
|
7069
7204
|
}, {
|
|
@@ -7071,26 +7206,26 @@ var Lo = function(e, t) {
|
|
|
7071
7206
|
id: e
|
|
7072
7207
|
}), (t) => (t.passports[e] = n, t);
|
|
7073
7208
|
};
|
|
7074
|
-
function
|
|
7209
|
+
function Yo(e) {
|
|
7075
7210
|
return N(e.ref === "" ? e.contentClass : e.contentClass + "." + e.ref);
|
|
7076
7211
|
}
|
|
7077
|
-
var
|
|
7212
|
+
var Xo = {
|
|
7078
7213
|
keyword: "passport",
|
|
7079
7214
|
field: "passports",
|
|
7080
7215
|
takesID: !0,
|
|
7081
|
-
parse:
|
|
7216
|
+
parse: Jo,
|
|
7082
7217
|
dump: function(e) {
|
|
7083
7218
|
let t = "passport " + e.id + " {\n";
|
|
7084
7219
|
(e.upi.pattern !== "" || e.upi.level !== "") && (t += " upi {", e.upi.pattern !== "" && (t += " pattern " + N(e.upi.pattern)), e.upi.level !== "" && (t += " level " + N(e.upi.level)), t += " }\n");
|
|
7085
7220
|
for (let n of e.carriers) t += " carrier { kind " + N(n.kind) + " payload " + N(n.payload) + " }\n";
|
|
7086
|
-
let n = [...
|
|
7221
|
+
let n = [...Go, ...[...new Set(e.entries.map((e) => e.access))].filter((e) => !Go.includes(e))];
|
|
7087
7222
|
for (let r of n) {
|
|
7088
7223
|
let n = e.entries.filter((e) => e.access === r);
|
|
7089
|
-
n.length > 0 && (t += " " + r + " { " + n.map(
|
|
7224
|
+
n.length > 0 && (t += " " + r + " { " + n.map(Yo).join(" ") + " }\n");
|
|
7090
7225
|
}
|
|
7091
7226
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(N).join(" ") + " }\n"), t += "}\n", t;
|
|
7092
7227
|
}
|
|
7093
|
-
},
|
|
7228
|
+
}, Zo = {
|
|
7094
7229
|
keyword: "invariant",
|
|
7095
7230
|
field: "invariants",
|
|
7096
7231
|
takesID: !0,
|
|
@@ -7130,7 +7265,7 @@ var zo = {
|
|
|
7130
7265
|
};
|
|
7131
7266
|
//#endregion
|
|
7132
7267
|
//#region src/ser-des/config/testSequence.ts
|
|
7133
|
-
function
|
|
7268
|
+
function Qo(e, t, n) {
|
|
7134
7269
|
v(e, (e, n) => {
|
|
7135
7270
|
if (e === "test") t.test = a(n());
|
|
7136
7271
|
else if (e === "phase") t.phase = a(n());
|
|
@@ -7143,7 +7278,7 @@ function Vo(e, t, n) {
|
|
|
7143
7278
|
id: n
|
|
7144
7279
|
});
|
|
7145
7280
|
}
|
|
7146
|
-
var
|
|
7281
|
+
var $o = {
|
|
7147
7282
|
keyword: "test_sequence",
|
|
7148
7283
|
field: "testSequences",
|
|
7149
7284
|
takesID: !0,
|
|
@@ -7177,7 +7312,7 @@ var Ho = {
|
|
|
7177
7312
|
role: "",
|
|
7178
7313
|
dependsOn: null
|
|
7179
7314
|
}, r = o[s++];
|
|
7180
|
-
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") &&
|
|
7315
|
+
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") && Qo(i(r), t, e), n.steps.push(t);
|
|
7181
7316
|
} else s++;
|
|
7182
7317
|
}
|
|
7183
7318
|
return (t) => (t.testSequences[e] = n, t);
|
|
@@ -7191,7 +7326,7 @@ var Ho = {
|
|
|
7191
7326
|
for (let n of e.sourceRefs) t += E(n, " ", s);
|
|
7192
7327
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7193
7328
|
}
|
|
7194
|
-
},
|
|
7329
|
+
}, es = {
|
|
7195
7330
|
keyword: "formulas_used",
|
|
7196
7331
|
field: "formulasUsed",
|
|
7197
7332
|
takesID: !0,
|
|
@@ -7226,7 +7361,7 @@ var Ho = {
|
|
|
7226
7361
|
for (let n of e.sourceRefs) t += E(n, " ", s);
|
|
7227
7362
|
return t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7228
7363
|
}
|
|
7229
|
-
},
|
|
7364
|
+
}, ts = function(e, t) {
|
|
7230
7365
|
let n = {
|
|
7231
7366
|
id: e,
|
|
7232
7367
|
entries: []
|
|
@@ -7255,14 +7390,14 @@ var Ho = {
|
|
|
7255
7390
|
let r = t.texts[e];
|
|
7256
7391
|
return r ? r.entries.push(...n.entries) : t.texts[e] = n, t;
|
|
7257
7392
|
};
|
|
7258
|
-
},
|
|
7393
|
+
}, ns = function(e) {
|
|
7259
7394
|
let t = "text " + e.id + " {\n";
|
|
7260
7395
|
for (let n of e.entries) t += " spell " + n.spelling + (n.via ? " via " + n.via : "") + " \"" + s(n.value) + "\"\n";
|
|
7261
7396
|
return t += "}\n", t;
|
|
7262
7397
|
};
|
|
7263
7398
|
//#endregion
|
|
7264
7399
|
//#region src/ser-des/config/quantityRegister.ts
|
|
7265
|
-
function
|
|
7400
|
+
function rs(e) {
|
|
7266
7401
|
let t = {}, r = n(e);
|
|
7267
7402
|
for (let e = 0; e + 1 < r.length; e += 2) {
|
|
7268
7403
|
let n = P(r[e]), i = Number(r[e + 1]);
|
|
@@ -7270,11 +7405,11 @@ function Ko(e) {
|
|
|
7270
7405
|
}
|
|
7271
7406
|
return t;
|
|
7272
7407
|
}
|
|
7273
|
-
function
|
|
7408
|
+
function is(e, t) {
|
|
7274
7409
|
let n = Number(a(e));
|
|
7275
7410
|
return Number.isNaN(n) ? t : n;
|
|
7276
7411
|
}
|
|
7277
|
-
function
|
|
7412
|
+
function as(e, t) {
|
|
7278
7413
|
let r = {
|
|
7279
7414
|
id: e,
|
|
7280
7415
|
dimensions: {},
|
|
@@ -7284,7 +7419,7 @@ function Jo(e, t) {
|
|
|
7284
7419
|
for (; s < o.length;) {
|
|
7285
7420
|
let e = o[s++];
|
|
7286
7421
|
if (s >= o.length) break;
|
|
7287
|
-
if (e === "dimensions") r.dimensions =
|
|
7422
|
+
if (e === "dimensions") r.dimensions = rs(i(o[s++]));
|
|
7288
7423
|
else if (e === "si_unit") r.siUnit = a(o[s++]);
|
|
7289
7424
|
else if (e === "description") r.description = a(o[s++]);
|
|
7290
7425
|
else if (e === "corresponds") {
|
|
@@ -7294,7 +7429,7 @@ function Jo(e, t) {
|
|
|
7294
7429
|
}
|
|
7295
7430
|
return r;
|
|
7296
7431
|
}
|
|
7297
|
-
function
|
|
7432
|
+
function os(e, t) {
|
|
7298
7433
|
let r = {
|
|
7299
7434
|
id: e,
|
|
7300
7435
|
symbol: "",
|
|
@@ -7310,8 +7445,8 @@ function Yo(e, t) {
|
|
|
7310
7445
|
if (e === "symbol") r.symbol = a(o[s++]);
|
|
7311
7446
|
else if (e === "label") r.label = a(o[s++]);
|
|
7312
7447
|
else if (e === "kind") r.kind = a(o[s++]);
|
|
7313
|
-
else if (e === "factor") r.factorToSI =
|
|
7314
|
-
else if (e === "offset") r.offsetToSI =
|
|
7448
|
+
else if (e === "factor") r.factorToSI = is(o[s++], 1);
|
|
7449
|
+
else if (e === "offset") r.offsetToSI = is(o[s++], 0);
|
|
7315
7450
|
else if (e === "definition") r.definition = a(o[s++]);
|
|
7316
7451
|
else if (e === "corresponds") {
|
|
7317
7452
|
let { corr: e, next: t } = D(o, s, a);
|
|
@@ -7320,7 +7455,7 @@ function Yo(e, t) {
|
|
|
7320
7455
|
}
|
|
7321
7456
|
return r;
|
|
7322
7457
|
}
|
|
7323
|
-
var
|
|
7458
|
+
var ss = function(e, t) {
|
|
7324
7459
|
let o = {
|
|
7325
7460
|
id: e,
|
|
7326
7461
|
kinds: [],
|
|
@@ -7330,11 +7465,11 @@ var Xo = function(e, t) {
|
|
|
7330
7465
|
for (; c < s.length;) {
|
|
7331
7466
|
let e = s[c++];
|
|
7332
7467
|
if (c >= s.length) break;
|
|
7333
|
-
e === "kind" ? o.kinds.push(
|
|
7468
|
+
e === "kind" ? o.kinds.push(as(P(s[c++]), i(s[c++]))) : e === "unit" ? o.units.push(os(P(s[c++]), i(s[c++]))) : e === "reference" ? o.referenceIds = n(a(s[c++])).map(a).filter((e) => e.length > 0) : i(s[c++]);
|
|
7334
7469
|
}
|
|
7335
7470
|
return (t) => (t.quantityRegisters[e] = o, t);
|
|
7336
7471
|
};
|
|
7337
|
-
function
|
|
7472
|
+
function cs(e) {
|
|
7338
7473
|
let t = "";
|
|
7339
7474
|
for (let n of e ?? []) if (t += " corresponds " + N(n.scheme) + " \"" + s(n.concept) + "\"", n.projections.length > 0) {
|
|
7340
7475
|
t += " {";
|
|
@@ -7347,28 +7482,28 @@ function Zo(e) {
|
|
|
7347
7482
|
}
|
|
7348
7483
|
return t;
|
|
7349
7484
|
}
|
|
7350
|
-
function
|
|
7485
|
+
function ls(e) {
|
|
7351
7486
|
let t = Object.keys(e);
|
|
7352
7487
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " " + e[t]).join(" ") + " }";
|
|
7353
7488
|
}
|
|
7354
|
-
var
|
|
7489
|
+
var us = {
|
|
7355
7490
|
keyword: "quantity_register",
|
|
7356
7491
|
field: "quantityRegisters",
|
|
7357
7492
|
takesID: !0,
|
|
7358
|
-
parse:
|
|
7493
|
+
parse: ss,
|
|
7359
7494
|
dump: function(e) {
|
|
7360
7495
|
let t = "quantity_register " + e.id + " {\n";
|
|
7361
7496
|
for (let n of e.kinds) {
|
|
7362
|
-
let e = " kind " + n.id + " {" +
|
|
7363
|
-
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e +=
|
|
7497
|
+
let e = " kind " + n.id + " {" + ls(n.dimensions);
|
|
7498
|
+
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e += cs(n.correspondences), t += e + " }\n";
|
|
7364
7499
|
}
|
|
7365
7500
|
for (let n of e.units) {
|
|
7366
7501
|
let e = " unit " + N(n.id) + " {";
|
|
7367
|
-
n.symbol && (e += " symbol \"" + s(n.symbol) + "\""), n.label && (e += " label \"" + s(n.label) + "\""), n.kind && (e += " kind " + n.kind), n.factorToSI !== 1 && (e += " factor " + n.factorToSI), n.offsetToSI !== 0 && (e += " offset " + n.offsetToSI), n.definition && (e += " definition \"" + s(n.definition) + "\""), e +=
|
|
7502
|
+
n.symbol && (e += " symbol \"" + s(n.symbol) + "\""), n.label && (e += " label \"" + s(n.label) + "\""), n.kind && (e += " kind " + n.kind), n.factorToSI !== 1 && (e += " factor " + n.factorToSI), n.offsetToSI !== 0 && (e += " offset " + n.offsetToSI), n.definition && (e += " definition \"" + s(n.definition) + "\""), e += cs(n.correspondences), t += e + " }\n";
|
|
7368
7503
|
}
|
|
7369
7504
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
7370
7505
|
}
|
|
7371
|
-
},
|
|
7506
|
+
}, ds = {
|
|
7372
7507
|
keyword: "dual",
|
|
7373
7508
|
field: "duals",
|
|
7374
7509
|
takesID: !0,
|
|
@@ -7392,18 +7527,18 @@ var $o = {
|
|
|
7392
7527
|
};
|
|
7393
7528
|
//#endregion
|
|
7394
7529
|
//#region src/ser-des/config/trustRef.ts
|
|
7395
|
-
function
|
|
7530
|
+
function fs(e, t, n) {
|
|
7396
7531
|
let r = {
|
|
7397
7532
|
org: n(e()),
|
|
7398
7533
|
kid: ""
|
|
7399
7534
|
};
|
|
7400
7535
|
return t() === "key" && (e(), r.kid = n(e())), r;
|
|
7401
7536
|
}
|
|
7402
|
-
function
|
|
7537
|
+
function ps(e, t, n) {
|
|
7403
7538
|
let r = `${t}trust_ref ${n(e.org)}`;
|
|
7404
7539
|
return e.kid !== "" && (r += ` key ${n(e.kid)}`), r + "\n";
|
|
7405
7540
|
}
|
|
7406
|
-
var
|
|
7541
|
+
var ms = {
|
|
7407
7542
|
keyword: "dataspace",
|
|
7408
7543
|
field: "dataspaces",
|
|
7409
7544
|
takesID: !0,
|
|
@@ -7468,7 +7603,7 @@ var rs = {
|
|
|
7468
7603
|
description: ""
|
|
7469
7604
|
}, o = r();
|
|
7470
7605
|
o && o.startsWith("{") && v(i(t()), (t, n, r) => {
|
|
7471
|
-
if (t === "trust_ref") e.trustRef =
|
|
7606
|
+
if (t === "trust_ref") e.trustRef = fs(n, r, a);
|
|
7472
7607
|
else if (t === "role") e.role = a(n());
|
|
7473
7608
|
else if (t === "description") e.description = x(n);
|
|
7474
7609
|
else return !1;
|
|
@@ -7498,17 +7633,17 @@ var rs = {
|
|
|
7498
7633
|
for (let n of e.participantClasses) t += " participant_class " + N(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7499
7634
|
for (let n of e.artifactClasses) t += " artifact_class " + N(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.element && (t += " element " + N(n.element) + "\n"), n.policy && (t += " policy " + N(n.policy) + "\n"), t += " }\n";
|
|
7500
7635
|
e.policies.length > 0 && (t += " policies { " + e.policies.map(N).join(" ") + " }\n"), e.defaultPolicy && (t += " default_policy " + N(e.defaultPolicy) + "\n");
|
|
7501
|
-
for (let n of e.trustAnchors) t += " trust_anchor " + N(n.id) + " {\n", n.trustRef && (t +=
|
|
7636
|
+
for (let n of e.trustAnchors) t += " trust_anchor " + N(n.id) + " {\n", n.trustRef && (t += ps(n.trustRef, " ", N)), n.role && (t += " role " + N(n.role) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7502
7637
|
e.compatibleWith.length > 0 && (t += " compatible_with { " + e.compatibleWith.map(N).join(" ") + " }\n");
|
|
7503
7638
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
7504
7639
|
for (let e of n) t += E(e, " ", s);
|
|
7505
7640
|
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7506
7641
|
}
|
|
7507
|
-
},
|
|
7642
|
+
}, hs = [
|
|
7508
7643
|
"permission",
|
|
7509
7644
|
"obligation",
|
|
7510
7645
|
"prohibition"
|
|
7511
|
-
],
|
|
7646
|
+
], gs = {
|
|
7512
7647
|
keyword: "policy",
|
|
7513
7648
|
field: "policies",
|
|
7514
7649
|
takesID: !0,
|
|
@@ -7542,7 +7677,7 @@ var rs = {
|
|
|
7542
7677
|
t && t.startsWith("{") && v(i(r()), (t, n) => {
|
|
7543
7678
|
if (t === "kind") {
|
|
7544
7679
|
let t = a(n());
|
|
7545
|
-
if (!
|
|
7680
|
+
if (!hs.includes(t)) throw Error(`Parsing error: policy.rule. ID ${e.id}: unknown rule kind "${t}" — rule kinds are ${hs.join(" | ")} (fail-closed: a misspelt kind never parses into a rule that says nothing)`);
|
|
7546
7681
|
e.kind = t;
|
|
7547
7682
|
} else if (t === "action") e.action = a(n());
|
|
7548
7683
|
else if (t === "artifact") e.artifact = a(n());
|
|
@@ -7579,18 +7714,18 @@ var rs = {
|
|
|
7579
7714
|
for (let e of n) t += E(e, " ", s);
|
|
7580
7715
|
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7581
7716
|
}
|
|
7582
|
-
},
|
|
7717
|
+
}, _s = {
|
|
7583
7718
|
keyword: "dimension",
|
|
7584
7719
|
field: "dimensions",
|
|
7585
7720
|
takesID: !0,
|
|
7586
7721
|
parse: function(e, t) {
|
|
7587
|
-
let n =
|
|
7722
|
+
let n = fa(e, i(t));
|
|
7588
7723
|
return (t) => (t.dimensions[e] = n, t);
|
|
7589
7724
|
},
|
|
7590
7725
|
dump: function(e) {
|
|
7591
|
-
return
|
|
7726
|
+
return ma(e, "");
|
|
7592
7727
|
}
|
|
7593
|
-
},
|
|
7728
|
+
}, vs = (e, t) => {
|
|
7594
7729
|
let n = {
|
|
7595
7730
|
id: e,
|
|
7596
7731
|
label: "",
|
|
@@ -7609,13 +7744,13 @@ var rs = {
|
|
|
7609
7744
|
construct: "activity_archetype",
|
|
7610
7745
|
id: e
|
|
7611
7746
|
}), (t) => (t.activityArchetypes[e] = n, t);
|
|
7612
|
-
},
|
|
7747
|
+
}, ys = function(e) {
|
|
7613
7748
|
let t = "activity_archetype " + e.id + " {\n";
|
|
7614
7749
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.parent && (t += " parent " + N(e.parent) + "\n"), t += "}\n", t;
|
|
7615
7750
|
};
|
|
7616
7751
|
//#endregion
|
|
7617
7752
|
//#region src/ser-des/config/participantKind.ts
|
|
7618
|
-
function
|
|
7753
|
+
function bs(e) {
|
|
7619
7754
|
let t = {
|
|
7620
7755
|
delegates_to: "",
|
|
7621
7756
|
clause: "",
|
|
@@ -7632,7 +7767,7 @@ function ls(e) {
|
|
|
7632
7767
|
id: ""
|
|
7633
7768
|
}), t;
|
|
7634
7769
|
}
|
|
7635
|
-
function
|
|
7770
|
+
function xs(e) {
|
|
7636
7771
|
let t = {
|
|
7637
7772
|
decided_by: "",
|
|
7638
7773
|
on_recommendation_of: "",
|
|
@@ -7651,7 +7786,7 @@ function us(e) {
|
|
|
7651
7786
|
id: ""
|
|
7652
7787
|
}), t;
|
|
7653
7788
|
}
|
|
7654
|
-
function
|
|
7789
|
+
function Ss(e, t) {
|
|
7655
7790
|
let n = {
|
|
7656
7791
|
id: e,
|
|
7657
7792
|
label: "",
|
|
@@ -7675,7 +7810,7 @@ function ds(e, t) {
|
|
|
7675
7810
|
id: e
|
|
7676
7811
|
}), n;
|
|
7677
7812
|
}
|
|
7678
|
-
var
|
|
7813
|
+
var Cs = (e, t) => {
|
|
7679
7814
|
let n = {
|
|
7680
7815
|
id: e,
|
|
7681
7816
|
label: "",
|
|
@@ -7703,8 +7838,8 @@ var fs = (e, t) => {
|
|
|
7703
7838
|
else if (t === "clause") n.clause = a(r());
|
|
7704
7839
|
else if (t === "definition") n.definition = a(r());
|
|
7705
7840
|
else if (t === "member") n.member = a(r());
|
|
7706
|
-
else if (t === "competence") n.competence =
|
|
7707
|
-
else if (t === "approval") n.approval =
|
|
7841
|
+
else if (t === "competence") n.competence = bs(i(r()));
|
|
7842
|
+
else if (t === "approval") n.approval = xs(i(r()));
|
|
7708
7843
|
else if (t === "approved_by") n.approved_by = a(r());
|
|
7709
7844
|
else if (t === "designated_by") n.designated_by = a(r());
|
|
7710
7845
|
else if (t === "declaration") n.declaration = a(r());
|
|
@@ -7714,7 +7849,7 @@ var fs = (e, t) => {
|
|
|
7714
7849
|
else if (t === "subkind") {
|
|
7715
7850
|
let t = a(r()), s = o();
|
|
7716
7851
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: participant_kind. ID ${e}: subkind ${t} is missing its block`);
|
|
7717
|
-
n.subkinds.push(
|
|
7852
|
+
n.subkinds.push(Ss(t, i(r())));
|
|
7718
7853
|
} else if (t === "source") n.source = I(i(r()));
|
|
7719
7854
|
else return !1;
|
|
7720
7855
|
return !0;
|
|
@@ -7723,24 +7858,24 @@ var fs = (e, t) => {
|
|
|
7723
7858
|
id: e
|
|
7724
7859
|
}), (t) => (t.participantKinds[e] = n, t);
|
|
7725
7860
|
};
|
|
7726
|
-
function
|
|
7861
|
+
function ws(e) {
|
|
7727
7862
|
let t = " competence {\n";
|
|
7728
7863
|
return e.delegates_to && (t += " delegates_to " + N(e.delegates_to) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += " }\n", t;
|
|
7729
7864
|
}
|
|
7730
|
-
function
|
|
7865
|
+
function Ts(e) {
|
|
7731
7866
|
let t = " approval {\n";
|
|
7732
7867
|
return e.decided_by && (t += " decided_by " + N(e.decided_by) + "\n"), e.on_recommendation_of && (t += " on_recommendation_of " + N(e.on_recommendation_of) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7733
7868
|
}
|
|
7734
|
-
function
|
|
7869
|
+
function Es(e) {
|
|
7735
7870
|
let t = " subkind " + N(e.id) + " {\n";
|
|
7736
7871
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.data_flag && (t += " data_flag \"" + s(e.data_flag) + "\"\n"), e.acceptance && (t += " acceptance " + N(e.acceptance) + "\n"), e.acceptance_note && (t += " acceptance_note \"" + s(e.acceptance_note) + "\"\n"), t += " }\n", t;
|
|
7737
7872
|
}
|
|
7738
|
-
var
|
|
7873
|
+
var Ds = function(e) {
|
|
7739
7874
|
let t = "participant_kind " + e.id + " {\n";
|
|
7740
|
-
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + N(e.member) + "\n"), e.competence && (t +=
|
|
7741
|
-
for (let n of e.subkinds) t +=
|
|
7875
|
+
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + N(e.member) + "\n"), e.competence && (t += ws(e.competence)), e.approval && (t += Ts(e.approval)), e.approved_by && (t += " approved_by " + N(e.approved_by) + "\n"), e.designated_by && (t += " designated_by " + N(e.designated_by) + "\n"), e.declaration && (t += " declaration " + N(e.declaration) + "\n"), e.admission && (t += " admission \"" + s(e.admission) + "\"\n"), e.becomes && (t += " becomes " + N(e.becomes) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n");
|
|
7876
|
+
for (let n of e.subkinds) t += Es(n);
|
|
7742
7877
|
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
7743
|
-
},
|
|
7878
|
+
}, Os = (e, t) => {
|
|
7744
7879
|
let n = {
|
|
7745
7880
|
id: e,
|
|
7746
7881
|
label: "",
|
|
@@ -7768,13 +7903,13 @@ var gs = function(e) {
|
|
|
7768
7903
|
construct: "governance_organ",
|
|
7769
7904
|
id: e
|
|
7770
7905
|
}), (t) => (t.governanceOrgans[e] = n, t);
|
|
7771
|
-
},
|
|
7906
|
+
}, ks = function(e) {
|
|
7772
7907
|
let t = "governance_organ " + e.id + " {\n";
|
|
7773
7908
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.mandate && (t += " mandate \"" + s(e.mandate) + "\"\n"), e.sub_committee_of && (t += " sub_committee_of " + N(e.sub_committee_of) + "\n"), e.independent_of && (t += " independent_of " + N(e.independent_of) + "\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
7774
7909
|
};
|
|
7775
7910
|
//#endregion
|
|
7776
7911
|
//#region src/ser-des/config/declaration.ts
|
|
7777
|
-
function
|
|
7912
|
+
function As(e, t) {
|
|
7778
7913
|
let n = {
|
|
7779
7914
|
id: e,
|
|
7780
7915
|
clause: "",
|
|
@@ -7790,7 +7925,7 @@ function ys(e, t) {
|
|
|
7790
7925
|
id: e
|
|
7791
7926
|
}), n;
|
|
7792
7927
|
}
|
|
7793
|
-
var
|
|
7928
|
+
var js = (e, t) => {
|
|
7794
7929
|
let n = {
|
|
7795
7930
|
id: e,
|
|
7796
7931
|
label: "",
|
|
@@ -7817,7 +7952,7 @@ var bs = (e, t) => {
|
|
|
7817
7952
|
else if (t === "content") {
|
|
7818
7953
|
let t = a(r()), s = o();
|
|
7819
7954
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: declaration_kind. ID ${e}: content ${t} is missing its block`);
|
|
7820
|
-
n.content.push(
|
|
7955
|
+
n.content.push(As(t, i(r())));
|
|
7821
7956
|
} else if (t === "source") n.source = I(i(r()));
|
|
7822
7957
|
else return !1;
|
|
7823
7958
|
return !0;
|
|
@@ -7826,20 +7961,20 @@ var bs = (e, t) => {
|
|
|
7826
7961
|
id: e
|
|
7827
7962
|
}), (t) => (t.declarationKinds[e] = n, t);
|
|
7828
7963
|
};
|
|
7829
|
-
function
|
|
7964
|
+
function Ms(e) {
|
|
7830
7965
|
let t = " content " + N(e.id) + " {\n";
|
|
7831
7966
|
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), t += " }\n", t;
|
|
7832
7967
|
}
|
|
7833
|
-
function
|
|
7968
|
+
function Ns(e) {
|
|
7834
7969
|
let t = " source {\n";
|
|
7835
7970
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7836
7971
|
}
|
|
7837
|
-
var
|
|
7972
|
+
var Ps = function(e) {
|
|
7838
7973
|
let t = "declaration_kind " + e.id + " {\n";
|
|
7839
7974
|
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.holder && (t += " holder " + N(e.holder) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.scope_model && (t += " scope_model " + N(e.scope_model) + "\n"), e.scheme_a_obligation && (t += " scheme_a_obligation \"" + s(e.scheme_a_obligation) + "\"\n");
|
|
7840
|
-
for (let n of e.content) t +=
|
|
7841
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
7842
|
-
},
|
|
7975
|
+
for (let n of e.content) t += Ms(n);
|
|
7976
|
+
return (e.source.doc || e.source.clause) && (t += Ns(e.source)), t += "}\n", t;
|
|
7977
|
+
}, Fs = (e, t) => {
|
|
7843
7978
|
let n = {
|
|
7844
7979
|
id: e,
|
|
7845
7980
|
description: ""
|
|
@@ -7852,10 +7987,10 @@ var Cs = function(e) {
|
|
|
7852
7987
|
construct: "declaration_status",
|
|
7853
7988
|
id: e
|
|
7854
7989
|
}), (t) => (t.declarationStatuses[e] = n, t);
|
|
7855
|
-
},
|
|
7990
|
+
}, Is = function(e) {
|
|
7856
7991
|
let t = "declaration_status " + e.id + " {\n";
|
|
7857
7992
|
return e.description && (t += " description \"" + s(e.description) + "\"\n"), t += "}\n", t;
|
|
7858
|
-
},
|
|
7993
|
+
}, Ls = (e, t) => {
|
|
7859
7994
|
let n = {
|
|
7860
7995
|
id: e,
|
|
7861
7996
|
clause: "",
|
|
@@ -7885,13 +8020,13 @@ var Cs = function(e) {
|
|
|
7885
8020
|
construct: "declaration_gate",
|
|
7886
8021
|
id: e
|
|
7887
8022
|
}), (t) => (t.declarationGates[e] = n, t);
|
|
7888
|
-
},
|
|
8023
|
+
}, Rs = function(e) {
|
|
7889
8024
|
let t = "declaration_gate " + e.id + " {\n";
|
|
7890
|
-
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + N(e.holder) + "\n"), e.declaration && (t += " declaration " + N(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(N).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(N).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t +=
|
|
8025
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + N(e.holder) + "\n"), e.declaration && (t += " declaration " + N(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(N).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(N).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t += Ns(e.source)), t += "}\n", t;
|
|
7891
8026
|
};
|
|
7892
8027
|
//#endregion
|
|
7893
8028
|
//#region src/ser-des/config/scheme.ts
|
|
7894
|
-
function
|
|
8029
|
+
function zs(e) {
|
|
7895
8030
|
let t = {
|
|
7896
8031
|
method: "",
|
|
7897
8032
|
clause: "",
|
|
@@ -7910,7 +8045,7 @@ function Os(e) {
|
|
|
7910
8045
|
id: ""
|
|
7911
8046
|
}), t;
|
|
7912
8047
|
}
|
|
7913
|
-
var
|
|
8048
|
+
var Bs = (e, t) => {
|
|
7914
8049
|
let n = {
|
|
7915
8050
|
id: e,
|
|
7916
8051
|
label: "",
|
|
@@ -7928,7 +8063,7 @@ var ks = (e, t) => {
|
|
|
7928
8063
|
else if (e === "term") n.term = a(t());
|
|
7929
8064
|
else if (e === "clause") n.clause = a(t());
|
|
7930
8065
|
else if (e === "definition") n.definition = a(t());
|
|
7931
|
-
else if (e === "demonstration") n.demonstration =
|
|
8066
|
+
else if (e === "demonstration") n.demonstration = zs(i(t()));
|
|
7932
8067
|
else if (e === "source") n.source = I(i(t()));
|
|
7933
8068
|
else return !1;
|
|
7934
8069
|
return !0;
|
|
@@ -7937,19 +8072,19 @@ var ks = (e, t) => {
|
|
|
7937
8072
|
id: e
|
|
7938
8073
|
}), (t) => (t.schemeDefinitions[e] = n, t);
|
|
7939
8074
|
};
|
|
7940
|
-
function
|
|
8075
|
+
function Vs(e) {
|
|
7941
8076
|
let t = " source {\n";
|
|
7942
8077
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7943
8078
|
}
|
|
7944
|
-
var
|
|
8079
|
+
var Hs = function(e) {
|
|
7945
8080
|
let t = "scheme_definition " + e.id + " {\n";
|
|
7946
8081
|
if (e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.demonstration) {
|
|
7947
8082
|
let n = e.demonstration;
|
|
7948
8083
|
t += " demonstration {\n", n.method && (t += " method " + N(n.method) + "\n"), n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.basis.length > 0 && (t += " basis { " + n.basis.map(N).join(" ") + " }\n"), n.note && (t += " note \"" + s(n.note) + "\"\n"), t += " }\n";
|
|
7949
8084
|
}
|
|
7950
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
8085
|
+
return (e.source.doc || e.source.clause) && (t += Vs(e.source)), t += "}\n", t;
|
|
7951
8086
|
};
|
|
7952
|
-
function
|
|
8087
|
+
function Us(e) {
|
|
7953
8088
|
let t = {
|
|
7954
8089
|
action: "",
|
|
7955
8090
|
automatic: !1,
|
|
@@ -7970,7 +8105,7 @@ function Ms(e) {
|
|
|
7970
8105
|
id: ""
|
|
7971
8106
|
}), t;
|
|
7972
8107
|
}
|
|
7973
|
-
function
|
|
8108
|
+
function Ws(e) {
|
|
7974
8109
|
let t = {
|
|
7975
8110
|
clause: "",
|
|
7976
8111
|
decided_by: "",
|
|
@@ -7989,7 +8124,7 @@ function Ns(e) {
|
|
|
7989
8124
|
id: ""
|
|
7990
8125
|
}), t;
|
|
7991
8126
|
}
|
|
7992
|
-
function
|
|
8127
|
+
function Gs(e, t) {
|
|
7993
8128
|
let n = {
|
|
7994
8129
|
id: e,
|
|
7995
8130
|
kind: "",
|
|
@@ -8018,7 +8153,7 @@ function Ps(e, t) {
|
|
|
8018
8153
|
id: e
|
|
8019
8154
|
}), n;
|
|
8020
8155
|
}
|
|
8021
|
-
var
|
|
8156
|
+
var Ks = (e, t) => {
|
|
8022
8157
|
let n = {
|
|
8023
8158
|
id: e,
|
|
8024
8159
|
applies_to: "",
|
|
@@ -8034,7 +8169,7 @@ var Fs = (e, t) => {
|
|
|
8034
8169
|
return v(t, (t, r, o) => {
|
|
8035
8170
|
if (t === "applies_to") n.applies_to = a(r());
|
|
8036
8171
|
else if (t === "initial") n.initial = a(r());
|
|
8037
|
-
else if (t === "entry") n.entry =
|
|
8172
|
+
else if (t === "entry") n.entry = Us(i(r()));
|
|
8038
8173
|
else if (t === "transition") {
|
|
8039
8174
|
let t = a(r()), s = o();
|
|
8040
8175
|
if (s === void 0 || s !== "->" && s !== "→") throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} is missing its '->'`);
|
|
@@ -8043,7 +8178,7 @@ var Fs = (e, t) => {
|
|
|
8043
8178
|
o() === "action" && (r(), l = a(r()));
|
|
8044
8179
|
let u = o();
|
|
8045
8180
|
if (u === void 0 || !u.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} -> ${c} is missing its block`);
|
|
8046
|
-
let d =
|
|
8181
|
+
let d = Ws(i(r()));
|
|
8047
8182
|
n.transitions.push({
|
|
8048
8183
|
from: t,
|
|
8049
8184
|
to: c,
|
|
@@ -8053,7 +8188,7 @@ var Fs = (e, t) => {
|
|
|
8053
8188
|
} else if (t === "trigger") {
|
|
8054
8189
|
let t = a(r()), s = o();
|
|
8055
8190
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: trigger ${t} is missing its block`);
|
|
8056
|
-
n.triggers.push(
|
|
8191
|
+
n.triggers.push(Gs(t, i(r())));
|
|
8057
8192
|
} else if (t === "source") n.source = I(i(r()));
|
|
8058
8193
|
else return !1;
|
|
8059
8194
|
return !0;
|
|
@@ -8061,7 +8196,7 @@ var Fs = (e, t) => {
|
|
|
8061
8196
|
construct: "scheme_lifecycle",
|
|
8062
8197
|
id: e
|
|
8063
8198
|
}), (t) => (t.schemeLifecycles[e] = n, t);
|
|
8064
|
-
},
|
|
8199
|
+
}, qs = function(e) {
|
|
8065
8200
|
let t = "scheme_lifecycle " + e.id + " {\n";
|
|
8066
8201
|
if (e.applies_to && (t += " applies_to " + N(e.applies_to) + "\n"), e.initial && (t += " initial " + N(e.initial) + "\n"), e.entry) {
|
|
8067
8202
|
let n = e.entry;
|
|
@@ -8075,15 +8210,15 @@ var Fs = (e, t) => {
|
|
|
8075
8210
|
}
|
|
8076
8211
|
n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.deferrable && (t += " deferrable true\n"), n.deferral_note && (t += " deferral_note \"" + s(n.deferral_note) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
8077
8212
|
}
|
|
8078
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
8213
|
+
return (e.source.doc || e.source.clause) && (t += Vs(e.source)), t += "}\n", t;
|
|
8079
8214
|
};
|
|
8080
8215
|
//#endregion
|
|
8081
8216
|
//#region src/ser-des/config/frameworkDocument.ts
|
|
8082
|
-
function
|
|
8217
|
+
function Js(e) {
|
|
8083
8218
|
let t = " source {\n";
|
|
8084
8219
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
8085
8220
|
}
|
|
8086
|
-
var
|
|
8221
|
+
var Ys = (e, t) => {
|
|
8087
8222
|
let n = {
|
|
8088
8223
|
id: e,
|
|
8089
8224
|
rank: 0,
|
|
@@ -8111,10 +8246,10 @@ var Rs = (e, t) => {
|
|
|
8111
8246
|
construct: "framework_document",
|
|
8112
8247
|
id: e
|
|
8113
8248
|
}), (t) => (t.frameworkDocuments[e] = n, t);
|
|
8114
|
-
},
|
|
8249
|
+
}, Xs = function(e) {
|
|
8115
8250
|
let t = "framework_document " + e.id + " {\n";
|
|
8116
|
-
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + N(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
8117
|
-
},
|
|
8251
|
+
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + N(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += Js(e.source)), t += "}\n", t;
|
|
8252
|
+
}, Zs = (e, t) => {
|
|
8118
8253
|
let n = {
|
|
8119
8254
|
id: e,
|
|
8120
8255
|
clause: "",
|
|
@@ -8134,11 +8269,11 @@ var Rs = (e, t) => {
|
|
|
8134
8269
|
construct: "document_precedence",
|
|
8135
8270
|
id: e
|
|
8136
8271
|
}), (t) => (t.documentPrecedences[e] = n, t);
|
|
8137
|
-
},
|
|
8272
|
+
}, Qs = function(e) {
|
|
8138
8273
|
let t = "document_precedence " + e.id + " {\n";
|
|
8139
|
-
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
8274
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t += Js(e.source)), t += "}\n", t;
|
|
8140
8275
|
};
|
|
8141
|
-
function
|
|
8276
|
+
function $s(e, t) {
|
|
8142
8277
|
let n = {
|
|
8143
8278
|
id: e,
|
|
8144
8279
|
clause: "",
|
|
@@ -8154,7 +8289,7 @@ function Hs(e, t) {
|
|
|
8154
8289
|
id: e
|
|
8155
8290
|
}), n;
|
|
8156
8291
|
}
|
|
8157
|
-
var
|
|
8292
|
+
var ec = (e, t) => {
|
|
8158
8293
|
let n = {
|
|
8159
8294
|
id: e,
|
|
8160
8295
|
clause: "",
|
|
@@ -8172,7 +8307,7 @@ var Us = (e, t) => {
|
|
|
8172
8307
|
else if (t === "condition") {
|
|
8173
8308
|
let t = a(r()), s = o();
|
|
8174
8309
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: auto_inclusion. ID ${e}: condition ${t} is missing its block`);
|
|
8175
|
-
n.conditions.push(
|
|
8310
|
+
n.conditions.push($s(t, i(r())));
|
|
8176
8311
|
} else if (t === "note") n.note = a(r());
|
|
8177
8312
|
else if (t === "source") n.source = I(i(r()));
|
|
8178
8313
|
else return !1;
|
|
@@ -8181,15 +8316,15 @@ var Us = (e, t) => {
|
|
|
8181
8316
|
construct: "auto_inclusion",
|
|
8182
8317
|
id: e
|
|
8183
8318
|
}), (t) => (t.autoInclusions[e] = n, t);
|
|
8184
|
-
},
|
|
8319
|
+
}, tc = function(e) {
|
|
8185
8320
|
let t = "auto_inclusion " + e.id + " {\n";
|
|
8186
8321
|
e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n");
|
|
8187
8322
|
for (let n of e.conditions) t += " condition " + N(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
8188
|
-
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
8323
|
+
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += Js(e.source)), t += "}\n", t;
|
|
8189
8324
|
};
|
|
8190
8325
|
//#endregion
|
|
8191
8326
|
//#region src/ser-des/config/decisionRule.ts
|
|
8192
|
-
function
|
|
8327
|
+
function nc(e) {
|
|
8193
8328
|
let t = {
|
|
8194
8329
|
threshold: 0,
|
|
8195
8330
|
base: "",
|
|
@@ -8208,7 +8343,7 @@ function Gs(e) {
|
|
|
8208
8343
|
id: ""
|
|
8209
8344
|
}), t;
|
|
8210
8345
|
}
|
|
8211
|
-
function
|
|
8346
|
+
function rc(e) {
|
|
8212
8347
|
let t = {
|
|
8213
8348
|
in_meeting: 0,
|
|
8214
8349
|
by_correspondence: "",
|
|
@@ -8225,7 +8360,7 @@ function Ks(e) {
|
|
|
8225
8360
|
id: ""
|
|
8226
8361
|
}), t;
|
|
8227
8362
|
}
|
|
8228
|
-
function
|
|
8363
|
+
function ic(e) {
|
|
8229
8364
|
let t = {
|
|
8230
8365
|
in_meeting: null,
|
|
8231
8366
|
by_correspondence: null,
|
|
@@ -8235,9 +8370,9 @@ function qs(e) {
|
|
|
8235
8370
|
reason_on_against_or_abstain: !1
|
|
8236
8371
|
};
|
|
8237
8372
|
return v(e, (e, n) => {
|
|
8238
|
-
if (e === "in_meeting") t.in_meeting =
|
|
8239
|
-
else if (e === "by_correspondence") t.by_correspondence =
|
|
8240
|
-
else if (e === "other_proposals") t.other_proposals =
|
|
8373
|
+
if (e === "in_meeting") t.in_meeting = nc(i(n()));
|
|
8374
|
+
else if (e === "by_correspondence") t.by_correspondence = nc(i(n()));
|
|
8375
|
+
else if (e === "other_proposals") t.other_proposals = rc(i(n()));
|
|
8241
8376
|
else if (e === "proxies_max") t.proxies_max = parseInt(a(n()), 10) || 0;
|
|
8242
8377
|
else if (e === "abstentions") t.abstentions = a(n());
|
|
8243
8378
|
else if (e === "reason_on_against_or_abstain") t.reason_on_against_or_abstain = n() === "true";
|
|
@@ -8248,7 +8383,7 @@ function qs(e) {
|
|
|
8248
8383
|
id: ""
|
|
8249
8384
|
}), t;
|
|
8250
8385
|
}
|
|
8251
|
-
function
|
|
8386
|
+
function ac(e, t) {
|
|
8252
8387
|
let n = {
|
|
8253
8388
|
id: e,
|
|
8254
8389
|
clause: "",
|
|
@@ -8264,10 +8399,10 @@ function Js(e, t) {
|
|
|
8264
8399
|
id: e
|
|
8265
8400
|
}), n;
|
|
8266
8401
|
}
|
|
8267
|
-
function
|
|
8402
|
+
function oc(e) {
|
|
8268
8403
|
return r(i(e)).filter((e) => e.length > 0);
|
|
8269
8404
|
}
|
|
8270
|
-
var
|
|
8405
|
+
var sc = (e, t) => {
|
|
8271
8406
|
let n = {
|
|
8272
8407
|
id: e,
|
|
8273
8408
|
organ: "",
|
|
@@ -8296,17 +8431,17 @@ var Xs = (e, t) => {
|
|
|
8296
8431
|
else if (t === "description") n.description = a(r());
|
|
8297
8432
|
else if (t === "on_recommendation_of") n.on_recommendation_of = a(r());
|
|
8298
8433
|
else if (t === "independent_of") n.independent_of = a(r());
|
|
8299
|
-
else if (t === "decides") n.decides =
|
|
8300
|
-
else if (t === "voting") n.voting =
|
|
8301
|
-
else if (t === "tasks") n.tasks =
|
|
8302
|
-
else if (t === "scope") n.scope =
|
|
8434
|
+
else if (t === "decides") n.decides = oc(r());
|
|
8435
|
+
else if (t === "voting") n.voting = ic(i(r()));
|
|
8436
|
+
else if (t === "tasks") n.tasks = oc(r());
|
|
8437
|
+
else if (t === "scope") n.scope = oc(r());
|
|
8303
8438
|
else if (t === "principle") n.principle = a(r());
|
|
8304
8439
|
else if (t === "legacy_kind") {
|
|
8305
8440
|
let t = a(r()), s = o();
|
|
8306
8441
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: decision_rule. ID ${e}: legacy_kind ${t} is missing its block`);
|
|
8307
|
-
n.legacy_kinds.push(
|
|
8442
|
+
n.legacy_kinds.push(ac(t, i(r())));
|
|
8308
8443
|
} else if (t === "income") n.income = a(r());
|
|
8309
|
-
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for =
|
|
8444
|
+
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for = oc(r());
|
|
8310
8445
|
else if (t === "source") n.source = I(i(r()));
|
|
8311
8446
|
else return !1;
|
|
8312
8447
|
return !0;
|
|
@@ -8315,27 +8450,27 @@ var Xs = (e, t) => {
|
|
|
8315
8450
|
id: e
|
|
8316
8451
|
}), (t) => (t.decisionRules[e] = n, t);
|
|
8317
8452
|
};
|
|
8318
|
-
function
|
|
8453
|
+
function cc(e, t) {
|
|
8319
8454
|
let n = " " + e + " {\n";
|
|
8320
8455
|
return t.threshold > 0 && (n += " threshold " + t.threshold + "\n"), t.base && (n += " base " + N(t.base) + "\n"), t.clause && (n += " clause \"" + s(t.clause) + "\"\n"), t.description && (n += " description \"" + s(t.description) + "\"\n"), n += " }\n", n;
|
|
8321
8456
|
}
|
|
8322
|
-
function
|
|
8457
|
+
function lc(e) {
|
|
8323
8458
|
let t = " voting {\n";
|
|
8324
|
-
if (e.in_meeting && (t +=
|
|
8459
|
+
if (e.in_meeting && (t += cc("in_meeting", e.in_meeting)), e.by_correspondence && (t += cc("by_correspondence", e.by_correspondence)), e.other_proposals) {
|
|
8325
8460
|
let n = e.other_proposals;
|
|
8326
8461
|
t += " other_proposals {\n", n.in_meeting > 0 && (t += " in_meeting " + n.in_meeting + "\n"), n.by_correspondence && (t += " by_correspondence " + N(n.by_correspondence) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
8327
8462
|
}
|
|
8328
8463
|
return e.proxies_max > 0 && (t += " proxies_max " + e.proxies_max + "\n"), e.abstentions && (t += " abstentions " + N(e.abstentions) + "\n"), e.reason_on_against_or_abstain && (t += " reason_on_against_or_abstain true\n"), t += " }\n", t;
|
|
8329
8464
|
}
|
|
8330
|
-
function
|
|
8465
|
+
function uc(e, t, n) {
|
|
8331
8466
|
return n + e + " { " + t.map(N).join(" ") + " }\n";
|
|
8332
8467
|
}
|
|
8333
|
-
var
|
|
8468
|
+
var dc = function(e) {
|
|
8334
8469
|
let t = "decision_rule " + e.id + " {\n";
|
|
8335
|
-
e.organ && (t += " organ " + N(e.organ) + "\n"), e.kind && (t += " kind " + N(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + N(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + N(e.independent_of) + "\n"), e.decides.length > 0 && (t +=
|
|
8470
|
+
e.organ && (t += " organ " + N(e.organ) + "\n"), e.kind && (t += " kind " + N(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + N(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + N(e.independent_of) + "\n"), e.decides.length > 0 && (t += uc("decides", e.decides, " ")), e.voting && (t += lc(e.voting)), e.tasks.length > 0 && (t += uc("tasks", e.tasks, " ")), e.scope.length > 0 && (t += uc("scope", e.scope, " ")), e.principle && (t += " principle " + N(e.principle) + "\n");
|
|
8336
8471
|
for (let n of e.legacy_kinds) t += " legacy_kind " + N(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
8337
|
-
return e.income && (t += " income " + N(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t +=
|
|
8338
|
-
},
|
|
8472
|
+
return e.income && (t += " income " + N(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t += uc("no_entrance_fees_for", e.no_entrance_fees_for, " ")), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8473
|
+
}, fc = (e, t) => {
|
|
8339
8474
|
let n = {
|
|
8340
8475
|
id: e,
|
|
8341
8476
|
document: "",
|
|
@@ -8368,15 +8503,15 @@ var ec = function(e) {
|
|
|
8368
8503
|
construct: "document_module",
|
|
8369
8504
|
id: e
|
|
8370
8505
|
}), (t) => (t.documentModules[e] = n, t);
|
|
8371
|
-
},
|
|
8506
|
+
}, pc = function(e) {
|
|
8372
8507
|
let t = "document_module " + e.id + " {\n";
|
|
8373
8508
|
e.document && (t += " document \"" + s(e.document) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.edition && (t += " edition \"" + s(e.edition) + "\"\n"), e.year && (t += " year " + e.year + "\n"), e.namespace && (t += " namespace " + N(e.namespace) + "\n");
|
|
8374
8509
|
let n = Et(e.sequence);
|
|
8375
8510
|
n && (t += " " + n + "\n");
|
|
8376
8511
|
for (let n of e.registers) t += Dt(n, " ");
|
|
8377
8512
|
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8378
|
-
},
|
|
8379
|
-
function
|
|
8513
|
+
}, mc = ["informative"];
|
|
8514
|
+
function hc(e, t) {
|
|
8380
8515
|
let n = {
|
|
8381
8516
|
id: "",
|
|
8382
8517
|
title: "",
|
|
@@ -8392,7 +8527,7 @@ function ic(e, t) {
|
|
|
8392
8527
|
else if (e === "year") n.year = parseInt(a(r()), 10) || 0;
|
|
8393
8528
|
else if (e === "role") {
|
|
8394
8529
|
let e = a(r());
|
|
8395
|
-
if (!
|
|
8530
|
+
if (!mc.includes(e)) throw Error(`Parsing error: informative_annex. ID ${t}: Unknown document role "${e}" (valid: ${mc.join(", ")})`);
|
|
8396
8531
|
n.role = e;
|
|
8397
8532
|
} else if (e === "source") n.source = a(r());
|
|
8398
8533
|
else return !1;
|
|
@@ -8402,7 +8537,7 @@ function ic(e, t) {
|
|
|
8402
8537
|
id: t
|
|
8403
8538
|
}), n;
|
|
8404
8539
|
}
|
|
8405
|
-
function
|
|
8540
|
+
function gc(e, t) {
|
|
8406
8541
|
let n = {
|
|
8407
8542
|
id: e,
|
|
8408
8543
|
clause: "",
|
|
@@ -8422,7 +8557,7 @@ function ac(e, t) {
|
|
|
8422
8557
|
id: e
|
|
8423
8558
|
}), n;
|
|
8424
8559
|
}
|
|
8425
|
-
var
|
|
8560
|
+
var _c = (e, t) => {
|
|
8426
8561
|
let n = {
|
|
8427
8562
|
id: e,
|
|
8428
8563
|
document: {
|
|
@@ -8440,7 +8575,7 @@ var oc = (e, t) => {
|
|
|
8440
8575
|
highlights: []
|
|
8441
8576
|
};
|
|
8442
8577
|
return v(t, (t, r, o) => {
|
|
8443
|
-
if (t === "document") n.document =
|
|
8578
|
+
if (t === "document") n.document = hc(i(r()), e);
|
|
8444
8579
|
else if (t === "applies_to") n.appliesTo = a(r());
|
|
8445
8580
|
else if (t === "applied_by") n.appliedBy = a(r());
|
|
8446
8581
|
else if (t === "scope") n.scope = a(r());
|
|
@@ -8448,25 +8583,189 @@ var oc = (e, t) => {
|
|
|
8448
8583
|
else if (t === "highlight") {
|
|
8449
8584
|
let t = a(r()), s = o();
|
|
8450
8585
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: informative_annex. ID ${e}: highlight ${t} is missing its block`);
|
|
8451
|
-
n.highlights.push(
|
|
8586
|
+
n.highlights.push(gc(t, i(r())));
|
|
8452
8587
|
} else return !1;
|
|
8453
8588
|
return !0;
|
|
8454
8589
|
}, {
|
|
8455
8590
|
construct: "informative_annex",
|
|
8456
8591
|
id: e
|
|
8457
8592
|
}), (t) => (t.informativeAnnexes[e] = n, t);
|
|
8458
|
-
},
|
|
8593
|
+
}, vc = function(e) {
|
|
8459
8594
|
let t = "informative_annex " + e.id + " {\n";
|
|
8460
8595
|
t += " document {\n", e.document.id && (t += " id \"" + s(e.document.id) + "\"\n"), e.document.title && (t += " title \"" + s(e.document.title) + "\"\n"), e.document.edition && (t += " edition " + e.document.edition + "\n"), e.document.year && (t += " year " + e.document.year + "\n"), e.document.role && (t += " role " + N(e.document.role) + "\n"), e.document.source && (t += " source \"" + s(e.document.source) + "\"\n"), t += " }\n", e.appliesTo && (t += " applies_to " + N(e.appliesTo) + "\n"), e.appliedBy && (t += " applied_by \"" + s(e.appliedBy) + "\"\n"), e.scope && (t += " scope \"" + s(e.scope) + "\"\n"), e.numberingCaution && (t += " numbering_caution \"" + s(e.numberingCaution) + "\"\n");
|
|
8461
8596
|
for (let n of e.highlights) t += " highlight " + N(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.title && (t += " title \"" + s(n.title) + "\"\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), n.dischargedBy && (t += " discharged_by \"" + s(n.dischargedBy) + "\"\n"), t += " }\n";
|
|
8462
8597
|
return t += "}\n", t;
|
|
8598
|
+
}, yc = ["normative", "informative"], bc = (e, t) => {
|
|
8599
|
+
let n = {
|
|
8600
|
+
id: e,
|
|
8601
|
+
letter: "",
|
|
8602
|
+
title: "",
|
|
8603
|
+
obligation: "",
|
|
8604
|
+
summary: "",
|
|
8605
|
+
realization: "",
|
|
8606
|
+
source: {
|
|
8607
|
+
doc: "",
|
|
8608
|
+
clause: ""
|
|
8609
|
+
}
|
|
8610
|
+
};
|
|
8611
|
+
return v(t, (t, r) => {
|
|
8612
|
+
if (t === "letter") n.letter = a(r());
|
|
8613
|
+
else if (t === "title") n.title = a(r());
|
|
8614
|
+
else if (t === "obligation") {
|
|
8615
|
+
let t = a(r());
|
|
8616
|
+
if (!yc.includes(t)) throw Error(`Parsing error: part_annex. ID ${e}: Unknown obligation "${t}" (valid: ${yc.join(", ")})`);
|
|
8617
|
+
n.obligation = t;
|
|
8618
|
+
} else if (t === "summary") n.summary = a(r());
|
|
8619
|
+
else if (t === "realization") n.realization = a(r());
|
|
8620
|
+
else if (t === "source") n.source = I(i(r()));
|
|
8621
|
+
else return !1;
|
|
8622
|
+
return !0;
|
|
8623
|
+
}, {
|
|
8624
|
+
construct: "part_annex",
|
|
8625
|
+
id: e
|
|
8626
|
+
}), (t) => (t.partAnnexes[e] = n, t);
|
|
8627
|
+
}, xc = function(e) {
|
|
8628
|
+
let t = "part_annex " + e.id + " {\n";
|
|
8629
|
+
return e.letter && (t += " letter \"" + s(e.letter) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.obligation && (t += " obligation " + N(e.obligation) + "\n"), e.summary && (t += " summary \"" + s(e.summary) + "\"\n"), e.realization && (t += " realization \"" + s(e.realization) + "\"\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8630
|
+
};
|
|
8631
|
+
//#endregion
|
|
8632
|
+
//#region src/ser-des/config/storyline.ts
|
|
8633
|
+
function Sc(e) {
|
|
8634
|
+
return e.startsWith("{") ? n(i(e)).filter((e) => e.length > 0).map(z) : z(e);
|
|
8635
|
+
}
|
|
8636
|
+
function Cc(e) {
|
|
8637
|
+
let t = {}, r = n(e), i = 0;
|
|
8638
|
+
for (; i < r.length;) {
|
|
8639
|
+
let e = r[i++];
|
|
8640
|
+
if (i >= r.length) break;
|
|
8641
|
+
t[P(e)] = Sc(r[i++]);
|
|
8642
|
+
}
|
|
8643
|
+
return t;
|
|
8644
|
+
}
|
|
8645
|
+
function wc(e, t) {
|
|
8646
|
+
let n = "";
|
|
8647
|
+
for (let [r, i] of Object.entries(e)) n += Array.isArray(i) ? t + r + " { " + i.map(B).join(" ") + " }\n" : t + r + " " + B(i) + "\n";
|
|
8648
|
+
return n;
|
|
8649
|
+
}
|
|
8650
|
+
function Tc(e) {
|
|
8651
|
+
let t = [], r = n(e), o = 0;
|
|
8652
|
+
for (; o < r.length;) {
|
|
8653
|
+
let e = a(r[o++]);
|
|
8654
|
+
if (o >= r.length || !r[o].startsWith("{")) break;
|
|
8655
|
+
let s = {
|
|
8656
|
+
id: e,
|
|
8657
|
+
entries: []
|
|
8658
|
+
}, c = n(i(r[o++])), l = 0;
|
|
8659
|
+
for (; l < c.length;) {
|
|
8660
|
+
let e = a(c[l++]);
|
|
8661
|
+
if (l >= c.length || !c[l].startsWith("{")) break;
|
|
8662
|
+
s.entries.push({
|
|
8663
|
+
id: e,
|
|
8664
|
+
fields: Cc(i(c[l++]))
|
|
8665
|
+
});
|
|
8666
|
+
}
|
|
8667
|
+
t.push(s);
|
|
8668
|
+
}
|
|
8669
|
+
return t;
|
|
8670
|
+
}
|
|
8671
|
+
var Ec = (e, t) => {
|
|
8672
|
+
let n = {
|
|
8673
|
+
id: e,
|
|
8674
|
+
standard: "",
|
|
8675
|
+
description: "",
|
|
8676
|
+
participants: []
|
|
8677
|
+
};
|
|
8678
|
+
return v(t, (e, t) => {
|
|
8679
|
+
if (e === "standard") n.standard = a(t());
|
|
8680
|
+
else if (e === "description") n.description = a(t());
|
|
8681
|
+
else if (e === "participants") n.participants = Tc(i(t()));
|
|
8682
|
+
else return !1;
|
|
8683
|
+
return !0;
|
|
8684
|
+
}, {
|
|
8685
|
+
construct: "demo_world",
|
|
8686
|
+
id: e
|
|
8687
|
+
}), (t) => (t.demoWorlds[e] = n, t);
|
|
8688
|
+
}, Dc = function(e) {
|
|
8689
|
+
let t = "demo_world " + e.id + " {\n";
|
|
8690
|
+
if (e.standard && (t += " standard " + N(e.standard) + "\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.participants.length > 0) {
|
|
8691
|
+
t += " participants {\n";
|
|
8692
|
+
for (let n of e.participants) {
|
|
8693
|
+
t += " " + N(n.id) + " {\n";
|
|
8694
|
+
for (let e of n.entries) t += " " + N(e.id) + " {\n", t += wc(e.fields, " "), t += " }\n";
|
|
8695
|
+
t += " }\n";
|
|
8696
|
+
}
|
|
8697
|
+
t += " }\n";
|
|
8698
|
+
}
|
|
8699
|
+
return t += "}\n", t;
|
|
8700
|
+
};
|
|
8701
|
+
function Oc(e) {
|
|
8702
|
+
let t = [], r = n(e), o = 0;
|
|
8703
|
+
for (; o < r.length;) {
|
|
8704
|
+
let e = a(r[o++]);
|
|
8705
|
+
if (o >= r.length) break;
|
|
8706
|
+
let n = {
|
|
8707
|
+
kind: e,
|
|
8708
|
+
id: a(r[o++]),
|
|
8709
|
+
fields: {}
|
|
8710
|
+
};
|
|
8711
|
+
o < r.length && r[o].startsWith("{") && (n.fields = Cc(i(r[o++]))), t.push(n);
|
|
8712
|
+
}
|
|
8713
|
+
return t;
|
|
8714
|
+
}
|
|
8715
|
+
var kc = (e, t) => {
|
|
8716
|
+
let r = {
|
|
8717
|
+
id: e,
|
|
8718
|
+
name: "",
|
|
8719
|
+
idPrefix: "",
|
|
8720
|
+
party: {
|
|
8721
|
+
laboratory: "",
|
|
8722
|
+
authority: ""
|
|
8723
|
+
},
|
|
8724
|
+
subject: [],
|
|
8725
|
+
records: [],
|
|
8726
|
+
notes: []
|
|
8727
|
+
};
|
|
8728
|
+
return v(t, (t, o, s) => {
|
|
8729
|
+
if (t === "name") r.name = a(o());
|
|
8730
|
+
else if (t === "id_prefix") r.idPrefix = a(o());
|
|
8731
|
+
else if (t === "party") {
|
|
8732
|
+
let e = n(i(o()));
|
|
8733
|
+
for (let t = 0; t + 1 < e.length; t += 2) e[t] === "laboratory" ? r.party.laboratory = a(e[t + 1]) : e[t] === "authority" && (r.party.authority = a(e[t + 1]));
|
|
8734
|
+
} else if (t === "subject") r.subject = Oc(i(o()));
|
|
8735
|
+
else if (t === "record") {
|
|
8736
|
+
let t = a(o()), n = s();
|
|
8737
|
+
if (n === void 0 || n.startsWith("{")) throw Error(`Parsing error: storyline. ID ${e}: record ${t} is missing its id and block`);
|
|
8738
|
+
let c = a(o()), l = s();
|
|
8739
|
+
if (l === void 0 || !l.startsWith("{")) throw Error(`Parsing error: storyline. ID ${e}: record ${t} ${c} is missing its block`);
|
|
8740
|
+
r.records.push({
|
|
8741
|
+
store: t,
|
|
8742
|
+
id: c,
|
|
8743
|
+
fields: Cc(i(o()))
|
|
8744
|
+
});
|
|
8745
|
+
} else if (t === "note") r.notes.push(a(o()));
|
|
8746
|
+
else return !1;
|
|
8747
|
+
return !0;
|
|
8748
|
+
}, {
|
|
8749
|
+
construct: "storyline",
|
|
8750
|
+
id: e
|
|
8751
|
+
}), (t) => (t.storylines[e] = r, t);
|
|
8752
|
+
}, Ac = function(e) {
|
|
8753
|
+
let t = "storyline " + e.id + " {\n";
|
|
8754
|
+
if (e.name && (t += " name \"" + s(e.name) + "\"\n"), e.idPrefix && (t += " id_prefix " + N(e.idPrefix) + "\n"), (e.party.laboratory || e.party.authority) && (t += " party {", e.party.laboratory && (t += " laboratory " + N(e.party.laboratory)), e.party.authority && (t += " authority " + N(e.party.authority)), t += " }\n"), e.subject.length > 0) {
|
|
8755
|
+
t += " subject {\n";
|
|
8756
|
+
for (let n of e.subject) t += " " + N(n.kind) + " " + N(n.id) + " {\n", t += wc(n.fields, " "), t += " }\n";
|
|
8757
|
+
t += " }\n";
|
|
8758
|
+
}
|
|
8759
|
+
for (let n of e.records) t += " record " + N(n.store) + " " + N(n.id) + " {\n", t += wc(n.fields, " "), t += " }\n";
|
|
8760
|
+
for (let n of e.notes) t += " note \"" + s(n) + "\"\n";
|
|
8761
|
+
return t += "}\n", t;
|
|
8463
8762
|
};
|
|
8464
8763
|
//#endregion
|
|
8465
8764
|
//#region src/ser-des/config/index.ts
|
|
8466
8765
|
function J(e) {
|
|
8467
8766
|
return e;
|
|
8468
8767
|
}
|
|
8469
|
-
var
|
|
8768
|
+
var jc = [
|
|
8470
8769
|
J({
|
|
8471
8770
|
keyword: "role",
|
|
8472
8771
|
field: "roles",
|
|
@@ -8653,8 +8952,8 @@ var cc = [
|
|
|
8653
8952
|
keyword: "term",
|
|
8654
8953
|
field: "terms",
|
|
8655
8954
|
takesID: !0,
|
|
8656
|
-
parse:
|
|
8657
|
-
dump:
|
|
8955
|
+
parse: Yr,
|
|
8956
|
+
dump: Xr
|
|
8658
8957
|
}),
|
|
8659
8958
|
J({
|
|
8660
8959
|
keyword: "form",
|
|
@@ -8678,221 +8977,256 @@ var cc = [
|
|
|
8678
8977
|
resolve: Hn,
|
|
8679
8978
|
dump: Un
|
|
8680
8979
|
}),
|
|
8980
|
+
J({
|
|
8981
|
+
keyword: "formula_note",
|
|
8982
|
+
field: "formulaNotes",
|
|
8983
|
+
takesID: !0,
|
|
8984
|
+
parse: Gn,
|
|
8985
|
+
dump: Kn
|
|
8986
|
+
}),
|
|
8681
8987
|
J({
|
|
8682
8988
|
keyword: "calculation",
|
|
8683
8989
|
field: "calculations",
|
|
8684
8990
|
takesID: !0,
|
|
8685
|
-
parse:
|
|
8686
|
-
resolve:
|
|
8687
|
-
dump:
|
|
8991
|
+
parse: qn,
|
|
8992
|
+
resolve: tr,
|
|
8993
|
+
dump: nr
|
|
8688
8994
|
}),
|
|
8689
8995
|
J({
|
|
8690
8996
|
keyword: "verdict",
|
|
8691
8997
|
field: "verdicts",
|
|
8692
8998
|
takesID: !0,
|
|
8693
|
-
parse:
|
|
8694
|
-
dump:
|
|
8999
|
+
parse: $r,
|
|
9000
|
+
dump: ei
|
|
8695
9001
|
}),
|
|
8696
9002
|
J({
|
|
8697
9003
|
keyword: "reference_material",
|
|
8698
9004
|
field: "referenceMaterials",
|
|
8699
9005
|
takesID: !0,
|
|
8700
|
-
parse:
|
|
8701
|
-
dump:
|
|
9006
|
+
parse: ri,
|
|
9007
|
+
dump: ii
|
|
8702
9008
|
}),
|
|
8703
9009
|
J({
|
|
8704
9010
|
keyword: "test_point_set",
|
|
8705
9011
|
field: "testPointSets",
|
|
8706
9012
|
takesID: !0,
|
|
8707
|
-
parse:
|
|
8708
|
-
dump:
|
|
9013
|
+
parse: wi,
|
|
9014
|
+
dump: Ti
|
|
9015
|
+
}),
|
|
9016
|
+
J({
|
|
9017
|
+
keyword: "common_test_condition",
|
|
9018
|
+
field: "commonTestConditions",
|
|
9019
|
+
takesID: !0,
|
|
9020
|
+
parse: Ei,
|
|
9021
|
+
dump: Di
|
|
8709
9022
|
}),
|
|
8710
9023
|
J({
|
|
8711
9024
|
keyword: "competence_kind",
|
|
8712
9025
|
field: "competenceKinds",
|
|
8713
9026
|
takesID: !0,
|
|
8714
|
-
parse:
|
|
8715
|
-
dump:
|
|
9027
|
+
parse: Pr,
|
|
9028
|
+
dump: Fr
|
|
8716
9029
|
}),
|
|
8717
9030
|
J({
|
|
8718
9031
|
keyword: "scheme_activity_kind",
|
|
8719
9032
|
field: "schemeActivityKinds",
|
|
8720
9033
|
takesID: !0,
|
|
8721
|
-
parse:
|
|
8722
|
-
dump:
|
|
9034
|
+
parse: ci,
|
|
9035
|
+
dump: fi
|
|
8723
9036
|
}),
|
|
8724
9037
|
J({
|
|
8725
9038
|
keyword: "scheme_type",
|
|
8726
9039
|
field: "schemeTypes",
|
|
8727
9040
|
takesID: !0,
|
|
8728
|
-
parse:
|
|
8729
|
-
dump:
|
|
9041
|
+
parse: ui,
|
|
9042
|
+
dump: pi
|
|
8730
9043
|
}),
|
|
8731
9044
|
J({
|
|
8732
9045
|
keyword: "predicate",
|
|
8733
9046
|
field: "predicates",
|
|
8734
9047
|
takesID: !0,
|
|
8735
|
-
parse:
|
|
8736
|
-
dump:
|
|
9048
|
+
parse: mi,
|
|
9049
|
+
dump: hi
|
|
8737
9050
|
}),
|
|
8738
9051
|
J({
|
|
8739
9052
|
keyword: "constraint",
|
|
8740
9053
|
field: "constraints",
|
|
8741
9054
|
takesID: !0,
|
|
8742
|
-
parse:
|
|
8743
|
-
dump:
|
|
9055
|
+
parse: _i,
|
|
9056
|
+
dump: vi
|
|
8744
9057
|
}),
|
|
8745
9058
|
J({
|
|
8746
9059
|
keyword: "discrepancy_record",
|
|
8747
9060
|
field: "discrepancyRecords",
|
|
8748
9061
|
takesID: !0,
|
|
8749
|
-
parse:
|
|
8750
|
-
dump:
|
|
9062
|
+
parse: bi,
|
|
9063
|
+
dump: xi
|
|
8751
9064
|
}),
|
|
8752
9065
|
J({
|
|
8753
9066
|
keyword: "state_machine",
|
|
8754
9067
|
field: "stateMachines",
|
|
8755
9068
|
takesID: !0,
|
|
8756
|
-
parse:
|
|
8757
|
-
dump:
|
|
9069
|
+
parse: ir,
|
|
9070
|
+
dump: sr
|
|
8758
9071
|
}),
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
9072
|
+
Li,
|
|
9073
|
+
Ri,
|
|
9074
|
+
ro,
|
|
9075
|
+
io,
|
|
9076
|
+
ao,
|
|
9077
|
+
oo,
|
|
9078
|
+
so,
|
|
9079
|
+
Wi,
|
|
8767
9080
|
J({
|
|
8768
9081
|
keyword: "conformance_test",
|
|
8769
9082
|
field: "conformanceTests",
|
|
8770
9083
|
takesID: !0,
|
|
8771
|
-
parse:
|
|
8772
|
-
dump:
|
|
9084
|
+
parse: Wr,
|
|
9085
|
+
dump: Gr
|
|
8773
9086
|
}),
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
9087
|
+
co,
|
|
9088
|
+
vo,
|
|
9089
|
+
Ao,
|
|
9090
|
+
jo,
|
|
9091
|
+
us,
|
|
9092
|
+
ds,
|
|
8780
9093
|
J({
|
|
8781
9094
|
keyword: "activity_archetype",
|
|
8782
9095
|
field: "activityArchetypes",
|
|
8783
9096
|
takesID: !0,
|
|
8784
|
-
parse:
|
|
8785
|
-
dump:
|
|
9097
|
+
parse: vs,
|
|
9098
|
+
dump: ys
|
|
8786
9099
|
}),
|
|
8787
9100
|
J({
|
|
8788
9101
|
keyword: "participant_kind",
|
|
8789
9102
|
field: "participantKinds",
|
|
8790
9103
|
takesID: !0,
|
|
8791
|
-
parse:
|
|
8792
|
-
dump:
|
|
9104
|
+
parse: Cs,
|
|
9105
|
+
dump: Ds
|
|
8793
9106
|
}),
|
|
8794
9107
|
J({
|
|
8795
9108
|
keyword: "governance_organ",
|
|
8796
9109
|
field: "governanceOrgans",
|
|
8797
9110
|
takesID: !0,
|
|
8798
|
-
parse:
|
|
8799
|
-
dump:
|
|
9111
|
+
parse: Os,
|
|
9112
|
+
dump: ks
|
|
8800
9113
|
}),
|
|
8801
9114
|
J({
|
|
8802
9115
|
keyword: "declaration_kind",
|
|
8803
9116
|
field: "declarationKinds",
|
|
8804
9117
|
takesID: !0,
|
|
8805
|
-
parse:
|
|
8806
|
-
dump:
|
|
9118
|
+
parse: js,
|
|
9119
|
+
dump: Ps
|
|
8807
9120
|
}),
|
|
8808
9121
|
J({
|
|
8809
9122
|
keyword: "declaration_status",
|
|
8810
9123
|
field: "declarationStatuses",
|
|
8811
9124
|
takesID: !0,
|
|
8812
|
-
parse:
|
|
8813
|
-
dump:
|
|
9125
|
+
parse: Fs,
|
|
9126
|
+
dump: Is
|
|
8814
9127
|
}),
|
|
8815
9128
|
J({
|
|
8816
9129
|
keyword: "declaration_gate",
|
|
8817
9130
|
field: "declarationGates",
|
|
8818
9131
|
takesID: !0,
|
|
8819
|
-
parse:
|
|
8820
|
-
dump:
|
|
9132
|
+
parse: Ls,
|
|
9133
|
+
dump: Rs
|
|
8821
9134
|
}),
|
|
8822
9135
|
J({
|
|
8823
9136
|
keyword: "scheme_definition",
|
|
8824
9137
|
field: "schemeDefinitions",
|
|
8825
9138
|
takesID: !0,
|
|
8826
|
-
parse:
|
|
8827
|
-
dump:
|
|
9139
|
+
parse: Bs,
|
|
9140
|
+
dump: Hs
|
|
8828
9141
|
}),
|
|
8829
9142
|
J({
|
|
8830
9143
|
keyword: "scheme_lifecycle",
|
|
8831
9144
|
field: "schemeLifecycles",
|
|
8832
9145
|
takesID: !0,
|
|
8833
|
-
parse:
|
|
8834
|
-
dump:
|
|
9146
|
+
parse: Ks,
|
|
9147
|
+
dump: qs
|
|
8835
9148
|
}),
|
|
8836
9149
|
J({
|
|
8837
9150
|
keyword: "framework_document",
|
|
8838
9151
|
field: "frameworkDocuments",
|
|
8839
9152
|
takesID: !0,
|
|
8840
|
-
parse:
|
|
8841
|
-
dump:
|
|
9153
|
+
parse: Ys,
|
|
9154
|
+
dump: Xs
|
|
8842
9155
|
}),
|
|
8843
9156
|
J({
|
|
8844
9157
|
keyword: "document_precedence",
|
|
8845
9158
|
field: "documentPrecedences",
|
|
8846
9159
|
takesID: !0,
|
|
8847
|
-
parse:
|
|
8848
|
-
dump:
|
|
9160
|
+
parse: Zs,
|
|
9161
|
+
dump: Qs
|
|
8849
9162
|
}),
|
|
8850
9163
|
J({
|
|
8851
9164
|
keyword: "auto_inclusion",
|
|
8852
9165
|
field: "autoInclusions",
|
|
8853
9166
|
takesID: !0,
|
|
8854
|
-
parse:
|
|
8855
|
-
dump:
|
|
9167
|
+
parse: ec,
|
|
9168
|
+
dump: tc
|
|
8856
9169
|
}),
|
|
8857
9170
|
J({
|
|
8858
9171
|
keyword: "decision_rule",
|
|
8859
9172
|
field: "decisionRules",
|
|
8860
9173
|
takesID: !0,
|
|
8861
|
-
parse:
|
|
8862
|
-
dump:
|
|
9174
|
+
parse: sc,
|
|
9175
|
+
dump: dc
|
|
8863
9176
|
}),
|
|
8864
9177
|
J({
|
|
8865
9178
|
keyword: "document_module",
|
|
8866
9179
|
field: "documentModules",
|
|
8867
9180
|
takesID: !0,
|
|
8868
|
-
parse:
|
|
8869
|
-
dump:
|
|
9181
|
+
parse: fc,
|
|
9182
|
+
dump: pc
|
|
8870
9183
|
}),
|
|
8871
9184
|
J({
|
|
8872
9185
|
keyword: "informative_annex",
|
|
8873
9186
|
field: "informativeAnnexes",
|
|
8874
9187
|
takesID: !0,
|
|
8875
|
-
parse:
|
|
8876
|
-
dump:
|
|
9188
|
+
parse: _c,
|
|
9189
|
+
dump: vc
|
|
9190
|
+
}),
|
|
9191
|
+
J({
|
|
9192
|
+
keyword: "part_annex",
|
|
9193
|
+
field: "partAnnexes",
|
|
9194
|
+
takesID: !0,
|
|
9195
|
+
parse: bc,
|
|
9196
|
+
dump: xc
|
|
9197
|
+
}),
|
|
9198
|
+
J({
|
|
9199
|
+
keyword: "demo_world",
|
|
9200
|
+
field: "demoWorlds",
|
|
9201
|
+
takesID: !0,
|
|
9202
|
+
parse: Ec,
|
|
9203
|
+
dump: Dc
|
|
8877
9204
|
}),
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
9205
|
+
J({
|
|
9206
|
+
keyword: "storyline",
|
|
9207
|
+
field: "storylines",
|
|
9208
|
+
takesID: !0,
|
|
9209
|
+
parse: kc,
|
|
9210
|
+
dump: Ac
|
|
9211
|
+
}),
|
|
9212
|
+
na,
|
|
8883
9213
|
Uo,
|
|
9214
|
+
Xo,
|
|
9215
|
+
Zo,
|
|
9216
|
+
$o,
|
|
9217
|
+
es,
|
|
8884
9218
|
J({
|
|
8885
9219
|
keyword: "text",
|
|
8886
9220
|
field: "texts",
|
|
8887
9221
|
takesID: !0,
|
|
8888
|
-
parse:
|
|
8889
|
-
dump:
|
|
9222
|
+
parse: ts,
|
|
9223
|
+
dump: ns
|
|
8890
9224
|
}),
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
9225
|
+
ms,
|
|
9226
|
+
gs,
|
|
9227
|
+
_s
|
|
8894
9228
|
];
|
|
8895
|
-
function
|
|
9229
|
+
function Mc(e) {
|
|
8896
9230
|
let t = {};
|
|
8897
9231
|
for (let n of e) {
|
|
8898
9232
|
if (!n.field) continue;
|
|
@@ -8906,61 +9240,61 @@ function lc(e) {
|
|
|
8906
9240
|
}
|
|
8907
9241
|
return t;
|
|
8908
9242
|
}
|
|
8909
|
-
function
|
|
9243
|
+
function Nc(e) {
|
|
8910
9244
|
let t = {};
|
|
8911
9245
|
for (let n of e) n.field && (t[n.field] = { resolve: n.resolve ?? ((e, t) => t) });
|
|
8912
9246
|
return t;
|
|
8913
9247
|
}
|
|
8914
|
-
function
|
|
9248
|
+
function Pc(e) {
|
|
8915
9249
|
let t = {};
|
|
8916
9250
|
for (let n of e) n.field && (t[n.field] = n.dump);
|
|
8917
9251
|
return t;
|
|
8918
9252
|
}
|
|
8919
|
-
var
|
|
8920
|
-
package: { parse:
|
|
9253
|
+
var Fc = {
|
|
9254
|
+
package: { parse: Hi },
|
|
8921
9255
|
root: { parse: (e) => (t) => (t.root = e.trim(), t) },
|
|
8922
9256
|
metadata: { parse: m },
|
|
8923
9257
|
version: { parse: () => (e) => e },
|
|
8924
|
-
...
|
|
8925
|
-
},
|
|
9258
|
+
...Mc(jc)
|
|
9259
|
+
}, Ic = Nc(jc), Lc = Pc(jc), Y = (/* @__PURE__ */ e(((e, t) => {
|
|
8926
9260
|
t.exports = {};
|
|
8927
|
-
})))(),
|
|
8928
|
-
function
|
|
9261
|
+
})))(), Rc = /^include\s+"([^"]+)"/gm, zc = /^[ \t]*(#|\/\/)/;
|
|
9262
|
+
function Bc(e, t = /* @__PURE__ */ new Set()) {
|
|
8929
9263
|
let n = (0, Y.resolve)(e);
|
|
8930
9264
|
if (t.has(n)) throw Error(`Include cycle detected: ${n} (chain: ${[...t, n].map((e) => e.split("/").pop()).join(" → ")})`);
|
|
8931
9265
|
if (t.add(n), !(0, Y.existsSync)(n)) throw Error(`Include file not found: ${n}`);
|
|
8932
9266
|
let r = (0, Y.readFileSync)(n, "utf8"), i = (0, Y.dirname)(n);
|
|
8933
|
-
return r.replace(
|
|
9267
|
+
return r.replace(Rc, (e, n, a) => {
|
|
8934
9268
|
let o = r.lastIndexOf("\n", a) + 1, s = r.slice(o, a);
|
|
8935
|
-
if (
|
|
9269
|
+
if (zc.test(s)) return e;
|
|
8936
9270
|
let c = (0, Y.isAbsolute)(n) ? n : (0, Y.resolve)(i, n);
|
|
8937
|
-
return
|
|
9271
|
+
return Bc(c.endsWith(".prl") || c.endsWith(".mmel") ? c : (0, Y.existsSync)(`${c}.prl`) ? `${c}.prl` : `${c}.mmel`, new Set(t));
|
|
8938
9272
|
});
|
|
8939
9273
|
}
|
|
8940
9274
|
//#endregion
|
|
8941
9275
|
//#region src/validate.ts
|
|
8942
|
-
function
|
|
9276
|
+
function Vc(e) {
|
|
8943
9277
|
let t = [];
|
|
8944
|
-
for (let n of
|
|
9278
|
+
for (let n of Hc) t.push(...n.check(e));
|
|
8945
9279
|
return t;
|
|
8946
9280
|
}
|
|
8947
|
-
var
|
|
9281
|
+
var Hc = [
|
|
8948
9282
|
{
|
|
8949
9283
|
name: "empty-ids",
|
|
8950
|
-
check:
|
|
9284
|
+
check: Uc
|
|
8951
9285
|
},
|
|
8952
9286
|
{
|
|
8953
9287
|
name: "form-references",
|
|
8954
|
-
check:
|
|
9288
|
+
check: Wc
|
|
8955
9289
|
},
|
|
8956
9290
|
{
|
|
8957
9291
|
name: "state-machine-cascades",
|
|
8958
|
-
check:
|
|
9292
|
+
check: Gc
|
|
8959
9293
|
}
|
|
8960
9294
|
];
|
|
8961
|
-
function
|
|
9295
|
+
function Uc(e) {
|
|
8962
9296
|
let t = [];
|
|
8963
|
-
for (let [n, r] of
|
|
9297
|
+
for (let [n, r] of Kc(e)) for (let e of r) (!e.id || e.id.trim() === "") && t.push({
|
|
8964
9298
|
severity: "error",
|
|
8965
9299
|
code: "empty-id",
|
|
8966
9300
|
construct: n,
|
|
@@ -8968,7 +9302,7 @@ function bc(e) {
|
|
|
8968
9302
|
});
|
|
8969
9303
|
return t;
|
|
8970
9304
|
}
|
|
8971
|
-
function
|
|
9305
|
+
function Wc(e) {
|
|
8972
9306
|
let t = [], n = new Set(e.calculations.map((e) => e.id)), r = new Set(e.processes.map((e) => e.id));
|
|
8973
9307
|
for (let t of e.conformanceTests ?? []) r.add(t.id);
|
|
8974
9308
|
let i = new Set(e.subforms.map((e) => e.id));
|
|
@@ -8980,7 +9314,7 @@ function xc(e) {
|
|
|
8980
9314
|
message: `Form "${a.id}" references conformance process "${a.conformanceProcessId}" which does not exist`,
|
|
8981
9315
|
id: a.id
|
|
8982
9316
|
});
|
|
8983
|
-
for (let e of
|
|
9317
|
+
for (let e of qc(a)) {
|
|
8984
9318
|
let r = e.calculationId;
|
|
8985
9319
|
r && !r.startsWith("ocl{") && !n.has(r) && t.push({
|
|
8986
9320
|
severity: "error",
|
|
@@ -8999,7 +9333,7 @@ function xc(e) {
|
|
|
8999
9333
|
}
|
|
9000
9334
|
return t;
|
|
9001
9335
|
}
|
|
9002
|
-
function
|
|
9336
|
+
function Gc(e) {
|
|
9003
9337
|
let t = [];
|
|
9004
9338
|
for (let n of e.stateMachines) {
|
|
9005
9339
|
let e = new Set(n.states.map((e) => e.name));
|
|
@@ -9020,10 +9354,10 @@ function Sc(e) {
|
|
|
9020
9354
|
}
|
|
9021
9355
|
return t;
|
|
9022
9356
|
}
|
|
9023
|
-
function*
|
|
9357
|
+
function* Kc(e) {
|
|
9024
9358
|
for (let [t, n] of Object.entries(e)) Array.isArray(n) && n.length > 0 && typeof n[0]?.id == "string" && (yield [t, n]);
|
|
9025
9359
|
}
|
|
9026
|
-
function*
|
|
9360
|
+
function* qc(e) {
|
|
9027
9361
|
let t = [...e.fields];
|
|
9028
9362
|
for (; t.length > 0;) {
|
|
9029
9363
|
let e = t.pop();
|
|
@@ -9032,7 +9366,7 @@ function* wc(e) {
|
|
|
9032
9366
|
}
|
|
9033
9367
|
//#endregion
|
|
9034
9368
|
//#region src/ser-des/package.ts
|
|
9035
|
-
var
|
|
9369
|
+
var Jc = [
|
|
9036
9370
|
"model",
|
|
9037
9371
|
"entities",
|
|
9038
9372
|
"specification",
|
|
@@ -9040,23 +9374,23 @@ var Tc = [
|
|
|
9040
9374
|
"evaluation",
|
|
9041
9375
|
"framework"
|
|
9042
9376
|
];
|
|
9043
|
-
function
|
|
9377
|
+
function Yc(e) {
|
|
9044
9378
|
let t = [];
|
|
9045
9379
|
if (!(0, Y.existsSync)(e)) return t;
|
|
9046
9380
|
for (let n of (0, Y.readdirSync)(e).sort()) {
|
|
9047
9381
|
let r = (0, Y.join)(e, n);
|
|
9048
|
-
(0, Y.statSync)(r).isDirectory() ? t.push(...
|
|
9382
|
+
(0, Y.statSync)(r).isDirectory() ? t.push(...Yc(r)) : (n.endsWith(".prl") || n.endsWith(".mmel")) && t.push(r);
|
|
9049
9383
|
}
|
|
9050
9384
|
return t;
|
|
9051
9385
|
}
|
|
9052
|
-
function
|
|
9386
|
+
function Xc(e) {
|
|
9053
9387
|
let t = (0, Y.resolve)(e), n = [], r = (0, Y.join)(t, "package.primmel");
|
|
9054
9388
|
(0, Y.existsSync)(r) && n.push({
|
|
9055
9389
|
path: r,
|
|
9056
9390
|
role: "manifest"
|
|
9057
9391
|
});
|
|
9058
9392
|
let i = [];
|
|
9059
|
-
for (let e of
|
|
9393
|
+
for (let e of Jc) i.push(...Yc((0, Y.join)(t, e)));
|
|
9060
9394
|
for (let e of (0, Y.readdirSync)(t).sort()) {
|
|
9061
9395
|
let n = (0, Y.join)(t, e);
|
|
9062
9396
|
(0, Y.statSync)(n).isFile() && (e.endsWith(".prl") || e.endsWith(".mmel")) && e !== "package.primmel" && e !== ".primmel-allowlist.prl" && i.push(n);
|
|
@@ -9068,10 +9402,10 @@ function Dc(e) {
|
|
|
9068
9402
|
});
|
|
9069
9403
|
return n;
|
|
9070
9404
|
}
|
|
9071
|
-
function
|
|
9072
|
-
return
|
|
9405
|
+
function Zc(e, t = {}) {
|
|
9406
|
+
return al(e, t).standard;
|
|
9073
9407
|
}
|
|
9074
|
-
function
|
|
9408
|
+
function Qc(e, t) {
|
|
9075
9409
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
9076
9410
|
for (let i of t) {
|
|
9077
9411
|
let t = e.constructs[i.field]?.[i.id];
|
|
@@ -9087,37 +9421,37 @@ function kc(e, t) {
|
|
|
9087
9421
|
unassigned: r
|
|
9088
9422
|
};
|
|
9089
9423
|
}
|
|
9090
|
-
function
|
|
9091
|
-
let n =
|
|
9424
|
+
function $c(e, t = {}) {
|
|
9425
|
+
let n = al(e, t, !0);
|
|
9092
9426
|
if (!n.provenance) throw Error("loadPackageWithProvenance: provenance not collected");
|
|
9093
9427
|
return {
|
|
9094
9428
|
...n,
|
|
9095
9429
|
provenance: n.provenance
|
|
9096
9430
|
};
|
|
9097
9431
|
}
|
|
9098
|
-
function
|
|
9432
|
+
function el(e) {
|
|
9099
9433
|
let t = 0;
|
|
9100
9434
|
for (let n = 0; n < e.length; n++) e.charAt(n) === "\n" && t++;
|
|
9101
9435
|
return t;
|
|
9102
9436
|
}
|
|
9103
|
-
function
|
|
9437
|
+
function tl(e) {
|
|
9104
9438
|
let t = [], n = 0, r = 1;
|
|
9105
9439
|
for (let i of e) {
|
|
9106
9440
|
if (i.role !== "content") continue;
|
|
9107
|
-
let e =
|
|
9441
|
+
let e = Bc(i.path);
|
|
9108
9442
|
t.push({
|
|
9109
9443
|
path: i.path,
|
|
9110
9444
|
text: e,
|
|
9111
9445
|
start: n,
|
|
9112
9446
|
lineStart: r
|
|
9113
|
-
}), n += e.length + 2, r +=
|
|
9447
|
+
}), n += e.length + 2, r += el(e) + 2;
|
|
9114
9448
|
}
|
|
9115
9449
|
return t;
|
|
9116
9450
|
}
|
|
9117
|
-
function
|
|
9451
|
+
function nl(e) {
|
|
9118
9452
|
return e.map((e) => e.text).join("\n\n");
|
|
9119
9453
|
}
|
|
9120
|
-
function
|
|
9454
|
+
function rl(e, t, n) {
|
|
9121
9455
|
let r = {}, i = 0;
|
|
9122
9456
|
for (let a of e) {
|
|
9123
9457
|
for (; i + 1 < t.length && a.start.offset >= t[i + 1].start;) i++;
|
|
@@ -9137,46 +9471,46 @@ function Pc(e, t, n) {
|
|
|
9137
9471
|
}
|
|
9138
9472
|
return r;
|
|
9139
9473
|
}
|
|
9140
|
-
function
|
|
9474
|
+
function il(e) {
|
|
9141
9475
|
let t = (0, Y.join)((0, Y.resolve)(e), "package.primmel");
|
|
9142
9476
|
if (!(0, Y.existsSync)(t)) throw Error(`loadPackage: no package.primmel found in ${(0, Y.resolve)(e)}`);
|
|
9143
9477
|
let n = (0, Y.readFileSync)(t, "utf8"), r = { packageManifest: null };
|
|
9144
|
-
|
|
9478
|
+
Hi(n)(r);
|
|
9145
9479
|
let i = r.packageManifest;
|
|
9146
9480
|
if (!i || !i.id) throw Error(`loadPackage: ${t} is not a valid package manifest`);
|
|
9147
9481
|
return i;
|
|
9148
9482
|
}
|
|
9149
|
-
function
|
|
9150
|
-
let r =
|
|
9483
|
+
function al(e, t = {}, n = !1) {
|
|
9484
|
+
let r = Xc(e);
|
|
9151
9485
|
if (r.length === 0) throw Error(`loadPackage: no package files found in ${(0, Y.resolve)(e)}`);
|
|
9152
9486
|
let i = null;
|
|
9153
|
-
r.some((e) => e.role === "manifest") && (i =
|
|
9154
|
-
let a =
|
|
9155
|
-
if (i && t.resolvePackage &&
|
|
9487
|
+
r.some((e) => e.role === "manifest") && (i = il(e));
|
|
9488
|
+
let a = tl(r);
|
|
9489
|
+
if (i && t.resolvePackage && sl(i).length > 0) return dl(e, t, i, n);
|
|
9156
9490
|
let o = n ? {
|
|
9157
9491
|
...t,
|
|
9158
9492
|
withProvenance: !0
|
|
9159
|
-
} : t, s = u(
|
|
9493
|
+
} : t, s = u(nl(a), Fc, o);
|
|
9160
9494
|
if (i) {
|
|
9161
9495
|
s.packageManifest = i;
|
|
9162
|
-
let e =
|
|
9496
|
+
let e = cl(i);
|
|
9163
9497
|
e && s.issues.push(e);
|
|
9164
9498
|
}
|
|
9165
9499
|
let c = {
|
|
9166
|
-
standard: p(s,
|
|
9500
|
+
standard: p(s, Ic),
|
|
9167
9501
|
issues: s.issues
|
|
9168
9502
|
};
|
|
9169
9503
|
if (n) {
|
|
9170
9504
|
let e = r.find((e) => e.role === "manifest")?.path;
|
|
9171
9505
|
c.provenance = {
|
|
9172
9506
|
...e === void 0 ? {} : { manifest: e },
|
|
9173
|
-
constructs:
|
|
9507
|
+
constructs: rl(s.constructs ?? [], a, i?.id)
|
|
9174
9508
|
};
|
|
9175
9509
|
}
|
|
9176
9510
|
return c;
|
|
9177
9511
|
}
|
|
9178
|
-
function
|
|
9179
|
-
return
|
|
9512
|
+
function ol(e, t = {}) {
|
|
9513
|
+
return al(e, t);
|
|
9180
9514
|
}
|
|
9181
9515
|
var X = class extends Error {
|
|
9182
9516
|
rule;
|
|
@@ -9184,12 +9518,12 @@ var X = class extends Error {
|
|
|
9184
9518
|
super(t), this.rule = e, this.name = "CompositionError";
|
|
9185
9519
|
}
|
|
9186
9520
|
};
|
|
9187
|
-
function
|
|
9521
|
+
function sl(e) {
|
|
9188
9522
|
let t = [];
|
|
9189
9523
|
for (let n of [...e.uses ?? [], ...e.extends ? [e.extends] : []]) t.includes(n) || t.push(n);
|
|
9190
9524
|
return t;
|
|
9191
9525
|
}
|
|
9192
|
-
function
|
|
9526
|
+
function cl(e) {
|
|
9193
9527
|
return e.extends ? {
|
|
9194
9528
|
severity: "warning",
|
|
9195
9529
|
code: "extends-deprecated",
|
|
@@ -9198,25 +9532,25 @@ function zc(e) {
|
|
|
9198
9532
|
message: `package "${e.id}": 'extends ${e.extends}' is deprecated — declare 'uses { ${e.extends} }' instead (extends is treated as a single-entry uses)`
|
|
9199
9533
|
} : null;
|
|
9200
9534
|
}
|
|
9201
|
-
var
|
|
9202
|
-
function
|
|
9203
|
-
let n =
|
|
9535
|
+
var ll = /* @__PURE__ */ "approvals.roles.processes.processModels.pages.gateways.regs.references.provisions.dataclasses.events.enums.variables.notes.tables.figures.links.mapProfiles.viewProfiles.terms.forms.subforms.symbols.formulaNotes.calculations.verdicts.referenceMaterials.testPointSets.commonTestConditions.competenceKinds.schemeActivityKinds.schemeTypes.constraints.discrepancyRecords.stateMachines.conformanceTests.conformanceClasses.requirements.requirementClasses.instruments.attributeDefinitions.capabilities.behaviors.conditionSets.subjects.instances.quantityRegisters.duals.invariants.testSequences.formulasUsed.texts.participantKinds.governanceOrgans.declarationKinds.declarationStatuses.declarationGates.schemeDefinitions.schemeLifecycles.frameworkDocuments.documentPrecedences.autoInclusions.decisionRules.documentModules.informativeAnnexes.partAnnexes.demoWorlds.storylines.comments.predicates.artifactDefinitions.artifactInstances.activityArchetypes.connectorProfiles.monitors.passports.dataspaces.policies.dimensions".split(".");
|
|
9536
|
+
function ul(e, t) {
|
|
9537
|
+
let n = tl(Xc(e));
|
|
9204
9538
|
return {
|
|
9205
|
-
ctx: u(
|
|
9539
|
+
ctx: u(nl(n), Fc, t),
|
|
9206
9540
|
chunks: n
|
|
9207
9541
|
};
|
|
9208
9542
|
}
|
|
9209
|
-
function
|
|
9543
|
+
function dl(e, t, n, r = !1) {
|
|
9210
9544
|
let i = t.resolvePackage, a = n.id, o = /* @__PURE__ */ new Map([[a, (0, Y.resolve)(e)]]), s = /* @__PURE__ */ new Map([[a, n]]), c = [], l = /* @__PURE__ */ new Map(), u = [], d = (e) => {
|
|
9211
9545
|
l.set(e, 1), u.push(e);
|
|
9212
|
-
for (let t of
|
|
9546
|
+
for (let t of sl(s.get(e))) {
|
|
9213
9547
|
let n = l.get(t) ?? 0;
|
|
9214
9548
|
if (n === 1) throw new X("uses-cycle", `uses cycle: ${[...u.slice(u.indexOf(t)), t].join(" → ")} — package composition must be acyclic (uses-cycle)`);
|
|
9215
9549
|
if (n !== 2) {
|
|
9216
9550
|
if (!o.has(t)) {
|
|
9217
9551
|
let n = i(t);
|
|
9218
9552
|
if (!n) throw new X("uses-resolves", `package "${e}" uses "${t}", which the package locator cannot resolve (uses-resolves)`);
|
|
9219
|
-
let r =
|
|
9553
|
+
let r = il(n);
|
|
9220
9554
|
if (r.id !== t) throw new X("uses-resolves", `package "${e}" uses "${t}", but the located package (${(0, Y.resolve)(n)}) declares id "${r.id}" (uses-resolves)`);
|
|
9221
9555
|
if (o.set(t, n), s.set(t, r), r.kind === "product_reference") {
|
|
9222
9556
|
l.set(t, 2);
|
|
@@ -9234,13 +9568,13 @@ function Hc(e, t, n, r = !1) {
|
|
|
9234
9568
|
withProvenance: !0
|
|
9235
9569
|
} : t, m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
9236
9570
|
for (let e of c) {
|
|
9237
|
-
let t =
|
|
9571
|
+
let t = ul(o.get(e), f);
|
|
9238
9572
|
m.set(e, t.ctx), h.set(e, t.chunks);
|
|
9239
9573
|
}
|
|
9240
9574
|
let g = /* @__PURE__ */ new Map();
|
|
9241
|
-
for (let e of
|
|
9575
|
+
for (let e of ll) g.set(e, /* @__PURE__ */ new Map());
|
|
9242
9576
|
let _ = m.get(c[0]);
|
|
9243
|
-
for (let e of
|
|
9577
|
+
for (let e of ll) for (let t of Object.keys(_[e])) g.get(e).set(t, c[0]);
|
|
9244
9578
|
let v = /* @__PURE__ */ new Map(), y = (e, t) => {
|
|
9245
9579
|
for (let n of Object.values(t.documentModules)) n.namespace !== "" && !v.has(n.namespace) && v.set(n.namespace, e);
|
|
9246
9580
|
for (let n of Object.keys(t.requirementClasses)) v.has(n) || v.set(n, e);
|
|
@@ -9254,7 +9588,7 @@ function Hc(e, t, n, r = !1) {
|
|
|
9254
9588
|
for (let e of c.slice(1)) {
|
|
9255
9589
|
let t = m.get(e);
|
|
9256
9590
|
b(e, t);
|
|
9257
|
-
for (let n of
|
|
9591
|
+
for (let n of ll) {
|
|
9258
9592
|
let r = _[n], i = g.get(n);
|
|
9259
9593
|
for (let [a, o] of Object.entries(t[n])) {
|
|
9260
9594
|
let t = i.get(a);
|
|
@@ -9283,12 +9617,12 @@ function Hc(e, t, n, r = !1) {
|
|
|
9283
9617
|
}
|
|
9284
9618
|
});
|
|
9285
9619
|
for (let e of s.values()) {
|
|
9286
|
-
let t =
|
|
9620
|
+
let t = cl(e);
|
|
9287
9621
|
t && x.push(t);
|
|
9288
9622
|
}
|
|
9289
9623
|
_.packageManifest = n;
|
|
9290
9624
|
let S = {
|
|
9291
|
-
standard: p(_,
|
|
9625
|
+
standard: p(_, Ic),
|
|
9292
9626
|
issues: [..._.issues, ...x],
|
|
9293
9627
|
composition: {
|
|
9294
9628
|
root: a,
|
|
@@ -9298,7 +9632,7 @@ function Hc(e, t, n, r = !1) {
|
|
|
9298
9632
|
if (r) {
|
|
9299
9633
|
let t = {};
|
|
9300
9634
|
for (let e of c) {
|
|
9301
|
-
let n =
|
|
9635
|
+
let n = rl(m.get(e).constructs ?? [], h.get(e), e);
|
|
9302
9636
|
for (let [e, r] of Object.entries(n)) {
|
|
9303
9637
|
let n = t[e] ??= {};
|
|
9304
9638
|
for (let [e, t] of Object.entries(r)) n[e] = t;
|
|
@@ -9313,7 +9647,7 @@ function Hc(e, t, n, r = !1) {
|
|
|
9313
9647
|
}
|
|
9314
9648
|
//#endregion
|
|
9315
9649
|
//#region src/ser-des/prm.ts
|
|
9316
|
-
var
|
|
9650
|
+
var fl = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), pl = /* @__PURE__ */ new Set([
|
|
9317
9651
|
"full",
|
|
9318
9652
|
"minimal",
|
|
9319
9653
|
"partial",
|
|
@@ -9322,7 +9656,7 @@ var Uc = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), Wc = /* @__PURE__
|
|
|
9322
9656
|
function Z(e) {
|
|
9323
9657
|
throw Error(`.prm parse error: ${e}`);
|
|
9324
9658
|
}
|
|
9325
|
-
function
|
|
9659
|
+
function ml(e, t) {
|
|
9326
9660
|
let n = {
|
|
9327
9661
|
description: "",
|
|
9328
9662
|
justification: "",
|
|
@@ -9331,9 +9665,9 @@ function Gc(e, t) {
|
|
|
9331
9665
|
if (e == null) return n;
|
|
9332
9666
|
(typeof e != "object" || Array.isArray(e)) && Z(`${t}: pair metadata must be an object`);
|
|
9333
9667
|
let r = e;
|
|
9334
|
-
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" || !
|
|
9668
|
+
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" || !pl.has(r.coverage)) && Z(`${t}: "coverage" must be one of full | minimal | partial | none`), n.coverage = r.coverage), n;
|
|
9335
9669
|
}
|
|
9336
|
-
function
|
|
9670
|
+
function hl(e) {
|
|
9337
9671
|
let t;
|
|
9338
9672
|
try {
|
|
9339
9673
|
t = JSON.parse(e);
|
|
@@ -9342,7 +9676,7 @@ function Kc(e) {
|
|
|
9342
9676
|
}
|
|
9343
9677
|
(typeof t != "object" || !t || Array.isArray(t)) && Z("top level must be an object");
|
|
9344
9678
|
let n = t, r = typeof n["@type"] == "string" ? n["@type"] : "";
|
|
9345
|
-
|
|
9679
|
+
fl.has(r) || Z(`"@type" must be MMEL_MAP or Primmel_MAP (got "${r}")`);
|
|
9346
9680
|
let i = {
|
|
9347
9681
|
context: typeof n["@context"] == "string" ? n["@context"] : "",
|
|
9348
9682
|
type: r,
|
|
@@ -9358,20 +9692,20 @@ function Kc(e) {
|
|
|
9358
9692
|
coverage: {}
|
|
9359
9693
|
}, a = n.coverage ?? {};
|
|
9360
9694
|
(typeof a != "object" || !a || Array.isArray(a)) && Z(`mapSet."${e}".coverage: must be an object`);
|
|
9361
|
-
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !
|
|
9695
|
+
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !pl.has(n)) && Z(`mapSet."${e}".coverage."${t}": must be one of full | minimal | partial | none`), r.coverage[t] = n;
|
|
9362
9696
|
let o = n.mappings ?? {};
|
|
9363
9697
|
(typeof o != "object" || !o || Array.isArray(o)) && Z(`mapSet."${e}".mappings: must be an object`);
|
|
9364
9698
|
for (let [t, n] of Object.entries(o)) {
|
|
9365
9699
|
(typeof n != "object" || !n || Array.isArray(n)) && Z(`mapSet."${e}".mappings."${t}": must be an object`);
|
|
9366
9700
|
let i = {};
|
|
9367
|
-
for (let [r, a] of Object.entries(n)) i[r] =
|
|
9701
|
+
for (let [r, a] of Object.entries(n)) i[r] = ml(a, `mapSet."${e}".mappings."${t}"."${r}"`);
|
|
9368
9702
|
r.mappings[t] = i;
|
|
9369
9703
|
}
|
|
9370
9704
|
i.mapSet[e] = r;
|
|
9371
9705
|
}
|
|
9372
9706
|
return i;
|
|
9373
9707
|
}
|
|
9374
|
-
function
|
|
9708
|
+
function gl(e) {
|
|
9375
9709
|
let t = {};
|
|
9376
9710
|
e.context && (t["@context"] = e.context), t["@type"] = e.type || "Primmel_MAP", t.id = e.id;
|
|
9377
9711
|
let n = {};
|
|
@@ -9396,7 +9730,7 @@ function qc(e) {
|
|
|
9396
9730
|
}
|
|
9397
9731
|
return t.mapSet = n, JSON.stringify(t, null, 2) + "\n";
|
|
9398
9732
|
}
|
|
9399
|
-
function
|
|
9733
|
+
function _l(e) {
|
|
9400
9734
|
let t = [];
|
|
9401
9735
|
for (let [n, r] of Object.entries(e.mapSet)) {
|
|
9402
9736
|
let e = {};
|
|
@@ -9415,7 +9749,7 @@ function Jc(e) {
|
|
|
9415
9749
|
}
|
|
9416
9750
|
return t;
|
|
9417
9751
|
}
|
|
9418
|
-
function
|
|
9752
|
+
function vl(e, t) {
|
|
9419
9753
|
let n = {
|
|
9420
9754
|
context: "",
|
|
9421
9755
|
type: "Primmel_MAP",
|
|
@@ -9443,7 +9777,7 @@ function Yc(e, t) {
|
|
|
9443
9777
|
}
|
|
9444
9778
|
//#endregion
|
|
9445
9779
|
//#region src/type-expr.ts
|
|
9446
|
-
var
|
|
9780
|
+
var yl = [
|
|
9447
9781
|
"integer",
|
|
9448
9782
|
"float",
|
|
9449
9783
|
"double",
|
|
@@ -9458,8 +9792,8 @@ var Xc = [
|
|
|
9458
9792
|
"reference",
|
|
9459
9793
|
"object",
|
|
9460
9794
|
"any"
|
|
9461
|
-
],
|
|
9462
|
-
function
|
|
9795
|
+
], bl = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
9796
|
+
function xl(e) {
|
|
9463
9797
|
let t = 0;
|
|
9464
9798
|
for (let n = 0; n < e.length; n++) {
|
|
9465
9799
|
let r = e[n];
|
|
@@ -9469,33 +9803,33 @@ function Qc(e) {
|
|
|
9469
9803
|
}
|
|
9470
9804
|
return null;
|
|
9471
9805
|
}
|
|
9472
|
-
function
|
|
9806
|
+
function Sl(e) {
|
|
9473
9807
|
let t = e.trim();
|
|
9474
9808
|
if (t === "QuantityValue") return { kind: "quantity" };
|
|
9475
|
-
if (
|
|
9809
|
+
if (yl.includes(t)) return {
|
|
9476
9810
|
kind: "primitive",
|
|
9477
9811
|
name: t
|
|
9478
9812
|
};
|
|
9479
9813
|
let n = /^reference\(([^)]+)\)$/.exec(t);
|
|
9480
9814
|
if (n) {
|
|
9481
9815
|
let e = n[1].trim();
|
|
9482
|
-
return
|
|
9816
|
+
return bl.test(e) ? {
|
|
9483
9817
|
kind: "reference",
|
|
9484
9818
|
target: e
|
|
9485
9819
|
} : null;
|
|
9486
9820
|
}
|
|
9487
9821
|
if (t.startsWith("map<") && t.endsWith(">")) {
|
|
9488
|
-
let e =
|
|
9822
|
+
let e = xl(t.slice(4, -1));
|
|
9489
9823
|
if (!e) return null;
|
|
9490
9824
|
let n = e[0].trim(), r = null;
|
|
9491
9825
|
n === "string" ? r = {
|
|
9492
9826
|
kind: "primitive",
|
|
9493
9827
|
name: "string"
|
|
9494
|
-
} :
|
|
9828
|
+
} : bl.test(n) && (r = {
|
|
9495
9829
|
kind: "reference",
|
|
9496
9830
|
target: n
|
|
9497
9831
|
});
|
|
9498
|
-
let i =
|
|
9832
|
+
let i = Sl(e[1]);
|
|
9499
9833
|
return !r || !i ? null : {
|
|
9500
9834
|
kind: "map",
|
|
9501
9835
|
key: r,
|
|
@@ -9504,13 +9838,13 @@ function $c(e) {
|
|
|
9504
9838
|
}
|
|
9505
9839
|
return null;
|
|
9506
9840
|
}
|
|
9507
|
-
function
|
|
9508
|
-
let t =
|
|
9841
|
+
function Cl(e) {
|
|
9842
|
+
let t = Sl(e);
|
|
9509
9843
|
return t !== null && t.kind === "map";
|
|
9510
9844
|
}
|
|
9511
9845
|
//#endregion
|
|
9512
9846
|
//#region src/mapping-coverage.ts
|
|
9513
|
-
function
|
|
9847
|
+
function wl(e, t) {
|
|
9514
9848
|
let n = e.indexOf("#");
|
|
9515
9849
|
if (n >= 0) {
|
|
9516
9850
|
let t = e.slice(0, n), r = e.slice(n + 1);
|
|
@@ -9526,12 +9860,12 @@ function tl(e, t) {
|
|
|
9526
9860
|
qualified: t + "#" + e
|
|
9527
9861
|
};
|
|
9528
9862
|
}
|
|
9529
|
-
function
|
|
9863
|
+
function Tl(e, t) {
|
|
9530
9864
|
let n = [];
|
|
9531
9865
|
for (let [r, i] of Object.entries(e.mappings)) for (let a of i) n.push({
|
|
9532
9866
|
source: r,
|
|
9533
9867
|
sourceModel: t,
|
|
9534
|
-
target:
|
|
9868
|
+
target: wl(a.target, e.namespace).qualified,
|
|
9535
9869
|
targetModel: e.namespace,
|
|
9536
9870
|
description: a.description,
|
|
9537
9871
|
justification: a.justification,
|
|
@@ -9539,12 +9873,12 @@ function nl(e, t) {
|
|
|
9539
9873
|
});
|
|
9540
9874
|
return n;
|
|
9541
9875
|
}
|
|
9542
|
-
function
|
|
9876
|
+
function El(e, t = {}) {
|
|
9543
9877
|
let n = t.modelId ?? e.packageManifest?.id ?? e.meta?.namespace ?? "", r = [...e.mapProfiles ?? []], i = t.prm ? Array.isArray(t.prm) ? t.prm : [t.prm] : [];
|
|
9544
|
-
for (let e of i) r.push(...
|
|
9545
|
-
return r.flatMap((e) =>
|
|
9878
|
+
for (let e of i) r.push(..._l(e));
|
|
9879
|
+
return r.flatMap((e) => Tl(e, n));
|
|
9546
9880
|
}
|
|
9547
|
-
function
|
|
9881
|
+
function Dl(e, t = {}) {
|
|
9548
9882
|
let n = t.idPrefix ?? "", r = (e.processes ?? []).filter((e) => !n || e.id.startsWith(n)), i = new Set(r.map((e) => e.id)), a = /* @__PURE__ */ new Map();
|
|
9549
9883
|
for (let e of r) a.set(e.id, {
|
|
9550
9884
|
id: e.id.slice(n.length),
|
|
@@ -9558,18 +9892,18 @@ function il(e, t = {}) {
|
|
|
9558
9892
|
}
|
|
9559
9893
|
return o;
|
|
9560
9894
|
}
|
|
9561
|
-
function
|
|
9895
|
+
function Ol(e, t) {
|
|
9562
9896
|
return t.length === 0 ? "none" : t.every((e) => e === "full") ? "full" : e === "gateway" && t.some((e) => e === "full" || e === "minimal") ? "minimal" : t.some((e) => e !== "none") ? "partial" : "none";
|
|
9563
9897
|
}
|
|
9564
|
-
function
|
|
9565
|
-
let a = Array.isArray(t) ? t :
|
|
9898
|
+
function kl(e, t, n, r, i = {}) {
|
|
9899
|
+
let a = Array.isArray(t) ? t : Dl(t), o = n.filter((e) => e.targetModel === r), s = /* @__PURE__ */ new Map();
|
|
9566
9900
|
for (let e of o) {
|
|
9567
|
-
let t =
|
|
9901
|
+
let t = wl(e.target, r).id;
|
|
9568
9902
|
(s.get(t) ?? s.set(t, []).get(t)).push(e.source);
|
|
9569
9903
|
}
|
|
9570
9904
|
let c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = (e, t) => {
|
|
9571
9905
|
let n = s.has(e.id), r = n ? e.id : t, i = e.children.map((e) => u(e, r)), a;
|
|
9572
|
-
return r === null ? a = e.children.length === 0 ? "none" :
|
|
9906
|
+
return r === null ? a = e.children.length === 0 ? "none" : Ol(e.composition, i) : (a = "full", !n && t !== null && l.set(e.id, t)), c.set(e.id, a), a;
|
|
9573
9907
|
};
|
|
9574
9908
|
for (let e of a) u(e, null);
|
|
9575
9909
|
let d = [], f = /* @__PURE__ */ new Map(), p = (e) => {
|
|
@@ -9591,7 +9925,7 @@ function ol(e, t, n, r, i = {}) {
|
|
|
9591
9925
|
for (let e of d) m[e.coverage]++;
|
|
9592
9926
|
let h = [], g = /* @__PURE__ */ new Set();
|
|
9593
9927
|
for (let e of o) {
|
|
9594
|
-
let t =
|
|
9928
|
+
let t = wl(e.target, r).id;
|
|
9595
9929
|
f.has(t) ? g.add(e.source) : h.push({
|
|
9596
9930
|
source: e.source,
|
|
9597
9931
|
target: e.target
|
|
@@ -9602,7 +9936,7 @@ function ol(e, t, n, r, i = {}) {
|
|
|
9602
9936
|
y.has(t) || (y.add(t), v.push(e));
|
|
9603
9937
|
};
|
|
9604
9938
|
for (let e of o) {
|
|
9605
|
-
let t =
|
|
9939
|
+
let t = wl(e.target, r).id, n = f.get(t);
|
|
9606
9940
|
if (!n) continue;
|
|
9607
9941
|
let i = (e, t) => {
|
|
9608
9942
|
for (let n of e.children) t.push(n), i(n, t);
|
|
@@ -9649,7 +9983,7 @@ function ol(e, t, n, r, i = {}) {
|
|
|
9649
9983
|
summary: m
|
|
9650
9984
|
};
|
|
9651
9985
|
}
|
|
9652
|
-
function
|
|
9986
|
+
function Al(e) {
|
|
9653
9987
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
9654
9988
|
for (let r of e) for (let i of r.mappings) for (let r of e) if (r.modelId === i.targetModel) for (let e of r.mappings) {
|
|
9655
9989
|
if (i.target !== `${r.modelId}#${e.source}`) continue;
|
|
@@ -9667,7 +10001,7 @@ function sl(e) {
|
|
|
9667
10001
|
}
|
|
9668
10002
|
return t;
|
|
9669
10003
|
}
|
|
9670
|
-
function
|
|
10004
|
+
function jl(e) {
|
|
9671
10005
|
let t = /* @__PURE__ */ new Map();
|
|
9672
10006
|
for (let n of e) for (let e of n.mappings) {
|
|
9673
10007
|
let r = `${n.modelId}→${e.targetModel}`, i = t.get(r) ?? {
|
|
@@ -9679,14 +10013,14 @@ function cl(e) {
|
|
|
9679
10013
|
}
|
|
9680
10014
|
return [...t.values()];
|
|
9681
10015
|
}
|
|
9682
|
-
function
|
|
10016
|
+
function Ml(e) {
|
|
9683
10017
|
if (e && typeof e == "object") {
|
|
9684
|
-
for (let t of Object.values(e))
|
|
10018
|
+
for (let t of Object.values(e)) Ml(t);
|
|
9685
10019
|
Object.freeze(e);
|
|
9686
10020
|
}
|
|
9687
10021
|
return e;
|
|
9688
10022
|
}
|
|
9689
|
-
function
|
|
10023
|
+
function Nl(e, t, n = null) {
|
|
9690
10024
|
let r = new Set(t.visibleElements ?? []), i = r.size > 0, a = i ? [...r] : (e.processes ?? []).map((e) => e.id), o = null;
|
|
9691
10025
|
if (n) {
|
|
9692
10026
|
let e = n.components.filter((e) => !i || r.has(e.id) || e.mappedBy.some((e) => r.has(e))), t = {
|
|
@@ -9704,14 +10038,14 @@ function ul(e, t, n = null) {
|
|
|
9704
10038
|
summary: t
|
|
9705
10039
|
};
|
|
9706
10040
|
}
|
|
9707
|
-
return
|
|
10041
|
+
return Ml({
|
|
9708
10042
|
id: t.id,
|
|
9709
10043
|
against: t.against ?? "",
|
|
9710
10044
|
elements: a,
|
|
9711
10045
|
coverage: o
|
|
9712
10046
|
});
|
|
9713
10047
|
}
|
|
9714
|
-
function
|
|
10048
|
+
function Pl(e) {
|
|
9715
10049
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
9716
10050
|
for (let n of e ?? []) t.add(n.id);
|
|
9717
10051
|
};
|
|
@@ -9728,13 +10062,13 @@ function dl(e) {
|
|
|
9728
10062
|
}
|
|
9729
10063
|
//#endregion
|
|
9730
10064
|
//#region src/model-diff.ts
|
|
9731
|
-
var
|
|
10065
|
+
var Fl = [
|
|
9732
10066
|
"foundations",
|
|
9733
10067
|
"primary",
|
|
9734
10068
|
"secondary",
|
|
9735
10069
|
"tertiary",
|
|
9736
10070
|
"cross-cutting"
|
|
9737
|
-
],
|
|
10071
|
+
], Il = {
|
|
9738
10072
|
terms: "foundations",
|
|
9739
10073
|
references: "foundations",
|
|
9740
10074
|
roles: "foundations",
|
|
@@ -9763,10 +10097,12 @@ var fl = [
|
|
|
9763
10097
|
forms: "secondary",
|
|
9764
10098
|
subforms: "secondary",
|
|
9765
10099
|
symbols: "secondary",
|
|
10100
|
+
formulaNotes: "tertiary",
|
|
9766
10101
|
calculations: "secondary",
|
|
9767
10102
|
verdicts: "secondary",
|
|
9768
10103
|
tables: "secondary",
|
|
9769
10104
|
testPointSets: "secondary",
|
|
10105
|
+
commonTestConditions: "tertiary",
|
|
9770
10106
|
referenceMaterials: "secondary",
|
|
9771
10107
|
processes: "tertiary",
|
|
9772
10108
|
processModels: "tertiary",
|
|
@@ -9784,6 +10120,9 @@ var fl = [
|
|
|
9784
10120
|
provisions: "tertiary",
|
|
9785
10121
|
notes: "cross-cutting",
|
|
9786
10122
|
informativeAnnexes: "cross-cutting",
|
|
10123
|
+
partAnnexes: "cross-cutting",
|
|
10124
|
+
demoWorlds: "tertiary",
|
|
10125
|
+
storylines: "tertiary",
|
|
9787
10126
|
invariants: "cross-cutting",
|
|
9788
10127
|
testSequences: "cross-cutting",
|
|
9789
10128
|
formulasUsed: "cross-cutting",
|
|
@@ -9802,9 +10141,9 @@ function Q(e) {
|
|
|
9802
10141
|
};
|
|
9803
10142
|
return n(e);
|
|
9804
10143
|
}
|
|
9805
|
-
var
|
|
9806
|
-
function
|
|
9807
|
-
let r = e ?? "", i = n ?? "", a =
|
|
10144
|
+
var Ll = /#([^#]*)$/;
|
|
10145
|
+
function Rl(e, t, n = "") {
|
|
10146
|
+
let r = e ?? "", i = n ?? "", a = Ll.exec(r);
|
|
9808
10147
|
a && (r = r.slice(0, a.index), i ||= a[1]);
|
|
9809
10148
|
let o = r.lastIndexOf(":"), s = r, c = "";
|
|
9810
10149
|
if (o >= 0) {
|
|
@@ -9818,11 +10157,11 @@ function hl(e, t, n = "") {
|
|
|
9818
10157
|
fragment: i
|
|
9819
10158
|
};
|
|
9820
10159
|
}
|
|
9821
|
-
var
|
|
10160
|
+
var zl = [
|
|
9822
10161
|
"source",
|
|
9823
10162
|
"sourceRef",
|
|
9824
10163
|
"sourceRefs"
|
|
9825
|
-
],
|
|
10164
|
+
], Bl = {
|
|
9826
10165
|
requirements: {
|
|
9827
10166
|
statement: [
|
|
9828
10167
|
"name",
|
|
@@ -9871,7 +10210,7 @@ var gl = [
|
|
|
9871
10210
|
"profile"
|
|
9872
10211
|
]
|
|
9873
10212
|
}
|
|
9874
|
-
},
|
|
10213
|
+
}, Vl = [
|
|
9875
10214
|
"name",
|
|
9876
10215
|
"label",
|
|
9877
10216
|
"title",
|
|
@@ -9880,16 +10219,16 @@ var gl = [
|
|
|
9880
10219
|
"statement",
|
|
9881
10220
|
"purpose",
|
|
9882
10221
|
"text"
|
|
9883
|
-
],
|
|
10222
|
+
], Hl = [
|
|
9884
10223
|
"parent",
|
|
9885
10224
|
"bindsTo",
|
|
9886
10225
|
"targets",
|
|
9887
10226
|
"conformanceProcessId",
|
|
9888
10227
|
"conformanceProcessIds"
|
|
9889
10228
|
];
|
|
9890
|
-
function
|
|
10229
|
+
function Ul(e) {
|
|
9891
10230
|
let t = {}, n = (e, n) => {
|
|
9892
|
-
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(
|
|
10231
|
+
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(Rl(n.doc ?? "", n.clause ?? "", n.fragment));
|
|
9893
10232
|
};
|
|
9894
10233
|
n("source", e.source), n("sourceRef", e.sourceRef);
|
|
9895
10234
|
for (let t of e.sourceRefs ?? []) n("sourceRefs", t);
|
|
@@ -9901,7 +10240,7 @@ function bl(e) {
|
|
|
9901
10240
|
let i = (e) => {
|
|
9902
10241
|
let t = /* @__PURE__ */ new Set();
|
|
9903
10242
|
return e.filter((e) => {
|
|
9904
|
-
let n =
|
|
10243
|
+
let n = Wl(e);
|
|
9905
10244
|
return !t.has(n) && (t.add(n), !0);
|
|
9906
10245
|
});
|
|
9907
10246
|
};
|
|
@@ -9911,17 +10250,17 @@ function bl(e) {
|
|
|
9911
10250
|
channels: t
|
|
9912
10251
|
};
|
|
9913
10252
|
}
|
|
9914
|
-
function
|
|
10253
|
+
function Wl(e) {
|
|
9915
10254
|
return Q({
|
|
9916
10255
|
basis: e.basis,
|
|
9917
10256
|
clause: e.clause,
|
|
9918
10257
|
fragment: e.fragment
|
|
9919
10258
|
});
|
|
9920
10259
|
}
|
|
9921
|
-
function
|
|
9922
|
-
let n = String(t.id ?? t.entityName ?? ""), r =
|
|
10260
|
+
function Gl(e, t) {
|
|
10261
|
+
let n = String(t.id ?? t.entityName ?? ""), r = Il[e] ?? "cross-cutting", { edges: i, channels: a } = Ul(t), o = new Set(zl);
|
|
9923
10262
|
typeof t.reference == "string" && t.reference.startsWith("urn:") && o.add("reference");
|
|
9924
|
-
let s = {}, c = {}, l =
|
|
10263
|
+
let s = {}, c = {}, l = Bl[e], u = (e) => {
|
|
9925
10264
|
let n = {};
|
|
9926
10265
|
for (let r of e) t[r] !== void 0 && (n[r] = t[r], o.add(r), s[r] = t[r]);
|
|
9927
10266
|
return n;
|
|
@@ -9941,9 +10280,9 @@ function Sl(e, t) {
|
|
|
9941
10280
|
c[`spelling:${t.spelling}`] = Q(e), s[`spelling:${t.spelling}`] = e;
|
|
9942
10281
|
}
|
|
9943
10282
|
} else {
|
|
9944
|
-
let e = u(
|
|
10283
|
+
let e = u(Vl);
|
|
9945
10284
|
Object.keys(e).length > 0 && (c.statement = Q(e));
|
|
9946
|
-
let t = u(
|
|
10285
|
+
let t = u(Hl);
|
|
9947
10286
|
Object.keys(t).length > 0 && (c.anchor = Q(t));
|
|
9948
10287
|
}
|
|
9949
10288
|
if (i.length > 0) {
|
|
@@ -9970,31 +10309,31 @@ function Sl(e, t) {
|
|
|
9970
10309
|
provenance: i
|
|
9971
10310
|
};
|
|
9972
10311
|
}
|
|
9973
|
-
function
|
|
10312
|
+
function Kl(e, t) {
|
|
9974
10313
|
let n = /* @__PURE__ */ new Map();
|
|
9975
|
-
for (let r of Object.keys(
|
|
10314
|
+
for (let r of Object.keys(Il)) {
|
|
9976
10315
|
let i = e[r];
|
|
9977
10316
|
if (Array.isArray(i)) {
|
|
9978
10317
|
for (let e of i) if (e && typeof e == "object" && ("id" in e || "entityName" in e)) {
|
|
9979
|
-
let i =
|
|
10318
|
+
let i = Gl(r, e);
|
|
9980
10319
|
n.has(i.key) && t?.push(i.key), n.set(i.key, i);
|
|
9981
10320
|
}
|
|
9982
10321
|
}
|
|
9983
10322
|
}
|
|
9984
10323
|
return n;
|
|
9985
10324
|
}
|
|
9986
|
-
function
|
|
10325
|
+
function ql(e, t) {
|
|
9987
10326
|
return `${e}#${t}`;
|
|
9988
10327
|
}
|
|
9989
10328
|
function $(e) {
|
|
9990
10329
|
return e?.version ?? "";
|
|
9991
10330
|
}
|
|
9992
|
-
function
|
|
10331
|
+
function Jl(e) {
|
|
9993
10332
|
let t = [...new Set(e)].sort();
|
|
9994
10333
|
return t.filter((e) => !t.some((t) => t !== e && e.startsWith(t + ".")));
|
|
9995
10334
|
}
|
|
9996
|
-
function
|
|
9997
|
-
let r = n.mappingsA ??
|
|
10335
|
+
function Yl(e, t, n) {
|
|
10336
|
+
let r = n.mappingsA ?? El(e), i = n.mappingsB ?? El(t), a = (e) => `${e.sourceModel}#${e.source}⇒${e.target}`, o = new Map(r.map((e) => [a(e), e])), s = new Map(i.map((e) => [a(e), e])), c = [], l = [], u = [];
|
|
9998
10337
|
for (let [e, t] of s) o.has(e) || c.push(t);
|
|
9999
10338
|
for (let [e, t] of o) {
|
|
10000
10339
|
let n = s.get(e);
|
|
@@ -10015,7 +10354,7 @@ function El(e, t, n) {
|
|
|
10015
10354
|
let o = (e) => {
|
|
10016
10355
|
let t = n.references?.[a];
|
|
10017
10356
|
if (t) return t;
|
|
10018
|
-
let r =
|
|
10357
|
+
let r = Dl(e, { idPrefix: `${a}#` });
|
|
10019
10358
|
return r.length > 0 ? r : null;
|
|
10020
10359
|
}, s = o(e), c = o(t);
|
|
10021
10360
|
if (!s && !c) {
|
|
@@ -10024,11 +10363,11 @@ function El(e, t, n) {
|
|
|
10024
10363
|
}
|
|
10025
10364
|
let l = /* @__PURE__ */ new Map();
|
|
10026
10365
|
if (s) {
|
|
10027
|
-
let t =
|
|
10366
|
+
let t = kl(e, s, r, a);
|
|
10028
10367
|
for (let e of t.components) l.set(e.id, { from: e.coverage });
|
|
10029
10368
|
}
|
|
10030
10369
|
if (c) {
|
|
10031
|
-
let e =
|
|
10370
|
+
let e = kl(t, c, i, a);
|
|
10032
10371
|
for (let t of e.components) {
|
|
10033
10372
|
let e = l.get(t.id) ?? {};
|
|
10034
10373
|
e.to = t.coverage, l.set(t.id, e);
|
|
@@ -10052,12 +10391,12 @@ function El(e, t, n) {
|
|
|
10052
10391
|
namespacesSkipped: p
|
|
10053
10392
|
};
|
|
10054
10393
|
}
|
|
10055
|
-
function
|
|
10394
|
+
function Xl(e, t) {
|
|
10056
10395
|
let n = [];
|
|
10057
10396
|
for (let [t, r] of e) {
|
|
10058
10397
|
let e = /* @__PURE__ */ new Set([...t.provenance.map((e) => e.basis), ...r.provenance.map((e) => e.basis)]);
|
|
10059
10398
|
for (let i of [...e].sort()) {
|
|
10060
|
-
let e = (e) =>
|
|
10399
|
+
let e = (e) => Jl(e.provenance.filter((e) => e.basis === i).map((e) => e.clause)).filter((e) => e.length > 0), a = e(t), o = e(r), s = a.filter((e) => !o.includes(e)), c = o.filter((e) => !a.includes(e));
|
|
10061
10400
|
if (s.length === 0 && c.length === 0) continue;
|
|
10062
10401
|
let l = {
|
|
10063
10402
|
key: t.key,
|
|
@@ -10107,7 +10446,7 @@ function Dl(e, t) {
|
|
|
10107
10446
|
}
|
|
10108
10447
|
let r = (e) => {
|
|
10109
10448
|
if (e.kind !== "renumbered" || !t.sentencesA || !t.sentencesB) return "unavailable";
|
|
10110
|
-
let n = t.sentencesA.get(
|
|
10449
|
+
let n = t.sentencesA.get(ql(e.doc, e.from)), r = t.sentencesB.get(ql(e.doc, e.to));
|
|
10111
10450
|
return n === void 0 || r === void 0 ? "unavailable" : n.replace(/\s+/g, " ").trim() === r.replace(/\s+/g, " ").trim() ? "same" : "differed";
|
|
10112
10451
|
}, i = /* @__PURE__ */ new Map();
|
|
10113
10452
|
for (let e of n) {
|
|
@@ -10123,21 +10462,21 @@ function Dl(e, t) {
|
|
|
10123
10462
|
}
|
|
10124
10463
|
return [...i.values()].sort((e, t) => `${e.doc} ${e.from} ${e.to}`.localeCompare(`${t.doc} ${t.from} ${t.to}`));
|
|
10125
10464
|
}
|
|
10126
|
-
function
|
|
10465
|
+
function Zl(e, t, n) {
|
|
10127
10466
|
return e.kind !== "texts" || !n.startsWith("spelling:") ? n : n in e.aspects ? n in t.aspects ? `${n} (changed)` : `${n} (removed)` : `${n} (added)`;
|
|
10128
10467
|
}
|
|
10129
|
-
var
|
|
10130
|
-
function
|
|
10131
|
-
if (
|
|
10468
|
+
var Ql = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
10469
|
+
function $l(e, t, n, r) {
|
|
10470
|
+
if (Ql(t) && Ql(n)) {
|
|
10132
10471
|
let i = [.../* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])].sort();
|
|
10133
|
-
for (let a of i)
|
|
10472
|
+
for (let a of i) $l(`${e}.${a}`, t[a], n[a], r);
|
|
10134
10473
|
return;
|
|
10135
10474
|
}
|
|
10136
10475
|
Q(t) !== Q(n) && r.push(e);
|
|
10137
10476
|
}
|
|
10138
|
-
function
|
|
10477
|
+
function eu(e, t) {
|
|
10139
10478
|
let n = [.../* @__PURE__ */ new Set([...Object.keys(e.fields), ...Object.keys(t.fields)])].sort(), r = [];
|
|
10140
|
-
for (let i of n)
|
|
10479
|
+
for (let i of n) $l(i, e.fields[i], t.fields[i], r);
|
|
10141
10480
|
let i = [
|
|
10142
10481
|
"source",
|
|
10143
10482
|
"sourceRef",
|
|
@@ -10150,8 +10489,8 @@ function jl(e, t) {
|
|
|
10150
10489
|
return !a.has(r) && (a.add(r), !0);
|
|
10151
10490
|
});
|
|
10152
10491
|
}
|
|
10153
|
-
function
|
|
10154
|
-
let r = [], i = [], a =
|
|
10492
|
+
function tu(e, t, n = {}) {
|
|
10493
|
+
let r = [], i = [], a = Kl(e, r), o = Kl(t, i), s = [], c = [], l = [], u = [], d = [], f = 0, p = Object.fromEntries(Fl.map((e) => [e, {
|
|
10155
10494
|
added: 0,
|
|
10156
10495
|
removed: 0,
|
|
10157
10496
|
changed: 0,
|
|
@@ -10189,11 +10528,11 @@ function Ml(e, t, n = {}) {
|
|
|
10189
10528
|
id: t.id,
|
|
10190
10529
|
kind: t.kind,
|
|
10191
10530
|
tier: t.tier,
|
|
10192
|
-
aspects: r.map((e) =>
|
|
10193
|
-
fields:
|
|
10531
|
+
aspects: r.map((e) => Zl(t, n, e)).sort(),
|
|
10532
|
+
fields: eu(t, n)
|
|
10194
10533
|
}), p[t.tier].changed++);
|
|
10195
10534
|
}
|
|
10196
|
-
let m =
|
|
10535
|
+
let m = Yl(e, t, n), h = Xl(d, n), g = s.length === 0 && c.length === 0 && l.length === 0 && u.length === 0 && m.added.length === 0 && m.removed.length === 0 && m.changed.length === 0 && m.coverageDelta.length === 0 && h.length === 0, _ = e.packageManifest, v = t.packageManifest, y = n.aLabel ?? (_?.id ? `${_.id}@${$(_) || "?"}` : "a"), b = n.bLabel ?? (v?.id ? `${v.id}@${$(v) || "?"}` : "b"), x = !!_?.id && _.id === v?.id && $(_) !== $(v), S = (e, t) => `${e}: duplicate element ${t} — the last declaration wins (a data error the duplicate-id linter owns); this side under-reports`, C = [...r.map((e) => S(y, e)), ...i.map((e) => S(b, e))];
|
|
10197
10536
|
return {
|
|
10198
10537
|
aLabel: y,
|
|
10199
10538
|
bLabel: b,
|
|
@@ -10212,40 +10551,40 @@ function Ml(e, t, n = {}) {
|
|
|
10212
10551
|
empty: g
|
|
10213
10552
|
};
|
|
10214
10553
|
}
|
|
10215
|
-
function
|
|
10554
|
+
function nu(e) {
|
|
10216
10555
|
return `[${e.tier}/${e.kind}] ${e.id}`;
|
|
10217
10556
|
}
|
|
10218
|
-
function
|
|
10557
|
+
function ru(e, t) {
|
|
10219
10558
|
try {
|
|
10220
10559
|
let n = e ? JSON.parse(e) : {}, r = t ? JSON.parse(t) : {}, i = [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].sort().filter((e) => Q(n[e]) !== Q(r[e])).map((e) => `${e}: ${Q(n[e])} → ${Q(r[e])}`);
|
|
10221
10560
|
if (i.length > 0) return i;
|
|
10222
10561
|
} catch {}
|
|
10223
10562
|
return [`from ${e}`, `to ${t}`];
|
|
10224
10563
|
}
|
|
10225
|
-
function
|
|
10564
|
+
function iu(e) {
|
|
10226
10565
|
let t = [], n = e.editionComparison ? `edition comparison — ${e.aLabel} → ${e.bLabel}` : `model diff — ${e.aLabel} → ${e.bLabel}`;
|
|
10227
10566
|
t.push(`primmel diff: ${n}`), t.push(""), t.push(`elements: +${e.added.length} -${e.removed.length} ~${e.changed.length} >${e.moved.length} (${e.unchanged} unchanged)`), t.push(""), t.push("by tier: added removed changed moved unchanged");
|
|
10228
|
-
for (let n of
|
|
10567
|
+
for (let n of Fl) {
|
|
10229
10568
|
let r = e.byTier[n];
|
|
10230
10569
|
t.push(` ${n.padEnd(13)} ${String(r.added).padStart(5)} ${String(r.removed).padStart(8)} ${String(r.changed).padStart(8)} ${String(r.moved).padStart(6)} ${String(r.unchanged).padStart(9)}`);
|
|
10231
10570
|
}
|
|
10232
10571
|
if (e.added.length > 0) {
|
|
10233
10572
|
t.push("", "added:");
|
|
10234
|
-
for (let n of e.added) t.push(` + ${
|
|
10573
|
+
for (let n of e.added) t.push(` + ${nu(n)}`);
|
|
10235
10574
|
}
|
|
10236
10575
|
if (e.removed.length > 0) {
|
|
10237
10576
|
t.push("", "removed:");
|
|
10238
|
-
for (let n of e.removed) t.push(` - ${
|
|
10577
|
+
for (let n of e.removed) t.push(` - ${nu(n)}`);
|
|
10239
10578
|
}
|
|
10240
10579
|
if (e.changed.length > 0) {
|
|
10241
10580
|
t.push("", "changed:");
|
|
10242
|
-
for (let n of e.changed) t.push(` ~ ${
|
|
10581
|
+
for (let n of e.changed) t.push(` ~ ${nu(n)} — ${n.aspects.join(", ")} (fields: ${n.fields.join(", ")})`);
|
|
10243
10582
|
}
|
|
10244
10583
|
if (e.moved.length > 0) {
|
|
10245
10584
|
t.push("", "moved (re-anchored):");
|
|
10246
10585
|
for (let n of e.moved) {
|
|
10247
|
-
t.push(` > ${
|
|
10248
|
-
for (let e of
|
|
10586
|
+
t.push(` > ${nu(n)}`);
|
|
10587
|
+
for (let e of ru(n.from, n.to)) t.push(` ${e}`);
|
|
10249
10588
|
}
|
|
10250
10589
|
}
|
|
10251
10590
|
if (e.warnings.length > 0) {
|
|
@@ -10270,27 +10609,27 @@ function Fl(e) {
|
|
|
10270
10609
|
}
|
|
10271
10610
|
//#endregion
|
|
10272
10611
|
//#region src/ser-des/index.ts
|
|
10273
|
-
function
|
|
10274
|
-
return p(u(e,
|
|
10612
|
+
function au(e, t = {}) {
|
|
10613
|
+
return p(u(e, Fc, t), Ic);
|
|
10275
10614
|
}
|
|
10276
|
-
function
|
|
10277
|
-
let n = u(e,
|
|
10615
|
+
function ou(e, t = {}) {
|
|
10616
|
+
let n = u(e, Fc, t);
|
|
10278
10617
|
return {
|
|
10279
|
-
standard: p(n,
|
|
10618
|
+
standard: p(n, Ic),
|
|
10280
10619
|
issues: n.issues
|
|
10281
10620
|
};
|
|
10282
10621
|
}
|
|
10283
|
-
function
|
|
10284
|
-
return
|
|
10622
|
+
function su(e, t = {}) {
|
|
10623
|
+
return au(Bc(e), t);
|
|
10285
10624
|
}
|
|
10286
|
-
function
|
|
10287
|
-
return
|
|
10625
|
+
function cu(e, t = {}) {
|
|
10626
|
+
return ou(Bc(e), t);
|
|
10288
10627
|
}
|
|
10289
|
-
function
|
|
10290
|
-
return qe(e,
|
|
10628
|
+
function lu(e) {
|
|
10629
|
+
return qe(e, Lc);
|
|
10291
10630
|
}
|
|
10292
|
-
function
|
|
10293
|
-
return
|
|
10631
|
+
function uu(e) {
|
|
10632
|
+
return Vc(e);
|
|
10294
10633
|
}
|
|
10295
10634
|
//#endregion
|
|
10296
|
-
export { X as CompositionError,
|
|
10635
|
+
export { X as CompositionError, Ki as ENDPOINT_ACCESS_SCOPES, Gi as ENDPOINT_OPERATION_KINDS, Go as PASSPORT_ACCESS_CLASSES, Wo as PASSPORT_CONTENT_CLASSES, Ko as PASSPORT_UPI_LEVELS, yl as PRIMITIVE_TYPES, Il as TIER_BY_FIELD, Fl as TIER_ORDER, Nl as applyView, Dl as buildProcessTree, Q as canonical, ql as clauseTextKey, El as collectMappings, Pl as componentIds, kl as computeCoverage, tu as diffStandards, Al as discoverTransitive, lu as dump, Ui as dumpPackage, gl as dumpPrm, sl as effectiveUses, Kl as elementIndex, iu as formatDiffReport, Qc as groupBySourceFile, Cl as isWellFormedMapType, au as load, su as loadFile, cu as loadFileWithIssues, Zc as loadPackage, ol as loadPackageWithIssues, $c as loadPackageWithProvenance, hl as loadPrm, ou as loadWithIssues, vl as mapProfilesToPrm, Tl as mappingsFromProfile, Rl as normalizeSourceRef, Xc as packageFiles, wl as parseTargetRef, Sl as parseTypeExpression, _l as prmToMapProfiles, il as readPackageManifest, jl as repoMap, uu as validate };
|