UNPKG

gimonfu

Version:

CLI tool to manage articles of Hatena-blog.

2 lines 1.05 MB
/*! For license information please see main.js.LICENSE.txt */ (()=>{var e={5096:(e,t,r)=>{"use strict";var i=r(7153),a=r(3610),n=r(7531),o=r(4022),s=r(5035),u=r(1516),c=r(7753),p=r(3978),l=r(2889);e.exports=v,v.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var i=this._addSchema(e);r=i.validate||this._compile(i)}var a=r(t);return!0!==r.$async&&(this.errors=r.errors),a},v.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},v.prototype.addSchema=function(e,t,r,i){if(Array.isArray(e)){for(var n=0;n<e.length;n++)this.addSchema(e[n],void 0,r,i);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return j(this,t=a.normalizeId(t||o)),this._schemas[t]=this._addSchema(e,r,i,!0),this},v.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},v.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(d)?d:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var i=this.validate(r,e);if(!i&&t){var a="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(a);this.logger.error(a)}return i},v.prototype.getSchema=function(e){var t=y(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=a.schema.call(e,{schema:{}},t);if(r){var n=r.schema,s=r.root,u=r.baseId,c=i.call(e,n,s,void 0,u);return e._fragments[t]=new o({ref:t,fragment:!0,schema:n,root:s,baseId:u,validate:c}),c}}(this,e)}},v.prototype.removeSchema=function(e){if(e instanceof RegExp)return b(this,this._schemas,e),b(this,this._refs,e),this;switch(typeof e){case"undefined":return b(this,this._schemas),b(this,this._refs),this._cache.clear(),this;case"string":var t=y(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,i=r?r(e):e;this._cache.del(i);var n=this._getId(e);n&&(n=a.normalizeId(n),delete this._schemas[n],delete this._refs[n])}return this},v.prototype.addFormat=function(e,t){return"string"==typeof t&&(t=new RegExp(t)),this._formats[e]=t,this},v.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,i=void 0===t.dataVar?"data":t.dataVar,a="",n=0;n<e.length;n++){var o=e[n];o&&(a+=i+o.dataPath+" "+o.message+r)}return a.slice(0,-r.length)},v.prototype._addSchema=function(e,t,r,i){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var n=this._opts.serialize,s=n?n(e):e,u=this._cache.get(s);if(u)return u;i=i||!1!==this._opts.addUsedSchema;var c=a.normalizeId(this._getId(e));c&&i&&j(this,c);var p,l=!1!==this._opts.validateSchema&&!t;l&&!(p=c&&c==a.normalizeId(e.$schema))&&this.validateSchema(e,!0);var h=a.ids.call(this,e),m=new o({id:c,schema:e,localRefs:h,cacheKey:s,meta:r});return"#"!=c[0]&&i&&(this._refs[c]=m),this._cache.put(s,m),l&&p&&this.validateSchema(e,!0),m},v.prototype._compile=function(e,t){if(e.compiling)return e.validate=n,n.schema=e.schema,n.errors=null,n.root=t||n,!0===e.schema.$async&&(n.$async=!0),n;var r,a;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{a=i.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=a,e.refs=a.refs,e.refVal=a.refVal,e.root=a.root,a;function n(){var t=e.validate,r=t.apply(this,arguments);return n.errors=t.errors,r}},v.prototype.compileAsync=r(2931);var h=r(4895);v.prototype.addKeyword=h.add,v.prototype.getKeyword=h.get,v.prototype.removeKeyword=h.remove,v.prototype.validateKeyword=h.validate;var m=r(7802);v.ValidationError=m.Validation,v.MissingRefError=m.MissingRef,v.$dataMetaSchema=p;var d="http://json-schema.org/draft-07/schema",f=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],g=["/properties"];function v(e){if(!(this instanceof v))return new v(e);e=this._opts=l.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:E,warn:E,error:E};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=u(e.format),this._cache=e.cache||new n,this._loadingSchemas={},this._compilations=[],this.RULES=c(),this._getId=function(e){switch(e.schemaId){case"auto":return w;case"id":return x;default:return k}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=s),this._metaOpts=function(e){for(var t=l.copy(e._opts),r=0;r<f.length;r++)delete t[f[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;if(e._opts.$data&&(t=r(894),e.addMetaSchema(t,t.$id,!0)),!1!==e._opts.meta){var i=r(6680);e._opts.$data&&(i=p(i,g)),e.addMetaSchema(i,d,!0),e._refs["http://json-schema.org/schema"]=d}}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(t)if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function y(e,t){return t=a.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function b(e,t,r){for(var i in t){var a=t[i];a.meta||r&&!r.test(i)||(e._cache.del(a.cacheKey),delete t[i])}}function x(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function k(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function w(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 j(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function E(){}},7531:e=>{"use strict";var t=e.exports=function(){this._cache={}};t.prototype.put=function(e,t){this._cache[e]=t},t.prototype.get=function(e){return this._cache[e]},t.prototype.del=function(e){delete this._cache[e]},t.prototype.clear=function(){this._cache={}}},2931:(e,t,r)=>{"use strict";var i=r(7802).MissingRef;e.exports=function e(t,r,a){var n=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(a=r,r=void 0);var o=s(t).then((function(){var e=n._addSchema(t,void 0,r);return e.validate||u(e)}));return a&&o.then((function(e){a(null,e)}),a),o;function s(t){var r=t.$schema;return r&&!n.getSchema(r)?e.call(n,{$ref:r},!0):Promise.resolve()}function u(e){try{return n._compile(e)}catch(t){if(t instanceof i)return function(t){var i=t.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+t.missingRef+" cannot be resolved");var a=n._loadingSchemas[i];return a||(a=n._loadingSchemas[i]=n._opts.loadSchema(i)).then(o,o),a.then((function(e){if(!c(i))return s(e).then((function(){c(i)||n.addSchema(e,i,void 0,r)}))})).then((function(){return u(e)}));function o(){delete n._loadingSchemas[i]}function c(e){return n._refs[e]||n._schemas[e]}}(t);throw t}}}},7802:(e,t,r)=>{"use strict";var i=r(3610);function a(e,t,r){this.message=r||a.message(e,t),this.missingRef=i.url(e,t),this.missingSchema=i.normalizeId(i.fullPath(this.missingRef))}function n(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:n((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:n(a)},a.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},1516:(e,t,r)=>{"use strict";var i=r(2889),a=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,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,u=/^(?:[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-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[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,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,l=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,m=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,d=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(e){return e="full"==e?"full":"fast",i.copy(f[e])}function g(e){var t=e.match(a);if(!t)return!1;var r=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2==i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:n[i])}function v(e,t){var r=e.match(o);if(!r)return!1;var i=r[1],a=r[2],n=r[3],s=r[5];return(i<=23&&a<=59&&n<=59||23==i&&59==a&&60==n)&&(!t||s)}e.exports=f,f.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)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:p,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[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:k,uuid:l,"json-pointer":h,"json-pointer-uri-fragment":m,"relative-json-pointer":d},f.full={date:g,time:v,"date-time":function(e){var t=e.split(y);return 2==t.length&&g(t[0])&&v(t[1],!0)},uri:function(e){return b.test(e)&&u.test(e)},"uri-reference":/^(?:[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-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,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:k,uuid:l,"json-pointer":h,"json-pointer-uri-fragment":m,"relative-json-pointer":d};var y=/t|\s/i,b=/\/|:/,x=/[^\\]\\Z/;function k(e){if(x.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},7153:(e,t,r)=>{"use strict";var i=r(3610),a=r(2889),n=r(7802),o=r(5035),s=r(9508),u=a.ucs2length,c=r(4063),p=n.Validation;function l(e,t,r){var i=m.call(this,e,t,r);return i>=0?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:t,baseId:r},{index:i,compiling:!1})}function h(e,t,r){var i=m.call(this,e,t,r);i>=0&&this._compilations.splice(i,1)}function m(e,t,r){for(var i=0;i<this._compilations.length;i++){var a=this._compilations[i];if(a.schema==e&&a.root==t&&a.baseId==r)return i}return-1}function d(e,t){return"var pattern"+e+" = new RegExp("+a.toQuotedString(t[e])+");"}function f(e){return"var default"+e+" = defaults["+e+"];"}function g(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function v(e){return"var customRule"+e+" = customRules["+e+"];"}function y(e,t){if(!e.length)return"";for(var r="",i=0;i<e.length;i++)r+=t(i,e);return r}e.exports=function e(t,r,m,b){var x=this,k=this._opts,w=[void 0],j={},E=[],D={},S=[],F={},A=[];r=r||{schema:t,refVal:w,refs:j};var C=l.call(this,t,r,b),_=this._compilations[C.index];if(C.compiling)return _.callValidate=function e(){var t=_.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var T=this._formats,P=this.RULES;try{var O=B(t,r,m,b);_.validate=O;var I=_.callValidate;return I&&(I.schema=O.schema,I.errors=null,I.refs=O.refs,I.refVal=O.refVal,I.root=O.root,I.$async=O.$async,k.sourceCode&&(I.source=O.source)),O}finally{h.call(this,t,r,b)}function B(t,o,l,h){var m=!o||o&&o.schema==t;if(o.schema!=r.schema)return e.call(x,t,o,l,h);var b,D=!0===t.$async,F=s({isTop:!0,schema:t,isRoot:m,baseId:h,root:o,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:n.MissingRef,RULES:P,validate:s,util:a,resolve:i,resolveRef:z,usePattern:L,useDefault:M,useCustomRule:R,opts:k,formats:T,logger:x.logger,self:x});F=y(w,g)+y(E,d)+y(S,f)+y(A,v)+F,k.processCode&&(F=k.processCode(F,t));try{b=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",F)(x,P,T,r,w,S,A,c,u,p),w[0]=b}catch(e){throw x.logger.error("Error compiling schema, function code:",F),e}return b.schema=t,b.errors=null,b.refs=j,b.refVal=w,b.root=m?b:o,D&&(b.$async=!0),!0===k.sourceCode&&(b.source={code:F,patterns:E,defaults:S}),b}function z(t,a,n){a=i.url(t,a);var o,s,u=j[a];if(void 0!==u)return q(o=w[u],s="refVal["+u+"]");if(!n&&r.refs){var c=r.refs[a];if(void 0!==c)return q(o=r.refVal[c],s=N(a,o))}s=N(a);var p=i.call(x,B,r,a);if(void 0===p){var l=m&&m[a];l&&(p=i.inlineRef(l,k.inlineRefs)?l:e.call(x,l,r,m,t))}if(void 0!==p)return function(e,t){var r=j[e];w[r]=t}(a,p),q(p,s);!function(e){delete j[e]}(a)}function N(e,t){var r=w.length;return w[r]=t,j[e]=r,"refVal"+r}function q(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function L(e){var t=D[e];return void 0===t&&(t=D[e]=E.length,E[t]=e),"pattern"+t}function M(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return a.toQuotedString(e);case"object":if(null===e)return"null";var t=o(e),r=F[t];return void 0===r&&(r=F[t]=S.length,S[r]=e),"default"+r}}function R(e,t,r,i){if(!1!==x._opts.validateSchema){var a=e.definition.dependencies;if(a&&!a.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+a.join(","));var n=e.definition.validateSchema;if(n&&!n(t)){var o="keyword schema is invalid: "+x.errorsText(n.errors);if("log"!=x._opts.validateSchema)throw new Error(o);x.logger.error(o)}}var s,u=e.definition.compile,c=e.definition.inline,p=e.definition.macro;if(u)s=u.call(x,t,r,i);else if(p)s=p.call(x,t,r,i),!1!==k.validateSchema&&x.validateSchema(s,!0);else if(c)s=c.call(x,i,e.keyword,t,r);else if(!(s=e.definition.validate))return;if(void 0===s)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var l=A.length;return A[l]=s,{code:"customRule"+l,validate:s}}}},3610:(e,t,r)=>{"use strict";var i=r(540),a=r(4063),n=r(2889),o=r(4022),s=r(9461);function u(e,t,r){var i=this._refs[r];if("string"==typeof i){if(!this._refs[i])return u.call(this,e,t,i);i=this._refs[i]}if((i=i||this._schemas[r])instanceof o)return d(i.schema,this._opts.inlineRefs)?i.schema:i.validate||this._compile(i);var a,n,s,p=c.call(this,t,r);return p&&(a=p.schema,t=p.root,s=p.baseId),a instanceof o?n=a.validate||e.call(this,a.schema,t,void 0,s):void 0!==a&&(n=d(a,this._opts.inlineRefs)?a:e.call(this,a,t,void 0,s)),n}function c(e,t){var r=i.parse(t),a=y(r),n=v(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==n){var s=x(a),u=this._refs[s];if("string"==typeof u)return p.call(this,e,u,r);if(u instanceof o)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[s])instanceof o))return;if(u.validate||this._compile(u),s==x(t))return{schema:u,root:e,baseId:n};e=u}if(!e.schema)return;n=v(this._getId(e.schema))}return h.call(this,r,n,e.schema,e)}function p(e,t,r){var i=c.call(this,e,t);if(i){var a=i.schema,n=i.baseId;e=i.root;var o=this._getId(a);return o&&(n=k(n,o)),h.call(this,r,n,a,e)}}e.exports=u,u.normalizeId=x,u.fullPath=v,u.url=k,u.ids=function(e){var t=x(this._getId(e)),r={"":t},o={"":v(t,!1)},u={},c=this;return s(e,{allKeys:!0},(function(e,t,s,p,l,h,m){if(""!==t){var d=c._getId(e),f=r[p],g=o[p]+"/"+l;if(void 0!==m&&(g+="/"+("number"==typeof m?m:n.escapeFragment(m))),"string"==typeof d){d=f=x(f?i.resolve(f,d):d);var v=c._refs[d];if("string"==typeof v&&(v=c._refs[v]),v&&v.schema){if(!a(e,v.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=x(g))if("#"==d[0]){if(u[d]&&!a(e,u[d]))throw new Error('id "'+d+'" resolves to more than one schema');u[d]=e}else c._refs[d]=g}r[t]=f,o[t]=g}})),u},u.inlineRef=d,u.schema=c;var l=n.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,t,r,i){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var a=e.fragment.split("/"),o=1;o<a.length;o++){var s=a[o];if(s){if(void 0===(r=r[s=n.unescapeFragment(s)]))break;var u;if(!l[s]&&((u=this._getId(r))&&(t=k(t,u)),r.$ref)){var p=k(t,r.$ref),h=c.call(this,i,p);h&&(r=h.schema,i=h.root,t=h.baseId)}}}return void 0!==r&&r!==i.schema?{schema:r,root:i,baseId:t}:void 0}}var m=n.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function d(e,t){return!1!==t&&(void 0===t||!0===t?f(e):t?g(e)<=t:void 0)}function f(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!f(t))return!1}else for(var i in e){if("$ref"==i)return!1;if("object"==typeof(t=e[i])&&!f(t))return!1}return!0}function g(e){var t,r=0;if(Array.isArray(e)){for(var i=0;i<e.length;i++)if("object"==typeof(t=e[i])&&(r+=g(t)),r==1/0)return 1/0}else for(var a in e){if("$ref"==a)return 1/0;if(m[a])r++;else if("object"==typeof(t=e[a])&&(r+=g(t)+1),r==1/0)return 1/0}return r}function v(e,t){return!1!==t&&(e=x(e)),y(i.parse(e))}function y(e){return i.serialize(e).split("#")[0]+"#"}var b=/#\/?$/;function x(e){return e?e.replace(b,""):""}function k(e,t){return t=x(t),i.resolve(e,t)}},7753:(e,t,r)=>{"use strict";var i=r(6674),a=r(2889).toHash;e.exports=function(){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"]}],t=["type","$comment"];return e.all=a(t),e.types=a(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var a;if("object"==typeof r){var n=Object.keys(r)[0];a=r[n],r=n,a.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:i[r],implements:a}})),e.all.$comment={keyword:"$comment",code:i.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=a(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},4022:(e,t,r)=>{"use strict";var i=r(2889);e.exports=function(e){i.copy(e,this)}},4442:e=>{"use strict";e.exports=function(e){for(var t,r=0,i=e.length,a=0;a<i;)r++,(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<i&&56320==(64512&(t=e.charCodeAt(a)))&&a++;return r}},2889:(e,t,r)=>{"use strict";function i(e,t,r,i){var a=i?" !== ":" === ",n=i?" || ":" && ",o=i?"!":"",s=i?"":"!";switch(e){case"null":return t+a+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+n+"typeof "+t+a+'"object"'+n+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+a+'"number"'+n+s+"("+t+" % 1)"+n+t+a+t+(r?n+o+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+a+'"'+e+'"'+(r?n+o+"isFinite("+t+")":"")+")";default:return"typeof "+t+a+'"'+e+'"'}}e.exports={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:i,checkDataTypes:function(e,t,r){if(1===e.length)return i(e[0],t,r,!0);var a="",o=n(e);for(var s in o.array&&o.object&&(a=o.null?"(":"(!"+t+" || ",a+="typeof "+t+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)a+=(a?" && ":"")+i(s,t,r,!0);return a},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],i=0;i<t.length;i++){var n=t[i];(a[n]||"array"===e&&"array"===n)&&(r[r.length]=n)}if(r.length)return r}else{if(a[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:n,getProperty:u,escapeQuotes:c,equal:r(4063),ucs2length:r(4442),varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var i in e)if(i!=r&&t[i])return!0},schemaUnknownRules:function(e,t){if("boolean"!=typeof e)for(var r in e)if(!t[r])return r},toQuotedString:p,getPathExpr:function(e,t,r,i){return m(e,r?"'/' + "+t+(i?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):i?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,r){return m(e,p(r?"/"+d(t):u(t)))},getData:function(e,t,r){var i,a,n,o;if(""===e)return"rootData";if("/"==e[0]){if(!l.test(e))throw new Error("Invalid JSON-pointer: "+e);a=e,n="rootData"}else{if(!(o=e.match(h)))throw new Error("Invalid JSON-pointer: "+e);if(i=+o[1],"#"==(a=o[2])){if(i>=t)throw new Error("Cannot access property/index "+i+" levels up, current level is "+t);return r[t-i]}if(i>t)throw new Error("Cannot access data "+i+" levels up, current level is "+t);if(n="data"+(t-i||""),!a)return n}for(var s=n,c=a.split("/"),p=0;p<c.length;p++){var m=c[p];m&&(s+=" && "+(n+=u(f(m))))}return s},unescapeFragment:function(e){return f(decodeURIComponent(e))},unescapeJsonPointer:f,escapeFragment:function(e){return encodeURIComponent(d(e))},escapeJsonPointer:d};var a=n(["string","number","integer","boolean","null"]);function n(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var o=/^[a-z$_][a-z$_0-9]*$/i,s=/'|\\/g;function u(e){return"number"==typeof e?"["+e+"]":o.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(s,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function p(e){return"'"+c(e)+"'"}var l=/^\/(?:[^~]|~0|~1)*$/,h=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function m(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function d(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function f(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},3978: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 i=0;i<r.length;i++){e=JSON.parse(JSON.stringify(e));var a,n=r[i].split("/"),o=e;for(a=1;a<n.length;a++)o=o[n[a]];for(a=0;a<t.length;a++){var s=t[a],u=o[s];u&&(o[s]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},1128:(e,t,r)=>{"use strict";var i=r(6680);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:i.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:i.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"}]}}}},8210:e=>{"use strict";e.exports=function(e,t,r){var i,a=" ",n=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.$data&&s&&s.$data;h?(a+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+n):i=s;var m="maximum"==t,d=m?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[d],g=e.opts.$data&&f&&f.$data,v=m?"<":">",y=m?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(d+" must be number or boolean");if(g){var x,k=e.util.getData(f.$data,o,e.dataPathArr),w="exclusive"+n,j="exclType"+n,E="exclIsNumber"+n,D="' + "+(F="op"+n)+" + '";a+=" var schemaExcl"+n+" = "+k+"; ",a+=" var "+w+"; var "+j+" = typeof "+(k="schemaExcl"+n)+"; if ("+j+" != 'boolean' && "+j+" != 'undefined' && "+j+" != 'number') { ",b=d,(x=x||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var S=a;a=x.pop(),!e.compositeRule&&p?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",h&&(a+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),a+=" "+j+" == 'number' ? ( ("+w+" = "+i+" === undefined || "+k+" "+v+"= "+i+") ? "+l+" "+y+"= "+k+" : "+l+" "+y+" "+i+" ) : ( ("+w+" = "+k+" === true) ? "+l+" "+y+"= "+i+" : "+l+" "+y+" "+i+" ) || "+l+" !== "+l+") { var op"+n+" = "+w+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=d,c=e.errSchemaPath+"/"+d,i=k,h=g)}else if(D=v,(E="number"==typeof f)&&h){var F="'"+D+"'";a+=" if ( ",h&&(a+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),a+=" ( "+i+" === undefined || "+f+" "+v+"= "+i+" ? "+l+" "+y+"= "+f+" : "+l+" "+y+" "+i+" ) || "+l+" !== "+l+") { "}else E&&void 0===s?(w=!0,b=d,c=e.errSchemaPath+"/"+d,i=f,y+="="):(E&&(i=Math[m?"min":"max"](f,s)),f===(!E||i)?(w=!0,b=d,c=e.errSchemaPath+"/"+d,y+="="):(w=!1,D+="=")),F="'"+D+"'",a+=" if ( ",h&&(a+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),a+=" "+l+" "+y+" "+i+" || "+l+" !== "+l+") { ";return b=b||t,(x=x||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+F+", limit: "+i+", exclusive: "+w+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be "+D+" ",a+=h?"' + "+i:i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=h?"validate.schema"+u:""+s,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ",S=a,a=x.pop(),!e.compositeRule&&p?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",p&&(a+=" else { "),a}},3038:e=>{"use strict";e.exports=function(e,t,r){var i,a=" ",n=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(a+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+n):i=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");a+="if ( ",h&&(a+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),a+=" "+l+".length "+("maxItems"==t?">":"<")+" "+i+") { ";var m=t,d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(m||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have ",a+="maxItems"==t?"more":"fewer",a+=" than ",a+=h?"' + "+i+" + '":""+s,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",a+=h?"validate.schema"+u:""+s,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var f=a;return a=d.pop(),!e.compositeRule&&p?e.async?a+=" throw new ValidationError(["+f+"]); ":a+=" validate.errors = ["+f+"]; return false; ":a+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",p&&(a+=" else { "),a}},425:e=>{"use strict";e.exports=function(e,t,r){var i,a=" ",n=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(a+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+n):i=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var m="maxLength"==t?">":"<";a+="if ( ",h&&(a+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),!1===e.opts.unicode?a+=" "+l+".length ":a+=" ucs2length("+l+") ",a+=" "+m+" "+i+") { ";var d=t,f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be ",a+="maxLength"==t?"longer":"shorter",a+=" than ",a+=h?"' + "+i+" + '":""+s,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",a+=h?"validate.schema"+u:""+s,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var g=a;return a=f.pop(),!e.compositeRule&&p?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",p&&(a+=" else { "),a}},8204:e=>{"use strict";e.exports=function(e,t,r){var i,a=" ",n=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,l="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(a+=" var schema"+n+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+n):i=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");a+="if ( ",h&&(a+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),a+=" Object.keys("+l+").length "+("maxProperties"==t?">":"<")+" "+i+") { ";var m=t,d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(m||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have ",a+="maxProperties"==t?"more":"fewer",a+=" than ",a+=h?"' + "+i+" + '":""+s,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",a+=h?"validate.schema"+u:""+s,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var f=a;return a=d.pop(),!e.compositeRule&&p?e.async?a+=" throw new ValidationError(["+f+"]); ":a+=" validate.errors = ["+f+"]; return false; ":a+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",p&&(a+=" else { "),a}},2988:e=>{"use strict";e.exports=function(e,t,r){var i=" ",a=e.schema[t],n=e.schemaPath+e.util.getProperty(t),o=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,u=e.util.copy(e),c="";u.level++;var p="valid"+u.level,l=u.baseId,h=!0,m=a;if(m)for(var d,f=-1,g=m.length-1;f<g;)d=m[f+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,u.schema=d,u.schemaPath=n+"["+f+"]",u.errSchemaPath=o+"/"+f,i+=" "+e.validate(u)+" ",u.baseId=l,s&&(i+=" if ("+p+") { ",c+="}"));return s&&(i+=h?" if (true) { ":" "+c.slice(0,-1)+" "),i}},9996:e=>{"use strict";e.exports=function(e,t,r){var i=" ",a=e.level,n=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,p="data"+(n||""),l="valid"+a,h="errs__"+a,m=e.util.copy(e),d="";m.level++;var f="valid"+m.level,g=o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=m.baseId;i+=" var "+h+" = errors; var "+l+" = false; ";var y=e.compositeRule;e.compositeRule=m.compositeRule=!0;var b=o;if(b)for(var x,k=-1,w=b.length-1;k<w;)x=b[k+=1],m.schema=x,m.schemaPath=s+"["+k+"]",m.errSchemaPath=u+"/"+k,i+=" "+e.validate(m)+" ",m.baseId=v,i+=" "+l+" = "+l+" || "+f+"; if (!"+l+") { ",d+="}";e.compositeRule=m.compositeRule=y,i+=" "+d+" if (!"+l+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else c&&(i+=" if (true) { ");return i}},7812:e=>{"use strict";e.exports=function(e,t,r){var i=" ",a=e.schema[t],n=e.errSchemaPath+"/"+t,o=(e.opts.allErrors,e.util.toQuotedString(a));return!0===e.opts.$comment?i+=" console.log("+o+");":"function"==typeof e.opts.$comment&&(i+=" self._opts.$comment("+o+", "+e.util.toQuotedString(n)+", validate.root.schema);"),i}},5306:e=>{"use strict";e.exports=function(e,t,r){var i=" ",a=e.level,n=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,p="data"+(n||""),l="valid"+a,h=e.opts.$data&&o&&o.$data;h&&(i+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; "),h||(i+=" var schema"+a+" = validate.schema"+s+";"),i+="var "+l+" = equal("+p+", schema"+a+"); if (!"+l+") { ";var m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+a+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var d=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}},2840:e=>{"use strict";e.exports=function(e,t,r){var i=" ",a=e.level,n=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,p="data"+(n||""),l="valid"+a,h="errs__"+a,m=e.util.copy(e);m.level++;var d="valid"+m.level,f="i"+a,g=m.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all);if(i+="var "+h+" = errors;var "+l+";",b){var x=e.compositeRule;e.compositeRule=m.compositeRule=!0,m.schema=o,m.schemaPath=s,m.errSchemaPath=u,i+=" var "+d+" = false; for (var "+f+" = 0; "+f+" < "+p+".length; "+f+"++) { ",m.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var k=p+"["+f+"]";m.dataPathArr[g]=f;var w=e.validate(m);m.baseId=y,e.util.varOccurences(w,v)<2?i+=" "+e.util.varReplace(w,v,k)+" ":i+=" var "+v+" = "+k+"; "+w+" ",i+=" if ("+d+") break; } ",e.compositeRule=m.compositeRule=x,i+=" if (!"+d+") {"}else i+=" if ("+p+".length == 0) {";var j=j||[];j.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var E=i;return i=j.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+E+"]); ":i+=" validate.errors = ["+E+"]; return false; ":i+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",b&&(i+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i}},4165:e=>{"use strict";e.exports=function(e,t,r){var i,a,n=" ",o=e.level,s=e.dataLevel,u=e.schema[t],c=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),m="valid"+o,d="errs__"+o,f=e.opts.$data&&u&&u.$data;f?(n+=" var schema"+o+" = "+e.util.getData(u.$data,s,e.dataPathArr)+"; ",a="schema"+o):a=u;var g,v,y,b,x,k=this,w="definition"+o,j=k.definition,E="";if(f&&j.$data){x="keywordValidate"+o;var D=j.validateSchema;n+=" var "+w+" = RULES.custom['"+t+"'].definition; var "+x+" = "+w+".validate;"}else{if(!(b=e.useCustomRule(k,u,e.schema,e)))return;a="validate.schema"+c,x=b.code,g=j.compile,v=j.inline,y=j.macro}var S=x+".errors",F="i"+o,A="ruleErr"+o,C=j.async;if(C&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(n+=S+" = null;"),n+="var "+d+" = errors;var "+m+";",f&&j.$data&&(E+="}",n+=" if ("+a+" === undefined) { "+m+" = true; } else { ",D&&(E+="}",n+=" "+m+" = "+w+".validateSchema("+a+"); if ("+m+") { ")),v)j.statements?n+=" "+b.validate+" ":n+=" "+m+" = "+b.validate+"; ";else if(y){var _=e.util.copy(e);E="",_.level++;var T="valid"+_.level;_.schema=b.validate,_.schemaPath="";var P=e.compositeRule;e.compositeRule=_.compositeRule=!0;var O=e.validate(_).replace(/validate\.schema/g,x);e.compositeRule=_.compositeRule=P,n+=" "+O}else{(N=N||[]).push(n),n="",n+=" "+x+".call( ",e.opts.passContext?n+="this":n+="self",g||!1===j.schema?n+=" , "+h+" ":n+=" , "+a+" , "+h+" , validate.schema"+e.schemaPath+" ",n+=" , (dataPath || '')",'""'!=e.errorPath&&(n+=" + "+e.errorPath);var I=s?"data"+(s-1||""):"parentData",B=s?e.dataPathArr[s]:"parentDataProperty",z=n+=" , "+I+" , "+B+" , rootData ) ";n=N.pop(),!1===j.errors?(n+=" "+m+" = ",C&&(n+="await "),n+=z+"; "):n+=C?" var "+(S="customErrors"+o)+" = null; try { "+m+" = await "+z+"; } catch (e) { "+m+" = false; if (e instanceof ValidationError) "+S+" = e.errors; else throw e; } ":" "+S+" = null; "+m+" = "+z+"; "}if(j.modifying&&(n+=" if ("+I+") "+h+" = "+I+"["+B+"];"),n+=""+E,j.valid)l&&(n+=" if (true) { ");else{var N;n+=" if ( ",void 0===j.valid?(n+=" !",n+=y?""+T:""+m):n+=" "+!j.valid+" ",n+=") { ",i=k.keyword,(N=N||[]).push(n),n="",(N=N||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(i||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { keyword: '"+k.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+k.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var q=n;n=N.pop(),!e.compositeRule&&l?e.async?n+=" throw new ValidationError(["+q+"]); ":n+=" validate.errors = ["+q+"]; return false; ":n+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var L=n;n=N.pop(),v?j.errors?"full"!=j.errors&&(n+=" for (var "+F+"="+d+"; "+F+"<errors; "+F+"++) { var "+A+" = vErrors["+F+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+p+'"; } ',e.opts.verbose&&(n+=" "+A+".schema = "+a+"; "+A+".data = "+h+"; "),n+=" } "):!1===j.errors?n+=" "+L+" ":(n+=" if ("+d+" == errors) { "+L+" } else { for (var "+F+"="+d+"; "+F+"<errors; "+F+"++) { var "+A+" = vErrors["+F+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+p+'"; } ',e.opts.verbose&&(n+=" "+A+".schema = "+a+"; "+A+".data = "+h+"; "),n+=" } } "):y?(n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: '"+(i||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { keyword: '"+k.keyword+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \""+k.keyword+"\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; ")):!1===j.errors?n+=" "+L+" ":(n+=" if (Array.isArray("+S+")) { if (vErrors === null) vErrors = "+S+"; else vErrors = vErrors.concat("+S+"); errors = vErrors.length; for (var "+F+"="+d+"; "+F+"<errors; "+F+"++) { var "+A+" = vErrors["+F+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; "+A+'.schemaPath = "'+p+'"; ',e.opts.verbose&&(n+=" "+A+".schema = "+a+"; "+A+".data = "+h+"; "),n+=" } } else { "+L+" } "),n+=" } ",l&&(n+=" else { ")}return n}},6659:e=>{"use strict";e.exports=function(e,t,r){var i=" ",a=e.level,n=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,p="data"+(n||""),l="errs__"+a,h=e.util.copy(e),m="";h.level++;var d="valid"+h.level,f={},g={},v=e.opts.ownProperties;for(k in o)if("__proto__"!=k){var y=o[k],b=Array.isArray(y)?g:f;b[k]=y}i+="var "+l+" = errors;";var x=e.errorPath;for(var k in i+="var missing"+a+";",g)if((b=g[k]).length){if(i+=" if ( "+p+e.util.getProperty(k)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(k)+"') "),c){i+=" && ( ";var w=b;if(w)for(var j=-1,E=w.length-1;j<E;)_=w[j+=1],j&&(i+=" || "),i+=" ( ( "+(I=p+(O=e.util.getProperty(_)))+" === undefined ",v&&(i+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(_)+"') "),i+=") && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?_:O)+") ) ";i+=")) { ";var D="missing"+a,S="' + "+D+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(x,D,!0):x+" + "+D);var F=F||[];F.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(k)+"', missingProperty: '"+S+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(i+=" , message: 'should have ",1==b.length?i+="property "+e.util.escapeQuotes(b[0]):i+="properties "+e.util.escapeQuotes(b.join(", ")),i+=" when property "+e.util.escapeQuotes(k)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var A=i;i=F.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+A+"]); ":i+=" validate.errors = ["+A+"]; return false; ":i+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var C=b;if(C)for(var _,T=-1,P=C.length-1;T<P;){_=C[T+=1];var O=e.util.getProperty(_),I=(S=e.util.escapeQuotes(_),p+O);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(x,_,e.opts.jsonPointers)),i+=" if ( "+I+" === undefined ",v&&(i+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+e.util.escapeQuotes(_)+"') "),i+=") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuote