text: "use strict";module.exports = validate20;module.exports.default = validate20;const schema22 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"pattern":{"type":"string"},"theme":{"type":"object","properties":{"textColor":{"type":"string","pattern":"^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$"},"backgroundColor":{"type":"string","pattern":"^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$"}},"required":["textColor","backgroundColor"],"additionalProperties":false},"version":{"const":1}},"required":["id","name","code","theme","version"],"additionalProperties":false};const pattern0 = new RegExp("^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$", "u");const func0 = require("ajv/dist/compile/equal");function validate20(data, {dataPath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.id === undefined && (missing0 = "id")) || (data.name === undefined && (missing0 = "name"))) || (data.code === undefined && (missing0 = "code"))) || (data.theme === undefined && (missing0 = "theme"))) || (data.version === undefined && (missing0 = "version"))){validate20.errors = [{keyword:"required",dataPath,schemaPath:"#/required",params:{missingProperty: missing0},message:"should have required property '"+missing0+"'"}];return false;}else {const _errs0 = errors;for(const key0 in data){if(!((((((key0 === "id") || (key0 === "name")) || (key0 === "code")) || (key0 === "pattern")) || (key0 === "theme")) || (key0 === "version"))){validate20.errors = [{keyword:"additionalProperties",dataPath,schemaPath:"#/additionalProperties",params:{additionalProperty: key0},message:"should NOT have additional properties"}];return false;break;}}if(_errs0 === errors){if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate20.errors = [{keyword:"type",dataPath:dataPath+"/id",schemaPath:"#/properties/id/type",params:{type: "string"},message:"should be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){const _errs2 = errors;if(typeof data.name !== "string"){validate20.errors = [{keyword:"type",dataPath:dataPath+"/name",schemaPath:"#/properties/name/type",params:{type: "string"},message:"should be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.code !== undefined){const _errs3 = errors;if(typeof data.code !== "string"){validate20.errors = [{keyword:"type",dataPath:dataPath+"/code",schemaPath:"#/properties/code/type",params:{type: "string"},message:"should be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.pattern !== undefined){const _errs4 = errors;if(typeof data.pattern !== "string"){validate20.errors = [{keyword:"type",dataPath:dataPath+"/pattern",schemaPath:"#/properties/pattern/type",params:{type: "string"},message:"should be string"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.theme !== undefined){let data4 = data.theme;const _errs5 = errors;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if((data4.textColor === undefined && (missing1 = "textColor")) || (data4.backgroundColor === undefined && (missing1 = "backgroundColor"))){validate20.errors = [{keyword:"required",dataPath:dataPath+"/theme",schemaPath:"#/properties/theme/required",params:{missingProperty: missing1},message:"should have required property '"+missing1+"'"}];return false;}else {const _errs6 = errors;for(const key1 in data4){if(!((key1 === "textColor") || (key1 === "backgroundColor"))){validate20.errors = [{keyword:"additionalProperties",dataPath:dataPath+"/theme",schemaPath:"#/properties/theme/additionalProperties",params:{additionalProperty: key1},message:"should NOT have additional properties"}];return false;break;}}if(_errs6 === errors){if(data4.textColor !== undefined){let data5 = data4.textColor;const _errs7 = errors;if(typeof data5 === "string"){if(!pattern0.test(data5)){validate20.errors = [{keyword:"pattern",dataPath:dataPath+"/theme/textColor",schemaPath:"#/properties/theme/properties/textColor/pattern",params:{pattern: "^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$"},message:"should match pattern \""+"^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$"+"\""}];return false;}}else {validate20.errors = [{keyword:"type",dataPath:dataPath+"/theme/textColor",schemaPath:"#/properties/theme/properties/textColor/type",params:{type: "string"},message:"should be string"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data4.backgroundColor !== undefined){let data6 = data4.backgroundColor;const _errs8 = errors;if(typeof data6 === "string"){if(!pattern0.test(data6)){validate20.errors = [{keyword:"pattern",dataPath:dataPath+"/theme/backgroundColor",schemaPath:"#/properties/theme/properties/backgroundColor/pattern",params:{pattern: "^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$"},message:"should match pattern \""+"^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$"+"\""}];return false;}}else {validate20.errors = [{keyword:"type",dataPath:dataPath+"/theme/backgroundColor",schemaPath:"#/properties/theme/properties/backgroundColor/type",params:{type: "string"},message:"should be string"}];return false;}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}else {validate20.errors = [{keyword:"type",dataPath:dataPath+"/theme",schemaPath:"#/properties/theme/type",params:{type: "object"},message:"should be object"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.version !== undefined){const _errs9 = errors;if(!func0(data.version, 1)){validate20.errors = [{keyword:"const",dataPath:dataPath+"/version",schemaPath:"#/properties/version/const",params:{allowedValue: 1},message:"should be equal to constant"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}}}}}}}}}else {validate20.errors = [{keyword:"type",dataPath,schemaPath:"#/type",params:{type: "object"},message:"should be object"}];return false;}validate20.errors = vErrors;return errors === 0;}