@nocobase/plugin-file-manager
Version:
Provides files storage services with files collection template and attachment field.
1 lines • 1.14 MB
JavaScript
(function(){var e={4941:function(e,t,r){"use strict";var a=r(875),i=r(3896),o=r(3679),n=r(7605),s=r(969),c=r(6627),u=r(8561),l=r(1412),p=r(6578);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=r(890);var f=r(3297);Ajv.prototype.addKeyword=f.add;Ajv.prototype.getKeyword=f.get;Ajv.prototype.removeKeyword=f.remove;Ajv.prototype.validateKeyword=f.validate;var d=r(5726);Ajv.ValidationError=d.Validation;Ajv.MissingRefError=d.MissingRef;Ajv.$dataMetaSchema=l;var m="http://json-schema.org/draft-07/schema";var h=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var g=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=p.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=c(e.format);this._cache=e.cache||new o;this._loadingSchemas={};this._compilations=[];this.RULES=u();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=s;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,t){var r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);r=a.validate||this._compile(a)}var i=r(t);if(r.$async!==true)this.errors=r.errors;return i}function compile(e,t){var r=this._addSchema(e,undefined,t);return r.validate||this._compile(r)}function addSchema(e,t,r,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],undefined,r,a);return this}var n=this._getId(e);if(n!==undefined&&typeof n!="string")throw new Error("schema id must be string");t=i.normalizeId(t||n);checkUnique(this,t);this._schemas[t]=this._addSchema(e,r,a,true);return this}function addMetaSchema(e,t,r){this.addSchema(e,t,r,true);return this}function validateSchema(e,t){var r=e.$schema;if(r!==undefined&&typeof r!="string")throw new Error("$schema must be a string");r=r||this._opts.defaultMeta||defaultMeta(this);if(!r){this.logger.warn("meta-schema not available");this.errors=null;return true}var a=this.validate(r,e);if(!a&&t){var i="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(i);else throw new Error(i)}return a}function defaultMeta(e){var t=e._opts.meta;e._opts.defaultMeta=typeof t=="object"?e._getId(t)||t:e.getSchema(m)?m:undefined;return e._opts.defaultMeta}function getSchema(e){var t=_getSchemaObj(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return _getSchemaFragment(this,e)}}function _getSchemaFragment(e,t){var r=i.schema.call(e,{schema:{}},t);if(r){var o=r.schema,s=r.root,c=r.baseId;var u=a.call(e,o,s,undefined,c);e._fragments[t]=new n({ref:t,fragment:true,schema:o,root:s,baseId:c,validate:u});return u}}function _getSchemaObj(e,t){t=i.normalizeId(t);return e._schemas[t]||e._refs[t]||e._fragments[t]}function removeSchema(e){if(e instanceof RegExp){_removeAllSchemas(this,this._schemas,e);_removeAllSchemas(this,this._refs,e);return this}switch(typeof e){case"undefined":_removeAllSchemas(this,this._schemas);_removeAllSchemas(this,this._refs);this._cache.clear();return this;case"string":var t=_getSchemaObj(this,e);if(t)this._cache.del(t.cacheKey);delete this._schemas[e];delete this._refs[e];return this;case"object":var r=this._opts.serialize;var a=r?r(e):e;this._cache.del(a);var o=this._getId(e);if(o){o=i.normalizeId(o);delete this._schemas[o];delete this._refs[o]}}return this}function _removeAllSchemas(e,t,r){for(var a in t){var i=t[a];if(!i.meta&&(!r||r.test(a))){e._cache.del(i.cacheKey);delete t[a]}}}function _addSchema(e,t,r,a){if(typeof e!="object"&&typeof e!="boolean")throw new Error("schema should be object or boolean");var o=this._opts.serialize;var s=o?o(e):e;var c=this._cache.get(s);if(c)return c;a=a||this._opts.addUsedSchema!==false;var u=i.normalizeId(this._getId(e));if(u&&a)checkUnique(this,u);var l=this._opts.validateSchema!==false&&!t;var p;if(l&&!(p=u&&u==i.normalizeId(e.$schema)))this.validateSchema(e,true);var f=i.ids.call(this,e);var d=new n({id:u,schema:e,localRefs:f,cacheKey:s,meta:r});if(u[0]!="#"&&a)this._refs[u]=d;this._cache.put(s,d);if(l&&p)this.validateSchema(e,true);return d}function _compile(e,t){if(e.compiling){e.validate=callValidate;callValidate.schema=e.schema;callValidate.errors=null;callValidate.root=t?t:callValidate;if(e.schema.$async===true)callValidate.$async=true;return callValidate}e.compiling=true;var r;if(e.meta){r=this._opts;this._opts=this._metaOpts}var i;try{i=a.call(this,e.schema,t,e.localRefs)}catch(t){delete e.validate;throw t}finally{e.compiling=false;if(e.meta)this._opts=r}e.validate=i;e.refs=i.refs;e.refVal=i.refVal;e.root=i.root;return i;function callValidate(){var t=e.validate;var r=t.apply(this,arguments);callValidate.errors=t.errors;return r}}function chooseGetId(e){switch(e.schemaId){case"auto":return _get$IdOrId;case"id":return _getId;default:return _get$Id}}function _getId(e){if(e.$id)this.logger.warn("schema $id ignored",e.$id);return e.id}function _get$Id(e){if(e.id)this.logger.warn("schema id ignored",e.id);return e.$id}function _get$IdOrId(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function errorsText(e,t){e=e||this.errors;if(!e)return"No errors";t=t||{};var r=t.separator===undefined?", ":t.separator;var a=t.dataVar===undefined?"data":t.dataVar;var i="";for(var o=0;o<e.length;o++){var n=e[o];if(n)i+=a+n.dataPath+" "+n.message+r}return i.slice(0,-r.length)}function addFormat(e,t){if(typeof t=="string")t=new RegExp(t);this._formats[e]=t;return this}function addDefaultMetaSchema(e){var t;if(e._opts.$data){t=r(894);e.addMetaSchema(t,t.$id,true)}if(e._opts.meta===false)return;var a=r(6680);if(e._opts.$data)a=l(a,g);e.addMetaSchema(a,m,true);e._refs["http://json-schema.org/schema"]=m}function addInitialSchemas(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}function addInitialFormats(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}function addInitialKeywords(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}function checkUnique(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function getMetaSchemaOptions(e){var t=p.copy(e._opts);for(var r=0;r<h.length;r++)delete t[h[r]];return t}function setLogger(e){var t=e._opts.logger;if(t===false){e.logger={log:noop,warn:noop,error:noop}}else{if(t===undefined)t=console;if(!(typeof t=="object"&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}function noop(){}},3679:function(e){"use strict";var t=e.exports=function Cache(){this._cache={}};t.prototype.put=function Cache_put(e,t){this._cache[e]=t};t.prototype.get=function Cache_get(e){return this._cache[e]};t.prototype.del=function Cache_del(e){delete this._cache[e]};t.prototype.clear=function Cache_clear(){this._cache={}}},890:function(e,t,r){"use strict";var a=r(5726).MissingRef;e.exports=compileAsync;function compileAsync(e,t,r){var i=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof t=="function"){r=t;t=undefined}var o=loadMetaSchemaOf(e).then((function(){var r=i._addSchema(e,undefined,t);return r.validate||_compileAsync(r)}));if(r){o.then((function(e){r(null,e)}),r)}return o;function loadMetaSchemaOf(e){var t=e.$schema;return t&&!i.getSchema(t)?compileAsync.call(i,{$ref:t},true):Promise.resolve()}function _compileAsync(e){try{return i._compile(e)}catch(e){if(e instanceof a)return loadMissingSchema(e);throw e}function loadMissingSchema(r){var a=r.missingSchema;if(added(a))throw new Error("Schema "+a+" is loaded but "+r.missingRef+" cannot be resolved");var o=i._loadingSchemas[a];if(!o){o=i._loadingSchemas[a]=i._opts.loadSchema(a);o.then(removePromise,removePromise)}return o.then((function(e){if(!added(a)){return loadMetaSchemaOf(e).then((function(){if(!added(a))i.addSchema(e,a,undefined,t)}))}})).then((function(){return _compileAsync(e)}));function removePromise(){delete i._loadingSchemas[a]}function added(e){return i._refs[e]||i._schemas[e]}}}}},5726:function(e,t,r){"use strict";var a=r(3896);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,t){return"can't resolve reference "+t+" from id "+e};function MissingRefError(e,t,r){this.message=r||MissingRefError.message(e,t);this.missingRef=a.url(e,t);this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},6627:function(e,t,r){"use strict";var a=r(6578);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var o=[0,31,28,31,30,31,30,31,31,30,31,30,31];var n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var s=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var c=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-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./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var p=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var f=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var d=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var m=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var h=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return a.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.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?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:f,"json-pointer":d,"json-pointer-uri-fragment":m,"relative-json-pointer":h};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":u,"uri-template":l,url:p,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:f,"json-pointer":d,"json-pointer-uri-fragment":m,"relative-json-pointer":h};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var t=e.match(i);if(!t)return false;var r=+t[1];var a=+t[2];var n=+t[3];return a>=1&&a<=12&&n>=1&&n<=(a==2&&isLeapYear(r)?29:o[a])}function time(e,t){var r=e.match(n);if(!r)return false;var a=r[1];var i=r[2];var o=r[3];var s=r[5];return(a<=23&&i<=59&&o<=59||a==23&&i==59&&o==60)&&(!t||s)}var g=/t|\s/i;function date_time(e){var t=e.split(g);return t.length==2&&date(t[0])&&time(t[1],true)}var v=/\/|:/;function uri(e){return v.test(e)&&c.test(e)}var y=/[^\\]\\Z/;function regex(e){if(y.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},875:function(e,t,r){"use strict";var a=r(3896),i=r(6578),o=r(5726),n=r(969);var s=r(9585);var c=i.ucs2length;var u=r(8206);var l=o.Validation;e.exports=compile;function compile(e,t,r,p){var f=this,d=this._opts,m=[undefined],h={},g=[],v={},y=[],b={},k=[];t=t||{schema:e,refVal:m,refs:h};var x=checkCompiling.call(this,e,t,p);var w=this._compilations[x.index];if(x.compiling)return w.callValidate=callValidate;var j=this._formats;var E=this.RULES;try{var P=localCompile(e,t,r,p);w.validate=P;var C=w.callValidate;if(C){C.schema=P.schema;C.errors=null;C.refs=P.refs;C.refVal=P.refVal;C.root=P.root;C.$async=P.$async;if(d.sourceCode)C.source=P.source}return P}finally{endCompiling.call(this,e,t,p)}function callValidate(){var e=w.validate;var t=e.apply(this,arguments);callValidate.errors=e.errors;return t}function localCompile(e,r,n,p){var v=!r||r&&r.schema==e;if(r.schema!=t.schema)return compile.call(f,e,r,n,p);var b=e.$async===true;var x=s({isTop:true,schema:e,isRoot:v,baseId:p,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:E,validate:s,util:i,resolve:a,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:d,formats:j,logger:f.logger,self:f});x=vars(m,refValCode)+vars(g,patternCode)+vars(y,defaultCode)+vars(k,customRuleCode)+x;if(d.processCode)x=d.processCode(x,e);var w;try{var P=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",x);w=P(f,E,j,t,m,y,k,u,c,l);m[0]=w}catch(e){f.logger.error("Error compiling schema, function code:",x);throw e}w.schema=e;w.errors=null;w.refs=h;w.refVal=m;w.root=v?w:r;if(b)w.$async=true;if(d.sourceCode===true){w.source={code:x,patterns:g,defaults:y}}return w}function resolveRef(e,i,o){i=a.url(e,i);var n=h[i];var s,c;if(n!==undefined){s=m[n];c="refVal["+n+"]";return resolvedRef(s,c)}if(!o&&t.refs){var u=t.refs[i];if(u!==undefined){s=t.refVal[u];c=addLocalRef(i,s);return resolvedRef(s,c)}}c=addLocalRef(i);var l=a.call(f,localCompile,t,i);if(l===undefined){var p=r&&r[i];if(p){l=a.inlineRef(p,d.inlineRefs)?p:compile.call(f,p,t,r,e)}}if(l===undefined){removeLocalRef(i)}else{replaceLocalRef(i,l);return resolvedRef(l,c)}}function addLocalRef(e,t){var r=m.length;m[r]=t;h[e]=r;return"refVal"+r}function removeLocalRef(e){delete h[e]}function replaceLocalRef(e,t){var r=h[e];m[r]=t}function resolvedRef(e,t){return typeof e=="object"||typeof e=="boolean"?{code:t,schema:e,inline:true}:{code:t,$async:e&&!!e.$async}}function usePattern(e){var t=v[e];if(t===undefined){t=v[e]=g.length;g[t]=e}return"pattern"+t}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(e===null)return"null";var t=n(e);var r=b[t];if(r===undefined){r=b[t]=y.length;y[r]=e}return"default"+r}}function useCustomRule(e,t,r,a){if(f._opts.validateSchema!==false){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var o=e.definition.validateSchema;if(o){var n=o(t);if(!n){var s="keyword schema is invalid: "+f.errorsText(o.errors);if(f._opts.validateSchema=="log")f.logger.error(s);else throw new Error(s)}}}var c=e.definition.compile,u=e.definition.inline,l=e.definition.macro;var p;if(c){p=c.call(f,t,r,a)}else if(l){p=l.call(f,t,r,a);if(d.validateSchema!==false)f.validateSchema(p,true)}else if(u){p=u.call(f,a,e.keyword,t,r)}else{p=e.definition.validate;if(!p)return}if(p===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var m=k.length;k[m]=p;return{code:"customRule"+m,validate:p}}}function checkCompiling(e,t,r){var a=compIndex.call(this,e,t,r);if(a>=0)return{index:a,compiling:true};a=this._compilations.length;this._compilations[a]={schema:e,root:t,baseId:r};return{index:a,compiling:false}}function endCompiling(e,t,r){var a=compIndex.call(this,e,t,r);if(a>=0)this._compilations.splice(a,1)}function compIndex(e,t,r){for(var a=0;a<this._compilations.length;a++){var i=this._compilations[a];if(i.schema==e&&i.root==t&&i.baseId==r)return a}return-1}function patternCode(e,t){return"var pattern"+e+" = new RegExp("+i.toQuotedString(t[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,t){return t[e]===undefined?"":"var refVal"+e+" = refVal["+e+"];"}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,t){if(!e.length)return"";var r="";for(var a=0;a<e.length;a++)r+=t(a,e);return r}},3896:function(e,t,r){"use strict";var a=r(20),i=r(8206),o=r(6578),n=r(7605),s=r(2061);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,t,r){var a=this._refs[r];if(typeof a=="string"){if(this._refs[a])a=this._refs[a];else return resolve.call(this,e,t,a)}a=a||this._schemas[r];if(a instanceof n){return inlineRef(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a)}var i=resolveSchema.call(this,t,r);var o,s,c;if(i){o=i.schema;t=i.root;c=i.baseId}if(o instanceof n){s=o.validate||e.call(this,o.schema,t,undefined,c)}else if(o!==undefined){s=inlineRef(o,this._opts.inlineRefs)?o:e.call(this,o,t,undefined,c)}return s}function resolveSchema(e,t){var r=a.parse(t),i=_getFullPath(r),o=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||i!==o){var s=normalizeId(i);var c=this._refs[s];if(typeof c=="string"){return resolveRecursive.call(this,e,c,r)}else if(c instanceof n){if(!c.validate)this._compile(c);e=c}else{c=this._schemas[s];if(c instanceof n){if(!c.validate)this._compile(c);if(s==normalizeId(t))return{schema:c,root:e,baseId:o};e=c}else{return}}if(!e.schema)return;o=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,r,o,e.schema,e)}function resolveRecursive(e,t,r){var a=resolveSchema.call(this,e,t);if(a){var i=a.schema;var o=a.baseId;e=a.root;var n=this._getId(i);if(n)o=resolveUrl(o,n);return getJsonPointer.call(this,r,o,i,e)}}var c=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,t,r,a){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var i=e.fragment.split("/");for(var n=1;n<i.length;n++){var s=i[n];if(s){s=o.unescapeFragment(s);r=r[s];if(r===undefined)break;var u;if(!c[s]){u=this._getId(r);if(u)t=resolveUrl(t,u);if(r.$ref){var l=resolveUrl(t,r.$ref);var p=resolveSchema.call(this,a,l);if(p){r=p.schema;a=p.root;t=p.baseId}}}}}if(r!==undefined&&r!==a.schema)return{schema:r,root:a,baseId:t}}var u=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(e,t){if(t===false)return false;if(t===undefined||t===true)return checkNoRef(e);else if(t)return countKeys(e)<=t}function checkNoRef(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++){t=e[r];if(typeof t=="object"&&!checkNoRef(t))return false}}else{for(var a in e){if(a=="$ref")return false;t=e[a];if(typeof t=="object"&&!checkNoRef(t))return false}}return true}function countKeys(e){var t=0,r;if(Array.isArray(e)){for(var a=0;a<e.length;a++){r=e[a];if(typeof r=="object")t+=countKeys(r);if(t==Infinity)return Infinity}}else{for(var i in e){if(i=="$ref")return Infinity;if(u[i]){t++}else{r=e[i];if(typeof r=="object")t+=countKeys(r)+1;if(t==Infinity)return Infinity}}}return t}function getFullPath(e,t){if(t!==false)e=normalizeId(e);var r=a.parse(e);return _getFullPath(r)}function _getFullPath(e){return a.serialize(e).split("#")[0]+"#"}var l=/#\/?$/;function normalizeId(e){return e?e.replace(l,""):""}function resolveUrl(e,t){t=normalizeId(t);return a.resolve(e,t)}function resolveIds(e){var t=normalizeId(this._getId(e));var r={"":t};var n={"":getFullPath(t,false)};var c={};var u=this;s(e,{allKeys:true},(function(e,t,s,l,p,f,d){if(t==="")return;var m=u._getId(e);var h=r[l];var g=n[l]+"/"+p;if(d!==undefined)g+="/"+(typeof d=="number"?d:o.escapeFragment(d));if(typeof m=="string"){m=h=normalizeId(h?a.resolve(h,m):m);var v=u._refs[m];if(typeof v=="string")v=u._refs[v];if(v&&v.schema){if(!i(e,v.schema))throw new Error('id "'+m+'" resolves to more than one schema')}else if(m!=normalizeId(g)){if(m[0]=="#"){if(c[m]&&!i(e,c[m]))throw new Error('id "'+m+'" resolves to more than one schema');c[m]=e}else{u._refs[m]=g}}}r[t]=h;n[t]=g}));return c}},8561:function(e,t,r){"use strict";var a=r(5810),i=r(6578).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var t=["type","$comment"];var r=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var o=["number","integer","string","array","object","boolean","null"];e.all=i(t);e.types=i(o);e.forEach((function(r){r.rules=r.rules.map((function(r){var i;if(typeof r=="object"){var o=Object.keys(r)[0];i=r[o];r=o;i.forEach((function(r){t.push(r);e.all[r]=true}))}t.push(r);var n=e.all[r]={keyword:r,code:a[r],implements:i};return n}));e.all.$comment={keyword:"$comment",code:a.$comment};if(r.type)e.types[r.type]=r}));e.keywords=i(t.concat(r));e.custom={};return e}},7605:function(e,t,r){"use strict";var a=r(6578);e.exports=SchemaObject;function SchemaObject(e){a.copy(e,this)}},4580:function(e){"use strict";e.exports=function ucs2length(e){var t=0,r=e.length,a=0,i;while(a<r){t++;i=e.charCodeAt(a++);if(i>=55296&&i<=56319&&a<r){i=e.charCodeAt(a);if((i&64512)==56320)a++}}return t}},6578:function(e,t,r){"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:r(8206),ucs2length:r(4580),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,t){t=t||{};for(var r in e)t[r]=e[r];return t}function checkDataType(e,t,r,a){var i=a?" !== ":" === ",o=a?" || ":" && ",n=a?"!":"",s=a?"":"!";switch(e){case"null":return t+i+"null";case"array":return n+"Array.isArray("+t+")";case"object":return"("+n+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(r?o+n+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?o+n+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}function checkDataTypes(e,t,r){switch(e.length){case 1:return checkDataType(e[0],t,r,true);default:var a="";var i=toHash(e);if(i.array&&i.object){a=i.null?"(":"(!"+t+" || ";a+="typeof "+t+' !== "object")';delete i.null;delete i.array;delete i.object}if(i.number)delete i.integer;for(var o in i)a+=(a?" && ":"")+checkDataType(o,t,r,true);return a}}var a=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){if(Array.isArray(t)){var r=[];for(var i=0;i<t.length;i++){var o=t[i];if(a[o])r[r.length]=o;else if(e==="array"&&o==="array")r[r.length]=o}if(r.length)return r}else if(a[t]){return[t]}else if(e==="array"&&t==="array"){return["array"]}}function toHash(e){var t={};for(var r=0;r<e.length;r++)t[e[r]]=true;return t}var i=/^[a-z$_][a-z$_0-9]*$/i;var o=/'|\\/g;function getProperty(e){return typeof e=="number"?"["+e+"]":i.test(e)?"."+e:"['"+escapeQuotes(e)+"']"}function escapeQuotes(e){return e.replace(o,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function varOccurences(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0}function varReplace(e,t,r){t+="([^0-9])";r=r.replace(/\$/g,"$$$$");return e.replace(new RegExp(t,"g"),r+"$1")}function schemaHasRules(e,t){if(typeof e=="boolean")return!e;for(var r in e)if(t[r])return true}function schemaHasRulesExcept(e,t,r){if(typeof e=="boolean")return!e&&r!="not";for(var a in e)if(a!=r&&t[a])return true}function schemaUnknownRules(e,t){if(typeof e=="boolean")return;for(var r in e)if(!t[r])return r}function toQuotedString(e){return"'"+escapeQuotes(e)+"'"}function getPathExpr(e,t,r,a){var i=r?"'/' + "+t+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return joinPaths(e,i)}function getPath(e,t,r){var a=r?toQuotedString("/"+escapeJsonPointer(t)):toQuotedString(getProperty(t));return joinPaths(e,a)}var n=/^\/(?:[^~]|~0|~1)*$/;var s=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,t,r){var a,i,o,c;if(e==="")return"rootData";if(e[0]=="/"){if(!n.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e;o="rootData"}else{c=e.match(s);if(!c)throw new Error("Invalid JSON-pointer: "+e);a=+c[1];i=c[2];if(i=="#"){if(a>=t)throw new Error("Cannot access property/index "+a+" levels up, current level is "+t);return r[t-a]}if(a>t)throw new Error("Cannot access data "+a+" levels up, current level is "+t);o="data"+(t-a||"");if(!i)return o}var u=o;var l=i.split("/");for(var p=0;p<l.length;p++){var f=l[p];if(f){o+=getProperty(unescapeJsonPointer(f));u+=" && "+o}}return u}function joinPaths(e,t){if(e=='""')return t;return(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))}function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))}function escapeJsonPointer(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},1412:function(e){"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,r){for(var a=0;a<r.length;a++){e=JSON.parse(JSON.stringify(e));var i=r[a].split("/");var o=e;var n;for(n=1;n<i.length;n++)o=o[i[n]];for(n=0;n<t.length;n++){var s=t[n];var c=o[s];if(c){o[s]={anyOf:[c,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}}return e}},458:function(e,t,r){"use strict";var a=r(6680);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:a.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:a.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},7404:function(e){"use strict";e.exports=function generate__limit(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l;var p="data"+(o||"");var f=e.opts.$data&&n&&n.$data,d;if(f){a+=" var schema"+i+" = "+e.util.getData(n.$data,o,e.dataPathArr)+"; ";d="schema"+i}else{d=n}var m=t=="maximum",h=m?"exclusiveMaximum":"exclusiveMinimum",g=e.schema[h],v=e.opts.$data&&g&&g.$data,y=m?"<":">",b=m?">":"<",l=undefined;if(!(f||typeof n=="number"||n===undefined)){throw new Error(t+" must be number")}if(!(v||g===undefined||typeof g=="number"||typeof g=="boolean")){throw new Error(h+" must be number or boolean")}if(v){var k=e.util.getData(g.$data,o,e.dataPathArr),x="exclusive"+i,w="exclType"+i,j="exclIsNumber"+i,E="op"+i,P="' + "+E+" + '";a+=" var schemaExcl"+i+" = "+k+"; ";k="schemaExcl"+i;a+=" var "+x+"; var "+w+" = typeof "+k+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";var l=h;var C=C||[];C.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(l||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: '"+h+" should be boolean' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var R=a;a=C.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+R+"]); "}else{a+=" validate.errors = ["+R+"]; return false; "}}else{a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else if ( ";if(f){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" "+w+" == 'number' ? ( ("+x+" = "+d+" === undefined || "+k+" "+y+"= "+d+") ? "+p+" "+b+"= "+k+" : "+p+" "+b+" "+d+" ) : ( ("+x+" = "+k+" === true) ? "+p+" "+b+"= "+d+" : "+p+" "+b+" "+d+" ) || "+p+" !== "+p+") { var op"+i+" = "+x+" ? '"+y+"' : '"+y+"='; ";if(n===undefined){l=h;c=e.errSchemaPath+"/"+h;d=k;f=v}}else{var j=typeof g=="number",P=y;if(j&&f){var E="'"+P+"'";a+=" if ( ";if(f){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" ( "+d+" === undefined || "+g+" "+y+"= "+d+" ? "+p+" "+b+"= "+g+" : "+p+" "+b+" "+d+" ) || "+p+" !== "+p+") { "}else{if(j&&n===undefined){x=true;l=h;c=e.errSchemaPath+"/"+h;d=g;b+="="}else{if(j)d=Math[m?"min":"max"](g,n);if(g===(j?d:true)){x=true;l=h;c=e.errSchemaPath+"/"+h;b+="="}else{x=false;P+="="}}var E="'"+P+"'";a+=" if ( ";if(f){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" "+p+" "+b+" "+d+" || "+p+" !== "+p+") { "}}l=l||t;var C=C||[];C.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(l||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+E+", limit: "+d+", exclusive: "+x+" } ";if(e.opts.messages!==false){a+=" , message: 'should be "+P+" ";if(f){a+="' + "+d}else{a+=""+d+"'"}}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+s}else{a+=""+n}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var R=a;a=C.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+R+"]); "}else{a+=" validate.errors = ["+R+"]; return false; "}}else{a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(u){a+=" else { "}return a}},4683:function(e){"use strict";e.exports=function generate__limitItems(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l;var p="data"+(o||"");var f=e.opts.$data&&n&&n.$data,d;if(f){a+=" var schema"+i+" = "+e.util.getData(n.$data,o,e.dataPathArr)+"; ";d="schema"+i}else{d=n}if(!(f||typeof n=="number")){throw new Error(t+" must be number")}var m=t=="maxItems"?">":"<";a+="if ( ";if(f){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" "+p+".length "+m+" "+d+") { ";var l=t;var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(l||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+d+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(t=="maxItems"){a+="more"}else{a+="fewer"}a+=" than ";if(f){a+="' + "+d+" + '"}else{a+=""+n}a+=" items' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+s}else{a+=""+n}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var g=a;a=h.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(u){a+=" else { "}return a}},2114:function(e){"use strict";e.exports=function generate__limitLength(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l;var p="data"+(o||"");var f=e.opts.$data&&n&&n.$data,d;if(f){a+=" var schema"+i+" = "+e.util.getData(n.$data,o,e.dataPathArr)+"; ";d="schema"+i}else{d=n}if(!(f||typeof n=="number")){throw new Error(t+" must be number")}var m=t=="maxLength"?">":"<";a+="if ( ";if(f){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}if(e.opts.unicode===false){a+=" "+p+".length "}else{a+=" ucs2length("+p+") "}a+=" "+m+" "+d+") { ";var l=t;var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(l||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+d+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT be ";if(t=="maxLength"){a+="longer"}else{a+="shorter"}a+=" than ";if(f){a+="' + "+d+" + '"}else{a+=""+n}a+=" characters' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+s}else{a+=""+n}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var g=a;a=h.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(u){a+=" else { "}return a}},1142:function(e){"use strict";e.exports=function generate__limitProperties(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l;var p="data"+(o||"");var f=e.opts.$data&&n&&n.$data,d;if(f){a+=" var schema"+i+" = "+e.util.getData(n.$data,o,e.dataPathArr)+"; ";d="schema"+i}else{d=n}if(!(f||typeof n=="number")){throw new Error(t+" must be number")}var m=t=="maxProperties"?">":"<";a+="if ( ";if(f){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" Object.keys("+p+").length "+m+" "+d+") { ";var l=t;var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(l||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+d+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(t=="maxProperties"){a+="more"}else{a+="fewer"}a+=" than ";if(f){a+="' + "+d+" + '"}else{a+=""+n}a+=" properties' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+s}else{a+=""+n}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "}a+=" } "}else{a+=" {} "}var g=a;a=h.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(u){a+=" else { "}return a}},9443:function(e){"use strict";e.exports=function generate_allOf(e,t,r){var a=" ";var i=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var n=e.errSchemaPath+"/"+t;var s=!e.opts.allErrors;var c=e.util.copy(e);var u="";c.level++;var l="valid"+c.level;var p=c.baseId,f=true;var d=i;if(d){var m,h=-1,g=d.length-1;while(h<g){m=d[h+=1];if(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===false:e.util.schemaHasRules(m,e.RULES.all)){f=false;c.schema=m;c.schemaPath=o+"["+h+"]";c.errSchemaPath=n+"/"+h;a+=" "+e.validate(c)+" ";c.baseId=p;if(s){a+=" if ("+l+") { ";u+="}"}}}}if(s){if(f){a+=" if (true) { "}else{a+=" "+u.slice(0,-1)+" "}}return a}},3093:function(e){"use strict";e.exports=function generate_anyOf(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l="data"+(o||"");var p="valid"+i;var f="errs__"+i;var d=e.util.copy(e);var m="";d.level++;var h="valid"+d.level;var g=n.every((function(t){return e.opts.strictKeywords?typeof t=="object"&&Object.keys(t).length>0||t===false:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=d.baseId;a+=" var "+f+" = errors; var "+p+" = false; ";var y=e.compositeRule;e.compositeRule=d.compositeRule=true;var b=n;if(b){var k,x=-1,w=b.length-1;while(x<w){k=b[x+=1];d.schema=k;d.schemaPath=s+"["+x+"]";d.errSchemaPath=c+"/"+x;a+=" "+e.validate(d)+" ";d.baseId=v;a+=" "+p+" = "+p+" || "+h+"; if (!"+p+") { ";m+="}"}}e.compositeRule=d.compositeRule=y;a+=" "+m+" if (!"+p+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"anyOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should match some schema in anyOf' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ";if(e.opts.allErrors){a+=" } "}}else{if(u){a+=" if (true) { "}}return a}},134:function(e){"use strict";e.exports=function generate_comment(e,t,r){var a=" ";var i=e.schema[t];var o=e.errSchemaPath+"/"+t;var n=!e.opts.allErrors;var s=e.util.toQuotedString(i);if(e.opts.$comment===true){a+=" console.log("+s+");"}else if(typeof e.opts.$comment=="function"){a+=" self._opts.$comment("+s+", "+e.util.toQuotedString(o)+", validate.root.schema);"}return a}},1661:function(e){"use strict";e.exports=function generate_const(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l="data"+(o||"");var p="valid"+i;var f=e.opts.$data&&n&&n.$data,d;if(f){a+=" var schema"+i+" = "+e.util.getData(n.$data,o,e.dataPathArr)+"; ";d="schema"+i}else{d=n}if(!f){a+=" var schema"+i+" = validate.schema"+s+";"}a+="var "+p+" = equal("+l+", schema"+i+"); if (!"+p+") { ";var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ";if(e.opts.messages!==false){a+=" , message: 'should be equal to constant' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "}a+=" } "}else{a+=" {} "}var h=a;a=m.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+h+"]); "}else{a+=" validate.errors = ["+h+"]; return false; "}}else{a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" }";if(u){a+=" else { "}return a}},5964:function(e){"use strict";e.exports=function generate_contains(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l="data"+(o||"");var p="valid"+i;var f="errs__"+i;var d=e.util.copy(e);var m="";d.level++;var h="valid"+d.level;var g="i"+i,v=d.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId,k=e.opts.strictKeywords?typeof n=="object"&&Object.keys(n).length>0||n===false:e.util.schemaHasRules(n,e.RULES.all);a+="var "+f+" = errors;var "+p+";";if(k){var x=e.compositeRule;e.compositeRule=d.compositeRule=true;d.schema=n;d.schemaPath=s;d.errSchemaPath=c;a+=" var "+h+" = false; for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ";d.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,true);var w=l+"["+g+"]";d.dataPathArr[v]=g;var j=e.validate(d);d.baseId=b;if(e.util.varOccurences(j,y)<2){a+=" "+e.util.varReplace(j,y,w)+" "}else{a+=" var "+y+" = "+w+"; "+j+" "}a+=" if ("+h+") break; } ";e.compositeRule=d.compositeRule=x;a+=" "+m+" if (!"+h+") {"}else{a+=" if ("+l+".length == 0) {"}var E=E||[];E.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should contain a valid item' "}if(e.opts.verbose){a+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "}a+=" } "}else{a+=" {} "}var P=a;a=E.pop();if(!e.compositeRule&&u){if(e.async){a+=" throw new ValidationError(["+P+"]); "}else{a+=" validate.errors = ["+P+"]; return false; "}}else{a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { ";if(k){a+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "}if(e.opts.allErrors){a+=" } "}return a}},5912:function(e){"use strict";e.exports=function generate_custom(e,t,r){var a=" ";var i=e.level;var o=e.dataLevel;var n=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l;var p="data"+(o||"");var f="valid"+i;var d="errs__"+i;var m=e.opts.$data&&n&&n.$data,h;if(m){a+=" var schema"+i+" = "+e.util.getData(n.$data,o,e.dataPathArr)+"; ";h="schema"+i}else{h=n}var g=this,v="definition"+i,y=g.definition,b="";var k,x,w,j,E;if(m&&y.$data){E="keywordValidate"+i;var P=y.validateSchema;a+=" var "+v+" = RULES.custom['"+t+"'].definition; var "+E+" = "+v+".validate;"}else{j=e.useCustomRule(g,n,e.schema,e);if(!j)return;h="validate.schema"+s;E=j.code;k=y.compile;x=y.inline;w=y.macro}var C=E+".errors",R="i"+i,I="ruleErr"+i,O=y.async;if(O&&!e.async)throw new Error("async keyword in sync schema");if(!(x||w)){a+=""+C+" = null;"}a+="var "+d+" = errors;var "+f+";";if(m&&y.$data){b+="}";a+=" if ("+h+" === undefined) { "+f+" = true; } else { ";if(P){b+="}";a+=" "+f+" = "+v+".validateSchema("+h+"); if ("+f+") { "}}if(x){if(y.statements){a+=" "+j.validate+" "}else{a+=" "+f+" = "+j.validate+"; "}}else if(w){var B=e.util.copy(e);var b="";B.level++;var D="valid"+B.level;B.schema=j.validate;B.schemaPath="";var z=e.compositeRule;e.compositeRule=B.compositeRule=true;var N=e.validate(B).replace(/validate\.schema/g,E);e.compositeRule=B.compositeRule=z;a+=" "+N}else{var $=$||[];$.push(a);a="";a+=" "+E+".call( ";if(e.opts.passContext){a+="this"}else{a+="self"}if(k||y.schema===false){a+=" , "+p+" "}else{a+=" , "+h+" , "+p+" , validate.schema"+e.schemaPath+" "}a+=" , (dataPath || '')";if(e.errorPath!='""'){a+=" + "+e.errorPath}var q=o?"data"+(o-1||""):"parentData",L=o?e.dataPathArr[o]:"parentDataProperty";a+=" , "+q+" , "+L+" , rootData ) ";var U=a;a=$.pop();if(y.errors===false){a+=" "+f+" = ";if(O){a+="await "}a+=""+U+"; "}else{if(O){C="customErrors"+i;a+=" var "+C+" = null; try { "+f+" = await "+U+"; } catch (e) { "+f+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } "}else{a+="