UNPKG

@sphereon/pex

Version:

A Typescript implementation of the v1 and v2 DIF Presentation Exchange specification

1 lines 118 kB
"use strict";module.exports = validate42;module.exports.default = validate42;const schema12 = {"$schema":"http://json-schema.org/draft-07/schema#","title":"Presentation Definition","definitions":{"issuance":{"type":"object","properties":{"manifest":{"type":"string"}},"additionalProperties":true},"format":{"type":"object","properties":{"vc+sd-jwt":{"type":"object","properties":{"sd-jwt_alg_values":{"type":"array","description":"A JSON array containing identifiers of cryptographic algorithms the verifier supports for protection of a SD-JWT. If present, the alg JOSE header (as defined in [RFC7515]) of the presented SD-JWT MUST match one of the array values.","minItems":1,"items":{"type":"string"}},"kb-jwt_alg_values":{"type":"array","description":"A JSON array containing identifiers of cryptographic algorithms the verifier supports for protection of a KB-JWT. If present, the alg JOSE header (as defined in [RFC7515]) of the presented KB-JWT MUST match one of the array values.","minItems":1,"items":{"type":"string"}}},"required":[],"additionalProperties":false}},"patternProperties":{"^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$":{"type":"object","properties":{"alg":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["alg"],"additionalProperties":false},"^ldp_vc$|^ldp_vp$|^ldp$":{"type":"object","properties":{"proof_type":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["proof_type"],"additionalProperties":false},"^di_vc$|^di_vp$|^di$":{"type":"object","properties":{"proof_type":{"type":"array","minItems":1,"items":{"type":"string"}},"cryptosuite":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["proof_type","cryptosuite"],"additionalProperties":false},"additionalProperties":false},"additionalProperties":false},"submission_requirements":{"type":"object","oneOf":[{"properties":{"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"type":"string","enum":["all","pick"]},"count":{"type":"integer","minimum":1},"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0},"from":{"type":"string"}},"required":["rule","from"],"additionalProperties":false},{"properties":{"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"type":"string","enum":["all","pick"]},"count":{"type":"integer","minimum":1},"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0},"from_nested":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/submission_requirements"}}},"required":["rule","from_nested"],"additionalProperties":false}]},"input_descriptors":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"purpose":{"type":"string"},"issuance":{"type":"array","items":{"$ref":"#/definitions/issuance"}},"group":{"type":"array","items":{"type":"string"}},"format":{"$ref":"#/definitions/format"},"constraints":{"type":"object","properties":{"limit_disclosure":{"type":"string","enum":["required","preferred"]},"statuses":{"type":"object","properties":{"active":{"type":"object","properties":{"directive":{"type":"string","enum":["required","allowed","disallowed"]}}},"suspended":{"type":"object","properties":{"directive":{"type":"string","enum":["required","allowed","disallowed"]}}},"revoked":{"type":"object","properties":{"directive":{"type":"string","enum":["required","allowed","disallowed"]}}}}},"fields":{"type":"array","items":{"$ref":"#/definitions/field"}},"subject_is_issuer":{"type":"string","enum":["required","preferred"]},"is_holder":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"array","items":{"type":"string"}},"directive":{"type":"string","enum":["required","preferred"]}},"required":["field_id","directive"],"additionalProperties":false}},"same_subject":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"array","items":{"type":"string"}},"directive":{"type":"string","enum":["required","preferred"]}},"required":["field_id","directive"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id"],"additionalProperties":false},"field":{"type":"object","oneOf":[{"properties":{"id":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"},"purpose":{"type":"string"},"intent_to_retain":{"type":"boolean"},"filter":{"$ref":"http://json-schema.org/schema#"},"name":{"type":"string"}},"required":["path"],"additionalProperties":false},{"properties":{"id":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"},"purpose":{"type":"string"},"intent_to_retain":{"type":"boolean"},"filter":{"$ref":"http://json-schema.org/schema#"},"predicate":{"type":"string","enum":["required","preferred"]},"name":{"type":"string"}},"required":["path","filter","predicate"],"additionalProperties":false}]}},"type":"object","properties":{"presentation_definition":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"purpose":{"type":"string"},"format":{"$ref":"#/definitions/format"},"frame":{"type":"object","additionalProperties":true},"submission_requirements":{"type":"array","items":{"$ref":"#/definitions/submission_requirements"}},"input_descriptors":{"type":"array","items":{"$ref":"#/definitions/input_descriptors"}}},"required":["id","input_descriptors"],"additionalProperties":false}}};const schema13 = {"type":"object","properties":{"vc+sd-jwt":{"type":"object","properties":{"sd-jwt_alg_values":{"type":"array","description":"A JSON array containing identifiers of cryptographic algorithms the verifier supports for protection of a SD-JWT. If present, the alg JOSE header (as defined in [RFC7515]) of the presented SD-JWT MUST match one of the array values.","minItems":1,"items":{"type":"string"}},"kb-jwt_alg_values":{"type":"array","description":"A JSON array containing identifiers of cryptographic algorithms the verifier supports for protection of a KB-JWT. If present, the alg JOSE header (as defined in [RFC7515]) of the presented KB-JWT MUST match one of the array values.","minItems":1,"items":{"type":"string"}}},"required":[],"additionalProperties":false}},"patternProperties":{"^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$":{"type":"object","properties":{"alg":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["alg"],"additionalProperties":false},"^ldp_vc$|^ldp_vp$|^ldp$":{"type":"object","properties":{"proof_type":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["proof_type"],"additionalProperties":false},"^di_vc$|^di_vp$|^di$":{"type":"object","properties":{"proof_type":{"type":"array","minItems":1,"items":{"type":"string"}},"cryptosuite":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["proof_type","cryptosuite"],"additionalProperties":false},"additionalProperties":false},"additionalProperties":false};const pattern0 = new RegExp("^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$", "u");const pattern1 = new RegExp("^ldp_vc$|^ldp_vp$|^ldp$", "u");const pattern2 = new RegExp("^di_vc$|^di_vp$|^di$", "u");const pattern3 = new RegExp("additionalProperties", "u");function validate43(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(((((key0 === "vc+sd-jwt") || (pattern0.test(key0))) || (pattern1.test(key0))) || (pattern2.test(key0))) || (pattern3.test(key0)))){const err0 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties",schema:false,parentSchema:schema13,data};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data["vc+sd-jwt"] !== undefined){let data0 = data["vc+sd-jwt"];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key1 in data0){if(!((key1 === "sd-jwt_alg_values") || (key1 === "kb-jwt_alg_values"))){const err1 = {instancePath:instancePath+"/vc+sd-jwt",schemaPath:"#/properties/vc%2Bsd-jwt/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties",schema:false,parentSchema:schema13.properties["vc+sd-jwt"],data:data0};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data0["sd-jwt_alg_values"] !== undefined){let data1 = data0["sd-jwt_alg_values"];if(Array.isArray(data1)){if(data1.length < 1){const err2 = {instancePath:instancePath+"/vc+sd-jwt/sd-jwt_alg_values",schemaPath:"#/properties/vc%2Bsd-jwt/properties/sd-jwt_alg_values/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema13.properties["vc+sd-jwt"].properties["sd-jwt_alg_values"],data:data1};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];if(typeof data2 !== "string"){const err3 = {instancePath:instancePath+"/vc+sd-jwt/sd-jwt_alg_values/" + i0,schemaPath:"#/properties/vc%2Bsd-jwt/properties/sd-jwt_alg_values/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema13.properties["vc+sd-jwt"].properties["sd-jwt_alg_values"].items.type,parentSchema:schema13.properties["vc+sd-jwt"].properties["sd-jwt_alg_values"].items,data:data2};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath:instancePath+"/vc+sd-jwt/sd-jwt_alg_values",schemaPath:"#/properties/vc%2Bsd-jwt/properties/sd-jwt_alg_values/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema13.properties["vc+sd-jwt"].properties["sd-jwt_alg_values"].type,parentSchema:schema13.properties["vc+sd-jwt"].properties["sd-jwt_alg_values"],data:data1};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0["kb-jwt_alg_values"] !== undefined){let data3 = data0["kb-jwt_alg_values"];if(Array.isArray(data3)){if(data3.length < 1){const err5 = {instancePath:instancePath+"/vc+sd-jwt/kb-jwt_alg_values",schemaPath:"#/properties/vc%2Bsd-jwt/properties/kb-jwt_alg_values/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema13.properties["vc+sd-jwt"].properties["kb-jwt_alg_values"],data:data3};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 !== "string"){const err6 = {instancePath:instancePath+"/vc+sd-jwt/kb-jwt_alg_values/" + i1,schemaPath:"#/properties/vc%2Bsd-jwt/properties/kb-jwt_alg_values/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema13.properties["vc+sd-jwt"].properties["kb-jwt_alg_values"].items.type,parentSchema:schema13.properties["vc+sd-jwt"].properties["kb-jwt_alg_values"].items,data:data4};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath:instancePath+"/vc+sd-jwt/kb-jwt_alg_values",schemaPath:"#/properties/vc%2Bsd-jwt/properties/kb-jwt_alg_values/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema13.properties["vc+sd-jwt"].properties["kb-jwt_alg_values"].type,parentSchema:schema13.properties["vc+sd-jwt"].properties["kb-jwt_alg_values"],data:data3};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath:instancePath+"/vc+sd-jwt",schemaPath:"#/properties/vc%2Bsd-jwt/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema13.properties["vc+sd-jwt"].type,parentSchema:schema13.properties["vc+sd-jwt"],data:data0};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}for(const key2 in data){if(pattern0.test(key2)){let data5 = data[key2];if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.alg === undefined){const err9 = {instancePath:instancePath+"/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Ejwt%24%7C%5Ejwt_vc%24%7C%5Ejwt_vc_json%24%7C%5Ejwt_vp%24%7C%5Ejwt_vp_json%24%7C%5Emso_mdoc%24/required",keyword:"required",params:{missingProperty: "alg"},message:"must have required property '"+"alg"+"'",schema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].required,parentSchema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"],data:data5};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key3 in data5){if(!(key3 === "alg")){const err10 = {instancePath:instancePath+"/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Ejwt%24%7C%5Ejwt_vc%24%7C%5Ejwt_vc_json%24%7C%5Ejwt_vp%24%7C%5Ejwt_vp_json%24%7C%5Emso_mdoc%24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties",schema:false,parentSchema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"],data:data5};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data5.alg !== undefined){let data6 = data5.alg;if(Array.isArray(data6)){if(data6.length < 1){const err11 = {instancePath:instancePath+"/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/alg",schemaPath:"#/patternProperties/%5Ejwt%24%7C%5Ejwt_vc%24%7C%5Ejwt_vc_json%24%7C%5Ejwt_vp%24%7C%5Ejwt_vp_json%24%7C%5Emso_mdoc%24/properties/alg/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].properties.alg,data:data6};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}const len2 = data6.length;for(let i2=0; i2<len2; i2++){let data7 = data6[i2];if(typeof data7 !== "string"){const err12 = {instancePath:instancePath+"/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/alg/" + i2,schemaPath:"#/patternProperties/%5Ejwt%24%7C%5Ejwt_vc%24%7C%5Ejwt_vc_json%24%7C%5Ejwt_vp%24%7C%5Ejwt_vp_json%24%7C%5Emso_mdoc%24/properties/alg/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].properties.alg.items.type,parentSchema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].properties.alg.items,data:data7};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/alg",schemaPath:"#/patternProperties/%5Ejwt%24%7C%5Ejwt_vc%24%7C%5Ejwt_vc_json%24%7C%5Ejwt_vp%24%7C%5Ejwt_vp_json%24%7C%5Emso_mdoc%24/properties/alg/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].properties.alg.type,parentSchema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].properties.alg,data:data6};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath:instancePath+"/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Ejwt%24%7C%5Ejwt_vc%24%7C%5Ejwt_vc_json%24%7C%5Ejwt_vp%24%7C%5Ejwt_vp_json%24%7C%5Emso_mdoc%24/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"].type,parentSchema:schema13.patternProperties["^jwt$|^jwt_vc$|^jwt_vc_json$|^jwt_vp$|^jwt_vp_json$|^mso_mdoc$"],data:data5};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}for(const key4 in data){if(pattern1.test(key4)){let data8 = data[key4];if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(data8.proof_type === undefined){const err15 = {instancePath:instancePath+"/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Eldp_vc%24%7C%5Eldp_vp%24%7C%5Eldp%24/required",keyword:"required",params:{missingProperty: "proof_type"},message:"must have required property '"+"proof_type"+"'",schema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].required,parentSchema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"],data:data8};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}for(const key5 in data8){if(!(key5 === "proof_type")){const err16 = {instancePath:instancePath+"/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Eldp_vc%24%7C%5Eldp_vp%24%7C%5Eldp%24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties",schema:false,parentSchema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"],data:data8};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data8.proof_type !== undefined){let data9 = data8.proof_type;if(Array.isArray(data9)){if(data9.length < 1){const err17 = {instancePath:instancePath+"/" + key4.replace(/~/g, "~0").replace(/\//g, "~1")+"/proof_type",schemaPath:"#/patternProperties/%5Eldp_vc%24%7C%5Eldp_vp%24%7C%5Eldp%24/properties/proof_type/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].properties.proof_type,data:data9};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}const len3 = data9.length;for(let i3=0; i3<len3; i3++){let data10 = data9[i3];if(typeof data10 !== "string"){const err18 = {instancePath:instancePath+"/" + key4.replace(/~/g, "~0").replace(/\//g, "~1")+"/proof_type/" + i3,schemaPath:"#/patternProperties/%5Eldp_vc%24%7C%5Eldp_vp%24%7C%5Eldp%24/properties/proof_type/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].properties.proof_type.items.type,parentSchema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].properties.proof_type.items,data:data10};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath:instancePath+"/" + key4.replace(/~/g, "~0").replace(/\//g, "~1")+"/proof_type",schemaPath:"#/patternProperties/%5Eldp_vc%24%7C%5Eldp_vp%24%7C%5Eldp%24/properties/proof_type/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].properties.proof_type.type,parentSchema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].properties.proof_type,data:data9};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath:instancePath+"/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Eldp_vc%24%7C%5Eldp_vp%24%7C%5Eldp%24/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"].type,parentSchema:schema13.patternProperties["^ldp_vc$|^ldp_vp$|^ldp$"],data:data8};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}for(const key6 in data){if(pattern2.test(key6)){let data11 = data[key6];if(data11 && typeof data11 == "object" && !Array.isArray(data11)){if(data11.proof_type === undefined){const err21 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/required",keyword:"required",params:{missingProperty: "proof_type"},message:"must have required property '"+"proof_type"+"'",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].required,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"],data:data11};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data11.cryptosuite === undefined){const err22 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/required",keyword:"required",params:{missingProperty: "cryptosuite"},message:"must have required property '"+"cryptosuite"+"'",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].required,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"],data:data11};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key7 in data11){if(!((key7 === "proof_type") || (key7 === "cryptosuite"))){const err23 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties",schema:false,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"],data:data11};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data11.proof_type !== undefined){let data12 = data11.proof_type;if(Array.isArray(data12)){if(data12.length < 1){const err24 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1")+"/proof_type",schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/properties/proof_type/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.proof_type,data:data12};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}const len4 = data12.length;for(let i4=0; i4<len4; i4++){let data13 = data12[i4];if(typeof data13 !== "string"){const err25 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1")+"/proof_type/" + i4,schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/properties/proof_type/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.proof_type.items.type,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.proof_type.items,data:data13};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1")+"/proof_type",schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/properties/proof_type/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.proof_type.type,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.proof_type,data:data12};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data11.cryptosuite !== undefined){let data14 = data11.cryptosuite;if(Array.isArray(data14)){if(data14.length < 1){const err27 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1")+"/cryptosuite",schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/properties/cryptosuite/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.cryptosuite,data:data14};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}const len5 = data14.length;for(let i5=0; i5<len5; i5++){let data15 = data14[i5];if(typeof data15 !== "string"){const err28 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1")+"/cryptosuite/" + i5,schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/properties/cryptosuite/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.cryptosuite.items.type,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.cryptosuite.items,data:data15};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1")+"/cryptosuite",schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/properties/cryptosuite/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.cryptosuite.type,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].properties.cryptosuite,data:data14};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}else {const err30 = {instancePath:instancePath+"/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/%5Edi_vc%24%7C%5Edi_vp%24%7C%5Edi%24/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"].type,parentSchema:schema13.patternProperties["^di_vc$|^di_vp$|^di$"],data:data11};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}}for(const key8 in data){if(pattern3.test(key8)){const err31 = {instancePath:instancePath+"/" + key8.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/patternProperties/additionalProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false",schema:false,parentSchema:schema13.patternProperties.additionalProperties,data:data[key8]};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}}else {const err32 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema13.type,parentSchema:schema13,data};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}validate43.errors = vErrors;return errors === 0;}const schema14 = {"type":"object","oneOf":[{"properties":{"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"type":"string","enum":["all","pick"]},"count":{"type":"integer","minimum":1},"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0},"from":{"type":"string"}},"required":["rule","from"],"additionalProperties":false},{"properties":{"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"type":"string","enum":["all","pick"]},"count":{"type":"integer","minimum":1},"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0},"from_nested":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/submission_requirements"}}},"required":["rule","from_nested"],"additionalProperties":false}]};const wrapper0 = {validate: validate45};function validate45(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(!(data && typeof data == "object" && !Array.isArray(data))){const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema14.type,parentSchema:schema14,data};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const _errs1 = errors;let valid0 = false;let passing0 = null;const _errs2 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.rule === undefined){const err1 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "rule"},message:"must have required property '"+"rule"+"'",schema:schema14.oneOf[0].required,parentSchema:schema14.oneOf[0],data};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.from === undefined){const err2 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'",schema:schema14.oneOf[0].required,parentSchema:schema14.oneOf[0],data};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((((((key0 === "name") || (key0 === "purpose")) || (key0 === "rule")) || (key0 === "count")) || (key0 === "min")) || (key0 === "max")) || (key0 === "from"))){const err3 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties",schema:false,parentSchema:schema14.oneOf[0],data};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.name !== undefined){let data0 = data.name;if(typeof data0 !== "string"){const err4 = {instancePath:instancePath+"/name",schemaPath:"#/oneOf/0/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[0].properties.name.type,parentSchema:schema14.oneOf[0].properties.name,data:data0};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.purpose !== undefined){let data1 = data.purpose;if(typeof data1 !== "string"){const err5 = {instancePath:instancePath+"/purpose",schemaPath:"#/oneOf/0/properties/purpose/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[0].properties.purpose.type,parentSchema:schema14.oneOf[0].properties.purpose,data:data1};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.rule !== undefined){let data2 = data.rule;if(typeof data2 !== "string"){const err6 = {instancePath:instancePath+"/rule",schemaPath:"#/oneOf/0/properties/rule/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[0].properties.rule.type,parentSchema:schema14.oneOf[0].properties.rule,data:data2};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(!((data2 === "all") || (data2 === "pick"))){const err7 = {instancePath:instancePath+"/rule",schemaPath:"#/oneOf/0/properties/rule/enum",keyword:"enum",params:{allowedValues: schema14.oneOf[0].properties.rule.enum},message:"must be equal to one of the allowed values",schema:schema14.oneOf[0].properties.rule.enum,parentSchema:schema14.oneOf[0].properties.rule,data:data2};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.count !== undefined){let data3 = data.count;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err8 = {instancePath:instancePath+"/count",schemaPath:"#/oneOf/0/properties/count/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema14.oneOf[0].properties.count.type,parentSchema:schema14.oneOf[0].properties.count,data:data3};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(typeof data3 == "number"){if(data3 < 1 || isNaN(data3)){const err9 = {instancePath:instancePath+"/count",schemaPath:"#/oneOf/0/properties/count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1",schema:1,parentSchema:schema14.oneOf[0].properties.count,data:data3};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}if(data.min !== undefined){let data4 = data.min;if(!((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4)))){const err10 = {instancePath:instancePath+"/min",schemaPath:"#/oneOf/0/properties/min/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema14.oneOf[0].properties.min.type,parentSchema:schema14.oneOf[0].properties.min,data:data4};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(typeof data4 == "number"){if(data4 < 0 || isNaN(data4)){const err11 = {instancePath:instancePath+"/min",schemaPath:"#/oneOf/0/properties/min/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0",schema:0,parentSchema:schema14.oneOf[0].properties.min,data:data4};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}if(data.max !== undefined){let data5 = data.max;if(!((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5)))){const err12 = {instancePath:instancePath+"/max",schemaPath:"#/oneOf/0/properties/max/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema14.oneOf[0].properties.max.type,parentSchema:schema14.oneOf[0].properties.max,data:data5};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(typeof data5 == "number"){if(data5 < 0 || isNaN(data5)){const err13 = {instancePath:instancePath+"/max",schemaPath:"#/oneOf/0/properties/max/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0",schema:0,parentSchema:schema14.oneOf[0].properties.max,data:data5};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}if(data.from !== undefined){let data6 = data.from;if(typeof data6 !== "string"){const err14 = {instancePath:instancePath+"/from",schemaPath:"#/oneOf/0/properties/from/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[0].properties.from.type,parentSchema:schema14.oneOf[0].properties.from,data:data6};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}var _valid0 = _errs2 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs18 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.rule === undefined){const err15 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "rule"},message:"must have required property '"+"rule"+"'",schema:schema14.oneOf[1].required,parentSchema:schema14.oneOf[1],data};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data.from_nested === undefined){const err16 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "from_nested"},message:"must have required property '"+"from_nested"+"'",schema:schema14.oneOf[1].required,parentSchema:schema14.oneOf[1],data};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}for(const key1 in data){if(!(((((((key1 === "name") || (key1 === "purpose")) || (key1 === "rule")) || (key1 === "count")) || (key1 === "min")) || (key1 === "max")) || (key1 === "from_nested"))){const err17 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties",schema:false,parentSchema:schema14.oneOf[1],data};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.name !== undefined){let data7 = data.name;if(typeof data7 !== "string"){const err18 = {instancePath:instancePath+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[1].properties.name.type,parentSchema:schema14.oneOf[1].properties.name,data:data7};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.purpose !== undefined){let data8 = data.purpose;if(typeof data8 !== "string"){const err19 = {instancePath:instancePath+"/purpose",schemaPath:"#/oneOf/1/properties/purpose/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[1].properties.purpose.type,parentSchema:schema14.oneOf[1].properties.purpose,data:data8};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.rule !== undefined){let data9 = data.rule;if(typeof data9 !== "string"){const err20 = {instancePath:instancePath+"/rule",schemaPath:"#/oneOf/1/properties/rule/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema14.oneOf[1].properties.rule.type,parentSchema:schema14.oneOf[1].properties.rule,data:data9};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(!((data9 === "all") || (data9 === "pick"))){const err21 = {instancePath:instancePath+"/rule",schemaPath:"#/oneOf/1/properties/rule/enum",keyword:"enum",params:{allowedValues: schema14.oneOf[1].properties.rule.enum},message:"must be equal to one of the allowed values",schema:schema14.oneOf[1].properties.rule.enum,parentSchema:schema14.oneOf[1].properties.rule,data:data9};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.count !== undefined){let data10 = data.count;if(!((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10)))){const err22 = {instancePath:instancePath+"/count",schemaPath:"#/oneOf/1/properties/count/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema14.oneOf[1].properties.count.type,parentSchema:schema14.oneOf[1].properties.count,data:data10};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(typeof data10 == "number"){if(data10 < 1 || isNaN(data10)){const err23 = {instancePath:instancePath+"/count",schemaPath:"#/oneOf/1/properties/count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1",schema:1,parentSchema:schema14.oneOf[1].properties.count,data:data10};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}if(data.min !== undefined){let data11 = data.min;if(!((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11)))){const err24 = {instancePath:instancePath+"/min",schemaPath:"#/oneOf/1/properties/min/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema14.oneOf[1].properties.min.type,parentSchema:schema14.oneOf[1].properties.min,data:data11};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(typeof data11 == "number"){if(data11 < 0 || isNaN(data11)){const err25 = {instancePath:instancePath+"/min",schemaPath:"#/oneOf/1/properties/min/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0",schema:0,parentSchema:schema14.oneOf[1].properties.min,data:data11};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}if(data.max !== undefined){let data12 = data.max;if(!((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12)))){const err26 = {instancePath:instancePath+"/max",schemaPath:"#/oneOf/1/properties/max/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema14.oneOf[1].properties.max.type,parentSchema:schema14.oneOf[1].properties.max,data:data12};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(typeof data12 == "number"){if(data12 < 0 || isNaN(data12)){const err27 = {instancePath:instancePath+"/max",schemaPath:"#/oneOf/1/properties/max/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0",schema:0,parentSchema:schema14.oneOf[1].properties.max,data:data12};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}}if(data.from_nested !== undefined){let data13 = data.from_nested;if(Array.isArray(data13)){if(data13.length < 1){const err28 = {instancePath:instancePath+"/from_nested",schemaPath:"#/oneOf/1/properties/from_nested/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema14.oneOf[1].properties.from_nested,data:data13};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len0 = data13.length;for(let i0=0; i0<len0; i0++){if(!(wrapper0.validate(data13[i0], {instancePath:instancePath+"/from_nested/" + i0,parentData:data13,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);errors = vErrors.length;}}}else {const err29 = {instancePath:instancePath+"/from_nested",schemaPath:"#/oneOf/1/properties/from_nested/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema14.oneOf[1].properties.from_nested.type,parentSchema:schema14.oneOf[1].properties.from_nested,data:data13};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}var _valid0 = _errs18 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;}}if(!valid0){const err30 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf",schema:schema14.oneOf,parentSchema:schema14,data};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate45.errors = vErrors;return errors === 0;}const schema15 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"purpose":{"type":"string"},"issuance":{"type":"array","items":{"$ref":"#/definitions/issuance"}},"group":{"type":"array","items":{"type":"string"}},"format":{"$ref":"#/definitions/format"},"constraints":{"type":"object","properties":{"limit_disclosure":{"type":"string","enum":["required","preferred"]},"statuses":{"type":"object","properties":{"active":{"type":"object","properties":{"directive":{"type":"string","enum":["required","allowed","disallowed"]}}},"suspended":{"type":"object","properties":{"directive":{"type":"string","enum":["required","allowed","disallowed"]}}},"revoked":{"type":"object","properties":{"directive":{"type":"string","enum":["required","allowed","disallowed"]}}}}},"fields":{"type":"array","items":{"$ref":"#/definitions/field"}},"subject_is_issuer":{"type":"string","enum":["required","preferred"]},"is_holder":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"array","items":{"type":"string"}},"directive":{"type":"string","enum":["required","preferred"]}},"required":["field_id","directive"],"additionalProperties":false}},"same_subject":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"array","items":{"type":"string"}},"directive":{"type":"string","enum":["required","preferred"]}},"required":["field_id","directive"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id"],"additionalProperties":false};const schema16 = {"type":"object","properties":{"manifest":{"type":"string"}},"additionalProperties":true};function validate48(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.manifest !== undefined){let data0 = data.manifest;if(typeof data0 !== "string"){const err0 = {instancePath:instancePath+"/manifest",schemaPath:"#/properties/manifest/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema16.properties.manifest.type,parentSchema:schema16.properties.manifest,data:data0};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}}else {const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object",schema:schema16.type,parentSchema:schema16,data};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}validate48.errors = vErrors;return errors === 0;}const schema17 = {"type":"object","oneOf":[{"properties":{"id":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"},"purpose":{"type":"string"},"intent_to_retain":{"type":"boolean"},"filter":{"$ref":"http://json-schema.org/schema#"},"name":{"type":"string"}},"required":["path"],"additionalProperties":false},{"properties":{"id":{"type":"string"},"path":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"},"purpose":{"type":"string"},"intent_to_retain":{"type":"boolean"},"filter":{"$ref":"http://json-schema.org/schema#"},"predicate":{"type":"string","enum":["required","preferred"]},"name":{"type":"string"}},"required":["path","filter","predicate"],"additionalProperties":false}]};const schema6 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true};const schema7 = {"type":"integer","minimum":0};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(!((typeof data == "number") && (!(data % 1) && !isNaN(data)))){const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"},message:"must be integer",schema:schema7.type,parentSchema:schema7,data};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(typeof data == "number"){if(data < 0 || isNaN(data)){const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0",schema:0,parentSchema:schema7,data};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}validate22.errors = vErrors;return errors === 0;}const schema8 = {"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(!(validate22(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}validate24.errors = vErrors;return errors === 0;}const schema9 = {"type":"array","minItems":1,"items":{"$ref":"#"}};const root1 = {validate: validate21};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){if(data.length < 1){const err0 = {instancePath,schemaPath:"#/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items",schema:1,parentSchema:schema9,data};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){if(!(root1.validate(data[i0], {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? root1.validate.errors : vErrors.concat(root1.validate.errors);errors = vErrors.length;}}}else {const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array",schema:schema9.type,parentSchema:schema9,data};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}validate27.errors = vErrors;return errors === 0;}const schema10 = {"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(typeof data0 !== "string"){const err0 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema10.items.type,parentSchema:schema10.items,data:data0};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}let i1 = data.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err1 = {instancePath,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)",schema:true,parentSchema:schema10,data};if(vErrors === null){vErrors = [err1]