@techdocs/cli 1.2.5-next.1 → 1.3.0
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.
- package/CHANGELOG.md +32 -0
- package/dist/cjs/{PublisherConfig-0ea58467.cjs.js → PublisherConfig-9627c348.cjs.js} +27 -1
- package/dist/cjs/{PublisherConfig-0ea58467.cjs.js.map → PublisherConfig-9627c348.cjs.js.map} +1 -1
- package/dist/cjs/{migrate-62035c68.cjs.js → migrate-dd1c117b.cjs.js} +2 -2
- package/dist/cjs/{migrate-62035c68.cjs.js.map → migrate-dd1c117b.cjs.js.map} +1 -1
- package/dist/cjs/{publish-af5607e2.cjs.js → publish-261bcb7c.cjs.js} +2 -2
- package/dist/cjs/{publish-af5607e2.cjs.js.map → publish-261bcb7c.cjs.js.map} +1 -1
- package/dist/cjs/{serve-176119a3.cjs.js → serve-ca27a9de.cjs.js} +10 -5
- package/dist/cjs/serve-ca27a9de.cjs.js.map +1 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1032.1b3a9ba2.chunk.js → 1032.4eeed38c.chunk.js} +2 -2
- package/dist/embedded-app/static/{1032.1b3a9ba2.chunk.js.map → 1032.4eeed38c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1105.b781a27e.chunk.js → 1105.ea587869.chunk.js} +2 -2
- package/dist/embedded-app/static/{1105.b781a27e.chunk.js.map → 1105.ea587869.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{184.e3627fff.chunk.js → 184.c0ade3a9.chunk.js} +2 -2
- package/dist/embedded-app/static/{184.e3627fff.chunk.js.map → 184.c0ade3a9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2440.22336cc5.chunk.js → 2440.82725a72.chunk.js} +2 -2
- package/dist/embedded-app/static/{2440.22336cc5.chunk.js.map → 2440.82725a72.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5458.4bf58a1b.chunk.js → 5458.ab22b201.chunk.js} +2 -2
- package/dist/embedded-app/static/{5458.4bf58a1b.chunk.js.map → 5458.ab22b201.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5837.76513d4f.chunk.js → 5837.9510a1b9.chunk.js} +2 -2
- package/dist/embedded-app/static/{5837.76513d4f.chunk.js.map → 5837.9510a1b9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/5869.f7e1183c.chunk.js +3 -0
- package/dist/embedded-app/static/5869.f7e1183c.chunk.js.map +1 -0
- package/dist/embedded-app/static/6051.716303b7.chunk.js +4 -0
- package/dist/embedded-app/static/6051.716303b7.chunk.js.map +1 -0
- package/dist/embedded-app/static/{732.8d78661a.chunk.js → 732.d703f6a9.chunk.js} +2 -2
- package/dist/embedded-app/static/{732.8d78661a.chunk.js.map → 732.d703f6a9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7560.2425fb06.chunk.js → 7560.1af568e5.chunk.js} +2 -2
- package/dist/embedded-app/static/{7560.2425fb06.chunk.js.map → 7560.1af568e5.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7750.b05dca8b.chunk.js → 7750.1bdc8262.chunk.js} +2 -2
- package/dist/embedded-app/static/{7750.b05dca8b.chunk.js.map → 7750.1bdc8262.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8951.ab95d8c1.chunk.js → 8951.3e2e38b8.chunk.js} +2 -2
- package/dist/embedded-app/static/{8951.ab95d8c1.chunk.js.map → 8951.3e2e38b8.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9545.c7c7af3a.chunk.js → 9545.efced59f.chunk.js} +2 -2
- package/dist/embedded-app/static/{9545.c7c7af3a.chunk.js.map → 9545.efced59f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9770.b9b07a81.chunk.js → 9770.b9672083.chunk.js} +2 -2
- package/dist/embedded-app/static/{9770.b9b07a81.chunk.js.map → 9770.b9672083.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.6fc07bc1.js +497 -0
- package/dist/embedded-app/static/main.6fc07bc1.js.map +1 -0
- package/dist/embedded-app/static/module-ajv.07e5c2aa.js +10 -0
- package/dist/embedded-app/static/module-ajv.07e5c2aa.js.map +1 -0
- package/dist/embedded-app/static/module-luxon.9cc2c5ac.js +3 -0
- package/dist/embedded-app/static/module-luxon.9cc2c5ac.js.map +1 -0
- package/dist/embedded-app/static/{module-octokit.08c0a003.js → module-octokit.c67cdf8f.js} +2 -2
- package/dist/embedded-app/static/{module-octokit.08c0a003.js.map → module-octokit.c67cdf8f.js.map} +1 -1
- package/dist/embedded-app/static/module-remix-run.b9acb514.js +12 -0
- package/dist/embedded-app/static/module-remix-run.b9acb514.js.map +1 -0
- package/dist/embedded-app/static/{runtime.cba21e8e.js → runtime.6fc07bc1.js} +2 -2
- package/dist/embedded-app/static/{runtime.cba21e8e.js.map → runtime.6fc07bc1.js.map} +1 -1
- package/dist/embedded-app/static/vendor.6fc07bc1.js +231 -0
- package/dist/embedded-app/static/vendor.6fc07bc1.js.map +1 -0
- package/dist/index.cjs.js +18 -4
- package/dist/index.cjs.js.map +1 -1
- package/package.json +6 -6
- package/dist/cjs/serve-176119a3.cjs.js.map +0 -1
- package/dist/embedded-app/static/5869.11f08c37.chunk.js +0 -3
- package/dist/embedded-app/static/5869.11f08c37.chunk.js.map +0 -1
- package/dist/embedded-app/static/6051.0cb12f85.chunk.js +0 -4
- package/dist/embedded-app/static/6051.0cb12f85.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.cba21e8e.js +0 -494
- package/dist/embedded-app/static/main.cba21e8e.js.map +0 -1
- package/dist/embedded-app/static/module-ajv.2efe45a5.js +0 -10
- package/dist/embedded-app/static/module-ajv.2efe45a5.js.map +0 -1
- package/dist/embedded-app/static/module-luxon.4cf2fdd7.js +0 -3
- package/dist/embedded-app/static/module-luxon.4cf2fdd7.js.map +0 -1
- package/dist/embedded-app/static/module-remix-run.e15d5a2e.js +0 -12
- package/dist/embedded-app/static/module-remix-run.e15d5a2e.js.map +0 -1
- package/dist/embedded-app/static/vendor.cba21e8e.js +0 -236
- package/dist/embedded-app/static/vendor.cba21e8e.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2126],{27991:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const t=i(49241),y=i(20361),w=i(86825),m=i(90360),S=["/properties"],s="http://json-schema.org/draft-07/schema";class d extends t.default{_addVocabularies(){super._addVocabularies(),y.default.forEach(j=>this.addVocabulary(j)),this.opts.discriminator&&this.addKeyword(w.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const j=this.opts.$data?this.$dataMetaSchema(m,S):m;this.addMetaSchema(j,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}z.exports=e=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var r=i(4998);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var c=i(15923);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var g=i(14282);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return g.default}});var $=i(24186);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return $.default}})},80477:function(z,e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class i{}e._CodeOrName=i,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends i{constructor(a){if(super(),!e.IDENTIFIER.test(a))throw new Error("CodeGen: name must be a valid identifier");this.str=a}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=t;class y extends i{constructor(a){super(),this._items=typeof a=="string"?[a]:a}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const a=this._items[0];return a===""||a==='""'}get str(){var a;return(a=this._str)!==null&&a!==void 0?a:this._str=this._items.reduce((v,l)=>`${v}${l}`,"")}get names(){var a;return(a=this._names)!==null&&a!==void 0?a:this._names=this._items.reduce((v,l)=>(l instanceof t&&(v[l.str]=(v[l.str]||0)+1),v),{})}}e._Code=y,e.nil=new y("");function w(o,...a){const v=[o[0]];let l=0;for(;l<a.length;)s(v,a[l]),v.push(o[++l]);return new y(v)}e._=w;const m=new y("+");function S(o,...a){const v=[N(o[0])];let l=0;for(;l<a.length;)v.push(m),s(v,a[l]),v.push(m,N(o[++l]));return d(v),new y(v)}e.str=S;function s(o,a){a instanceof y?o.push(...a._items):a instanceof t?o.push(a):o.push(g(a))}e.addCodeArg=s;function d(o){let a=1;for(;a<o.length-1;){if(o[a]===m){const v=r(o[a-1],o[a+1]);if(v!==void 0){o.splice(a-1,3,v);continue}o[a++]="+"}a++}}function r(o,a){if(a==='""')return o;if(o==='""')return a;if(typeof o=="string")return a instanceof t||o[o.length-1]!=='"'?void 0:typeof a!="string"?`${o.slice(0,-1)}${a}"`:a[0]==='"'?o.slice(0,-1)+a.slice(1):void 0;if(typeof a=="string"&&a[0]==='"'&&!(o instanceof t))return`"${o}${a.slice(1)}`}function c(o,a){return a.emptyStr()?o:o.emptyStr()?a:S`${o}${a}`}e.strConcat=c;function g(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:N(Array.isArray(o)?o.join(","):o)}function $(o){return new y(N(o))}e.stringify=$;function N(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=N;function j(o){return typeof o=="string"&&e.IDENTIFIER.test(o)?new y(`.${o}`):w`[${o}]`}e.getProperty=j;function O(o){if(typeof o=="string"&&e.IDENTIFIER.test(o))return new y(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}e.getEsmExportName=O;function C(o){return new y(o.toString())}e.regexpCode=C},15923:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=i(80477),y=i(91131);var w=i(80477);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return w.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return w.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return w.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return w.Name}});var m=i(91131);Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return m.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return m.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return m.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return m.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class S{optimizeNodes(){return this}optimizeNames(n,p){return this}}class s extends S{constructor(n,p,k){super(),this.varKind=n,this.name=p,this.rhs=k}render({es5:n,_n:p}){const k=n?y.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${k} ${this.name}${L};`+p}optimizeNames(n,p){if(!!n[this.name.str])return this.rhs&&(this.rhs=H(this.rhs,n,p)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class d extends S{constructor(n,p,k){super(),this.lhs=n,this.rhs=p,this.sideEffects=k}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,p){if(!(this.lhs instanceof t.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=H(this.rhs,n,p),this}get names(){const n=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Z(n,this.rhs)}}class r extends d{constructor(n,p,k,L){super(n,k,L),this.op=p}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}}class c extends S{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}}class g extends S{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}}class $ extends S{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}}class N extends S{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,p){return this.code=H(this.code,n,p),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class j extends S{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((p,k)=>p+k.render(n),"")}optimizeNodes(){const{nodes:n}=this;let p=n.length;for(;p--;){const k=n[p].optimizeNodes();Array.isArray(k)?n.splice(p,1,...k):k?n[p]=k:n.splice(p,1)}return n.length>0?this:void 0}optimizeNames(n,p){const{nodes:k}=this;let L=k.length;for(;L--;){const J=k[L];J.optimizeNames(n,p)||(X(n,J.names),k.splice(L,1))}return k.length>0?this:void 0}get names(){return this.nodes.reduce((n,p)=>U(n,p.names),{})}}class O extends j{render(n){return"{"+n._n+super.render(n)+"}"+n._n}}class C extends j{}class o extends O{}o.kind="else";class a extends O{constructor(n,p){super(p),this.condition=n}render(n){let p=`if(${this.condition})`+super.render(n);return this.else&&(p+="else "+this.else.render(n)),p}optimizeNodes(){super.optimizeNodes();const n=this.condition;if(n===!0)return this.nodes;let p=this.else;if(p){const k=p.optimizeNodes();p=this.else=Array.isArray(k)?new o(k):k}if(p)return n===!1?p instanceof a?p:p.nodes:this.nodes.length?this:new a(q(n),p instanceof a?[p]:p.nodes);if(!(n===!1||!this.nodes.length))return this}optimizeNames(n,p){var k;if(this.else=(k=this.else)===null||k===void 0?void 0:k.optimizeNames(n,p),!!(super.optimizeNames(n,p)||this.else))return this.condition=H(this.condition,n,p),this}get names(){const n=super.names;return Z(n,this.condition),this.else&&U(n,this.else.names),n}}a.kind="if";class v extends O{}v.kind="for";class l extends v{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,p){if(!!super.optimizeNames(n,p))return this.iteration=H(this.iteration,n,p),this}get names(){return U(super.names,this.iteration.names)}}class h extends v{constructor(n,p,k,L){super(),this.varKind=n,this.name=p,this.from=k,this.to=L}render(n){const p=n.es5?y.varKinds.var:this.varKind,{name:k,from:L,to:J}=this;return`for(${p} ${k}=${L}; ${k}<${J}; ${k}++)`+super.render(n)}get names(){const n=Z(super.names,this.from);return Z(n,this.to)}}class b extends v{constructor(n,p,k,L){super(),this.loop=n,this.varKind=p,this.name=k,this.iterable=L}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,p){if(!!super.optimizeNames(n,p))return this.iterable=H(this.iterable,n,p),this}get names(){return U(super.names,this.iterable.names)}}class f extends O{constructor(n,p,k){super(),this.name=n,this.args=p,this.async=k}render(n){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(n)}}f.kind="func";class u extends j{render(n){return"return "+super.render(n)}}u.kind="return";class _ extends O{render(n){let p="try"+super.render(n);return this.catch&&(p+=this.catch.render(n)),this.finally&&(p+=this.finally.render(n)),p}optimizeNodes(){var n,p;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(p=this.finally)===null||p===void 0||p.optimizeNodes(),this}optimizeNames(n,p){var k,L;return super.optimizeNames(n,p),(k=this.catch)===null||k===void 0||k.optimizeNames(n,p),(L=this.finally)===null||L===void 0||L.optimizeNames(n,p),this}get names(){const n=super.names;return this.catch&&U(n,this.catch.names),this.finally&&U(n,this.finally.names),n}}class I extends O{constructor(n){super(),this.error=n}render(n){return`catch(${this.error})`+super.render(n)}}I.kind="catch";class D extends O{render(n){return"finally"+super.render(n)}}D.kind="finally";class K{constructor(n,p={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...p,_n:p.lines?`
|
|
2
|
-
`:""},this._extScope=n,this._scope=new y.Scope({parent:n}),this._nodes=[new C]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,p){const k=this._extScope.value(n,p);return(this._values[k.prefix]||(this._values[k.prefix]=new Set)).add(k),k}getScopeValue(n,p){return this._extScope.getValue(n,p)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,p,k,L){const J=this._scope.toName(p);return k!==void 0&&L&&(this._constants[J.str]=k),this._leafNode(new s(n,J,k)),J}const(n,p,k){return this._def(y.varKinds.const,n,p,k)}let(n,p,k){return this._def(y.varKinds.let,n,p,k)}var(n,p,k){return this._def(y.varKinds.var,n,p,k)}assign(n,p,k){return this._leafNode(new d(n,p,k))}add(n,p){return this._leafNode(new r(n,e.operators.ADD,p))}code(n){return typeof n=="function"?n():n!==t.nil&&this._leafNode(new N(n)),this}object(...n){const p=["{"];for(const[k,L]of n)p.length>1&&p.push(","),p.push(k),(k!==L||this.opts.es5)&&(p.push(":"),(0,t.addCodeArg)(p,L));return p.push("}"),new t._Code(p)}if(n,p,k){if(this._blockNode(new a(n)),p&&k)this.code(p).else().code(k).endIf();else if(p)this.code(p).endIf();else if(k)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new a(n))}else(){return this._elseNode(new o)}endIf(){return this._endBlockNode(a,o)}_for(n,p){return this._blockNode(n),p&&this.code(p).endFor(),this}for(n,p){return this._for(new l(n),p)}forRange(n,p,k,L,J=this.opts.es5?y.varKinds.var:y.varKinds.let){const Q=this._scope.toName(n);return this._for(new h(J,Q,p,k),()=>L(Q))}forOf(n,p,k,L=y.varKinds.const){const J=this._scope.toName(n);if(this.opts.es5){const Q=p instanceof t.Name?p:this.var("_arr",p);return this.forRange("_i",0,(0,t._)`${Q}.length`,W=>{this.var(J,(0,t._)`${Q}[${W}]`),k(J)})}return this._for(new b("of",L,J,p),()=>k(J))}forIn(n,p,k,L=this.opts.es5?y.varKinds.var:y.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,t._)`Object.keys(${p})`,k);const J=this._scope.toName(n);return this._for(new b("in",L,J,p),()=>k(J))}endFor(){return this._endBlockNode(v)}label(n){return this._leafNode(new c(n))}break(n){return this._leafNode(new g(n))}return(n){const p=new u;if(this._blockNode(p),this.code(n),p.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(u)}try(n,p,k){if(!p&&!k)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new _;if(this._blockNode(L),this.code(n),p){const J=this.name("e");this._currNode=L.catch=new I(J),p(J)}return k&&(this._currNode=L.finally=new D,this.code(k)),this._endBlockNode(I,D)}throw(n){return this._leafNode(new $(n))}block(n,p){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(p),this}endBlock(n){const p=this._blockStarts.pop();if(p===void 0)throw new Error("CodeGen: not in self-balancing block");const k=this._nodes.length-p;if(k<0||n!==void 0&&k!==n)throw new Error(`CodeGen: wrong number of nodes: ${k} vs ${n} expected`);return this._nodes.length=p,this}func(n,p=t.nil,k,L){return this._blockNode(new f(n,p,k)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(f)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,p){const k=this._currNode;if(k instanceof n||p&&k instanceof p)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${p?`${n.kind}/${p.kind}`:n.kind}"`)}_elseNode(n){const p=this._currNode;if(!(p instanceof a))throw new Error('CodeGen: "else" without "if"');return this._currNode=p.else=n,this}get _root(){return this._nodes[0]}get _currNode(){const n=this._nodes;return n[n.length-1]}set _currNode(n){const p=this._nodes;p[p.length-1]=n}}e.CodeGen=K;function U(R,n){for(const p in n)R[p]=(R[p]||0)+(n[p]||0);return R}function Z(R,n){return n instanceof t._CodeOrName?U(R,n.names):R}function H(R,n,p){if(R instanceof t.Name)return k(R);if(!L(R))return R;return new t._Code(R._items.reduce((J,Q)=>(Q instanceof t.Name&&(Q=k(Q)),Q instanceof t._Code?J.push(...Q._items):J.push(Q),J),[]));function k(J){const Q=p[J.str];return Q===void 0||n[J.str]!==1?J:(delete n[J.str],Q)}function L(J){return J instanceof t._Code&&J._items.some(Q=>Q instanceof t.Name&&n[Q.str]===1&&p[Q.str]!==void 0)}}function X(R,n){for(const p in n)R[p]=(R[p]||0)-(n[p]||0)}function q(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${A(R)}`}e.not=q;const ae=P(e.operators.AND);function oe(...R){return R.reduce(ae)}e.and=oe;const Y=P(e.operators.OR);function V(...R){return R.reduce(Y)}e.or=V;function P(R){return(n,p)=>n===t.nil?p:p===t.nil?n:(0,t._)`${A(n)} ${R} ${A(p)}`}function A(R){return R instanceof t.Name?R:(0,t._)`(${R})`}},91131:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=i(80477);class y extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var w;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(w=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class m{constructor({prefixes:c,parent:g}={}){this._names={},this._prefixes=c,this._parent=g}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const g=this._names[c]||this._nameGroup(c);return`${c}${g.index++}`}_nameGroup(c){var g,$;if((($=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||$===void 0?void 0:$.has(c))||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=m;class S extends t.Name{constructor(c,g){super(g),this.prefix=c}setValue(c,{property:g,itemIndex:$}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(g)}[${$}]`}}e.ValueScopeName=S;const s=(0,t._)`\n`;class d extends m{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil}}get(){return this._scope}name(c){return new S(c,this._newName(c))}value(c,g){var $;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const N=this.toName(c),{prefix:j}=N,O=($=g.key)!==null&&$!==void 0?$:g.ref;let C=this._values[j];if(C){const v=C.get(O);if(v)return v}else C=this._values[j]=new Map;C.set(O,N);const o=this._scope[j]||(this._scope[j]=[]),a=o.length;return o[a]=g.ref,N.setValue(g,{property:j,itemIndex:a}),N}getValue(c,g){const $=this._values[c];if(!!$)return $.get(g)}scopeRefs(c,g=this._values){return this._reduceValues(g,$=>{if($.scopePath===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return(0,t._)`${c}${$.scopePath}`})}scopeCode(c=this._values,g,$){return this._reduceValues(c,N=>{if(N.value===void 0)throw new Error(`CodeGen: name "${N}" has no value`);return N.value.code},g,$)}_reduceValues(c,g,$={},N){let j=t.nil;for(const O in c){const C=c[O];if(!C)continue;const o=$[O]=$[O]||new Map;C.forEach(a=>{if(o.has(a))return;o.set(a,w.Started);let v=g(a);if(v){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;j=(0,t._)`${j}${l} ${a} = ${v};${this.opts._n}`}else if(v=N==null?void 0:N(a))j=(0,t._)`${j}${v}${this.opts._n}`;else throw new y(a);o.set(a,w.Completed)})}return j}}e.ValueScope=d},76028:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=i(15923),y=i(91571),w=i(92115);e.keywordError={message:({keyword:o})=>(0,t.str)`must pass "${o}" keyword validation`},e.keyword$DataError={message:({keyword:o,schemaType:a})=>a?(0,t.str)`"${o}" keyword must be ${a} ($data)`:(0,t.str)`"${o}" keyword is invalid ($data)`};function m(o,a=e.keywordError,v,l){const{it:h}=o,{gen:b,compositeRule:f,allErrors:u}=h,_=$(o,a,v);(l!=null?l:f||u)?r(b,_):c(h,(0,t._)`[${_}]`)}e.reportError=m;function S(o,a=e.keywordError,v){const{it:l}=o,{gen:h,compositeRule:b,allErrors:f}=l,u=$(o,a,v);r(h,u),b||f||c(l,w.default.vErrors)}e.reportExtraError=S;function s(o,a){o.assign(w.default.errors,a),o.if((0,t._)`${w.default.vErrors} !== null`,()=>o.if(a,()=>o.assign((0,t._)`${w.default.vErrors}.length`,a),()=>o.assign(w.default.vErrors,null)))}e.resetErrorsCount=s;function d({gen:o,keyword:a,schemaValue:v,data:l,errsCount:h,it:b}){if(h===void 0)throw new Error("ajv implementation error");const f=o.name("err");o.forRange("i",h,w.default.errors,u=>{o.const(f,(0,t._)`${w.default.vErrors}[${u}]`),o.if((0,t._)`${f}.instancePath === undefined`,()=>o.assign((0,t._)`${f}.instancePath`,(0,t.strConcat)(w.default.instancePath,b.errorPath))),o.assign((0,t._)`${f}.schemaPath`,(0,t.str)`${b.errSchemaPath}/${a}`),b.opts.verbose&&(o.assign((0,t._)`${f}.schema`,v),o.assign((0,t._)`${f}.data`,l))})}e.extendErrors=d;function r(o,a){const v=o.const("err",a);o.if((0,t._)`${w.default.vErrors} === null`,()=>o.assign(w.default.vErrors,(0,t._)`[${v}]`),(0,t._)`${w.default.vErrors}.push(${v})`),o.code((0,t._)`${w.default.errors}++`)}function c(o,a){const{gen:v,validateName:l,schemaEnv:h}=o;h.$async?v.throw((0,t._)`new ${o.ValidationError}(${a})`):(v.assign((0,t._)`${l}.errors`,a),v.return(!1))}const g={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function $(o,a,v){const{createErrors:l}=o.it;return l===!1?(0,t._)`{}`:N(o,a,v)}function N(o,a,v={}){const{gen:l,it:h}=o,b=[j(h,v),O(o,v)];return C(o,a,b),l.object(...b)}function j({errorPath:o},{instancePath:a}){const v=a?(0,t.str)`${o}${(0,y.getErrorPath)(a,y.Type.Str)}`:o;return[w.default.instancePath,(0,t.strConcat)(w.default.instancePath,v)]}function O({keyword:o,it:{errSchemaPath:a}},{schemaPath:v,parentSchema:l}){let h=l?a:(0,t.str)`${a}/${o}`;return v&&(h=(0,t.str)`${h}${(0,y.getErrorPath)(v,y.Type.Str)}`),[g.schemaPath,h]}function C(o,{params:a,message:v},l){const{keyword:h,data:b,schemaValue:f,it:u}=o,{opts:_,propertyName:I,topSchemaRef:D,schemaPath:K}=u;l.push([g.keyword,h],[g.params,typeof a=="function"?a(o):a||(0,t._)`{}`]),_.messages&&l.push([g.message,typeof v=="function"?v(o):v]),_.verbose&&l.push([g.schema,f],[g.parentSchema,(0,t._)`${D}${K}`],[w.default.data,b]),I&&l.push([g.propertyName,I])}},76968:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;const t=i(15923),y=i(14282),w=i(92115),m=i(48147),S=i(91571),s=i(4998);class d{constructor(v){var l;this.refs={},this.dynamicAnchors={};let h;typeof v.schema=="object"&&(h=v.schema),this.schema=v.schema,this.schemaId=v.schemaId,this.root=v.root||this,this.baseId=(l=v.baseId)!==null&&l!==void 0?l:(0,m.normalizeId)(h==null?void 0:h[v.schemaId||"$id"]),this.schemaPath=v.schemaPath,this.localRefs=v.localRefs,this.meta=v.meta,this.$async=h==null?void 0:h.$async,this.refs={}}}e.SchemaEnv=d;function r(a){const v=$.call(this,a);if(v)return v;const l=(0,m.getFullPath)(this.opts.uriResolver,a.root.baseId),{es5:h,lines:b}=this.opts.code,{ownProperties:f}=this.opts,u=new t.CodeGen(this.scope,{es5:h,lines:b,ownProperties:f});let _;a.$async&&(_=u.scopeValue("Error",{ref:y.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const I=u.scopeName("validate");a.validateName=I;const D={gen:u,allErrors:this.opts.allErrors,data:w.default.data,parentData:w.default.parentData,parentDataProperty:w.default.parentDataProperty,dataNames:[w.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",this.opts.code.source===!0?{ref:a.schema,code:(0,t.stringify)(a.schema)}:{ref:a.schema}),validateName:I,ValidationError:_,schema:a.schema,schemaEnv:a,rootId:l,baseId:a.baseId||l,schemaPath:t.nil,errSchemaPath:a.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let K;try{this._compilations.add(a),(0,s.validateFunctionCode)(D),u.optimize(this.opts.code.optimize);const U=u.toString();K=`${u.scopeRefs(w.default.scope)}return ${U}`,this.opts.code.process&&(K=this.opts.code.process(K,a));const H=new Function(`${w.default.self}`,`${w.default.scope}`,K)(this,this.scope.get());if(this.scope.value(I,{ref:H}),H.errors=null,H.schema=a.schema,H.schemaEnv=a,a.$async&&(H.$async=!0),this.opts.code.source===!0&&(H.source={validateName:I,validateCode:U,scopeValues:u._values}),this.opts.unevaluated){const{props:X,items:q}=D;H.evaluated={props:X instanceof t.Name?void 0:X,items:q instanceof t.Name?void 0:q,dynamicProps:X instanceof t.Name,dynamicItems:q instanceof t.Name},H.source&&(H.source.evaluated=(0,t.stringify)(H.evaluated))}return a.validate=H,a}catch(U){throw delete a.validate,delete a.validateName,K&&this.logger.error("Error compiling schema, function code:",K),U}finally{this._compilations.delete(a)}}e.compileSchema=r;function c(a,v,l){var h;l=(0,m.resolveUrl)(this.opts.uriResolver,v,l);const b=a.refs[l];if(b)return b;let f=j.call(this,a,l);if(f===void 0){const u=(h=a.localRefs)===null||h===void 0?void 0:h[l],{schemaId:_}=this.opts;u&&(f=new d({schema:u,schemaId:_,root:a,baseId:v}))}if(f!==void 0)return a.refs[l]=g.call(this,f)}e.resolveRef=c;function g(a){return(0,m.inlineRef)(a.schema,this.opts.inlineRefs)?a.schema:a.validate?a:r.call(this,a)}function $(a){for(const v of this._compilations)if(N(v,a))return v}e.getCompilingSchema=$;function N(a,v){return a.schema===v.schema&&a.root===v.root&&a.baseId===v.baseId}function j(a,v){let l;for(;typeof(l=this.refs[v])=="string";)v=l;return l||this.schemas[v]||O.call(this,a,v)}function O(a,v){const l=this.opts.uriResolver.parse(v),h=(0,m._getFullPath)(this.opts.uriResolver,l);let b=(0,m.getFullPath)(this.opts.uriResolver,a.baseId,void 0);if(Object.keys(a.schema).length>0&&h===b)return o.call(this,l,a);const f=(0,m.normalizeId)(h),u=this.refs[f]||this.schemas[f];if(typeof u=="string"){const _=O.call(this,a,u);return typeof(_==null?void 0:_.schema)!="object"?void 0:o.call(this,l,_)}if(typeof(u==null?void 0:u.schema)=="object"){if(u.validate||r.call(this,u),f===(0,m.normalizeId)(v)){const{schema:_}=u,{schemaId:I}=this.opts,D=_[I];return D&&(b=(0,m.resolveUrl)(this.opts.uriResolver,b,D)),new d({schema:_,schemaId:I,root:a,baseId:b})}return o.call(this,l,u)}}e.resolveSchema=O;const C=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function o(a,{baseId:v,schema:l,root:h}){var b;if(((b=a.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const _ of a.fragment.slice(1).split("/")){if(typeof l=="boolean")return;const I=l[(0,S.unescapeFragment)(_)];if(I===void 0)return;l=I;const D=typeof l=="object"&&l[this.opts.schemaId];!C.has(_)&&D&&(v=(0,m.resolveUrl)(this.opts.uriResolver,v,D))}let f;if(typeof l!="boolean"&&l.$ref&&!(0,S.schemaHasRulesButRef)(l,this.RULES)){const _=(0,m.resolveUrl)(this.opts.uriResolver,v,l.$ref);f=O.call(this,h,_)}const{schemaId:u}=this.opts;if(f=f||new d({schema:l,schemaId:u,root:h,baseId:v}),f.schema!==f.root.schema)return f}},92115:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};e.default=y},24186:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(48147);class y extends Error{constructor(m,S,s,d){super(d||`can't resolve reference ${s} from id ${S}`),this.missingRef=(0,t.resolveUrl)(m,S,s),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(m,this.missingRef))}}e.default=y},48147:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const t=i(91571),y=i(69378),w=i(19522),m=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function S(o,a=!0){return typeof o=="boolean"?!0:a===!0?!d(o):a?r(o)<=a:!1}e.inlineRef=S;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(o){for(const a in o){if(s.has(a))return!0;const v=o[a];if(Array.isArray(v)&&v.some(d)||typeof v=="object"&&d(v))return!0}return!1}function r(o){let a=0;for(const v in o){if(v==="$ref")return 1/0;if(a++,!m.has(v)&&(typeof o[v]=="object"&&(0,t.eachItem)(o[v],l=>a+=r(l)),a===1/0))return 1/0}return a}function c(o,a="",v){v!==!1&&(a=N(a));const l=o.parse(a);return g(o,l)}e.getFullPath=c;function g(o,a){return o.serialize(a).split("#")[0]+"#"}e._getFullPath=g;const $=/#\/?$/;function N(o){return o?o.replace($,""):""}e.normalizeId=N;function j(o,a,v){return v=N(v),o.resolve(a,v)}e.resolveUrl=j;const O=/^[a-z_][-a-z0-9._]*$/i;function C(o,a){if(typeof o=="boolean")return{};const{schemaId:v,uriResolver:l}=this.opts,h=N(o[v]||a),b={"":h},f=c(l,h,!1),u={},_=new Set;return w(o,{allKeys:!0},(K,U,Z,H)=>{if(H===void 0)return;const X=f+U;let q=b[H];typeof K[v]=="string"&&(q=ae.call(this,K[v])),oe.call(this,K.$anchor),oe.call(this,K.$dynamicAnchor),b[U]=q;function ae(Y){const V=this.opts.uriResolver.resolve;if(Y=N(q?V(q,Y):Y),_.has(Y))throw D(Y);_.add(Y);let P=this.refs[Y];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?I(K,P.schema,Y):Y!==N(X)&&(Y[0]==="#"?(I(K,u[Y],Y),u[Y]=K):this.refs[Y]=X),Y}function oe(Y){if(typeof Y=="string"){if(!O.test(Y))throw new Error(`invalid anchor "${Y}"`);ae.call(this,`#${Y}`)}}}),u;function I(K,U,Z){if(U!==void 0&&!y(K,U))throw D(Z)}function D(K){return new Error(`reference "${K}" resolves to more than one schema`)}}e.getSchemaRefs=C},22825:function(z,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const i=["string","number","integer","boolean","null","object","array"],t=new Set(i);function y(m){return typeof m=="string"&&t.has(m)}e.isJSONType=y;function w(){const m={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...m,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},m.number,m.string,m.array,m.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=w},91571:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=i(15923),y=i(80477);function w(f){const u={};for(const _ of f)u[_]=!0;return u}e.toHash=w;function m(f,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(S(f,u),!s(u,f.self.RULES.all))}e.alwaysValidSchema=m;function S(f,u=f.schema){const{opts:_,self:I}=f;if(!_.strictSchema||typeof u=="boolean")return;const D=I.RULES.keywords;for(const K in u)D[K]||b(f,`unknown keyword: "${K}"`)}e.checkUnknownRules=S;function s(f,u){if(typeof f=="boolean")return!f;for(const _ in f)if(u[_])return!0;return!1}e.schemaHasRules=s;function d(f,u){if(typeof f=="boolean")return!f;for(const _ in f)if(_!=="$ref"&&u.all[_])return!0;return!1}e.schemaHasRulesButRef=d;function r({topSchemaRef:f,schemaPath:u},_,I,D){if(!D){if(typeof _=="number"||typeof _=="boolean")return _;if(typeof _=="string")return(0,t._)`${_}`}return(0,t._)`${f}${u}${(0,t.getProperty)(I)}`}e.schemaRefOrVal=r;function c(f){return N(decodeURIComponent(f))}e.unescapeFragment=c;function g(f){return encodeURIComponent($(f))}e.escapeFragment=g;function $(f){return typeof f=="number"?`${f}`:f.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=$;function N(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=N;function j(f,u){if(Array.isArray(f))for(const _ of f)u(_);else u(f)}e.eachItem=j;function O({mergeNames:f,mergeToName:u,mergeValues:_,resultToName:I}){return(D,K,U,Z)=>{const H=U===void 0?K:U instanceof t.Name?(K instanceof t.Name?f(D,K,U):u(D,K,U),U):K instanceof t.Name?(u(D,U,K),K):_(K,U);return Z===t.Name&&!(H instanceof t.Name)?I(D,H):H}}e.mergeEvaluated={props:O({mergeNames:(f,u,_)=>f.if((0,t._)`${_} !== true && ${u} !== undefined`,()=>{f.if((0,t._)`${u} === true`,()=>f.assign(_,!0),()=>f.assign(_,(0,t._)`${_} || {}`).code((0,t._)`Object.assign(${_}, ${u})`))}),mergeToName:(f,u,_)=>f.if((0,t._)`${_} !== true`,()=>{u===!0?f.assign(_,!0):(f.assign(_,(0,t._)`${_} || {}`),o(f,_,u))}),mergeValues:(f,u)=>f===!0?!0:{...f,...u},resultToName:C}),items:O({mergeNames:(f,u,_)=>f.if((0,t._)`${_} !== true && ${u} !== undefined`,()=>f.assign(_,(0,t._)`${u} === true ? true : ${_} > ${u} ? ${_} : ${u}`)),mergeToName:(f,u,_)=>f.if((0,t._)`${_} !== true`,()=>f.assign(_,u===!0?!0:(0,t._)`${_} > ${u} ? ${_} : ${u}`)),mergeValues:(f,u)=>f===!0?!0:Math.max(f,u),resultToName:(f,u)=>f.var("items",u)})};function C(f,u){if(u===!0)return f.var("props",!0);const _=f.var("props",(0,t._)`{}`);return u!==void 0&&o(f,_,u),_}e.evaluatedPropsToName=C;function o(f,u,_){Object.keys(_).forEach(I=>f.assign((0,t._)`${u}${(0,t.getProperty)(I)}`,!0))}e.setEvaluated=o;const a={};function v(f,u){return f.scopeValue("func",{ref:u,code:a[u.code]||(a[u.code]=new y._Code(u.code))})}e.useFunc=v;var l;(function(f){f[f.Num=0]="Num",f[f.Str=1]="Str"})(l=e.Type||(e.Type={}));function h(f,u,_){if(f instanceof t.Name){const I=u===l.Num;return _?I?(0,t._)`"[" + ${f} + "]"`:(0,t._)`"['" + ${f} + "']"`:I?(0,t._)`"/" + ${f}`:(0,t._)`"/" + ${f}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return _?(0,t.getProperty)(f).toString():"/"+$(f)}e.getErrorPath=h;function b(f,u,_=f.opts.strictSchema){if(!!_){if(u=`strict mode: ${u}`,_===!0)throw new Error(u);f.self.logger.warn(u)}}e.checkStrictMode=b},34540:function(z,e){Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function i({schema:w,self:m},S){const s=m.RULES.types[S];return s&&s!==!0&&t(w,s)}e.schemaHasRulesForType=i;function t(w,m){return m.rules.some(S=>y(w,S))}e.shouldUseGroup=t;function y(w,m){var S;return w[m.keyword]!==void 0||((S=m.definition.implements)===null||S===void 0?void 0:S.some(s=>w[s]!==void 0))}e.shouldUseRule=y},12175:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const t=i(76028),y=i(15923),w=i(92115),m={message:"boolean schema is false"};function S(r){const{gen:c,schema:g,validateName:$}=r;g===!1?d(r,!1):typeof g=="object"&&g.$async===!0?c.return(w.default.data):(c.assign((0,y._)`${$}.errors`,null),c.return(!0))}e.topBoolOrEmptySchema=S;function s(r,c){const{gen:g,schema:$}=r;$===!1?(g.var(c,!1),d(r)):g.var(c,!0)}e.boolOrEmptySchema=s;function d(r,c){const{gen:g,data:$}=r,N={gen:g,keyword:"false schema",data:$,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,t.reportError)(N,m,void 0,c)}},31411:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=i(22825),y=i(34540),w=i(76028),m=i(15923),S=i(91571);var s;(function(l){l[l.Correct=0]="Correct",l[l.Wrong=1]="Wrong"})(s=e.DataType||(e.DataType={}));function d(l){const h=r(l.type);if(h.includes("null")){if(l.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!h.length&&l.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');l.nullable===!0&&h.push("null")}return h}e.getSchemaTypes=d;function r(l){const h=Array.isArray(l)?l:l?[l]:[];if(h.every(t.isJSONType))return h;throw new Error("type must be JSONType or JSONType[]: "+h.join(","))}e.getJSONTypes=r;function c(l,h){const{gen:b,data:f,opts:u}=l,_=$(h,u.coerceTypes),I=h.length>0&&!(_.length===0&&h.length===1&&(0,y.schemaHasRulesForType)(l,h[0]));if(I){const D=C(h,f,u.strictNumbers,s.Wrong);b.if(D,()=>{_.length?N(l,h,_):a(l)})}return I}e.coerceAndCheckDataType=c;const g=new Set(["string","number","integer","boolean","null"]);function $(l,h){return h?l.filter(b=>g.has(b)||h==="array"&&b==="array"):[]}function N(l,h,b){const{gen:f,data:u,opts:_}=l,I=f.let("dataType",(0,m._)`typeof ${u}`),D=f.let("coerced",(0,m._)`undefined`);_.coerceTypes==="array"&&f.if((0,m._)`${I} == 'object' && Array.isArray(${u}) && ${u}.length == 1`,()=>f.assign(u,(0,m._)`${u}[0]`).assign(I,(0,m._)`typeof ${u}`).if(C(h,u,_.strictNumbers),()=>f.assign(D,u))),f.if((0,m._)`${D} !== undefined`);for(const U of b)(g.has(U)||U==="array"&&_.coerceTypes==="array")&&K(U);f.else(),a(l),f.endIf(),f.if((0,m._)`${D} !== undefined`,()=>{f.assign(u,D),j(l,D)});function K(U){switch(U){case"string":f.elseIf((0,m._)`${I} == "number" || ${I} == "boolean"`).assign(D,(0,m._)`"" + ${u}`).elseIf((0,m._)`${u} === null`).assign(D,(0,m._)`""`);return;case"number":f.elseIf((0,m._)`${I} == "boolean" || ${u} === null
|
|
3
|
-
|| (${I} == "string" && ${u} && ${u} == +${u})`).assign(D,(0,m._)`+${u}`);return;case"integer":f.elseIf((0,m._)`${I} === "boolean" || ${u} === null
|
|
4
|
-
|| (${I} === "string" && ${u} && ${u} == +${u} && !(${u} % 1))`).assign(D,(0,m._)`+${u}`);return;case"boolean":f.elseIf((0,m._)`${u} === "false" || ${u} === 0 || ${u} === null`).assign(D,!1).elseIf((0,m._)`${u} === "true" || ${u} === 1`).assign(D,!0);return;case"null":f.elseIf((0,m._)`${u} === "" || ${u} === 0 || ${u} === false`),f.assign(D,null);return;case"array":f.elseIf((0,m._)`${I} === "string" || ${I} === "number"
|
|
5
|
-
|| ${I} === "boolean" || ${u} === null`).assign(D,(0,m._)`[${u}]`)}}}function j({gen:l,parentData:h,parentDataProperty:b},f){l.if((0,m._)`${h} !== undefined`,()=>l.assign((0,m._)`${h}[${b}]`,f))}function O(l,h,b,f=s.Correct){const u=f===s.Correct?m.operators.EQ:m.operators.NEQ;let _;switch(l){case"null":return(0,m._)`${h} ${u} null`;case"array":_=(0,m._)`Array.isArray(${h})`;break;case"object":_=(0,m._)`${h} && typeof ${h} == "object" && !Array.isArray(${h})`;break;case"integer":_=I((0,m._)`!(${h} % 1) && !isNaN(${h})`);break;case"number":_=I();break;default:return(0,m._)`typeof ${h} ${u} ${l}`}return f===s.Correct?_:(0,m.not)(_);function I(D=m.nil){return(0,m.and)((0,m._)`typeof ${h} == "number"`,D,b?(0,m._)`isFinite(${h})`:m.nil)}}e.checkDataType=O;function C(l,h,b,f){if(l.length===1)return O(l[0],h,b,f);let u;const _=(0,S.toHash)(l);if(_.array&&_.object){const I=(0,m._)`typeof ${h} != "object"`;u=_.null?I:(0,m._)`!${h} || ${I}`,delete _.null,delete _.array,delete _.object}else u=m.nil;_.number&&delete _.integer;for(const I in _)u=(0,m.and)(u,O(I,h,b,f));return u}e.checkDataTypes=C;const o={message:({schema:l})=>`must be ${l}`,params:({schema:l,schemaValue:h})=>typeof l=="string"?(0,m._)`{type: ${l}}`:(0,m._)`{type: ${h}}`};function a(l){const h=v(l);(0,w.reportError)(h,o)}e.reportTypeError=a;function v(l){const{gen:h,data:b,schema:f}=l,u=(0,S.schemaRefOrVal)(l,f,"type");return{gen:h,keyword:"type",data:b,schema:f.type,schemaCode:u,schemaValue:u,parentSchema:f,params:{},it:l}}},14911:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;const t=i(15923),y=i(91571);function w(S,s){const{properties:d,items:r}=S.schema;if(s==="object"&&d)for(const c in d)m(S,c,d[c].default);else s==="array"&&Array.isArray(r)&&r.forEach((c,g)=>m(S,g,c.default))}e.assignDefaults=w;function m(S,s,d){const{gen:r,compositeRule:c,data:g,opts:$}=S;if(d===void 0)return;const N=(0,t._)`${g}${(0,t.getProperty)(s)}`;if(c){(0,y.checkStrictMode)(S,`default is ignored for: ${N}`);return}let j=(0,t._)`${N} === undefined`;$.useDefaults==="empty"&&(j=(0,t._)`${j} || ${N} === null || ${N} === ""`),r.if(j,(0,t._)`${N} = ${(0,t.stringify)(d)}`)}},4998:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;const t=i(12175),y=i(31411),w=i(34540),m=i(31411),S=i(14911),s=i(47366),d=i(62795),r=i(15923),c=i(92115),g=i(48147),$=i(91571),N=i(76028);function j(E){if(f(E)&&(_(E),b(E))){a(E);return}O(E,()=>(0,t.topBoolOrEmptySchema)(E))}e.validateFunctionCode=j;function O({gen:E,validateName:T,schema:M,schemaEnv:F,opts:G},B){G.code.es5?E.func(T,(0,r._)`${c.default.data}, ${c.default.valCxt}`,F.$async,()=>{E.code((0,r._)`"use strict"; ${l(M,G)}`),o(E,G),E.code(B)}):E.func(T,(0,r._)`${c.default.data}, ${C(G)}`,F.$async,()=>E.code(l(M,G)).code(B))}function C(E){return(0,r._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${E.dynamicRef?(0,r._)`, ${c.default.dynamicAnchors}={}`:r.nil}}={}`}function o(E,T){E.if(c.default.valCxt,()=>{E.var(c.default.instancePath,(0,r._)`${c.default.valCxt}.${c.default.instancePath}`),E.var(c.default.parentData,(0,r._)`${c.default.valCxt}.${c.default.parentData}`),E.var(c.default.parentDataProperty,(0,r._)`${c.default.valCxt}.${c.default.parentDataProperty}`),E.var(c.default.rootData,(0,r._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&E.var(c.default.dynamicAnchors,(0,r._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{E.var(c.default.instancePath,(0,r._)`""`),E.var(c.default.parentData,(0,r._)`undefined`),E.var(c.default.parentDataProperty,(0,r._)`undefined`),E.var(c.default.rootData,c.default.data),T.dynamicRef&&E.var(c.default.dynamicAnchors,(0,r._)`{}`)})}function a(E){const{schema:T,opts:M,gen:F}=E;O(E,()=>{M.$comment&&T.$comment&&H(E),K(E),F.let(c.default.vErrors,null),F.let(c.default.errors,0),M.unevaluated&&v(E),I(E),X(E)})}function v(E){const{gen:T,validateName:M}=E;E.evaluated=T.const("evaluated",(0,r._)`${M}.evaluated`),T.if((0,r._)`${E.evaluated}.dynamicProps`,()=>T.assign((0,r._)`${E.evaluated}.props`,(0,r._)`undefined`)),T.if((0,r._)`${E.evaluated}.dynamicItems`,()=>T.assign((0,r._)`${E.evaluated}.items`,(0,r._)`undefined`))}function l(E,T){const M=typeof E=="object"&&E[T.schemaId];return M&&(T.code.source||T.code.process)?(0,r._)`/*# sourceURL=${M} */`:r.nil}function h(E,T){if(f(E)&&(_(E),b(E))){u(E,T);return}(0,t.boolOrEmptySchema)(E,T)}function b({schema:E,self:T}){if(typeof E=="boolean")return!E;for(const M in E)if(T.RULES.all[M])return!0;return!1}function f(E){return typeof E.schema!="boolean"}function u(E,T){const{schema:M,gen:F,opts:G}=E;G.$comment&&M.$comment&&H(E),U(E),Z(E);const B=F.const("_errs",c.default.errors);I(E,B),F.var(T,(0,r._)`${B} === ${c.default.errors}`)}function _(E){(0,$.checkUnknownRules)(E),D(E)}function I(E,T){if(E.opts.jtd)return ae(E,[],!1,T);const M=(0,y.getSchemaTypes)(E.schema),F=(0,y.coerceAndCheckDataType)(E,M);ae(E,M,!F,T)}function D(E){const{schema:T,errSchemaPath:M,opts:F,self:G}=E;T.$ref&&F.ignoreKeywordsWithRef&&(0,$.schemaHasRulesButRef)(T,G.RULES)&&G.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function K(E){const{schema:T,opts:M}=E;T.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,$.checkStrictMode)(E,"default is ignored in the schema root")}function U(E){const T=E.schema[E.opts.schemaId];T&&(E.baseId=(0,g.resolveUrl)(E.opts.uriResolver,E.baseId,T))}function Z(E){if(E.schema.$async&&!E.schemaEnv.$async)throw new Error("async schema in sync schema")}function H({gen:E,schemaEnv:T,schema:M,errSchemaPath:F,opts:G}){const B=M.$comment;if(G.$comment===!0)E.code((0,r._)`${c.default.self}.logger.log(${B})`);else if(typeof G.$comment=="function"){const x=(0,r.str)`${F}/$comment`,se=E.scopeValue("root",{ref:T.root});E.code((0,r._)`${c.default.self}.opts.$comment(${B}, ${x}, ${se}.schema)`)}}function X(E){const{gen:T,schemaEnv:M,validateName:F,ValidationError:G,opts:B}=E;M.$async?T.if((0,r._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,r._)`new ${G}(${c.default.vErrors})`)):(T.assign((0,r._)`${F}.errors`,c.default.vErrors),B.unevaluated&&q(E),T.return((0,r._)`${c.default.errors} === 0`))}function q({gen:E,evaluated:T,props:M,items:F}){M instanceof r.Name&&E.assign((0,r._)`${T}.props`,M),F instanceof r.Name&&E.assign((0,r._)`${T}.items`,F)}function ae(E,T,M,F){const{gen:G,schema:B,data:x,allErrors:se,opts:te,self:ne}=E,{RULES:ee}=ne;if(B.$ref&&(te.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(B,ee))){G.block(()=>L(E,"$ref",ee.all.$ref.definition));return}te.jtd||Y(E,T),G.block(()=>{for(const re of ee.rules)ie(re);ie(ee.post)});function ie(re){!(0,w.shouldUseGroup)(B,re)||(re.type?(G.if((0,m.checkDataType)(re.type,x,te.strictNumbers)),oe(E,re),T.length===1&&T[0]===re.type&&M&&(G.else(),(0,m.reportTypeError)(E)),G.endIf()):oe(E,re),se||G.if((0,r._)`${c.default.errors} === ${F||0}`))}}function oe(E,T){const{gen:M,schema:F,opts:{useDefaults:G}}=E;G&&(0,S.assignDefaults)(E,T.type),M.block(()=>{for(const B of T.rules)(0,w.shouldUseRule)(F,B)&&L(E,B.keyword,B.definition,T.type)})}function Y(E,T){E.schemaEnv.meta||!E.opts.strictTypes||(V(E,T),E.opts.allowUnionTypes||P(E,T),A(E,E.dataTypes))}function V(E,T){if(!!T.length){if(!E.dataTypes.length){E.dataTypes=T;return}T.forEach(M=>{n(E.dataTypes,M)||p(E,`type "${M}" not allowed by context "${E.dataTypes.join(",")}"`)}),E.dataTypes=E.dataTypes.filter(M=>n(T,M))}}function P(E,T){T.length>1&&!(T.length===2&&T.includes("null"))&&p(E,"use allowUnionTypes to allow union type keyword")}function A(E,T){const M=E.self.RULES.all;for(const F in M){const G=M[F];if(typeof G=="object"&&(0,w.shouldUseRule)(E.schema,G)){const{type:B}=G.definition;B.length&&!B.some(x=>R(T,x))&&p(E,`missing type "${B.join(",")}" for keyword "${F}"`)}}}function R(E,T){return E.includes(T)||T==="number"&&E.includes("integer")}function n(E,T){return E.includes(T)||T==="integer"&&E.includes("number")}function p(E,T){const M=E.schemaEnv.baseId+E.errSchemaPath;T+=` at "${M}" (strictTypes)`,(0,$.checkStrictMode)(E,T,E.opts.strictTypes)}class k{constructor(T,M,F){if((0,s.validateKeywordUsage)(T,M,F),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=F,this.data=T.data,this.schema=T.schema[F],this.$data=M.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$.schemaRefOrVal)(T,this.schema,F,this.$data),this.schemaType=M.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=M,this.$data)this.schemaCode=T.gen.const("vSchema",W(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${F} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,M,F){this.failResult((0,r.not)(T),M,F)}failResult(T,M,F){this.gen.if(T),F?F():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,M){this.failResult((0,r.not)(T),void 0,M)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:M}=this;this.fail((0,r._)`${M} !== undefined && (${(0,r.or)(this.invalid$data(),T)})`)}error(T,M,F){if(M){this.setParams(M),this._error(T,F),this.setParams({});return}this._error(T,F)}_error(T,M){(T?N.reportExtraError:N.reportError)(this,this.def.error,M)}$dataError(){(0,N.reportError)(this,this.def.$dataError||N.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,N.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,M){M?Object.assign(this.params,T):this.params=T}block$data(T,M,F=r.nil){this.gen.block(()=>{this.check$data(T,F),M()})}check$data(T=r.nil,M=r.nil){if(!this.$data)return;const{gen:F,schemaCode:G,schemaType:B,def:x}=this;F.if((0,r.or)((0,r._)`${G} === undefined`,M)),T!==r.nil&&F.assign(T,!0),(B.length||x.validateSchema)&&(F.elseIf(this.invalid$data()),this.$dataError(),T!==r.nil&&F.assign(T,!1)),F.else()}invalid$data(){const{gen:T,schemaCode:M,schemaType:F,def:G,it:B}=this;return(0,r.or)(x(),se());function x(){if(F.length){if(!(M instanceof r.Name))throw new Error("ajv implementation error");const te=Array.isArray(F)?F:[F];return(0,r._)`${(0,m.checkDataTypes)(te,M,B.opts.strictNumbers,m.DataType.Wrong)}`}return r.nil}function se(){if(G.validateSchema){const te=T.scopeValue("validate$data",{ref:G.validateSchema});return(0,r._)`!${te}(${M})`}return r.nil}}subschema(T,M){const F=(0,d.getSubschema)(this.it,T);(0,d.extendSubschemaData)(F,this.it,T),(0,d.extendSubschemaMode)(F,T);const G={...this.it,...F,items:void 0,props:void 0};return h(G,M),G}mergeEvaluated(T,M){const{it:F,gen:G}=this;!F.opts.unevaluated||(F.props!==!0&&T.props!==void 0&&(F.props=$.mergeEvaluated.props(G,T.props,F.props,M)),F.items!==!0&&T.items!==void 0&&(F.items=$.mergeEvaluated.items(G,T.items,F.items,M)))}mergeValidEvaluated(T,M){const{it:F,gen:G}=this;if(F.opts.unevaluated&&(F.props!==!0||F.items!==!0))return G.if(M,()=>this.mergeEvaluated(T,r.Name)),!0}}e.KeywordCxt=k;function L(E,T,M,F){const G=new k(E,M,T);"code"in M?M.code(G,F):G.$data&&M.validate?(0,s.funcKeywordCode)(G,M):"macro"in M?(0,s.macroKeywordCode)(G,M):(M.compile||M.validate)&&(0,s.funcKeywordCode)(G,M)}const J=/^\/(?:[^~]|~0|~1)*$/,Q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(E,{dataLevel:T,dataNames:M,dataPathArr:F}){let G,B;if(E==="")return c.default.rootData;if(E[0]==="/"){if(!J.test(E))throw new Error(`Invalid JSON-pointer: ${E}`);G=E,B=c.default.rootData}else{const ne=Q.exec(E);if(!ne)throw new Error(`Invalid JSON-pointer: ${E}`);const ee=+ne[1];if(G=ne[2],G==="#"){if(ee>=T)throw new Error(te("property/index",ee));return F[T-ee]}if(ee>T)throw new Error(te("data",ee));if(B=M[T-ee],!G)return B}let x=B;const se=G.split("/");for(const ne of se)ne&&(B=(0,r._)`${B}${(0,r.getProperty)((0,$.unescapeJsonPointer)(ne))}`,x=(0,r._)`${x} && ${B}`);return x;function te(ne,ee){return`Cannot access ${ne} ${ee} levels up, current level is ${T}`}}e.getData=W},47366:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;const t=i(15923),y=i(92115),w=i(7861),m=i(76028);function S(j,O){const{gen:C,keyword:o,schema:a,parentSchema:v,it:l}=j,h=O.macro.call(l.self,a,v,l),b=g(C,o,h);l.opts.validateSchema!==!1&&l.self.validateSchema(h,!0);const f=C.name("valid");j.subschema({schema:h,schemaPath:t.nil,errSchemaPath:`${l.errSchemaPath}/${o}`,topSchemaRef:b,compositeRule:!0},f),j.pass(f,()=>j.error(!0))}e.macroKeywordCode=S;function s(j,O){var C;const{gen:o,keyword:a,schema:v,parentSchema:l,$data:h,it:b}=j;c(b,O);const f=!h&&O.compile?O.compile.call(b.self,v,l,b):O.validate,u=g(o,a,f),_=o.let("valid");j.block$data(_,I),j.ok((C=O.valid)!==null&&C!==void 0?C:_);function I(){if(O.errors===!1)U(),O.modifying&&d(j),Z(()=>j.error());else{const H=O.async?D():K();O.modifying&&d(j),Z(()=>r(j,H))}}function D(){const H=o.let("ruleErrs",null);return o.try(()=>U((0,t._)`await `),X=>o.assign(_,!1).if((0,t._)`${X} instanceof ${b.ValidationError}`,()=>o.assign(H,(0,t._)`${X}.errors`),()=>o.throw(X))),H}function K(){const H=(0,t._)`${u}.errors`;return o.assign(H,null),U(t.nil),H}function U(H=O.async?(0,t._)`await `:t.nil){const X=b.opts.passContext?y.default.this:y.default.self,q=!("compile"in O&&!h||O.schema===!1);o.assign(_,(0,t._)`${H}${(0,w.callValidateCode)(j,u,X,q)}`,O.modifying)}function Z(H){var X;o.if((0,t.not)((X=O.valid)!==null&&X!==void 0?X:_),H)}}e.funcKeywordCode=s;function d(j){const{gen:O,data:C,it:o}=j;O.if(o.parentData,()=>O.assign(C,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function r(j,O){const{gen:C}=j;C.if((0,t._)`Array.isArray(${O})`,()=>{C.assign(y.default.vErrors,(0,t._)`${y.default.vErrors} === null ? ${O} : ${y.default.vErrors}.concat(${O})`).assign(y.default.errors,(0,t._)`${y.default.vErrors}.length`),(0,m.extendErrors)(j)},()=>j.error())}function c({schemaEnv:j},O){if(O.async&&!j.$async)throw new Error("async keyword in sync schema")}function g(j,O,C){if(C===void 0)throw new Error(`keyword "${O}" failed to compile`);return j.scopeValue("keyword",typeof C=="function"?{ref:C}:{ref:C,code:(0,t.stringify)(C)})}function $(j,O,C=!1){return!O.length||O.some(o=>o==="array"?Array.isArray(j):o==="object"?j&&typeof j=="object"&&!Array.isArray(j):typeof j==o||C&&typeof j=="undefined")}e.validSchemaType=$;function N({schema:j,opts:O,self:C,errSchemaPath:o},a,v){if(Array.isArray(a.keyword)?!a.keyword.includes(v):a.keyword!==v)throw new Error("ajv implementation error");const l=a.dependencies;if(l!=null&&l.some(h=>!Object.prototype.hasOwnProperty.call(j,h)))throw new Error(`parent schema must have dependencies of ${v}: ${l.join(",")}`);if(a.validateSchema&&!a.validateSchema(j[v])){const b=`keyword "${v}" value is invalid at path "${o}": `+C.errorsText(a.validateSchema.errors);if(O.validateSchema==="log")C.logger.error(b);else throw new Error(b)}}e.validateKeywordUsage=N},62795:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;const t=i(15923),y=i(91571);function w(s,{keyword:d,schemaProp:r,schema:c,schemaPath:g,errSchemaPath:$,topSchemaRef:N}){if(d!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const j=s.schema[d];return r===void 0?{schema:j,schemaPath:(0,t._)`${s.schemaPath}${(0,t.getProperty)(d)}`,errSchemaPath:`${s.errSchemaPath}/${d}`}:{schema:j[r],schemaPath:(0,t._)`${s.schemaPath}${(0,t.getProperty)(d)}${(0,t.getProperty)(r)}`,errSchemaPath:`${s.errSchemaPath}/${d}/${(0,y.escapeFragment)(r)}`}}if(c!==void 0){if(g===void 0||$===void 0||N===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:g,topSchemaRef:N,errSchemaPath:$}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=w;function m(s,d,{dataProp:r,dataPropType:c,data:g,dataTypes:$,propertyName:N}){if(g!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:j}=d;if(r!==void 0){const{errorPath:C,dataPathArr:o,opts:a}=d,v=j.let("data",(0,t._)`${d.data}${(0,t.getProperty)(r)}`,!0);O(v),s.errorPath=(0,t.str)`${C}${(0,y.getErrorPath)(r,c,a.jsPropertySyntax)}`,s.parentDataProperty=(0,t._)`${r}`,s.dataPathArr=[...o,s.parentDataProperty]}if(g!==void 0){const C=g instanceof t.Name?g:j.let("data",g,!0);O(C),N!==void 0&&(s.propertyName=N)}$&&(s.dataTypes=$);function O(C){s.data=C,s.dataLevel=d.dataLevel+1,s.dataTypes=[],d.definedProperties=new Set,s.parentData=d.data,s.dataNames=[...d.dataNames,C]}}e.extendSubschemaData=m;function S(s,{jtdDiscriminator:d,jtdMetadata:r,compositeRule:c,createErrors:g,allErrors:$}){c!==void 0&&(s.compositeRule=c),g!==void 0&&(s.createErrors=g),$!==void 0&&(s.allErrors=$),s.jtdDiscriminator=d,s.jtdMetadata=r}e.extendSubschemaMode=S},49241:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=i(4998);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var y=i(15923);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});const w=i(14282),m=i(24186),S=i(22825),s=i(76968),d=i(15923),r=i(48147),c=i(31411),g=i(91571),$=i(338),N=i(32726),j=(V,P)=>new RegExp(V,P);j.code="new RegExp";const O=["removeAdditional","useDefaults","coerceTypes"],C=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),o={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},a={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function l(V){var P,A,R,n,p,k,L,J,Q,W,E,T,M,F,G,B,x,se,te,ne,ee,ie,re,le,ue;const ce=V.strict,de=(P=V.code)===null||P===void 0?void 0:P.optimize,fe=de===!0||de===void 0?1:de||0,he=(R=(A=V.code)===null||A===void 0?void 0:A.regExp)!==null&&R!==void 0?R:j,me=(n=V.uriResolver)!==null&&n!==void 0?n:N.default;return{strictSchema:(k=(p=V.strictSchema)!==null&&p!==void 0?p:ce)!==null&&k!==void 0?k:!0,strictNumbers:(J=(L=V.strictNumbers)!==null&&L!==void 0?L:ce)!==null&&J!==void 0?J:!0,strictTypes:(W=(Q=V.strictTypes)!==null&&Q!==void 0?Q:ce)!==null&&W!==void 0?W:"log",strictTuples:(T=(E=V.strictTuples)!==null&&E!==void 0?E:ce)!==null&&T!==void 0?T:"log",strictRequired:(F=(M=V.strictRequired)!==null&&M!==void 0?M:ce)!==null&&F!==void 0?F:!1,code:V.code?{...V.code,optimize:fe,regExp:he}:{optimize:fe,regExp:he},loopRequired:(G=V.loopRequired)!==null&&G!==void 0?G:v,loopEnum:(B=V.loopEnum)!==null&&B!==void 0?B:v,meta:(x=V.meta)!==null&&x!==void 0?x:!0,messages:(se=V.messages)!==null&&se!==void 0?se:!0,inlineRefs:(te=V.inlineRefs)!==null&&te!==void 0?te:!0,schemaId:(ne=V.schemaId)!==null&&ne!==void 0?ne:"$id",addUsedSchema:(ee=V.addUsedSchema)!==null&&ee!==void 0?ee:!0,validateSchema:(ie=V.validateSchema)!==null&&ie!==void 0?ie:!0,validateFormats:(re=V.validateFormats)!==null&&re!==void 0?re:!0,unicodeRegExp:(le=V.unicodeRegExp)!==null&&le!==void 0?le:!0,int32range:(ue=V.int32range)!==null&&ue!==void 0?ue:!0,uriResolver:me}}class h{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...l(P)};const{es5:A,lines:R}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:C,es5:A,lines:R}),this.logger=U(P.logger);const n=P.validateFormats;P.validateFormats=!1,this.RULES=(0,S.getRules)(),b.call(this,o,P,"NOT SUPPORTED"),b.call(this,a,P,"DEPRECATED","warn"),this._metaOpts=D.call(this),P.formats&&_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&I.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),u.call(this),P.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:A,schemaId:R}=this.opts;let n=$;R==="id"&&(n={...$},n.id=n.$id,delete n.$id),A&&P&&this.addMetaSchema(n,n[R],!1)}defaultMeta(){const{meta:P,schemaId:A}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[A]||P:void 0}validate(P,A){let R;if(typeof P=="string"){if(R=this.getSchema(P),!R)throw new Error(`no schema with key or ref "${P}"`)}else R=this.compile(P);const n=R(A);return"$async"in R||(this.errors=R.errors),n}compile(P,A){const R=this._addSchema(P,A);return R.validate||this._compileSchemaEnv(R)}compileAsync(P,A){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return n.call(this,P,A);async function n(W,E){await p.call(this,W.$schema);const T=this._addSchema(W,E);return T.validate||k.call(this,T)}async function p(W){W&&!this.getSchema(W)&&await n.call(this,{$ref:W},!0)}async function k(W){try{return this._compileSchemaEnv(W)}catch(E){if(!(E instanceof m.default))throw E;return L.call(this,E),await J.call(this,E.missingSchema),k.call(this,W)}}function L({missingSchema:W,missingRef:E}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${E} cannot be resolved`)}async function J(W){const E=await Q.call(this,W);this.refs[W]||await p.call(this,E.$schema),this.refs[W]||this.addSchema(E,W,A)}async function Q(W){const E=this._loading[W];if(E)return E;try{return await(this._loading[W]=R(W))}finally{delete this._loading[W]}}}addSchema(P,A,R,n=this.opts.validateSchema){if(Array.isArray(P)){for(const k of P)this.addSchema(k,void 0,R,n);return this}let p;if(typeof P=="object"){const{schemaId:k}=this.opts;if(p=P[k],p!==void 0&&typeof p!="string")throw new Error(`schema ${k} must be string`)}return A=(0,r.normalizeId)(A||p),this._checkUnique(A),this.schemas[A]=this._addSchema(P,R,A,n,!0),this}addMetaSchema(P,A,R=this.opts.validateSchema){return this.addSchema(P,A,!0,R),this}validateSchema(P,A){if(typeof P=="boolean")return!0;let R;if(R=P.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(R,P);if(!n&&A){const p="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(p);else throw new Error(p)}return n}getSchema(P){let A;for(;typeof(A=f.call(this,P))=="string";)P=A;if(A===void 0){const{schemaId:R}=this.opts,n=new s.SchemaEnv({schema:{},schemaId:R});if(A=s.resolveSchema.call(this,n,P),!A)return;this.refs[P]=A}return A.validate||this._compileSchemaEnv(A)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const A=f.call(this,P);return typeof A=="object"&&this._cache.delete(A.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const A=P;this._cache.delete(A);let R=P[this.opts.schemaId];return R&&(R=(0,r.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const A of P)this.addKeyword(A);return this}addKeyword(P,A){let R;if(typeof P=="string")R=P,typeof A=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),A.keyword=R);else if(typeof P=="object"&&A===void 0){if(A=P,R=A.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(H.call(this,R,A),!A)return(0,g.eachItem)(R,p=>X.call(this,p)),this;ae.call(this,A);const n={...A,type:(0,c.getJSONTypes)(A.type),schemaType:(0,c.getJSONTypes)(A.schemaType)};return(0,g.eachItem)(R,n.type.length===0?p=>X.call(this,p,n):p=>n.type.forEach(k=>X.call(this,p,n,k))),this}getKeyword(P){const A=this.RULES.all[P];return typeof A=="object"?A.definition:!!A}removeKeyword(P){const{RULES:A}=this;delete A.keywords[P],delete A.all[P];for(const R of A.rules){const n=R.rules.findIndex(p=>p.keyword===P);n>=0&&R.rules.splice(n,1)}return this}addFormat(P,A){return typeof A=="string"&&(A=new RegExp(A)),this.formats[P]=A,this}errorsText(P=this.errors,{separator:A=", ",dataVar:R="data"}={}){return!P||P.length===0?"No errors":P.map(n=>`${R}${n.instancePath} ${n.message}`).reduce((n,p)=>n+A+p)}$dataMetaSchema(P,A){const R=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const n of A){const p=n.split("/").slice(1);let k=P;for(const L of p)k=k[L];for(const L in R){const J=R[L];if(typeof J!="object")continue;const{$data:Q}=J.definition,W=k[L];Q&&W&&(k[L]=Y(W))}}return P}_removeAllSchemas(P,A){for(const R in P){const n=P[R];(!A||A.test(R))&&(typeof n=="string"?delete P[R]:n&&!n.meta&&(this._cache.delete(n.schema),delete P[R]))}}_addSchema(P,A,R,n=this.opts.validateSchema,p=this.opts.addUsedSchema){let k;const{schemaId:L}=this.opts;if(typeof P=="object")k=P[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(P);if(J!==void 0)return J;R=(0,r.normalizeId)(k||R);const Q=r.getSchemaRefs.call(this,P,R);return J=new s.SchemaEnv({schema:P,schemaId:L,meta:A,baseId:R,localRefs:Q}),this._cache.set(J.schema,J),p&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=J),n&&this.validateSchema(P,!0),J}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):s.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const A=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,P)}finally{this.opts=A}}}e.default=h,h.ValidationError=w.default,h.MissingRefError=m.default;function b(V,P,A,R="error"){for(const n in V){const p=n;p in P&&this.logger[R](`${A}: option ${n}. ${V[p]}`)}}function f(V){return V=(0,r.normalizeId)(V),this.schemas[V]||this.refs[V]}function u(){const V=this.opts.schemas;if(!!V)if(Array.isArray(V))this.addSchema(V);else for(const P in V)this.addSchema(V[P],P)}function _(){for(const V in this.opts.formats){const P=this.opts.formats[V];P&&this.addFormat(V,P)}}function I(V){if(Array.isArray(V)){this.addVocabulary(V);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in V){const A=V[P];A.keyword||(A.keyword=P),this.addKeyword(A)}}function D(){const V={...this.opts};for(const P of O)delete V[P];return V}const K={log(){},warn(){},error(){}};function U(V){if(V===!1)return K;if(V===void 0)return console;if(V.log&&V.warn&&V.error)return V;throw new Error("logger must implement log, warn and error methods")}const Z=/^[a-z_$][a-z0-9_$:-]*$/i;function H(V,P){const{RULES:A}=this;if((0,g.eachItem)(V,R=>{if(A.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!Z.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function X(V,P,A){var R;const n=P==null?void 0:P.post;if(A&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:p}=this;let k=n?p.post:p.rules.find(({type:J})=>J===A);if(k||(k={type:A,rules:[]},p.rules.push(k)),p.keywords[V]=!0,!P)return;const L={keyword:V,definition:{...P,type:(0,c.getJSONTypes)(P.type),schemaType:(0,c.getJSONTypes)(P.schemaType)}};P.before?q.call(this,k,L,P.before):k.rules.push(L),p.all[V]=L,(R=P.implements)===null||R===void 0||R.forEach(J=>this.addKeyword(J))}function q(V,P,A){const R=V.rules.findIndex(n=>n.keyword===A);R>=0?V.rules.splice(R,0,P):(V.rules.push(P),this.logger.warn(`rule ${A} is not defined`))}function ae(V){let{metaSchema:P}=V;P!==void 0&&(V.$data&&this.opts.$data&&(P=Y(P)),V.validateSchema=this.compile(P,!0))}const oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Y(V){return{anyOf:[V,oe]}}},10487:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(69378);t.code='require("ajv/dist/runtime/equal").default',e.default=t},77079:function(z,e){Object.defineProperty(e,"__esModule",{value:!0});function i(t){const y=t.length;let w=0,m=0,S;for(;m<y;)w++,S=t.charCodeAt(m++),S>=55296&&S<=56319&&m<y&&(S=t.charCodeAt(m),(S&64512)===56320&&m++);return w}e.default=i,i.code='require("ajv/dist/runtime/ucs2length").default'},32726:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(12854);t.code='require("ajv/dist/runtime/uri").default',e.default=t},14282:function(z,e){Object.defineProperty(e,"__esModule",{value:!0});class i extends Error{constructor(y){super("validation failed"),this.errors=y,this.ajv=this.validation=!0}}e.default=i},78789:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;const t=i(15923),y=i(91571),m={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,t._)`{limit: ${s}}`},code(s){const{parentSchema:d,it:r}=s,{items:c}=d;if(!Array.isArray(c)){(0,y.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}S(s,c)}};function S(s,d){const{gen:r,schema:c,data:g,keyword:$,it:N}=s;N.items=!0;const j=r.const("len",(0,t._)`${g}.length`);if(c===!1)s.setParams({len:d.length}),s.pass((0,t._)`${j} <= ${d.length}`);else if(typeof c=="object"&&!(0,y.alwaysValidSchema)(N,c)){const C=r.var("valid",(0,t._)`${j} <= ${d.length}`);r.if((0,t.not)(C),()=>O(C)),s.ok(C)}function O(C){r.forRange("i",d.length,j,o=>{s.subschema({keyword:$,dataProp:o,dataPropType:y.Type.Num},C),N.allErrors||r.if((0,t.not)(C),()=>r.break())})}}e.validateAdditionalItems=S,e.default=m},12964:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(7861),y=i(15923),w=i(92115),m=i(91571),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,y._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:r,schema:c,parentSchema:g,data:$,errsCount:N,it:j}=d;if(!N)throw new Error("ajv implementation error");const{allErrors:O,opts:C}=j;if(j.props=!0,C.removeAdditional!=="all"&&(0,m.alwaysValidSchema)(j,c))return;const o=(0,t.allSchemaProperties)(g.properties),a=(0,t.allSchemaProperties)(g.patternProperties);v(),d.ok((0,y._)`${N} === ${w.default.errors}`);function v(){r.forIn("key",$,u=>{!o.length&&!a.length?b(u):r.if(l(u),()=>b(u))})}function l(u){let _;if(o.length>8){const I=(0,m.schemaRefOrVal)(j,g.properties,"properties");_=(0,t.isOwnProperty)(r,I,u)}else o.length?_=(0,y.or)(...o.map(I=>(0,y._)`${u} === ${I}`)):_=y.nil;return a.length&&(_=(0,y.or)(_,...a.map(I=>(0,y._)`${(0,t.usePattern)(d,I)}.test(${u})`))),(0,y.not)(_)}function h(u){r.code((0,y._)`delete ${$}[${u}]`)}function b(u){if(C.removeAdditional==="all"||C.removeAdditional&&c===!1){h(u);return}if(c===!1){d.setParams({additionalProperty:u}),d.error(),O||r.break();return}if(typeof c=="object"&&!(0,m.alwaysValidSchema)(j,c)){const _=r.name("valid");C.removeAdditional==="failing"?(f(u,_,!1),r.if((0,y.not)(_),()=>{d.reset(),h(u)})):(f(u,_),O||r.if((0,y.not)(_),()=>r.break()))}}function f(u,_,I){const D={keyword:"additionalProperties",dataProp:u,dataPropType:m.Type.Str};I===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,_)}}};e.default=s},9076:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(91571),y={keyword:"allOf",schemaType:"array",code(w){const{gen:m,schema:S,it:s}=w;if(!Array.isArray(S))throw new Error("ajv implementation error");const d=m.name("valid");S.forEach((r,c)=>{if((0,t.alwaysValidSchema)(s,r))return;const g=w.subschema({keyword:"allOf",schemaProp:c},d);w.ok(d),w.mergeEvaluated(g)})}};e.default=y},17361:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const y={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:i(7861).validateUnion,error:{message:"must match a schema in anyOf"}};e.default=y},25483:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),m={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:S,max:s}})=>s===void 0?(0,t.str)`must contain at least ${S} valid item(s)`:(0,t.str)`must contain at least ${S} and no more than ${s} valid item(s)`,params:({params:{min:S,max:s}})=>s===void 0?(0,t._)`{minContains: ${S}}`:(0,t._)`{minContains: ${S}, maxContains: ${s}}`},code(S){const{gen:s,schema:d,parentSchema:r,data:c,it:g}=S;let $,N;const{minContains:j,maxContains:O}=r;g.opts.next?($=j===void 0?1:j,N=O):$=1;const C=s.const("len",(0,t._)`${c}.length`);if(S.setParams({min:$,max:N}),N===void 0&&$===0){(0,y.checkStrictMode)(g,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(N!==void 0&&$>N){(0,y.checkStrictMode)(g,'"minContains" > "maxContains" is always invalid'),S.fail();return}if((0,y.alwaysValidSchema)(g,d)){let h=(0,t._)`${C} >= ${$}`;N!==void 0&&(h=(0,t._)`${h} && ${C} <= ${N}`),S.pass(h);return}g.items=!0;const o=s.name("valid");N===void 0&&$===1?v(o,()=>s.if(o,()=>s.break())):$===0?(s.let(o,!0),N!==void 0&&s.if((0,t._)`${c}.length > 0`,a)):(s.let(o,!1),a()),S.result(o,()=>S.reset());function a(){const h=s.name("_valid"),b=s.let("count",0);v(h,()=>s.if(h,()=>l(b)))}function v(h,b){s.forRange("i",0,C,f=>{S.subschema({keyword:"contains",dataProp:f,dataPropType:y.Type.Num,compositeRule:!0},h),b()})}function l(h){s.code((0,t._)`${h}++`),N===void 0?s.if((0,t._)`${h} >= ${$}`,()=>s.assign(o,!0).break()):(s.if((0,t._)`${h} > ${N}`,()=>s.assign(o,!1).break()),$===1?s.assign(o,!0):s.if((0,t._)`${h} >= ${$}`,()=>s.assign(o,!0)))}}};e.default=m},61958:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=i(15923),y=i(91571),w=i(7861);e.error={message:({params:{property:r,depsCount:c,deps:g}})=>{const $=c===1?"property":"properties";return(0,t.str)`must have ${$} ${g} when property ${r} is present`},params:({params:{property:r,depsCount:c,deps:g,missingProperty:$}})=>(0,t._)`{property: ${r},
|
|
6
|
-
missingProperty: ${$},
|
|
7
|
-
depsCount: ${c},
|
|
8
|
-
deps: ${g}}`};const m={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(r){const[c,g]=S(r);s(r,c),d(r,g)}};function S({schema:r}){const c={},g={};for(const $ in r){if($==="__proto__")continue;const N=Array.isArray(r[$])?c:g;N[$]=r[$]}return[c,g]}function s(r,c=r.schema){const{gen:g,data:$,it:N}=r;if(Object.keys(c).length===0)return;const j=g.let("missing");for(const O in c){const C=c[O];if(C.length===0)continue;const o=(0,w.propertyInData)(g,$,O,N.opts.ownProperties);r.setParams({property:O,depsCount:C.length,deps:C.join(", ")}),N.allErrors?g.if(o,()=>{for(const a of C)(0,w.checkReportMissingProp)(r,a)}):(g.if((0,t._)`${o} && (${(0,w.checkMissingProp)(r,C,j)})`),(0,w.reportMissingProp)(r,j),g.else())}}e.validatePropertyDeps=s;function d(r,c=r.schema){const{gen:g,data:$,keyword:N,it:j}=r,O=g.name("valid");for(const C in c)(0,y.alwaysValidSchema)(j,c[C])||(g.if((0,w.propertyInData)(g,$,C,j.opts.ownProperties),()=>{const o=r.subschema({keyword:N,schemaProp:C},O);r.mergeValidEvaluated(o,O)},()=>g.var(O,!0)),r.ok(O))}e.validateSchemaDeps=d,e.default=m},18686:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),m={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,t.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,t._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:d,parentSchema:r,it:c}=s;r.then===void 0&&r.else===void 0&&(0,y.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const g=S(c,"then"),$=S(c,"else");if(!g&&!$)return;const N=d.let("valid",!0),j=d.name("_valid");if(O(),s.reset(),g&&$){const o=d.let("ifClause");s.setParams({ifClause:o}),d.if(j,C("then",o),C("else",o))}else g?d.if(j,C("then")):d.if((0,t.not)(j),C("else"));s.pass(N,()=>s.error(!0));function O(){const o=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},j);s.mergeEvaluated(o)}function C(o,a){return()=>{const v=s.subschema({keyword:o},j);d.assign(N,j),s.mergeValidEvaluated(v,N),a?d.assign(a,(0,t._)`${o}`):s.setParams({ifClause:o})}}}};function S(s,d){const r=s.schema[d];return r!==void 0&&!(0,y.alwaysValidSchema)(s,r)}e.default=m},74741:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(78789),y=i(65068),w=i(9256),m=i(14882),S=i(25483),s=i(61958),d=i(88806),r=i(12964),c=i(97558),g=i(52914),$=i(69546),N=i(17361),j=i(74872),O=i(9076),C=i(18686),o=i(15269);function a(v=!1){const l=[$.default,N.default,j.default,O.default,C.default,o.default,d.default,r.default,s.default,c.default,g.default];return v?l.push(y.default,m.default):l.push(t.default,w.default),l.push(S.default),l}e.default=a},9256:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;const t=i(15923),y=i(91571),w=i(7861),m={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:d,it:r}=s;if(Array.isArray(d))return S(s,"additionalItems",d);r.items=!0,!(0,y.alwaysValidSchema)(r,d)&&s.ok((0,w.validateArray)(s))}};function S(s,d,r=s.schema){const{gen:c,parentSchema:g,data:$,keyword:N,it:j}=s;o(g),j.opts.unevaluated&&r.length&&j.items!==!0&&(j.items=y.mergeEvaluated.items(c,r.length,j.items));const O=c.name("valid"),C=c.const("len",(0,t._)`${$}.length`);r.forEach((a,v)=>{(0,y.alwaysValidSchema)(j,a)||(c.if((0,t._)`${C} > ${v}`,()=>s.subschema({keyword:N,schemaProp:v,dataProp:v},O)),s.ok(O))});function o(a){const{opts:v,errSchemaPath:l}=j,h=r.length,b=h===a.minItems&&(h===a.maxItems||a[d]===!1);if(v.strictTuples&&!b){const f=`"${N}" is ${h}-tuple, but minItems or maxItems/${d} are not specified or different at path "${l}"`;(0,y.checkStrictMode)(j,f,v.strictTuples)}}}e.validateTuple=S,e.default=m},14882:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),w=i(7861),m=i(78789),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,t.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,t._)`{limit: ${d}}`},code(d){const{schema:r,parentSchema:c,it:g}=d,{prefixItems:$}=c;g.items=!0,!(0,y.alwaysValidSchema)(g,r)&&($?(0,m.validateAdditionalItems)(d,$):d.ok((0,w.validateArray)(d)))}};e.default=s},69546:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(91571),y={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(w){const{gen:m,schema:S,it:s}=w;if((0,t.alwaysValidSchema)(s,S)){w.fail();return}const d=m.name("valid");w.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),w.failResult(d,()=>w.reset(),()=>w.error())},error:{message:"must NOT be valid"}};e.default=y},74872:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),m={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:S})=>(0,t._)`{passingSchemas: ${S.passing}}`},code(S){const{gen:s,schema:d,parentSchema:r,it:c}=S;if(!Array.isArray(d))throw new Error("ajv implementation error");if(c.opts.discriminator&&r.discriminator)return;const g=d,$=s.let("valid",!1),N=s.let("passing",null),j=s.name("_valid");S.setParams({passing:N}),s.block(O),S.result($,()=>S.reset(),()=>S.error(!0));function O(){g.forEach((C,o)=>{let a;(0,y.alwaysValidSchema)(c,C)?s.var(j,!0):a=S.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},j),o>0&&s.if((0,t._)`${j} && ${$}`).assign($,!1).assign(N,(0,t._)`[${N}, ${o}]`).else(),s.if(j,()=>{s.assign($,!0),s.assign(N,o),a&&S.mergeEvaluated(a,t.Name)})})}}};e.default=m},52914:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(7861),y=i(15923),w=i(91571),m=i(91571),S={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:d,schema:r,data:c,parentSchema:g,it:$}=s,{opts:N}=$,j=(0,t.allSchemaProperties)(r),O=j.filter(b=>(0,w.alwaysValidSchema)($,r[b]));if(j.length===0||O.length===j.length&&(!$.opts.unevaluated||$.props===!0))return;const C=N.strictSchema&&!N.allowMatchingProperties&&g.properties,o=d.name("valid");$.props!==!0&&!($.props instanceof y.Name)&&($.props=(0,m.evaluatedPropsToName)(d,$.props));const{props:a}=$;v();function v(){for(const b of j)C&&l(b),$.allErrors?h(b):(d.var(o,!0),h(b),d.if(o))}function l(b){for(const f in C)new RegExp(b).test(f)&&(0,w.checkStrictMode)($,`property ${f} matches pattern ${b} (use allowMatchingProperties)`)}function h(b){d.forIn("key",c,f=>{d.if((0,y._)`${(0,t.usePattern)(s,b)}.test(${f})`,()=>{const u=O.includes(b);u||s.subschema({keyword:"patternProperties",schemaProp:b,dataProp:f,dataPropType:m.Type.Str},o),$.opts.unevaluated&&a!==!0?d.assign((0,y._)`${a}[${f}]`,!0):!u&&!$.allErrors&&d.if((0,y.not)(o),()=>d.break())})})}}};e.default=S},65068:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(9256),y={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:w=>(0,t.validateTuple)(w,"items")};e.default=y},97558:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(4998),y=i(7861),w=i(91571),m=i(12964),S={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:d,schema:r,parentSchema:c,data:g,it:$}=s;$.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&m.default.code(new t.KeywordCxt($,m.default,"additionalProperties"));const N=(0,y.allSchemaProperties)(r);for(const a of N)$.definedProperties.add(a);$.opts.unevaluated&&N.length&&$.props!==!0&&($.props=w.mergeEvaluated.props(d,(0,w.toHash)(N),$.props));const j=N.filter(a=>!(0,w.alwaysValidSchema)($,r[a]));if(j.length===0)return;const O=d.name("valid");for(const a of j)C(a)?o(a):(d.if((0,y.propertyInData)(d,g,a,$.opts.ownProperties)),o(a),$.allErrors||d.else().var(O,!0),d.endIf()),s.it.definedProperties.add(a),s.ok(O);function C(a){return $.opts.useDefaults&&!$.compositeRule&&r[a].default!==void 0}function o(a){s.subschema({keyword:"properties",schemaProp:a,dataProp:a},O)}}};e.default=S},88806:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),m={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:S})=>(0,t._)`{propertyName: ${S.propertyName}}`},code(S){const{gen:s,schema:d,data:r,it:c}=S;if((0,y.alwaysValidSchema)(c,d))return;const g=s.name("valid");s.forIn("key",r,$=>{S.setParams({propertyName:$}),S.subschema({keyword:"propertyNames",data:$,dataTypes:["string"],propertyName:$,compositeRule:!0},g),s.if((0,t.not)(g),()=>{S.error(!0),c.allErrors||s.break()})}),S.ok(g)}};e.default=m},15269:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(91571),y={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:w,parentSchema:m,it:S}){m.if===void 0&&(0,t.checkStrictMode)(S,`"${w}" without "if" is ignored`)}};e.default=y},7861:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;const t=i(15923),y=i(91571),w=i(92115),m=i(91571);function S(l,h){const{gen:b,data:f,it:u}=l;b.if($(b,f,h,u.opts.ownProperties),()=>{l.setParams({missingProperty:(0,t._)`${h}`},!0),l.error()})}e.checkReportMissingProp=S;function s({gen:l,data:h,it:{opts:b}},f,u){return(0,t.or)(...f.map(_=>(0,t.and)($(l,h,_,b.ownProperties),(0,t._)`${u} = ${_}`)))}e.checkMissingProp=s;function d(l,h){l.setParams({missingProperty:h},!0),l.error()}e.reportMissingProp=d;function r(l){return l.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=r;function c(l,h,b){return(0,t._)`${r(l)}.call(${h}, ${b})`}e.isOwnProperty=c;function g(l,h,b,f){const u=(0,t._)`${h}${(0,t.getProperty)(b)} !== undefined`;return f?(0,t._)`${u} && ${c(l,h,b)}`:u}e.propertyInData=g;function $(l,h,b,f){const u=(0,t._)`${h}${(0,t.getProperty)(b)} === undefined`;return f?(0,t.or)(u,(0,t.not)(c(l,h,b))):u}e.noPropertyInData=$;function N(l){return l?Object.keys(l).filter(h=>h!=="__proto__"):[]}e.allSchemaProperties=N;function j(l,h){return N(h).filter(b=>!(0,y.alwaysValidSchema)(l,h[b]))}e.schemaProperties=j;function O({schemaCode:l,data:h,it:{gen:b,topSchemaRef:f,schemaPath:u,errorPath:_},it:I},D,K,U){const Z=U?(0,t._)`${l}, ${h}, ${f}${u}`:h,H=[[w.default.instancePath,(0,t.strConcat)(w.default.instancePath,_)],[w.default.parentData,I.parentData],[w.default.parentDataProperty,I.parentDataProperty],[w.default.rootData,w.default.rootData]];I.opts.dynamicRef&&H.push([w.default.dynamicAnchors,w.default.dynamicAnchors]);const X=(0,t._)`${Z}, ${b.object(...H)}`;return K!==t.nil?(0,t._)`${D}.call(${K}, ${X})`:(0,t._)`${D}(${X})`}e.callValidateCode=O;const C=(0,t._)`new RegExp`;function o({gen:l,it:{opts:h}},b){const f=h.unicodeRegExp?"u":"",{regExp:u}=h.code,_=u(b,f);return l.scopeValue("pattern",{key:_.toString(),ref:_,code:(0,t._)`${u.code==="new RegExp"?C:(0,m.useFunc)(l,u)}(${b}, ${f})`})}e.usePattern=o;function a(l){const{gen:h,data:b,keyword:f,it:u}=l,_=h.name("valid");if(u.allErrors){const D=h.let("valid",!0);return I(()=>h.assign(D,!1)),D}return h.var(_,!0),I(()=>h.break()),_;function I(D){const K=h.const("len",(0,t._)`${b}.length`);h.forRange("i",0,K,U=>{l.subschema({keyword:f,dataProp:U,dataPropType:y.Type.Num},_),h.if((0,t.not)(_),D)})}}e.validateArray=a;function v(l){const{gen:h,schema:b,keyword:f,it:u}=l;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(K=>(0,y.alwaysValidSchema)(u,K))&&!u.opts.unevaluated)return;const I=h.let("valid",!1),D=h.name("_valid");h.block(()=>b.forEach((K,U)=>{const Z=l.subschema({keyword:f,schemaProp:U,compositeRule:!0},D);h.assign(I,(0,t._)`${I} || ${D}`),l.mergeValidEvaluated(Z,D)||h.if((0,t.not)(I))})),l.result(I,()=>l.reset(),()=>l.error(!0))}e.validateUnion=v},95923:function(z,e){Object.defineProperty(e,"__esModule",{value:!0});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=i},35479:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(95923),y=i(61905),w=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,y.default];e.default=w},61905:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;const t=i(24186),y=i(7861),w=i(15923),m=i(92115),S=i(76968),s=i(91571),d={keyword:"$ref",schemaType:"string",code(g){const{gen:$,schema:N,it:j}=g,{baseId:O,schemaEnv:C,validateName:o,opts:a,self:v}=j,{root:l}=C;if((N==="#"||N==="#/")&&O===l.baseId)return b();const h=S.resolveRef.call(v,l,O,N);if(h===void 0)throw new t.default(j.opts.uriResolver,O,N);if(h instanceof S.SchemaEnv)return f(h);return u(h);function b(){if(C===l)return c(g,o,C,C.$async);const _=$.scopeValue("root",{ref:l});return c(g,(0,w._)`${_}.validate`,l,l.$async)}function f(_){const I=r(g,_);c(g,I,_,_.$async)}function u(_){const I=$.scopeValue("schema",a.code.source===!0?{ref:_,code:(0,w.stringify)(_)}:{ref:_}),D=$.name("valid"),K=g.subschema({schema:_,dataTypes:[],schemaPath:w.nil,topSchemaRef:I,errSchemaPath:N},D);g.mergeEvaluated(K),g.ok(D)}}};function r(g,$){const{gen:N}=g;return $.validate?N.scopeValue("validate",{ref:$.validate}):(0,w._)`${N.scopeValue("wrapper",{ref:$})}.validate`}e.getValidate=r;function c(g,$,N,j){const{gen:O,it:C}=g,{allErrors:o,schemaEnv:a,opts:v}=C,l=v.passContext?m.default.this:w.nil;j?h():b();function h(){if(!a.$async)throw new Error("async schema referenced by sync schema");const _=O.let("valid");O.try(()=>{O.code((0,w._)`await ${(0,y.callValidateCode)(g,$,l)}`),u($),o||O.assign(_,!0)},I=>{O.if((0,w._)`!(${I} instanceof ${C.ValidationError})`,()=>O.throw(I)),f(I),o||O.assign(_,!1)}),g.ok(_)}function b(){g.result((0,y.callValidateCode)(g,$,l),()=>u($),()=>f($))}function f(_){const I=(0,w._)`${_}.errors`;O.assign(m.default.vErrors,(0,w._)`${m.default.vErrors} === null ? ${I} : ${m.default.vErrors}.concat(${I})`),O.assign(m.default.errors,(0,w._)`${m.default.vErrors}.length`)}function u(_){var I;if(!C.opts.unevaluated)return;const D=(I=N==null?void 0:N.validate)===null||I===void 0?void 0:I.evaluated;if(C.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(C.props=s.mergeEvaluated.props(O,D.props,C.props));else{const K=O.var("props",(0,w._)`${_}.evaluated.props`);C.props=s.mergeEvaluated.props(O,K,C.props,w.Name)}if(C.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(C.items=s.mergeEvaluated.items(O,D.items,C.items));else{const K=O.var("items",(0,w._)`${_}.evaluated.items`);C.items=s.mergeEvaluated.items(O,K,C.items,w.Name)}}}e.callRef=c,e.default=d},86825:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91072),w=i(76968),m=i(91571),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:d,tagName:r}})=>d===y.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:d,tag:r,tagName:c}})=>(0,t._)`{error: ${d}, tag: ${c}, tagValue: ${r}}`},code(d){const{gen:r,data:c,schema:g,parentSchema:$,it:N}=d,{oneOf:j}=$;if(!N.opts.discriminator)throw new Error("discriminator: requires discriminator option");const O=g.propertyName;if(typeof O!="string")throw new Error("discriminator: requires propertyName");if(g.mapping)throw new Error("discriminator: mapping is not supported");if(!j)throw new Error("discriminator: requires oneOf keyword");const C=r.let("valid",!1),o=r.const("tag",(0,t._)`${c}${(0,t.getProperty)(O)}`);r.if((0,t._)`typeof ${o} == "string"`,()=>a(),()=>d.error(!1,{discrError:y.DiscrError.Tag,tag:o,tagName:O})),d.ok(C);function a(){const h=l();r.if(!1);for(const b in h)r.elseIf((0,t._)`${o} === ${b}`),r.assign(C,v(h[b]));r.else(),d.error(!1,{discrError:y.DiscrError.Mapping,tag:o,tagName:O}),r.endIf()}function v(h){const b=r.name("valid"),f=d.subschema({keyword:"oneOf",schemaProp:h},b);return d.mergeEvaluated(f,t.Name),b}function l(){var h;const b={},f=_($);let u=!0;for(let K=0;K<j.length;K++){let U=j[K];(U==null?void 0:U.$ref)&&!(0,m.schemaHasRulesButRef)(U,N.self.RULES)&&(U=w.resolveRef.call(N.self,N.schemaEnv.root,N.baseId,U==null?void 0:U.$ref),U instanceof w.SchemaEnv&&(U=U.schema));const Z=(h=U==null?void 0:U.properties)===null||h===void 0?void 0:h[O];if(typeof Z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${O}"`);u=u&&(f||_(U)),I(Z,K)}if(!u)throw new Error(`discriminator: "${O}" must be required`);return b;function _({required:K}){return Array.isArray(K)&&K.includes(O)}function I(K,U){if(K.const)D(K.const,U);else if(K.enum)for(const Z of K.enum)D(Z,U);else throw new Error(`discriminator: "properties/${O}" must have "const" or "enum"`)}function D(K,U){if(typeof K!="string"||K in b)throw new Error(`discriminator: "${O}" values must be unique strings`);b[K]=U}}}};e.default=s},91072:function(z,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var i;(function(t){t.Tag="tag",t.Mapping="mapping"})(i=e.DiscrError||(e.DiscrError={}))},20361:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(35479),y=i(31226),w=i(74741),m=i(50051),S=i(17148),s=[t.default,y.default,(0,w.default)(),m.default,S.metadataVocabulary,S.contentVocabulary];e.default=s},41656:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),w={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:m})=>(0,t.str)`must match format "${m}"`,params:({schemaCode:m})=>(0,t._)`{format: ${m}}`},code(m,S){const{gen:s,data:d,$data:r,schema:c,schemaCode:g,it:$}=m,{opts:N,errSchemaPath:j,schemaEnv:O,self:C}=$;if(!N.validateFormats)return;r?o():a();function o(){const v=s.scopeValue("formats",{ref:C.formats,code:N.code.formats}),l=s.const("fDef",(0,t._)`${v}[${g}]`),h=s.let("fType"),b=s.let("format");s.if((0,t._)`typeof ${l} == "object" && !(${l} instanceof RegExp)`,()=>s.assign(h,(0,t._)`${l}.type || "string"`).assign(b,(0,t._)`${l}.validate`),()=>s.assign(h,(0,t._)`"string"`).assign(b,l)),m.fail$data((0,t.or)(f(),u()));function f(){return N.strictSchema===!1?t.nil:(0,t._)`${g} && !${b}`}function u(){const _=O.$async?(0,t._)`(${l}.async ? await ${b}(${d}) : ${b}(${d}))`:(0,t._)`${b}(${d})`,I=(0,t._)`(typeof ${b} == "function" ? ${_} : ${b}.test(${d}))`;return(0,t._)`${b} && ${b} !== true && ${h} === ${S} && !${I}`}}function a(){const v=C.formats[c];if(!v){f();return}if(v===!0)return;const[l,h,b]=u(v);l===S&&m.pass(_());function f(){if(N.strictSchema===!1){C.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${c}" ignored in schema at path "${j}"`}}function u(I){const D=I instanceof RegExp?(0,t.regexpCode)(I):N.code.formats?(0,t._)`${N.code.formats}${(0,t.getProperty)(c)}`:void 0,K=s.scopeValue("formats",{key:c,ref:I,code:D});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${K}.validate`]:["string",I,K]}function _(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!O.$async)throw new Error("async format in sync schema");return(0,t._)`await ${b}(${d})`}return typeof h=="function"?(0,t._)`${b}(${d})`:(0,t._)`${b}.test(${d})`}}}};e.default=w},50051:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const y=[i(41656).default];e.default=y},17148:function(z,e){Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},11498:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),w=i(10487),S={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,t._)`{allowedValue: ${s}}`},code(s){const{gen:d,data:r,$data:c,schemaCode:g,schema:$}=s;c||$&&typeof $=="object"?s.fail$data((0,t._)`!${(0,y.useFunc)(d,w.default)}(${r}, ${g})`):s.fail((0,t._)`${$} !== ${r}`)}};e.default=S},70269:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),w=i(10487),S={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,t._)`{allowedValues: ${s}}`},code(s){const{gen:d,data:r,$data:c,schema:g,schemaCode:$,it:N}=s;if(!c&&g.length===0)throw new Error("enum must have non-empty array");const j=g.length>=N.opts.loopEnum;let O;const C=()=>O!=null?O:O=(0,y.useFunc)(d,w.default);let o;if(j||c)o=d.let("valid"),s.block$data(o,a);else{if(!Array.isArray(g))throw new Error("ajv implementation error");const l=d.const("vSchema",$);o=(0,t.or)(...g.map((h,b)=>v(l,b)))}s.pass(o);function a(){d.assign(o,!1),d.forOf("v",$,l=>d.if((0,t._)`${C()}(${r}, ${l})`,()=>d.assign(o,!0).break()))}function v(l,h){const b=g[h];return typeof b=="object"&&b!==null?(0,t._)`${C()}(${r}, ${l}[${h}])`:(0,t._)`${r} === ${b}`}}};e.default=S},31226:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(94885),y=i(32066),w=i(97997),m=i(52787),S=i(12674),s=i(35390),d=i(20262),r=i(86534),c=i(11498),g=i(70269),$=[t.default,y.default,w.default,m.default,S.default,s.default,d.default,r.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,g.default];e.default=$},20262:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),w={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:S}){const s=m==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${S} items`},params:({schemaCode:m})=>(0,t._)`{limit: ${m}}`},code(m){const{keyword:S,data:s,schemaCode:d}=m,r=S==="maxItems"?t.operators.GT:t.operators.LT;m.fail$data((0,t._)`${s}.length ${r} ${d}`)}};e.default=w},97997:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=i(91571),w=i(77079),S={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:d}){const r=s==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${r} than ${d} characters`},params:({schemaCode:s})=>(0,t._)`{limit: ${s}}`},code(s){const{keyword:d,data:r,schemaCode:c,it:g}=s,$=d==="maxLength"?t.operators.GT:t.operators.LT,N=g.opts.unicode===!1?(0,t._)`${r}.length`:(0,t._)`${(0,y.useFunc)(s.gen,w.default)}(${r})`;s.fail$data((0,t._)`${N} ${$} ${c}`)}};e.default=S},94885:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),y=t.operators,w={maximum:{okStr:"<=",ok:y.LTE,fail:y.GT},minimum:{okStr:">=",ok:y.GTE,fail:y.LT},exclusiveMaximum:{okStr:"<",ok:y.LT,fail:y.GTE},exclusiveMinimum:{okStr:">",ok:y.GT,fail:y.LTE}},m={message:({keyword:s,schemaCode:d})=>(0,t.str)`must be ${w[s].okStr} ${d}`,params:({keyword:s,schemaCode:d})=>(0,t._)`{comparison: ${w[s].okStr}, limit: ${d}}`},S={keyword:Object.keys(w),type:"number",schemaType:"number",$data:!0,error:m,code(s){const{keyword:d,data:r,schemaCode:c}=s;s.fail$data((0,t._)`${r} ${w[d].fail} ${c} || isNaN(${r})`)}};e.default=S},12674:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),w={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:S}){const s=m==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${S} properties`},params:({schemaCode:m})=>(0,t._)`{limit: ${m}}`},code(m){const{keyword:S,data:s,schemaCode:d}=m,r=S==="maxProperties"?t.operators.GT:t.operators.LT;m.fail$data((0,t._)`Object.keys(${s}).length ${r} ${d}`)}};e.default=w},32066:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(15923),w={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:m})=>(0,t.str)`must be multiple of ${m}`,params:({schemaCode:m})=>(0,t._)`{multipleOf: ${m}}`},code(m){const{gen:S,data:s,schemaCode:d,it:r}=m,c=r.opts.multipleOfPrecision,g=S.let("res"),$=c?(0,t._)`Math.abs(Math.round(${g}) - ${g}) > 1e-${c}`:(0,t._)`${g} !== parseInt(${g})`;m.fail$data((0,t._)`(${d} === 0 || (${g} = ${s}/${d}, ${$}))`)}};e.default=w},52787:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(7861),y=i(15923),m={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:S})=>(0,y.str)`must match pattern "${S}"`,params:({schemaCode:S})=>(0,y._)`{pattern: ${S}}`},code(S){const{data:s,$data:d,schema:r,schemaCode:c,it:g}=S,$=g.opts.unicodeRegExp?"u":"",N=d?(0,y._)`(new RegExp(${c}, ${$}))`:(0,t.usePattern)(S,r);S.fail$data((0,y._)`!${N}.test(${s})`)}};e.default=m},35390:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(7861),y=i(15923),w=i(91571),S={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,y.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,y._)`{missingProperty: ${s}}`},code(s){const{gen:d,schema:r,schemaCode:c,data:g,$data:$,it:N}=s,{opts:j}=N;if(!$&&r.length===0)return;const O=r.length>=j.loopRequired;if(N.allErrors?C():o(),j.strictRequired){const l=s.parentSchema.properties,{definedProperties:h}=s.it;for(const b of r)if((l==null?void 0:l[b])===void 0&&!h.has(b)){const f=N.schemaEnv.baseId+N.errSchemaPath,u=`required property "${b}" is not defined at "${f}" (strictRequired)`;(0,w.checkStrictMode)(N,u,N.opts.strictRequired)}}function C(){if(O||$)s.block$data(y.nil,a);else for(const l of r)(0,t.checkReportMissingProp)(s,l)}function o(){const l=d.let("missing");if(O||$){const h=d.let("valid",!0);s.block$data(h,()=>v(l,h)),s.ok(h)}else d.if((0,t.checkMissingProp)(s,r,l)),(0,t.reportMissingProp)(s,l),d.else()}function a(){d.forOf("prop",c,l=>{s.setParams({missingProperty:l}),d.if((0,t.noPropertyInData)(d,g,l,j.ownProperties),()=>s.error())})}function v(l,h){s.setParams({missingProperty:l}),d.forOf(l,c,()=>{d.assign(h,(0,t.propertyInData)(d,g,l,j.ownProperties)),d.if((0,y.not)(h),()=>{s.error(),d.break()})},y.nil)}}};e.default=S},86534:function(z,e,i){Object.defineProperty(e,"__esModule",{value:!0});const t=i(31411),y=i(15923),w=i(91571),m=i(10487),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:r}})=>(0,y.str)`must NOT have duplicate items (items ## ${r} and ${d} are identical)`,params:({params:{i:d,j:r}})=>(0,y._)`{i: ${d}, j: ${r}}`},code(d){const{gen:r,data:c,$data:g,schema:$,parentSchema:N,schemaCode:j,it:O}=d;if(!g&&!$)return;const C=r.let("valid"),o=N.items?(0,t.getSchemaTypes)(N.items):[];d.block$data(C,a,(0,y._)`${j} === false`),d.ok(C);function a(){const b=r.let("i",(0,y._)`${c}.length`),f=r.let("j");d.setParams({i:b,j:f}),r.assign(C,!0),r.if((0,y._)`${b} > 1`,()=>(v()?l:h)(b,f))}function v(){return o.length>0&&!o.some(b=>b==="object"||b==="array")}function l(b,f){const u=r.name("item"),_=(0,t.checkDataTypes)(o,u,O.opts.strictNumbers,t.DataType.Wrong),I=r.const("indices",(0,y._)`{}`);r.for((0,y._)`;${b}--;`,()=>{r.let(u,(0,y._)`${c}[${b}]`),r.if(_,(0,y._)`continue`),o.length>1&&r.if((0,y._)`typeof ${u} == "string"`,(0,y._)`${u} += "_"`),r.if((0,y._)`typeof ${I}[${u}] == "number"`,()=>{r.assign(f,(0,y._)`${I}[${u}]`),d.error(),r.assign(C,!1).break()}).code((0,y._)`${I}[${u}] = ${b}`)})}function h(b,f){const u=(0,w.useFunc)(r,m.default),_=r.name("outer");r.label(_).for((0,y._)`;${b}--;`,()=>r.for((0,y._)`${f} = ${b}; ${f}--;`,()=>r.if((0,y._)`${u}(${c}[${b}], ${c}[${f}])`,()=>{d.error(),r.assign(C,!1).break(_)})))}}};e.default=s},338:function(z){z.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},90360:function(z){z.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}')}}]);})();
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=module-ajv.2efe45a5.js.map
|