@graffiti-garden/wrapper-data-guard 0.1.0

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