@graffiti-garden/implementation-decentralized 0.0.10 → 0.1.1
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/LICENSE +4 -673
- package/dist/1-services/2-dids.d.ts +1 -0
- package/dist/1-services/2-dids.d.ts.map +1 -1
- package/dist/1-services/4-inboxes.d.ts +2 -1
- package/dist/1-services/4-inboxes.d.ts.map +1 -1
- package/dist/3-protocol/4-graffiti.d.ts.map +1 -1
- package/dist/browser/ajv-X6C4R6QN.js +9 -0
- package/dist/browser/ajv-X6C4R6QN.js.map +7 -0
- package/dist/browser/{build-DM3HADDZ.js → build-KAK33G4E.js} +1 -1
- package/dist/browser/{build-DM3HADDZ.js.map → build-KAK33G4E.js.map} +1 -1
- package/dist/browser/{graffiti-KV3G3O72-TAZN6KIP.js → graffiti-KV3G3O72-QD3APAKT.js} +1 -1
- package/dist/browser/{graffiti-KV3G3O72-TAZN6KIP.js.map → graffiti-KV3G3O72-QD3APAKT.js.map} +1 -1
- package/dist/browser/index.js +10 -10
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/{rock-salt-LI7DAH66-TZP5ZWGV.js → rock-salt-LI7DAH66-M6W5PPFD.js} +1 -1
- package/dist/browser/{rock-salt-LI7DAH66-TZP5ZWGV.js.map → rock-salt-LI7DAH66-M6W5PPFD.js.map} +1 -1
- package/dist/browser/{style-BOBMBTYJ-GXWKT5M3.js → style-BOBMBTYJ-2YZTO5FX.js} +1 -1
- package/dist/browser/{style-BOBMBTYJ-GXWKT5M3.js.map → style-BOBMBTYJ-2YZTO5FX.js.map} +1 -1
- package/dist/cjs/1-services/2-dids-tests.js +53 -0
- package/dist/cjs/1-services/2-dids-tests.js.map +3 -3
- package/dist/cjs/1-services/2-dids.js +14 -4
- package/dist/cjs/1-services/2-dids.js.map +2 -2
- package/dist/cjs/1-services/4-inboxes.js +36 -17
- package/dist/cjs/1-services/4-inboxes.js.map +2 -2
- package/dist/cjs/3-protocol/4-graffiti.js +5 -2
- package/dist/cjs/3-protocol/4-graffiti.js.map +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/index.spec.js +54 -41
- package/dist/cjs/index.spec.js.map +2 -2
- package/dist/esm/1-services/2-dids-tests.js +54 -1
- package/dist/esm/1-services/2-dids-tests.js.map +3 -3
- package/dist/esm/1-services/2-dids.js +14 -4
- package/dist/esm/1-services/2-dids.js.map +2 -2
- package/dist/esm/1-services/4-inboxes.js +36 -17
- package/dist/esm/1-services/4-inboxes.js.map +2 -2
- package/dist/esm/3-protocol/4-graffiti.js +5 -2
- package/dist/esm/3-protocol/4-graffiti.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.spec.js +59 -42
- package/dist/esm/index.spec.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +15 -10
- package/src/1-services/2-dids-tests.ts +62 -1
- package/src/1-services/2-dids.ts +17 -5
- package/src/1-services/4-inboxes.ts +47 -19
- package/src/3-protocol/4-graffiti.ts +9 -2
- package/src/index.spec.ts +66 -48
- package/src/index.ts +2 -1
- package/dist/1-services/2-dids-tests.d.ts +0 -2
- package/dist/1-services/2-dids-tests.d.ts.map +0 -1
- package/dist/1-services/3-storage-buckets-tests.d.ts +0 -2
- package/dist/1-services/3-storage-buckets-tests.d.ts.map +0 -1
- package/dist/1-services/4-inboxes-tests.d.ts +0 -2
- package/dist/1-services/4-inboxes-tests.d.ts.map +0 -1
- package/dist/2-primitives/1-string-encoding-tests.d.ts +0 -2
- package/dist/2-primitives/1-string-encoding-tests.d.ts.map +0 -1
- package/dist/2-primitives/2-content-addresses-tests.d.ts +0 -2
- package/dist/2-primitives/2-content-addresses-tests.d.ts.map +0 -1
- package/dist/2-primitives/3-channel-attestations-tests.d.ts +0 -2
- package/dist/2-primitives/3-channel-attestations-tests.d.ts.map +0 -1
- package/dist/2-primitives/4-allowed-attestations-tests.d.ts +0 -2
- package/dist/2-primitives/4-allowed-attestations-tests.d.ts.map +0 -1
- package/dist/3-protocol/2-handles-tests.d.ts +0 -2
- package/dist/3-protocol/2-handles-tests.d.ts.map +0 -1
- package/dist/3-protocol/3-object-encoding-tests.d.ts +0 -2
- package/dist/3-protocol/3-object-encoding-tests.d.ts.map +0 -1
- package/dist/browser/ajv-LGNUXWV5.js +0 -9
- package/dist/browser/ajv-LGNUXWV5.js.map +0 -7
- package/dist/index.spec.d.ts +0 -2
- package/dist/index.spec.d.ts.map +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-O4MIY67H.js";var Be=g(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.regexpCode=R.getEsmExportName=R.getProperty=R.safeStringify=R.stringify=R.strConcat=R.addCodeArg=R.str=R._=R.nil=R._Code=R.Name=R.IDENTIFIER=R._CodeOrName=void 0;var Je=class{};R._CodeOrName=Je;R.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $e=class extends Je{constructor(e){if(super(),!R.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};R.Name=$e;var B=class extends Je{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof $e&&(r[s.str]=(r[s.str]||0)+1),r),{})}};R._Code=B;R.nil=new B("");function Ls(t,...e){let r=[t[0]],s=0;for(;s<e.length;)nr(r,e[s]),r.push(t[++s]);return new B(r)}R._=Ls;var sr=new B("+");function Hs(t,...e){let r=[We(t[0])],s=0;for(;s<e.length;)r.push(sr),nr(r,e[s]),r.push(sr,We(t[++s]));return Si(r),new B(r)}R.str=Hs;function nr(t,e){e instanceof B?t.push(...e._items):e instanceof $e?t.push(e):t.push(ki(e))}R.addCodeArg=nr;function Si(t){let e=1;for(;e<t.length-1;){if(t[e]===sr){let r=Pi(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Pi(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof $e||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof $e))return`"${t}${e.slice(1)}`}function Ni(t,e){return e.emptyStr()?t:t.emptyStr()?e:Hs`${t}${e}`}R.strConcat=Ni;function ki(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:We(Array.isArray(t)?t.join(","):t)}function Oi(t){return new B(We(t))}R.stringify=Oi;function We(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}R.safeStringify=We;function qi(t){return typeof t=="string"&&R.IDENTIFIER.test(t)?new B(`.${t}`):Ls`[${t}]`}R.getProperty=qi;function ji(t){if(typeof t=="string"&&R.IDENTIFIER.test(t))return new B(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}R.getEsmExportName=ji;function Ri(t){return new B(t.toString())}R.regexpCode=Ri});var ar=g(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.ValueScope=G.ValueScopeName=G.Scope=G.varKinds=G.UsedValueState=void 0;var H=Be(),or=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},wt;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(wt||(G.UsedValueState=wt={}));G.varKinds={const:new H.Name("const"),let:new H.Name("let"),var:new H.Name("var")};var bt=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof H.Name?e:this.name(e)}name(e){return new H.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};G.Scope=bt;var Et=class extends H.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,H._)`.${new H.Name(r)}[${s}]`}};G.ValueScopeName=Et;var Ii=(0,H._)`\n`,ir=class extends bt{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ii:H.nil}}get(){return this._scope}name(e){return new Et(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,i=(s=r.key)!==null&&s!==void 0?s:r.ref,a=this._values[o];if(a){let u=a.get(i);if(u)return u}else a=this._values[o]=new Map;a.set(i,n);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,n.setValue(r,{property:o,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,H._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let o=H.nil;for(let i in e){let a=e[i];if(!a)continue;let c=s[i]=s[i]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,wt.Started);let u=r(l);if(u){let d=this.opts.es5?G.varKinds.var:G.varKinds.const;o=(0,H._)`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=n?.(l))o=(0,H._)`${o}${u}${this.opts._n}`;else throw new or(l);c.set(l,wt.Completed)})}return o}};G.ValueScope=ir});var S=g(E=>{"use strict";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;var k=Be(),Z=ar(),fe=Be();Object.defineProperty(E,"_",{enumerable:!0,get:function(){return fe._}});Object.defineProperty(E,"str",{enumerable:!0,get:function(){return fe.str}});Object.defineProperty(E,"strConcat",{enumerable:!0,get:function(){return fe.strConcat}});Object.defineProperty(E,"nil",{enumerable:!0,get:function(){return fe.nil}});Object.defineProperty(E,"getProperty",{enumerable:!0,get:function(){return fe.getProperty}});Object.defineProperty(E,"stringify",{enumerable:!0,get:function(){return fe.stringify}});Object.defineProperty(E,"regexpCode",{enumerable:!0,get:function(){return fe.regexpCode}});Object.defineProperty(E,"Name",{enumerable:!0,get:function(){return fe.Name}});var kt=ar();Object.defineProperty(E,"Scope",{enumerable:!0,get:function(){return kt.Scope}});Object.defineProperty(E,"ValueScope",{enumerable:!0,get:function(){return kt.ValueScope}});Object.defineProperty(E,"ValueScopeName",{enumerable:!0,get:function(){return kt.ValueScopeName}});Object.defineProperty(E,"varKinds",{enumerable:!0,get:function(){return kt.varKinds}});E.operators={GT:new k._Code(">"),GTE:new k._Code(">="),LT:new k._Code("<"),LTE:new k._Code("<="),EQ:new k._Code("==="),NEQ:new k._Code("!=="),NOT:new k._Code("!"),OR:new k._Code("||"),AND:new k._Code("&&"),ADD:new k._Code("+")};var ce=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},cr=class extends ce{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?Z.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Re(this.rhs,e,r)),this}get names(){return this.rhs instanceof k._CodeOrName?this.rhs.names:{}}},St=class extends ce{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof k.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Re(this.rhs,e,r),this}get names(){let e=this.lhs instanceof k.Name?{}:{...this.lhs.names};return Nt(e,this.rhs)}},ur=class extends St{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},lr=class extends ce{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},dr=class extends ce{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},fr=class extends ce{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},hr=class extends ce{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Re(this.code,e,r),this}get names(){return this.code instanceof k._CodeOrName?this.code.names:{}}},Qe=class extends ce{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let o=s[n];o.optimizeNames(e,r)||(Ti(e,o.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>be(e,r.names),{})}},ue=class extends Qe{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},pr=class extends Qe{},je=class extends ue{};je.kind="else";var ve=class t extends ue{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new je(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Gs(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Re(this.condition,e,r),this}get names(){let e=super.names;return Nt(e,this.condition),this.else&&be(e,this.else.names),e}};ve.kind="if";var we=class extends ue{};we.kind="for";var mr=class extends we{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Re(this.iteration,e,r),this}get names(){return be(super.names,this.iteration.names)}},yr=class extends we{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?Z.varKinds.var:this.varKind,{name:s,from:n,to:o}=this;return`for(${r} ${s}=${n}; ${s}<${o}; ${s}++)`+super.render(e)}get names(){let e=Nt(super.names,this.from);return Nt(e,this.to)}},Pt=class extends we{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Re(this.iterable,e,r),this}get names(){return be(super.names,this.iterable.names)}},Xe=class extends ue{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Xe.kind="func";var Ye=class extends Qe{render(e){return"return "+super.render(e)}};Ye.kind="return";var _r=class extends ue{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&be(e,this.catch.names),this.finally&&be(e,this.finally.names),e}},Ze=class extends ue{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ze.kind="catch";var et=class extends ue{render(e){return"finally"+super.render(e)}};et.kind="finally";var gr=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
|
-
`:""},this._extScope=e,this._scope=new Z.Scope({parent:e}),this._nodes=[new pr]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let o=this._scope.toName(r);return s!==void 0&&n&&(this._constants[o.str]=s),this._leafNode(new cr(e,o,s)),o}const(e,r,s){return this._def(Z.varKinds.const,e,r,s)}let(e,r,s){return this._def(Z.varKinds.let,e,r,s)}var(e,r,s){return this._def(Z.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new St(e,r,s))}add(e,r){return this._leafNode(new ur(e,E.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==k.nil&&this._leafNode(new hr(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,k.addCodeArg)(r,n));return r.push("}"),new k._Code(r)}if(e,r,s){if(this._blockNode(new ve(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ve(e))}else(){return this._elseNode(new je)}endIf(){return this._endBlockNode(ve,je)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new mr(e),r)}forRange(e,r,s,n,o=this.opts.es5?Z.varKinds.var:Z.varKinds.let){let i=this._scope.toName(e);return this._for(new yr(o,i,r,s),()=>n(i))}forOf(e,r,s,n=Z.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let i=r instanceof k.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,k._)`${i}.length`,a=>{this.var(o,(0,k._)`${i}[${a}]`),s(o)})}return this._for(new Pt("of",n,o,r),()=>s(o))}forIn(e,r,s,n=this.opts.es5?Z.varKinds.var:Z.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,k._)`Object.keys(${r})`,s);let o=this._scope.toName(e);return this._for(new Pt("in",n,o,r),()=>s(o))}endFor(){return this._endBlockNode(we)}label(e){return this._leafNode(new lr(e))}break(e){return this._leafNode(new dr(e))}return(e){let r=new Ye;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ye)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new _r;if(this._blockNode(n),this.code(e),r){let o=this.name("e");this._currNode=n.catch=new Ze(o),r(o)}return s&&(this._currNode=n.finally=new et,this.code(s)),this._endBlockNode(Ze,et)}throw(e){return this._leafNode(new fr(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=k.nil,s,n){return this._blockNode(new Xe(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Xe)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof ve))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};E.CodeGen=gr;function be(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Nt(t,e){return e instanceof k._CodeOrName?be(t,e.names):t}function Re(t,e,r){if(t instanceof k.Name)return s(t);if(!n(t))return t;return new k._Code(t._items.reduce((o,i)=>(i instanceof k.Name&&(i=s(i)),i instanceof k._Code?o.push(...i._items):o.push(i),o),[]));function s(o){let i=r[o.str];return i===void 0||e[o.str]!==1?o:(delete e[o.str],i)}function n(o){return o instanceof k._Code&&o._items.some(i=>i instanceof k.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function Ti(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Gs(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,k._)`!${$r(t)}`}E.not=Gs;var Ci=Js(E.operators.AND);function Mi(...t){return t.reduce(Ci)}E.and=Mi;var Ai=Js(E.operators.OR);function Di(...t){return t.reduce(Ai)}E.or=Di;function Js(t){return(e,r)=>e===k.nil?r:r===k.nil?e:(0,k._)`${$r(e)} ${t} ${$r(r)}`}function $r(t){return t instanceof k.Name?t:(0,k._)`(${t})`}});var q=g(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.checkStrictMode=P.getErrorPath=P.Type=P.useFunc=P.setEvaluated=P.evaluatedPropsToName=P.mergeEvaluated=P.eachItem=P.unescapeJsonPointer=P.escapeJsonPointer=P.escapeFragment=P.unescapeFragment=P.schemaRefOrVal=P.schemaHasRulesButRef=P.schemaHasRules=P.checkUnknownRules=P.alwaysValidSchema=P.toHash=void 0;var T=S(),Vi=Be();function zi(t){let e={};for(let r of t)e[r]=!0;return e}P.toHash=zi;function Ui(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Qs(t,e),!Xs(e,t.self.RULES.all))}P.alwaysValidSchema=Ui;function Qs(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let o in e)n[o]||en(t,`unknown keyword: "${o}"`)}P.checkUnknownRules=Qs;function Xs(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}P.schemaHasRules=Xs;function Ki(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}P.schemaHasRulesButRef=Ki;function xi({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,T._)`${r}`}return(0,T._)`${t}${e}${(0,T.getProperty)(s)}`}P.schemaRefOrVal=xi;function Fi(t){return Ys(decodeURIComponent(t))}P.unescapeFragment=Fi;function Li(t){return encodeURIComponent(wr(t))}P.escapeFragment=Li;function wr(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}P.escapeJsonPointer=wr;function Ys(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}P.unescapeJsonPointer=Ys;function Hi(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}P.eachItem=Hi;function Ws({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,o,i,a)=>{let c=i===void 0?o:i instanceof T.Name?(o instanceof T.Name?t(n,o,i):e(n,o,i),i):o instanceof T.Name?(e(n,i,o),o):r(o,i);return a===T.Name&&!(c instanceof T.Name)?s(n,c):c}}P.mergeEvaluated={props:Ws({mergeNames:(t,e,r)=>t.if((0,T._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,T._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,T._)`${r} || {}`).code((0,T._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,T._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,T._)`${r} || {}`),br(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Zs}),items:Ws({mergeNames:(t,e,r)=>t.if((0,T._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,T._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,T._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,T._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Zs(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,T._)`{}`);return e!==void 0&&br(t,r,e),r}P.evaluatedPropsToName=Zs;function br(t,e,r){Object.keys(r).forEach(s=>t.assign((0,T._)`${e}${(0,T.getProperty)(s)}`,!0))}P.setEvaluated=br;var Bs={};function Gi(t,e){return t.scopeValue("func",{ref:e,code:Bs[e.code]||(Bs[e.code]=new Vi._Code(e.code))})}P.useFunc=Gi;var vr;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vr||(P.Type=vr={}));function Ji(t,e,r){if(t instanceof T.Name){let s=e===vr.Num;return r?s?(0,T._)`"[" + ${t} + "]"`:(0,T._)`"['" + ${t} + "']"`:s?(0,T._)`"/" + ${t}`:(0,T._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,T.getProperty)(t).toString():"/"+wr(t)}P.getErrorPath=Ji;function en(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}P.checkStrictMode=en});var le=g(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});var U=S(),Wi={data:new U.Name("data"),valCxt:new U.Name("valCxt"),instancePath:new U.Name("instancePath"),parentData:new U.Name("parentData"),parentDataProperty:new U.Name("parentDataProperty"),rootData:new U.Name("rootData"),dynamicAnchors:new U.Name("dynamicAnchors"),vErrors:new U.Name("vErrors"),errors:new U.Name("errors"),this:new U.Name("this"),self:new U.Name("self"),scope:new U.Name("scope"),json:new U.Name("json"),jsonPos:new U.Name("jsonPos"),jsonLen:new U.Name("jsonLen"),jsonPart:new U.Name("jsonPart")};Er.default=Wi});var tt=g(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.extendErrors=K.resetErrorsCount=K.reportExtraError=K.reportError=K.keyword$DataError=K.keywordError=void 0;var j=S(),Ot=q(),F=le();K.keywordError={message:({keyword:t})=>(0,j.str)`must pass "${t}" keyword validation`};K.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,j.str)`"${t}" keyword must be ${e} ($data)`:(0,j.str)`"${t}" keyword is invalid ($data)`};function Bi(t,e=K.keywordError,r,s){let{it:n}=t,{gen:o,compositeRule:i,allErrors:a}=n,c=sn(t,e,r);s??(i||a)?tn(o,c):rn(n,(0,j._)`[${c}]`)}K.reportError=Bi;function Qi(t,e=K.keywordError,r){let{it:s}=t,{gen:n,compositeRule:o,allErrors:i}=s,a=sn(t,e,r);tn(n,a),o||i||rn(s,F.default.vErrors)}K.reportExtraError=Qi;function Xi(t,e){t.assign(F.default.errors,e),t.if((0,j._)`${F.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,j._)`${F.default.vErrors}.length`,e),()=>t.assign(F.default.vErrors,null)))}K.resetErrorsCount=Xi;function Yi({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:o}){if(n===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",n,F.default.errors,a=>{t.const(i,(0,j._)`${F.default.vErrors}[${a}]`),t.if((0,j._)`${i}.instancePath === undefined`,()=>t.assign((0,j._)`${i}.instancePath`,(0,j.strConcat)(F.default.instancePath,o.errorPath))),t.assign((0,j._)`${i}.schemaPath`,(0,j.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,j._)`${i}.schema`,r),t.assign((0,j._)`${i}.data`,s))})}K.extendErrors=Yi;function tn(t,e){let r=t.const("err",e);t.if((0,j._)`${F.default.vErrors} === null`,()=>t.assign(F.default.vErrors,(0,j._)`[${r}]`),(0,j._)`${F.default.vErrors}.push(${r})`),t.code((0,j._)`${F.default.errors}++`)}function rn(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,j._)`new ${t.ValidationError}(${e})`):(r.assign((0,j._)`${s}.errors`,e),r.return(!1))}var Ee={keyword:new j.Name("keyword"),schemaPath:new j.Name("schemaPath"),params:new j.Name("params"),propertyName:new j.Name("propertyName"),message:new j.Name("message"),schema:new j.Name("schema"),parentSchema:new j.Name("parentSchema")};function sn(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,j._)`{}`:Zi(t,e,r)}function Zi(t,e,r={}){let{gen:s,it:n}=t,o=[ea(n,r),ta(t,r)];return ra(t,e,o),s.object(...o)}function ea({errorPath:t},{instancePath:e}){let r=e?(0,j.str)`${t}${(0,Ot.getErrorPath)(e,Ot.Type.Str)}`:t;return[F.default.instancePath,(0,j.strConcat)(F.default.instancePath,r)]}function ta({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,j.str)`${e}/${t}`;return r&&(n=(0,j.str)`${n}${(0,Ot.getErrorPath)(r,Ot.Type.Str)}`),[Ee.schemaPath,n]}function ra(t,{params:e,message:r},s){let{keyword:n,data:o,schemaValue:i,it:a}=t,{opts:c,propertyName:l,topSchemaRef:u,schemaPath:d}=a;s.push([Ee.keyword,n],[Ee.params,typeof e=="function"?e(t):e||(0,j._)`{}`]),c.messages&&s.push([Ee.message,typeof r=="function"?r(t):r]),c.verbose&&s.push([Ee.schema,i],[Ee.parentSchema,(0,j._)`${u}${d}`],[F.default.data,o]),l&&s.push([Ee.propertyName,l])}});var on=g(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.boolOrEmptySchema=Ie.topBoolOrEmptySchema=void 0;var sa=tt(),na=S(),oa=le(),ia={message:"boolean schema is false"};function aa(t){let{gen:e,schema:r,validateName:s}=t;r===!1?nn(t,!1):typeof r=="object"&&r.$async===!0?e.return(oa.default.data):(e.assign((0,na._)`${s}.errors`,null),e.return(!0))}Ie.topBoolOrEmptySchema=aa;function ca(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),nn(t)):r.var(e,!0)}Ie.boolOrEmptySchema=ca;function nn(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,sa.reportError)(n,ia,void 0,e)}});var Sr=g(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.getRules=Te.isJSONType=void 0;var ua=["string","number","integer","boolean","null","object","array"],la=new Set(ua);function da(t){return typeof t=="string"&&la.has(t)}Te.isJSONType=da;function fa(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Te.getRules=fa});var Pr=g(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.shouldUseRule=he.shouldUseGroup=he.schemaHasRulesForType=void 0;function ha({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&an(t,s)}he.schemaHasRulesForType=ha;function an(t,e){return e.rules.some(r=>cn(t,r))}he.shouldUseGroup=an;function cn(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}he.shouldUseRule=cn});var rt=g(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.reportTypeError=x.checkDataTypes=x.checkDataType=x.coerceAndCheckDataType=x.getJSONTypes=x.getSchemaTypes=x.DataType=void 0;var pa=Sr(),ma=Pr(),ya=tt(),b=S(),un=q(),Ce;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ce||(x.DataType=Ce={}));function _a(t){let e=ln(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}x.getSchemaTypes=_a;function ln(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(pa.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}x.getJSONTypes=ln;function ga(t,e){let{gen:r,data:s,opts:n}=t,o=$a(e,n.coerceTypes),i=e.length>0&&!(o.length===0&&e.length===1&&(0,ma.schemaHasRulesForType)(t,e[0]));if(i){let a=kr(e,s,n.strictNumbers,Ce.Wrong);r.if(a,()=>{o.length?va(t,e,o):Or(t)})}return i}x.coerceAndCheckDataType=ga;var dn=new Set(["string","number","integer","boolean","null"]);function $a(t,e){return e?t.filter(r=>dn.has(r)||e==="array"&&r==="array"):[]}function va(t,e,r){let{gen:s,data:n,opts:o}=t,i=s.let("dataType",(0,b._)`typeof ${n}`),a=s.let("coerced",(0,b._)`undefined`);o.coerceTypes==="array"&&s.if((0,b._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,b._)`${n}[0]`).assign(i,(0,b._)`typeof ${n}`).if(kr(e,n,o.strictNumbers),()=>s.assign(a,n))),s.if((0,b._)`${a} !== undefined`);for(let l of r)(dn.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);s.else(),Or(t),s.endIf(),s.if((0,b._)`${a} !== undefined`,()=>{s.assign(n,a),wa(t,a)});function c(l){switch(l){case"string":s.elseIf((0,b._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,b._)`"" + ${n}`).elseIf((0,b._)`${n} === null`).assign(a,(0,b._)`""`);return;case"number":s.elseIf((0,b._)`${i} == "boolean" || ${n} === null
|
|
3
|
-
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,b._)`+${n}`);return;case"integer":s.elseIf((0,b._)`${i} === "boolean" || ${n} === null
|
|
4
|
-
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,b._)`+${n}`);return;case"boolean":s.elseIf((0,b._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,b._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":s.elseIf((0,b._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(a,null);return;case"array":s.elseIf((0,b._)`${i} === "string" || ${i} === "number"
|
|
5
|
-
|| ${i} === "boolean" || ${n} === null`).assign(a,(0,b._)`[${n}]`)}}}function wa({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,b._)`${e} !== undefined`,()=>t.assign((0,b._)`${e}[${r}]`,s))}function Nr(t,e,r,s=Ce.Correct){let n=s===Ce.Correct?b.operators.EQ:b.operators.NEQ,o;switch(t){case"null":return(0,b._)`${e} ${n} null`;case"array":o=(0,b._)`Array.isArray(${e})`;break;case"object":o=(0,b._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=i((0,b._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=i();break;default:return(0,b._)`typeof ${e} ${n} ${t}`}return s===Ce.Correct?o:(0,b.not)(o);function i(a=b.nil){return(0,b.and)((0,b._)`typeof ${e} == "number"`,a,r?(0,b._)`isFinite(${e})`:b.nil)}}x.checkDataType=Nr;function kr(t,e,r,s){if(t.length===1)return Nr(t[0],e,r,s);let n,o=(0,un.toHash)(t);if(o.array&&o.object){let i=(0,b._)`typeof ${e} != "object"`;n=o.null?i:(0,b._)`!${e} || ${i}`,delete o.null,delete o.array,delete o.object}else n=b.nil;o.number&&delete o.integer;for(let i in o)n=(0,b.and)(n,Nr(i,e,r,s));return n}x.checkDataTypes=kr;var ba={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,b._)`{type: ${t}}`:(0,b._)`{type: ${e}}`};function Or(t){let e=Ea(t);(0,ya.reportError)(e,ba)}x.reportTypeError=Or;function Ea(t){let{gen:e,data:r,schema:s}=t,n=(0,un.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}});var hn=g(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.assignDefaults=void 0;var Me=S(),Sa=q();function Pa(t,e){let{properties:r,items:s}=t.schema;if(e==="object"&&r)for(let n in r)fn(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,o)=>fn(t,o,n.default))}qt.assignDefaults=Pa;function fn(t,e,r){let{gen:s,compositeRule:n,data:o,opts:i}=t;if(r===void 0)return;let a=(0,Me._)`${o}${(0,Me.getProperty)(e)}`;if(n){(0,Sa.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,Me._)`${a} === undefined`;i.useDefaults==="empty"&&(c=(0,Me._)`${c} || ${a} === null || ${a} === ""`),s.if(c,(0,Me._)`${a} = ${(0,Me.stringify)(r)}`)}});var Q=g(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.validateUnion=I.validateArray=I.usePattern=I.callValidateCode=I.schemaProperties=I.allSchemaProperties=I.noPropertyInData=I.propertyInData=I.isOwnProperty=I.hasPropFunc=I.reportMissingProp=I.checkMissingProp=I.checkReportMissingProp=void 0;var M=S(),qr=q(),pe=le(),Na=q();function ka(t,e){let{gen:r,data:s,it:n}=t;r.if(Rr(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,M._)`${e}`},!0),t.error()})}I.checkReportMissingProp=ka;function Oa({gen:t,data:e,it:{opts:r}},s,n){return(0,M.or)(...s.map(o=>(0,M.and)(Rr(t,e,o,r.ownProperties),(0,M._)`${n} = ${o}`)))}I.checkMissingProp=Oa;function qa(t,e){t.setParams({missingProperty:e},!0),t.error()}I.reportMissingProp=qa;function pn(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,M._)`Object.prototype.hasOwnProperty`})}I.hasPropFunc=pn;function jr(t,e,r){return(0,M._)`${pn(t)}.call(${e}, ${r})`}I.isOwnProperty=jr;function ja(t,e,r,s){let n=(0,M._)`${e}${(0,M.getProperty)(r)} !== undefined`;return s?(0,M._)`${n} && ${jr(t,e,r)}`:n}I.propertyInData=ja;function Rr(t,e,r,s){let n=(0,M._)`${e}${(0,M.getProperty)(r)} === undefined`;return s?(0,M.or)(n,(0,M.not)(jr(t,e,r))):n}I.noPropertyInData=Rr;function mn(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}I.allSchemaProperties=mn;function Ra(t,e){return mn(e).filter(r=>!(0,qr.alwaysValidSchema)(t,e[r]))}I.schemaProperties=Ra;function Ia({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:o},it:i},a,c,l){let u=l?(0,M._)`${t}, ${e}, ${s}${n}`:e,d=[[pe.default.instancePath,(0,M.strConcat)(pe.default.instancePath,o)],[pe.default.parentData,i.parentData],[pe.default.parentDataProperty,i.parentDataProperty],[pe.default.rootData,pe.default.rootData]];i.opts.dynamicRef&&d.push([pe.default.dynamicAnchors,pe.default.dynamicAnchors]);let y=(0,M._)`${u}, ${r.object(...d)}`;return c!==M.nil?(0,M._)`${a}.call(${c}, ${y})`:(0,M._)`${a}(${y})`}I.callValidateCode=Ia;var Ta=(0,M._)`new RegExp`;function Ca({gen:t,it:{opts:e}},r){let s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,o=n(r,s);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,M._)`${n.code==="new RegExp"?Ta:(0,Na.useFunc)(t,n)}(${r}, ${s})`})}I.usePattern=Ca;function Ma(t){let{gen:e,data:r,keyword:s,it:n}=t,o=e.name("valid");if(n.allErrors){let a=e.let("valid",!0);return i(()=>e.assign(a,!1)),a}return e.var(o,!0),i(()=>e.break()),o;function i(a){let c=e.const("len",(0,M._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:s,dataProp:l,dataPropType:qr.Type.Num},o),e.if((0,M.not)(o),a)})}}I.validateArray=Ma;function Aa(t){let{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,qr.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let i=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let u=t.subschema({keyword:s,schemaProp:l,compositeRule:!0},a);e.assign(i,(0,M._)`${i} || ${a}`),t.mergeValidEvaluated(u,a)||e.if((0,M.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}I.validateUnion=Aa});var gn=g(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.validateKeywordUsage=ne.validSchemaType=ne.funcKeywordCode=ne.macroKeywordCode=void 0;var L=S(),Se=le(),Da=Q(),Va=tt();function za(t,e){let{gen:r,keyword:s,schema:n,parentSchema:o,it:i}=t,a=e.macro.call(i.self,n,o,i),c=_n(r,s,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:L.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}ne.macroKeywordCode=za;function Ua(t,e){var r;let{gen:s,keyword:n,schema:o,parentSchema:i,$data:a,it:c}=t;xa(c,e);let l=!a&&e.compile?e.compile.call(c.self,o,i,c):e.validate,u=_n(s,n,l),d=s.let("valid");t.block$data(d,y),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function y(){if(e.errors===!1)f(),e.modifying&&yn(t),p(()=>t.error());else{let _=e.async?m():h();e.modifying&&yn(t),p(()=>Ka(t,_))}}function m(){let _=s.let("ruleErrs",null);return s.try(()=>f((0,L._)`await `),O=>s.assign(d,!1).if((0,L._)`${O} instanceof ${c.ValidationError}`,()=>s.assign(_,(0,L._)`${O}.errors`),()=>s.throw(O))),_}function h(){let _=(0,L._)`${u}.errors`;return s.assign(_,null),f(L.nil),_}function f(_=e.async?(0,L._)`await `:L.nil){let O=c.opts.passContext?Se.default.this:Se.default.self,N=!("compile"in e&&!a||e.schema===!1);s.assign(d,(0,L._)`${_}${(0,Da.callValidateCode)(t,u,O,N)}`,e.modifying)}function p(_){var O;s.if((0,L.not)((O=e.valid)!==null&&O!==void 0?O:d),_)}}ne.funcKeywordCode=Ua;function yn(t){let{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,L._)`${s.parentData}[${s.parentDataProperty}]`))}function Ka(t,e){let{gen:r}=t;r.if((0,L._)`Array.isArray(${e})`,()=>{r.assign(Se.default.vErrors,(0,L._)`${Se.default.vErrors} === null ? ${e} : ${Se.default.vErrors}.concat(${e})`).assign(Se.default.errors,(0,L._)`${Se.default.vErrors}.length`),(0,Va.extendErrors)(t)},()=>t.error())}function xa({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function _n(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,L.stringify)(r)})}function Fa(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}ne.validSchemaType=Fa;function La({schema:t,opts:e,self:r,errSchemaPath:s},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw new Error("ajv implementation error");let i=n.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ne.validateKeywordUsage=La});var vn=g(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.extendSubschemaMode=me.extendSubschemaData=me.getSubschema=void 0;var oe=S(),$n=q();function Ha(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:o,topSchemaRef:i}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,oe._)`${t.schemaPath}${(0,oe.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,oe._)`${t.schemaPath}${(0,oe.getProperty)(e)}${(0,oe.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,$n.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||o===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}me.getSubschema=Ha;function Ga(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:o,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:l,dataPathArr:u,opts:d}=e,y=a.let("data",(0,oe._)`${e.data}${(0,oe.getProperty)(r)}`,!0);c(y),t.errorPath=(0,oe.str)`${l}${(0,$n.getErrorPath)(r,s,d.jsPropertySyntax)}`,t.parentDataProperty=(0,oe._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(n!==void 0){let l=n instanceof oe.Name?n:a.let("data",n,!0);c(l),i!==void 0&&(t.propertyName=i)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}me.extendSubschemaData=Ga;function Ja(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:o}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}me.extendSubschemaMode=Ja});var Ir=g((Sf,wn)=>{"use strict";wn.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,o;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),s=o.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=s;n--!==0;){var i=o[n];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var En=g((Pf,bn)=>{"use strict";var ye=bn.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};jt(e,s,n,t,"",t)};ye.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ye.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ye.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ye.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function jt(t,e,r,s,n,o,i,a,c,l){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,o,i,a,c,l);for(var u in s){var d=s[u];if(Array.isArray(d)){if(u in ye.arrayKeywords)for(var y=0;y<d.length;y++)jt(t,e,r,d[y],n+"/"+u+"/"+y,o,n,u,s,y)}else if(u in ye.propsKeywords){if(d&&typeof d=="object")for(var m in d)jt(t,e,r,d[m],n+"/"+u+"/"+Wa(m),o,n,u,s,m)}else(u in ye.keywords||t.allKeys&&!(u in ye.skipKeywords))&&jt(t,e,r,d,n+"/"+u,o,n,u,s)}r(s,n,o,i,a,c,l)}}function Wa(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var st=g(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.getSchemaRefs=J.resolveUrl=J.normalizeId=J._getFullPath=J.getFullPath=J.inlineRef=void 0;var Ba=q(),Qa=Ir(),Xa=En(),Ya=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Za(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Tr(t):e?Sn(t)<=e:!1}J.inlineRef=Za;var ec=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Tr(t){for(let e in t){if(ec.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Tr)||typeof r=="object"&&Tr(r))return!0}return!1}function Sn(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Ya.has(r)&&(typeof t[r]=="object"&&(0,Ba.eachItem)(t[r],s=>e+=Sn(s)),e===1/0))return 1/0}return e}function Pn(t,e="",r){r!==!1&&(e=Ae(e));let s=t.parse(e);return Nn(t,s)}J.getFullPath=Pn;function Nn(t,e){return t.serialize(e).split("#")[0]+"#"}J._getFullPath=Nn;var tc=/#\/?$/;function Ae(t){return t?t.replace(tc,""):""}J.normalizeId=Ae;function rc(t,e,r){return r=Ae(r),t.resolve(e,r)}J.resolveUrl=rc;var sc=/^[a-z_][-a-z0-9._]*$/i;function nc(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=Ae(t[r]||e),o={"":n},i=Pn(s,n,!1),a={},c=new Set;return Xa(t,{allKeys:!0},(d,y,m,h)=>{if(h===void 0)return;let f=i+y,p=o[h];typeof d[r]=="string"&&(p=_.call(this,d[r])),O.call(this,d.$anchor),O.call(this,d.$dynamicAnchor),o[y]=p;function _(N){let C=this.opts.uriResolver.resolve;if(N=Ae(p?C(p,N):N),c.has(N))throw u(N);c.add(N);let w=this.refs[N];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,N):N!==Ae(f)&&(N[0]==="#"?(l(d,a[N],N),a[N]=d):this.refs[N]=f),N}function O(N){if(typeof N=="string"){if(!sc.test(N))throw new Error(`invalid anchor "${N}"`);_.call(this,`#${N}`)}}}),a;function l(d,y,m){if(y!==void 0&&!Qa(d,y))throw u(m)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}J.getSchemaRefs=nc});var it=g(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.getData=_e.KeywordCxt=_e.validateFunctionCode=void 0;var Rn=on(),kn=rt(),Mr=Pr(),Rt=rt(),oc=hn(),ot=gn(),Cr=vn(),$=S(),v=le(),ic=st(),de=q(),nt=tt();function ac(t){if(Cn(t)&&(Mn(t),Tn(t))){lc(t);return}In(t,()=>(0,Rn.topBoolOrEmptySchema)(t))}_e.validateFunctionCode=ac;function In({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},o){n.code.es5?t.func(e,(0,$._)`${v.default.data}, ${v.default.valCxt}`,s.$async,()=>{t.code((0,$._)`"use strict"; ${On(r,n)}`),uc(t,n),t.code(o)}):t.func(e,(0,$._)`${v.default.data}, ${cc(n)}`,s.$async,()=>t.code(On(r,n)).code(o))}function cc(t){return(0,$._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${t.dynamicRef?(0,$._)`, ${v.default.dynamicAnchors}={}`:$.nil}}={}`}function uc(t,e){t.if(v.default.valCxt,()=>{t.var(v.default.instancePath,(0,$._)`${v.default.valCxt}.${v.default.instancePath}`),t.var(v.default.parentData,(0,$._)`${v.default.valCxt}.${v.default.parentData}`),t.var(v.default.parentDataProperty,(0,$._)`${v.default.valCxt}.${v.default.parentDataProperty}`),t.var(v.default.rootData,(0,$._)`${v.default.valCxt}.${v.default.rootData}`),e.dynamicRef&&t.var(v.default.dynamicAnchors,(0,$._)`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{t.var(v.default.instancePath,(0,$._)`""`),t.var(v.default.parentData,(0,$._)`undefined`),t.var(v.default.parentDataProperty,(0,$._)`undefined`),t.var(v.default.rootData,v.default.data),e.dynamicRef&&t.var(v.default.dynamicAnchors,(0,$._)`{}`)})}function lc(t){let{schema:e,opts:r,gen:s}=t;In(t,()=>{r.$comment&&e.$comment&&Dn(t),mc(t),s.let(v.default.vErrors,null),s.let(v.default.errors,0),r.unevaluated&&dc(t),An(t),gc(t)})}function dc(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,$._)`${r}.evaluated`),e.if((0,$._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,$._)`${t.evaluated}.props`,(0,$._)`undefined`)),e.if((0,$._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,$._)`${t.evaluated}.items`,(0,$._)`undefined`))}function On(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,$._)`/*# sourceURL=${r} */`:$.nil}function fc(t,e){if(Cn(t)&&(Mn(t),Tn(t))){hc(t,e);return}(0,Rn.boolOrEmptySchema)(t,e)}function Tn({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Cn(t){return typeof t.schema!="boolean"}function hc(t,e){let{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&Dn(t),yc(t),_c(t);let o=s.const("_errs",v.default.errors);An(t,o),s.var(e,(0,$._)`${o} === ${v.default.errors}`)}function Mn(t){(0,de.checkUnknownRules)(t),pc(t)}function An(t,e){if(t.opts.jtd)return qn(t,[],!1,e);let r=(0,kn.getSchemaTypes)(t.schema),s=(0,kn.coerceAndCheckDataType)(t,r);qn(t,r,!s,e)}function pc(t){let{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,de.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function mc(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,de.checkStrictMode)(t,"default is ignored in the schema root")}function yc(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,ic.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function _c(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Dn({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){let o=r.$comment;if(n.$comment===!0)t.code((0,$._)`${v.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let i=(0,$.str)`${s}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,$._)`${v.default.self}.opts.$comment(${o}, ${i}, ${a}.schema)`)}}function gc(t){let{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:o}=t;r.$async?e.if((0,$._)`${v.default.errors} === 0`,()=>e.return(v.default.data),()=>e.throw((0,$._)`new ${n}(${v.default.vErrors})`)):(e.assign((0,$._)`${s}.errors`,v.default.vErrors),o.unevaluated&&$c(t),e.return((0,$._)`${v.default.errors} === 0`))}function $c({gen:t,evaluated:e,props:r,items:s}){r instanceof $.Name&&t.assign((0,$._)`${e}.props`,r),s instanceof $.Name&&t.assign((0,$._)`${e}.items`,s)}function qn(t,e,r,s){let{gen:n,schema:o,data:i,allErrors:a,opts:c,self:l}=t,{RULES:u}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,de.schemaHasRulesButRef)(o,u))){n.block(()=>zn(t,"$ref",u.all.$ref.definition));return}c.jtd||vc(t,e),n.block(()=>{for(let y of u.rules)d(y);d(u.post)});function d(y){(0,Mr.shouldUseGroup)(o,y)&&(y.type?(n.if((0,Rt.checkDataType)(y.type,i,c.strictNumbers)),jn(t,y),e.length===1&&e[0]===y.type&&r&&(n.else(),(0,Rt.reportTypeError)(t)),n.endIf()):jn(t,y),a||n.if((0,$._)`${v.default.errors} === ${s||0}`))}}function jn(t,e){let{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,oc.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Mr.shouldUseRule)(s,o)&&zn(t,o.keyword,o.definition,e.type)})}function vc(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(wc(t,e),t.opts.allowUnionTypes||bc(t,e),Ec(t,t.dataTypes))}function wc(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Vn(t.dataTypes,r)||Ar(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Pc(t,e)}}function bc(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ar(t,"use allowUnionTypes to allow union type keyword")}function Ec(t,e){let r=t.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&(0,Mr.shouldUseRule)(t.schema,n)){let{type:o}=n.definition;o.length&&!o.some(i=>Sc(e,i))&&Ar(t,`missing type "${o.join(",")}" for keyword "${s}"`)}}}function Sc(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Vn(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Pc(t,e){let r=[];for(let s of t.dataTypes)Vn(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function Ar(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,de.checkStrictMode)(t,e,t.opts.strictTypes)}var It=class{constructor(e,r,s){if((0,ot.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,de.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Un(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ot.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",v.default.errors))}result(e,r,s){this.failResult((0,$.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,$.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,$._)`${r} !== undefined && (${(0,$.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?nt.reportExtraError:nt.reportError)(this,this.def.error,r)}$dataError(){(0,nt.reportError)(this,this.def.$dataError||nt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,nt.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=$.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=$.nil,r=$.nil){if(!this.$data)return;let{gen:s,schemaCode:n,schemaType:o,def:i}=this;s.if((0,$.or)((0,$._)`${n} === undefined`,r)),e!==$.nil&&s.assign(e,!0),(o.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==$.nil&&s.assign(e,!1)),s.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:s,def:n,it:o}=this;return(0,$.or)(i(),a());function i(){if(s.length){if(!(r instanceof $.Name))throw new Error("ajv implementation error");let c=Array.isArray(s)?s:[s];return(0,$._)`${(0,Rt.checkDataTypes)(c,r,o.opts.strictNumbers,Rt.DataType.Wrong)}`}return $.nil}function a(){if(n.validateSchema){let c=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,$._)`!${c}(${r})`}return $.nil}}subschema(e,r){let s=(0,Cr.getSubschema)(this.it,e);(0,Cr.extendSubschemaData)(s,this.it,e),(0,Cr.extendSubschemaMode)(s,e);let n={...this.it,...s,items:void 0,props:void 0};return fc(n,r),n}mergeEvaluated(e,r){let{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=de.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=de.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){let{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,$.Name)),!0}};_e.KeywordCxt=It;function zn(t,e,r,s){let n=new It(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,ot.funcKeywordCode)(n,r):"macro"in r?(0,ot.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,ot.funcKeywordCode)(n,r)}var Nc=/^\/(?:[^~]|~0|~1)*$/,kc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Un(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,o;if(t==="")return v.default.rootData;if(t[0]==="/"){if(!Nc.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,o=v.default.rootData}else{let l=kc.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+l[1];if(n=l[2],n==="#"){if(u>=e)throw new Error(c("property/index",u));return s[e-u]}if(u>e)throw new Error(c("data",u));if(o=r[e-u],!n)return o}let i=o,a=n.split("/");for(let l of a)l&&(o=(0,$._)`${o}${(0,$.getProperty)((0,de.unescapeJsonPointer)(l))}`,i=(0,$._)`${i} && ${o}`);return i;function c(l,u){return`Cannot access ${l} ${u} levels up, current level is ${e}`}}_e.getData=Un});var Tt=g(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});var Dr=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Vr.default=Dr});var at=g(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});var zr=st(),Ur=class extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,zr.resolveUrl)(e,r,s),this.missingSchema=(0,zr.normalizeId)((0,zr.getFullPath)(e,this.missingRef))}};Kr.default=Ur});var Mt=g(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.resolveSchema=X.getCompilingSchema=X.resolveRef=X.compileSchema=X.SchemaEnv=void 0;var ee=S(),Oc=Tt(),Pe=le(),te=st(),Kn=q(),qc=it(),De=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,te.normalizeId)(s?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s?.$async,this.refs={}}};X.SchemaEnv=De;function Fr(t){let e=xn.call(this,t);if(e)return e;let r=(0,te.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:o}=this.opts,i=new ee.CodeGen(this.scope,{es5:s,lines:n,ownProperties:o}),a;t.$async&&(a=i.scopeValue("Error",{ref:Oc.default,code:(0,ee._)`require("ajv/dist/runtime/validation_error").default`}));let c=i.scopeName("validate");t.validateName=c;let l={gen:i,allErrors:this.opts.allErrors,data:Pe.default.data,parentData:Pe.default.parentData,parentDataProperty:Pe.default.parentDataProperty,dataNames:[Pe.default.data],dataPathArr:[ee.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ee.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ee.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ee._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,qc.validateFunctionCode)(l),i.optimize(this.opts.code.optimize);let d=i.toString();u=`${i.scopeRefs(Pe.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let m=new Function(`${Pe.default.self}`,`${Pe.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:i._values}),this.opts.unevaluated){let{props:h,items:f}=l;m.evaluated={props:h instanceof ee.Name?void 0:h,items:f instanceof ee.Name?void 0:f,dynamicProps:h instanceof ee.Name,dynamicItems:f instanceof ee.Name},m.source&&(m.source.evaluated=(0,ee.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}X.compileSchema=Fr;function jc(t,e,r){var s;r=(0,te.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let o=Tc.call(this,t,r);if(o===void 0){let i=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:a}=this.opts;i&&(o=new De({schema:i,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=Rc.call(this,o)}X.resolveRef=jc;function Rc(t){return(0,te.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Fr.call(this,t)}function xn(t){for(let e of this._compilations)if(Ic(e,t))return e}X.getCompilingSchema=xn;function Ic(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Tc(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Ct.call(this,t,e)}function Ct(t,e){let r=this.opts.uriResolver.parse(e),s=(0,te._getFullPath)(this.opts.uriResolver,r),n=(0,te.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return xr.call(this,r,t);let o=(0,te.normalizeId)(s),i=this.refs[o]||this.schemas[o];if(typeof i=="string"){let a=Ct.call(this,t,i);return typeof a?.schema!="object"?void 0:xr.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Fr.call(this,i),o===(0,te.normalizeId)(e)){let{schema:a}=i,{schemaId:c}=this.opts,l=a[c];return l&&(n=(0,te.resolveUrl)(this.opts.uriResolver,n,l)),new De({schema:a,schemaId:c,root:t,baseId:n})}return xr.call(this,r,i)}}X.resolveSchema=Ct;var Cc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function xr(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Kn.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!Cc.has(a)&&l&&(e=(0,te.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Kn.schemaHasRulesButRef)(r,this.RULES)){let a=(0,te.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Ct.call(this,s,a)}let{schemaId:i}=this.opts;if(o=o||new De({schema:r,schemaId:i,root:s,baseId:e}),o.schema!==o.root.schema)return o}});var Fn=g((Rf,Mc)=>{Mc.exports={$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:!1}});var Gr=g((If,Bn)=>{"use strict";var Ac=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Hn=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Lr=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Gn=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Dc=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Hr(t){let e="",r=0,s=0;for(s=0;s<t.length;s++)if(r=t[s].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[s];break}for(s+=1;s<t.length;s++){if(r=t[s].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[s]}return e}var Vc=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Ln(t){return t.length=0,!0}function zc(t,e,r){if(t.length){let s=Hr(t);if(s!=="")e.push(s);else return r.error=!0,!1;t.length=0}return!0}function Uc(t){let e=0,r={error:!1,address:"",zone:""},s=[],n=[],o=!1,i=!1,a=zc;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(i=!0),!a(n,s,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),s.push(":");continue}else if(l==="%"){if(!a(n,s,r))break;a=Ln}else{n.push(l);continue}}return n.length&&(a===Ln?r.zone=n.join(""):i?s.push(n.join("")):s.push(Hr(n))),r.address=s.join(""),r}function Jn(t){if(Kc(t,":")<2)return{host:t,isIPV6:!1};let e=Uc(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,s=e.address;return e.zone&&(r+="%"+e.zone,s+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:s}}}function Kc(t,e){let r=0;for(let s=0;s<t.length;s++)t[s]===e&&r++;return r}function xc(t){let e=t,r=[],s=-1,n=0;for(;n=e.length;){if(n===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(n===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(n===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((s=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,s)),e=e.slice(s)}return r.join("")}var Fc={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Lc=/[@/?#:]/g,Hc=/[@/?#]/g;function Wn(t,e){let r=e?Hc:Lc;return r.lastIndex=0,t.replace(r,s=>Fc[s])}function Gc(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let s=0;s<t.length;s++){if(t[s]==="%"&&s+2<t.length){let n=t.slice(s+1,s+3);if(Lr(n)){let o=n.toUpperCase(),i=String.fromCharCode(parseInt(o,16));e&&Gn(i)?r+=i:r+="%"+o,s+=2;continue}}r+=t[s]}return r}function Jc(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let s=t.slice(r+1,r+3);if(Lr(s)){let n=s.toUpperCase(),o=String.fromCharCode(parseInt(n,16));o!=="."&&Gn(o)?e+=o:e+="%"+n,r+=2;continue}}Dc(t[r])?e+=t[r]:e+=escape(t[r])}return e}function Wc(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let s=t.slice(r+1,r+3);if(Lr(s)){e+="%"+s.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function Bc(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Hn(r)){let s=Jn(r);s.isIPV6===!0?r=`[${s.escapedHost}]`:r=Wn(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Bn.exports={nonSimpleDomain:Vc,recomposeAuthority:Bc,reescapeHostDelimiters:Wn,normalizePercentEncoding:Gc,normalizePathEncoding:Jc,escapePreservingEscapes:Wc,removeDotSegments:xc,isIPv4:Hn,isUUID:Ac,normalizeIPv6:Jn,stringArrayToHexStripped:Hr}});var eo=g((Tf,Zn)=>{"use strict";var{isUUID:Qc}=Gr(),Xc=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Yc=["http","https","ws","wss","urn","urn:uuid"];function Zc(t){return Yc.indexOf(t)!==-1}function Jr(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Qn(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Xn(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function eu(t){return t.secure=Jr(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function tu(t){if((t.port===(Jr(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function ru(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Xc);if(r){let s=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${s}:${e.nid||t.nid}`,o=Wr(n);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function su(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",s=t.nid.toLowerCase(),n=`${r}:${e.nid||s}`,o=Wr(n);o&&(t=o.serialize(t,e));let i=t,a=t.nss;return i.path=`${s||e.nid}:${a}`,e.skipEscape=!0,i}function nu(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Qc(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function ou(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Yn={scheme:"http",domainHost:!0,parse:Qn,serialize:Xn},iu={scheme:"https",domainHost:Yn.domainHost,parse:Qn,serialize:Xn},At={scheme:"ws",domainHost:!0,parse:eu,serialize:tu},au={scheme:"wss",domainHost:At.domainHost,parse:At.parse,serialize:At.serialize},cu={scheme:"urn",parse:ru,serialize:su,skipNormalize:!0},uu={scheme:"urn:uuid",parse:nu,serialize:ou,skipNormalize:!0},Dt={http:Yn,https:iu,ws:At,wss:au,urn:cu,"urn:uuid":uu};Object.setPrototypeOf(Dt,null);function Wr(t){return t&&(Dt[t]||Dt[t.toLowerCase()])||void 0}Zn.exports={wsIsSecure:Jr,SCHEMES:Dt,isValidSchemeName:Zc,getSchemeHandler:Wr}});var io=g((Cf,Vt)=>{"use strict";var{normalizeIPv6:lu,removeDotSegments:ct,recomposeAuthority:du,normalizePercentEncoding:fu,normalizePathEncoding:hu,escapePreservingEscapes:pu,reescapeHostDelimiters:mu,isIPv4:yu,nonSimpleDomain:_u}=Gr(),{SCHEMES:gu,getSchemeHandler:ro}=eo();function $u(t,e){return typeof t=="string"?t=Su(t,e):typeof t=="object"&&(t=Ve(Ne(t,e),e)),t}function vu(t,e,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=so(Ve(t,s),Ve(e,s),s,!0);return s.skipEscape=!0,Ne(n,s)}function so(t,e,r,s){let n={};return s||(t=Ve(Ne(t,r),r),e=Ve(Ne(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ct(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ct(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=ct(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=ct(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function wu(t,e,r){let s=to(t,r),n=to(e,r);return s!==void 0&&n!==void 0&&s.toLowerCase()===n.toLowerCase()}function Ne(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},s=Object.assign({},e),n=[],o=ro(s.scheme||r.scheme);o&&o.serialize&&o.serialize(r,s),r.path!==void 0&&(s.skipEscape?r.path=fu(r.path):(r.path=pu(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),s.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let i=du(r);if(i!==void 0&&(s.reference!=="suffix"&&n.push("//"),n.push(i),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!s.absolutePath&&(!o||!o.absolutePath)&&(a=ct(a)),i===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),n.push(a)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var bu=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Eu(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function no(t,e){let r=Object.assign({},e),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let i=t.match(bu);if(i){s.scheme=i[1],s.userinfo=i[3],s.host=i[4],s.port=parseInt(i[5],10),s.path=i[6]||"",s.query=i[7],s.fragment=i[8],isNaN(s.port)&&(s.port=i[5]);let a=Eu(s,i);if(a!==void 0&&(s.error=s.error||a,n=!0),s.host)if(yu(s.host)===!1){let u=lu(s.host);s.host=u.host.toLowerCase(),o=u.isIPV6}else o=!0;s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");let c=ro(r.scheme||s.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&s.host&&(r.domainHost||c&&c.domainHost)&&o===!1&&_u(s.host))try{s.host=new URL("http://"+s.host).hostname}catch(l){s.error=s.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),s.host!==void 0&&(s.host=mu(unescape(s.host),o))),s.path&&(s.path=hu(s.path)),s.fragment))try{s.fragment=encodeURI(decodeURIComponent(s.fragment))}catch{s.error=s.error||"URI malformed"}c&&c.parse&&c.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return{parsed:s,malformedAuthorityOrPort:n}}function Ve(t,e){return no(t,e).parsed}function Su(t,e){return oo(t,e).normalized}function oo(t,e){let{parsed:r,malformedAuthorityOrPort:s}=no(t,e);return{normalized:s?t:Ne(r,e),malformedAuthorityOrPort:s}}function to(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:s}=oo(t,e);return s?void 0:r}if(typeof t=="object")return Ne(t,e)}var Br={SCHEMES:gu,normalize:$u,resolve:vu,resolveComponent:so,equal:wu,serialize:Ne,parse:Ve};Vt.exports=Br;Vt.exports.default=Br;Vt.exports.fastUri=Br});var co=g(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});var ao=io();ao.code='require("ajv/dist/runtime/uri").default';Qr.default=ao});var _o=g(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.CodeGen=V.Name=V.nil=V.stringify=V.str=V._=V.KeywordCxt=void 0;var Pu=it();Object.defineProperty(V,"KeywordCxt",{enumerable:!0,get:function(){return Pu.KeywordCxt}});var ze=S();Object.defineProperty(V,"_",{enumerable:!0,get:function(){return ze._}});Object.defineProperty(V,"str",{enumerable:!0,get:function(){return ze.str}});Object.defineProperty(V,"stringify",{enumerable:!0,get:function(){return ze.stringify}});Object.defineProperty(V,"nil",{enumerable:!0,get:function(){return ze.nil}});Object.defineProperty(V,"Name",{enumerable:!0,get:function(){return ze.Name}});Object.defineProperty(V,"CodeGen",{enumerable:!0,get:function(){return ze.CodeGen}});var Nu=Tt(),po=at(),ku=Sr(),ut=Mt(),Ou=S(),lt=st(),zt=rt(),Yr=q(),uo=Fn(),qu=co(),mo=(t,e)=>new RegExp(t,e);mo.code="new RegExp";var ju=["removeAdditional","useDefaults","coerceTypes"],Ru=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Iu={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."},Tu={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},lo=200;function Cu(t){var e,r,s,n,o,i,a,c,l,u,d,y,m,h,f,p,_,O,N,C,w,se,ae,er,tr;let Ge=t.strict,rr=(e=t.code)===null||e===void 0?void 0:e.optimize,xs=rr===!0||rr===void 0?1:rr||0,Fs=(s=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:mo,Ei=(n=t.uriResolver)!==null&&n!==void 0?n:qu.default;return{strictSchema:(i=(o=t.strictSchema)!==null&&o!==void 0?o:Ge)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:Ge)!==null&&c!==void 0?c:!0,strictTypes:(u=(l=t.strictTypes)!==null&&l!==void 0?l:Ge)!==null&&u!==void 0?u:"log",strictTuples:(y=(d=t.strictTuples)!==null&&d!==void 0?d:Ge)!==null&&y!==void 0?y:"log",strictRequired:(h=(m=t.strictRequired)!==null&&m!==void 0?m:Ge)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:xs,regExp:Fs}:{optimize:xs,regExp:Fs},loopRequired:(f=t.loopRequired)!==null&&f!==void 0?f:lo,loopEnum:(p=t.loopEnum)!==null&&p!==void 0?p:lo,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(O=t.messages)!==null&&O!==void 0?O:!0,inlineRefs:(N=t.inlineRefs)!==null&&N!==void 0?N:!0,schemaId:(C=t.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(se=t.validateSchema)!==null&&se!==void 0?se:!0,validateFormats:(ae=t.validateFormats)!==null&&ae!==void 0?ae:!0,unicodeRegExp:(er=t.unicodeRegExp)!==null&&er!==void 0?er:!0,int32range:(tr=t.int32range)!==null&&tr!==void 0?tr:!0,uriResolver:Ei}}var dt=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Cu(e)};let{es5:r,lines:s}=this.opts.code;this.scope=new Ou.ValueScope({scope:{},prefixes:Ru,es5:r,lines:s}),this.logger=Uu(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,ku.getRules)(),fo.call(this,Iu,e,"NOT SUPPORTED"),fo.call(this,Tu,e,"DEPRECATED","warn"),this._metaOpts=Vu.call(this),e.formats&&Au.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Du.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Mu.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:s}=this.opts,n=uo;s==="id"&&(n={...uo},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[s],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let s;if(typeof e=="string"){if(s=this.getSchema(e),!s)throw new Error(`no schema with key or ref "${e}"`)}else s=this.compile(e);let n=s(r);return"$async"in s||(this.errors=s.errors),n}compile(e,r){let s=this._addSchema(e,r);return s.validate||this._compileSchemaEnv(s)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return n.call(this,e,r);async function n(u,d){await o.call(this,u.$schema);let y=this._addSchema(u,d);return y.validate||i.call(this,y)}async function o(u){u&&!this.getSchema(u)&&await n.call(this,{$ref:u},!0)}async function i(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof po.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),i.call(this,u)}}function a({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function c(u){let d=await l.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function l(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=s(u))}finally{delete this._loading[u]}}}addSchema(e,r,s,n=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,s,n);return this}let o;if(typeof e=="object"){let{schemaId:i}=this.opts;if(o=e[i],o!==void 0&&typeof o!="string")throw new Error(`schema ${i} must be string`)}return r=(0,lt.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,s,r,n,!0),this}addMetaSchema(e,r,s=this.opts.validateSchema){return this.addSchema(e,r,!0,s),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let s;if(s=e.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(s,e);if(!n&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return n}getSchema(e){let r;for(;typeof(r=ho.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:s}=this.opts,n=new ut.SchemaEnv({schema:{},schemaId:s});if(r=ut.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=ho.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let s=e[this.opts.schemaId];return s&&(s=(0,lt.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let s;if(typeof e=="string")s=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=s);else if(typeof e=="object"&&r===void 0){if(r=e,s=r.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(xu.call(this,s,r),!r)return(0,Yr.eachItem)(s,o=>Xr.call(this,o)),this;Lu.call(this,r);let n={...r,type:(0,zt.getJSONTypes)(r.type),schemaType:(0,zt.getJSONTypes)(r.schemaType)};return(0,Yr.eachItem)(s,n.type.length===0?o=>Xr.call(this,o,n):o=>n.type.forEach(i=>Xr.call(this,o,n,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let s of r.rules){let n=s.rules.findIndex(o=>o.keyword===e);n>=0&&s.rules.splice(n,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:s="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${s}${n.instancePath} ${n.message}`).reduce((n,o)=>n+r+o)}$dataMetaSchema(e,r){let s=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let o=n.split("/").slice(1),i=e;for(let a of o)i=i[a];for(let a in s){let c=s[a];if(typeof c!="object")continue;let{$data:l}=c.definition,u=i[a];l&&u&&(i[a]=yo(u))}}return e}_removeAllSchemas(e,r){for(let s in e){let n=e[s];(!r||r.test(s))&&(typeof n=="string"?delete e[s]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[s]))}}_addSchema(e,r,s,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof e=="object")i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;s=(0,lt.normalizeId)(i||s);let l=lt.getSchemaRefs.call(this,e,s);return c=new ut.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:s,localRefs:l}),this._cache.set(c.schema,c),o&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ut.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ut.compileSchema.call(this,e)}finally{this.opts=r}}};dt.ValidationError=Nu.default;dt.MissingRefError=po.default;V.default=dt;function fo(t,e,r,s="error"){for(let n in t){let o=n;o in e&&this.logger[s](`${r}: option ${n}. ${t[o]}`)}}function ho(t){return t=(0,lt.normalizeId)(t),this.schemas[t]||this.refs[t]}function Mu(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Au(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Du(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Vu(){let t={...this.opts};for(let e of ju)delete t[e];return t}var zu={log(){},warn(){},error(){}};function Uu(t){if(t===!1)return zu;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Ku=/^[a-z_$][a-z0-9_$:-]*$/i;function xu(t,e){let{RULES:r}=this;if((0,Yr.eachItem)(t,s=>{if(r.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!Ku.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Xr(t,e,r){var s;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,i=n?o.post:o.rules.find(({type:c})=>c===r);if(i||(i={type:r,rules:[]},o.rules.push(i)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,zt.getJSONTypes)(e.type),schemaType:(0,zt.getJSONTypes)(e.schemaType)}};e.before?Fu.call(this,i,a,e.before):i.rules.push(a),o.all[t]=a,(s=e.implements)===null||s===void 0||s.forEach(c=>this.addKeyword(c))}function Fu(t,e,r){let s=t.rules.findIndex(n=>n.keyword===r);s>=0?t.rules.splice(s,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Lu(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=yo(e)),t.validateSchema=this.compile(e,!0))}var Hu={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function yo(t){return{anyOf:[t,Hu]}}});var go=g(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});var Gu={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Zr.default=Gu});var bo=g(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.callRef=ke.getValidate=void 0;var Ju=at(),$o=Q(),W=S(),Ue=le(),vo=Mt(),Ut=q(),Wu={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:o,validateName:i,opts:a,self:c}=s,{root:l}=o;if((r==="#"||r==="#/")&&n===l.baseId)return d();let u=vo.resolveRef.call(c,l,n,r);if(u===void 0)throw new Ju.default(s.opts.uriResolver,n,r);if(u instanceof vo.SchemaEnv)return y(u);return m(u);function d(){if(o===l)return Kt(t,i,o,o.$async);let h=e.scopeValue("root",{ref:l});return Kt(t,(0,W._)`${h}.validate`,l,l.$async)}function y(h){let f=wo(t,h);Kt(t,f,h,h.$async)}function m(h){let f=e.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,W.stringify)(h)}:{ref:h}),p=e.name("valid"),_=t.subschema({schema:h,dataTypes:[],schemaPath:W.nil,topSchemaRef:f,errSchemaPath:r},p);t.mergeEvaluated(_),t.ok(p)}}};function wo(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,W._)`${r.scopeValue("wrapper",{ref:e})}.validate`}ke.getValidate=wo;function Kt(t,e,r,s){let{gen:n,it:o}=t,{allErrors:i,schemaEnv:a,opts:c}=o,l=c.passContext?Ue.default.this:W.nil;s?u():d();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=n.let("valid");n.try(()=>{n.code((0,W._)`await ${(0,$o.callValidateCode)(t,e,l)}`),m(e),i||n.assign(h,!0)},f=>{n.if((0,W._)`!(${f} instanceof ${o.ValidationError})`,()=>n.throw(f)),y(f),i||n.assign(h,!1)}),t.ok(h)}function d(){t.result((0,$o.callValidateCode)(t,e,l),()=>m(e),()=>y(e))}function y(h){let f=(0,W._)`${h}.errors`;n.assign(Ue.default.vErrors,(0,W._)`${Ue.default.vErrors} === null ? ${f} : ${Ue.default.vErrors}.concat(${f})`),n.assign(Ue.default.errors,(0,W._)`${Ue.default.vErrors}.length`)}function m(h){var f;if(!o.opts.unevaluated)return;let p=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(o.props!==!0)if(p&&!p.dynamicProps)p.props!==void 0&&(o.props=Ut.mergeEvaluated.props(n,p.props,o.props));else{let _=n.var("props",(0,W._)`${h}.evaluated.props`);o.props=Ut.mergeEvaluated.props(n,_,o.props,W.Name)}if(o.items!==!0)if(p&&!p.dynamicItems)p.items!==void 0&&(o.items=Ut.mergeEvaluated.items(n,p.items,o.items));else{let _=n.var("items",(0,W._)`${h}.evaluated.items`);o.items=Ut.mergeEvaluated.items(n,_,o.items,W.Name)}}}ke.callRef=Kt;ke.default=Wu});var Eo=g(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Bu=go(),Qu=bo(),Xu=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Bu.default,Qu.default];es.default=Xu});var So=g(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var xt=S(),ge=xt.operators,Ft={maximum:{okStr:"<=",ok:ge.LTE,fail:ge.GT},minimum:{okStr:">=",ok:ge.GTE,fail:ge.LT},exclusiveMaximum:{okStr:"<",ok:ge.LT,fail:ge.GTE},exclusiveMinimum:{okStr:">",ok:ge.GT,fail:ge.LTE}},Yu={message:({keyword:t,schemaCode:e})=>(0,xt.str)`must be ${Ft[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,xt._)`{comparison: ${Ft[t].okStr}, limit: ${e}}`},Zu={keyword:Object.keys(Ft),type:"number",schemaType:"number",$data:!0,error:Yu,code(t){let{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,xt._)`${r} ${Ft[e].fail} ${s} || isNaN(${r})`)}};ts.default=Zu});var Po=g(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var ft=S(),el={message:({schemaCode:t})=>(0,ft.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ft._)`{multipleOf: ${t}}`},tl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:el,code(t){let{gen:e,data:r,schemaCode:s,it:n}=t,o=n.opts.multipleOfPrecision,i=e.let("res"),a=o?(0,ft._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:(0,ft._)`${i} !== parseInt(${i})`;t.fail$data((0,ft._)`(${s} === 0 || (${i} = ${r}/${s}, ${a}))`)}};rs.default=tl});var ko=g(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});function No(t){let e=t.length,r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}ss.default=No;No.code='require("ajv/dist/runtime/ucs2length").default'});var Oo=g(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var Oe=S(),rl=q(),sl=ko(),nl={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Oe.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Oe._)`{limit: ${t}}`},ol={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:nl,code(t){let{keyword:e,data:r,schemaCode:s,it:n}=t,o=e==="maxLength"?Oe.operators.GT:Oe.operators.LT,i=n.opts.unicode===!1?(0,Oe._)`${r}.length`:(0,Oe._)`${(0,rl.useFunc)(t.gen,sl.default)}(${r})`;t.fail$data((0,Oe._)`${i} ${o} ${s}`)}};ns.default=ol});var qo=g(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var il=Q(),al=q(),Ke=S(),cl={message:({schemaCode:t})=>(0,Ke.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ke._)`{pattern: ${t}}`},ul={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:cl,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:o,it:i}=t,a=i.opts.unicodeRegExp?"u":"";if(s){let{regExp:c}=i.opts.code,l=c.code==="new RegExp"?(0,Ke._)`new RegExp`:(0,al.useFunc)(e,c),u=e.let("valid");e.try(()=>e.assign(u,(0,Ke._)`${l}(${o}, ${a}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,Ke._)`!${u}`)}else{let c=(0,il.usePattern)(t,n);t.fail$data((0,Ke._)`!${c}.test(${r})`)}}};os.default=ul});var jo=g(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var ht=S(),ll={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ht.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ht._)`{limit: ${t}}`},dl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ll,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?ht.operators.GT:ht.operators.LT;t.fail$data((0,ht._)`Object.keys(${r}).length ${n} ${s}`)}};is.default=dl});var Ro=g(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var pt=Q(),mt=S(),fl=q(),hl={message:({params:{missingProperty:t}})=>(0,mt.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,mt._)`{missingProperty: ${t}}`},pl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:hl,code(t){let{gen:e,schema:r,schemaCode:s,data:n,$data:o,it:i}=t,{opts:a}=i;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors?l():u(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:h}=t.it;for(let f of r)if(m?.[f]===void 0&&!h.has(f)){let p=i.schemaEnv.baseId+i.errSchemaPath,_=`required property "${f}" is not defined at "${p}" (strictRequired)`;(0,fl.checkStrictMode)(i,_,i.opts.strictRequired)}}function l(){if(c||o)t.block$data(mt.nil,d);else for(let m of r)(0,pt.checkReportMissingProp)(t,m)}function u(){let m=e.let("missing");if(c||o){let h=e.let("valid",!0);t.block$data(h,()=>y(m,h)),t.ok(h)}else e.if((0,pt.checkMissingProp)(t,r,m)),(0,pt.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",s,m=>{t.setParams({missingProperty:m}),e.if((0,pt.noPropertyInData)(e,n,m,a.ownProperties),()=>t.error())})}function y(m,h){t.setParams({missingProperty:m}),e.forOf(m,s,()=>{e.assign(h,(0,pt.propertyInData)(e,n,m,a.ownProperties)),e.if((0,mt.not)(h),()=>{t.error(),e.break()})},mt.nil)}}};as.default=pl});var Io=g(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var yt=S(),ml={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,yt.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,yt._)`{limit: ${t}}`},yl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:ml,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?yt.operators.GT:yt.operators.LT;t.fail$data((0,yt._)`${r}.length ${n} ${s}`)}};cs.default=yl});var Lt=g(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var To=Ir();To.code='require("ajv/dist/runtime/equal").default';us.default=To});var Co=g(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var ls=rt(),z=S(),_l=q(),gl=Lt(),$l={message:({params:{i:t,j:e}})=>(0,z.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,z._)`{i: ${t}, j: ${e}}`},vl={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:$l,code(t){let{gen:e,data:r,$data:s,schema:n,parentSchema:o,schemaCode:i,it:a}=t;if(!s&&!n)return;let c=e.let("valid"),l=o.items?(0,ls.getSchemaTypes)(o.items):[];t.block$data(c,u,(0,z._)`${i} === false`),t.ok(c);function u(){let h=e.let("i",(0,z._)`${r}.length`),f=e.let("j");t.setParams({i:h,j:f}),e.assign(c,!0),e.if((0,z._)`${h} > 1`,()=>(d()?y:m)(h,f))}function d(){return l.length>0&&!l.some(h=>h==="object"||h==="array")}function y(h,f){let p=e.name("item"),_=(0,ls.checkDataTypes)(l,p,a.opts.strictNumbers,ls.DataType.Wrong),O=e.const("indices",(0,z._)`{}`);e.for((0,z._)`;${h}--;`,()=>{e.let(p,(0,z._)`${r}[${h}]`),e.if(_,(0,z._)`continue`),l.length>1&&e.if((0,z._)`typeof ${p} == "string"`,(0,z._)`${p} += "_"`),e.if((0,z._)`typeof ${O}[${p}] == "number"`,()=>{e.assign(f,(0,z._)`${O}[${p}]`),t.error(),e.assign(c,!1).break()}).code((0,z._)`${O}[${p}] = ${h}`)})}function m(h,f){let p=(0,_l.useFunc)(e,gl.default),_=e.name("outer");e.label(_).for((0,z._)`;${h}--;`,()=>e.for((0,z._)`${f} = ${h}; ${f}--;`,()=>e.if((0,z._)`${p}(${r}[${h}], ${r}[${f}])`,()=>{t.error(),e.assign(c,!1).break(_)})))}}};ds.default=vl});var Mo=g(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var fs=S(),wl=q(),bl=Lt(),El={message:"must be equal to constant",params:({schemaCode:t})=>(0,fs._)`{allowedValue: ${t}}`},Sl={keyword:"const",$data:!0,error:El,code(t){let{gen:e,data:r,$data:s,schemaCode:n,schema:o}=t;s||o&&typeof o=="object"?t.fail$data((0,fs._)`!${(0,wl.useFunc)(e,bl.default)}(${r}, ${n})`):t.fail((0,fs._)`${o} !== ${r}`)}};hs.default=Sl});var Ao=g(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var _t=S(),Pl=q(),Nl=Lt(),kl={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,_t._)`{allowedValues: ${t}}`},Ol={keyword:"enum",schemaType:"array",$data:!0,error:kl,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:o,it:i}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=i.opts.loopEnum,c,l=()=>c??(c=(0,Pl.useFunc)(e,Nl.default)),u;if(a||s)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=e.const("vSchema",o);u=(0,_t.or)(...n.map((h,f)=>y(m,f)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,m=>e.if((0,_t._)`${l()}(${r}, ${m})`,()=>e.assign(u,!0).break()))}function y(m,h){let f=n[h];return typeof f=="object"&&f!==null?(0,_t._)`${l()}(${r}, ${m}[${h}])`:(0,_t._)`${r} === ${f}`}}};ps.default=Ol});var Do=g(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var ql=So(),jl=Po(),Rl=Oo(),Il=qo(),Tl=jo(),Cl=Ro(),Ml=Io(),Al=Co(),Dl=Mo(),Vl=Ao(),zl=[ql.default,jl.default,Rl.default,Il.default,Tl.default,Cl.default,Ml.default,Al.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Dl.default,Vl.default];ms.default=zl});var _s=g(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.validateAdditionalItems=void 0;var qe=S(),ys=q(),Ul={message:({params:{len:t}})=>(0,qe.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,qe._)`{limit: ${t}}`},Kl={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ul,code(t){let{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,ys.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Vo(t,s)}};function Vo(t,e){let{gen:r,schema:s,data:n,keyword:o,it:i}=t;i.items=!0;let a=r.const("len",(0,qe._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,qe._)`${a} <= ${e.length}`);else if(typeof s=="object"&&!(0,ys.alwaysValidSchema)(i,s)){let l=r.var("valid",(0,qe._)`${a} <= ${e.length}`);r.if((0,qe.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:ys.Type.Num},l),i.allErrors||r.if((0,qe.not)(l),()=>r.break())})}}gt.validateAdditionalItems=Vo;gt.default=Kl});var gs=g($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.validateTuple=void 0;var zo=S(),Ht=q(),xl=Q(),Fl={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Uo(t,"additionalItems",e);r.items=!0,!(0,Ht.alwaysValidSchema)(r,e)&&t.ok((0,xl.validateArray)(t))}};function Uo(t,e,r=t.schema){let{gen:s,parentSchema:n,data:o,keyword:i,it:a}=t;u(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ht.mergeEvaluated.items(s,r.length,a.items));let c=s.name("valid"),l=s.const("len",(0,zo._)`${o}.length`);r.forEach((d,y)=>{(0,Ht.alwaysValidSchema)(a,d)||(s.if((0,zo._)`${l} > ${y}`,()=>t.subschema({keyword:i,schemaProp:y,dataProp:y},c)),t.ok(c))});function u(d){let{opts:y,errSchemaPath:m}=a,h=r.length,f=h===d.minItems&&(h===d.maxItems||d[e]===!1);if(y.strictTuples&&!f){let p=`"${i}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Ht.checkStrictMode)(a,p,y.strictTuples)}}}$t.validateTuple=Uo;$t.default=Fl});var Ko=g($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Ll=gs(),Hl={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Ll.validateTuple)(t,"items")};$s.default=Hl});var Fo=g(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var xo=S(),Gl=q(),Jl=Q(),Wl=_s(),Bl={message:({params:{len:t}})=>(0,xo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,xo._)`{limit: ${t}}`},Ql={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Bl,code(t){let{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,Gl.alwaysValidSchema)(s,e)&&(n?(0,Wl.validateAdditionalItems)(t,n):t.ok((0,Jl.validateArray)(t)))}};vs.default=Ql});var Lo=g(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var Y=S(),Gt=q(),Xl={message:({params:{min:t,max:e}})=>e===void 0?(0,Y.str)`must contain at least ${t} valid item(s)`:(0,Y.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Y._)`{minContains: ${t}}`:(0,Y._)`{minContains: ${t}, maxContains: ${e}}`},Yl={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Xl,code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t,i,a,{minContains:c,maxContains:l}=s;o.opts.next?(i=c===void 0?1:c,a=l):i=1;let u=e.const("len",(0,Y._)`${n}.length`);if(t.setParams({min:i,max:a}),a===void 0&&i===0){(0,Gt.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,Gt.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Gt.alwaysValidSchema)(o,r)){let f=(0,Y._)`${u} >= ${i}`;a!==void 0&&(f=(0,Y._)`${f} && ${u} <= ${a}`),t.pass(f);return}o.items=!0;let d=e.name("valid");a===void 0&&i===1?m(d,()=>e.if(d,()=>e.break())):i===0?(e.let(d,!0),a!==void 0&&e.if((0,Y._)`${n}.length > 0`,y)):(e.let(d,!1),y()),t.result(d,()=>t.reset());function y(){let f=e.name("_valid"),p=e.let("count",0);m(f,()=>e.if(f,()=>h(p)))}function m(f,p){e.forRange("i",0,u,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:Gt.Type.Num,compositeRule:!0},f),p()})}function h(f){e.code((0,Y._)`${f}++`),a===void 0?e.if((0,Y._)`${f} >= ${i}`,()=>e.assign(d,!0).break()):(e.if((0,Y._)`${f} > ${a}`,()=>e.assign(d,!1).break()),i===1?e.assign(d,!0):e.if((0,Y._)`${f} >= ${i}`,()=>e.assign(d,!0)))}}};ws.default=Yl});var Jo=g(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateSchemaDeps=ie.validatePropertyDeps=ie.error=void 0;var bs=S(),Zl=q(),vt=Q();ie.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let s=e===1?"property":"properties";return(0,bs.str)`must have ${s} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:s}})=>(0,bs._)`{property: ${t},
|
|
6
|
-
missingProperty: ${s},
|
|
7
|
-
depsCount: ${e},
|
|
8
|
-
deps: ${r}}`};var ed={keyword:"dependencies",type:"object",schemaType:"object",error:ie.error,code(t){let[e,r]=td(t);Ho(t,e),Go(t,r)}};function td({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s]}return[e,r]}function Ho(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let i in e){let a=e[i];if(a.length===0)continue;let c=(0,vt.propertyInData)(r,s,i,n.opts.ownProperties);t.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let l of a)(0,vt.checkReportMissingProp)(t,l)}):(r.if((0,bs._)`${c} && (${(0,vt.checkMissingProp)(t,a,o)})`),(0,vt.reportMissingProp)(t,o),r.else())}}ie.validatePropertyDeps=Ho;function Go(t,e=t.schema){let{gen:r,data:s,keyword:n,it:o}=t,i=r.name("valid");for(let a in e)(0,Zl.alwaysValidSchema)(o,e[a])||(r.if((0,vt.propertyInData)(r,s,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:a},i);t.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),t.ok(i))}ie.validateSchemaDeps=Go;ie.default=ed});var Bo=g(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var Wo=S(),rd=q(),sd={message:"property name must be valid",params:({params:t})=>(0,Wo._)`{propertyName: ${t.propertyName}}`},nd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:sd,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0,rd.alwaysValidSchema)(n,r))return;let o=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},o),e.if((0,Wo.not)(o),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(o)}};Es.default=nd});var Ps=g(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var Jt=Q(),re=S(),od=le(),Wt=q(),id={message:"must NOT have additional properties",params:({params:t})=>(0,re._)`{additionalProperty: ${t.additionalProperty}}`},ad={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:id,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:o,it:i}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&(0,Wt.alwaysValidSchema)(i,r))return;let l=(0,Jt.allSchemaProperties)(s.properties),u=(0,Jt.allSchemaProperties)(s.patternProperties);d(),t.ok((0,re._)`${o} === ${od.default.errors}`);function d(){e.forIn("key",n,p=>{!l.length&&!u.length?h(p):e.if(y(p),()=>h(p))})}function y(p){let _;if(l.length>8){let O=(0,Wt.schemaRefOrVal)(i,s.properties,"properties");_=(0,Jt.isOwnProperty)(e,O,p)}else l.length?_=(0,re.or)(...l.map(O=>(0,re._)`${p} === ${O}`)):_=re.nil;return u.length&&(_=(0,re.or)(_,...u.map(O=>(0,re._)`${(0,Jt.usePattern)(t,O)}.test(${p})`))),(0,re.not)(_)}function m(p){e.code((0,re._)`delete ${n}[${p}]`)}function h(p){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(p);return}if(r===!1){t.setParams({additionalProperty:p}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Wt.alwaysValidSchema)(i,r)){let _=e.name("valid");c.removeAdditional==="failing"?(f(p,_,!1),e.if((0,re.not)(_),()=>{t.reset(),m(p)})):(f(p,_),a||e.if((0,re.not)(_),()=>e.break()))}}function f(p,_,O){let N={keyword:"additionalProperties",dataProp:p,dataPropType:Wt.Type.Str};O===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,_)}}};Ss.default=ad});var Yo=g(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var cd=it(),Qo=Q(),Ns=q(),Xo=Ps(),ud={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t;o.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Xo.default.code(new cd.KeywordCxt(o,Xo.default,"additionalProperties"));let i=(0,Qo.allSchemaProperties)(r);for(let d of i)o.definedProperties.add(d);o.opts.unevaluated&&i.length&&o.props!==!0&&(o.props=Ns.mergeEvaluated.props(e,(0,Ns.toHash)(i),o.props));let a=i.filter(d=>!(0,Ns.alwaysValidSchema)(o,r[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?u(d):(e.if((0,Qo.propertyInData)(e,n,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};ks.default=ud});var ri=g(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var Zo=Q(),Bt=S(),ei=q(),ti=q(),ld={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:o}=t,{opts:i}=o,a=(0,Zo.allSchemaProperties)(r),c=a.filter(f=>(0,ei.alwaysValidSchema)(o,r[f]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=i.strictSchema&&!i.allowMatchingProperties&&n.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof Bt.Name)&&(o.props=(0,ti.evaluatedPropsToName)(e,o.props));let{props:d}=o;y();function y(){for(let f of a)l&&m(f),o.allErrors?h(f):(e.var(u,!0),h(f),e.if(u))}function m(f){for(let p in l)new RegExp(f).test(p)&&(0,ei.checkStrictMode)(o,`property ${p} matches pattern ${f} (use allowMatchingProperties)`)}function h(f){e.forIn("key",s,p=>{e.if((0,Bt._)`${(0,Zo.usePattern)(t,f)}.test(${p})`,()=>{let _=c.includes(f);_||t.subschema({keyword:"patternProperties",schemaProp:f,dataProp:p,dataPropType:ti.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,Bt._)`${d}[${p}]`,!0):!_&&!o.allErrors&&e.if((0,Bt.not)(u),()=>e.break())})})}}};Os.default=ld});var si=g(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});var dd=q(),fd={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:s}=t;if((0,dd.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};qs.default=fd});var ni=g(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});var hd=Q(),pd={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:hd.validateUnion,error:{message:"must match a schema in anyOf"}};js.default=pd});var oi=g(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var Qt=S(),md=q(),yd={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Qt._)`{passingSchemas: ${t.passing}}`},_d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:yd,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let o=r,i=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(i,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((u,d)=>{let y;(0,md.alwaysValidSchema)(n,u)?e.var(c,!0):y=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Qt._)`${c} && ${i}`).assign(i,!1).assign(a,(0,Qt._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(i,!0),e.assign(a,d),y&&t.mergeEvaluated(y,Qt.Name)})})}}};Rs.default=_d});var ii=g(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var gd=q(),$d={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((o,i)=>{if((0,gd.alwaysValidSchema)(s,o))return;let a=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(a)})}};Is.default=$d});var ui=g(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var Xt=S(),ci=q(),vd={message:({params:t})=>(0,Xt.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Xt._)`{failingKeyword: ${t.ifClause}}`},wd={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:vd,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,ci.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=ai(s,"then"),o=ai(s,"else");if(!n&&!o)return;let i=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),n&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(a,l("then",u),l("else",u))}else n?e.if(a,l("then")):e.if((0,Xt.not)(a),l("else"));t.pass(i,()=>t.error(!0));function c(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(u)}function l(u,d){return()=>{let y=t.subschema({keyword:u},a);e.assign(i,a),t.mergeValidEvaluated(y,i),d?e.assign(d,(0,Xt._)`${u}`):t.setParams({ifClause:u})}}}};function ai(t,e){let r=t.schema[e];return r!==void 0&&!(0,ci.alwaysValidSchema)(t,r)}Ts.default=wd});var li=g(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var bd=q(),Ed={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,bd.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Cs.default=Ed});var di=g(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var Sd=_s(),Pd=Ko(),Nd=gs(),kd=Fo(),Od=Lo(),qd=Jo(),jd=Bo(),Rd=Ps(),Id=Yo(),Td=ri(),Cd=si(),Md=ni(),Ad=oi(),Dd=ii(),Vd=ui(),zd=li();function Ud(t=!1){let e=[Cd.default,Md.default,Ad.default,Dd.default,Vd.default,zd.default,jd.default,Rd.default,qd.default,Id.default,Td.default];return t?e.push(Pd.default,kd.default):e.push(Sd.default,Nd.default),e.push(Od.default),e}Ms.default=Ud});var fi=g(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var D=S(),Kd={message:({schemaCode:t})=>(0,D.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,D._)`{format: ${t}}`},xd={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Kd,code(t,e){let{gen:r,data:s,$data:n,schema:o,schemaCode:i,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:u,self:d}=a;if(!c.validateFormats)return;n?y():m();function y(){let h=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,D._)`${h}[${i}]`),p=r.let("fType"),_=r.let("format");r.if((0,D._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(p,(0,D._)`${f}.type || "string"`).assign(_,(0,D._)`${f}.validate`),()=>r.assign(p,(0,D._)`"string"`).assign(_,f)),t.fail$data((0,D.or)(O(),N()));function O(){return c.strictSchema===!1?D.nil:(0,D._)`${i} && !${_}`}function N(){let C=u.$async?(0,D._)`(${f}.async ? await ${_}(${s}) : ${_}(${s}))`:(0,D._)`${_}(${s})`,w=(0,D._)`(typeof ${_} == "function" ? ${C} : ${_}.test(${s}))`;return(0,D._)`${_} && ${_} !== true && ${p} === ${e} && !${w}`}}function m(){let h=d.formats[o];if(!h){O();return}if(h===!0)return;let[f,p,_]=N(h);f===e&&t.pass(C());function O(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function N(w){let se=w instanceof RegExp?(0,D.regexpCode)(w):c.code.formats?(0,D._)`${c.code.formats}${(0,D.getProperty)(o)}`:void 0,ae=r.scopeValue("formats",{key:o,ref:w,code:se});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,D._)`${ae}.validate`]:["string",w,ae]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,D._)`await ${_}(${s})`}return typeof p=="function"?(0,D._)`${_}(${s})`:(0,D._)`${_}.test(${s})`}}}};As.default=xd});var hi=g(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});var Fd=fi(),Ld=[Fd.default];Ds.default=Ld});var pi=g(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.contentVocabulary=xe.metadataVocabulary=void 0;xe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];xe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var yi=g(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var Hd=Eo(),Gd=Do(),Jd=di(),Wd=hi(),mi=pi(),Bd=[Hd.default,Gd.default,(0,Jd.default)(),Wd.default,mi.metadataVocabulary,mi.contentVocabulary];Vs.default=Bd});var gi=g(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DiscrError=void 0;var _i;(function(t){t.Tag="tag",t.Mapping="mapping"})(_i||(Yt.DiscrError=_i={}))});var vi=g(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var Fe=S(),zs=gi(),$i=Mt(),Qd=at(),Xd=q(),Yd={message:({params:{discrError:t,tagName:e}})=>t===zs.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Fe._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Zd={keyword:"discriminator",type:"object",schemaType:"object",error:Yd,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:o}=t,{oneOf:i}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,Fe._)`${r}${(0,Fe.getProperty)(a)}`);e.if((0,Fe._)`typeof ${l} == "string"`,()=>u(),()=>t.error(!1,{discrError:zs.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function u(){let m=y();e.if(!1);for(let h in m)e.elseIf((0,Fe._)`${l} === ${h}`),e.assign(c,d(m[h]));e.else(),t.error(!1,{discrError:zs.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(m){let h=e.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:m},h);return t.mergeEvaluated(f,Fe.Name),h}function y(){var m;let h={},f=_(n),p=!0;for(let C=0;C<i.length;C++){let w=i[C];if(w?.$ref&&!(0,Xd.schemaHasRulesButRef)(w,o.self.RULES)){let ae=w.$ref;if(w=$i.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,ae),w instanceof $i.SchemaEnv&&(w=w.schema),w===void 0)throw new Qd.default(o.opts.uriResolver,o.baseId,ae)}let se=(m=w?.properties)===null||m===void 0?void 0:m[a];if(typeof se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);p=p&&(f||_(w)),O(se,C)}if(!p)throw new Error(`discriminator: "${a}" must be required`);return h;function _({required:C}){return Array.isArray(C)&&C.includes(a)}function O(C,w){if(C.const)N(C.const,w);else if(C.enum)for(let se of C.enum)N(se,w);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function N(C,w){if(typeof C!="string"||C in h)throw new Error(`discriminator: "${a}" values must be unique strings`);h[C]=w}}}};Us.default=Zd});var wi=g((bh,ef)=>{ef.exports={$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:!0,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:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},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:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},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:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},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:!0}});var uf=g((A,Ks)=>{Object.defineProperty(A,"__esModule",{value:!0});A.MissingRefError=A.ValidationError=A.CodeGen=A.Name=A.nil=A.stringify=A.str=A._=A.KeywordCxt=A.Ajv=void 0;var tf=_o(),rf=yi(),sf=vi(),bi=wi(),nf=["/properties"],Zt="http://json-schema.org/draft-07/schema",Le=class extends tf.default{_addVocabularies(){super._addVocabularies(),rf.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(sf.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(bi,nf):bi;this.addMetaSchema(e,Zt,!1),this.refs["http://json-schema.org/schema"]=Zt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Zt)?Zt:void 0)}};A.Ajv=Le;Ks.exports=A=Le;Ks.exports.Ajv=Le;Object.defineProperty(A,"__esModule",{value:!0});A.default=Le;var of=it();Object.defineProperty(A,"KeywordCxt",{enumerable:!0,get:function(){return of.KeywordCxt}});var He=S();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return He._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return He.str}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return He.stringify}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return He.nil}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return He.Name}});Object.defineProperty(A,"CodeGen",{enumerable:!0,get:function(){return He.CodeGen}});var af=Tt();Object.defineProperty(A,"ValidationError",{enumerable:!0,get:function(){return af.default}});var cf=at();Object.defineProperty(A,"MissingRefError",{enumerable:!0,get:function(){return cf.default}})});export default uf();
|
|
9
|
-
//# sourceMappingURL=ajv-LGNUXWV5.js.map
|