yarramate 1.15.2 → 1.16.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.
@@ -0,0 +1,3919 @@
1
+ // @ts-nocheck
2
+ // GENERATED by scripts/generate-validators.mjs. Do not edit; run
3
+ // `pnpm generate:validators`.
4
+ //
5
+ // The operations schema, emitted from an Ajv instance with `discriminator`
6
+ // enabled and so compiled with it. Its own module because each standalone
7
+ // emission owns its identifier namespace and two cannot share a file.
8
+ //
9
+ // schema sha256: a9b90820230efa04508aa52d88c39214fb0c7180f1aafd6ad08ef3647c7c84d9
10
+ "use strict";
11
+ export const validateOperations = validate20;
12
+ const schema31 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://yarrasys.dev/schema/yarramate-operations.schema.json", "title": "YarraMate operations document", "description": "An atomic batch of validated writes: every operation applies or none does. Documents are addressed by their workspace-manifest paths.", "type": "object", "additionalProperties": false, "required": ["format", "operations"], "properties": { "format": { "const": "yarramate/operations/v1" }, "operations": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/operation" } } }, "$defs": { "nonEmptyText": { "type": "string", "pattern": "\\S" }, "identifiedReference": { "type": "object", "additionalProperties": false, "required": ["id", "ref"], "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "ref": { "$ref": "#/$defs/nonEmptyText" } } }, "constraintReference": { "type": "object", "additionalProperties": false, "required": ["id", "ref"], "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "ref": { "$ref": "#/$defs/nonEmptyText" }, "expects": { "type": "object", "additionalProperties": false, "required": ["provider", "key", "value"], "properties": { "provider": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, "key": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$" }, "value": { "$ref": "#/$defs/nonEmptyText" } } } } }, "attestation": { "type": "object", "additionalProperties": false, "required": ["topic", "by", "on", "recordedBy"], "properties": { "topic": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }, "by": { "description": "The authority whose judgment this records, resolved against the model as a subject reference once the write lands.", "$ref": "#/$defs/nonEmptyText" }, "recordedBy": { "description": "Who is writing this record. Required here and optional in a document: a hand-written sign-off already has a committer, whereas a batch names the agent holding the pen, so an authority's judgment and a machine's transcription of one are never the same bytes.", "$ref": "#/$defs/nonEmptyText" }, "on": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" } } }, "conceptFields": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "kind": { "$ref": "#/$defs/nonEmptyText" }, "name": { "$ref": "#/$defs/nonEmptyText" }, "description": { "$ref": "#/$defs/nonEmptyText" }, "aka": { "description": "Alternative labels appended to the subject's aka list.", "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "status": { "enum": ["planned", "current", "retired"] }, "owner": { "$ref": "#/$defs/nonEmptyText" }, "distinctFrom": { "description": "Subjects this one has been judged genuinely different from, dismissing a near-duplicate question permanently (ADR 0077).", "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "supersedes": { "description": "Subjects whose responsibility this one took over, recording a rename, split, or merge (ADR 0080).", "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "constraints": { "type": "array", "items": { "$ref": "#/$defs/constraintReference" } }, "references": { "type": "array", "items": { "$ref": "#/$defs/identifiedReference" } }, "presentIn": { "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "attestations": { "type": "array", "items": { "$ref": "#/$defs/attestation" } } } }, "relationshipFields": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "kind": { "$ref": "#/$defs/nonEmptyText" }, "from": { "$ref": "#/$defs/nonEmptyText" }, "to": { "$ref": "#/$defs/nonEmptyText" }, "name": { "$ref": "#/$defs/nonEmptyText" }, "description": { "$ref": "#/$defs/nonEmptyText" }, "status": { "enum": ["planned", "current", "retired"] }, "mode": { "enum": ["read", "write", "read-write", "unspecified"] }, "content": { "$ref": "#/$defs/nonEmptyText" }, "references": { "type": "array", "items": { "$ref": "#/$defs/identifiedReference" } }, "presentIn": { "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } } } }, "subjectTarget": { "description": "A subject already declared in the named document, addressed by its local id. Deletes and renames name what is there rather than restating it.", "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "$ref": "#/$defs/nonEmptyText" } } }, "observationTarget": { "type": "object", "additionalProperties": false, "properties": { "subject": { "$ref": "#/$defs/nonEmptyText" }, "claim": { "$ref": "#/$defs/nonEmptyText" }, "key": { "$ref": "#/$defs/nonEmptyText" } }, "oneOf": [{ "required": ["subject"], "not": { "required": ["claim"] } }, { "required": ["claim"], "not": { "required": ["subject"] } }] }, "observationFields": { "type": "object", "additionalProperties": false, "dependentRequired": { "key": ["value"], "value": ["key"] }, "properties": { "subject": { "$ref": "#/$defs/nonEmptyText" }, "claim": { "$ref": "#/$defs/nonEmptyText" }, "key": { "$ref": "#/$defs/nonEmptyText" }, "value": { "$ref": "#/$defs/nonEmptyText" }, "result": { "enum": ["confirmed", "contradicted", "unknown", "not-observed"] }, "evidence": { "type": "object", "additionalProperties": false, "required": ["uri"], "properties": { "uri": { "$ref": "#/$defs/nonEmptyText" }, "message": { "$ref": "#/$defs/nonEmptyText" } } } }, "oneOf": [{ "required": ["subject"], "not": { "required": ["claim"] } }, { "required": ["claim"], "not": { "required": ["subject"] } }] }, "observationChange": { "type": "object", "additionalProperties": false, "dependentRequired": { "value": ["key"] }, "properties": { "subject": { "$ref": "#/$defs/nonEmptyText" }, "claim": { "$ref": "#/$defs/nonEmptyText" }, "key": { "$ref": "#/$defs/nonEmptyText" }, "value": { "$ref": "#/$defs/nonEmptyText" }, "result": { "enum": ["confirmed", "contradicted", "unknown", "not-observed"] }, "evidence": { "type": "object", "additionalProperties": false, "properties": { "uri": { "$ref": "#/$defs/nonEmptyText" }, "message": { "$ref": "#/$defs/nonEmptyText" } } } }, "oneOf": [{ "required": ["subject"], "not": { "required": ["claim"] } }, { "required": ["claim"], "not": { "required": ["subject"] } }] }, "operation": { "description": "A discriminated union: the `op` tag selects exactly one branch, so a malformed operation is reported against the shape its author named rather than against all nine.", "type": "object", "required": ["op"], "discriminator": { "propertyName": "op" }, "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["op", "document", "concept"], "properties": { "op": { "const": "add-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "allOf": [{ "$ref": "#/$defs/conceptFields" }, { "required": ["id", "kind", "name"], "type": "object" }] } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship"], "properties": { "op": { "const": "add-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "allOf": [{ "$ref": "#/$defs/relationshipFields" }, { "required": ["id", "kind", "from", "to"], "type": "object" }] } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "concept"], "properties": { "op": { "const": "update-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "allOf": [{ "$ref": "#/$defs/conceptFields" }, { "required": ["id"], "type": "object" }] }, "remove": { "type": "array", "minItems": 1, "items": { "enum": ["name", "description", "aka", "status", "owner", "distinctFrom", "supersedes", "constraints", "references", "presentIn", "attestations"] } } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship"], "properties": { "op": { "const": "update-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "allOf": [{ "$ref": "#/$defs/relationshipFields" }, { "required": ["id"], "type": "object" }] }, "remove": { "type": "array", "minItems": 1, "items": { "enum": ["name", "description", "status", "mode", "content", "references", "presentIn"] } } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "concept"], "properties": { "op": { "const": "delete-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "$ref": "#/$defs/subjectTarget" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship"], "properties": { "op": { "const": "delete-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "$ref": "#/$defs/subjectTarget" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "concept", "to"], "properties": { "op": { "const": "rename-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "$ref": "#/$defs/subjectTarget" }, "to": { "description": "The local id this subject should have had. Every declarative reference to the old address is re-pointed in the same batch; prose is left exactly as written.", "$ref": "#/$defs/nonEmptyText" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship", "to"], "properties": { "op": { "const": "rename-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "$ref": "#/$defs/subjectTarget" }, "to": { "description": "The local id this subject should have had. Sits at the operation level because a relationship's own `to` field is an endpoint.", "$ref": "#/$defs/nonEmptyText" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "observation"], "properties": { "op": { "const": "add-observation" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "observation": { "allOf": [{ "$ref": "#/$defs/observationFields" }, { "type": "object", "required": ["result", "evidence"] }] } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "observation"], "properties": { "op": { "const": "update-observation" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "observation": { "$ref": "#/$defs/observationChange" }, "remove": { "type": "array", "minItems": 1, "items": { "enum": ["message"] } } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "observation"], "properties": { "op": { "const": "delete-observation" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "observation": { "$ref": "#/$defs/observationTarget" } } }] } } };
13
+ const schema32 = { "description": "A discriminated union: the `op` tag selects exactly one branch, so a malformed operation is reported against the shape its author named rather than against all nine.", "type": "object", "required": ["op"], "discriminator": { "propertyName": "op" }, "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["op", "document", "concept"], "properties": { "op": { "const": "add-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "allOf": [{ "$ref": "#/$defs/conceptFields" }, { "required": ["id", "kind", "name"], "type": "object" }] } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship"], "properties": { "op": { "const": "add-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "allOf": [{ "$ref": "#/$defs/relationshipFields" }, { "required": ["id", "kind", "from", "to"], "type": "object" }] } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "concept"], "properties": { "op": { "const": "update-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "allOf": [{ "$ref": "#/$defs/conceptFields" }, { "required": ["id"], "type": "object" }] }, "remove": { "type": "array", "minItems": 1, "items": { "enum": ["name", "description", "aka", "status", "owner", "distinctFrom", "supersedes", "constraints", "references", "presentIn", "attestations"] } } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship"], "properties": { "op": { "const": "update-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "allOf": [{ "$ref": "#/$defs/relationshipFields" }, { "required": ["id"], "type": "object" }] }, "remove": { "type": "array", "minItems": 1, "items": { "enum": ["name", "description", "status", "mode", "content", "references", "presentIn"] } } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "concept"], "properties": { "op": { "const": "delete-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "$ref": "#/$defs/subjectTarget" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship"], "properties": { "op": { "const": "delete-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "$ref": "#/$defs/subjectTarget" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "concept", "to"], "properties": { "op": { "const": "rename-concept" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "concept": { "$ref": "#/$defs/subjectTarget" }, "to": { "description": "The local id this subject should have had. Every declarative reference to the old address is re-pointed in the same batch; prose is left exactly as written.", "$ref": "#/$defs/nonEmptyText" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "relationship", "to"], "properties": { "op": { "const": "rename-relationship" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "relationship": { "$ref": "#/$defs/subjectTarget" }, "to": { "description": "The local id this subject should have had. Sits at the operation level because a relationship's own `to` field is an endpoint.", "$ref": "#/$defs/nonEmptyText" } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "observation"], "properties": { "op": { "const": "add-observation" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "observation": { "allOf": [{ "$ref": "#/$defs/observationFields" }, { "type": "object", "required": ["result", "evidence"] }] } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "observation"], "properties": { "op": { "const": "update-observation" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "observation": { "$ref": "#/$defs/observationChange" }, "remove": { "type": "array", "minItems": 1, "items": { "enum": ["message"] } } } }, { "type": "object", "additionalProperties": false, "required": ["op", "document", "observation"], "properties": { "op": { "const": "delete-observation" }, "document": { "$ref": "#/$defs/nonEmptyText" }, "observation": { "$ref": "#/$defs/observationTarget" } } }] };
14
+ const schema33 = { "type": "string", "pattern": "\\S" };
15
+ const pattern4 = new RegExp("\\S", "u");
16
+ const schema34 = { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "kind": { "$ref": "#/$defs/nonEmptyText" }, "name": { "$ref": "#/$defs/nonEmptyText" }, "description": { "$ref": "#/$defs/nonEmptyText" }, "aka": { "description": "Alternative labels appended to the subject's aka list.", "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "status": { "enum": ["planned", "current", "retired"] }, "owner": { "$ref": "#/$defs/nonEmptyText" }, "distinctFrom": { "description": "Subjects this one has been judged genuinely different from, dismissing a near-duplicate question permanently (ADR 0077).", "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "supersedes": { "description": "Subjects whose responsibility this one took over, recording a rename, split, or merge (ADR 0080).", "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "constraints": { "type": "array", "items": { "$ref": "#/$defs/constraintReference" } }, "references": { "type": "array", "items": { "$ref": "#/$defs/identifiedReference" } }, "presentIn": { "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } }, "attestations": { "type": "array", "items": { "$ref": "#/$defs/attestation" } } } };
17
+ const func1 = Object.prototype.hasOwnProperty;
18
+ const schema43 = { "type": "object", "additionalProperties": false, "required": ["id", "ref"], "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "ref": { "$ref": "#/$defs/nonEmptyText" }, "expects": { "type": "object", "additionalProperties": false, "required": ["provider", "key", "value"], "properties": { "provider": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, "key": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$" }, "value": { "$ref": "#/$defs/nonEmptyText" } } } } };
19
+ const pattern15 = new RegExp("^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "u");
20
+ const pattern16 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._/-]*$", "u");
21
+ function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate23.evaluated; if (evaluated0.dynamicProps) {
22
+ evaluated0.props = undefined;
23
+ } if (evaluated0.dynamicItems) {
24
+ evaluated0.items = undefined;
25
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
26
+ if (data.id === undefined) {
27
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
28
+ if (vErrors === null) {
29
+ vErrors = [err0];
30
+ }
31
+ else {
32
+ vErrors.push(err0);
33
+ }
34
+ errors++;
35
+ }
36
+ if (data.ref === undefined) {
37
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "ref" }, message: "must have required property '" + "ref" + "'" };
38
+ if (vErrors === null) {
39
+ vErrors = [err1];
40
+ }
41
+ else {
42
+ vErrors.push(err1);
43
+ }
44
+ errors++;
45
+ }
46
+ for (const key0 in data) {
47
+ if (!(((key0 === "id") || (key0 === "ref")) || (key0 === "expects"))) {
48
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
49
+ if (vErrors === null) {
50
+ vErrors = [err2];
51
+ }
52
+ else {
53
+ vErrors.push(err2);
54
+ }
55
+ errors++;
56
+ }
57
+ }
58
+ if (data.id !== undefined) {
59
+ let data0 = data.id;
60
+ if (typeof data0 === "string") {
61
+ if (!pattern4.test(data0)) {
62
+ const err3 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
63
+ if (vErrors === null) {
64
+ vErrors = [err3];
65
+ }
66
+ else {
67
+ vErrors.push(err3);
68
+ }
69
+ errors++;
70
+ }
71
+ }
72
+ else {
73
+ const err4 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
74
+ if (vErrors === null) {
75
+ vErrors = [err4];
76
+ }
77
+ else {
78
+ vErrors.push(err4);
79
+ }
80
+ errors++;
81
+ }
82
+ }
83
+ if (data.ref !== undefined) {
84
+ let data1 = data.ref;
85
+ if (typeof data1 === "string") {
86
+ if (!pattern4.test(data1)) {
87
+ const err5 = { instancePath: instancePath + "/ref", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
88
+ if (vErrors === null) {
89
+ vErrors = [err5];
90
+ }
91
+ else {
92
+ vErrors.push(err5);
93
+ }
94
+ errors++;
95
+ }
96
+ }
97
+ else {
98
+ const err6 = { instancePath: instancePath + "/ref", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
99
+ if (vErrors === null) {
100
+ vErrors = [err6];
101
+ }
102
+ else {
103
+ vErrors.push(err6);
104
+ }
105
+ errors++;
106
+ }
107
+ }
108
+ if (data.expects !== undefined) {
109
+ let data2 = data.expects;
110
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
111
+ if (data2.provider === undefined) {
112
+ const err7 = { instancePath: instancePath + "/expects", schemaPath: "#/properties/expects/required", keyword: "required", params: { missingProperty: "provider" }, message: "must have required property '" + "provider" + "'" };
113
+ if (vErrors === null) {
114
+ vErrors = [err7];
115
+ }
116
+ else {
117
+ vErrors.push(err7);
118
+ }
119
+ errors++;
120
+ }
121
+ if (data2.key === undefined) {
122
+ const err8 = { instancePath: instancePath + "/expects", schemaPath: "#/properties/expects/required", keyword: "required", params: { missingProperty: "key" }, message: "must have required property '" + "key" + "'" };
123
+ if (vErrors === null) {
124
+ vErrors = [err8];
125
+ }
126
+ else {
127
+ vErrors.push(err8);
128
+ }
129
+ errors++;
130
+ }
131
+ if (data2.value === undefined) {
132
+ const err9 = { instancePath: instancePath + "/expects", schemaPath: "#/properties/expects/required", keyword: "required", params: { missingProperty: "value" }, message: "must have required property '" + "value" + "'" };
133
+ if (vErrors === null) {
134
+ vErrors = [err9];
135
+ }
136
+ else {
137
+ vErrors.push(err9);
138
+ }
139
+ errors++;
140
+ }
141
+ for (const key1 in data2) {
142
+ if (!(((key1 === "provider") || (key1 === "key")) || (key1 === "value"))) {
143
+ const err10 = { instancePath: instancePath + "/expects", schemaPath: "#/properties/expects/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
144
+ if (vErrors === null) {
145
+ vErrors = [err10];
146
+ }
147
+ else {
148
+ vErrors.push(err10);
149
+ }
150
+ errors++;
151
+ }
152
+ }
153
+ if (data2.provider !== undefined) {
154
+ let data3 = data2.provider;
155
+ if (typeof data3 === "string") {
156
+ if (!pattern15.test(data3)) {
157
+ const err11 = { instancePath: instancePath + "/expects/provider", schemaPath: "#/properties/expects/properties/provider/pattern", keyword: "pattern", params: { pattern: "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, message: "must match pattern \"" + "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" + "\"" };
158
+ if (vErrors === null) {
159
+ vErrors = [err11];
160
+ }
161
+ else {
162
+ vErrors.push(err11);
163
+ }
164
+ errors++;
165
+ }
166
+ }
167
+ else {
168
+ const err12 = { instancePath: instancePath + "/expects/provider", schemaPath: "#/properties/expects/properties/provider/type", keyword: "type", params: { type: "string" }, message: "must be string" };
169
+ if (vErrors === null) {
170
+ vErrors = [err12];
171
+ }
172
+ else {
173
+ vErrors.push(err12);
174
+ }
175
+ errors++;
176
+ }
177
+ }
178
+ if (data2.key !== undefined) {
179
+ let data4 = data2.key;
180
+ if (typeof data4 === "string") {
181
+ if (!pattern16.test(data4)) {
182
+ const err13 = { instancePath: instancePath + "/expects/key", schemaPath: "#/properties/expects/properties/key/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9][A-Za-z0-9._/-]*$" }, message: "must match pattern \"" + "^[A-Za-z0-9][A-Za-z0-9._/-]*$" + "\"" };
183
+ if (vErrors === null) {
184
+ vErrors = [err13];
185
+ }
186
+ else {
187
+ vErrors.push(err13);
188
+ }
189
+ errors++;
190
+ }
191
+ }
192
+ else {
193
+ const err14 = { instancePath: instancePath + "/expects/key", schemaPath: "#/properties/expects/properties/key/type", keyword: "type", params: { type: "string" }, message: "must be string" };
194
+ if (vErrors === null) {
195
+ vErrors = [err14];
196
+ }
197
+ else {
198
+ vErrors.push(err14);
199
+ }
200
+ errors++;
201
+ }
202
+ }
203
+ if (data2.value !== undefined) {
204
+ let data5 = data2.value;
205
+ if (typeof data5 === "string") {
206
+ if (!pattern4.test(data5)) {
207
+ const err15 = { instancePath: instancePath + "/expects/value", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
208
+ if (vErrors === null) {
209
+ vErrors = [err15];
210
+ }
211
+ else {
212
+ vErrors.push(err15);
213
+ }
214
+ errors++;
215
+ }
216
+ }
217
+ else {
218
+ const err16 = { instancePath: instancePath + "/expects/value", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
219
+ if (vErrors === null) {
220
+ vErrors = [err16];
221
+ }
222
+ else {
223
+ vErrors.push(err16);
224
+ }
225
+ errors++;
226
+ }
227
+ }
228
+ }
229
+ else {
230
+ const err17 = { instancePath: instancePath + "/expects", schemaPath: "#/properties/expects/type", keyword: "type", params: { type: "object" }, message: "must be object" };
231
+ if (vErrors === null) {
232
+ vErrors = [err17];
233
+ }
234
+ else {
235
+ vErrors.push(err17);
236
+ }
237
+ errors++;
238
+ }
239
+ }
240
+ }
241
+ else {
242
+ const err18 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
243
+ if (vErrors === null) {
244
+ vErrors = [err18];
245
+ }
246
+ else {
247
+ vErrors.push(err18);
248
+ }
249
+ errors++;
250
+ } validate23.errors = vErrors; return errors === 0; }
251
+ validate23.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
252
+ const schema47 = { "type": "object", "additionalProperties": false, "required": ["id", "ref"], "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "ref": { "$ref": "#/$defs/nonEmptyText" } } };
253
+ function validate25(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate25.evaluated; if (evaluated0.dynamicProps) {
254
+ evaluated0.props = undefined;
255
+ } if (evaluated0.dynamicItems) {
256
+ evaluated0.items = undefined;
257
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
258
+ if (data.id === undefined) {
259
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
260
+ if (vErrors === null) {
261
+ vErrors = [err0];
262
+ }
263
+ else {
264
+ vErrors.push(err0);
265
+ }
266
+ errors++;
267
+ }
268
+ if (data.ref === undefined) {
269
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "ref" }, message: "must have required property '" + "ref" + "'" };
270
+ if (vErrors === null) {
271
+ vErrors = [err1];
272
+ }
273
+ else {
274
+ vErrors.push(err1);
275
+ }
276
+ errors++;
277
+ }
278
+ for (const key0 in data) {
279
+ if (!((key0 === "id") || (key0 === "ref"))) {
280
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
281
+ if (vErrors === null) {
282
+ vErrors = [err2];
283
+ }
284
+ else {
285
+ vErrors.push(err2);
286
+ }
287
+ errors++;
288
+ }
289
+ }
290
+ if (data.id !== undefined) {
291
+ let data0 = data.id;
292
+ if (typeof data0 === "string") {
293
+ if (!pattern4.test(data0)) {
294
+ const err3 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
295
+ if (vErrors === null) {
296
+ vErrors = [err3];
297
+ }
298
+ else {
299
+ vErrors.push(err3);
300
+ }
301
+ errors++;
302
+ }
303
+ }
304
+ else {
305
+ const err4 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
306
+ if (vErrors === null) {
307
+ vErrors = [err4];
308
+ }
309
+ else {
310
+ vErrors.push(err4);
311
+ }
312
+ errors++;
313
+ }
314
+ }
315
+ if (data.ref !== undefined) {
316
+ let data1 = data.ref;
317
+ if (typeof data1 === "string") {
318
+ if (!pattern4.test(data1)) {
319
+ const err5 = { instancePath: instancePath + "/ref", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
320
+ if (vErrors === null) {
321
+ vErrors = [err5];
322
+ }
323
+ else {
324
+ vErrors.push(err5);
325
+ }
326
+ errors++;
327
+ }
328
+ }
329
+ else {
330
+ const err6 = { instancePath: instancePath + "/ref", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
331
+ if (vErrors === null) {
332
+ vErrors = [err6];
333
+ }
334
+ else {
335
+ vErrors.push(err6);
336
+ }
337
+ errors++;
338
+ }
339
+ }
340
+ }
341
+ else {
342
+ const err7 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
343
+ if (vErrors === null) {
344
+ vErrors = [err7];
345
+ }
346
+ else {
347
+ vErrors.push(err7);
348
+ }
349
+ errors++;
350
+ } validate25.errors = vErrors; return errors === 0; }
351
+ validate25.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
352
+ const schema51 = { "type": "object", "additionalProperties": false, "required": ["topic", "by", "on", "recordedBy"], "properties": { "topic": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }, "by": { "description": "The authority whose judgment this records, resolved against the model as a subject reference once the write lands.", "$ref": "#/$defs/nonEmptyText" }, "recordedBy": { "description": "Who is writing this record. Required here and optional in a document: a hand-written sign-off already has a committer, whereas a batch names the agent holding the pen, so an authority's judgment and a machine's transcription of one are never the same bytes.", "$ref": "#/$defs/nonEmptyText" }, "on": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" } } };
353
+ const pattern21 = new RegExp("^[a-z][a-z0-9-]*$", "u");
354
+ const pattern24 = new RegExp("^[0-9]{4}-[0-9]{2}-[0-9]{2}$", "u");
355
+ function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate27.evaluated; if (evaluated0.dynamicProps) {
356
+ evaluated0.props = undefined;
357
+ } if (evaluated0.dynamicItems) {
358
+ evaluated0.items = undefined;
359
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
360
+ if (data.topic === undefined) {
361
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "topic" }, message: "must have required property '" + "topic" + "'" };
362
+ if (vErrors === null) {
363
+ vErrors = [err0];
364
+ }
365
+ else {
366
+ vErrors.push(err0);
367
+ }
368
+ errors++;
369
+ }
370
+ if (data.by === undefined) {
371
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "by" }, message: "must have required property '" + "by" + "'" };
372
+ if (vErrors === null) {
373
+ vErrors = [err1];
374
+ }
375
+ else {
376
+ vErrors.push(err1);
377
+ }
378
+ errors++;
379
+ }
380
+ if (data.on === undefined) {
381
+ const err2 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "on" }, message: "must have required property '" + "on" + "'" };
382
+ if (vErrors === null) {
383
+ vErrors = [err2];
384
+ }
385
+ else {
386
+ vErrors.push(err2);
387
+ }
388
+ errors++;
389
+ }
390
+ if (data.recordedBy === undefined) {
391
+ const err3 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "recordedBy" }, message: "must have required property '" + "recordedBy" + "'" };
392
+ if (vErrors === null) {
393
+ vErrors = [err3];
394
+ }
395
+ else {
396
+ vErrors.push(err3);
397
+ }
398
+ errors++;
399
+ }
400
+ for (const key0 in data) {
401
+ if (!((((key0 === "topic") || (key0 === "by")) || (key0 === "recordedBy")) || (key0 === "on"))) {
402
+ const err4 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
403
+ if (vErrors === null) {
404
+ vErrors = [err4];
405
+ }
406
+ else {
407
+ vErrors.push(err4);
408
+ }
409
+ errors++;
410
+ }
411
+ }
412
+ if (data.topic !== undefined) {
413
+ let data0 = data.topic;
414
+ if (typeof data0 === "string") {
415
+ if (!pattern21.test(data0)) {
416
+ const err5 = { instancePath: instancePath + "/topic", schemaPath: "#/properties/topic/pattern", keyword: "pattern", params: { pattern: "^[a-z][a-z0-9-]*$" }, message: "must match pattern \"" + "^[a-z][a-z0-9-]*$" + "\"" };
417
+ if (vErrors === null) {
418
+ vErrors = [err5];
419
+ }
420
+ else {
421
+ vErrors.push(err5);
422
+ }
423
+ errors++;
424
+ }
425
+ }
426
+ else {
427
+ const err6 = { instancePath: instancePath + "/topic", schemaPath: "#/properties/topic/type", keyword: "type", params: { type: "string" }, message: "must be string" };
428
+ if (vErrors === null) {
429
+ vErrors = [err6];
430
+ }
431
+ else {
432
+ vErrors.push(err6);
433
+ }
434
+ errors++;
435
+ }
436
+ }
437
+ if (data.by !== undefined) {
438
+ let data1 = data.by;
439
+ if (typeof data1 === "string") {
440
+ if (!pattern4.test(data1)) {
441
+ const err7 = { instancePath: instancePath + "/by", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
442
+ if (vErrors === null) {
443
+ vErrors = [err7];
444
+ }
445
+ else {
446
+ vErrors.push(err7);
447
+ }
448
+ errors++;
449
+ }
450
+ }
451
+ else {
452
+ const err8 = { instancePath: instancePath + "/by", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
453
+ if (vErrors === null) {
454
+ vErrors = [err8];
455
+ }
456
+ else {
457
+ vErrors.push(err8);
458
+ }
459
+ errors++;
460
+ }
461
+ }
462
+ if (data.recordedBy !== undefined) {
463
+ let data2 = data.recordedBy;
464
+ if (typeof data2 === "string") {
465
+ if (!pattern4.test(data2)) {
466
+ const err9 = { instancePath: instancePath + "/recordedBy", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
467
+ if (vErrors === null) {
468
+ vErrors = [err9];
469
+ }
470
+ else {
471
+ vErrors.push(err9);
472
+ }
473
+ errors++;
474
+ }
475
+ }
476
+ else {
477
+ const err10 = { instancePath: instancePath + "/recordedBy", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
478
+ if (vErrors === null) {
479
+ vErrors = [err10];
480
+ }
481
+ else {
482
+ vErrors.push(err10);
483
+ }
484
+ errors++;
485
+ }
486
+ }
487
+ if (data.on !== undefined) {
488
+ let data3 = data.on;
489
+ if (typeof data3 === "string") {
490
+ if (!pattern24.test(data3)) {
491
+ const err11 = { instancePath: instancePath + "/on", schemaPath: "#/properties/on/pattern", keyword: "pattern", params: { pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }, message: "must match pattern \"" + "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + "\"" };
492
+ if (vErrors === null) {
493
+ vErrors = [err11];
494
+ }
495
+ else {
496
+ vErrors.push(err11);
497
+ }
498
+ errors++;
499
+ }
500
+ }
501
+ else {
502
+ const err12 = { instancePath: instancePath + "/on", schemaPath: "#/properties/on/type", keyword: "type", params: { type: "string" }, message: "must be string" };
503
+ if (vErrors === null) {
504
+ vErrors = [err12];
505
+ }
506
+ else {
507
+ vErrors.push(err12);
508
+ }
509
+ errors++;
510
+ }
511
+ }
512
+ }
513
+ else {
514
+ const err13 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
515
+ if (vErrors === null) {
516
+ vErrors = [err13];
517
+ }
518
+ else {
519
+ vErrors.push(err13);
520
+ }
521
+ errors++;
522
+ } validate27.errors = vErrors; return errors === 0; }
523
+ validate27.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
524
+ function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate22.evaluated; if (evaluated0.dynamicProps) {
525
+ evaluated0.props = undefined;
526
+ } if (evaluated0.dynamicItems) {
527
+ evaluated0.items = undefined;
528
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
529
+ for (const key0 in data) {
530
+ if (!(func1.call(schema34.properties, key0))) {
531
+ const err0 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
532
+ if (vErrors === null) {
533
+ vErrors = [err0];
534
+ }
535
+ else {
536
+ vErrors.push(err0);
537
+ }
538
+ errors++;
539
+ }
540
+ }
541
+ if (data.id !== undefined) {
542
+ let data0 = data.id;
543
+ if (typeof data0 === "string") {
544
+ if (!pattern4.test(data0)) {
545
+ const err1 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
546
+ if (vErrors === null) {
547
+ vErrors = [err1];
548
+ }
549
+ else {
550
+ vErrors.push(err1);
551
+ }
552
+ errors++;
553
+ }
554
+ }
555
+ else {
556
+ const err2 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
557
+ if (vErrors === null) {
558
+ vErrors = [err2];
559
+ }
560
+ else {
561
+ vErrors.push(err2);
562
+ }
563
+ errors++;
564
+ }
565
+ }
566
+ if (data.kind !== undefined) {
567
+ let data1 = data.kind;
568
+ if (typeof data1 === "string") {
569
+ if (!pattern4.test(data1)) {
570
+ const err3 = { instancePath: instancePath + "/kind", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
571
+ if (vErrors === null) {
572
+ vErrors = [err3];
573
+ }
574
+ else {
575
+ vErrors.push(err3);
576
+ }
577
+ errors++;
578
+ }
579
+ }
580
+ else {
581
+ const err4 = { instancePath: instancePath + "/kind", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
582
+ if (vErrors === null) {
583
+ vErrors = [err4];
584
+ }
585
+ else {
586
+ vErrors.push(err4);
587
+ }
588
+ errors++;
589
+ }
590
+ }
591
+ if (data.name !== undefined) {
592
+ let data2 = data.name;
593
+ if (typeof data2 === "string") {
594
+ if (!pattern4.test(data2)) {
595
+ const err5 = { instancePath: instancePath + "/name", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
596
+ if (vErrors === null) {
597
+ vErrors = [err5];
598
+ }
599
+ else {
600
+ vErrors.push(err5);
601
+ }
602
+ errors++;
603
+ }
604
+ }
605
+ else {
606
+ const err6 = { instancePath: instancePath + "/name", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
607
+ if (vErrors === null) {
608
+ vErrors = [err6];
609
+ }
610
+ else {
611
+ vErrors.push(err6);
612
+ }
613
+ errors++;
614
+ }
615
+ }
616
+ if (data.description !== undefined) {
617
+ let data3 = data.description;
618
+ if (typeof data3 === "string") {
619
+ if (!pattern4.test(data3)) {
620
+ const err7 = { instancePath: instancePath + "/description", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
621
+ if (vErrors === null) {
622
+ vErrors = [err7];
623
+ }
624
+ else {
625
+ vErrors.push(err7);
626
+ }
627
+ errors++;
628
+ }
629
+ }
630
+ else {
631
+ const err8 = { instancePath: instancePath + "/description", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
632
+ if (vErrors === null) {
633
+ vErrors = [err8];
634
+ }
635
+ else {
636
+ vErrors.push(err8);
637
+ }
638
+ errors++;
639
+ }
640
+ }
641
+ if (data.aka !== undefined) {
642
+ let data4 = data.aka;
643
+ if (Array.isArray(data4)) {
644
+ const len0 = data4.length;
645
+ for (let i0 = 0; i0 < len0; i0++) {
646
+ let data5 = data4[i0];
647
+ if (typeof data5 === "string") {
648
+ if (!pattern4.test(data5)) {
649
+ const err9 = { instancePath: instancePath + "/aka/" + i0, schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
650
+ if (vErrors === null) {
651
+ vErrors = [err9];
652
+ }
653
+ else {
654
+ vErrors.push(err9);
655
+ }
656
+ errors++;
657
+ }
658
+ }
659
+ else {
660
+ const err10 = { instancePath: instancePath + "/aka/" + i0, schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
661
+ if (vErrors === null) {
662
+ vErrors = [err10];
663
+ }
664
+ else {
665
+ vErrors.push(err10);
666
+ }
667
+ errors++;
668
+ }
669
+ }
670
+ }
671
+ else {
672
+ const err11 = { instancePath: instancePath + "/aka", schemaPath: "#/properties/aka/type", keyword: "type", params: { type: "array" }, message: "must be array" };
673
+ if (vErrors === null) {
674
+ vErrors = [err11];
675
+ }
676
+ else {
677
+ vErrors.push(err11);
678
+ }
679
+ errors++;
680
+ }
681
+ }
682
+ if (data.status !== undefined) {
683
+ let data6 = data.status;
684
+ if (!(((data6 === "planned") || (data6 === "current")) || (data6 === "retired"))) {
685
+ const err12 = { instancePath: instancePath + "/status", schemaPath: "#/properties/status/enum", keyword: "enum", params: { allowedValues: schema34.properties.status.enum }, message: "must be equal to one of the allowed values" };
686
+ if (vErrors === null) {
687
+ vErrors = [err12];
688
+ }
689
+ else {
690
+ vErrors.push(err12);
691
+ }
692
+ errors++;
693
+ }
694
+ }
695
+ if (data.owner !== undefined) {
696
+ let data7 = data.owner;
697
+ if (typeof data7 === "string") {
698
+ if (!pattern4.test(data7)) {
699
+ const err13 = { instancePath: instancePath + "/owner", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
700
+ if (vErrors === null) {
701
+ vErrors = [err13];
702
+ }
703
+ else {
704
+ vErrors.push(err13);
705
+ }
706
+ errors++;
707
+ }
708
+ }
709
+ else {
710
+ const err14 = { instancePath: instancePath + "/owner", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
711
+ if (vErrors === null) {
712
+ vErrors = [err14];
713
+ }
714
+ else {
715
+ vErrors.push(err14);
716
+ }
717
+ errors++;
718
+ }
719
+ }
720
+ if (data.distinctFrom !== undefined) {
721
+ let data8 = data.distinctFrom;
722
+ if (Array.isArray(data8)) {
723
+ const len1 = data8.length;
724
+ for (let i1 = 0; i1 < len1; i1++) {
725
+ let data9 = data8[i1];
726
+ if (typeof data9 === "string") {
727
+ if (!pattern4.test(data9)) {
728
+ const err15 = { instancePath: instancePath + "/distinctFrom/" + i1, schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
729
+ if (vErrors === null) {
730
+ vErrors = [err15];
731
+ }
732
+ else {
733
+ vErrors.push(err15);
734
+ }
735
+ errors++;
736
+ }
737
+ }
738
+ else {
739
+ const err16 = { instancePath: instancePath + "/distinctFrom/" + i1, schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
740
+ if (vErrors === null) {
741
+ vErrors = [err16];
742
+ }
743
+ else {
744
+ vErrors.push(err16);
745
+ }
746
+ errors++;
747
+ }
748
+ }
749
+ }
750
+ else {
751
+ const err17 = { instancePath: instancePath + "/distinctFrom", schemaPath: "#/properties/distinctFrom/type", keyword: "type", params: { type: "array" }, message: "must be array" };
752
+ if (vErrors === null) {
753
+ vErrors = [err17];
754
+ }
755
+ else {
756
+ vErrors.push(err17);
757
+ }
758
+ errors++;
759
+ }
760
+ }
761
+ if (data.supersedes !== undefined) {
762
+ let data10 = data.supersedes;
763
+ if (Array.isArray(data10)) {
764
+ const len2 = data10.length;
765
+ for (let i2 = 0; i2 < len2; i2++) {
766
+ let data11 = data10[i2];
767
+ if (typeof data11 === "string") {
768
+ if (!pattern4.test(data11)) {
769
+ const err18 = { instancePath: instancePath + "/supersedes/" + i2, schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
770
+ if (vErrors === null) {
771
+ vErrors = [err18];
772
+ }
773
+ else {
774
+ vErrors.push(err18);
775
+ }
776
+ errors++;
777
+ }
778
+ }
779
+ else {
780
+ const err19 = { instancePath: instancePath + "/supersedes/" + i2, schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
781
+ if (vErrors === null) {
782
+ vErrors = [err19];
783
+ }
784
+ else {
785
+ vErrors.push(err19);
786
+ }
787
+ errors++;
788
+ }
789
+ }
790
+ }
791
+ else {
792
+ const err20 = { instancePath: instancePath + "/supersedes", schemaPath: "#/properties/supersedes/type", keyword: "type", params: { type: "array" }, message: "must be array" };
793
+ if (vErrors === null) {
794
+ vErrors = [err20];
795
+ }
796
+ else {
797
+ vErrors.push(err20);
798
+ }
799
+ errors++;
800
+ }
801
+ }
802
+ if (data.constraints !== undefined) {
803
+ let data12 = data.constraints;
804
+ if (Array.isArray(data12)) {
805
+ const len3 = data12.length;
806
+ for (let i3 = 0; i3 < len3; i3++) {
807
+ if (!(validate23(data12[i3], { instancePath: instancePath + "/constraints/" + i3, parentData: data12, parentDataProperty: i3, rootData, dynamicAnchors }))) {
808
+ vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
809
+ errors = vErrors.length;
810
+ }
811
+ }
812
+ }
813
+ else {
814
+ const err21 = { instancePath: instancePath + "/constraints", schemaPath: "#/properties/constraints/type", keyword: "type", params: { type: "array" }, message: "must be array" };
815
+ if (vErrors === null) {
816
+ vErrors = [err21];
817
+ }
818
+ else {
819
+ vErrors.push(err21);
820
+ }
821
+ errors++;
822
+ }
823
+ }
824
+ if (data.references !== undefined) {
825
+ let data14 = data.references;
826
+ if (Array.isArray(data14)) {
827
+ const len4 = data14.length;
828
+ for (let i4 = 0; i4 < len4; i4++) {
829
+ if (!(validate25(data14[i4], { instancePath: instancePath + "/references/" + i4, parentData: data14, parentDataProperty: i4, rootData, dynamicAnchors }))) {
830
+ vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);
831
+ errors = vErrors.length;
832
+ }
833
+ }
834
+ }
835
+ else {
836
+ const err22 = { instancePath: instancePath + "/references", schemaPath: "#/properties/references/type", keyword: "type", params: { type: "array" }, message: "must be array" };
837
+ if (vErrors === null) {
838
+ vErrors = [err22];
839
+ }
840
+ else {
841
+ vErrors.push(err22);
842
+ }
843
+ errors++;
844
+ }
845
+ }
846
+ if (data.presentIn !== undefined) {
847
+ let data16 = data.presentIn;
848
+ if (Array.isArray(data16)) {
849
+ const len5 = data16.length;
850
+ for (let i5 = 0; i5 < len5; i5++) {
851
+ let data17 = data16[i5];
852
+ if (typeof data17 === "string") {
853
+ if (!pattern4.test(data17)) {
854
+ const err23 = { instancePath: instancePath + "/presentIn/" + i5, schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
855
+ if (vErrors === null) {
856
+ vErrors = [err23];
857
+ }
858
+ else {
859
+ vErrors.push(err23);
860
+ }
861
+ errors++;
862
+ }
863
+ }
864
+ else {
865
+ const err24 = { instancePath: instancePath + "/presentIn/" + i5, schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
866
+ if (vErrors === null) {
867
+ vErrors = [err24];
868
+ }
869
+ else {
870
+ vErrors.push(err24);
871
+ }
872
+ errors++;
873
+ }
874
+ }
875
+ }
876
+ else {
877
+ const err25 = { instancePath: instancePath + "/presentIn", schemaPath: "#/properties/presentIn/type", keyword: "type", params: { type: "array" }, message: "must be array" };
878
+ if (vErrors === null) {
879
+ vErrors = [err25];
880
+ }
881
+ else {
882
+ vErrors.push(err25);
883
+ }
884
+ errors++;
885
+ }
886
+ }
887
+ if (data.attestations !== undefined) {
888
+ let data18 = data.attestations;
889
+ if (Array.isArray(data18)) {
890
+ const len6 = data18.length;
891
+ for (let i6 = 0; i6 < len6; i6++) {
892
+ if (!(validate27(data18[i6], { instancePath: instancePath + "/attestations/" + i6, parentData: data18, parentDataProperty: i6, rootData, dynamicAnchors }))) {
893
+ vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
894
+ errors = vErrors.length;
895
+ }
896
+ }
897
+ }
898
+ else {
899
+ const err26 = { instancePath: instancePath + "/attestations", schemaPath: "#/properties/attestations/type", keyword: "type", params: { type: "array" }, message: "must be array" };
900
+ if (vErrors === null) {
901
+ vErrors = [err26];
902
+ }
903
+ else {
904
+ vErrors.push(err26);
905
+ }
906
+ errors++;
907
+ }
908
+ }
909
+ }
910
+ else {
911
+ const err27 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
912
+ if (vErrors === null) {
913
+ vErrors = [err27];
914
+ }
915
+ else {
916
+ vErrors.push(err27);
917
+ }
918
+ errors++;
919
+ } validate22.errors = vErrors; return errors === 0; }
920
+ validate22.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
921
+ const schema55 = { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "#/$defs/nonEmptyText" }, "kind": { "$ref": "#/$defs/nonEmptyText" }, "from": { "$ref": "#/$defs/nonEmptyText" }, "to": { "$ref": "#/$defs/nonEmptyText" }, "name": { "$ref": "#/$defs/nonEmptyText" }, "description": { "$ref": "#/$defs/nonEmptyText" }, "status": { "enum": ["planned", "current", "retired"] }, "mode": { "enum": ["read", "write", "read-write", "unspecified"] }, "content": { "$ref": "#/$defs/nonEmptyText" }, "references": { "type": "array", "items": { "$ref": "#/$defs/identifiedReference" } }, "presentIn": { "type": "array", "items": { "$ref": "#/$defs/nonEmptyText" } } } };
922
+ function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate30.evaluated; if (evaluated0.dynamicProps) {
923
+ evaluated0.props = undefined;
924
+ } if (evaluated0.dynamicItems) {
925
+ evaluated0.items = undefined;
926
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
927
+ for (const key0 in data) {
928
+ if (!(func1.call(schema55.properties, key0))) {
929
+ const err0 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
930
+ if (vErrors === null) {
931
+ vErrors = [err0];
932
+ }
933
+ else {
934
+ vErrors.push(err0);
935
+ }
936
+ errors++;
937
+ }
938
+ }
939
+ if (data.id !== undefined) {
940
+ let data0 = data.id;
941
+ if (typeof data0 === "string") {
942
+ if (!pattern4.test(data0)) {
943
+ const err1 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
944
+ if (vErrors === null) {
945
+ vErrors = [err1];
946
+ }
947
+ else {
948
+ vErrors.push(err1);
949
+ }
950
+ errors++;
951
+ }
952
+ }
953
+ else {
954
+ const err2 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
955
+ if (vErrors === null) {
956
+ vErrors = [err2];
957
+ }
958
+ else {
959
+ vErrors.push(err2);
960
+ }
961
+ errors++;
962
+ }
963
+ }
964
+ if (data.kind !== undefined) {
965
+ let data1 = data.kind;
966
+ if (typeof data1 === "string") {
967
+ if (!pattern4.test(data1)) {
968
+ const err3 = { instancePath: instancePath + "/kind", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
969
+ if (vErrors === null) {
970
+ vErrors = [err3];
971
+ }
972
+ else {
973
+ vErrors.push(err3);
974
+ }
975
+ errors++;
976
+ }
977
+ }
978
+ else {
979
+ const err4 = { instancePath: instancePath + "/kind", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
980
+ if (vErrors === null) {
981
+ vErrors = [err4];
982
+ }
983
+ else {
984
+ vErrors.push(err4);
985
+ }
986
+ errors++;
987
+ }
988
+ }
989
+ if (data.from !== undefined) {
990
+ let data2 = data.from;
991
+ if (typeof data2 === "string") {
992
+ if (!pattern4.test(data2)) {
993
+ const err5 = { instancePath: instancePath + "/from", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
994
+ if (vErrors === null) {
995
+ vErrors = [err5];
996
+ }
997
+ else {
998
+ vErrors.push(err5);
999
+ }
1000
+ errors++;
1001
+ }
1002
+ }
1003
+ else {
1004
+ const err6 = { instancePath: instancePath + "/from", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1005
+ if (vErrors === null) {
1006
+ vErrors = [err6];
1007
+ }
1008
+ else {
1009
+ vErrors.push(err6);
1010
+ }
1011
+ errors++;
1012
+ }
1013
+ }
1014
+ if (data.to !== undefined) {
1015
+ let data3 = data.to;
1016
+ if (typeof data3 === "string") {
1017
+ if (!pattern4.test(data3)) {
1018
+ const err7 = { instancePath: instancePath + "/to", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1019
+ if (vErrors === null) {
1020
+ vErrors = [err7];
1021
+ }
1022
+ else {
1023
+ vErrors.push(err7);
1024
+ }
1025
+ errors++;
1026
+ }
1027
+ }
1028
+ else {
1029
+ const err8 = { instancePath: instancePath + "/to", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1030
+ if (vErrors === null) {
1031
+ vErrors = [err8];
1032
+ }
1033
+ else {
1034
+ vErrors.push(err8);
1035
+ }
1036
+ errors++;
1037
+ }
1038
+ }
1039
+ if (data.name !== undefined) {
1040
+ let data4 = data.name;
1041
+ if (typeof data4 === "string") {
1042
+ if (!pattern4.test(data4)) {
1043
+ const err9 = { instancePath: instancePath + "/name", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1044
+ if (vErrors === null) {
1045
+ vErrors = [err9];
1046
+ }
1047
+ else {
1048
+ vErrors.push(err9);
1049
+ }
1050
+ errors++;
1051
+ }
1052
+ }
1053
+ else {
1054
+ const err10 = { instancePath: instancePath + "/name", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1055
+ if (vErrors === null) {
1056
+ vErrors = [err10];
1057
+ }
1058
+ else {
1059
+ vErrors.push(err10);
1060
+ }
1061
+ errors++;
1062
+ }
1063
+ }
1064
+ if (data.description !== undefined) {
1065
+ let data5 = data.description;
1066
+ if (typeof data5 === "string") {
1067
+ if (!pattern4.test(data5)) {
1068
+ const err11 = { instancePath: instancePath + "/description", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1069
+ if (vErrors === null) {
1070
+ vErrors = [err11];
1071
+ }
1072
+ else {
1073
+ vErrors.push(err11);
1074
+ }
1075
+ errors++;
1076
+ }
1077
+ }
1078
+ else {
1079
+ const err12 = { instancePath: instancePath + "/description", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1080
+ if (vErrors === null) {
1081
+ vErrors = [err12];
1082
+ }
1083
+ else {
1084
+ vErrors.push(err12);
1085
+ }
1086
+ errors++;
1087
+ }
1088
+ }
1089
+ if (data.status !== undefined) {
1090
+ let data6 = data.status;
1091
+ if (!(((data6 === "planned") || (data6 === "current")) || (data6 === "retired"))) {
1092
+ const err13 = { instancePath: instancePath + "/status", schemaPath: "#/properties/status/enum", keyword: "enum", params: { allowedValues: schema55.properties.status.enum }, message: "must be equal to one of the allowed values" };
1093
+ if (vErrors === null) {
1094
+ vErrors = [err13];
1095
+ }
1096
+ else {
1097
+ vErrors.push(err13);
1098
+ }
1099
+ errors++;
1100
+ }
1101
+ }
1102
+ if (data.mode !== undefined) {
1103
+ let data7 = data.mode;
1104
+ if (!((((data7 === "read") || (data7 === "write")) || (data7 === "read-write")) || (data7 === "unspecified"))) {
1105
+ const err14 = { instancePath: instancePath + "/mode", schemaPath: "#/properties/mode/enum", keyword: "enum", params: { allowedValues: schema55.properties.mode.enum }, message: "must be equal to one of the allowed values" };
1106
+ if (vErrors === null) {
1107
+ vErrors = [err14];
1108
+ }
1109
+ else {
1110
+ vErrors.push(err14);
1111
+ }
1112
+ errors++;
1113
+ }
1114
+ }
1115
+ if (data.content !== undefined) {
1116
+ let data8 = data.content;
1117
+ if (typeof data8 === "string") {
1118
+ if (!pattern4.test(data8)) {
1119
+ const err15 = { instancePath: instancePath + "/content", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1120
+ if (vErrors === null) {
1121
+ vErrors = [err15];
1122
+ }
1123
+ else {
1124
+ vErrors.push(err15);
1125
+ }
1126
+ errors++;
1127
+ }
1128
+ }
1129
+ else {
1130
+ const err16 = { instancePath: instancePath + "/content", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1131
+ if (vErrors === null) {
1132
+ vErrors = [err16];
1133
+ }
1134
+ else {
1135
+ vErrors.push(err16);
1136
+ }
1137
+ errors++;
1138
+ }
1139
+ }
1140
+ if (data.references !== undefined) {
1141
+ let data9 = data.references;
1142
+ if (Array.isArray(data9)) {
1143
+ const len0 = data9.length;
1144
+ for (let i0 = 0; i0 < len0; i0++) {
1145
+ if (!(validate25(data9[i0], { instancePath: instancePath + "/references/" + i0, parentData: data9, parentDataProperty: i0, rootData, dynamicAnchors }))) {
1146
+ vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);
1147
+ errors = vErrors.length;
1148
+ }
1149
+ }
1150
+ }
1151
+ else {
1152
+ const err17 = { instancePath: instancePath + "/references", schemaPath: "#/properties/references/type", keyword: "type", params: { type: "array" }, message: "must be array" };
1153
+ if (vErrors === null) {
1154
+ vErrors = [err17];
1155
+ }
1156
+ else {
1157
+ vErrors.push(err17);
1158
+ }
1159
+ errors++;
1160
+ }
1161
+ }
1162
+ if (data.presentIn !== undefined) {
1163
+ let data11 = data.presentIn;
1164
+ if (Array.isArray(data11)) {
1165
+ const len1 = data11.length;
1166
+ for (let i1 = 0; i1 < len1; i1++) {
1167
+ let data12 = data11[i1];
1168
+ if (typeof data12 === "string") {
1169
+ if (!pattern4.test(data12)) {
1170
+ const err18 = { instancePath: instancePath + "/presentIn/" + i1, schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1171
+ if (vErrors === null) {
1172
+ vErrors = [err18];
1173
+ }
1174
+ else {
1175
+ vErrors.push(err18);
1176
+ }
1177
+ errors++;
1178
+ }
1179
+ }
1180
+ else {
1181
+ const err19 = { instancePath: instancePath + "/presentIn/" + i1, schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1182
+ if (vErrors === null) {
1183
+ vErrors = [err19];
1184
+ }
1185
+ else {
1186
+ vErrors.push(err19);
1187
+ }
1188
+ errors++;
1189
+ }
1190
+ }
1191
+ }
1192
+ else {
1193
+ const err20 = { instancePath: instancePath + "/presentIn", schemaPath: "#/properties/presentIn/type", keyword: "type", params: { type: "array" }, message: "must be array" };
1194
+ if (vErrors === null) {
1195
+ vErrors = [err20];
1196
+ }
1197
+ else {
1198
+ vErrors.push(err20);
1199
+ }
1200
+ errors++;
1201
+ }
1202
+ }
1203
+ }
1204
+ else {
1205
+ const err21 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1206
+ if (vErrors === null) {
1207
+ vErrors = [err21];
1208
+ }
1209
+ else {
1210
+ vErrors.push(err21);
1211
+ }
1212
+ errors++;
1213
+ } validate30.errors = vErrors; return errors === 0; }
1214
+ validate30.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1215
+ const schema67 = { "description": "A subject already declared in the named document, addressed by its local id. Deletes and renames name what is there rather than restating it.", "type": "object", "additionalProperties": false, "required": ["id"], "properties": { "id": { "$ref": "#/$defs/nonEmptyText" } } };
1216
+ function validate35(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate35.evaluated; if (evaluated0.dynamicProps) {
1217
+ evaluated0.props = undefined;
1218
+ } if (evaluated0.dynamicItems) {
1219
+ evaluated0.items = undefined;
1220
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
1221
+ if (data.id === undefined) {
1222
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
1223
+ if (vErrors === null) {
1224
+ vErrors = [err0];
1225
+ }
1226
+ else {
1227
+ vErrors.push(err0);
1228
+ }
1229
+ errors++;
1230
+ }
1231
+ for (const key0 in data) {
1232
+ if (!(key0 === "id")) {
1233
+ const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
1234
+ if (vErrors === null) {
1235
+ vErrors = [err1];
1236
+ }
1237
+ else {
1238
+ vErrors.push(err1);
1239
+ }
1240
+ errors++;
1241
+ }
1242
+ }
1243
+ if (data.id !== undefined) {
1244
+ let data0 = data.id;
1245
+ if (typeof data0 === "string") {
1246
+ if (!pattern4.test(data0)) {
1247
+ const err2 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1248
+ if (vErrors === null) {
1249
+ vErrors = [err2];
1250
+ }
1251
+ else {
1252
+ vErrors.push(err2);
1253
+ }
1254
+ errors++;
1255
+ }
1256
+ }
1257
+ else {
1258
+ const err3 = { instancePath: instancePath + "/id", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1259
+ if (vErrors === null) {
1260
+ vErrors = [err3];
1261
+ }
1262
+ else {
1263
+ vErrors.push(err3);
1264
+ }
1265
+ errors++;
1266
+ }
1267
+ }
1268
+ }
1269
+ else {
1270
+ const err4 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1271
+ if (vErrors === null) {
1272
+ vErrors = [err4];
1273
+ }
1274
+ else {
1275
+ vErrors.push(err4);
1276
+ }
1277
+ errors++;
1278
+ } validate35.errors = vErrors; return errors === 0; }
1279
+ validate35.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1280
+ const schema75 = { "type": "object", "additionalProperties": false, "dependentRequired": { "key": ["value"], "value": ["key"] }, "properties": { "subject": { "$ref": "#/$defs/nonEmptyText" }, "claim": { "$ref": "#/$defs/nonEmptyText" }, "key": { "$ref": "#/$defs/nonEmptyText" }, "value": { "$ref": "#/$defs/nonEmptyText" }, "result": { "enum": ["confirmed", "contradicted", "unknown", "not-observed"] }, "evidence": { "type": "object", "additionalProperties": false, "required": ["uri"], "properties": { "uri": { "$ref": "#/$defs/nonEmptyText" }, "message": { "$ref": "#/$defs/nonEmptyText" } } } }, "oneOf": [{ "required": ["subject"], "not": { "required": ["claim"] } }, { "required": ["claim"], "not": { "required": ["subject"] } }] };
1281
+ function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1282
+ let vErrors = null;
1283
+ let errors = 0;
1284
+ const evaluated0 = validate40.evaluated;
1285
+ if (evaluated0.dynamicProps) {
1286
+ evaluated0.props = undefined;
1287
+ }
1288
+ if (evaluated0.dynamicItems) {
1289
+ evaluated0.items = undefined;
1290
+ }
1291
+ const _errs1 = errors;
1292
+ let valid0 = false;
1293
+ let passing0 = null;
1294
+ const _errs2 = errors;
1295
+ const _errs3 = errors;
1296
+ const _errs4 = errors;
1297
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1298
+ let missing0;
1299
+ if ((data.claim === undefined) && (missing0 = "claim")) {
1300
+ const err0 = {};
1301
+ if (vErrors === null) {
1302
+ vErrors = [err0];
1303
+ }
1304
+ else {
1305
+ vErrors.push(err0);
1306
+ }
1307
+ errors++;
1308
+ }
1309
+ }
1310
+ var valid1 = _errs4 === errors;
1311
+ if (valid1) {
1312
+ const err1 = { instancePath, schemaPath: "#/oneOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
1313
+ if (vErrors === null) {
1314
+ vErrors = [err1];
1315
+ }
1316
+ else {
1317
+ vErrors.push(err1);
1318
+ }
1319
+ errors++;
1320
+ }
1321
+ else {
1322
+ errors = _errs3;
1323
+ if (vErrors !== null) {
1324
+ if (_errs3) {
1325
+ vErrors.length = _errs3;
1326
+ }
1327
+ else {
1328
+ vErrors = null;
1329
+ }
1330
+ }
1331
+ }
1332
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1333
+ if (data.subject === undefined) {
1334
+ const err2 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: "subject" }, message: "must have required property '" + "subject" + "'" };
1335
+ if (vErrors === null) {
1336
+ vErrors = [err2];
1337
+ }
1338
+ else {
1339
+ vErrors.push(err2);
1340
+ }
1341
+ errors++;
1342
+ }
1343
+ }
1344
+ var _valid0 = _errs2 === errors;
1345
+ if (_valid0) {
1346
+ valid0 = true;
1347
+ passing0 = 0;
1348
+ }
1349
+ const _errs5 = errors;
1350
+ const _errs6 = errors;
1351
+ const _errs7 = errors;
1352
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1353
+ let missing1;
1354
+ if ((data.subject === undefined) && (missing1 = "subject")) {
1355
+ const err3 = {};
1356
+ if (vErrors === null) {
1357
+ vErrors = [err3];
1358
+ }
1359
+ else {
1360
+ vErrors.push(err3);
1361
+ }
1362
+ errors++;
1363
+ }
1364
+ }
1365
+ var valid2 = _errs7 === errors;
1366
+ if (valid2) {
1367
+ const err4 = { instancePath, schemaPath: "#/oneOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
1368
+ if (vErrors === null) {
1369
+ vErrors = [err4];
1370
+ }
1371
+ else {
1372
+ vErrors.push(err4);
1373
+ }
1374
+ errors++;
1375
+ }
1376
+ else {
1377
+ errors = _errs6;
1378
+ if (vErrors !== null) {
1379
+ if (_errs6) {
1380
+ vErrors.length = _errs6;
1381
+ }
1382
+ else {
1383
+ vErrors = null;
1384
+ }
1385
+ }
1386
+ }
1387
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1388
+ if (data.claim === undefined) {
1389
+ const err5 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: "claim" }, message: "must have required property '" + "claim" + "'" };
1390
+ if (vErrors === null) {
1391
+ vErrors = [err5];
1392
+ }
1393
+ else {
1394
+ vErrors.push(err5);
1395
+ }
1396
+ errors++;
1397
+ }
1398
+ }
1399
+ var _valid0 = _errs5 === errors;
1400
+ if (_valid0 && valid0) {
1401
+ valid0 = false;
1402
+ passing0 = [passing0, 1];
1403
+ }
1404
+ else {
1405
+ if (_valid0) {
1406
+ valid0 = true;
1407
+ passing0 = 1;
1408
+ }
1409
+ }
1410
+ if (!valid0) {
1411
+ const err6 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
1412
+ if (vErrors === null) {
1413
+ vErrors = [err6];
1414
+ }
1415
+ else {
1416
+ vErrors.push(err6);
1417
+ }
1418
+ errors++;
1419
+ }
1420
+ else {
1421
+ errors = _errs1;
1422
+ if (vErrors !== null) {
1423
+ if (_errs1) {
1424
+ vErrors.length = _errs1;
1425
+ }
1426
+ else {
1427
+ vErrors = null;
1428
+ }
1429
+ }
1430
+ }
1431
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1432
+ for (const key0 in data) {
1433
+ if (!((((((key0 === "subject") || (key0 === "claim")) || (key0 === "key")) || (key0 === "value")) || (key0 === "result")) || (key0 === "evidence"))) {
1434
+ const err7 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
1435
+ if (vErrors === null) {
1436
+ vErrors = [err7];
1437
+ }
1438
+ else {
1439
+ vErrors.push(err7);
1440
+ }
1441
+ errors++;
1442
+ }
1443
+ }
1444
+ if (data.subject !== undefined) {
1445
+ let data0 = data.subject;
1446
+ if (typeof data0 === "string") {
1447
+ if (!pattern4.test(data0)) {
1448
+ const err8 = { instancePath: instancePath + "/subject", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1449
+ if (vErrors === null) {
1450
+ vErrors = [err8];
1451
+ }
1452
+ else {
1453
+ vErrors.push(err8);
1454
+ }
1455
+ errors++;
1456
+ }
1457
+ }
1458
+ else {
1459
+ const err9 = { instancePath: instancePath + "/subject", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1460
+ if (vErrors === null) {
1461
+ vErrors = [err9];
1462
+ }
1463
+ else {
1464
+ vErrors.push(err9);
1465
+ }
1466
+ errors++;
1467
+ }
1468
+ }
1469
+ if (data.claim !== undefined) {
1470
+ let data1 = data.claim;
1471
+ if (typeof data1 === "string") {
1472
+ if (!pattern4.test(data1)) {
1473
+ const err10 = { instancePath: instancePath + "/claim", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1474
+ if (vErrors === null) {
1475
+ vErrors = [err10];
1476
+ }
1477
+ else {
1478
+ vErrors.push(err10);
1479
+ }
1480
+ errors++;
1481
+ }
1482
+ }
1483
+ else {
1484
+ const err11 = { instancePath: instancePath + "/claim", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1485
+ if (vErrors === null) {
1486
+ vErrors = [err11];
1487
+ }
1488
+ else {
1489
+ vErrors.push(err11);
1490
+ }
1491
+ errors++;
1492
+ }
1493
+ }
1494
+ if (data.key !== undefined) {
1495
+ let data2 = data.key;
1496
+ if (typeof data2 === "string") {
1497
+ if (!pattern4.test(data2)) {
1498
+ const err12 = { instancePath: instancePath + "/key", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1499
+ if (vErrors === null) {
1500
+ vErrors = [err12];
1501
+ }
1502
+ else {
1503
+ vErrors.push(err12);
1504
+ }
1505
+ errors++;
1506
+ }
1507
+ }
1508
+ else {
1509
+ const err13 = { instancePath: instancePath + "/key", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1510
+ if (vErrors === null) {
1511
+ vErrors = [err13];
1512
+ }
1513
+ else {
1514
+ vErrors.push(err13);
1515
+ }
1516
+ errors++;
1517
+ }
1518
+ }
1519
+ if (data.value !== undefined) {
1520
+ let data3 = data.value;
1521
+ if (typeof data3 === "string") {
1522
+ if (!pattern4.test(data3)) {
1523
+ const err14 = { instancePath: instancePath + "/value", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1524
+ if (vErrors === null) {
1525
+ vErrors = [err14];
1526
+ }
1527
+ else {
1528
+ vErrors.push(err14);
1529
+ }
1530
+ errors++;
1531
+ }
1532
+ }
1533
+ else {
1534
+ const err15 = { instancePath: instancePath + "/value", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1535
+ if (vErrors === null) {
1536
+ vErrors = [err15];
1537
+ }
1538
+ else {
1539
+ vErrors.push(err15);
1540
+ }
1541
+ errors++;
1542
+ }
1543
+ }
1544
+ if (data.result !== undefined) {
1545
+ let data4 = data.result;
1546
+ if (!((((data4 === "confirmed") || (data4 === "contradicted")) || (data4 === "unknown")) || (data4 === "not-observed"))) {
1547
+ const err16 = { instancePath: instancePath + "/result", schemaPath: "#/properties/result/enum", keyword: "enum", params: { allowedValues: schema75.properties.result.enum }, message: "must be equal to one of the allowed values" };
1548
+ if (vErrors === null) {
1549
+ vErrors = [err16];
1550
+ }
1551
+ else {
1552
+ vErrors.push(err16);
1553
+ }
1554
+ errors++;
1555
+ }
1556
+ }
1557
+ if (data.evidence !== undefined) {
1558
+ let data5 = data.evidence;
1559
+ if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
1560
+ if (data5.uri === undefined) {
1561
+ const err17 = { instancePath: instancePath + "/evidence", schemaPath: "#/properties/evidence/required", keyword: "required", params: { missingProperty: "uri" }, message: "must have required property '" + "uri" + "'" };
1562
+ if (vErrors === null) {
1563
+ vErrors = [err17];
1564
+ }
1565
+ else {
1566
+ vErrors.push(err17);
1567
+ }
1568
+ errors++;
1569
+ }
1570
+ for (const key1 in data5) {
1571
+ if (!((key1 === "uri") || (key1 === "message"))) {
1572
+ const err18 = { instancePath: instancePath + "/evidence", schemaPath: "#/properties/evidence/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
1573
+ if (vErrors === null) {
1574
+ vErrors = [err18];
1575
+ }
1576
+ else {
1577
+ vErrors.push(err18);
1578
+ }
1579
+ errors++;
1580
+ }
1581
+ }
1582
+ if (data5.uri !== undefined) {
1583
+ let data6 = data5.uri;
1584
+ if (typeof data6 === "string") {
1585
+ if (!pattern4.test(data6)) {
1586
+ const err19 = { instancePath: instancePath + "/evidence/uri", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1587
+ if (vErrors === null) {
1588
+ vErrors = [err19];
1589
+ }
1590
+ else {
1591
+ vErrors.push(err19);
1592
+ }
1593
+ errors++;
1594
+ }
1595
+ }
1596
+ else {
1597
+ const err20 = { instancePath: instancePath + "/evidence/uri", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1598
+ if (vErrors === null) {
1599
+ vErrors = [err20];
1600
+ }
1601
+ else {
1602
+ vErrors.push(err20);
1603
+ }
1604
+ errors++;
1605
+ }
1606
+ }
1607
+ if (data5.message !== undefined) {
1608
+ let data7 = data5.message;
1609
+ if (typeof data7 === "string") {
1610
+ if (!pattern4.test(data7)) {
1611
+ const err21 = { instancePath: instancePath + "/evidence/message", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1612
+ if (vErrors === null) {
1613
+ vErrors = [err21];
1614
+ }
1615
+ else {
1616
+ vErrors.push(err21);
1617
+ }
1618
+ errors++;
1619
+ }
1620
+ }
1621
+ else {
1622
+ const err22 = { instancePath: instancePath + "/evidence/message", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1623
+ if (vErrors === null) {
1624
+ vErrors = [err22];
1625
+ }
1626
+ else {
1627
+ vErrors.push(err22);
1628
+ }
1629
+ errors++;
1630
+ }
1631
+ }
1632
+ }
1633
+ else {
1634
+ const err23 = { instancePath: instancePath + "/evidence", schemaPath: "#/properties/evidence/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1635
+ if (vErrors === null) {
1636
+ vErrors = [err23];
1637
+ }
1638
+ else {
1639
+ vErrors.push(err23);
1640
+ }
1641
+ errors++;
1642
+ }
1643
+ }
1644
+ if (data.key !== undefined) {
1645
+ if (data.value === undefined) {
1646
+ const err24 = { instancePath, schemaPath: "#/dependentRequired", keyword: "dependentRequired", params: { property: "key",
1647
+ missingProperty: "value",
1648
+ depsCount: 1,
1649
+ deps: "value" }, message: "must have property value when property key is present" };
1650
+ if (vErrors === null) {
1651
+ vErrors = [err24];
1652
+ }
1653
+ else {
1654
+ vErrors.push(err24);
1655
+ }
1656
+ errors++;
1657
+ }
1658
+ }
1659
+ if (data.value !== undefined) {
1660
+ if (data.key === undefined) {
1661
+ const err25 = { instancePath, schemaPath: "#/dependentRequired", keyword: "dependentRequired", params: { property: "value",
1662
+ missingProperty: "key",
1663
+ depsCount: 1,
1664
+ deps: "key" }, message: "must have property key when property value is present" };
1665
+ if (vErrors === null) {
1666
+ vErrors = [err25];
1667
+ }
1668
+ else {
1669
+ vErrors.push(err25);
1670
+ }
1671
+ errors++;
1672
+ }
1673
+ }
1674
+ }
1675
+ else {
1676
+ const err26 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1677
+ if (vErrors === null) {
1678
+ vErrors = [err26];
1679
+ }
1680
+ else {
1681
+ vErrors.push(err26);
1682
+ }
1683
+ errors++;
1684
+ }
1685
+ validate40.errors = vErrors;
1686
+ return errors === 0;
1687
+ }
1688
+ validate40.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
1689
+ const schema83 = { "type": "object", "additionalProperties": false, "dependentRequired": { "value": ["key"] }, "properties": { "subject": { "$ref": "#/$defs/nonEmptyText" }, "claim": { "$ref": "#/$defs/nonEmptyText" }, "key": { "$ref": "#/$defs/nonEmptyText" }, "value": { "$ref": "#/$defs/nonEmptyText" }, "result": { "enum": ["confirmed", "contradicted", "unknown", "not-observed"] }, "evidence": { "type": "object", "additionalProperties": false, "properties": { "uri": { "$ref": "#/$defs/nonEmptyText" }, "message": { "$ref": "#/$defs/nonEmptyText" } } } }, "oneOf": [{ "required": ["subject"], "not": { "required": ["claim"] } }, { "required": ["claim"], "not": { "required": ["subject"] } }] };
1690
+ function validate42(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
1691
+ let vErrors = null;
1692
+ let errors = 0;
1693
+ const evaluated0 = validate42.evaluated;
1694
+ if (evaluated0.dynamicProps) {
1695
+ evaluated0.props = undefined;
1696
+ }
1697
+ if (evaluated0.dynamicItems) {
1698
+ evaluated0.items = undefined;
1699
+ }
1700
+ const _errs1 = errors;
1701
+ let valid0 = false;
1702
+ let passing0 = null;
1703
+ const _errs2 = errors;
1704
+ const _errs3 = errors;
1705
+ const _errs4 = errors;
1706
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1707
+ let missing0;
1708
+ if ((data.claim === undefined) && (missing0 = "claim")) {
1709
+ const err0 = {};
1710
+ if (vErrors === null) {
1711
+ vErrors = [err0];
1712
+ }
1713
+ else {
1714
+ vErrors.push(err0);
1715
+ }
1716
+ errors++;
1717
+ }
1718
+ }
1719
+ var valid1 = _errs4 === errors;
1720
+ if (valid1) {
1721
+ const err1 = { instancePath, schemaPath: "#/oneOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
1722
+ if (vErrors === null) {
1723
+ vErrors = [err1];
1724
+ }
1725
+ else {
1726
+ vErrors.push(err1);
1727
+ }
1728
+ errors++;
1729
+ }
1730
+ else {
1731
+ errors = _errs3;
1732
+ if (vErrors !== null) {
1733
+ if (_errs3) {
1734
+ vErrors.length = _errs3;
1735
+ }
1736
+ else {
1737
+ vErrors = null;
1738
+ }
1739
+ }
1740
+ }
1741
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1742
+ if (data.subject === undefined) {
1743
+ const err2 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: "subject" }, message: "must have required property '" + "subject" + "'" };
1744
+ if (vErrors === null) {
1745
+ vErrors = [err2];
1746
+ }
1747
+ else {
1748
+ vErrors.push(err2);
1749
+ }
1750
+ errors++;
1751
+ }
1752
+ }
1753
+ var _valid0 = _errs2 === errors;
1754
+ if (_valid0) {
1755
+ valid0 = true;
1756
+ passing0 = 0;
1757
+ }
1758
+ const _errs5 = errors;
1759
+ const _errs6 = errors;
1760
+ const _errs7 = errors;
1761
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1762
+ let missing1;
1763
+ if ((data.subject === undefined) && (missing1 = "subject")) {
1764
+ const err3 = {};
1765
+ if (vErrors === null) {
1766
+ vErrors = [err3];
1767
+ }
1768
+ else {
1769
+ vErrors.push(err3);
1770
+ }
1771
+ errors++;
1772
+ }
1773
+ }
1774
+ var valid2 = _errs7 === errors;
1775
+ if (valid2) {
1776
+ const err4 = { instancePath, schemaPath: "#/oneOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
1777
+ if (vErrors === null) {
1778
+ vErrors = [err4];
1779
+ }
1780
+ else {
1781
+ vErrors.push(err4);
1782
+ }
1783
+ errors++;
1784
+ }
1785
+ else {
1786
+ errors = _errs6;
1787
+ if (vErrors !== null) {
1788
+ if (_errs6) {
1789
+ vErrors.length = _errs6;
1790
+ }
1791
+ else {
1792
+ vErrors = null;
1793
+ }
1794
+ }
1795
+ }
1796
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1797
+ if (data.claim === undefined) {
1798
+ const err5 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: "claim" }, message: "must have required property '" + "claim" + "'" };
1799
+ if (vErrors === null) {
1800
+ vErrors = [err5];
1801
+ }
1802
+ else {
1803
+ vErrors.push(err5);
1804
+ }
1805
+ errors++;
1806
+ }
1807
+ }
1808
+ var _valid0 = _errs5 === errors;
1809
+ if (_valid0 && valid0) {
1810
+ valid0 = false;
1811
+ passing0 = [passing0, 1];
1812
+ }
1813
+ else {
1814
+ if (_valid0) {
1815
+ valid0 = true;
1816
+ passing0 = 1;
1817
+ }
1818
+ }
1819
+ if (!valid0) {
1820
+ const err6 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
1821
+ if (vErrors === null) {
1822
+ vErrors = [err6];
1823
+ }
1824
+ else {
1825
+ vErrors.push(err6);
1826
+ }
1827
+ errors++;
1828
+ }
1829
+ else {
1830
+ errors = _errs1;
1831
+ if (vErrors !== null) {
1832
+ if (_errs1) {
1833
+ vErrors.length = _errs1;
1834
+ }
1835
+ else {
1836
+ vErrors = null;
1837
+ }
1838
+ }
1839
+ }
1840
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1841
+ for (const key0 in data) {
1842
+ if (!((((((key0 === "subject") || (key0 === "claim")) || (key0 === "key")) || (key0 === "value")) || (key0 === "result")) || (key0 === "evidence"))) {
1843
+ const err7 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
1844
+ if (vErrors === null) {
1845
+ vErrors = [err7];
1846
+ }
1847
+ else {
1848
+ vErrors.push(err7);
1849
+ }
1850
+ errors++;
1851
+ }
1852
+ }
1853
+ if (data.subject !== undefined) {
1854
+ let data0 = data.subject;
1855
+ if (typeof data0 === "string") {
1856
+ if (!pattern4.test(data0)) {
1857
+ const err8 = { instancePath: instancePath + "/subject", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1858
+ if (vErrors === null) {
1859
+ vErrors = [err8];
1860
+ }
1861
+ else {
1862
+ vErrors.push(err8);
1863
+ }
1864
+ errors++;
1865
+ }
1866
+ }
1867
+ else {
1868
+ const err9 = { instancePath: instancePath + "/subject", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1869
+ if (vErrors === null) {
1870
+ vErrors = [err9];
1871
+ }
1872
+ else {
1873
+ vErrors.push(err9);
1874
+ }
1875
+ errors++;
1876
+ }
1877
+ }
1878
+ if (data.claim !== undefined) {
1879
+ let data1 = data.claim;
1880
+ if (typeof data1 === "string") {
1881
+ if (!pattern4.test(data1)) {
1882
+ const err10 = { instancePath: instancePath + "/claim", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1883
+ if (vErrors === null) {
1884
+ vErrors = [err10];
1885
+ }
1886
+ else {
1887
+ vErrors.push(err10);
1888
+ }
1889
+ errors++;
1890
+ }
1891
+ }
1892
+ else {
1893
+ const err11 = { instancePath: instancePath + "/claim", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1894
+ if (vErrors === null) {
1895
+ vErrors = [err11];
1896
+ }
1897
+ else {
1898
+ vErrors.push(err11);
1899
+ }
1900
+ errors++;
1901
+ }
1902
+ }
1903
+ if (data.key !== undefined) {
1904
+ let data2 = data.key;
1905
+ if (typeof data2 === "string") {
1906
+ if (!pattern4.test(data2)) {
1907
+ const err12 = { instancePath: instancePath + "/key", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1908
+ if (vErrors === null) {
1909
+ vErrors = [err12];
1910
+ }
1911
+ else {
1912
+ vErrors.push(err12);
1913
+ }
1914
+ errors++;
1915
+ }
1916
+ }
1917
+ else {
1918
+ const err13 = { instancePath: instancePath + "/key", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1919
+ if (vErrors === null) {
1920
+ vErrors = [err13];
1921
+ }
1922
+ else {
1923
+ vErrors.push(err13);
1924
+ }
1925
+ errors++;
1926
+ }
1927
+ }
1928
+ if (data.value !== undefined) {
1929
+ let data3 = data.value;
1930
+ if (typeof data3 === "string") {
1931
+ if (!pattern4.test(data3)) {
1932
+ const err14 = { instancePath: instancePath + "/value", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1933
+ if (vErrors === null) {
1934
+ vErrors = [err14];
1935
+ }
1936
+ else {
1937
+ vErrors.push(err14);
1938
+ }
1939
+ errors++;
1940
+ }
1941
+ }
1942
+ else {
1943
+ const err15 = { instancePath: instancePath + "/value", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1944
+ if (vErrors === null) {
1945
+ vErrors = [err15];
1946
+ }
1947
+ else {
1948
+ vErrors.push(err15);
1949
+ }
1950
+ errors++;
1951
+ }
1952
+ }
1953
+ if (data.result !== undefined) {
1954
+ let data4 = data.result;
1955
+ if (!((((data4 === "confirmed") || (data4 === "contradicted")) || (data4 === "unknown")) || (data4 === "not-observed"))) {
1956
+ const err16 = { instancePath: instancePath + "/result", schemaPath: "#/properties/result/enum", keyword: "enum", params: { allowedValues: schema83.properties.result.enum }, message: "must be equal to one of the allowed values" };
1957
+ if (vErrors === null) {
1958
+ vErrors = [err16];
1959
+ }
1960
+ else {
1961
+ vErrors.push(err16);
1962
+ }
1963
+ errors++;
1964
+ }
1965
+ }
1966
+ if (data.evidence !== undefined) {
1967
+ let data5 = data.evidence;
1968
+ if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
1969
+ for (const key1 in data5) {
1970
+ if (!((key1 === "uri") || (key1 === "message"))) {
1971
+ const err17 = { instancePath: instancePath + "/evidence", schemaPath: "#/properties/evidence/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
1972
+ if (vErrors === null) {
1973
+ vErrors = [err17];
1974
+ }
1975
+ else {
1976
+ vErrors.push(err17);
1977
+ }
1978
+ errors++;
1979
+ }
1980
+ }
1981
+ if (data5.uri !== undefined) {
1982
+ let data6 = data5.uri;
1983
+ if (typeof data6 === "string") {
1984
+ if (!pattern4.test(data6)) {
1985
+ const err18 = { instancePath: instancePath + "/evidence/uri", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
1986
+ if (vErrors === null) {
1987
+ vErrors = [err18];
1988
+ }
1989
+ else {
1990
+ vErrors.push(err18);
1991
+ }
1992
+ errors++;
1993
+ }
1994
+ }
1995
+ else {
1996
+ const err19 = { instancePath: instancePath + "/evidence/uri", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1997
+ if (vErrors === null) {
1998
+ vErrors = [err19];
1999
+ }
2000
+ else {
2001
+ vErrors.push(err19);
2002
+ }
2003
+ errors++;
2004
+ }
2005
+ }
2006
+ if (data5.message !== undefined) {
2007
+ let data7 = data5.message;
2008
+ if (typeof data7 === "string") {
2009
+ if (!pattern4.test(data7)) {
2010
+ const err20 = { instancePath: instancePath + "/evidence/message", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2011
+ if (vErrors === null) {
2012
+ vErrors = [err20];
2013
+ }
2014
+ else {
2015
+ vErrors.push(err20);
2016
+ }
2017
+ errors++;
2018
+ }
2019
+ }
2020
+ else {
2021
+ const err21 = { instancePath: instancePath + "/evidence/message", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2022
+ if (vErrors === null) {
2023
+ vErrors = [err21];
2024
+ }
2025
+ else {
2026
+ vErrors.push(err21);
2027
+ }
2028
+ errors++;
2029
+ }
2030
+ }
2031
+ }
2032
+ else {
2033
+ const err22 = { instancePath: instancePath + "/evidence", schemaPath: "#/properties/evidence/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2034
+ if (vErrors === null) {
2035
+ vErrors = [err22];
2036
+ }
2037
+ else {
2038
+ vErrors.push(err22);
2039
+ }
2040
+ errors++;
2041
+ }
2042
+ }
2043
+ if (data.value !== undefined) {
2044
+ if (data.key === undefined) {
2045
+ const err23 = { instancePath, schemaPath: "#/dependentRequired", keyword: "dependentRequired", params: { property: "value",
2046
+ missingProperty: "key",
2047
+ depsCount: 1,
2048
+ deps: "key" }, message: "must have property key when property value is present" };
2049
+ if (vErrors === null) {
2050
+ vErrors = [err23];
2051
+ }
2052
+ else {
2053
+ vErrors.push(err23);
2054
+ }
2055
+ errors++;
2056
+ }
2057
+ }
2058
+ }
2059
+ else {
2060
+ const err24 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2061
+ if (vErrors === null) {
2062
+ vErrors = [err24];
2063
+ }
2064
+ else {
2065
+ vErrors.push(err24);
2066
+ }
2067
+ errors++;
2068
+ }
2069
+ validate42.errors = vErrors;
2070
+ return errors === 0;
2071
+ }
2072
+ validate42.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
2073
+ const schema91 = { "type": "object", "additionalProperties": false, "properties": { "subject": { "$ref": "#/$defs/nonEmptyText" }, "claim": { "$ref": "#/$defs/nonEmptyText" }, "key": { "$ref": "#/$defs/nonEmptyText" } }, "oneOf": [{ "required": ["subject"], "not": { "required": ["claim"] } }, { "required": ["claim"], "not": { "required": ["subject"] } }] };
2074
+ function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate44.evaluated; if (evaluated0.dynamicProps) {
2075
+ evaluated0.props = undefined;
2076
+ } if (evaluated0.dynamicItems) {
2077
+ evaluated0.items = undefined;
2078
+ } const _errs1 = errors; let valid0 = false; let passing0 = null; const _errs2 = errors; const _errs3 = errors; const _errs4 = errors; if (data && typeof data == "object" && !Array.isArray(data)) {
2079
+ let missing0;
2080
+ if ((data.claim === undefined) && (missing0 = "claim")) {
2081
+ const err0 = {};
2082
+ if (vErrors === null) {
2083
+ vErrors = [err0];
2084
+ }
2085
+ else {
2086
+ vErrors.push(err0);
2087
+ }
2088
+ errors++;
2089
+ }
2090
+ } var valid1 = _errs4 === errors; if (valid1) {
2091
+ const err1 = { instancePath, schemaPath: "#/oneOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
2092
+ if (vErrors === null) {
2093
+ vErrors = [err1];
2094
+ }
2095
+ else {
2096
+ vErrors.push(err1);
2097
+ }
2098
+ errors++;
2099
+ }
2100
+ else {
2101
+ errors = _errs3;
2102
+ if (vErrors !== null) {
2103
+ if (_errs3) {
2104
+ vErrors.length = _errs3;
2105
+ }
2106
+ else {
2107
+ vErrors = null;
2108
+ }
2109
+ }
2110
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
2111
+ if (data.subject === undefined) {
2112
+ const err2 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: "subject" }, message: "must have required property '" + "subject" + "'" };
2113
+ if (vErrors === null) {
2114
+ vErrors = [err2];
2115
+ }
2116
+ else {
2117
+ vErrors.push(err2);
2118
+ }
2119
+ errors++;
2120
+ }
2121
+ } var _valid0 = _errs2 === errors; if (_valid0) {
2122
+ valid0 = true;
2123
+ passing0 = 0;
2124
+ } const _errs5 = errors; const _errs6 = errors; const _errs7 = errors; if (data && typeof data == "object" && !Array.isArray(data)) {
2125
+ let missing1;
2126
+ if ((data.subject === undefined) && (missing1 = "subject")) {
2127
+ const err3 = {};
2128
+ if (vErrors === null) {
2129
+ vErrors = [err3];
2130
+ }
2131
+ else {
2132
+ vErrors.push(err3);
2133
+ }
2134
+ errors++;
2135
+ }
2136
+ } var valid2 = _errs7 === errors; if (valid2) {
2137
+ const err4 = { instancePath, schemaPath: "#/oneOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
2138
+ if (vErrors === null) {
2139
+ vErrors = [err4];
2140
+ }
2141
+ else {
2142
+ vErrors.push(err4);
2143
+ }
2144
+ errors++;
2145
+ }
2146
+ else {
2147
+ errors = _errs6;
2148
+ if (vErrors !== null) {
2149
+ if (_errs6) {
2150
+ vErrors.length = _errs6;
2151
+ }
2152
+ else {
2153
+ vErrors = null;
2154
+ }
2155
+ }
2156
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
2157
+ if (data.claim === undefined) {
2158
+ const err5 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: "claim" }, message: "must have required property '" + "claim" + "'" };
2159
+ if (vErrors === null) {
2160
+ vErrors = [err5];
2161
+ }
2162
+ else {
2163
+ vErrors.push(err5);
2164
+ }
2165
+ errors++;
2166
+ }
2167
+ } var _valid0 = _errs5 === errors; if (_valid0 && valid0) {
2168
+ valid0 = false;
2169
+ passing0 = [passing0, 1];
2170
+ }
2171
+ else {
2172
+ if (_valid0) {
2173
+ valid0 = true;
2174
+ passing0 = 1;
2175
+ }
2176
+ } if (!valid0) {
2177
+ const err6 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
2178
+ if (vErrors === null) {
2179
+ vErrors = [err6];
2180
+ }
2181
+ else {
2182
+ vErrors.push(err6);
2183
+ }
2184
+ errors++;
2185
+ }
2186
+ else {
2187
+ errors = _errs1;
2188
+ if (vErrors !== null) {
2189
+ if (_errs1) {
2190
+ vErrors.length = _errs1;
2191
+ }
2192
+ else {
2193
+ vErrors = null;
2194
+ }
2195
+ }
2196
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
2197
+ for (const key0 in data) {
2198
+ if (!(((key0 === "subject") || (key0 === "claim")) || (key0 === "key"))) {
2199
+ const err7 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
2200
+ if (vErrors === null) {
2201
+ vErrors = [err7];
2202
+ }
2203
+ else {
2204
+ vErrors.push(err7);
2205
+ }
2206
+ errors++;
2207
+ }
2208
+ }
2209
+ if (data.subject !== undefined) {
2210
+ let data0 = data.subject;
2211
+ if (typeof data0 === "string") {
2212
+ if (!pattern4.test(data0)) {
2213
+ const err8 = { instancePath: instancePath + "/subject", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2214
+ if (vErrors === null) {
2215
+ vErrors = [err8];
2216
+ }
2217
+ else {
2218
+ vErrors.push(err8);
2219
+ }
2220
+ errors++;
2221
+ }
2222
+ }
2223
+ else {
2224
+ const err9 = { instancePath: instancePath + "/subject", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2225
+ if (vErrors === null) {
2226
+ vErrors = [err9];
2227
+ }
2228
+ else {
2229
+ vErrors.push(err9);
2230
+ }
2231
+ errors++;
2232
+ }
2233
+ }
2234
+ if (data.claim !== undefined) {
2235
+ let data1 = data.claim;
2236
+ if (typeof data1 === "string") {
2237
+ if (!pattern4.test(data1)) {
2238
+ const err10 = { instancePath: instancePath + "/claim", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2239
+ if (vErrors === null) {
2240
+ vErrors = [err10];
2241
+ }
2242
+ else {
2243
+ vErrors.push(err10);
2244
+ }
2245
+ errors++;
2246
+ }
2247
+ }
2248
+ else {
2249
+ const err11 = { instancePath: instancePath + "/claim", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2250
+ if (vErrors === null) {
2251
+ vErrors = [err11];
2252
+ }
2253
+ else {
2254
+ vErrors.push(err11);
2255
+ }
2256
+ errors++;
2257
+ }
2258
+ }
2259
+ if (data.key !== undefined) {
2260
+ let data2 = data.key;
2261
+ if (typeof data2 === "string") {
2262
+ if (!pattern4.test(data2)) {
2263
+ const err12 = { instancePath: instancePath + "/key", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2264
+ if (vErrors === null) {
2265
+ vErrors = [err12];
2266
+ }
2267
+ else {
2268
+ vErrors.push(err12);
2269
+ }
2270
+ errors++;
2271
+ }
2272
+ }
2273
+ else {
2274
+ const err13 = { instancePath: instancePath + "/key", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2275
+ if (vErrors === null) {
2276
+ vErrors = [err13];
2277
+ }
2278
+ else {
2279
+ vErrors.push(err13);
2280
+ }
2281
+ errors++;
2282
+ }
2283
+ }
2284
+ }
2285
+ else {
2286
+ const err14 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2287
+ if (vErrors === null) {
2288
+ vErrors = [err14];
2289
+ }
2290
+ else {
2291
+ vErrors.push(err14);
2292
+ }
2293
+ errors++;
2294
+ } validate44.errors = vErrors; return errors === 0; }
2295
+ validate44.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
2296
+ function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate21.evaluated; if (evaluated0.dynamicProps) {
2297
+ evaluated0.props = undefined;
2298
+ } if (evaluated0.dynamicItems) {
2299
+ evaluated0.items = undefined;
2300
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
2301
+ if (data.op === undefined) {
2302
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
2303
+ if (vErrors === null) {
2304
+ vErrors = [err0];
2305
+ }
2306
+ else {
2307
+ vErrors.push(err0);
2308
+ }
2309
+ errors++;
2310
+ }
2311
+ const tag0 = data.op;
2312
+ if (typeof tag0 == "string") {
2313
+ if (tag0 === "add-concept") {
2314
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2315
+ if (data.op === undefined) {
2316
+ const err1 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
2317
+ if (vErrors === null) {
2318
+ vErrors = [err1];
2319
+ }
2320
+ else {
2321
+ vErrors.push(err1);
2322
+ }
2323
+ errors++;
2324
+ }
2325
+ if (data.document === undefined) {
2326
+ const err2 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
2327
+ if (vErrors === null) {
2328
+ vErrors = [err2];
2329
+ }
2330
+ else {
2331
+ vErrors.push(err2);
2332
+ }
2333
+ errors++;
2334
+ }
2335
+ if (data.concept === undefined) {
2336
+ const err3 = { instancePath, schemaPath: "#/oneOf/0/required", keyword: "required", params: { missingProperty: "concept" }, message: "must have required property '" + "concept" + "'" };
2337
+ if (vErrors === null) {
2338
+ vErrors = [err3];
2339
+ }
2340
+ else {
2341
+ vErrors.push(err3);
2342
+ }
2343
+ errors++;
2344
+ }
2345
+ for (const key0 in data) {
2346
+ if (!(((key0 === "op") || (key0 === "document")) || (key0 === "concept"))) {
2347
+ const err4 = { instancePath, schemaPath: "#/oneOf/0/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
2348
+ if (vErrors === null) {
2349
+ vErrors = [err4];
2350
+ }
2351
+ else {
2352
+ vErrors.push(err4);
2353
+ }
2354
+ errors++;
2355
+ }
2356
+ }
2357
+ if (data.op !== undefined) {
2358
+ if ("add-concept" !== data.op) {
2359
+ const err5 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/0/properties/op/const", keyword: "const", params: { allowedValue: "add-concept" }, message: "must be equal to constant" };
2360
+ if (vErrors === null) {
2361
+ vErrors = [err5];
2362
+ }
2363
+ else {
2364
+ vErrors.push(err5);
2365
+ }
2366
+ errors++;
2367
+ }
2368
+ }
2369
+ if (data.document !== undefined) {
2370
+ let data1 = data.document;
2371
+ if (typeof data1 === "string") {
2372
+ if (!pattern4.test(data1)) {
2373
+ const err6 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2374
+ if (vErrors === null) {
2375
+ vErrors = [err6];
2376
+ }
2377
+ else {
2378
+ vErrors.push(err6);
2379
+ }
2380
+ errors++;
2381
+ }
2382
+ }
2383
+ else {
2384
+ const err7 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2385
+ if (vErrors === null) {
2386
+ vErrors = [err7];
2387
+ }
2388
+ else {
2389
+ vErrors.push(err7);
2390
+ }
2391
+ errors++;
2392
+ }
2393
+ }
2394
+ if (data.concept !== undefined) {
2395
+ let data2 = data.concept;
2396
+ if (!(validate22(data2, { instancePath: instancePath + "/concept", parentData: data, parentDataProperty: "concept", rootData, dynamicAnchors }))) {
2397
+ vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
2398
+ errors = vErrors.length;
2399
+ }
2400
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
2401
+ if (data2.id === undefined) {
2402
+ const err8 = { instancePath: instancePath + "/concept", schemaPath: "#/oneOf/0/properties/concept/allOf/1/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
2403
+ if (vErrors === null) {
2404
+ vErrors = [err8];
2405
+ }
2406
+ else {
2407
+ vErrors.push(err8);
2408
+ }
2409
+ errors++;
2410
+ }
2411
+ if (data2.kind === undefined) {
2412
+ const err9 = { instancePath: instancePath + "/concept", schemaPath: "#/oneOf/0/properties/concept/allOf/1/required", keyword: "required", params: { missingProperty: "kind" }, message: "must have required property '" + "kind" + "'" };
2413
+ if (vErrors === null) {
2414
+ vErrors = [err9];
2415
+ }
2416
+ else {
2417
+ vErrors.push(err9);
2418
+ }
2419
+ errors++;
2420
+ }
2421
+ if (data2.name === undefined) {
2422
+ const err10 = { instancePath: instancePath + "/concept", schemaPath: "#/oneOf/0/properties/concept/allOf/1/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property '" + "name" + "'" };
2423
+ if (vErrors === null) {
2424
+ vErrors = [err10];
2425
+ }
2426
+ else {
2427
+ vErrors.push(err10);
2428
+ }
2429
+ errors++;
2430
+ }
2431
+ }
2432
+ else {
2433
+ const err11 = { instancePath: instancePath + "/concept", schemaPath: "#/oneOf/0/properties/concept/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2434
+ if (vErrors === null) {
2435
+ vErrors = [err11];
2436
+ }
2437
+ else {
2438
+ vErrors.push(err11);
2439
+ }
2440
+ errors++;
2441
+ }
2442
+ }
2443
+ }
2444
+ else {
2445
+ const err12 = { instancePath, schemaPath: "#/oneOf/0/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2446
+ if (vErrors === null) {
2447
+ vErrors = [err12];
2448
+ }
2449
+ else {
2450
+ vErrors.push(err12);
2451
+ }
2452
+ errors++;
2453
+ }
2454
+ var props0 = true;
2455
+ }
2456
+ else if (tag0 === "add-relationship") {
2457
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2458
+ if (data.op === undefined) {
2459
+ const err13 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
2460
+ if (vErrors === null) {
2461
+ vErrors = [err13];
2462
+ }
2463
+ else {
2464
+ vErrors.push(err13);
2465
+ }
2466
+ errors++;
2467
+ }
2468
+ if (data.document === undefined) {
2469
+ const err14 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
2470
+ if (vErrors === null) {
2471
+ vErrors = [err14];
2472
+ }
2473
+ else {
2474
+ vErrors.push(err14);
2475
+ }
2476
+ errors++;
2477
+ }
2478
+ if (data.relationship === undefined) {
2479
+ const err15 = { instancePath, schemaPath: "#/oneOf/1/required", keyword: "required", params: { missingProperty: "relationship" }, message: "must have required property '" + "relationship" + "'" };
2480
+ if (vErrors === null) {
2481
+ vErrors = [err15];
2482
+ }
2483
+ else {
2484
+ vErrors.push(err15);
2485
+ }
2486
+ errors++;
2487
+ }
2488
+ for (const key1 in data) {
2489
+ if (!(((key1 === "op") || (key1 === "document")) || (key1 === "relationship"))) {
2490
+ const err16 = { instancePath, schemaPath: "#/oneOf/1/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
2491
+ if (vErrors === null) {
2492
+ vErrors = [err16];
2493
+ }
2494
+ else {
2495
+ vErrors.push(err16);
2496
+ }
2497
+ errors++;
2498
+ }
2499
+ }
2500
+ if (data.op !== undefined) {
2501
+ if ("add-relationship" !== data.op) {
2502
+ const err17 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/1/properties/op/const", keyword: "const", params: { allowedValue: "add-relationship" }, message: "must be equal to constant" };
2503
+ if (vErrors === null) {
2504
+ vErrors = [err17];
2505
+ }
2506
+ else {
2507
+ vErrors.push(err17);
2508
+ }
2509
+ errors++;
2510
+ }
2511
+ }
2512
+ if (data.document !== undefined) {
2513
+ let data4 = data.document;
2514
+ if (typeof data4 === "string") {
2515
+ if (!pattern4.test(data4)) {
2516
+ const err18 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2517
+ if (vErrors === null) {
2518
+ vErrors = [err18];
2519
+ }
2520
+ else {
2521
+ vErrors.push(err18);
2522
+ }
2523
+ errors++;
2524
+ }
2525
+ }
2526
+ else {
2527
+ const err19 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2528
+ if (vErrors === null) {
2529
+ vErrors = [err19];
2530
+ }
2531
+ else {
2532
+ vErrors.push(err19);
2533
+ }
2534
+ errors++;
2535
+ }
2536
+ }
2537
+ if (data.relationship !== undefined) {
2538
+ let data5 = data.relationship;
2539
+ if (!(validate30(data5, { instancePath: instancePath + "/relationship", parentData: data, parentDataProperty: "relationship", rootData, dynamicAnchors }))) {
2540
+ vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
2541
+ errors = vErrors.length;
2542
+ }
2543
+ if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
2544
+ if (data5.id === undefined) {
2545
+ const err20 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/1/properties/relationship/allOf/1/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
2546
+ if (vErrors === null) {
2547
+ vErrors = [err20];
2548
+ }
2549
+ else {
2550
+ vErrors.push(err20);
2551
+ }
2552
+ errors++;
2553
+ }
2554
+ if (data5.kind === undefined) {
2555
+ const err21 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/1/properties/relationship/allOf/1/required", keyword: "required", params: { missingProperty: "kind" }, message: "must have required property '" + "kind" + "'" };
2556
+ if (vErrors === null) {
2557
+ vErrors = [err21];
2558
+ }
2559
+ else {
2560
+ vErrors.push(err21);
2561
+ }
2562
+ errors++;
2563
+ }
2564
+ if (data5.from === undefined) {
2565
+ const err22 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/1/properties/relationship/allOf/1/required", keyword: "required", params: { missingProperty: "from" }, message: "must have required property '" + "from" + "'" };
2566
+ if (vErrors === null) {
2567
+ vErrors = [err22];
2568
+ }
2569
+ else {
2570
+ vErrors.push(err22);
2571
+ }
2572
+ errors++;
2573
+ }
2574
+ if (data5.to === undefined) {
2575
+ const err23 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/1/properties/relationship/allOf/1/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property '" + "to" + "'" };
2576
+ if (vErrors === null) {
2577
+ vErrors = [err23];
2578
+ }
2579
+ else {
2580
+ vErrors.push(err23);
2581
+ }
2582
+ errors++;
2583
+ }
2584
+ }
2585
+ else {
2586
+ const err24 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/1/properties/relationship/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2587
+ if (vErrors === null) {
2588
+ vErrors = [err24];
2589
+ }
2590
+ else {
2591
+ vErrors.push(err24);
2592
+ }
2593
+ errors++;
2594
+ }
2595
+ }
2596
+ }
2597
+ else {
2598
+ const err25 = { instancePath, schemaPath: "#/oneOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2599
+ if (vErrors === null) {
2600
+ vErrors = [err25];
2601
+ }
2602
+ else {
2603
+ vErrors.push(err25);
2604
+ }
2605
+ errors++;
2606
+ }
2607
+ if (props0 !== true) {
2608
+ props0 = true;
2609
+ }
2610
+ }
2611
+ else if (tag0 === "update-concept") {
2612
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2613
+ if (data.op === undefined) {
2614
+ const err26 = { instancePath, schemaPath: "#/oneOf/2/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
2615
+ if (vErrors === null) {
2616
+ vErrors = [err26];
2617
+ }
2618
+ else {
2619
+ vErrors.push(err26);
2620
+ }
2621
+ errors++;
2622
+ }
2623
+ if (data.document === undefined) {
2624
+ const err27 = { instancePath, schemaPath: "#/oneOf/2/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
2625
+ if (vErrors === null) {
2626
+ vErrors = [err27];
2627
+ }
2628
+ else {
2629
+ vErrors.push(err27);
2630
+ }
2631
+ errors++;
2632
+ }
2633
+ if (data.concept === undefined) {
2634
+ const err28 = { instancePath, schemaPath: "#/oneOf/2/required", keyword: "required", params: { missingProperty: "concept" }, message: "must have required property '" + "concept" + "'" };
2635
+ if (vErrors === null) {
2636
+ vErrors = [err28];
2637
+ }
2638
+ else {
2639
+ vErrors.push(err28);
2640
+ }
2641
+ errors++;
2642
+ }
2643
+ for (const key2 in data) {
2644
+ if (!((((key2 === "op") || (key2 === "document")) || (key2 === "concept")) || (key2 === "remove"))) {
2645
+ const err29 = { instancePath, schemaPath: "#/oneOf/2/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
2646
+ if (vErrors === null) {
2647
+ vErrors = [err29];
2648
+ }
2649
+ else {
2650
+ vErrors.push(err29);
2651
+ }
2652
+ errors++;
2653
+ }
2654
+ }
2655
+ if (data.op !== undefined) {
2656
+ if ("update-concept" !== data.op) {
2657
+ const err30 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/2/properties/op/const", keyword: "const", params: { allowedValue: "update-concept" }, message: "must be equal to constant" };
2658
+ if (vErrors === null) {
2659
+ vErrors = [err30];
2660
+ }
2661
+ else {
2662
+ vErrors.push(err30);
2663
+ }
2664
+ errors++;
2665
+ }
2666
+ }
2667
+ if (data.document !== undefined) {
2668
+ let data7 = data.document;
2669
+ if (typeof data7 === "string") {
2670
+ if (!pattern4.test(data7)) {
2671
+ const err31 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2672
+ if (vErrors === null) {
2673
+ vErrors = [err31];
2674
+ }
2675
+ else {
2676
+ vErrors.push(err31);
2677
+ }
2678
+ errors++;
2679
+ }
2680
+ }
2681
+ else {
2682
+ const err32 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2683
+ if (vErrors === null) {
2684
+ vErrors = [err32];
2685
+ }
2686
+ else {
2687
+ vErrors.push(err32);
2688
+ }
2689
+ errors++;
2690
+ }
2691
+ }
2692
+ if (data.concept !== undefined) {
2693
+ let data8 = data.concept;
2694
+ if (!(validate22(data8, { instancePath: instancePath + "/concept", parentData: data, parentDataProperty: "concept", rootData, dynamicAnchors }))) {
2695
+ vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
2696
+ errors = vErrors.length;
2697
+ }
2698
+ if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
2699
+ if (data8.id === undefined) {
2700
+ const err33 = { instancePath: instancePath + "/concept", schemaPath: "#/oneOf/2/properties/concept/allOf/1/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
2701
+ if (vErrors === null) {
2702
+ vErrors = [err33];
2703
+ }
2704
+ else {
2705
+ vErrors.push(err33);
2706
+ }
2707
+ errors++;
2708
+ }
2709
+ }
2710
+ else {
2711
+ const err34 = { instancePath: instancePath + "/concept", schemaPath: "#/oneOf/2/properties/concept/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2712
+ if (vErrors === null) {
2713
+ vErrors = [err34];
2714
+ }
2715
+ else {
2716
+ vErrors.push(err34);
2717
+ }
2718
+ errors++;
2719
+ }
2720
+ }
2721
+ if (data.remove !== undefined) {
2722
+ let data9 = data.remove;
2723
+ if (Array.isArray(data9)) {
2724
+ if (data9.length < 1) {
2725
+ const err35 = { instancePath: instancePath + "/remove", schemaPath: "#/oneOf/2/properties/remove/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2726
+ if (vErrors === null) {
2727
+ vErrors = [err35];
2728
+ }
2729
+ else {
2730
+ vErrors.push(err35);
2731
+ }
2732
+ errors++;
2733
+ }
2734
+ const len0 = data9.length;
2735
+ for (let i0 = 0; i0 < len0; i0++) {
2736
+ let data10 = data9[i0];
2737
+ if (!(((((((((((data10 === "name") || (data10 === "description")) || (data10 === "aka")) || (data10 === "status")) || (data10 === "owner")) || (data10 === "distinctFrom")) || (data10 === "supersedes")) || (data10 === "constraints")) || (data10 === "references")) || (data10 === "presentIn")) || (data10 === "attestations"))) {
2738
+ const err36 = { instancePath: instancePath + "/remove/" + i0, schemaPath: "#/oneOf/2/properties/remove/items/enum", keyword: "enum", params: { allowedValues: schema32.oneOf[2].properties.remove.items.enum }, message: "must be equal to one of the allowed values" };
2739
+ if (vErrors === null) {
2740
+ vErrors = [err36];
2741
+ }
2742
+ else {
2743
+ vErrors.push(err36);
2744
+ }
2745
+ errors++;
2746
+ }
2747
+ }
2748
+ }
2749
+ else {
2750
+ const err37 = { instancePath: instancePath + "/remove", schemaPath: "#/oneOf/2/properties/remove/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2751
+ if (vErrors === null) {
2752
+ vErrors = [err37];
2753
+ }
2754
+ else {
2755
+ vErrors.push(err37);
2756
+ }
2757
+ errors++;
2758
+ }
2759
+ }
2760
+ }
2761
+ else {
2762
+ const err38 = { instancePath, schemaPath: "#/oneOf/2/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2763
+ if (vErrors === null) {
2764
+ vErrors = [err38];
2765
+ }
2766
+ else {
2767
+ vErrors.push(err38);
2768
+ }
2769
+ errors++;
2770
+ }
2771
+ if (props0 !== true) {
2772
+ props0 = true;
2773
+ }
2774
+ }
2775
+ else if (tag0 === "update-relationship") {
2776
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2777
+ if (data.op === undefined) {
2778
+ const err39 = { instancePath, schemaPath: "#/oneOf/3/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
2779
+ if (vErrors === null) {
2780
+ vErrors = [err39];
2781
+ }
2782
+ else {
2783
+ vErrors.push(err39);
2784
+ }
2785
+ errors++;
2786
+ }
2787
+ if (data.document === undefined) {
2788
+ const err40 = { instancePath, schemaPath: "#/oneOf/3/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
2789
+ if (vErrors === null) {
2790
+ vErrors = [err40];
2791
+ }
2792
+ else {
2793
+ vErrors.push(err40);
2794
+ }
2795
+ errors++;
2796
+ }
2797
+ if (data.relationship === undefined) {
2798
+ const err41 = { instancePath, schemaPath: "#/oneOf/3/required", keyword: "required", params: { missingProperty: "relationship" }, message: "must have required property '" + "relationship" + "'" };
2799
+ if (vErrors === null) {
2800
+ vErrors = [err41];
2801
+ }
2802
+ else {
2803
+ vErrors.push(err41);
2804
+ }
2805
+ errors++;
2806
+ }
2807
+ for (const key3 in data) {
2808
+ if (!((((key3 === "op") || (key3 === "document")) || (key3 === "relationship")) || (key3 === "remove"))) {
2809
+ const err42 = { instancePath, schemaPath: "#/oneOf/3/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
2810
+ if (vErrors === null) {
2811
+ vErrors = [err42];
2812
+ }
2813
+ else {
2814
+ vErrors.push(err42);
2815
+ }
2816
+ errors++;
2817
+ }
2818
+ }
2819
+ if (data.op !== undefined) {
2820
+ if ("update-relationship" !== data.op) {
2821
+ const err43 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/3/properties/op/const", keyword: "const", params: { allowedValue: "update-relationship" }, message: "must be equal to constant" };
2822
+ if (vErrors === null) {
2823
+ vErrors = [err43];
2824
+ }
2825
+ else {
2826
+ vErrors.push(err43);
2827
+ }
2828
+ errors++;
2829
+ }
2830
+ }
2831
+ if (data.document !== undefined) {
2832
+ let data12 = data.document;
2833
+ if (typeof data12 === "string") {
2834
+ if (!pattern4.test(data12)) {
2835
+ const err44 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
2836
+ if (vErrors === null) {
2837
+ vErrors = [err44];
2838
+ }
2839
+ else {
2840
+ vErrors.push(err44);
2841
+ }
2842
+ errors++;
2843
+ }
2844
+ }
2845
+ else {
2846
+ const err45 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2847
+ if (vErrors === null) {
2848
+ vErrors = [err45];
2849
+ }
2850
+ else {
2851
+ vErrors.push(err45);
2852
+ }
2853
+ errors++;
2854
+ }
2855
+ }
2856
+ if (data.relationship !== undefined) {
2857
+ let data13 = data.relationship;
2858
+ if (!(validate30(data13, { instancePath: instancePath + "/relationship", parentData: data, parentDataProperty: "relationship", rootData, dynamicAnchors }))) {
2859
+ vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
2860
+ errors = vErrors.length;
2861
+ }
2862
+ if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
2863
+ if (data13.id === undefined) {
2864
+ const err46 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/3/properties/relationship/allOf/1/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
2865
+ if (vErrors === null) {
2866
+ vErrors = [err46];
2867
+ }
2868
+ else {
2869
+ vErrors.push(err46);
2870
+ }
2871
+ errors++;
2872
+ }
2873
+ }
2874
+ else {
2875
+ const err47 = { instancePath: instancePath + "/relationship", schemaPath: "#/oneOf/3/properties/relationship/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2876
+ if (vErrors === null) {
2877
+ vErrors = [err47];
2878
+ }
2879
+ else {
2880
+ vErrors.push(err47);
2881
+ }
2882
+ errors++;
2883
+ }
2884
+ }
2885
+ if (data.remove !== undefined) {
2886
+ let data14 = data.remove;
2887
+ if (Array.isArray(data14)) {
2888
+ if (data14.length < 1) {
2889
+ const err48 = { instancePath: instancePath + "/remove", schemaPath: "#/oneOf/3/properties/remove/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2890
+ if (vErrors === null) {
2891
+ vErrors = [err48];
2892
+ }
2893
+ else {
2894
+ vErrors.push(err48);
2895
+ }
2896
+ errors++;
2897
+ }
2898
+ const len1 = data14.length;
2899
+ for (let i1 = 0; i1 < len1; i1++) {
2900
+ let data15 = data14[i1];
2901
+ if (!(((((((data15 === "name") || (data15 === "description")) || (data15 === "status")) || (data15 === "mode")) || (data15 === "content")) || (data15 === "references")) || (data15 === "presentIn"))) {
2902
+ const err49 = { instancePath: instancePath + "/remove/" + i1, schemaPath: "#/oneOf/3/properties/remove/items/enum", keyword: "enum", params: { allowedValues: schema32.oneOf[3].properties.remove.items.enum }, message: "must be equal to one of the allowed values" };
2903
+ if (vErrors === null) {
2904
+ vErrors = [err49];
2905
+ }
2906
+ else {
2907
+ vErrors.push(err49);
2908
+ }
2909
+ errors++;
2910
+ }
2911
+ }
2912
+ }
2913
+ else {
2914
+ const err50 = { instancePath: instancePath + "/remove", schemaPath: "#/oneOf/3/properties/remove/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2915
+ if (vErrors === null) {
2916
+ vErrors = [err50];
2917
+ }
2918
+ else {
2919
+ vErrors.push(err50);
2920
+ }
2921
+ errors++;
2922
+ }
2923
+ }
2924
+ }
2925
+ else {
2926
+ const err51 = { instancePath, schemaPath: "#/oneOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2927
+ if (vErrors === null) {
2928
+ vErrors = [err51];
2929
+ }
2930
+ else {
2931
+ vErrors.push(err51);
2932
+ }
2933
+ errors++;
2934
+ }
2935
+ if (props0 !== true) {
2936
+ props0 = true;
2937
+ }
2938
+ }
2939
+ else if (tag0 === "delete-concept") {
2940
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2941
+ if (data.op === undefined) {
2942
+ const err52 = { instancePath, schemaPath: "#/oneOf/4/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
2943
+ if (vErrors === null) {
2944
+ vErrors = [err52];
2945
+ }
2946
+ else {
2947
+ vErrors.push(err52);
2948
+ }
2949
+ errors++;
2950
+ }
2951
+ if (data.document === undefined) {
2952
+ const err53 = { instancePath, schemaPath: "#/oneOf/4/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
2953
+ if (vErrors === null) {
2954
+ vErrors = [err53];
2955
+ }
2956
+ else {
2957
+ vErrors.push(err53);
2958
+ }
2959
+ errors++;
2960
+ }
2961
+ if (data.concept === undefined) {
2962
+ const err54 = { instancePath, schemaPath: "#/oneOf/4/required", keyword: "required", params: { missingProperty: "concept" }, message: "must have required property '" + "concept" + "'" };
2963
+ if (vErrors === null) {
2964
+ vErrors = [err54];
2965
+ }
2966
+ else {
2967
+ vErrors.push(err54);
2968
+ }
2969
+ errors++;
2970
+ }
2971
+ for (const key4 in data) {
2972
+ if (!(((key4 === "op") || (key4 === "document")) || (key4 === "concept"))) {
2973
+ const err55 = { instancePath, schemaPath: "#/oneOf/4/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
2974
+ if (vErrors === null) {
2975
+ vErrors = [err55];
2976
+ }
2977
+ else {
2978
+ vErrors.push(err55);
2979
+ }
2980
+ errors++;
2981
+ }
2982
+ }
2983
+ if (data.op !== undefined) {
2984
+ if ("delete-concept" !== data.op) {
2985
+ const err56 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/4/properties/op/const", keyword: "const", params: { allowedValue: "delete-concept" }, message: "must be equal to constant" };
2986
+ if (vErrors === null) {
2987
+ vErrors = [err56];
2988
+ }
2989
+ else {
2990
+ vErrors.push(err56);
2991
+ }
2992
+ errors++;
2993
+ }
2994
+ }
2995
+ if (data.document !== undefined) {
2996
+ let data17 = data.document;
2997
+ if (typeof data17 === "string") {
2998
+ if (!pattern4.test(data17)) {
2999
+ const err57 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3000
+ if (vErrors === null) {
3001
+ vErrors = [err57];
3002
+ }
3003
+ else {
3004
+ vErrors.push(err57);
3005
+ }
3006
+ errors++;
3007
+ }
3008
+ }
3009
+ else {
3010
+ const err58 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3011
+ if (vErrors === null) {
3012
+ vErrors = [err58];
3013
+ }
3014
+ else {
3015
+ vErrors.push(err58);
3016
+ }
3017
+ errors++;
3018
+ }
3019
+ }
3020
+ if (data.concept !== undefined) {
3021
+ if (!(validate35(data.concept, { instancePath: instancePath + "/concept", parentData: data, parentDataProperty: "concept", rootData, dynamicAnchors }))) {
3022
+ vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);
3023
+ errors = vErrors.length;
3024
+ }
3025
+ }
3026
+ }
3027
+ else {
3028
+ const err59 = { instancePath, schemaPath: "#/oneOf/4/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3029
+ if (vErrors === null) {
3030
+ vErrors = [err59];
3031
+ }
3032
+ else {
3033
+ vErrors.push(err59);
3034
+ }
3035
+ errors++;
3036
+ }
3037
+ if (props0 !== true) {
3038
+ props0 = true;
3039
+ }
3040
+ }
3041
+ else if (tag0 === "delete-relationship") {
3042
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3043
+ if (data.op === undefined) {
3044
+ const err60 = { instancePath, schemaPath: "#/oneOf/5/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
3045
+ if (vErrors === null) {
3046
+ vErrors = [err60];
3047
+ }
3048
+ else {
3049
+ vErrors.push(err60);
3050
+ }
3051
+ errors++;
3052
+ }
3053
+ if (data.document === undefined) {
3054
+ const err61 = { instancePath, schemaPath: "#/oneOf/5/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
3055
+ if (vErrors === null) {
3056
+ vErrors = [err61];
3057
+ }
3058
+ else {
3059
+ vErrors.push(err61);
3060
+ }
3061
+ errors++;
3062
+ }
3063
+ if (data.relationship === undefined) {
3064
+ const err62 = { instancePath, schemaPath: "#/oneOf/5/required", keyword: "required", params: { missingProperty: "relationship" }, message: "must have required property '" + "relationship" + "'" };
3065
+ if (vErrors === null) {
3066
+ vErrors = [err62];
3067
+ }
3068
+ else {
3069
+ vErrors.push(err62);
3070
+ }
3071
+ errors++;
3072
+ }
3073
+ for (const key5 in data) {
3074
+ if (!(((key5 === "op") || (key5 === "document")) || (key5 === "relationship"))) {
3075
+ const err63 = { instancePath, schemaPath: "#/oneOf/5/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
3076
+ if (vErrors === null) {
3077
+ vErrors = [err63];
3078
+ }
3079
+ else {
3080
+ vErrors.push(err63);
3081
+ }
3082
+ errors++;
3083
+ }
3084
+ }
3085
+ if (data.op !== undefined) {
3086
+ if ("delete-relationship" !== data.op) {
3087
+ const err64 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/5/properties/op/const", keyword: "const", params: { allowedValue: "delete-relationship" }, message: "must be equal to constant" };
3088
+ if (vErrors === null) {
3089
+ vErrors = [err64];
3090
+ }
3091
+ else {
3092
+ vErrors.push(err64);
3093
+ }
3094
+ errors++;
3095
+ }
3096
+ }
3097
+ if (data.document !== undefined) {
3098
+ let data20 = data.document;
3099
+ if (typeof data20 === "string") {
3100
+ if (!pattern4.test(data20)) {
3101
+ const err65 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3102
+ if (vErrors === null) {
3103
+ vErrors = [err65];
3104
+ }
3105
+ else {
3106
+ vErrors.push(err65);
3107
+ }
3108
+ errors++;
3109
+ }
3110
+ }
3111
+ else {
3112
+ const err66 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3113
+ if (vErrors === null) {
3114
+ vErrors = [err66];
3115
+ }
3116
+ else {
3117
+ vErrors.push(err66);
3118
+ }
3119
+ errors++;
3120
+ }
3121
+ }
3122
+ if (data.relationship !== undefined) {
3123
+ if (!(validate35(data.relationship, { instancePath: instancePath + "/relationship", parentData: data, parentDataProperty: "relationship", rootData, dynamicAnchors }))) {
3124
+ vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);
3125
+ errors = vErrors.length;
3126
+ }
3127
+ }
3128
+ }
3129
+ else {
3130
+ const err67 = { instancePath, schemaPath: "#/oneOf/5/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3131
+ if (vErrors === null) {
3132
+ vErrors = [err67];
3133
+ }
3134
+ else {
3135
+ vErrors.push(err67);
3136
+ }
3137
+ errors++;
3138
+ }
3139
+ if (props0 !== true) {
3140
+ props0 = true;
3141
+ }
3142
+ }
3143
+ else if (tag0 === "rename-concept") {
3144
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3145
+ if (data.op === undefined) {
3146
+ const err68 = { instancePath, schemaPath: "#/oneOf/6/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
3147
+ if (vErrors === null) {
3148
+ vErrors = [err68];
3149
+ }
3150
+ else {
3151
+ vErrors.push(err68);
3152
+ }
3153
+ errors++;
3154
+ }
3155
+ if (data.document === undefined) {
3156
+ const err69 = { instancePath, schemaPath: "#/oneOf/6/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
3157
+ if (vErrors === null) {
3158
+ vErrors = [err69];
3159
+ }
3160
+ else {
3161
+ vErrors.push(err69);
3162
+ }
3163
+ errors++;
3164
+ }
3165
+ if (data.concept === undefined) {
3166
+ const err70 = { instancePath, schemaPath: "#/oneOf/6/required", keyword: "required", params: { missingProperty: "concept" }, message: "must have required property '" + "concept" + "'" };
3167
+ if (vErrors === null) {
3168
+ vErrors = [err70];
3169
+ }
3170
+ else {
3171
+ vErrors.push(err70);
3172
+ }
3173
+ errors++;
3174
+ }
3175
+ if (data.to === undefined) {
3176
+ const err71 = { instancePath, schemaPath: "#/oneOf/6/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property '" + "to" + "'" };
3177
+ if (vErrors === null) {
3178
+ vErrors = [err71];
3179
+ }
3180
+ else {
3181
+ vErrors.push(err71);
3182
+ }
3183
+ errors++;
3184
+ }
3185
+ for (const key6 in data) {
3186
+ if (!((((key6 === "op") || (key6 === "document")) || (key6 === "concept")) || (key6 === "to"))) {
3187
+ const err72 = { instancePath, schemaPath: "#/oneOf/6/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
3188
+ if (vErrors === null) {
3189
+ vErrors = [err72];
3190
+ }
3191
+ else {
3192
+ vErrors.push(err72);
3193
+ }
3194
+ errors++;
3195
+ }
3196
+ }
3197
+ if (data.op !== undefined) {
3198
+ if ("rename-concept" !== data.op) {
3199
+ const err73 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/6/properties/op/const", keyword: "const", params: { allowedValue: "rename-concept" }, message: "must be equal to constant" };
3200
+ if (vErrors === null) {
3201
+ vErrors = [err73];
3202
+ }
3203
+ else {
3204
+ vErrors.push(err73);
3205
+ }
3206
+ errors++;
3207
+ }
3208
+ }
3209
+ if (data.document !== undefined) {
3210
+ let data23 = data.document;
3211
+ if (typeof data23 === "string") {
3212
+ if (!pattern4.test(data23)) {
3213
+ const err74 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3214
+ if (vErrors === null) {
3215
+ vErrors = [err74];
3216
+ }
3217
+ else {
3218
+ vErrors.push(err74);
3219
+ }
3220
+ errors++;
3221
+ }
3222
+ }
3223
+ else {
3224
+ const err75 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3225
+ if (vErrors === null) {
3226
+ vErrors = [err75];
3227
+ }
3228
+ else {
3229
+ vErrors.push(err75);
3230
+ }
3231
+ errors++;
3232
+ }
3233
+ }
3234
+ if (data.concept !== undefined) {
3235
+ if (!(validate35(data.concept, { instancePath: instancePath + "/concept", parentData: data, parentDataProperty: "concept", rootData, dynamicAnchors }))) {
3236
+ vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);
3237
+ errors = vErrors.length;
3238
+ }
3239
+ }
3240
+ if (data.to !== undefined) {
3241
+ let data25 = data.to;
3242
+ if (typeof data25 === "string") {
3243
+ if (!pattern4.test(data25)) {
3244
+ const err76 = { instancePath: instancePath + "/to", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3245
+ if (vErrors === null) {
3246
+ vErrors = [err76];
3247
+ }
3248
+ else {
3249
+ vErrors.push(err76);
3250
+ }
3251
+ errors++;
3252
+ }
3253
+ }
3254
+ else {
3255
+ const err77 = { instancePath: instancePath + "/to", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3256
+ if (vErrors === null) {
3257
+ vErrors = [err77];
3258
+ }
3259
+ else {
3260
+ vErrors.push(err77);
3261
+ }
3262
+ errors++;
3263
+ }
3264
+ }
3265
+ }
3266
+ else {
3267
+ const err78 = { instancePath, schemaPath: "#/oneOf/6/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3268
+ if (vErrors === null) {
3269
+ vErrors = [err78];
3270
+ }
3271
+ else {
3272
+ vErrors.push(err78);
3273
+ }
3274
+ errors++;
3275
+ }
3276
+ if (props0 !== true) {
3277
+ props0 = true;
3278
+ }
3279
+ }
3280
+ else if (tag0 === "rename-relationship") {
3281
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3282
+ if (data.op === undefined) {
3283
+ const err79 = { instancePath, schemaPath: "#/oneOf/7/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
3284
+ if (vErrors === null) {
3285
+ vErrors = [err79];
3286
+ }
3287
+ else {
3288
+ vErrors.push(err79);
3289
+ }
3290
+ errors++;
3291
+ }
3292
+ if (data.document === undefined) {
3293
+ const err80 = { instancePath, schemaPath: "#/oneOf/7/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
3294
+ if (vErrors === null) {
3295
+ vErrors = [err80];
3296
+ }
3297
+ else {
3298
+ vErrors.push(err80);
3299
+ }
3300
+ errors++;
3301
+ }
3302
+ if (data.relationship === undefined) {
3303
+ const err81 = { instancePath, schemaPath: "#/oneOf/7/required", keyword: "required", params: { missingProperty: "relationship" }, message: "must have required property '" + "relationship" + "'" };
3304
+ if (vErrors === null) {
3305
+ vErrors = [err81];
3306
+ }
3307
+ else {
3308
+ vErrors.push(err81);
3309
+ }
3310
+ errors++;
3311
+ }
3312
+ if (data.to === undefined) {
3313
+ const err82 = { instancePath, schemaPath: "#/oneOf/7/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property '" + "to" + "'" };
3314
+ if (vErrors === null) {
3315
+ vErrors = [err82];
3316
+ }
3317
+ else {
3318
+ vErrors.push(err82);
3319
+ }
3320
+ errors++;
3321
+ }
3322
+ for (const key7 in data) {
3323
+ if (!((((key7 === "op") || (key7 === "document")) || (key7 === "relationship")) || (key7 === "to"))) {
3324
+ const err83 = { instancePath, schemaPath: "#/oneOf/7/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
3325
+ if (vErrors === null) {
3326
+ vErrors = [err83];
3327
+ }
3328
+ else {
3329
+ vErrors.push(err83);
3330
+ }
3331
+ errors++;
3332
+ }
3333
+ }
3334
+ if (data.op !== undefined) {
3335
+ if ("rename-relationship" !== data.op) {
3336
+ const err84 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/7/properties/op/const", keyword: "const", params: { allowedValue: "rename-relationship" }, message: "must be equal to constant" };
3337
+ if (vErrors === null) {
3338
+ vErrors = [err84];
3339
+ }
3340
+ else {
3341
+ vErrors.push(err84);
3342
+ }
3343
+ errors++;
3344
+ }
3345
+ }
3346
+ if (data.document !== undefined) {
3347
+ let data27 = data.document;
3348
+ if (typeof data27 === "string") {
3349
+ if (!pattern4.test(data27)) {
3350
+ const err85 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3351
+ if (vErrors === null) {
3352
+ vErrors = [err85];
3353
+ }
3354
+ else {
3355
+ vErrors.push(err85);
3356
+ }
3357
+ errors++;
3358
+ }
3359
+ }
3360
+ else {
3361
+ const err86 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3362
+ if (vErrors === null) {
3363
+ vErrors = [err86];
3364
+ }
3365
+ else {
3366
+ vErrors.push(err86);
3367
+ }
3368
+ errors++;
3369
+ }
3370
+ }
3371
+ if (data.relationship !== undefined) {
3372
+ if (!(validate35(data.relationship, { instancePath: instancePath + "/relationship", parentData: data, parentDataProperty: "relationship", rootData, dynamicAnchors }))) {
3373
+ vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);
3374
+ errors = vErrors.length;
3375
+ }
3376
+ }
3377
+ if (data.to !== undefined) {
3378
+ let data29 = data.to;
3379
+ if (typeof data29 === "string") {
3380
+ if (!pattern4.test(data29)) {
3381
+ const err87 = { instancePath: instancePath + "/to", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3382
+ if (vErrors === null) {
3383
+ vErrors = [err87];
3384
+ }
3385
+ else {
3386
+ vErrors.push(err87);
3387
+ }
3388
+ errors++;
3389
+ }
3390
+ }
3391
+ else {
3392
+ const err88 = { instancePath: instancePath + "/to", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3393
+ if (vErrors === null) {
3394
+ vErrors = [err88];
3395
+ }
3396
+ else {
3397
+ vErrors.push(err88);
3398
+ }
3399
+ errors++;
3400
+ }
3401
+ }
3402
+ }
3403
+ else {
3404
+ const err89 = { instancePath, schemaPath: "#/oneOf/7/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3405
+ if (vErrors === null) {
3406
+ vErrors = [err89];
3407
+ }
3408
+ else {
3409
+ vErrors.push(err89);
3410
+ }
3411
+ errors++;
3412
+ }
3413
+ if (props0 !== true) {
3414
+ props0 = true;
3415
+ }
3416
+ }
3417
+ else if (tag0 === "add-observation") {
3418
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3419
+ if (data.op === undefined) {
3420
+ const err90 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
3421
+ if (vErrors === null) {
3422
+ vErrors = [err90];
3423
+ }
3424
+ else {
3425
+ vErrors.push(err90);
3426
+ }
3427
+ errors++;
3428
+ }
3429
+ if (data.document === undefined) {
3430
+ const err91 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
3431
+ if (vErrors === null) {
3432
+ vErrors = [err91];
3433
+ }
3434
+ else {
3435
+ vErrors.push(err91);
3436
+ }
3437
+ errors++;
3438
+ }
3439
+ if (data.observation === undefined) {
3440
+ const err92 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "observation" }, message: "must have required property '" + "observation" + "'" };
3441
+ if (vErrors === null) {
3442
+ vErrors = [err92];
3443
+ }
3444
+ else {
3445
+ vErrors.push(err92);
3446
+ }
3447
+ errors++;
3448
+ }
3449
+ for (const key8 in data) {
3450
+ if (!(((key8 === "op") || (key8 === "document")) || (key8 === "observation"))) {
3451
+ const err93 = { instancePath, schemaPath: "#/oneOf/8/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
3452
+ if (vErrors === null) {
3453
+ vErrors = [err93];
3454
+ }
3455
+ else {
3456
+ vErrors.push(err93);
3457
+ }
3458
+ errors++;
3459
+ }
3460
+ }
3461
+ if (data.op !== undefined) {
3462
+ if ("add-observation" !== data.op) {
3463
+ const err94 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/8/properties/op/const", keyword: "const", params: { allowedValue: "add-observation" }, message: "must be equal to constant" };
3464
+ if (vErrors === null) {
3465
+ vErrors = [err94];
3466
+ }
3467
+ else {
3468
+ vErrors.push(err94);
3469
+ }
3470
+ errors++;
3471
+ }
3472
+ }
3473
+ if (data.document !== undefined) {
3474
+ let data31 = data.document;
3475
+ if (typeof data31 === "string") {
3476
+ if (!pattern4.test(data31)) {
3477
+ const err95 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3478
+ if (vErrors === null) {
3479
+ vErrors = [err95];
3480
+ }
3481
+ else {
3482
+ vErrors.push(err95);
3483
+ }
3484
+ errors++;
3485
+ }
3486
+ }
3487
+ else {
3488
+ const err96 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3489
+ if (vErrors === null) {
3490
+ vErrors = [err96];
3491
+ }
3492
+ else {
3493
+ vErrors.push(err96);
3494
+ }
3495
+ errors++;
3496
+ }
3497
+ }
3498
+ if (data.observation !== undefined) {
3499
+ let data32 = data.observation;
3500
+ if (!(validate40(data32, { instancePath: instancePath + "/observation", parentData: data, parentDataProperty: "observation", rootData, dynamicAnchors }))) {
3501
+ vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);
3502
+ errors = vErrors.length;
3503
+ }
3504
+ if (data32 && typeof data32 == "object" && !Array.isArray(data32)) {
3505
+ if (data32.result === undefined) {
3506
+ const err97 = { instancePath: instancePath + "/observation", schemaPath: "#/oneOf/8/properties/observation/allOf/1/required", keyword: "required", params: { missingProperty: "result" }, message: "must have required property '" + "result" + "'" };
3507
+ if (vErrors === null) {
3508
+ vErrors = [err97];
3509
+ }
3510
+ else {
3511
+ vErrors.push(err97);
3512
+ }
3513
+ errors++;
3514
+ }
3515
+ if (data32.evidence === undefined) {
3516
+ const err98 = { instancePath: instancePath + "/observation", schemaPath: "#/oneOf/8/properties/observation/allOf/1/required", keyword: "required", params: { missingProperty: "evidence" }, message: "must have required property '" + "evidence" + "'" };
3517
+ if (vErrors === null) {
3518
+ vErrors = [err98];
3519
+ }
3520
+ else {
3521
+ vErrors.push(err98);
3522
+ }
3523
+ errors++;
3524
+ }
3525
+ }
3526
+ else {
3527
+ const err99 = { instancePath: instancePath + "/observation", schemaPath: "#/oneOf/8/properties/observation/allOf/1/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3528
+ if (vErrors === null) {
3529
+ vErrors = [err99];
3530
+ }
3531
+ else {
3532
+ vErrors.push(err99);
3533
+ }
3534
+ errors++;
3535
+ }
3536
+ }
3537
+ }
3538
+ else {
3539
+ const err100 = { instancePath, schemaPath: "#/oneOf/8/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3540
+ if (vErrors === null) {
3541
+ vErrors = [err100];
3542
+ }
3543
+ else {
3544
+ vErrors.push(err100);
3545
+ }
3546
+ errors++;
3547
+ }
3548
+ if (props0 !== true) {
3549
+ props0 = true;
3550
+ }
3551
+ }
3552
+ else if (tag0 === "update-observation") {
3553
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3554
+ if (data.op === undefined) {
3555
+ const err101 = { instancePath, schemaPath: "#/oneOf/9/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
3556
+ if (vErrors === null) {
3557
+ vErrors = [err101];
3558
+ }
3559
+ else {
3560
+ vErrors.push(err101);
3561
+ }
3562
+ errors++;
3563
+ }
3564
+ if (data.document === undefined) {
3565
+ const err102 = { instancePath, schemaPath: "#/oneOf/9/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
3566
+ if (vErrors === null) {
3567
+ vErrors = [err102];
3568
+ }
3569
+ else {
3570
+ vErrors.push(err102);
3571
+ }
3572
+ errors++;
3573
+ }
3574
+ if (data.observation === undefined) {
3575
+ const err103 = { instancePath, schemaPath: "#/oneOf/9/required", keyword: "required", params: { missingProperty: "observation" }, message: "must have required property '" + "observation" + "'" };
3576
+ if (vErrors === null) {
3577
+ vErrors = [err103];
3578
+ }
3579
+ else {
3580
+ vErrors.push(err103);
3581
+ }
3582
+ errors++;
3583
+ }
3584
+ for (const key9 in data) {
3585
+ if (!((((key9 === "op") || (key9 === "document")) || (key9 === "observation")) || (key9 === "remove"))) {
3586
+ const err104 = { instancePath, schemaPath: "#/oneOf/9/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key9 }, message: "must NOT have additional properties" };
3587
+ if (vErrors === null) {
3588
+ vErrors = [err104];
3589
+ }
3590
+ else {
3591
+ vErrors.push(err104);
3592
+ }
3593
+ errors++;
3594
+ }
3595
+ }
3596
+ if (data.op !== undefined) {
3597
+ if ("update-observation" !== data.op) {
3598
+ const err105 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/9/properties/op/const", keyword: "const", params: { allowedValue: "update-observation" }, message: "must be equal to constant" };
3599
+ if (vErrors === null) {
3600
+ vErrors = [err105];
3601
+ }
3602
+ else {
3603
+ vErrors.push(err105);
3604
+ }
3605
+ errors++;
3606
+ }
3607
+ }
3608
+ if (data.document !== undefined) {
3609
+ let data34 = data.document;
3610
+ if (typeof data34 === "string") {
3611
+ if (!pattern4.test(data34)) {
3612
+ const err106 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3613
+ if (vErrors === null) {
3614
+ vErrors = [err106];
3615
+ }
3616
+ else {
3617
+ vErrors.push(err106);
3618
+ }
3619
+ errors++;
3620
+ }
3621
+ }
3622
+ else {
3623
+ const err107 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3624
+ if (vErrors === null) {
3625
+ vErrors = [err107];
3626
+ }
3627
+ else {
3628
+ vErrors.push(err107);
3629
+ }
3630
+ errors++;
3631
+ }
3632
+ }
3633
+ if (data.observation !== undefined) {
3634
+ if (!(validate42(data.observation, { instancePath: instancePath + "/observation", parentData: data, parentDataProperty: "observation", rootData, dynamicAnchors }))) {
3635
+ vErrors = vErrors === null ? validate42.errors : vErrors.concat(validate42.errors);
3636
+ errors = vErrors.length;
3637
+ }
3638
+ }
3639
+ if (data.remove !== undefined) {
3640
+ let data36 = data.remove;
3641
+ if (Array.isArray(data36)) {
3642
+ if (data36.length < 1) {
3643
+ const err108 = { instancePath: instancePath + "/remove", schemaPath: "#/oneOf/9/properties/remove/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
3644
+ if (vErrors === null) {
3645
+ vErrors = [err108];
3646
+ }
3647
+ else {
3648
+ vErrors.push(err108);
3649
+ }
3650
+ errors++;
3651
+ }
3652
+ const len2 = data36.length;
3653
+ for (let i2 = 0; i2 < len2; i2++) {
3654
+ if (!(data36[i2] === "message")) {
3655
+ const err109 = { instancePath: instancePath + "/remove/" + i2, schemaPath: "#/oneOf/9/properties/remove/items/enum", keyword: "enum", params: { allowedValues: schema32.oneOf[9].properties.remove.items.enum }, message: "must be equal to one of the allowed values" };
3656
+ if (vErrors === null) {
3657
+ vErrors = [err109];
3658
+ }
3659
+ else {
3660
+ vErrors.push(err109);
3661
+ }
3662
+ errors++;
3663
+ }
3664
+ }
3665
+ }
3666
+ else {
3667
+ const err110 = { instancePath: instancePath + "/remove", schemaPath: "#/oneOf/9/properties/remove/type", keyword: "type", params: { type: "array" }, message: "must be array" };
3668
+ if (vErrors === null) {
3669
+ vErrors = [err110];
3670
+ }
3671
+ else {
3672
+ vErrors.push(err110);
3673
+ }
3674
+ errors++;
3675
+ }
3676
+ }
3677
+ }
3678
+ else {
3679
+ const err111 = { instancePath, schemaPath: "#/oneOf/9/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3680
+ if (vErrors === null) {
3681
+ vErrors = [err111];
3682
+ }
3683
+ else {
3684
+ vErrors.push(err111);
3685
+ }
3686
+ errors++;
3687
+ }
3688
+ if (props0 !== true) {
3689
+ props0 = true;
3690
+ }
3691
+ }
3692
+ else if (tag0 === "delete-observation") {
3693
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3694
+ if (data.op === undefined) {
3695
+ const err112 = { instancePath, schemaPath: "#/oneOf/10/required", keyword: "required", params: { missingProperty: "op" }, message: "must have required property '" + "op" + "'" };
3696
+ if (vErrors === null) {
3697
+ vErrors = [err112];
3698
+ }
3699
+ else {
3700
+ vErrors.push(err112);
3701
+ }
3702
+ errors++;
3703
+ }
3704
+ if (data.document === undefined) {
3705
+ const err113 = { instancePath, schemaPath: "#/oneOf/10/required", keyword: "required", params: { missingProperty: "document" }, message: "must have required property '" + "document" + "'" };
3706
+ if (vErrors === null) {
3707
+ vErrors = [err113];
3708
+ }
3709
+ else {
3710
+ vErrors.push(err113);
3711
+ }
3712
+ errors++;
3713
+ }
3714
+ if (data.observation === undefined) {
3715
+ const err114 = { instancePath, schemaPath: "#/oneOf/10/required", keyword: "required", params: { missingProperty: "observation" }, message: "must have required property '" + "observation" + "'" };
3716
+ if (vErrors === null) {
3717
+ vErrors = [err114];
3718
+ }
3719
+ else {
3720
+ vErrors.push(err114);
3721
+ }
3722
+ errors++;
3723
+ }
3724
+ for (const key10 in data) {
3725
+ if (!(((key10 === "op") || (key10 === "document")) || (key10 === "observation"))) {
3726
+ const err115 = { instancePath, schemaPath: "#/oneOf/10/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key10 }, message: "must NOT have additional properties" };
3727
+ if (vErrors === null) {
3728
+ vErrors = [err115];
3729
+ }
3730
+ else {
3731
+ vErrors.push(err115);
3732
+ }
3733
+ errors++;
3734
+ }
3735
+ }
3736
+ if (data.op !== undefined) {
3737
+ if ("delete-observation" !== data.op) {
3738
+ const err116 = { instancePath: instancePath + "/op", schemaPath: "#/oneOf/10/properties/op/const", keyword: "const", params: { allowedValue: "delete-observation" }, message: "must be equal to constant" };
3739
+ if (vErrors === null) {
3740
+ vErrors = [err116];
3741
+ }
3742
+ else {
3743
+ vErrors.push(err116);
3744
+ }
3745
+ errors++;
3746
+ }
3747
+ }
3748
+ if (data.document !== undefined) {
3749
+ let data39 = data.document;
3750
+ if (typeof data39 === "string") {
3751
+ if (!pattern4.test(data39)) {
3752
+ const err117 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/pattern", keyword: "pattern", params: { pattern: "\\S" }, message: "must match pattern \"" + "\\S" + "\"" };
3753
+ if (vErrors === null) {
3754
+ vErrors = [err117];
3755
+ }
3756
+ else {
3757
+ vErrors.push(err117);
3758
+ }
3759
+ errors++;
3760
+ }
3761
+ }
3762
+ else {
3763
+ const err118 = { instancePath: instancePath + "/document", schemaPath: "#/$defs/nonEmptyText/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3764
+ if (vErrors === null) {
3765
+ vErrors = [err118];
3766
+ }
3767
+ else {
3768
+ vErrors.push(err118);
3769
+ }
3770
+ errors++;
3771
+ }
3772
+ }
3773
+ if (data.observation !== undefined) {
3774
+ if (!(validate44(data.observation, { instancePath: instancePath + "/observation", parentData: data, parentDataProperty: "observation", rootData, dynamicAnchors }))) {
3775
+ vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);
3776
+ errors = vErrors.length;
3777
+ }
3778
+ }
3779
+ }
3780
+ else {
3781
+ const err119 = { instancePath, schemaPath: "#/oneOf/10/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3782
+ if (vErrors === null) {
3783
+ vErrors = [err119];
3784
+ }
3785
+ else {
3786
+ vErrors.push(err119);
3787
+ }
3788
+ errors++;
3789
+ }
3790
+ if (props0 !== true) {
3791
+ props0 = true;
3792
+ }
3793
+ }
3794
+ else {
3795
+ const err120 = { instancePath, schemaPath: "#/discriminator", keyword: "discriminator", params: { error: "mapping", tag: "op", tagValue: tag0 }, message: "value of tag \"op\" must be in oneOf" };
3796
+ if (vErrors === null) {
3797
+ vErrors = [err120];
3798
+ }
3799
+ else {
3800
+ vErrors.push(err120);
3801
+ }
3802
+ errors++;
3803
+ }
3804
+ }
3805
+ else {
3806
+ const err121 = { instancePath, schemaPath: "#/discriminator", keyword: "discriminator", params: { error: "tag", tag: "op", tagValue: tag0 }, message: "tag \"op\" must be string" };
3807
+ if (vErrors === null) {
3808
+ vErrors = [err121];
3809
+ }
3810
+ else {
3811
+ vErrors.push(err121);
3812
+ }
3813
+ errors++;
3814
+ }
3815
+ }
3816
+ else {
3817
+ const err122 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3818
+ if (vErrors === null) {
3819
+ vErrors = [err122];
3820
+ }
3821
+ else {
3822
+ vErrors.push(err122);
3823
+ }
3824
+ errors++;
3825
+ } validate21.errors = vErrors; evaluated0.props = props0; return errors === 0; }
3826
+ validate21.evaluated = { "dynamicProps": true, "dynamicItems": false };
3827
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://yarrasys.dev/schema/yarramate-operations.schema.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate20.evaluated; if (evaluated0.dynamicProps) {
3828
+ evaluated0.props = undefined;
3829
+ } if (evaluated0.dynamicItems) {
3830
+ evaluated0.items = undefined;
3831
+ } if (data && typeof data == "object" && !Array.isArray(data)) {
3832
+ if (data.format === undefined) {
3833
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "format" }, message: "must have required property '" + "format" + "'" };
3834
+ if (vErrors === null) {
3835
+ vErrors = [err0];
3836
+ }
3837
+ else {
3838
+ vErrors.push(err0);
3839
+ }
3840
+ errors++;
3841
+ }
3842
+ if (data.operations === undefined) {
3843
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "operations" }, message: "must have required property '" + "operations" + "'" };
3844
+ if (vErrors === null) {
3845
+ vErrors = [err1];
3846
+ }
3847
+ else {
3848
+ vErrors.push(err1);
3849
+ }
3850
+ errors++;
3851
+ }
3852
+ for (const key0 in data) {
3853
+ if (!((key0 === "format") || (key0 === "operations"))) {
3854
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
3855
+ if (vErrors === null) {
3856
+ vErrors = [err2];
3857
+ }
3858
+ else {
3859
+ vErrors.push(err2);
3860
+ }
3861
+ errors++;
3862
+ }
3863
+ }
3864
+ if (data.format !== undefined) {
3865
+ if ("yarramate/operations/v1" !== data.format) {
3866
+ const err3 = { instancePath: instancePath + "/format", schemaPath: "#/properties/format/const", keyword: "const", params: { allowedValue: "yarramate/operations/v1" }, message: "must be equal to constant" };
3867
+ if (vErrors === null) {
3868
+ vErrors = [err3];
3869
+ }
3870
+ else {
3871
+ vErrors.push(err3);
3872
+ }
3873
+ errors++;
3874
+ }
3875
+ }
3876
+ if (data.operations !== undefined) {
3877
+ let data1 = data.operations;
3878
+ if (Array.isArray(data1)) {
3879
+ if (data1.length < 1) {
3880
+ const err4 = { instancePath: instancePath + "/operations", schemaPath: "#/properties/operations/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
3881
+ if (vErrors === null) {
3882
+ vErrors = [err4];
3883
+ }
3884
+ else {
3885
+ vErrors.push(err4);
3886
+ }
3887
+ errors++;
3888
+ }
3889
+ const len0 = data1.length;
3890
+ for (let i0 = 0; i0 < len0; i0++) {
3891
+ if (!(validate21(data1[i0], { instancePath: instancePath + "/operations/" + i0, parentData: data1, parentDataProperty: i0, rootData, dynamicAnchors }))) {
3892
+ vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
3893
+ errors = vErrors.length;
3894
+ }
3895
+ }
3896
+ }
3897
+ else {
3898
+ const err5 = { instancePath: instancePath + "/operations", schemaPath: "#/properties/operations/type", keyword: "type", params: { type: "array" }, message: "must be array" };
3899
+ if (vErrors === null) {
3900
+ vErrors = [err5];
3901
+ }
3902
+ else {
3903
+ vErrors.push(err5);
3904
+ }
3905
+ errors++;
3906
+ }
3907
+ }
3908
+ }
3909
+ else {
3910
+ const err6 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3911
+ if (vErrors === null) {
3912
+ vErrors = [err6];
3913
+ }
3914
+ else {
3915
+ vErrors.push(err6);
3916
+ }
3917
+ errors++;
3918
+ } validate20.errors = vErrors; return errors === 0; }
3919
+ validate20.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };