@tencent-ai/codebuddy-code 0.0.1-beta.2 → 0.0.1-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- exports.id=291,exports.ids=[291],exports.modules={1572:(e,r,t)=>{"use strict";var a=t(2707);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"}]}}}},2707:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},2862:function(e,r){!function(e){"use strict";function merge(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var a=r.length-1,s=1;s<a;++s)r[s]=r[s].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function subexp(e){return"(?:"+e+")"}function typeOf(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}function buildExps(e){var r="[A-Za-z]",t="[0-9]",a=merge(t,"[A-Fa-f]"),s=subexp(subexp("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+subexp("%[89A-Fa-f]"+a+"%"+a+a)+"|"+subexp("%"+a+a)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=merge("[\\:\\/\\?\\#\\[\\]\\@]",o),n=e?"[\\uE000-\\uF8FF]":"[]",l=merge(r,t,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),u=subexp(r+merge(r,t,"[\\+\\-\\.]")+"*"),c=subexp(subexp(s+"|"+merge(l,o,"[\\:]"))+"*"),h=(subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+t)+"|"+subexp("1"+t+t)+"|"+subexp("[1-9]"+t)+"|"+t),subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+t)+"|"+subexp("1"+t+t)+"|"+subexp("0?[1-9]"+t)+"|0?0?"+t)),d=subexp(h+"\\."+h+"\\."+h+"\\."+h),p=subexp(a+"{1,4}"),m=subexp(subexp(p+"\\:"+p)+"|"+d),f=subexp(subexp(p+"\\:")+"{6}"+m),v=subexp("\\:\\:"+subexp(p+"\\:")+"{5}"+m),g=subexp(subexp(p)+"?\\:\\:"+subexp(p+"\\:")+"{4}"+m),y=subexp(subexp(subexp(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+subexp(p+"\\:")+"{3}"+m),P=subexp(subexp(subexp(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+subexp(p+"\\:")+"{2}"+m),b=subexp(subexp(subexp(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+m),E=subexp(subexp(subexp(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+m),w=subexp(subexp(subexp(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),_=subexp(subexp(subexp(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=subexp([f,v,g,y,P,b,E,w,_].join("|")),x=subexp(subexp(l+"|"+s)+"+"),R=(subexp(S+"\\%25"+x),subexp(S+subexp("\\%25|\\%(?!"+a+"{2})")+x)),$=subexp("[vV]"+a+"+\\."+merge(l,o,"[\\:]")+"+"),C=subexp("\\["+subexp(R+"|"+S+"|"+$)+"\\]"),F=subexp(subexp(s+"|"+merge(l,o))+"*"),D=subexp(C+"|"+d+"(?!"+F+")|"+F),I=subexp(t+"*"),O=subexp(subexp(c+"@")+"?"+D+subexp("\\:"+I)+"?"),j=subexp(s+"|"+merge(l,o,"[\\:\\@]")),A=subexp(j+"*"),k=subexp(j+"+"),T=subexp(subexp(s+"|"+merge(l,o,"[\\@]"))+"+"),q=subexp(subexp("\\/"+A)+"*"),z=subexp("\\/"+subexp(k+q)+"?"),N=subexp(T+q),L=subexp(k+q),V="(?!"+j+")",U=(subexp(q+"|"+z+"|"+N+"|"+L+"|"+V),subexp(subexp(j+"|"+merge("[\\/\\?]",n))+"*")),H=subexp(subexp(j+"|[\\/\\?]")+"*"),Q=subexp(subexp("\\/\\/"+O+q)+"|"+z+"|"+L+"|"+V),M=subexp(u+"\\:"+Q+subexp("\\?"+U)+"?"+subexp("\\#"+H)+"?"),K=subexp(subexp("\\/\\/"+O+q)+"|"+z+"|"+N+"|"+V),J=subexp(K+subexp("\\?"+U)+"?"+subexp("\\#"+H)+"?");return subexp(M+"|"+J),subexp(u+"\\:"+Q+subexp("\\?"+U)+"?"),subexp(subexp("\\/\\/("+subexp("("+c+")@")+"?("+D+")"+subexp("\\:("+I+")")+"?)")+"?("+q+"|"+z+"|"+L+"|"+V+")"),subexp("\\?("+U+")"),subexp("\\#("+H+")"),subexp(subexp("\\/\\/("+subexp("("+c+")@")+"?("+D+")"+subexp("\\:("+I+")")+"?)")+"?("+q+"|"+z+"|"+N+"|"+V+")"),subexp("\\?("+U+")"),subexp("\\#("+H+")"),subexp(subexp("\\/\\/("+subexp("("+c+")@")+"?("+D+")"+subexp("\\:("+I+")")+"?)")+"?("+q+"|"+z+"|"+L+"|"+V+")"),subexp("\\?("+U+")"),subexp("\\#("+H+")"),subexp("("+c+")@"),subexp("\\:("+I+")"),{NOT_SCHEME:new RegExp(merge("[^]",r,t,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",l,o),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",l,o),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",l,o),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",l,o),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",l,o,"[\\:\\@\\/\\?]",n),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",l,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",l,o),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+subexp(subexp("\\%25|\\%(?!"+a+"{2})")+"("+x+")")+"?\\]?$")}}var r=buildExps(!1),t=buildExps(!0),a=function(){function sliceIterator(e,r){var t=[],a=!0,s=!1,o=void 0;try{for(var i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){s=!0,o=e}finally{try{!a&&n.return&&n.return()}finally{if(s)throw o}}return t}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return sliceIterator(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},s=2147483647,o=36,i=1,n=26,l=38,u=700,c=72,h=128,d="-",p=/^xn--/,m=/[^\0-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=o-i,y=Math.floor,P=String.fromCharCode;function error$1(e){throw new RangeError(v[e])}function map(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}function mapDomain(e,r){var t=e.split("@"),a="";return t.length>1&&(a=t[0]+"@",e=t[1]),a+map((e=e.replace(f,".")).split("."),r).join(".")}function ucs2decode(e){for(var r=[],t=0,a=e.length;t<a;){var s=e.charCodeAt(t++);if(s>=55296&&s<=56319&&t<a){var o=e.charCodeAt(t++);56320==(64512&o)?r.push(((1023&s)<<10)+(1023&o)+65536):(r.push(s),t--)}else r.push(s)}return r}var b=function basicToDigit(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:o},E=function digitToBasic(e,r){return e+22+75*(e<26)-((0!=r)<<5)},w=function adapt(e,r,t){var a=0;for(e=t?y(e/u):e>>1,e+=y(e/r);e>g*n>>1;a+=o)e=y(e/g);return y(a+(g+1)*e/(e+l))},_=function decode(e){var r=[],t=e.length,a=0,l=h,u=c,p=e.lastIndexOf(d);p<0&&(p=0);for(var m=0;m<p;++m)e.charCodeAt(m)>=128&&error$1("not-basic"),r.push(e.charCodeAt(m));for(var f=p>0?p+1:0;f<t;){for(var v=a,g=1,P=o;;P+=o){f>=t&&error$1("invalid-input");var E=b(e.charCodeAt(f++));(E>=o||E>y((s-a)/g))&&error$1("overflow"),a+=E*g;var _=P<=u?i:P>=u+n?n:P-u;if(E<_)break;var S=o-_;g>y(s/S)&&error$1("overflow"),g*=S}var x=r.length+1;u=w(a-v,x,0==v),y(a/x)>s-l&&error$1("overflow"),l+=y(a/x),a%=x,r.splice(a++,0,l)}return String.fromCodePoint.apply(String,r)},S=function encode(e){var r=[],t=(e=ucs2decode(e)).length,a=h,l=0,u=c,p=!0,m=!1,f=void 0;try{for(var v,g=e[Symbol.iterator]();!(p=(v=g.next()).done);p=!0){var b=v.value;b<128&&r.push(P(b))}}catch(e){m=!0,f=e}finally{try{!p&&g.return&&g.return()}finally{if(m)throw f}}var _=r.length,S=_;for(_&&r.push(d);S<t;){var x=s,R=!0,$=!1,C=void 0;try{for(var F,D=e[Symbol.iterator]();!(R=(F=D.next()).done);R=!0){var I=F.value;I>=a&&I<x&&(x=I)}}catch(e){$=!0,C=e}finally{try{!R&&D.return&&D.return()}finally{if($)throw C}}var O=S+1;x-a>y((s-l)/O)&&error$1("overflow"),l+=(x-a)*O,a=x;var j=!0,A=!1,k=void 0;try{for(var T,q=e[Symbol.iterator]();!(j=(T=q.next()).done);j=!0){var z=T.value;if(z<a&&++l>s&&error$1("overflow"),z==a){for(var N=l,L=o;;L+=o){var V=L<=u?i:L>=u+n?n:L-u;if(N<V)break;var U=N-V,H=o-V;r.push(P(E(V+U%H,0))),N=y(U/H)}r.push(P(E(N,0))),u=w(l,O,S==_),l=0,++S}}}catch(e){A=!0,k=e}finally{try{!j&&q.return&&q.return()}finally{if(A)throw k}}++l,++a}return r.join("")},x=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?_(e.slice(4).toLowerCase()):e}))},R=function toASCII(e){return mapDomain(e,(function(e){return m.test(e)?"xn--"+S(e):e}))},$={version:"2.1.0",ucs2:{decode:ucs2decode,encode:function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))}},decode:_,encode:S,toASCII:R,toUnicode:x},C={};function pctEncChar(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function pctDecChars(e){for(var r="",t=0,a=e.length;t<a;){var s=parseInt(e.substr(t+1,2),16);if(s<128)r+=String.fromCharCode(s),t+=3;else if(s>=194&&s<224){if(a-t>=6){var o=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&s)<<6|63&o)}else r+=e.substr(t,6);t+=6}else if(s>=224){if(a-t>=9){var i=parseInt(e.substr(t+4,2),16),n=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&s)<<12|(63&i)<<6|63&n)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function _normalizeComponentEncoding(e,r){function decodeUnreserved(e){var t=pctDecChars(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_USERINFO,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_HOST,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,decodeUnreserved).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_QUERY,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_FRAGMENT,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,r){var t=e.match(r.IPV4ADDRESS)||[],s=a(t,2)[1];return s?s.split(".").map(_stripLeadingZeros).join("."):e}function _normalizeIPv6(e,r){var t=e.match(r.IPV6ADDRESS)||[],s=a(t,3),o=s[1],i=s[2];if(o){for(var n=o.toLowerCase().split("::").reverse(),l=a(n,2),u=l[0],c=l[1],h=c?c.split(":").map(_stripLeadingZeros):[],d=u.split(":").map(_stripLeadingZeros),p=r.IPV4ADDRESS.test(d[d.length-1]),m=p?7:8,f=d.length-m,v=Array(m),g=0;g<m;++g)v[g]=h[g]||d[f+g]||"";p&&(v[m-1]=_normalizeIPv4(v[m-1],r));var y=v.reduce((function(e,r,t){if(!r||"0"===r){var a=e[e.length-1];a&&a.index+a.length===t?a.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],P=void 0;if(y&&y.length>1){var b=v.slice(0,y.index),E=v.slice(y.index+y.length);P=b.join(":")+"::"+E.join(":")}else P=v.join(":");return i&&(P+="%"+i),P}return e}var F=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function parse(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={},o=!1!==a.iri?t:r;"suffix"===a.reference&&(e=(a.scheme?a.scheme+":":"")+"//"+e);var i=e.match(F);if(i){D?(s.scheme=i[1],s.userinfo=i[3],s.host=i[4],s.port=parseInt(i[5],10),s.path=i[6]||"",s.query=i[7],s.fragment=i[8],isNaN(s.port)&&(s.port=i[5])):(s.scheme=i[1]||void 0,s.userinfo=-1!==e.indexOf("@")?i[3]:void 0,s.host=-1!==e.indexOf("//")?i[4]:void 0,s.port=parseInt(i[5],10),s.path=i[6]||"",s.query=-1!==e.indexOf("?")?i[7]:void 0,s.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(s.port)&&(s.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),s.host&&(s.host=_normalizeIPv6(_normalizeIPv4(s.host,o),o)),void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||s.path||void 0!==s.query?void 0===s.scheme?s.reference="relative":void 0===s.fragment?s.reference="absolute":s.reference="uri":s.reference="same-document",a.reference&&"suffix"!==a.reference&&a.reference!==s.reference&&(s.error=s.error||"URI is not a "+a.reference+" reference.");var n=C[(a.scheme||s.scheme||"").toLowerCase()];if(a.unicodeSupport||n&&n.unicodeSupport)_normalizeComponentEncoding(s,o);else{if(s.host&&(a.domainHost||n&&n.domainHost))try{s.host=$.toASCII(s.host.replace(o.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){s.error=s.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_normalizeComponentEncoding(s,r)}n&&n.parse&&n.parse(s,a)}else s.error=s.error||"URI can not be parsed.";return s}function _recomposeAuthority(e,a){var s=!1!==a.iri?t:r,o=[];return void 0!==e.userinfo&&(o.push(e.userinfo),o.push("@")),void 0!==e.host&&o.push(_normalizeIPv6(_normalizeIPv4(String(e.host),s),s).replace(s.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(o.push(":"),o.push(String(e.port))),o.length?o.join(""):void 0}var I=/^\.\.?\//,O=/^\/\.(\/|$)/,j=/^\/\.\.(\/|$)/,A=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){for(var r=[];e.length;)if(e.match(I))e=e.replace(I,"");else if(e.match(O))e=e.replace(O,"/");else if(e.match(j))e=e.replace(j,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(A);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function serialize(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=a.iri?t:r,o=[],i=C[(a.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,a),e.host)if(s.IPV6ADDRESS.test(e.host));else if(a.domainHost||i&&i.domainHost)try{e.host=a.iri?$.toUnicode(e.host):$.toASCII(e.host.replace(s.PCT_ENCODED,pctDecChars).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(a.iri?"Unicode":"ASCII")+" via punycode: "+r}_normalizeComponentEncoding(e,s),"suffix"!==a.reference&&e.scheme&&(o.push(e.scheme),o.push(":"));var n=_recomposeAuthority(e,a);if(void 0!==n&&("suffix"!==a.reference&&o.push("//"),o.push(n),e.path&&"/"!==e.path.charAt(0)&&o.push("/")),void 0!==e.path){var l=e.path;a.absolutePath||i&&i.absolutePath||(l=removeDotSegments(l)),void 0===n&&(l=l.replace(/^\/\//,"/%2F")),o.push(l)}return void 0!==e.query&&(o.push("?"),o.push(e.query)),void 0!==e.fragment&&(o.push("#"),o.push(e.fragment)),o.join("")}function resolveComponents(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a={};return arguments[3]||(e=parse(serialize(e,t),t),r=parse(serialize(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(a.scheme=r.scheme,a.userinfo=r.userinfo,a.host=r.host,a.port=r.port,a.path=removeDotSegments(r.path||""),a.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(a.userinfo=r.userinfo,a.host=r.host,a.port=r.port,a.path=removeDotSegments(r.path||""),a.query=r.query):(r.path?("/"===r.path.charAt(0)?a.path=removeDotSegments(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:a.path=r.path:a.path="/"+r.path,a.path=removeDotSegments(a.path)),a.query=r.query):(a.path=e.path,void 0!==r.query?a.query=r.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=r.fragment,a}function resolve(e,r,t){var a=assign({scheme:"null"},t);return serialize(resolveComponents(parse(e,a),parse(r,a),a,!0),a)}function normalize(e,r){return"string"==typeof e?e=serialize(parse(e,r),r):"object"===typeOf(e)&&(e=parse(serialize(e,r),r)),e}function equal(e,r,t){return"string"==typeof e?e=serialize(parse(e,t),t):"object"===typeOf(e)&&(e=serialize(e,t)),"string"==typeof r?r=serialize(parse(r,t),t):"object"===typeOf(r)&&(r=serialize(r,t)),e===r}function escapeComponent(e,a){return e&&e.toString().replace(a&&a.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,a){return e&&e.toString().replace(a&&a.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var k={scheme:"http",domainHost:!0,parse:function parse(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function serialize(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},T={scheme:"https",domainHost:k.domainHost,parse:k.parse,serialize:k.serialize};function isSecure(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var q={scheme:"ws",domainHost:!0,parse:function parse(e,r){var t=e;return t.secure=isSecure(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function serialize(e,r){if(e.port!==(isSecure(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),s=a(t,2),o=s[0],i=s[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},z={scheme:"wss",domainHost:q.domainHost,parse:q.parse,serialize:q.serialize},N={},L="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",V="[0-9A-Fa-f]",U=subexp(subexp("%[EFef]"+V+"%"+V+V+"%"+V+V)+"|"+subexp("%[89A-Fa-f]"+V+"%"+V+V)+"|"+subexp("%"+V+V)),H="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Q=merge("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),M="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",K=new RegExp(L,"g"),J=new RegExp(U,"g"),B=new RegExp(merge("[^]",H,"[\\.]",'[\\"]',Q),"g"),Z=new RegExp(merge("[^]",L,M),"g"),G=Z;function decodeUnreserved(e){var r=pctDecChars(e);return r.match(K)?r:e}var Y={scheme:"mailto",parse:function parse$$1(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n<l;++n){var u=i[n].split("=");switch(u[0]){case"to":for(var c=u[1].split(","),h=0,d=c.length;h<d;++h)a.push(c[h]);break;case"subject":t.subject=unescapeComponent(u[1],r);break;case"body":t.body=unescapeComponent(u[1],r);break;default:s=!0,o[unescapeComponent(u[0],r)]=unescapeComponent(u[1],r)}}s&&(t.headers=o)}t.query=void 0;for(var p=0,m=a.length;p<m;++p){var f=a[p].split("@");if(f[0]=unescapeComponent(f[0]),r.unicodeSupport)f[1]=unescapeComponent(f[1],r).toLowerCase();else try{f[1]=$.toASCII(unescapeComponent(f[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=f.join("@")}return t},serialize:function serialize$$1(e,r){var t=e,a=toArray(e.to);if(a){for(var s=0,o=a.length;s<o;++s){var i=String(a[s]),n=i.lastIndexOf("@"),l=i.slice(0,n).replace(J,decodeUnreserved).replace(J,toUpperCase).replace(B,pctEncChar),u=i.slice(n+1);try{u=r.iri?$.toUnicode(u):$.toASCII(unescapeComponent(u,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}a[s]=l+"@"+u}t.path=a.join(",")}var c=e.headers=e.headers||{};e.subject&&(c.subject=e.subject),e.body&&(c.body=e.body);var h=[];for(var d in c)c[d]!==N[d]&&h.push(d.replace(J,decodeUnreserved).replace(J,toUpperCase).replace(Z,pctEncChar)+"="+c[d].replace(J,decodeUnreserved).replace(J,toUpperCase).replace(G,pctEncChar));return h.length&&(t.query=h.join("&")),t}},W=/^([^\:]+)\:(.*)/,X={scheme:"urn",parse:function parse$$1(e,r){var t=e.path&&e.path.match(W),a=e;if(t){var s=r.scheme||a.scheme||"urn",o=t[1].toLowerCase(),i=t[2],n=s+":"+(r.nid||o),l=C[n];a.nid=o,a.nss=i,a.path=void 0,l&&(a=l.parse(a,r))}else a.error=a.error||"URN can not be parsed.";return a},serialize:function serialize$$1(e,r){var t=r.scheme||e.scheme||"urn",a=e.nid,s=t+":"+(r.nid||a),o=C[s];o&&(e=o.serialize(e,r));var i=e,n=e.nss;return i.path=(a||r.nid)+":"+n,i}},ee=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,re={scheme:"urn:uuid",parse:function parse(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ee)||(t.error=t.error||"UUID is not valid."),t},serialize:function serialize(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};C[k.scheme]=k,C[T.scheme]=T,C[q.scheme]=q,C[z.scheme]=z,C[Y.scheme]=Y,C[X.scheme]=X,C[re.scheme]=re,e.SCHEMES=C,e.pctEncChar=pctEncChar,e.pctDecChars=pctDecChars,e.parse=parse,e.removeDotSegments=removeDotSegments,e.serialize=serialize,e.resolveComponents=resolveComponents,e.resolve=resolve,e.normalize=normalize,e.equal=equal,e.escapeComponent=escapeComponent,e.unescapeComponent=unescapeComponent,Object.defineProperty(e,"__esModule",{value:!0})}(r)},4243:e=>{"use strict";e.exports=function generate_format(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||"");if(!1===e.opts.format)return u&&(a+=" if (true) { "),a;var h,d=e.opts.$data&&i&&i.$data;d?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",h="schema"+s):h=i;var p=e.opts.unknownFormats,m=Array.isArray(p);if(d){a+=" var "+(f="format"+s)+" = formats["+h+"]; var "+(v="isObject"+s)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(g="formatType"+s)+" = "+v+" && "+f+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+s+" = "+f+".async; "),a+=" "+f+" = "+f+".validate; } if ( ",d&&(a+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),a+=" (","ignore"!=p&&(a+=" ("+h+" && !"+f+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),a+=") || "),a+=" ("+f+" && "+g+" == '"+t+"' && !(typeof "+f+" == 'function' ? ",e.async?a+=" (async"+s+" ? await "+f+"("+c+") : "+f+"("+c+")) ":a+=" "+f+"("+c+") ",a+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(a+=" if (true) { "),a;if(m&&p.indexOf(i)>=0)return u&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,g=(v="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(v){var y=!0===f.async;f=f.validate}if(g!=t)return u&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(P="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof f?" "+P+"("+c+") ":" "+P+".test("+c+") ",a+=") { "}}var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+h:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+h+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var E=a;return a=b.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+E+"]); ":a+=" validate.errors = ["+E+"]; return false; ":a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",u&&(a+=" else { "),a}},7916:e=>{"use strict";e.exports=function generate_allOf(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,h=l.baseId,d=!0,p=s;if(p)for(var m,f=-1,v=p.length-1;f<v;)m=p[f+=1],(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all))&&(d=!1,l.schema=m,l.schemaPath=o+"["+f+"]",l.errSchemaPath=i+"/"+f,a+=" "+e.validate(l)+" ",l.baseId=h,n&&(a+=" if ("+c+") { ",u+="}"));return n&&(a+=d?" if (true) { ":" "+u.slice(0,-1)+" "),a}},8633:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},10613:e=>{"use strict";e.exports=function generate_multipleOf(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;if(d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,!d&&"number"!=typeof n)throw new Error(r+" must be number");s+="var division"+o+";if (",d&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+h+" / "+a+", ",e.opts.multipleOfPrecision?s+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":s+=" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) "),s+=" ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},10877:e=>{"use strict";e.exports=function generate_contains(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d="errs__"+s,p=e.util.copy(e);p.level++;var m="valid"+p.level,f="i"+s,v=p.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId,P=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(a+="var "+d+" = errors;var "+h+";",P){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" var "+m+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var E=c+"["+f+"]";p.dataPathArr[v]=f;var w=e.validate(p);p.baseId=y,e.util.varOccurences(w,g)<2?a+=" "+e.util.varReplace(w,g,E)+" ":a+=" var "+g+" = "+E+"; "+w+" ",a+=" if ("+m+") break; } ",e.compositeRule=p.compositeRule=b,a+=" if (!"+m+") {"}else a+=" if ("+c+".length == 0) {";var _=_||[];_.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;return a=_.pop(),!e.compositeRule&&u?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 { ",P&&(a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}},17327:(e,r,t)=>{"use strict";function checkDataType(e,r,t,a){var s=a?" !== ":" === ",o=a?" || ":" && ",i=a?"!":"",n=a?"":"!";switch(e){case"null":return r+s+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+o+"typeof "+r+s+'"object"'+o+n+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+s+'"number"'+o+n+"("+r+" % 1)"+o+r+s+r+(t?o+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+s+'"'+e+'"'+(t?o+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+s+'"'+e+'"'}}e.exports={copy:function copy(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType,checkDataTypes:function checkDataTypes(e,r,t){if(1===e.length)return checkDataType(e[0],r,t,!0);var a="",s=toHash(e);for(var o in s.array&&s.object&&(a=s.null?"(":"(!"+r+" || ",a+="typeof "+r+' !== "object")',delete s.null,delete s.array,delete s.object),s.number&&delete s.integer,s)a+=(a?" && ":"")+checkDataType(o,r,t,!0);return a},coerceToTypes:function coerceToTypes(e,r){if(Array.isArray(r)){for(var t=[],s=0;s<r.length;s++){var o=r[s];(a[o]||"array"===e&&"array"===o)&&(t[t.length]=o)}if(t.length)return t}else{if(a[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash,getProperty,escapeQuotes,equal:t(38792),ucs2length:t(50786),varOccurences:function varOccurences(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function varReplace(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function schemaHasRules(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function schemaHasRulesExcept(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function schemaUnknownRules(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString,getPathExpr:function getPathExpr(e,r,t,a){return joinPaths(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function getPath(e,r,t){var a=toQuotedString(t?"/"+escapeJsonPointer(r):getProperty(r));return joinPaths(e,a)},getData:function getData(e,r,t){var a,s,o,l;if(""===e)return"rootData";if("/"==e[0]){if(!i.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,o="rootData"}else{if(!(l=e.match(n)))throw new Error("Invalid JSON-pointer: "+e);if(a=+l[1],"#"==(s=l[2])){if(a>=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var u=o,c=s.split("/"),h=0;h<c.length;h++){var d=c[h];d&&(u+=" && "+(o+=getProperty(unescapeJsonPointer(d))))}return u},unescapeFragment:function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},unescapeJsonPointer,escapeFragment:function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},escapeJsonPointer};var a=toHash(["string","number","integer","boolean","null"]);function toHash(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var s=/^[a-z$_][a-z$_0-9]*$/i,o=/'|\\/g;function getProperty(e){return"number"==typeof e?"["+e+"]":s.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 toQuotedString(e){return"'"+escapeQuotes(e)+"'"}var i=/^\/(?:[^~]|~0|~1)*$/,n=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function joinPaths(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function escapeJsonPointer(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},18354:e=>{"use strict";e.exports=function generate__limitItems(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;if(d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,!d&&"number"!=typeof n)throw new Error(r+" must be number");s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+h+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var p=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"fewer",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var f=s;return s=m.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},21131:e=>{"use strict";e.exports=function generate_uniqueItems(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d="valid"+o,p=e.opts.$data&&n&&n.$data;if(p?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,(n||p)&&!1!==e.opts.uniqueItems){p&&(s+=" var "+d+"; if ("+a+" === false || "+a+" === undefined) "+d+" = true; else if (typeof "+a+" != 'boolean') "+d+" = false; else { "),s+=" var i = "+h+".length , "+d+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,f=Array.isArray(m);if(!m||"object"==m||"array"==m||f&&(m.indexOf("object")>=0||m.indexOf("array")>=0))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var v="checkDataType"+(f?"s":"");s+=" if ("+e.util[v](m,"item",e.opts.strictNumbers,!0)+") continue; ",f&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ",p&&(s+=" } "),s+=" if (!"+d+") { ";var g=g||[];g.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=p?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var y=s;s=g.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+y+"]); ":s+=" validate.errors = ["+y+"]; return false; ":s+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",c&&(s+=" else { ")}else c&&(s+=" if (true) { ");return s}},22204:e=>{"use strict";e.exports=function generate__limitLength(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;if(d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,!d&&"number"!=typeof n)throw new Error(r+" must be number");var p="maxLength"==r?">":"<";s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),!1===e.opts.unicode?s+=" "+h+".length ":s+=" ucs2length("+h+") ",s+=" "+p+" "+a+") { ";var m=r,f=f||[];f.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var v=s;return s=f.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},23391:(e,r,t)=>{"use strict";var a=t(2862),s=t(38792),o=t(17327),i=t(43094),n=t(67614);function resolve(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return resolve.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof i)return inlineRef(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var s,o,n,l=resolveSchema.call(this,r,t);return l&&(s=l.schema,r=l.root,n=l.baseId),s instanceof i?o=s.validate||e.call(this,s.schema,r,void 0,n):void 0!==s&&(o=inlineRef(s,this._opts.inlineRefs)?s:e.call(this,s,r,void 0,n)),o}function resolveSchema(e,r){var t=a.parse(r),s=_getFullPath(t),o=getFullPath(this._getId(e.schema));if(0===Object.keys(e.schema).length||s!==o){var n=normalizeId(s),l=this._refs[n];if("string"==typeof l)return resolveRecursive.call(this,e,l,t);if(l instanceof i)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof i))return;if(l.validate||this._compile(l),n==normalizeId(r))return{schema:l,root:e,baseId:o};e=l}if(!e.schema)return;o=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,t,o,e.schema,e)}function resolveRecursive(e,r,t){var a=resolveSchema.call(this,e,r);if(a){var s=a.schema,o=a.baseId;e=a.root;var i=this._getId(s);return i&&(o=resolveUrl(o,i)),getJsonPointer.call(this,t,o,s,e)}}e.exports=resolve,resolve.normalizeId=normalizeId,resolve.fullPath=getFullPath,resolve.url=resolveUrl,resolve.ids=function resolveIds(e){var r=normalizeId(this._getId(e)),t={"":r},i={"":getFullPath(r,!1)},l={},u=this;return n(e,{allKeys:!0},(function(e,r,n,c,h,d,p){if(""!==r){var m=u._getId(e),f=t[c],v=i[c]+"/"+h;if(void 0!==p&&(v+="/"+("number"==typeof p?p:o.escapeFragment(p))),"string"==typeof m){m=f=normalizeId(f?a.resolve(f,m):m);var g=u._refs[m];if("string"==typeof g&&(g=u._refs[g]),g&&g.schema){if(!s(e,g.schema))throw new Error('id "'+m+'" resolves to more than one schema')}else if(m!=normalizeId(v))if("#"==m[0]){if(l[m]&&!s(e,l[m]))throw new Error('id "'+m+'" resolves to more than one schema');l[m]=e}else u._refs[m]=v}t[r]=f,i[r]=v}})),l},resolve.inlineRef=inlineRef,resolve.schema=resolveSchema;var l=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var s=e.fragment.split("/"),i=1;i<s.length;i++){var n=s[i];if(n){if(void 0===(t=t[n=o.unescapeFragment(n)]))break;var u;if(!l[n]&&((u=this._getId(t))&&(r=resolveUrl(r,u)),t.$ref)){var c=resolveUrl(r,t.$ref),h=resolveSchema.call(this,a,c);h&&(t=h.schema,a=h.root,r=h.baseId)}}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var u=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(e,r){return!1!==r&&(void 0===r||!0===r?checkNoRef(e):r?countKeys(e)<=r:void 0)}function checkNoRef(e){var r;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if("object"==typeof(r=e[t])&&!checkNoRef(r))return!1}else for(var a in e){if("$ref"==a)return!1;if("object"==typeof(r=e[a])&&!checkNoRef(r))return!1}return!0}function countKeys(e){var r,t=0;if(Array.isArray(e)){for(var a=0;a<e.length;a++)if("object"==typeof(r=e[a])&&(t+=countKeys(r)),t==1/0)return 1/0}else for(var s in e){if("$ref"==s)return 1/0;if(u[s])t++;else if("object"==typeof(r=e[s])&&(t+=countKeys(r)+1),t==1/0)return 1/0}return t}function getFullPath(e,r){return!1!==r&&(e=normalizeId(e)),_getFullPath(a.parse(e))}function _getFullPath(e){return a.serialize(e).split("#")[0]+"#"}var c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}function resolveUrl(e,r){return r=normalizeId(r),a.resolve(e,r)}},24998:e=>{"use strict";e.exports=function generate_items(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d="errs__"+s,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v="i"+s,g=p.dataLevel=e.dataLevel+1,y="data"+g,P=e.baseId;if(a+="var "+d+" = errors;var "+h+";",Array.isArray(i)){var b=e.schema.additionalItems;if(!1===b){a+=" "+h+" = "+c+".length <= "+i.length+"; ";var E=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+h+") { ";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var _=a;a=w.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+_+"]); ":a+=" validate.errors = ["+_+"]; return false; ":a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=E,u&&(m+="}",a+=" else { ")}var S=i;if(S)for(var x,R=-1,$=S.length-1;R<$;)if(x=S[R+=1],e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all)){a+=" "+f+" = true; if ("+c+".length > "+R+") { ";var C=c+"["+R+"]";p.schema=x,p.schemaPath=n+"["+R+"]",p.errSchemaPath=l+"/"+R,p.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers,!0),p.dataPathArr[g]=R;var F=e.validate(p);p.baseId=P,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,C)+" ":a+=" var "+y+" = "+C+"; "+F+" ",a+=" } ",u&&(a+=" if ("+f+") { ",m+="}")}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))){p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+f+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);C=c+"["+v+"]";p.dataPathArr[g]=v;F=e.validate(p);p.baseId=P,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,C)+" ":a+=" var "+y+" = "+C+"; "+F+" ",u&&(a+=" if (!"+f+") break; "),a+=" } } ",u&&(a+=" if ("+f+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);C=c+"["+v+"]";p.dataPathArr[g]=v;F=e.validate(p);p.baseId=P,e.util.varOccurences(F,y)<2?a+=" "+e.util.varReplace(F,y,C)+" ":a+=" var "+y+" = "+C+"; "+F+" ",u&&(a+=" if (!"+f+") break; "),a+=" }"}return u&&(a+=" "+m+" if ("+d+" == errors) {"),a}},28921:e=>{"use strict";e.exports=function generate__limitProperties(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;if(d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,!d&&"number"!=typeof n)throw new Error(r+" must be number");s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+h+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var p=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"fewer",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var f=s;return s=m.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},29669:e=>{"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var a=0;a<t.length;a++){e=JSON.parse(JSON.stringify(e));var s,o=t[a].split("/"),i=e;for(s=1;s<o.length;s++)i=i[o[s]];for(s=0;s<r.length;s++){var n=r[s],l=i[n];l&&(i[n]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},31887:e=>{"use strict";e.exports=function generate_custom(e,r,t){var a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],u=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,d="data"+(n||""),p="valid"+i,m="errs__"+i,f=e.opts.$data&&l&&l.$data;f?(o+=" var schema"+i+" = "+e.util.getData(l.$data,n,e.dataPathArr)+"; ",s="schema"+i):s=l;var v,g,y,P,b,E=this,w="definition"+i,_=E.definition,S="";if(f&&_.$data){b="keywordValidate"+i;var x=_.validateSchema;o+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+b+" = "+w+".validate;"}else{if(!(P=e.useCustomRule(E,l,e.schema,e)))return;s="validate.schema"+u,b=P.code,v=_.compile,g=_.inline,y=_.macro}var R=b+".errors",$="i"+i,C="ruleErr"+i,F=_.async;if(F&&!e.async)throw new Error("async keyword in sync schema");if(g||y||(o+=R+" = null;"),o+="var "+m+" = errors;var "+p+";",f&&_.$data&&(S+="}",o+=" if ("+s+" === undefined) { "+p+" = true; } else { ",x&&(S+="}",o+=" "+p+" = "+w+".validateSchema("+s+"); if ("+p+") { ")),g)_.statements?o+=" "+P.validate+" ":o+=" "+p+" = "+P.validate+"; ";else if(y){var D=e.util.copy(e);S="";D.level++;var I="valid"+D.level;D.schema=P.validate,D.schemaPath="";var O=e.compositeRule;e.compositeRule=D.compositeRule=!0;var j=e.validate(D).replace(/validate\.schema/g,b);e.compositeRule=D.compositeRule=O,o+=" "+j}else{(q=q||[]).push(o),o="",o+=" "+b+".call( ",e.opts.passContext?o+="this":o+="self",v||!1===_.schema?o+=" , "+d+" ":o+=" , "+s+" , "+d+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var A=n?"data"+(n-1||""):"parentData",k=n?e.dataPathArr[n]:"parentDataProperty",T=o+=" , "+A+" , "+k+" , rootData ) ";o=q.pop(),!1===_.errors?(o+=" "+p+" = ",F&&(o+="await "),o+=T+"; "):o+=F?" var "+(R="customErrors"+i)+" = null; try { "+p+" = await "+T+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+R+" = e.errors; else throw e; } ":" "+R+" = null; "+p+" = "+T+"; "}if(_.modifying&&(o+=" if ("+A+") "+d+" = "+A+"["+k+"];"),o+=""+S,_.valid)h&&(o+=" if (true) { ");else{var q;o+=" if ( ",void 0===_.valid?(o+=" !",o+=y?""+I:""+p):o+=" "+!_.valid+" ",o+=") { ",a=E.keyword,(q=q||[]).push(o),o="",(q=q||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var z=o;o=q.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+z+"]); ":o+=" validate.errors = ["+z+"]; return false; ":o+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var N=o;o=q.pop(),g?_.errors?"full"!=_.errors&&(o+=" for (var "+$+"="+m+"; "+$+"<errors; "+$+"++) { var "+C+" = vErrors["+$+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(o+=" "+C+".schema = "+s+"; "+C+".data = "+d+"; "),o+=" } "):!1===_.errors?o+=" "+N+" ":(o+=" if ("+m+" == errors) { "+N+" } else { for (var "+$+"="+m+"; "+$+"<errors; "+$+"++) { var "+C+" = vErrors["+$+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(o+=" "+C+".schema = "+s+"; "+C+".data = "+d+"; "),o+=" } } "):y?(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: '"+(a||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(e.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):!1===_.errors?o+=" "+N+" ":(o+=" if (Array.isArray("+R+")) { if (vErrors === null) vErrors = "+R+"; else vErrors = vErrors.concat("+R+"); errors = vErrors.length; for (var "+$+"="+m+"; "+$+"<errors; "+$+"++) { var "+C+" = vErrors["+$+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; "+C+'.schemaPath = "'+c+'"; ',e.opts.verbose&&(o+=" "+C+".schema = "+s+"; "+C+".data = "+d+"; "),o+=" } } else { "+N+" } "),o+=" } ",h&&(o+=" else { ")}return o}},33523:e=>{"use strict";e.exports=function generate_comment(e,r,t){var a=" ",s=e.schema[r],o=e.errSchemaPath+"/"+r,i=(e.opts.allErrors,e.util.toQuotedString(s));return!0===e.opts.$comment?a+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(a+=" self._opts.$comment("+i+", "+e.util.toQuotedString(o)+", validate.root.schema);"),a}},35510:(e,r,t)=>{"use strict";var a=t(23391);function MissingRefError(e,r,t){this.message=t||MissingRefError.message(e,r),this.missingRef=a.url(e,r),this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function errorSubclass(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:errorSubclass((function ValidationError(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:errorSubclass(MissingRefError)},MissingRefError.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},38792:e=>{"use strict";e.exports=function equal(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var t,a,s;if(Array.isArray(e)){if((t=e.length)!=r.length)return!1;for(a=t;0!=a--;)if(!equal(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((t=(s=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(a=t;0!=a--;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=t;0!=a--;){var o=s[a];if(!equal(e[o],r[o]))return!1}return!0}return e!=e&&r!=r}},40666:(e,r,t)=>{"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i,s=t(31887),o=t(1572);e.exports={add:function addKeyword(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!a.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var o=r.type;if(Array.isArray(o))for(var i=0;i<o.length;i++)_addRule(e,o[i],r);else _addRule(e,o,r);var n=r.metaSchema;n&&(r.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(n,!0))}function _addRule(e,r,a){for(var o,i=0;i<t.length;i++){var n=t[i];if(n.type==r){o=n;break}}o||(o={type:r,rules:[]},t.push(o));var l={keyword:e,definition:a,custom:!0,code:s,implements:a.implements};o.rules.push(l),t.custom[e]=l}return t.keywords[e]=t.all[e]=!0,this},get:function getKeyword(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},remove:function removeKeyword(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}return this},validate:function validateKeyword(e,r){validateKeyword.errors=null;var t=this._validateKeyword=this._validateKeyword||this.compile(o,!0);if(t(e))return!0;if(validateKeyword.errors=t.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(t.errors));return!1}}},43094:(e,r,t)=>{"use strict";var a=t(17327);e.exports=function SchemaObject(e){a.copy(e,this)}},46313:e=>{"use strict";e.exports=function generate_dependencies(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="errs__"+s,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,f={},v={},g=e.opts.ownProperties;for(E in i)if("__proto__"!=E){var y=i[E],P=Array.isArray(y)?v:f;P[E]=y}a+="var "+h+" = errors;";var b=e.errorPath;for(var E in a+="var missing"+s+";",v)if((P=v[E]).length){if(a+=" if ( "+c+e.util.getProperty(E)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(E)+"') "),u){a+=" && ( ";var w=P;if(w)for(var _=-1,S=w.length-1;_<S;){D=w[_+=1],_&&(a+=" || "),a+=" ( ( "+(A=c+(j=e.util.getProperty(D)))+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(D)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:j)+") ) "}a+=")) { ";var x="missing"+s,R="' + "+x+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,x,!0):b+" + "+x);var $=$||[];$.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+R+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==P.length?a+="property "+e.util.escapeQuotes(P[0]):a+="properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(E)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var C=a;a=$.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+C+"]); ":a+=" validate.errors = ["+C+"]; return false; ":a+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var F=P;if(F)for(var D,I=-1,O=F.length-1;I<O;){D=F[I+=1];var j=e.util.getProperty(D),A=(R=e.util.escapeQuotes(D),c+j);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,D,e.opts.jsonPointers)),a+=" if ( "+A+" === undefined ",g&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(D)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+R+"', depsCount: "+P.length+", deps: '"+e.util.escapeQuotes(1==P.length?P[0]:P.join(", "))+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should have ",1==P.length?a+="property "+e.util.escapeQuotes(P[0]):a+="properties "+e.util.escapeQuotes(P.join(", ")),a+=" when property "+e.util.escapeQuotes(E)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",u&&(p+="}",a+=" else { ")}e.errorPath=b;var k=d.baseId;for(var E in f){y=f[E];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(a+=" "+m+" = true; if ( "+c+e.util.getProperty(E)+" !== undefined ",g&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(E)+"') "),a+=") { ",d.schema=y,d.schemaPath=n+e.util.getProperty(E),d.errSchemaPath=l+"/"+e.util.escapeFragment(E),a+=" "+e.validate(d)+" ",d.baseId=k,a+=" } ",u&&(a+=" if ("+m+") { ",p+="}"))}return u&&(a+=" "+p+" if ("+h+" == errors) {"),a}},47963:e=>{"use strict";e.exports=function generate_ref(e,r,t){var a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(n||""),d="valid"+i;if("#"==l||"#/"==l)e.isRoot?(a=e.async,s="validate"):(a=!0===e.root.schema.$async,s="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var m=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var f=o;o=y.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+f+"]); ":o+=" validate.errors = ["+f+"]; return false; ":o+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,m);e.logger.warn(m),c&&(o+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var g="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=l,o+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",c&&(o+=" if ("+g+") { ")}else a=!0===p.$async||e.async&&!1!==p.$async,s=p.code}if(s){var y;(y=y||[]).push(o),o="",e.opts.passContext?o+=" "+s+".call(this, ":o+=" "+s+"( ",o+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var P=o+=" , "+(n?"data"+(n-1||""):"parentData")+" , "+(n?e.dataPathArr[n]:"parentDataProperty")+", rootData) ";if(o=y.pop(),a){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(o+=" var "+d+"; "),o+=" try { await "+P+"; ",c&&(o+=" "+d+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(o+=" "+d+" = false; "),o+=" } ",c&&(o+=" if ("+d+") { ")}else o+=" if (!"+P+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",c&&(o+=" else { ")}return o}},49295:e=>{"use strict";e.exports=function generate_if(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d="errs__"+s,p=e.util.copy(e);p.level++;var m="valid"+p.level,f=e.schema.then,v=e.schema.else,g=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0||!1===f:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),P=p.baseId;if(g||y){var b;p.createErrors=!1,p.schema=i,p.schemaPath=n,p.errSchemaPath=l,a+=" var "+d+" = errors; var "+h+" = true; ";var E=e.compositeRule;e.compositeRule=p.compositeRule=!0,a+=" "+e.validate(p)+" ",p.baseId=P,p.createErrors=!0,a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=E,g?(a+=" if ("+m+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(p)+" ",p.baseId=P,a+=" "+h+" = "+m+"; ",g&&y?a+=" var "+(b="ifClause"+s)+" = 'then'; ":b="'then'",a+=" } ",y&&(a+=" else { ")):a+=" if (!"+m+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(p)+" ",p.baseId=P,a+=" "+h+" = "+m+"; ",g&&y?a+=" var "+(b="ifClause"+s)+" = 'else'; ":b="'else'",a+=" } "),a+=" if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",u&&(a+=" else { ")}else u&&(a+=" if (true) { ");return a}},50539:e=>{"use strict";e.exports=function generate_oneOf(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d="errs__"+s,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v=p.baseId,g="prevValid"+s,y="passingSchemas"+s;a+="var "+d+" = errors , "+g+" = false , "+h+" = false , "+y+" = null; ";var P=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=i;if(b)for(var E,w=-1,_=b.length-1;w<_;)E=b[w+=1],(e.opts.strictKeywords?"object"==typeof E&&Object.keys(E).length>0||!1===E:e.util.schemaHasRules(E,e.RULES.all))?(p.schema=E,p.schemaPath=n+"["+w+"]",p.errSchemaPath=l+"/"+w,a+=" "+e.validate(p)+" ",p.baseId=v):a+=" var "+f+" = true; ",w&&(a+=" if ("+f+" && "+g+") { "+h+" = false; "+y+" = ["+y+", "+w+"]; } else { ",m+="}"),a+=" if ("+f+") { "+h+" = "+g+" = true; "+y+" = "+w+"; }";return e.compositeRule=p.compositeRule=P,a+=m+"if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}},50786:e=>{"use strict";e.exports=function ucs2length(e){for(var r,t=0,a=e.length,s=0;s<a;)t++,(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<a&&56320==(64512&(r=e.charCodeAt(s)))&&s++;return t}},53376:(e,r,t)=>{"use strict";var a=t(93890),s=t(17327).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"]}],r=["type","$comment"];return e.all=s(r),e.types=s(["number","integer","string","array","object","boolean","null"]),e.forEach((function(t){t.rules=t.rules.map((function(t){var s;if("object"==typeof t){var o=Object.keys(t)[0];s=t[o],t=o,s.forEach((function(t){r.push(t),e.all[t]=!0}))}return r.push(t),e.all[t]={keyword:t,code:a[t],implements:s}})),e.all.$comment={keyword:"$comment",code:a.$comment},t.type&&(e.types[t.type]=t)})),e.keywords=s(r.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},56075:e=>{"use strict";e.exports=function(e,r){r||(r={}),"function"==typeof r&&(r={cmp:r});var t,a="boolean"==typeof r.cycles&&r.cycles,s=r.cmp&&(t=r.cmp,function(e){return function(r,a){var s={key:r,value:e[r]},o={key:a,value:e[a]};return t(s,o)}}),o=[];return function stringify(e){if(e&&e.toJSON&&"function"==typeof e.toJSON&&(e=e.toJSON()),void 0!==e){if("number"==typeof e)return isFinite(e)?""+e:"null";if("object"!=typeof e)return JSON.stringify(e);var r,t;if(Array.isArray(e)){for(t="[",r=0;r<e.length;r++)r&&(t+=","),t+=stringify(e[r])||"null";return t+"]"}if(null===e)return"null";if(-1!==o.indexOf(e)){if(a)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var i=o.push(e)-1,n=Object.keys(e).sort(s&&s(e));for(t="",r=0;r<n.length;r++){var l=n[r],u=stringify(e[l]);u&&(t&&(t+=","),t+=JSON.stringify(l)+":"+u)}return o.splice(i,1),"{"+t+"}"}}(e)}},57291:(e,r,t)=>{"use strict";t.r(r),t.d(r,{Client:()=>Client});var a=t(13298);class Protocol{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(a.CancelledNotificationSchema,(e=>{const r=this._requestHandlerAbortControllers.get(e.params.requestId);null==r||r.abort(e.params.reason)})),this.setNotificationHandler(a.ProgressNotificationSchema,(e=>{this._onprogress(e)})),this.setRequestHandler(a.PingRequestSchema,(e=>({})))}_setupTimeout(e,r,t,a,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:t,resetTimeoutOnProgress:s,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const t=Date.now()-r.startTime;if(r.maxTotalTimeout&&t>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new a.McpError(a.ErrorCode.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:t});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,t,s;this._transport=e;const o=null===(r=this.transport)||void 0===r?void 0:r.onclose;this._transport.onclose=()=>{null==o||o(),this._onclose()};const i=null===(t=this.transport)||void 0===t?void 0:t.onerror;this._transport.onerror=e=>{null==i||i(e),this._onerror(e)};const n=null===(s=this._transport)||void 0===s?void 0:s.onmessage;this._transport.onmessage=(e,r)=>{null==n||n(e,r),(0,a.isJSONRPCResponse)(e)||(0,a.isJSONRPCError)(e)?this._onresponse(e):(0,a.isJSONRPCRequest)(e)?this._onrequest(e,r):(0,a.isJSONRPCNotification)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){var e;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,null===(e=this.onclose)||void 0===e||e.call(this);const t=new a.McpError(a.ErrorCode.ConnectionClosed,"Connection closed");for(const e of r.values())e(t)}_onerror(e){var r;null===(r=this.onerror)||void 0===r||r.call(this,e)}_onnotification(e){var r;const t=null!==(r=this._notificationHandlers.get(e.method))&&void 0!==r?r:this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then((()=>t(e))).catch((e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`))))}_onrequest(e,r){var t,s,o,i;const n=null!==(t=this._requestHandlers.get(e.method))&&void 0!==t?t:this.fallbackRequestHandler;if(void 0===n)return void(null===(s=this._transport)||void 0===s||s.send({jsonrpc:"2.0",id:e.id,error:{code:a.ErrorCode.MethodNotFound,message:"Method not found"}}).catch((e=>this._onerror(new Error(`Failed to send an error response: ${e}`)))));const l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);const u={signal:l.signal,sessionId:null===(o=this._transport)||void 0===o?void 0:o.sessionId,_meta:null===(i=e.params)||void 0===i?void 0:i._meta,sendNotification:r=>this.notification(r,{relatedRequestId:e.id}),sendRequest:(r,t,a)=>this.request(r,t,{...a,relatedRequestId:e.id}),authInfo:null==r?void 0:r.authInfo,requestId:e.id,requestInfo:null==r?void 0:r.requestInfo};Promise.resolve().then((()=>n(e,u))).then((r=>{var t;if(!l.signal.aborted)return null===(t=this._transport)||void 0===t?void 0:t.send({result:r,jsonrpc:"2.0",id:e.id})}),(r=>{var t,s;if(!l.signal.aborted)return null===(t=this._transport)||void 0===t?void 0:t.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(r.code)?r.code:a.ErrorCode.InternalError,message:null!==(s=r.message)&&void 0!==s?s:"Internal error"}})})).catch((e=>this._onerror(new Error(`Failed to send response: ${e}`)))).finally((()=>{this._requestHandlerAbortControllers.delete(e.id)}))}_onprogress(e){const{progressToken:r,...t}=e.params,a=Number(r),s=this._progressHandlers.get(a);if(!s)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const o=this._responseHandlers.get(a),i=this._timeoutInfo.get(a);if(i&&o&&i.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(e){return void o(e)}s(t)}_onresponse(e){const r=Number(e.id),t=this._responseHandlers.get(r);if(void 0!==t)if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),(0,a.isJSONRPCResponse)(e))t(e);else{t(new a.McpError(e.error.code,e.error.message,e.error.data))}else this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`))}get transport(){return this._transport}async close(){var e;await(null===(e=this._transport)||void 0===e?void 0:e.close())}request(e,r,t){const{relatedRequestId:s,resumptionToken:o,onresumptiontoken:i}=null!=t?t:{};return new Promise(((n,l)=>{var u,c,h,d,p,m;if(!this._transport)return void l(new Error("Not connected"));!0===(null===(u=this._options)||void 0===u?void 0:u.enforceStrictCapabilities)&&this.assertCapabilityForMethod(e.method),null===(c=null==t?void 0:t.signal)||void 0===c||c.throwIfAborted();const f=this._requestMessageId++,v={...e,jsonrpc:"2.0",id:f};(null==t?void 0:t.onprogress)&&(this._progressHandlers.set(f,t.onprogress),v.params={...e.params,_meta:{...(null===(h=e.params)||void 0===h?void 0:h._meta)||{},progressToken:f}});const cancel=e=>{var r;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),null===(r=this._transport)||void 0===r||r.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(e)}},{relatedRequestId:s,resumptionToken:o,onresumptiontoken:i}).catch((e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)))),l(e)};this._responseHandlers.set(f,(e=>{var a;if(!(null===(a=null==t?void 0:t.signal)||void 0===a?void 0:a.aborted)){if(e instanceof Error)return l(e);try{const t=r.parse(e.result);n(t)}catch(e){l(e)}}})),null===(d=null==t?void 0:t.signal)||void 0===d||d.addEventListener("abort",(()=>{var e;cancel(null===(e=null==t?void 0:t.signal)||void 0===e?void 0:e.reason)}));const g=null!==(p=null==t?void 0:t.timeout)&&void 0!==p?p:6e4;this._setupTimeout(f,g,null==t?void 0:t.maxTotalTimeout,(()=>cancel(new a.McpError(a.ErrorCode.RequestTimeout,"Request timed out",{timeout:g}))),null!==(m=null==t?void 0:t.resetTimeoutOnProgress)&&void 0!==m&&m),this._transport.send(v,{relatedRequestId:s,resumptionToken:o,onresumptiontoken:i}).catch((e=>{this._cleanupTimeout(f),l(e)}))}))}async notification(e,r){var t,a;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);if((null!==(a=null===(t=this._options)||void 0===t?void 0:t.debouncedNotificationMethods)&&void 0!==a?a:[]).includes(e.method)&&!e.params&&!(null==r?void 0:r.relatedRequestId)){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then((()=>{var t;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const a={...e,jsonrpc:"2.0"};null===(t=this._transport)||void 0===t||t.send(a,r).catch((e=>this._onerror(e)))}))}const s={...e,jsonrpc:"2.0"};await this._transport.send(s,r)}setRequestHandler(e,r){const t=e.shape.method.value;this.assertRequestHandlerCapability(t),this._requestHandlers.set(t,((t,a)=>Promise.resolve(r(e.parse(t),a))))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,(t=>Promise.resolve(r(e.parse(t)))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}var s=t(82174);class Client extends Protocol{constructor(e,r){var t;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=null!==(t=null==r?void 0:r.capabilities)&&void 0!==t?t:{},this._ajv=new s}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=function mergeCapabilities(e,r){return Object.entries(r).reduce(((e,[r,t])=>(e[r]=t&&"object"==typeof t&&e[r]?{...e[r],...t}:t,e)),{...e})}(this._capabilities,e)}assertCapability(e,r){var t;if(!(null===(t=this._serverCapabilities)||void 0===t?void 0:t[e]))throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),void 0===e.sessionId)try{const t=await this.request({method:"initialize",params:{protocolVersion:a.LATEST_PROTOCOL_VERSION,capabilities:this._capabilities,clientInfo:this._clientInfo}},a.InitializeResultSchema,r);if(void 0===t)throw new Error(`Server sent invalid initialize result: ${t}`);if(!a.SUPPORTED_PROTOCOL_VERSIONS.includes(t.protocolVersion))throw new Error(`Server's protocol version is not supported: ${t.protocolVersion}`);this._serverCapabilities=t.capabilities,this._serverVersion=t.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(t.protocolVersion),this._instructions=t.instructions,await this.notification({method:"notifications/initialized"})}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,t,a,s,o;switch(e){case"logging/setLevel":if(!(null===(r=this._serverCapabilities)||void 0===r?void 0:r.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(null===(t=this._serverCapabilities)||void 0===t?void 0:t.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(null===(a=this._serverCapabilities)||void 0===a?void 0:a.resources))throw new Error(`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(null===(s=this._serverCapabilities)||void 0===s?void 0:s.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(null===(o=this._serverCapabilities)||void 0===o?void 0:o.completions))throw new Error(`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){var r;if("notifications/roots/list_changed"===e)if(!(null===(r=this._capabilities.roots)||void 0===r?void 0:r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},a.EmptyResultSchema,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},a.CompleteResultSchema,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},a.EmptyResultSchema,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},a.GetPromptResultSchema,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},a.ListPromptsResultSchema,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},a.ListResourcesResultSchema,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},a.ListResourceTemplatesResultSchema,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},a.ReadResourceResultSchema,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},a.EmptyResultSchema,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},a.EmptyResultSchema,r)}async callTool(e,r=a.CallToolResultSchema,t){const s=await this.request({method:"tools/call",params:e},r,t),o=this.getToolOutputValidator(e.name);if(o){if(!s.structuredContent&&!s.isError)throw new a.McpError(a.ErrorCode.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(s.structuredContent)try{if(!o(s.structuredContent))throw new a.McpError(a.ErrorCode.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(o.errors)}`)}catch(e){if(e instanceof a.McpError)throw e;throw new a.McpError(a.ErrorCode.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return s}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(const r of e)if(r.outputSchema)try{const e=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,e)}catch(e){}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){const t=await this.request({method:"tools/list",params:e},a.ListToolsResultSchema,r);return this.cacheToolOutputSchemas(t.tools),t}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}},58155:(e,r,t)=>{"use strict";var a=t(17327),s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,n=/^(?=.{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,l=/^(?:[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,u=/^(?:(?:[^\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,c=/^(?:(?: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,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,m=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function formats(e){return e="full"==e?"full":"fast",a.copy(formats[e])}function date(e){var r=e.match(s);if(!r)return!1;var t=+r[1],a=+r[2],i=+r[3];return a>=1&&a<=12&&i>=1&&i<=(2==a&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(t)?29:o[a])}function time(e,r){var t=e.match(i);if(!t)return!1;var a=t[1],s=t[2],o=t[3],n=t[5];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||n)}e.exports=formats,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)(?:\.\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":u,url:c,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:n,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,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":m},formats.full={date,time,"date-time":function date_time(e){var r=e.split(f);return 2==r.length&&date(r[0])&&time(r[1],!0)},uri:function uri(e){return v.test(e)&&l.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":u,url:c,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:n,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,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":m};var f=/t|\s/i;var v=/\/|:/;var g=/[^\\]\\Z/;function regex(e){if(g.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},61351:e=>{"use strict";e.exports=function generate__limit(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var p="maximum"==r,m=p?"exclusiveMaximum":"exclusiveMinimum",f=e.schema[m],v=e.opts.$data&&f&&f.$data,g=p?"<":">",y=p?">":"<",P=void 0;if(!d&&"number"!=typeof n&&void 0!==n)throw new Error(r+" must be number");if(!v&&void 0!==f&&"number"!=typeof f&&"boolean"!=typeof f)throw new Error(m+" must be number or boolean");if(v){var b=e.util.getData(f.$data,i,e.dataPathArr),E="exclusive"+o,w="exclType"+o,_="exclIsNumber"+o,S="' + "+($="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+b+"; ",s+=" var "+E+"; var "+w+" = typeof "+(b="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";var x;P=m;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var R=s;s=x.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+R+"]); ":s+=" validate.errors = ["+R+"]; return false; ":s+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+b+" "+g+"= "+a+") ? "+h+" "+y+"= "+b+" : "+h+" "+y+" "+a+" ) : ( ("+E+" = "+b+" === true) ? "+h+" "+y+"= "+a+" : "+h+" "+y+" "+a+" ) || "+h+" !== "+h+") { var op"+o+" = "+E+" ? '"+g+"' : '"+g+"='; ",void 0===n&&(P=m,u=e.errSchemaPath+"/"+m,a=b,d=v)}else{S=g;if((_="number"==typeof f)&&d){var $="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+f+" "+g+"= "+a+" ? "+h+" "+y+"= "+f+" : "+h+" "+y+" "+a+" ) || "+h+" !== "+h+") { "}else{_&&void 0===n?(E=!0,P=m,u=e.errSchemaPath+"/"+m,a=f,y+="="):(_&&(a=Math[p?"min":"max"](f,n)),f===(!_||a)?(E=!0,P=m,u=e.errSchemaPath+"/"+m,y+="="):(E=!1,S+="="));$="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+h+" "+y+" "+a+" || "+h+" !== "+h+") { "}}P=P||r,(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+$+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";R=s;return s=x.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+R+"]); ":s+=" validate.errors = ["+R+"]; return false; ":s+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",c&&(s+=" else { "),s}},67614:e=>{"use strict";var r=e.exports=function(e,r,t){"function"==typeof r&&(t=r,r={}),_traverse(r,"function"==typeof(t=r.cb||t)?t:t.pre||function(){},t.post||function(){},e,"",e)};function _traverse(e,t,a,s,o,i,n,l,u,c){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var h in t(s,o,i,n,l,u,c),s){var d=s[h];if(Array.isArray(d)){if(h in r.arrayKeywords)for(var p=0;p<d.length;p++)_traverse(e,t,a,d[p],o+"/"+h+"/"+p,i,o,h,s,p)}else if(h in r.propsKeywords){if(d&&"object"==typeof d)for(var m in d)_traverse(e,t,a,d[m],o+"/"+h+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),i,o,h,s,m)}else(h in r.keywords||e.allKeys&&!(h in r.skipKeywords))&&_traverse(e,t,a,d,o+"/"+h,i,o,h,s)}a(s,o,i,n,l,u,c)}}r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},67814:e=>{"use strict";e.exports=function generate_const(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; "),d||(a+=" var schema"+s+" = validate.schema"+n+";"),a+="var "+h+" = equal("+c+", schema"+s+"); if (!"+h+") { ";var p=p||[];p.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+s+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var m=a;return a=p.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a}},71449:e=>{"use strict";e.exports=function generate_propertyNames(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(a+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var m="key"+s,f="idx"+s,v="i"+s,g="' + "+m+" + '",y="data"+(d.dataLevel=e.dataLevel+1),P="dataProperties"+s,b=e.opts.ownProperties,E=e.baseId;b&&(a+=" var "+P+" = undefined; "),a+=b?" "+P+" = "+P+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+P+".length; "+f+"++) { var "+m+" = "+P+"["+f+"]; ":" for (var "+m+" in "+c+") { ",a+=" var startErrs"+s+" = errors; ";var w=m,_=e.compositeRule;e.compositeRule=d.compositeRule=!0;var S=e.validate(d);d.baseId=E,e.util.varOccurences(S,y)<2?a+=" "+e.util.varReplace(S,y,w)+" ":a+=" var "+y+" = "+w+"; "+S+" ",e.compositeRule=d.compositeRule=_,a+=" if (!"+p+") { for (var "+v+"=startErrs"+s+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",!1!==e.createErrors?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+g+"' } ",!1!==e.opts.messages&&(a+=" , message: 'property name \\'"+g+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),u&&(a+=" break; "),a+=" } }"}return u&&(a+=" if ("+h+" == errors) {"),a}},81997:e=>{"use strict";e.exports=function generate_enum(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var p="i"+s,m="schema"+s;d||(a+=" var "+m+" = validate.schema"+n+";"),a+="var "+h+";",d&&(a+=" if (schema"+s+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+s+")) "+h+" = false; else {"),a+=h+" = false;for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) if (equal("+c+", "+m+"["+p+"])) { "+h+" = true; break; }",d&&(a+=" } "),a+=" if (!"+h+") { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+s+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var v=a;return a=f.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",u&&(a+=" else { "),a}},82174:(e,r,t)=>{"use strict";var a=t(90351),s=t(23391),o=t(93983),i=t(43094),n=t(56075),l=t(58155),u=t(53376),c=t(29669),h=t(17327);e.exports=Ajv,Ajv.prototype.validate=function validate(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);!0!==t.$async&&(this.errors=t.errors);return s},Ajv.prototype.compile=function compile(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},Ajv.prototype.addSchema=function addSchema(e,r,t,a){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,t,a);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return checkUnique(this,r=s.normalizeId(r||i)),this._schemas[r]=this._addSchema(e,t,a,!0),this},Ajv.prototype.addMetaSchema=function addMetaSchema(e,r,t){return this.addSchema(e,r,t,!0),this},Ajv.prototype.validateSchema=function validateSchema(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function defaultMeta(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(m)?m:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(t,e);if(!a&&r){var s="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(s);this.logger.error(s)}return a},Ajv.prototype.getSchema=function getSchema(e){var r=_getSchemaObj(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function _getSchemaFragment(e,r){var t=s.schema.call(e,{schema:{}},r);if(t){var o=t.schema,n=t.root,l=t.baseId,u=a.call(e,o,n,void 0,l);return e._fragments[r]=new i({ref:r,fragment:!0,schema:o,root:n,baseId:l,validate:u}),u}}(this,e)}},Ajv.prototype.removeSchema=function removeSchema(e){if(e instanceof RegExp)return _removeAllSchemas(this,this._schemas,e),_removeAllSchemas(this,this._refs,e),this;switch(typeof e){case"undefined":return _removeAllSchemas(this,this._schemas),_removeAllSchemas(this,this._refs),this._cache.clear(),this;case"string":var r=_getSchemaObj(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var o=this._getId(e);o&&(o=s.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this},Ajv.prototype.addFormat=function addFormat(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},Ajv.prototype.errorsText=function errorsText(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o<e.length;o++){var i=e[o];i&&(s+=a+i.dataPath+" "+i.message+t)}return s.slice(0,-t.length)},Ajv.prototype._addSchema=function _addSchema(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,n=o?o(e):e,l=this._cache.get(n);if(l)return l;a=a||!1!==this._opts.addUsedSchema;var u=s.normalizeId(this._getId(e));u&&a&&checkUnique(this,u);var c,h=!1!==this._opts.validateSchema&&!r;h&&!(c=u&&u==s.normalizeId(e.$schema))&&this.validateSchema(e,!0);var d=s.ids.call(this,e),p=new i({id:u,schema:e,localRefs:d,cacheKey:n,meta:t});"#"!=u[0]&&a&&(this._refs[u]=p);this._cache.put(n,p),h&&c&&this.validateSchema(e,!0);return p},Ajv.prototype._compile=function _compile(e,r){if(e.compiling)return e.validate=callValidate,callValidate.schema=e.schema,callValidate.errors=null,callValidate.root=r||callValidate,!0===e.schema.$async&&(callValidate.$async=!0),callValidate;var t,s;e.compiling=!0,e.meta&&(t=this._opts,this._opts=this._metaOpts);try{s=a.call(this,e.schema,r,e.localRefs)}catch(r){throw delete e.validate,r}finally{e.compiling=!1,e.meta&&(this._opts=t)}return e.validate=s,e.refs=s.refs,e.refVal=s.refVal,e.root=s.root,s;function callValidate(){var r=e.validate,t=r.apply(this,arguments);return callValidate.errors=r.errors,t}},Ajv.prototype.compileAsync=t(89495);var d=t(40666);Ajv.prototype.addKeyword=d.add,Ajv.prototype.getKeyword=d.get,Ajv.prototype.removeKeyword=d.remove,Ajv.prototype.validateKeyword=d.validate;var p=t(35510);Ajv.ValidationError=p.Validation,Ajv.MissingRefError=p.MissingRef,Ajv.$dataMetaSchema=c;var m="http://json-schema.org/draft-07/schema",f=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],v=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=h.copy(e)||{},function setLogger(e){var r=e._opts.logger;if(!1===r)e.logger={log:noop,warn:noop,error:noop};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=l(e.format),this._cache=e.cache||new o,this._loadingSchemas={},this._compilations=[],this.RULES=u(),this._getId=function chooseGetId(e){switch(e.schemaId){case"auto":return _get$IdOrId;case"id":return _getId;default:return _get$Id}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=n),this._metaOpts=function getMetaSchemaOptions(e){for(var r=h.copy(e._opts),t=0;t<f.length;t++)delete r[f[t]];return r}(this),e.formats&&function addInitialFormats(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),e.keywords&&function addInitialKeywords(e){for(var r in e._opts.keywords){var t=e._opts.keywords[r];e.addKeyword(r,t)}}(this),function addDefaultMetaSchema(e){var r;e._opts.$data&&(r=t(8633),e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var a=t(2707);e._opts.$data&&(a=c(a,v));e.addMetaSchema(a,m,!0),e._refs["http://json-schema.org/schema"]=m}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function addInitialSchemas(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function _getSchemaObj(e,r){return r=s.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function _removeAllSchemas(e,r,t){for(var a in r){var s=r[a];s.meta||t&&!t.test(a)||(e._cache.del(s.cacheKey),delete r[a])}}function _getId(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function _get$Id(e){return e.id&&this.logger.warn("schema id ignored",e.id),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 checkUnique(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function noop(){}},82945:e=>{"use strict";e.exports=function generate_anyOf(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d="errs__"+s,p=e.util.copy(e),m="";p.level++;var f="valid"+p.level,v=i.every((function(r){return e.opts.strictKeywords?"object"==typeof r&&Object.keys(r).length>0||!1===r:e.util.schemaHasRules(r,e.RULES.all)}));if(v){var g=p.baseId;a+=" var "+d+" = errors; var "+h+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var P=i;if(P)for(var b,E=-1,w=P.length-1;E<w;)b=P[E+=1],p.schema=b,p.schemaPath=n+"["+E+"]",p.errSchemaPath=l+"/"+E,a+=" "+e.validate(p)+" ",p.baseId=g,a+=" "+h+" = "+h+" || "+f+"; if (!"+h+") { ",m+="}";e.compositeRule=p.compositeRule=y,a+=" "+m+" if (!"+h+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else u&&(a+=" if (true) { ");return a}},85673:e=>{"use strict";e.exports=function generate_required(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="valid"+s,d=e.opts.$data&&i&&i.$data;d&&(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ");var p="schema"+s;if(!d)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],f=i;if(f)for(var v,g=-1,y=f.length-1;g<y;){v=f[g+=1];var P=e.schema.properties[v];P&&(e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all))||(m[m.length]=v)}}else m=i;if(d||m.length){var b=e.errorPath,E=d||m.length>=e.opts.loopRequired,w=e.opts.ownProperties;if(u)if(a+=" var missing"+s+"; ",E){d||(a+=" var "+p+" = validate.schema"+n+"; ");var _="' + "+(F="schema"+s+"["+(R="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,F,e.opts.jsonPointers)),a+=" var "+h+" = true; ",d&&(a+=" if (schema"+s+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+s+")) "+h+" = false; else {"),a+=" for (var "+R+" = 0; "+R+" < "+p+".length; "+R+"++) { "+h+" = "+c+"["+p+"["+R+"]] !== undefined ",w&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+R+"]) "),a+="; if (!"+h+") break; } ",d&&(a+=" } "),a+=" if (!"+h+") { ",(C=C||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+_+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=C.pop(),!e.compositeRule&&u?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 { "}else{a+=" if ( ";var x=m;if(x)for(var R=-1,$=x.length-1;R<$;){I=x[R+=1],R&&(a+=" || "),a+=" ( ( "+(k=c+(A=e.util.getProperty(I)))+" === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?I:A)+") ) "}a+=") { ";var C;_="' + "+(F="missing"+s)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,F,!0):b+" + "+F),(C=C||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+_+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";S=a;a=C.pop(),!e.compositeRule&&u?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 { "}else if(E){d||(a+=" var "+p+" = validate.schema"+n+"; ");var F;_="' + "+(F="schema"+s+"["+(R="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,F,e.opts.jsonPointers)),d&&(a+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+_+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),a+=" for (var "+R+" = 0; "+R+" < "+p+".length; "+R+"++) { if ("+c+"["+p+"["+R+"]] === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+p+"["+R+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+_+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(a+=" } ")}else{var D=m;if(D)for(var I,O=-1,j=D.length-1;O<j;){I=D[O+=1];var A=e.util.getProperty(I),k=(_=e.util.escapeQuotes(I),c+A);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,I,e.opts.jsonPointers)),a+=" if ( "+k+" === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+_+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=b}else u&&(a+=" if (true) {");return a}},88598:e=>{"use strict";e.exports=function generate_validate(e,r,t){var a="",s=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var n=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(n){var l="unknown keyword: "+n;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){r="false schema";var u=e.level,c=e.dataLevel,h=e.schema[r],d=e.schemaPath+e.util.getProperty(r),p=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,f="data"+(c||""),v="valid"+u;if(!1===e.schema){e.isTop?m=!0:a+=" var "+v+" = false; ",(G=G||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var g=a;a=G.pop(),!e.compositeRule&&m?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++; "}else e.isTop?a+=s?" return data; ":" validate.errors = null; return true; ":a+=" var "+v+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,f="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var P="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(P);e.logger.warn(P)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{u=e.level,f="data"+((c=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+u+" = errors;"}v="valid"+u,m=!e.opts.allErrors;var b="",E="",w=e.schema.type,_=Array.isArray(w);if(w&&e.opts.nullable&&!0===e.schema.nullable&&(_?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],_=!0)),_&&1==w.length&&(w=w[0],_=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),w){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,w);var x=e.RULES.types[w];if(S||_||!0===x||x&&!$shouldUseGroup(x)){d=e.schemaPath+".type",p=e.errSchemaPath+"/type",d=e.schemaPath+".type",p=e.errSchemaPath+"/type";var R=_?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[R](w,f,e.opts.strictNumbers,!0)+") { ",S){var $="dataType"+u,C="coerced"+u;a+=" var "+$+" = typeof "+f+"; var "+C+" = undefined; ","array"==e.opts.coerceTypes&&(a+=" if ("+$+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+$+" = typeof "+f+"; if ("+e.util.checkDataType(e.schema.type,f,e.opts.strictNumbers)+") "+C+" = "+f+"; } "),a+=" if ("+C+" !== undefined) ; ";var F=S;if(F)for(var D,I=-1,O=F.length-1;I<O;)"string"==(D=F[I+=1])?a+=" else if ("+$+" == 'number' || "+$+" == 'boolean') "+C+" = '' + "+f+"; else if ("+f+" === null) "+C+" = ''; ":"number"==D||"integer"==D?(a+=" else if ("+$+" == 'boolean' || "+f+" === null || ("+$+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==D&&(a+=" && !("+f+" % 1)"),a+=")) "+C+" = +"+f+"; "):"boolean"==D?a+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+C+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+C+" = true; ":"null"==D?a+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+C+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(a+=" else if ("+$+" == 'string' || "+$+" == 'number' || "+$+" == 'boolean' || "+f+" == null) "+C+" = ["+f+"]; ");a+=" else { ",(G=G||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=_?""+w.join(","):""+w,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=_?""+w.join(","):""+w,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=G.pop(),!e.compositeRule&&m?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+=" } if ("+C+" !== undefined) { ";var j=c?"data"+(c-1||""):"parentData";a+=" "+f+" = "+C+"; ",c||(a+="if ("+j+" !== undefined)"),a+=" "+j+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+C+"; } "}else{(G=G||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=_?""+w.join(","):""+w,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=_?""+w.join(","):""+w,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=G.pop(),!e.compositeRule&&m?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+=" } "}}if(e.schema.$ref&&!o)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",m&&(a+=" } if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",E+="}");else{var A=e.RULES;if(A)for(var k=-1,T=A.length-1;k<T;)if($shouldUseGroup(x=A[k+=1])){if(x.type&&(a+=" if ("+e.util.checkDataType(x.type,f,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==x.type&&e.schema.properties){h=e.schema.properties;var q=Object.keys(h);if(q)for(var z,N=-1,L=q.length-1;N<L;){if(void 0!==(H=h[z=q[N+=1]]).default){var V=f+e.util.getProperty(z);if(e.compositeRule){if(e.opts.strictDefaults){P="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(P);e.logger.warn(P)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(H.default)+" ":a+=" "+JSON.stringify(H.default)+" ",a+="; "}}}else if("array"==x.type&&Array.isArray(e.schema.items)){var U=e.schema.items;if(U){I=-1;for(var H,Q=U.length-1;I<Q;)if(void 0!==(H=U[I+=1]).default){V=f+"["+I+"]";if(e.compositeRule){if(e.opts.strictDefaults){P="default is ignored for: "+V;if("log"!==e.opts.strictDefaults)throw new Error(P);e.logger.warn(P)}}else a+=" if ("+V+" === undefined ","empty"==e.opts.useDefaults&&(a+=" || "+V+" === null || "+V+" === '' "),a+=" ) "+V+" = ","shared"==e.opts.useDefaults?a+=" "+e.useDefault(H.default)+" ":a+=" "+JSON.stringify(H.default)+" ",a+="; "}}}var M=x.rules;if(M)for(var K,J=-1,B=M.length-1;J<B;)if($shouldUseRule(K=M[J+=1])){var Z=K.code(e,K.keyword,x.type);Z&&(a+=" "+Z+" ",m&&(b+="}"))}if(m&&(a+=" "+b+" ",b=""),x.type&&(a+=" } ",w&&w===x.type&&!S)){a+=" else { ";var G;d=e.schemaPath+".type",p=e.errSchemaPath+"/type";(G=G||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",a+=_?""+w.join(","):""+w,a+="' } ",!1!==e.opts.messages&&(a+=" , message: 'should be ",a+=_?""+w.join(","):""+w,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";g=a;a=G.pop(),!e.compositeRule&&m?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+=" } "}m&&(a+=" if (errors === ",a+=y?"0":"errs_"+u,a+=") { ",E+="}")}}function $shouldUseGroup(e){for(var r=e.rules,t=0;t<r.length;t++)if($shouldUseRule(r[t]))return!0}function $shouldUseRule(r){return void 0!==e.schema[r.keyword]||r.implements&&function $ruleImplementsSomeKeyword(r){for(var t=r.implements,a=0;a<t.length;a++)if(void 0!==e.schema[t[a]])return!0}(r)}return m&&(a+=" "+E+" "),y?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+v+" = errors === errs_"+u+";",a}},89495:(e,r,t)=>{"use strict";var a=t(35510).MissingRef;e.exports=function compileAsync(e,r,t){var s=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(t=r,r=void 0);var o=loadMetaSchemaOf(e).then((function(){var t=s._addSchema(e,void 0,r);return t.validate||_compileAsync(t)}));t&&o.then((function(e){t(null,e)}),t);return o;function loadMetaSchemaOf(e){var r=e.$schema;return r&&!s.getSchema(r)?compileAsync.call(s,{$ref:r},!0):Promise.resolve()}function _compileAsync(e){try{return s._compile(e)}catch(t){if(t instanceof a)return function loadMissingSchema(t){var a=t.missingSchema;if(added(a))throw new Error("Schema "+a+" is loaded but "+t.missingRef+" cannot be resolved");var o=s._loadingSchemas[a];o||(o=s._loadingSchemas[a]=s._opts.loadSchema(a)).then(removePromise,removePromise);return o.then((function(e){if(!added(a))return loadMetaSchemaOf(e).then((function(){added(a)||s.addSchema(e,a,void 0,r)}))})).then((function(){return _compileAsync(e)}));function removePromise(){delete s._loadingSchemas[a]}function added(e){return s._refs[e]||s._schemas[e]}}(t);throw t}}}},90351:(e,r,t)=>{"use strict";var a=t(23391),s=t(17327),o=t(35510),i=t(56075),n=t(88598),l=s.ucs2length,u=t(38792),c=o.Validation;function checkCompiling(e,r,t){var a=compIndex.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function endCompiling(e,r,t){var a=compIndex.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function compIndex(e,r,t){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==r&&s.baseId==t)return a}return-1}function patternCode(e,r){return"var pattern"+e+" = new RegExp("+s.toQuotedString(r[e])+");"}function defaultCode(e){return"var default"+e+" = defaults["+e+"];"}function refValCode(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function customRuleCode(e){return"var customRule"+e+" = customRules["+e+"];"}function vars(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}e.exports=function compile(e,r,t,h){var d=this,p=this._opts,m=[void 0],f={},v=[],g={},y=[],P={},b=[];r=r||{schema:e,refVal:m,refs:f};var E=checkCompiling.call(this,e,r,h),w=this._compilations[E.index];if(E.compiling)return w.callValidate=function callValidate(){var e=w.validate,r=e.apply(this,arguments);return callValidate.errors=e.errors,r};var _=this._formats,S=this.RULES;try{var x=localCompile(e,r,t,h);w.validate=x;var R=w.callValidate;return R&&(R.schema=x.schema,R.errors=null,R.refs=x.refs,R.refVal=x.refVal,R.root=x.root,R.$async=x.$async,p.sourceCode&&(R.source=x.source)),x}finally{endCompiling.call(this,e,r,h)}function localCompile(e,t,i,h){var g=!t||t&&t.schema==e;if(t.schema!=r.schema)return compile.call(d,e,t,i,h);var P,E=!0===e.$async,w=n({isTop:!0,schema:e,isRoot:g,baseId:h,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:S,validate:n,util:s,resolve:a,resolveRef,usePattern,useDefault,useCustomRule,opts:p,formats:_,logger:d.logger,self:d});w=vars(m,refValCode)+vars(v,patternCode)+vars(y,defaultCode)+vars(b,customRuleCode)+w,p.processCode&&(w=p.processCode(w,e));try{P=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",w)(d,S,_,r,m,y,b,u,l,c),m[0]=P}catch(e){throw d.logger.error("Error compiling schema, function code:",w),e}return P.schema=e,P.errors=null,P.refs=f,P.refVal=m,P.root=g?P:t,E&&(P.$async=!0),!0===p.sourceCode&&(P.source={code:w,patterns:v,defaults:y}),P}function resolveRef(e,s,o){s=a.url(e,s);var i,n,l=f[s];if(void 0!==l)return resolvedRef(i=m[l],n="refVal["+l+"]");if(!o&&r.refs){var u=r.refs[s];if(void 0!==u)return resolvedRef(i=r.refVal[u],n=addLocalRef(s,i))}n=addLocalRef(s);var c=a.call(d,localCompile,r,s);if(void 0===c){var h=t&&t[s];h&&(c=a.inlineRef(h,p.inlineRefs)?h:compile.call(d,h,r,t,e))}if(void 0!==c)return function replaceLocalRef(e,r){var t=f[e];m[t]=r}(s,c),resolvedRef(c,n);!function removeLocalRef(e){delete f[e]}(s)}function addLocalRef(e,r){var t=m.length;return m[t]=r,f[e]=t,"refVal"+t}function resolvedRef(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function usePattern(e){var r=g[e];return void 0===r&&(r=g[e]=v.length,v[r]=e),"pattern"+r}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return s.toQuotedString(e);case"object":if(null===e)return"null";var r=i(e),t=P[r];return void 0===t&&(t=P[r]=y.length,y[t]=e),"default"+t}}function useCustomRule(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,u=e.definition.inline,c=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(c)n=c.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(u)n=u.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=b.length;return b[h]=n,{code:"customRule"+h,validate:n}}}},93890:(e,r,t)=>{"use strict";e.exports={$ref:t(47963),allOf:t(7916),anyOf:t(82945),$comment:t(33523),const:t(67814),contains:t(10877),dependencies:t(46313),enum:t(81997),format:t(4243),if:t(49295),items:t(24998),maximum:t(61351),minimum:t(61351),maxItems:t(18354),minItems:t(18354),maxLength:t(22204),minLength:t(22204),maxProperties:t(28921),minProperties:t(28921),multipleOf:t(10613),not:t(99387),oneOf:t(50539),pattern:t(99224),properties:t(95709),propertyNames:t(71449),required:t(85673),uniqueItems:t(21131),validate:t(88598)}},93983:e=>{"use strict";var r=e.exports=function Cache(){this._cache={}};r.prototype.put=function Cache_put(e,r){this._cache[e]=r},r.prototype.get=function Cache_get(e){return this._cache[e]},r.prototype.del=function Cache_del(e){delete this._cache[e]},r.prototype.clear=function Cache_clear(){this._cache={}}},95709:e=>{"use strict";e.exports=function generate_properties(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="errs__"+s,d=e.util.copy(e),p="";d.level++;var m="valid"+d.level,f="key"+s,v="idx"+s,g=d.dataLevel=e.dataLevel+1,y="data"+g,P="dataProperties"+s,b=Object.keys(i||{}).filter(notProto),E=e.schema.patternProperties||{},w=Object.keys(E).filter(notProto),_=e.schema.additionalProperties,S=b.length||w.length,x=!1===_,R="object"==typeof _&&Object.keys(_).length,$=e.opts.removeAdditional,C=x||R||$,F=e.opts.ownProperties,D=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length<e.opts.loopRequired)var O=e.util.toHash(I);function notProto(e){return"__proto__"!==e}if(a+="var "+h+" = errors;var "+m+" = true;",F&&(a+=" var "+P+" = undefined;"),C){if(a+=F?" "+P+" = "+P+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+P+".length; "+v+"++) { var "+f+" = "+P+"["+v+"]; ":" for (var "+f+" in "+c+") { ",S){if(a+=" var isAdditional"+s+" = !(false ",b.length)if(b.length>8)a+=" || validate.schema"+n+".hasOwnProperty("+f+") ";else{var j=b;if(j)for(var A=-1,k=j.length-1;A<k;)B=j[A+=1],a+=" || "+f+" == "+e.util.toQuotedString(B)+" "}if(w.length){var T=w;if(T)for(var q=-1,z=T.length-1;q<z;)se=T[q+=1],a+=" || "+e.usePattern(se)+".test("+f+") "}a+=" ); if (isAdditional"+s+") { "}if("all"==$)a+=" delete "+c+"["+f+"]; ";else{var N=e.errorPath,L="' + "+f+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x)if($)a+=" delete "+c+"["+f+"]; ";else{a+=" "+m+" = false; ";var V=l;l=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+L+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var U=a;a=re.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=V,u&&(a+=" break; ")}else if(R)if("failing"==$){a+=" var "+h+" = errors; ";var H=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.schema=_,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);var Q=c+"["+f+"]";d.dataPathArr[g]=f;var M=e.validate(d);d.baseId=D,e.util.varOccurences(M,y)<2?a+=" "+e.util.varReplace(M,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+M+" ",a+=" if (!"+m+") { errors = "+h+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+f+"]; } ",e.compositeRule=d.compositeRule=H}else{d.schema=_,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";d.dataPathArr[g]=f;M=e.validate(d);d.baseId=D,e.util.varOccurences(M,y)<2?a+=" "+e.util.varReplace(M,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+M+" ",u&&(a+=" if (!"+m+") break; ")}e.errorPath=N}S&&(a+=" } "),a+=" } ",u&&(a+=" if ("+m+") { ",p+="}")}var K=e.opts.useDefaults&&!e.compositeRule;if(b.length){var J=b;if(J)for(var B,Z=-1,G=J.length-1;Z<G;){var Y=i[B=J[Z+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){var W=e.util.getProperty(B),X=(Q=c+W,K&&void 0!==Y.default);d.schema=Y,d.schemaPath=n+W,d.errSchemaPath=l+"/"+e.util.escapeFragment(B),d.errorPath=e.util.getPath(e.errorPath,B,e.opts.jsonPointers),d.dataPathArr[g]=e.util.toQuotedString(B);M=e.validate(d);if(d.baseId=D,e.util.varOccurences(M,y)<2){M=e.util.varReplace(M,y,Q);var ee=Q}else{ee=y;a+=" var "+y+" = "+Q+"; "}if(X)a+=" "+M+" ";else{if(O&&O[B]){a+=" if ( "+ee+" === undefined ",F&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(B)+"') "),a+=") { "+m+" = false; ";N=e.errorPath,V=l;var re,te=e.util.escapeQuotes(B);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(N,B,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(re=re||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+te+"' } ",!1!==e.opts.messages&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+te+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";U=a;a=re.pop(),!e.compositeRule&&u?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=V,e.errorPath=N,a+=" } else { "}else u?(a+=" if ( "+ee+" === undefined ",F&&(a+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(B)+"') "),a+=") { "+m+" = true; } else { "):(a+=" if ("+ee+" !== undefined ",F&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(B)+"') "),a+=" ) { ");a+=" "+M+" } "}}u&&(a+=" if ("+m+") { ",p+="}")}}if(w.length){var ae=w;if(ae)for(var se,oe=-1,ie=ae.length-1;oe<ie;){Y=E[se=ae[oe+=1]];if(e.opts.strictKeywords?"object"==typeof Y&&Object.keys(Y).length>0||!1===Y:e.util.schemaHasRules(Y,e.RULES.all)){d.schema=Y,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(se),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(se),a+=F?" "+P+" = "+P+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+P+".length; "+v+"++) { var "+f+" = "+P+"["+v+"]; ":" for (var "+f+" in "+c+") { ",a+=" if ("+e.usePattern(se)+".test("+f+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);Q=c+"["+f+"]";d.dataPathArr[g]=f;M=e.validate(d);d.baseId=D,e.util.varOccurences(M,y)<2?a+=" "+e.util.varReplace(M,y,Q)+" ":a+=" var "+y+" = "+Q+"; "+M+" ",u&&(a+=" if (!"+m+") break; "),a+=" } ",u&&(a+=" else "+m+" = true; "),a+=" } ",u&&(a+=" if ("+m+") { ",p+="}")}}}return u&&(a+=" "+p+" if ("+h+" == errors) {"),a}},99224:e=>{"use strict";e.exports=function generate_pattern(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'string') || "),s+=" !"+(d?"(new RegExp("+a+"))":e.usePattern(n))+".test("+h+") ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",s+=d?""+a:""+e.util.toQuotedString(n),s+=" } ",!1!==e.opts.messages&&(s+=" , message: 'should match pattern \"",s+=d?"' + "+a+" + '":""+e.util.escapeQuotes(n),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+e.util.toQuotedString(n),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),!e.compositeRule&&c?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},99387:e=>{"use strict";e.exports=function generate_not(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(o||""),h="errs__"+s,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+h+" = errors; ";var m,f=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=f,a+=" if ("+p+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var g=a;a=v.pop(),!e.compositeRule&&u?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+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(a+=" if (false) { ");return a}}};