forked from geraintluff/tv4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtv4.min.js
2 lines (2 loc) · 19.6 KB
/
tv4.min.js
1
2
!function(a){"use strict";function b(a,c){if(a===c)return!0;if("object"==typeof a&&"object"==typeof c){if(Array.isArray(a)!==Array.isArray(c))return!1;if(Array.isArray(a)){if(a.length!==c.length)return!1;for(var d=0;d<a.length;d++)if(!b(a[d],c[d]))return!1}else{var e;for(e in a)if(void 0===c[e]&&void 0!==a[e])return!1;for(e in c)if(void 0===a[e]&&void 0!==c[e])return!1;for(e in a)if(!b(a[e],c[e]))return!1}return!0}return!1}function c(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function d(a,b){function d(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}return b=c(b||""),a=c(a||""),b&&a?(b.protocol||a.protocol)+(b.protocol||b.authority?b.authority:a.authority)+d(b.protocol||b.authority||"/"===b.pathname.charAt(0)?b.pathname:b.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+b.pathname:a.pathname)+(b.protocol||b.authority||b.pathname?b.search:b.search||a.search)+b.hash:null}function e(a){return a.split("#")[0]}function f(a,b){if(void 0!==a&&null!==a&&(void 0===b?b=a.id:"string"==typeof a.id&&(b=d(b,a.id),a.id=b),"object"==typeof a))if(Array.isArray(a))for(var c=0;c<a.length;c++)f(a[c],b);else if("string"==typeof a.$ref)a.$ref=d(b,a.$ref);else for(var e in a)"enum"!==e&&f(a[e],b)}function g(a,b,c,d,e){if(void 0===a)throw new Error("No code supplied for error: "+b);this.code=a,this.message=b,this.dataPath=c||"",this.schemaPath=d||"",this.subErrors=e||null}function h(a,b){if(b.substring(0,a.length)===a){var c=b.substring(a.length);if(b.length>0&&"/"===b.charAt(a.length-1)||"#"===c.charAt(0)||"?"===c.charAt(0))return!0}return!1}function i(a){var b=new j,c=a||"en",g={addFormat:function(){b.addFormat.apply(b,arguments)},language:function(a){return a?(m[a]||(a=a.split("-")[0]),m[a]?(c=a,a):!1):c},addLanguage:function(a,b){var c;for(c in k)b[c]&&!b[k[c]]&&(b[k[c]]=b[c]);var d=a.split("-")[0];if(m[d]){m[a]=Object.create(m[d]);for(c in b)"undefined"==typeof m[d][c]&&(m[d][c]=b[c]),m[a][c]=b[c]}else m[a]=b,m[d]=b;return this},freshApi:function(a){var b=i();return a&&b.language(a),b},validate:function(a,d,e){var f=new j(b,!1,m[c],e);"string"==typeof d&&(d={$ref:d}),f.addSchema("",d);var g=f.validateAll(a,d);return this.error=g,this.missing=f.missing,this.valid=null===g,this.valid},validateResult:function(){var a={};return this.validate.apply(a,arguments),a},validateMultiple:function(a,d,e){var f=new j(b,!0,m[c],e);"string"==typeof d&&(d={$ref:d}),f.addSchema("",d),f.validateAll(a,d);var g={};return g.errors=f.errors,g.missing=f.missing,g.valid=0===g.errors.length,g},addSchema:function(){return b.addSchema.apply(b,arguments)},getSchema:function(){return b.getSchema.apply(b,arguments)},getSchemaMap:function(){return b.getSchemaMap.apply(b,arguments)},getSchemaUris:function(){return b.getSchemaUris.apply(b,arguments)},getMissingUris:function(){return b.getMissingUris.apply(b,arguments)},dropSchemas:function(){b.dropSchemas.apply(b,arguments)},reset:function(){b.reset(),this.error=null,this.missing=[],this.valid=!0},missing:[],error:null,valid:!0,normSchema:f,resolveUrl:d,getDocumentUri:e,errorCodes:k};return g}Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on non-object");var f=[];for(var g in e)a.call(e,g)&&f.push(g);if(b)for(var h=0;d>h;h++)a.call(e,c[h])&&f.push(c[h]);return f}}()),Object.create||(Object.create=function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create implementation only accepts one parameter.");return a.prototype=b,new a}}()),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!==d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Object.isFrozen||(Object.isFrozen=function(a){for(var b="tv4_test_frozen_key";a.hasOwnProperty(b);)b+=Math.random();try{return a[b]=!0,delete a[b],!1}catch(c){return!0}});var j=function(a,b,c,d){this.missing=[],this.missingMap={},this.formatValidators=a?Object.create(a.formatValidators):{},this.schemas=a?Object.create(a.schemas):{},this.collectMultiple=b,this.errors=[],this.handleError=b?this.collectError:this.returnError,d&&(this.checkRecursive=!0,this.scanned=[],this.scannedFrozen=[],this.scannedFrozenSchemas=[],this.key="tv4_validation_id"),this.errorMessages=c};j.prototype.createError=function(a,b,c,d,e){var f=this.errorMessages[a]||l[a];if("string"!=typeof f)return new g(a,"Unknown error code "+a+": "+JSON.stringify(b),c,d,e);var h=f.replace(/\{([^{}]*)\}/g,function(a,c){var d=b[c];return"string"==typeof d||"number"==typeof d?d:a});return new g(a,h,c,d,e)},j.prototype.returnError=function(a){return a},j.prototype.collectError=function(a){return a&&this.errors.push(a),null},j.prototype.prefixErrors=function(a,b,c){for(var d=a;d<this.errors.length;d++)this.errors[d]=this.errors[d].prefixWith(b,c);return this},j.prototype.addFormat=function(a,b){if("object"==typeof a){for(var c in a)this.addFormat(c,a[c]);return this}this.formatValidators[a]=b},j.prototype.getSchema=function(a){var b;if(void 0!==this.schemas[a])return b=this.schemas[a];var c=a,d="";if(-1!==a.indexOf("#")&&(d=a.substring(a.indexOf("#")+1),c=a.substring(0,a.indexOf("#"))),"object"==typeof this.schemas[c]){b=this.schemas[c];var e=decodeURIComponent(d);if(""===e)return b;if("/"!==e.charAt(0))return void 0;for(var f=e.split("/").slice(1),g=0;g<f.length;g++){var h=f[g].replace("~1","/").replace("~0","~");if(void 0===b[h]){b=void 0;break}b=b[h]}if(void 0!==b)return b}void 0===this.missing[c]&&(this.missing.push(c),this.missing[c]=c,this.missingMap[c]=c)},j.prototype.searchSchemas=function(a,b){if(void 0!==a&&null!==a&&("string"==typeof a.id&&h(b,a.id)&&void 0===this.schemas[a.id]&&(this.schemas[a.id]=a),"object"==typeof a))for(var c in a)if("enum"!==c)if("object"==typeof a[c])this.searchSchemas(a[c],b);else if("$ref"===c){var d=e(a[c]);d&&void 0===this.schemas[d]&&void 0===this.missingMap[d]&&(this.missingMap[d]=d)}},j.prototype.addSchema=function(a,b){if("undefined"==typeof b){if("object"!=typeof a||"string"!=typeof a.id)return;b=a,a=b.id}(a=e(a)+"#")&&(a=e(a)),this.schemas[a]=b,delete this.missingMap[a],f(b,a),this.searchSchemas(b,a)},j.prototype.getSchemaMap=function(){var a={};for(var b in this.schemas)a[b]=this.schemas[b];return a},j.prototype.getSchemaUris=function(a){var b=[];for(var c in this.schemas)(!a||a.test(c))&&b.push(c);return b},j.prototype.getMissingUris=function(a){var b=[];for(var c in this.missingMap)(!a||a.test(c))&&b.push(c);return b},j.prototype.dropSchemas=function(){this.schemas={},this.reset()},j.prototype.reset=function(){this.missing=[],this.missingMap={},this.errors=[]},j.prototype.validateAll=function(a,b,c,d){var e;if(void 0!==b.$ref&&(b=this.getSchema(b.$ref),!b))return null;if(this.checkRecursive&&"object"==typeof a){if(e=!this.scanned.length,a[this.key]&&-1!==a[this.key].indexOf(b))return null;var f;if(Object.isFrozen(a)&&(f=this.scannedFrozen.indexOf(a),-1!==f&&-1!==this.scannedFrozenSchemas[f].indexOf(b)))return null;if(this.scanned.push(a),Object.isFrozen(a))-1===f&&(f=this.scannedFrozen.length,this.scannedFrozen.push(a),this.scannedFrozenSchemas.push([])),this.scannedFrozenSchemas[f].push(b);else{if(!a[this.key])try{Object.defineProperty(a,this.key,{value:[],configurable:!0})}catch(g){a[this.key]=[]}a[this.key].push(b)}}var h=this.errors.length,i=this.validateBasic(a,b)||this.validateNumeric(a,b)||this.validateString(a,b)||this.validateArray(a,b)||this.validateObject(a,b)||this.validateCombinations(a,b)||this.validateFormat(a,b)||null;if(e){for(;this.scanned.length;){var j=this.scanned.pop();delete j[this.key]}this.scannedFrozen=[],this.scannedFrozenSchemas=[]}if(i||h!==this.errors.length)for(;c&&c.length||d&&d.length;){var k=c&&c.length?""+c.pop():null,l=d&&d.length?""+d.pop():null;i&&(i=i.prefixWith(k,l)),this.prefixErrors(h,k,l)}return this.handleError(i)},j.prototype.validateFormat=function(a,b){if("string"!=typeof b.format||!this.formatValidators[b.format])return null;var c=this.formatValidators[b.format].call(null,a,b);return"string"==typeof c||"number"==typeof c?this.createError(k.FORMAT_CUSTOM,{message:c}).prefixWith(null,"format"):c&&"object"==typeof c?this.createError(k.FORMAT_CUSTOM,{message:c.message||"?"},c.dataPath||null,c.schemaPath||"/format"):null},j.prototype.validateBasic=function(a,b){var c;return(c=this.validateType(a,b))?c.prefixWith(null,"type"):(c=this.validateEnum(a,b))?c.prefixWith(null,"type"):null},j.prototype.validateType=function(a,b){if(void 0===b.type)return null;var c=typeof a;null===a?c="null":Array.isArray(a)&&(c="array");var d=b.type;"object"!=typeof d&&(d=[d]);for(var e=0;e<d.length;e++){var f=d[e];if(f===c||"integer"===f&&"number"===c&&0===a%1)return null}return this.createError(k.INVALID_TYPE,{type:c,expected:d.join("/")})},j.prototype.validateEnum=function(a,c){if(void 0===c["enum"])return null;for(var d=0;d<c["enum"].length;d++){var e=c["enum"][d];if(b(a,e))return null}return this.createError(k.ENUM_MISMATCH,{value:"undefined"!=typeof JSON?JSON.stringify(a):a})},j.prototype.validateNumeric=function(a,b){return this.validateMultipleOf(a,b)||this.validateMinMax(a,b)||null},j.prototype.validateMultipleOf=function(a,b){var c=b.multipleOf||b.divisibleBy;return void 0===c?null:"number"==typeof a&&0!==a%c?this.createError(k.NUMBER_MULTIPLE_OF,{value:a,multipleOf:c}):null},j.prototype.validateMinMax=function(a,b){if("number"!=typeof a)return null;if(void 0!==b.minimum){if(a<b.minimum)return this.createError(k.NUMBER_MINIMUM,{value:a,minimum:b.minimum}).prefixWith(null,"minimum");if(b.exclusiveMinimum&&a===b.minimum)return this.createError(k.NUMBER_MINIMUM_EXCLUSIVE,{value:a,minimum:b.minimum}).prefixWith(null,"exclusiveMinimum")}if(void 0!==b.maximum){if(a>b.maximum)return this.createError(k.NUMBER_MAXIMUM,{value:a,maximum:b.maximum}).prefixWith(null,"maximum");if(b.exclusiveMaximum&&a===b.maximum)return this.createError(k.NUMBER_MAXIMUM_EXCLUSIVE,{value:a,maximum:b.maximum}).prefixWith(null,"exclusiveMaximum")}return null},j.prototype.validateString=function(a,b){return this.validateStringLength(a,b)||this.validateStringPattern(a,b)||null},j.prototype.validateStringLength=function(a,b){return"string"!=typeof a?null:void 0!==b.minLength&&a.length<b.minLength?this.createError(k.STRING_LENGTH_SHORT,{length:a.length,minimum:b.minLength}).prefixWith(null,"minLength"):void 0!==b.maxLength&&a.length>b.maxLength?this.createError(k.STRING_LENGTH_LONG,{length:a.length,maximum:b.maxLength}).prefixWith(null,"maxLength"):null},j.prototype.validateStringPattern=function(a,b){if("string"!=typeof a||void 0===b.pattern)return null;var c=new RegExp(b.pattern);return c.test(a)?null:this.createError(k.STRING_PATTERN,{pattern:b.pattern}).prefixWith(null,"pattern")},j.prototype.validateArray=function(a,b){return Array.isArray(a)?this.validateArrayLength(a,b)||this.validateArrayUniqueItems(a,b)||this.validateArrayItems(a,b)||null:null},j.prototype.validateArrayLength=function(a,b){var c;return void 0!==b.minItems&&a.length<b.minItems&&(c=this.createError(k.ARRAY_LENGTH_SHORT,{length:a.length,minimum:b.minItems}).prefixWith(null,"minItems"),this.handleError(c))?c:void 0!==b.maxItems&&a.length>b.maxItems&&(c=this.createError(k.ARRAY_LENGTH_LONG,{length:a.length,maximum:b.maxItems}).prefixWith(null,"maxItems"),this.handleError(c))?c:null},j.prototype.validateArrayUniqueItems=function(a,c){if(c.uniqueItems)for(var d=0;d<a.length;d++)for(var e=d+1;e<a.length;e++)if(b(a[d],a[e])){var f=this.createError(k.ARRAY_UNIQUE,{match1:d,match2:e}).prefixWith(null,"uniqueItems");if(this.handleError(f))return f}return null},j.prototype.validateArrayItems=function(a,b){if(void 0===b.items)return null;var c,d;if(Array.isArray(b.items)){for(d=0;d<a.length;d++)if(d<b.items.length){if(c=this.validateAll(a[d],b.items[d],[d],["items",d]))return c}else if(void 0!==b.additionalItems)if("boolean"==typeof b.additionalItems){if(!b.additionalItems&&(c=this.createError(k.ARRAY_ADDITIONAL_ITEMS,{}).prefixWith(""+d,"additionalItems"),this.handleError(c)))return c}else if(c=this.validateAll(a[d],b.additionalItems,[d],["additionalItems"]))return c}else for(d=0;d<a.length;d++)if(c=this.validateAll(a[d],b.items,[d],["items"]))return c;return null},j.prototype.validateObject=function(a,b){return"object"!=typeof a||null===a||Array.isArray(a)?null:this.validateObjectMinMaxProperties(a,b)||this.validateObjectRequiredProperties(a,b)||this.validateObjectProperties(a,b)||this.validateObjectDependencies(a,b)||null},j.prototype.validateObjectMinMaxProperties=function(a,b){var c,d=Object.keys(a);return void 0!==b.minProperties&&d.length<b.minProperties&&(c=this.createError(k.OBJECT_PROPERTIES_MINIMUM,{propertyCount:d.length,minimum:b.minProperties}).prefixWith(null,"minProperties"),this.handleError(c))?c:void 0!==b.maxProperties&&d.length>b.maxProperties&&(c=this.createError(k.OBJECT_PROPERTIES_MAXIMUM,{propertyCount:d.length,maximum:b.maxProperties}).prefixWith(null,"maxProperties"),this.handleError(c))?c:null},j.prototype.validateObjectRequiredProperties=function(a,b){if(void 0!==b.required)for(var c=0;c<b.required.length;c++){var d=b.required[c];if(void 0===a[d]){var e=this.createError(k.OBJECT_REQUIRED,{key:d}).prefixWith(null,""+c).prefixWith(null,"required");if(this.handleError(e))return e}}return null},j.prototype.validateObjectProperties=function(a,b){var c;for(var d in a){var e=!1;if(void 0!==b.properties&&void 0!==b.properties[d]&&(e=!0,c=this.validateAll(a[d],b.properties[d],[d],["properties",d])))return c;if(void 0!==b.patternProperties)for(var f in b.patternProperties){var g=new RegExp(f);if(g.test(d)&&(e=!0,c=this.validateAll(a[d],b.patternProperties[f],[d],["patternProperties",f])))return c}if(!e&&void 0!==b.additionalProperties)if("boolean"==typeof b.additionalProperties){if(!b.additionalProperties&&(c=this.createError(k.OBJECT_ADDITIONAL_PROPERTIES,{}).prefixWith(d,"additionalProperties"),this.handleError(c)))return c}else if(c=this.validateAll(a[d],b.additionalProperties,[d],["additionalProperties"]))return c}return null},j.prototype.validateObjectDependencies=function(a,b){var c;if(void 0!==b.dependencies)for(var d in b.dependencies)if(void 0!==a[d]){var e=b.dependencies[d];if("string"==typeof e){if(void 0===a[e]&&(c=this.createError(k.OBJECT_DEPENDENCY_KEY,{key:d,missing:e}).prefixWith(null,d).prefixWith(null,"dependencies"),this.handleError(c)))return c}else if(Array.isArray(e))for(var f=0;f<e.length;f++){var g=e[f];if(void 0===a[g]&&(c=this.createError(k.OBJECT_DEPENDENCY_KEY,{key:d,missing:g}).prefixWith(null,""+f).prefixWith(null,d).prefixWith(null,"dependencies"),this.handleError(c)))return c}else if(c=this.validateAll(a,e,[],["dependencies",d]))return c}return null},j.prototype.validateCombinations=function(a,b){return this.validateAllOf(a,b)||this.validateAnyOf(a,b)||this.validateOneOf(a,b)||this.validateNot(a,b)||null},j.prototype.validateAllOf=function(a,b){if(void 0===b.allOf)return null;for(var c,d=0;d<b.allOf.length;d++){var e=b.allOf[d];if(c=this.validateAll(a,e,[],["allOf",d]))return c}return null},j.prototype.validateAnyOf=function(a,b){if(void 0===b.anyOf)return null;for(var c=[],d=this.errors.length,e=0;e<b.anyOf.length;e++){var f=b.anyOf[e],g=this.errors.length,h=this.validateAll(a,f,[],["anyOf",e]);if(null===h&&g===this.errors.length)return this.errors=this.errors.slice(0,d),null;h&&c.push(h.prefixWith(null,""+e).prefixWith(null,"anyOf"))}return c=c.concat(this.errors.slice(d)),this.errors=this.errors.slice(0,d),this.createError(k.ANY_OF_MISSING,{},"","/anyOf",c)},j.prototype.validateOneOf=function(a,b){if(void 0===b.oneOf)return null;for(var c=null,d=[],e=this.errors.length,f=0;f<b.oneOf.length;f++){var g=b.oneOf[f],h=this.errors.length,i=this.validateAll(a,g,[],["oneOf",f]);if(null===i&&h===this.errors.length){if(null!==c)return this.errors=this.errors.slice(0,e),this.createError(k.ONE_OF_MULTIPLE,{index1:c,index2:f},"","/oneOf");c=f}else i&&d.push(i.prefixWith(null,""+f).prefixWith(null,"oneOf"))}return null===c?(d=d.concat(this.errors.slice(e)),this.errors=this.errors.slice(0,e),this.createError(k.ONE_OF_MISSING,{},"","/oneOf",d)):(this.errors=this.errors.slice(0,e),null)},j.prototype.validateNot=function(a,b){if(void 0===b.not)return null;var c=this.errors.length,d=this.validateAll(a,b.not),e=this.errors.slice(c);return this.errors=this.errors.slice(0,c),null===d&&0===e.length?this.createError(k.NOT_PASSED,{},"","/not"):null};var k={INVALID_TYPE:0,ENUM_MISMATCH:1,ANY_OF_MISSING:10,ONE_OF_MISSING:11,ONE_OF_MULTIPLE:12,NOT_PASSED:13,NUMBER_MULTIPLE_OF:100,NUMBER_MINIMUM:101,NUMBER_MINIMUM_EXCLUSIVE:102,NUMBER_MAXIMUM:103,NUMBER_MAXIMUM_EXCLUSIVE:104,STRING_LENGTH_SHORT:200,STRING_LENGTH_LONG:201,STRING_PATTERN:202,OBJECT_PROPERTIES_MINIMUM:300,OBJECT_PROPERTIES_MAXIMUM:301,OBJECT_REQUIRED:302,OBJECT_ADDITIONAL_PROPERTIES:303,OBJECT_DEPENDENCY_KEY:304,ARRAY_LENGTH_SHORT:400,ARRAY_LENGTH_LONG:401,ARRAY_UNIQUE:402,ARRAY_ADDITIONAL_ITEMS:403,FORMAT_CUSTOM:500},l={INVALID_TYPE:"invalid type: {type} (expected {expected})",ENUM_MISMATCH:"No enum match for: {value}",ANY_OF_MISSING:'Data does not match any schemas from "anyOf"',ONE_OF_MISSING:'Data does not match any schemas from "oneOf"',ONE_OF_MULTIPLE:'Data is valid against more than one schema from "oneOf": indices {index1} and {index2}',NOT_PASSED:'Data matches schema from "not"',NUMBER_MULTIPLE_OF:"Value {value} is not a multiple of {multipleOf}",NUMBER_MINIMUM:"Value {value} is less than minimum {minimum}",NUMBER_MINIMUM_EXCLUSIVE:"Value {value} is equal to exclusive minimum {minimum}",NUMBER_MAXIMUM:"Value {value} is greater than maximum {maximum}",NUMBER_MAXIMUM_EXCLUSIVE:"Value {value} is equal to exclusive maximum {maximum}",STRING_LENGTH_SHORT:"String is too short ({length} chars), minimum {minimum}",STRING_LENGTH_LONG:"String is too long ({length} chars), maximum {maximum}",STRING_PATTERN:"String does not match pattern: {pattern}",OBJECT_PROPERTIES_MINIMUM:"Too few properties defined ({propertyCount}), minimum {minimum}",OBJECT_PROPERTIES_MAXIMUM:"Too many properties defined ({propertyCount}), maximum {maximum}",OBJECT_REQUIRED:"Missing required property: {key}",OBJECT_ADDITIONAL_PROPERTIES:"Additional properties not allowed",OBJECT_DEPENDENCY_KEY:"Dependency failed - key must exist: {missing} (due to key: {key})",ARRAY_LENGTH_SHORT:"Array is too short ({length}), minimum {minimum}",ARRAY_LENGTH_LONG:"Array is too long ({length}), maximum {maximum}",ARRAY_UNIQUE:"Array items are not unique (indices {match1} and {match2})",ARRAY_ADDITIONAL_ITEMS:"Additional items not allowed",FORMAT_CUSTOM:"Format validation failed ({message})"};g.prototype=new Error,g.prototype.prefixWith=function(a,b){if(null!==a&&(a=a.replace("~","~0").replace("/","~1"),this.dataPath="/"+a+this.dataPath),null!==b&&(b=b.replace("~","~0").replace("/","~1"),this.schemaPath="/"+b+this.schemaPath),null!==this.subErrors)for(var c=0;c<this.subErrors.length;c++)this.subErrors[c].prefixWith(a,b);return this};var m={},n=i();n.addLanguage("en-gb",l),n.tv4=n,"undefined"!=typeof module&&module.exports?module.exports=n:a.tv4=n}(this);
//# sourceMappingURL=tv4.min.js.map