@recursica/adapter-tester 5.3.0 → 5.4.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/README.md +7 -1
- package/dist/cli.cjs +12 -11
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +354 -212
- package/dist/cli.js.map +1 -1
- package/dist/devServer.d.ts +5 -2
- package/dist/devServer.d.ts.map +1 -1
- package/dist/fileConfig.d.ts +1 -1
- package/dist/harness/mantineSourceOfTruth.d.ts +1 -1
- package/dist/harness/mantineSourceOfTruth.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.html +226 -3
- package/dist/index.js +1 -1
- package/dist/{mantineSourceOfTruth-6KZlsQ67.cjs → mantineSourceOfTruth-DiQas6OS.cjs} +29 -16
- package/dist/mantineSourceOfTruth-DiQas6OS.cjs.map +1 -0
- package/dist/{mantineSourceOfTruth-CAKhcVCT.js → mantineSourceOfTruth-xUEi1k8U.js} +42 -29
- package/dist/mantineSourceOfTruth-xUEi1k8U.js.map +1 -0
- package/dist/runVisualRegression-CQk97Qkv.js +5051 -0
- package/dist/runVisualRegression-CQk97Qkv.js.map +1 -0
- package/dist/runVisualRegression-DNafR8Lb.cjs +13 -0
- package/dist/runVisualRegression-DNafR8Lb.cjs.map +1 -0
- package/dist/testing/runVisualRegression.d.ts +16 -2
- package/dist/testing/runVisualRegression.d.ts.map +1 -1
- package/dist/testing.cjs +1 -5
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +2 -380
- package/dist/testing.js.map +1 -1
- package/package.json +3 -2
- package/public/index.html +226 -3
- package/dist/index-C6uYPRmx.cjs +0 -9
- package/dist/index-C6uYPRmx.cjs.map +0 -1
- package/dist/index-DqQzFSAH.js +0 -4667
- package/dist/index-DqQzFSAH.js.map +0 -1
- package/dist/mantineSourceOfTruth-6KZlsQ67.cjs.map +0 -1
- package/dist/mantineSourceOfTruth-CAKhcVCT.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const Yt=require("@playwright/test"),ee=require("node:fs"),qn=require("pixelmatch"),Ie=require("pngjs"),bt=require("node:path");function Lt(e,t){const f=Ie.PNG.sync.read(e),o=Ie.PNG.sync.read(t);if(f.width!==o.width||f.height!==o.height)return{diffPixels:1/0,diffImage:null};const w=new Ie.PNG({width:f.width,height:f.height});return{diffPixels:qn(f.data,o.data,w.data,f.width,f.height,{threshold:.1}),diffImage:Ie.PNG.sync.write(w)}}function Cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe={exports:{}},Rt={},me={},$e={},jt={},It={},qt={},Zt;function vt(){return Zt||(Zt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class f extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=f;class o extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((i,p)=>`${i}${p}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((i,p)=>(p instanceof f&&(i[p.str]=(i[p.str]||0)+1),i),{})}}e._Code=o,e.nil=new o("");function w(u,...r){const i=[u[0]];let p=0;for(;p<r.length;)c(i,r[p]),i.push(u[++p]);return new o(i)}e._=w;const s=new o("+");function h(u,...r){const i=[v(u[0])];let p=0;for(;p<r.length;)i.push(s),c(i,r[p]),i.push(s,v(u[++p]));return m(i),new o(i)}e.str=h;function c(u,r){r instanceof o?u.push(...r._items):r instanceof f?u.push(r):u.push(P(r))}e.addCodeArg=c;function m(u){let r=1;for(;r<u.length-1;){if(u[r]===s){const i=$(u[r-1],u[r+1]);if(i!==void 0){u.splice(r-1,3,i);continue}u[r++]="+"}r++}}function $(u,r){if(r==='""')return u;if(u==='""')return r;if(typeof u=="string")return r instanceof f||u[u.length-1]!=='"'?void 0:typeof r!="string"?`${u.slice(0,-1)}${r}"`:r[0]==='"'?u.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(u instanceof f))return`"${u}${r.slice(1)}`}function g(u,r){return r.emptyStr()?u:u.emptyStr()?r:h`${u}${r}`}e.strConcat=g;function P(u){return typeof u=="number"||typeof u=="boolean"||u===null?u:v(Array.isArray(u)?u.join(","):u)}function _(u){return new o(v(u))}e.stringify=_;function v(u){return JSON.stringify(u).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function y(u){return typeof u=="string"&&e.IDENTIFIER.test(u)?new o(`.${u}`):w`[${u}]`}e.getProperty=y;function b(u){if(typeof u=="string"&&e.IDENTIFIER.test(u))return new o(`${u}`);throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`)}e.getEsmExportName=b;function n(u){return new o(u.toString())}e.regexpCode=n})(qt)),qt}var Ct={},Qt;function xt(){return Qt||(Qt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=vt();class f extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`),this.value=$.value}}var o;(function(m){m[m.Started=0]="Started",m[m.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class w{constructor({prefixes:$,parent:g}={}){this._names={},this._prefixes=$,this._parent=g}toName($){return $ instanceof t.Name?$:this.name($)}name($){return new t.Name(this._newName($))}_newName($){const g=this._names[$]||this._nameGroup($);return`${$}${g.index++}`}_nameGroup($){var g,P;if(!((P=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||P===void 0)&&P.has($)||this._prefixes&&!this._prefixes.has($))throw new Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}e.Scope=w;class s extends t.Name{constructor($,g){super(g),this.prefix=$}setValue($,{property:g,itemIndex:P}){this.value=$,this.scopePath=(0,t._)`.${new t.Name(g)}[${P}]`}}e.ValueScopeName=s;const h=(0,t._)`\n`;class c extends w{constructor($){super($),this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?h:t.nil}}get(){return this._scope}name($){return new s($,this._newName($))}value($,g){var P;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName($),{prefix:v}=_,y=(P=g.key)!==null&&P!==void 0?P:g.ref;let b=this._values[v];if(b){const r=b.get(y);if(r)return r}else b=this._values[v]=new Map;b.set(y,_);const n=this._scope[v]||(this._scope[v]=[]),u=n.length;return n[u]=g.ref,_.setValue(g,{property:v,itemIndex:u}),_}getValue($,g){const P=this._values[$];if(P)return P.get(g)}scopeRefs($,g=this._values){return this._reduceValues(g,P=>{if(P.scopePath===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return(0,t._)`${$}${P.scopePath}`})}scopeCode($=this._values,g,P){return this._reduceValues($,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},g,P)}_reduceValues($,g,P={},_){let v=t.nil;for(const y in $){const b=$[y];if(!b)continue;const n=P[y]=P[y]||new Map;b.forEach(u=>{if(n.has(u))return;n.set(u,o.Started);let r=g(u);if(r){const i=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${i} ${u} = ${r};${this.opts._n}`}else if(r=_==null?void 0:_(u))v=(0,t._)`${v}${r}${this.opts._n}`;else throw new f(u);n.set(u,o.Completed)})}return v}}e.ValueScope=c})(Ct)),Ct}var er;function J(){return er||(er=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=vt(),f=xt();var o=vt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var w=xt();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return w.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return w.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return w.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return w.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(d,S){return this}}class h extends s{constructor(d,S,I){super(),this.varKind=d,this.name=S,this.rhs=I}render({es5:d,_n:S}){const I=d?f.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${I} ${this.name}${U};`+S}optimizeNames(d,S){if(d[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,d,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(d,S,I){super(),this.lhs=d,this.rhs=S,this.sideEffects=I}render({_n:d}){return`${this.lhs} = ${this.rhs};`+d}optimizeNames(d,S){if(!(this.lhs instanceof t.Name&&!d[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,d,S),this}get names(){const d=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(d,this.rhs)}}class m extends c{constructor(d,S,I,U){super(d,I,U),this.op=S}render({_n:d}){return`${this.lhs} ${this.op}= ${this.rhs};`+d}}class $ extends s{constructor(d){super(),this.label=d,this.names={}}render({_n:d}){return`${this.label}:`+d}}class g extends s{constructor(d){super(),this.label=d,this.names={}}render({_n:d}){return`break${this.label?` ${this.label}`:""};`+d}}class P extends s{constructor(d){super(),this.error=d}render({_n:d}){return`throw ${this.error};`+d}get names(){return this.error.names}}class _ extends s{constructor(d){super(),this.code=d}render({_n:d}){return`${this.code};`+d}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(d,S){return this.code=G(this.code,d,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(d=[]){super(),this.nodes=d}render(d){return this.nodes.reduce((S,I)=>S+I.render(d),"")}optimizeNodes(){const{nodes:d}=this;let S=d.length;for(;S--;){const I=d[S].optimizeNodes();Array.isArray(I)?d.splice(S,1,...I):I?d[S]=I:d.splice(S,1)}return d.length>0?this:void 0}optimizeNames(d,S){const{nodes:I}=this;let U=I.length;for(;U--;){const K=I[U];K.optimizeNames(d,S)||(Q(d,K.names),I.splice(U,1))}return I.length>0?this:void 0}get names(){return this.nodes.reduce((d,S)=>V(d,S.names),{})}}class y extends v{render(d){return"{"+d._n+super.render(d)+"}"+d._n}}class b extends v{}class n extends y{}n.kind="else";class u extends y{constructor(d,S){super(S),this.condition=d}render(d){let S=`if(${this.condition})`+super.render(d);return this.else&&(S+="else "+this.else.render(d)),S}optimizeNodes(){super.optimizeNodes();const d=this.condition;if(d===!0)return this.nodes;let S=this.else;if(S){const I=S.optimizeNodes();S=this.else=Array.isArray(I)?new n(I):I}if(S)return d===!1?S instanceof u?S:S.nodes:this.nodes.length?this:new u(fe(d),S instanceof u?[S]:S.nodes);if(!(d===!1||!this.nodes.length))return this}optimizeNames(d,S){var I;if(this.else=(I=this.else)===null||I===void 0?void 0:I.optimizeNames(d,S),!!(super.optimizeNames(d,S)||this.else))return this.condition=G(this.condition,d,S),this}get names(){const d=super.names;return F(d,this.condition),this.else&&V(d,this.else.names),d}}u.kind="if";class r extends y{}r.kind="for";class i extends r{constructor(d){super(),this.iteration=d}render(d){return`for(${this.iteration})`+super.render(d)}optimizeNames(d,S){if(super.optimizeNames(d,S))return this.iteration=G(this.iteration,d,S),this}get names(){return V(super.names,this.iteration.names)}}class p extends r{constructor(d,S,I,U){super(),this.varKind=d,this.name=S,this.from=I,this.to=U}render(d){const S=d.es5?f.varKinds.var:this.varKind,{name:I,from:U,to:K}=this;return`for(${S} ${I}=${U}; ${I}<${K}; ${I}++)`+super.render(d)}get names(){const d=F(super.names,this.from);return F(d,this.to)}}class a extends r{constructor(d,S,I,U){super(),this.loop=d,this.varKind=S,this.name=I,this.iterable=U}render(d){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(d)}optimizeNames(d,S){if(super.optimizeNames(d,S))return this.iterable=G(this.iterable,d,S),this}get names(){return V(super.names,this.iterable.names)}}class l extends y{constructor(d,S,I){super(),this.name=d,this.args=S,this.async=I}render(d){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(d)}}l.kind="func";class E extends v{render(d){return"return "+super.render(d)}}E.kind="return";class R extends y{render(d){let S="try"+super.render(d);return this.catch&&(S+=this.catch.render(d)),this.finally&&(S+=this.finally.render(d)),S}optimizeNodes(){var d,S;return super.optimizeNodes(),(d=this.catch)===null||d===void 0||d.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(d,S){var I,U;return super.optimizeNames(d,S),(I=this.catch)===null||I===void 0||I.optimizeNames(d,S),(U=this.finally)===null||U===void 0||U.optimizeNames(d,S),this}get names(){const d=super.names;return this.catch&&V(d,this.catch.names),this.finally&&V(d,this.finally.names),d}}class j extends y{constructor(d){super(),this.error=d}render(d){return`catch(${this.error})`+super.render(d)}}j.kind="catch";class q extends y{render(d){return"finally"+super.render(d)}}q.kind="finally";class M{constructor(d,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
|
|
2
|
+
`:""},this._extScope=d,this._scope=new f.Scope({parent:d}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(d){return this._scope.name(d)}scopeName(d){return this._extScope.name(d)}scopeValue(d,S){const I=this._extScope.value(d,S);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue(d,S){return this._extScope.getValue(d,S)}scopeRefs(d){return this._extScope.scopeRefs(d,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(d,S,I,U){const K=this._scope.toName(S);return I!==void 0&&U&&(this._constants[K.str]=I),this._leafNode(new h(d,K,I)),K}const(d,S,I){return this._def(f.varKinds.const,d,S,I)}let(d,S,I){return this._def(f.varKinds.let,d,S,I)}var(d,S,I){return this._def(f.varKinds.var,d,S,I)}assign(d,S,I){return this._leafNode(new c(d,S,I))}add(d,S){return this._leafNode(new m(d,e.operators.ADD,S))}code(d){return typeof d=="function"?d():d!==t.nil&&this._leafNode(new _(d)),this}object(...d){const S=["{"];for(const[I,U]of d)S.length>1&&S.push(","),S.push(I),(I!==U||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,U));return S.push("}"),new t._Code(S)}if(d,S,I){if(this._blockNode(new u(d)),S&&I)this.code(S).else().code(I).endIf();else if(S)this.code(S).endIf();else if(I)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(d){return this._elseNode(new u(d))}else(){return this._elseNode(new n)}endIf(){return this._endBlockNode(u,n)}_for(d,S){return this._blockNode(d),S&&this.code(S).endFor(),this}for(d,S){return this._for(new i(d),S)}forRange(d,S,I,U,K=this.opts.es5?f.varKinds.var:f.varKinds.let){const Y=this._scope.toName(d);return this._for(new p(K,Y,S,I),()=>U(Y))}forOf(d,S,I,U=f.varKinds.const){const K=this._scope.toName(d);if(this.opts.es5){const Y=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${Y}.length`,W=>{this.var(K,(0,t._)`${Y}[${W}]`),I(K)})}return this._for(new a("of",U,K,S),()=>I(K))}forIn(d,S,I,U=this.opts.es5?f.varKinds.var:f.varKinds.const){if(this.opts.ownProperties)return this.forOf(d,(0,t._)`Object.keys(${S})`,I);const K=this._scope.toName(d);return this._for(new a("in",U,K,S),()=>I(K))}endFor(){return this._endBlockNode(r)}label(d){return this._leafNode(new $(d))}break(d){return this._leafNode(new g(d))}return(d){const S=new E;if(this._blockNode(S),this.code(d),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(d,S,I){if(!S&&!I)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new R;if(this._blockNode(U),this.code(d),S){const K=this.name("e");this._currNode=U.catch=new j(K),S(K)}return I&&(this._currNode=U.finally=new q,this.code(I)),this._endBlockNode(j,q)}throw(d){return this._leafNode(new P(d))}block(d,S){return this._blockStarts.push(this._nodes.length),d&&this.code(d).endBlock(S),this}endBlock(d){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const I=this._nodes.length-S;if(I<0||d!==void 0&&I!==d)throw new Error(`CodeGen: wrong number of nodes: ${I} vs ${d} expected`);return this._nodes.length=S,this}func(d,S=t.nil,I,U){return this._blockNode(new l(d,S,I)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(l)}optimize(d=1){for(;d-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(d){return this._currNode.nodes.push(d),this}_blockNode(d){this._currNode.nodes.push(d),this._nodes.push(d)}_endBlockNode(d,S){const I=this._currNode;if(I instanceof d||S&&I instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${d.kind}/${S.kind}`:d.kind}"`)}_elseNode(d){const S=this._currNode;if(!(S instanceof u))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=d,this}get _root(){return this._nodes[0]}get _currNode(){const d=this._nodes;return d[d.length-1]}set _currNode(d){const S=this._nodes;S[S.length-1]=d}}e.CodeGen=M;function V(T,d){for(const S in d)T[S]=(T[S]||0)+(d[S]||0);return T}function F(T,d){return d instanceof t._CodeOrName?V(T,d.names):T}function G(T,d,S){if(T instanceof t.Name)return I(T);if(!U(T))return T;return new t._Code(T._items.reduce((K,Y)=>(Y instanceof t.Name&&(Y=I(Y)),Y instanceof t._Code?K.push(...Y._items):K.push(Y),K),[]));function I(K){const Y=S[K.str];return Y===void 0||d[K.str]!==1?K:(delete d[K.str],Y)}function U(K){return K instanceof t._Code&&K._items.some(Y=>Y instanceof t.Name&&d[Y.str]===1&&S[Y.str]!==void 0)}}function Q(T,d){for(const S in d)T[S]=(T[S]||0)-(d[S]||0)}function fe(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${A(T)}`}e.not=fe;const he=O(e.operators.AND);function x(...T){return T.reduce(he)}e.and=x;const ge=O(e.operators.OR);function D(...T){return T.reduce(ge)}e.or=D;function O(T){return(d,S)=>d===t.nil?S:S===t.nil?d:(0,t._)`${A(d)} ${T} ${A(S)}`}function A(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(It)),It}var H={},tr;function X(){if(tr)return H;tr=1,Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const e=J(),t=vt();function f(a){const l={};for(const E of a)l[E]=!0;return l}H.toHash=f;function o(a,l){return typeof l=="boolean"?l:Object.keys(l).length===0?!0:(w(a,l),!s(l,a.self.RULES.all))}H.alwaysValidSchema=o;function w(a,l=a.schema){const{opts:E,self:R}=a;if(!E.strictSchema||typeof l=="boolean")return;const j=R.RULES.keywords;for(const q in l)j[q]||p(a,`unknown keyword: "${q}"`)}H.checkUnknownRules=w;function s(a,l){if(typeof a=="boolean")return!a;for(const E in a)if(l[E])return!0;return!1}H.schemaHasRules=s;function h(a,l){if(typeof a=="boolean")return!a;for(const E in a)if(E!=="$ref"&&l.all[E])return!0;return!1}H.schemaHasRulesButRef=h;function c({topSchemaRef:a,schemaPath:l},E,R,j){if(!j){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${a}${l}${(0,e.getProperty)(R)}`}H.schemaRefOrVal=c;function m(a){return P(decodeURIComponent(a))}H.unescapeFragment=m;function $(a){return encodeURIComponent(g(a))}H.escapeFragment=$;function g(a){return typeof a=="number"?`${a}`:a.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=g;function P(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=P;function _(a,l){if(Array.isArray(a))for(const E of a)l(E);else l(a)}H.eachItem=_;function v({mergeNames:a,mergeToName:l,mergeValues:E,resultToName:R}){return(j,q,M,V)=>{const F=M===void 0?q:M instanceof e.Name?(q instanceof e.Name?a(j,q,M):l(j,q,M),M):q instanceof e.Name?(l(j,M,q),q):E(q,M);return V===e.Name&&!(F instanceof e.Name)?R(j,F):F}}H.mergeEvaluated={props:v({mergeNames:(a,l,E)=>a.if((0,e._)`${E} !== true && ${l} !== undefined`,()=>{a.if((0,e._)`${l} === true`,()=>a.assign(E,!0),()=>a.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${l})`))}),mergeToName:(a,l,E)=>a.if((0,e._)`${E} !== true`,()=>{l===!0?a.assign(E,!0):(a.assign(E,(0,e._)`${E} || {}`),b(a,E,l))}),mergeValues:(a,l)=>a===!0?!0:{...a,...l},resultToName:y}),items:v({mergeNames:(a,l,E)=>a.if((0,e._)`${E} !== true && ${l} !== undefined`,()=>a.assign(E,(0,e._)`${l} === true ? true : ${E} > ${l} ? ${E} : ${l}`)),mergeToName:(a,l,E)=>a.if((0,e._)`${E} !== true`,()=>a.assign(E,l===!0?!0:(0,e._)`${E} > ${l} ? ${E} : ${l}`)),mergeValues:(a,l)=>a===!0?!0:Math.max(a,l),resultToName:(a,l)=>a.var("items",l)})};function y(a,l){if(l===!0)return a.var("props",!0);const E=a.var("props",(0,e._)`{}`);return l!==void 0&&b(a,E,l),E}H.evaluatedPropsToName=y;function b(a,l,E){Object.keys(E).forEach(R=>a.assign((0,e._)`${l}${(0,e.getProperty)(R)}`,!0))}H.setEvaluated=b;const n={};function u(a,l){return a.scopeValue("func",{ref:l,code:n[l.code]||(n[l.code]=new t._Code(l.code))})}H.useFunc=u;var r;(function(a){a[a.Num=0]="Num",a[a.Str=1]="Str"})(r||(H.Type=r={}));function i(a,l,E){if(a instanceof e.Name){const R=l===r.Num;return E?R?(0,e._)`"[" + ${a} + "]"`:(0,e._)`"['" + ${a} + "']"`:R?(0,e._)`"/" + ${a}`:(0,e._)`"/" + ${a}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(a).toString():"/"+g(a)}H.getErrorPath=i;function p(a,l,E=a.opts.strictSchema){if(E){if(l=`strict mode: ${l}`,E===!0)throw new Error(l);a.self.logger.warn(l)}}return H.checkStrictMode=p,H}var Ce={},rr;function _e(){if(rr)return Ce;rr=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=J(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ce.default=t,Ce}var nr;function Et(){return nr||(nr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=J(),f=X(),o=_e();e.keywordError={message:({keyword:n})=>(0,t.str)`must pass "${n}" keyword validation`},e.keyword$DataError={message:({keyword:n,schemaType:u})=>u?(0,t.str)`"${n}" keyword must be ${u} ($data)`:(0,t.str)`"${n}" keyword is invalid ($data)`};function w(n,u=e.keywordError,r,i){const{it:p}=n,{gen:a,compositeRule:l,allErrors:E}=p,R=P(n,u,r);i??(l||E)?m(a,R):$(p,(0,t._)`[${R}]`)}e.reportError=w;function s(n,u=e.keywordError,r){const{it:i}=n,{gen:p,compositeRule:a,allErrors:l}=i,E=P(n,u,r);m(p,E),a||l||$(i,o.default.vErrors)}e.reportExtraError=s;function h(n,u){n.assign(o.default.errors,u),n.if((0,t._)`${o.default.vErrors} !== null`,()=>n.if(u,()=>n.assign((0,t._)`${o.default.vErrors}.length`,u),()=>n.assign(o.default.vErrors,null)))}e.resetErrorsCount=h;function c({gen:n,keyword:u,schemaValue:r,data:i,errsCount:p,it:a}){if(p===void 0)throw new Error("ajv implementation error");const l=n.name("err");n.forRange("i",p,o.default.errors,E=>{n.const(l,(0,t._)`${o.default.vErrors}[${E}]`),n.if((0,t._)`${l}.instancePath === undefined`,()=>n.assign((0,t._)`${l}.instancePath`,(0,t.strConcat)(o.default.instancePath,a.errorPath))),n.assign((0,t._)`${l}.schemaPath`,(0,t.str)`${a.errSchemaPath}/${u}`),a.opts.verbose&&(n.assign((0,t._)`${l}.schema`,r),n.assign((0,t._)`${l}.data`,i))})}e.extendErrors=c;function m(n,u){const r=n.const("err",u);n.if((0,t._)`${o.default.vErrors} === null`,()=>n.assign(o.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${o.default.vErrors}.push(${r})`),n.code((0,t._)`${o.default.errors}++`)}function $(n,u){const{gen:r,validateName:i,schemaEnv:p}=n;p.$async?r.throw((0,t._)`new ${n.ValidationError}(${u})`):(r.assign((0,t._)`${i}.errors`,u),r.return(!1))}const g={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function P(n,u,r){const{createErrors:i}=n.it;return i===!1?(0,t._)`{}`:_(n,u,r)}function _(n,u,r={}){const{gen:i,it:p}=n,a=[v(p,r),y(n,r)];return b(n,u,a),i.object(...a)}function v({errorPath:n},{instancePath:u}){const r=u?(0,t.str)`${n}${(0,f.getErrorPath)(u,f.Type.Str)}`:n;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,r)]}function y({keyword:n,it:{errSchemaPath:u}},{schemaPath:r,parentSchema:i}){let p=i?u:(0,t.str)`${u}/${n}`;return r&&(p=(0,t.str)`${p}${(0,f.getErrorPath)(r,f.Type.Str)}`),[g.schemaPath,p]}function b(n,{params:u,message:r},i){const{keyword:p,data:a,schemaValue:l,it:E}=n,{opts:R,propertyName:j,topSchemaRef:q,schemaPath:M}=E;i.push([g.keyword,p],[g.params,typeof u=="function"?u(n):u||(0,t._)`{}`]),R.messages&&i.push([g.message,typeof r=="function"?r(n):r]),R.verbose&&i.push([g.schema,l],[g.parentSchema,(0,t._)`${q}${M}`],[o.default.data,a]),j&&i.push([g.propertyName,j])}})(jt)),jt}var sr;function An(){if(sr)return $e;sr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.boolOrEmptySchema=$e.topBoolOrEmptySchema=void 0;const e=Et(),t=J(),f=_e(),o={message:"boolean schema is false"};function w(c){const{gen:m,schema:$,validateName:g}=c;$===!1?h(c,!1):typeof $=="object"&&$.$async===!0?m.return(f.default.data):(m.assign((0,t._)`${g}.errors`,null),m.return(!0))}$e.topBoolOrEmptySchema=w;function s(c,m){const{gen:$,schema:g}=c;g===!1?($.var(m,!1),h(c)):$.var(m,!0)}$e.boolOrEmptySchema=s;function h(c,m){const{gen:$,data:g}=c,P={gen:$,keyword:"false schema",data:g,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(P,o,void 0,m)}return $e}var ne={},we={},ar;function yn(){if(ar)return we;ar=1,Object.defineProperty(we,"__esModule",{value:!0}),we.getRules=we.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function f(w){return typeof w=="string"&&t.has(w)}we.isJSONType=f;function o(){const w={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...w,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},w.number,w.string,w.array,w.object],post:{rules:[]},all:{},keywords:{}}}return we.getRules=o,we}var pe={},or;function gn(){if(or)return pe;or=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.shouldUseRule=pe.shouldUseGroup=pe.schemaHasRulesForType=void 0;function e({schema:o,self:w},s){const h=w.RULES.types[s];return h&&h!==!0&&t(o,h)}pe.schemaHasRulesForType=e;function t(o,w){return w.rules.some(s=>f(o,s))}pe.shouldUseGroup=t;function f(o,w){var s;return o[w.keyword]!==void 0||((s=w.definition.implements)===null||s===void 0?void 0:s.some(h=>o[h]!==void 0))}return pe.shouldUseRule=f,pe}var ir;function _t(){if(ir)return ne;ir=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.reportTypeError=ne.checkDataTypes=ne.checkDataType=ne.coerceAndCheckDataType=ne.getJSONTypes=ne.getSchemaTypes=ne.DataType=void 0;const e=yn(),t=gn(),f=Et(),o=J(),w=X();var s;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(s||(ne.DataType=s={}));function h(r){const i=c(r.type);if(i.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&i.push("null")}return i}ne.getSchemaTypes=h;function c(r){const i=Array.isArray(r)?r:r?[r]:[];if(i.every(e.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}ne.getJSONTypes=c;function m(r,i){const{gen:p,data:a,opts:l}=r,E=g(i,l.coerceTypes),R=i.length>0&&!(E.length===0&&i.length===1&&(0,t.schemaHasRulesForType)(r,i[0]));if(R){const j=y(i,a,l.strictNumbers,s.Wrong);p.if(j,()=>{E.length?P(r,i,E):n(r)})}return R}ne.coerceAndCheckDataType=m;const $=new Set(["string","number","integer","boolean","null"]);function g(r,i){return i?r.filter(p=>$.has(p)||i==="array"&&p==="array"):[]}function P(r,i,p){const{gen:a,data:l,opts:E}=r,R=a.let("dataType",(0,o._)`typeof ${l}`),j=a.let("coerced",(0,o._)`undefined`);E.coerceTypes==="array"&&a.if((0,o._)`${R} == 'object' && Array.isArray(${l}) && ${l}.length == 1`,()=>a.assign(l,(0,o._)`${l}[0]`).assign(R,(0,o._)`typeof ${l}`).if(y(i,l,E.strictNumbers),()=>a.assign(j,l))),a.if((0,o._)`${j} !== undefined`);for(const M of p)($.has(M)||M==="array"&&E.coerceTypes==="array")&&q(M);a.else(),n(r),a.endIf(),a.if((0,o._)`${j} !== undefined`,()=>{a.assign(l,j),_(r,j)});function q(M){switch(M){case"string":a.elseIf((0,o._)`${R} == "number" || ${R} == "boolean"`).assign(j,(0,o._)`"" + ${l}`).elseIf((0,o._)`${l} === null`).assign(j,(0,o._)`""`);return;case"number":a.elseIf((0,o._)`${R} == "boolean" || ${l} === null
|
|
3
|
+
|| (${R} == "string" && ${l} && ${l} == +${l})`).assign(j,(0,o._)`+${l}`);return;case"integer":a.elseIf((0,o._)`${R} === "boolean" || ${l} === null
|
|
4
|
+
|| (${R} === "string" && ${l} && ${l} == +${l} && !(${l} % 1))`).assign(j,(0,o._)`+${l}`);return;case"boolean":a.elseIf((0,o._)`${l} === "false" || ${l} === 0 || ${l} === null`).assign(j,!1).elseIf((0,o._)`${l} === "true" || ${l} === 1`).assign(j,!0);return;case"null":a.elseIf((0,o._)`${l} === "" || ${l} === 0 || ${l} === false`),a.assign(j,null);return;case"array":a.elseIf((0,o._)`${R} === "string" || ${R} === "number"
|
|
5
|
+
|| ${R} === "boolean" || ${l} === null`).assign(j,(0,o._)`[${l}]`)}}}function _({gen:r,parentData:i,parentDataProperty:p},a){r.if((0,o._)`${i} !== undefined`,()=>r.assign((0,o._)`${i}[${p}]`,a))}function v(r,i,p,a=s.Correct){const l=a===s.Correct?o.operators.EQ:o.operators.NEQ;let E;switch(r){case"null":return(0,o._)`${i} ${l} null`;case"array":E=(0,o._)`Array.isArray(${i})`;break;case"object":E=(0,o._)`${i} && typeof ${i} == "object" && !Array.isArray(${i})`;break;case"integer":E=R((0,o._)`!(${i} % 1) && !isNaN(${i})`);break;case"number":E=R();break;default:return(0,o._)`typeof ${i} ${l} ${r}`}return a===s.Correct?E:(0,o.not)(E);function R(j=o.nil){return(0,o.and)((0,o._)`typeof ${i} == "number"`,j,p?(0,o._)`isFinite(${i})`:o.nil)}}ne.checkDataType=v;function y(r,i,p,a){if(r.length===1)return v(r[0],i,p,a);let l;const E=(0,w.toHash)(r);if(E.array&&E.object){const R=(0,o._)`typeof ${i} != "object"`;l=E.null?R:(0,o._)`!${i} || ${R}`,delete E.null,delete E.array,delete E.object}else l=o.nil;E.number&&delete E.integer;for(const R in E)l=(0,o.and)(l,v(R,i,p,a));return l}ne.checkDataTypes=y;const b={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:i})=>typeof r=="string"?(0,o._)`{type: ${r}}`:(0,o._)`{type: ${i}}`};function n(r){const i=u(r);(0,f.reportError)(i,b)}ne.reportTypeError=n;function u(r){const{gen:i,data:p,schema:a}=r,l=(0,w.schemaRefOrVal)(r,a,"type");return{gen:i,keyword:"type",data:p,schema:a.type,schemaCode:l,schemaValue:l,parentSchema:a,params:{},it:r}}return ne}var Oe={},cr;function Mn(){if(cr)return Oe;cr=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.assignDefaults=void 0;const e=J(),t=X();function f(w,s){const{properties:h,items:c}=w.schema;if(s==="object"&&h)for(const m in h)o(w,m,h[m].default);else s==="array"&&Array.isArray(c)&&c.forEach((m,$)=>o(w,$,m.default))}Oe.assignDefaults=f;function o(w,s,h){const{gen:c,compositeRule:m,data:$,opts:g}=w;if(h===void 0)return;const P=(0,e._)`${$}${(0,e.getProperty)(s)}`;if(m){(0,t.checkStrictMode)(w,`default is ignored for: ${P}`);return}let _=(0,e._)`${P} === undefined`;g.useDefaults==="empty"&&(_=(0,e._)`${_} || ${P} === null || ${P} === ""`),c.if(_,(0,e._)`${P} = ${(0,e.stringify)(h)}`)}return Oe}var de={},Z={},ur;function le(){if(ur)return Z;ur=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.validateUnion=Z.validateArray=Z.usePattern=Z.callValidateCode=Z.schemaProperties=Z.allSchemaProperties=Z.noPropertyInData=Z.propertyInData=Z.isOwnProperty=Z.hasPropFunc=Z.reportMissingProp=Z.checkMissingProp=Z.checkReportMissingProp=void 0;const e=J(),t=X(),f=_e(),o=X();function w(r,i){const{gen:p,data:a,it:l}=r;p.if(g(p,a,i,l.opts.ownProperties),()=>{r.setParams({missingProperty:(0,e._)`${i}`},!0),r.error()})}Z.checkReportMissingProp=w;function s({gen:r,data:i,it:{opts:p}},a,l){return(0,e.or)(...a.map(E=>(0,e.and)(g(r,i,E,p.ownProperties),(0,e._)`${l} = ${E}`)))}Z.checkMissingProp=s;function h(r,i){r.setParams({missingProperty:i},!0),r.error()}Z.reportMissingProp=h;function c(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Z.hasPropFunc=c;function m(r,i,p){return(0,e._)`${c(r)}.call(${i}, ${p})`}Z.isOwnProperty=m;function $(r,i,p,a){const l=(0,e._)`${i}${(0,e.getProperty)(p)} !== undefined`;return a?(0,e._)`${l} && ${m(r,i,p)}`:l}Z.propertyInData=$;function g(r,i,p,a){const l=(0,e._)`${i}${(0,e.getProperty)(p)} === undefined`;return a?(0,e.or)(l,(0,e.not)(m(r,i,p))):l}Z.noPropertyInData=g;function P(r){return r?Object.keys(r).filter(i=>i!=="__proto__"):[]}Z.allSchemaProperties=P;function _(r,i){return P(i).filter(p=>!(0,t.alwaysValidSchema)(r,i[p]))}Z.schemaProperties=_;function v({schemaCode:r,data:i,it:{gen:p,topSchemaRef:a,schemaPath:l,errorPath:E},it:R},j,q,M){const V=M?(0,e._)`${r}, ${i}, ${a}${l}`:i,F=[[f.default.instancePath,(0,e.strConcat)(f.default.instancePath,E)],[f.default.parentData,R.parentData],[f.default.parentDataProperty,R.parentDataProperty],[f.default.rootData,f.default.rootData]];R.opts.dynamicRef&&F.push([f.default.dynamicAnchors,f.default.dynamicAnchors]);const G=(0,e._)`${V}, ${p.object(...F)}`;return q!==e.nil?(0,e._)`${j}.call(${q}, ${G})`:(0,e._)`${j}(${G})`}Z.callValidateCode=v;const y=(0,e._)`new RegExp`;function b({gen:r,it:{opts:i}},p){const a=i.unicodeRegExp?"u":"",{regExp:l}=i.code,E=l(p,a);return r.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${l.code==="new RegExp"?y:(0,o.useFunc)(r,l)}(${p}, ${a})`})}Z.usePattern=b;function n(r){const{gen:i,data:p,keyword:a,it:l}=r,E=i.name("valid");if(l.allErrors){const j=i.let("valid",!0);return R(()=>i.assign(j,!1)),j}return i.var(E,!0),R(()=>i.break()),E;function R(j){const q=i.const("len",(0,e._)`${p}.length`);i.forRange("i",0,q,M=>{r.subschema({keyword:a,dataProp:M,dataPropType:t.Type.Num},E),i.if((0,e.not)(E),j)})}}Z.validateArray=n;function u(r){const{gen:i,schema:p,keyword:a,it:l}=r;if(!Array.isArray(p))throw new Error("ajv implementation error");if(p.some(q=>(0,t.alwaysValidSchema)(l,q))&&!l.opts.unevaluated)return;const R=i.let("valid",!1),j=i.name("_valid");i.block(()=>p.forEach((q,M)=>{const V=r.subschema({keyword:a,schemaProp:M,compositeRule:!0},j);i.assign(R,(0,e._)`${R} || ${j}`),r.mergeValidEvaluated(V,j)||i.if((0,e.not)(R))})),r.result(R,()=>r.reset(),()=>r.error(!0))}return Z.validateUnion=u,Z}var dr;function Dn(){if(dr)return de;dr=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateKeywordUsage=de.validSchemaType=de.funcKeywordCode=de.macroKeywordCode=void 0;const e=J(),t=_e(),f=le(),o=Et();function w(_,v){const{gen:y,keyword:b,schema:n,parentSchema:u,it:r}=_,i=v.macro.call(r.self,n,u,r),p=$(y,b,i);r.opts.validateSchema!==!1&&r.self.validateSchema(i,!0);const a=y.name("valid");_.subschema({schema:i,schemaPath:e.nil,errSchemaPath:`${r.errSchemaPath}/${b}`,topSchemaRef:p,compositeRule:!0},a),_.pass(a,()=>_.error(!0))}de.macroKeywordCode=w;function s(_,v){var y;const{gen:b,keyword:n,schema:u,parentSchema:r,$data:i,it:p}=_;m(p,v);const a=!i&&v.compile?v.compile.call(p.self,u,r,p):v.validate,l=$(b,n,a),E=b.let("valid");_.block$data(E,R),_.ok((y=v.valid)!==null&&y!==void 0?y:E);function R(){if(v.errors===!1)M(),v.modifying&&h(_),V(()=>_.error());else{const F=v.async?j():q();v.modifying&&h(_),V(()=>c(_,F))}}function j(){const F=b.let("ruleErrs",null);return b.try(()=>M((0,e._)`await `),G=>b.assign(E,!1).if((0,e._)`${G} instanceof ${p.ValidationError}`,()=>b.assign(F,(0,e._)`${G}.errors`),()=>b.throw(G))),F}function q(){const F=(0,e._)`${l}.errors`;return b.assign(F,null),M(e.nil),F}function M(F=v.async?(0,e._)`await `:e.nil){const G=p.opts.passContext?t.default.this:t.default.self,Q=!("compile"in v&&!i||v.schema===!1);b.assign(E,(0,e._)`${F}${(0,f.callValidateCode)(_,l,G,Q)}`,v.modifying)}function V(F){var G;b.if((0,e.not)((G=v.valid)!==null&&G!==void 0?G:E),F)}}de.funcKeywordCode=s;function h(_){const{gen:v,data:y,it:b}=_;v.if(b.parentData,()=>v.assign(y,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function c(_,v){const{gen:y}=_;y.if((0,e._)`Array.isArray(${v})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,o.extendErrors)(_)},()=>_.error())}function m({schemaEnv:_},v){if(v.async&&!_.$async)throw new Error("async keyword in sync schema")}function $(_,v,y){if(y===void 0)throw new Error(`keyword "${v}" failed to compile`);return _.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function g(_,v,y=!1){return!v.length||v.some(b=>b==="array"?Array.isArray(_):b==="object"?_&&typeof _=="object"&&!Array.isArray(_):typeof _==b||y&&typeof _>"u")}de.validSchemaType=g;function P({schema:_,opts:v,self:y,errSchemaPath:b},n,u){if(Array.isArray(n.keyword)?!n.keyword.includes(u):n.keyword!==u)throw new Error("ajv implementation error");const r=n.dependencies;if(r!=null&&r.some(i=>!Object.prototype.hasOwnProperty.call(_,i)))throw new Error(`parent schema must have dependencies of ${u}: ${r.join(",")}`);if(n.validateSchema&&!n.validateSchema(_[u])){const p=`keyword "${u}" value is invalid at path "${b}": `+y.errorsText(n.validateSchema.errors);if(v.validateSchema==="log")y.logger.error(p);else throw new Error(p)}}return de.validateKeywordUsage=P,de}var ye={},lr;function zn(){if(lr)return ye;lr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.extendSubschemaMode=ye.extendSubschemaData=ye.getSubschema=void 0;const e=J(),t=X();function f(s,{keyword:h,schemaProp:c,schema:m,schemaPath:$,errSchemaPath:g,topSchemaRef:P}){if(h!==void 0&&m!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(h!==void 0){const _=s.schema[h];return c===void 0?{schema:_,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(h)}`,errSchemaPath:`${s.errSchemaPath}/${h}`}:{schema:_[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(h)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${h}/${(0,t.escapeFragment)(c)}`}}if(m!==void 0){if($===void 0||g===void 0||P===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:m,schemaPath:$,topSchemaRef:P,errSchemaPath:g}}throw new Error('either "keyword" or "schema" must be passed')}ye.getSubschema=f;function o(s,h,{dataProp:c,dataPropType:m,data:$,dataTypes:g,propertyName:P}){if($!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=h;if(c!==void 0){const{errorPath:y,dataPathArr:b,opts:n}=h,u=_.let("data",(0,e._)`${h.data}${(0,e.getProperty)(c)}`,!0);v(u),s.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(c,m,n.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...b,s.parentDataProperty]}if($!==void 0){const y=$ instanceof e.Name?$:_.let("data",$,!0);v(y),P!==void 0&&(s.propertyName=P)}g&&(s.dataTypes=g);function v(y){s.data=y,s.dataLevel=h.dataLevel+1,s.dataTypes=[],h.definedProperties=new Set,s.parentData=h.data,s.dataNames=[...h.dataNames,y]}}ye.extendSubschemaData=o;function w(s,{jtdDiscriminator:h,jtdMetadata:c,compositeRule:m,createErrors:$,allErrors:g}){m!==void 0&&(s.compositeRule=m),$!==void 0&&(s.createErrors=$),g!==void 0&&(s.allErrors=g),s.jtdDiscriminator=h,s.jtdMetadata=c}return ye.extendSubschemaMode=w,ye}var se={},At,fr;function vn(){return fr||(fr=1,At=function e(t,f){if(t===f)return!0;if(t&&f&&typeof t=="object"&&typeof f=="object"){if(t.constructor!==f.constructor)return!1;var o,w,s;if(Array.isArray(t)){if(o=t.length,o!=f.length)return!1;for(w=o;w--!==0;)if(!e(t[w],f[w]))return!1;return!0}if(t.constructor===RegExp)return t.source===f.source&&t.flags===f.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===f.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===f.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(f).length)return!1;for(w=o;w--!==0;)if(!Object.prototype.hasOwnProperty.call(f,s[w]))return!1;for(w=o;w--!==0;){var h=s[w];if(!e(t[h],f[h]))return!1}return!0}return t!==t&&f!==f}),At}var Mt={exports:{}},hr;function Vn(){if(hr)return Mt.exports;hr=1;var e=Mt.exports=function(o,w,s){typeof w=="function"&&(s=w,w={}),s=w.cb||s;var h=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};t(w,h,c,o,"",o)};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 t(o,w,s,h,c,m,$,g,P,_){if(h&&typeof h=="object"&&!Array.isArray(h)){w(h,c,m,$,g,P,_);for(var v in h){var y=h[v];if(Array.isArray(y)){if(v in e.arrayKeywords)for(var b=0;b<y.length;b++)t(o,w,s,y[b],c+"/"+v+"/"+b,m,c,v,h,b)}else if(v in e.propsKeywords){if(y&&typeof y=="object")for(var n in y)t(o,w,s,y[n],c+"/"+v+"/"+f(n),m,c,v,h,n)}else(v in e.keywords||o.allKeys&&!(v in e.skipKeywords))&&t(o,w,s,y,c+"/"+v,m,c,v,h)}s(h,c,m,$,g,P,_)}}function f(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}return Mt.exports}var mr;function St(){if(mr)return se;mr=1,Object.defineProperty(se,"__esModule",{value:!0}),se.getSchemaRefs=se.resolveUrl=se.normalizeId=se._getFullPath=se.getFullPath=se.inlineRef=void 0;const e=X(),t=vn(),f=Vn(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function w(b,n=!0){return typeof b=="boolean"?!0:n===!0?!h(b):n?c(b)<=n:!1}se.inlineRef=w;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function h(b){for(const n in b){if(s.has(n))return!0;const u=b[n];if(Array.isArray(u)&&u.some(h)||typeof u=="object"&&h(u))return!0}return!1}function c(b){let n=0;for(const u in b){if(u==="$ref")return 1/0;if(n++,!o.has(u)&&(typeof b[u]=="object"&&(0,e.eachItem)(b[u],r=>n+=c(r)),n===1/0))return 1/0}return n}function m(b,n="",u){u!==!1&&(n=P(n));const r=b.parse(n);return $(b,r)}se.getFullPath=m;function $(b,n){return b.serialize(n).split("#")[0]+"#"}se._getFullPath=$;const g=/#\/?$/;function P(b){return b?b.replace(g,""):""}se.normalizeId=P;function _(b,n,u){return u=P(u),b.resolve(n,u)}se.resolveUrl=_;const v=/^[a-z_][-a-z0-9._]*$/i;function y(b,n){if(typeof b=="boolean")return{};const{schemaId:u,uriResolver:r}=this.opts,i=P(b[u]||n),p={"":i},a=m(r,i,!1),l={},E=new Set;return f(b,{allKeys:!0},(q,M,V,F)=>{if(F===void 0)return;const G=a+M;let Q=p[F];typeof q[u]=="string"&&(Q=fe.call(this,q[u])),he.call(this,q.$anchor),he.call(this,q.$dynamicAnchor),p[M]=Q;function fe(x){const ge=this.opts.uriResolver.resolve;if(x=P(Q?ge(Q,x):x),E.has(x))throw j(x);E.add(x);let D=this.refs[x];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?R(q,D.schema,x):x!==P(G)&&(x[0]==="#"?(R(q,l[x],x),l[x]=q):this.refs[x]=G),x}function he(x){if(typeof x=="string"){if(!v.test(x))throw new Error(`invalid anchor "${x}"`);fe.call(this,`#${x}`)}}}),l;function R(q,M,V){if(M!==void 0&&!t(q,M))throw j(V)}function j(q){return new Error(`reference "${q}" resolves to more than one schema`)}}return se.getSchemaRefs=y,se}var pr;function Pt(){if(pr)return me;pr=1,Object.defineProperty(me,"__esModule",{value:!0}),me.getData=me.KeywordCxt=me.validateFunctionCode=void 0;const e=An(),t=_t(),f=gn(),o=_t(),w=Mn(),s=Dn(),h=zn(),c=J(),m=_e(),$=St(),g=X(),P=Et();function _(k){if(a(k)&&(E(k),p(k))){n(k);return}v(k,()=>(0,e.topBoolOrEmptySchema)(k))}me.validateFunctionCode=_;function v({gen:k,validateName:N,schema:C,schemaEnv:z,opts:L},B){L.code.es5?k.func(N,(0,c._)`${m.default.data}, ${m.default.valCxt}`,z.$async,()=>{k.code((0,c._)`"use strict"; ${r(C,L)}`),b(k,L),k.code(B)}):k.func(N,(0,c._)`${m.default.data}, ${y(L)}`,z.$async,()=>k.code(r(C,L)).code(B))}function y(k){return(0,c._)`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${k.dynamicRef?(0,c._)`, ${m.default.dynamicAnchors}={}`:c.nil}}={}`}function b(k,N){k.if(m.default.valCxt,()=>{k.var(m.default.instancePath,(0,c._)`${m.default.valCxt}.${m.default.instancePath}`),k.var(m.default.parentData,(0,c._)`${m.default.valCxt}.${m.default.parentData}`),k.var(m.default.parentDataProperty,(0,c._)`${m.default.valCxt}.${m.default.parentDataProperty}`),k.var(m.default.rootData,(0,c._)`${m.default.valCxt}.${m.default.rootData}`),N.dynamicRef&&k.var(m.default.dynamicAnchors,(0,c._)`${m.default.valCxt}.${m.default.dynamicAnchors}`)},()=>{k.var(m.default.instancePath,(0,c._)`""`),k.var(m.default.parentData,(0,c._)`undefined`),k.var(m.default.parentDataProperty,(0,c._)`undefined`),k.var(m.default.rootData,m.default.data),N.dynamicRef&&k.var(m.default.dynamicAnchors,(0,c._)`{}`)})}function n(k){const{schema:N,opts:C,gen:z}=k;v(k,()=>{C.$comment&&N.$comment&&F(k),q(k),z.let(m.default.vErrors,null),z.let(m.default.errors,0),C.unevaluated&&u(k),R(k),G(k)})}function u(k){const{gen:N,validateName:C}=k;k.evaluated=N.const("evaluated",(0,c._)`${C}.evaluated`),N.if((0,c._)`${k.evaluated}.dynamicProps`,()=>N.assign((0,c._)`${k.evaluated}.props`,(0,c._)`undefined`)),N.if((0,c._)`${k.evaluated}.dynamicItems`,()=>N.assign((0,c._)`${k.evaluated}.items`,(0,c._)`undefined`))}function r(k,N){const C=typeof k=="object"&&k[N.schemaId];return C&&(N.code.source||N.code.process)?(0,c._)`/*# sourceURL=${C} */`:c.nil}function i(k,N){if(a(k)&&(E(k),p(k))){l(k,N);return}(0,e.boolOrEmptySchema)(k,N)}function p({schema:k,self:N}){if(typeof k=="boolean")return!k;for(const C in k)if(N.RULES.all[C])return!0;return!1}function a(k){return typeof k.schema!="boolean"}function l(k,N){const{schema:C,gen:z,opts:L}=k;L.$comment&&C.$comment&&F(k),M(k),V(k);const B=z.const("_errs",m.default.errors);R(k,B),z.var(N,(0,c._)`${B} === ${m.default.errors}`)}function E(k){(0,g.checkUnknownRules)(k),j(k)}function R(k,N){if(k.opts.jtd)return fe(k,[],!1,N);const C=(0,t.getSchemaTypes)(k.schema),z=(0,t.coerceAndCheckDataType)(k,C);fe(k,C,!z,N)}function j(k){const{schema:N,errSchemaPath:C,opts:z,self:L}=k;N.$ref&&z.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(N,L.RULES)&&L.logger.warn(`$ref: keywords ignored in schema at path "${C}"`)}function q(k){const{schema:N,opts:C}=k;N.default!==void 0&&C.useDefaults&&C.strictSchema&&(0,g.checkStrictMode)(k,"default is ignored in the schema root")}function M(k){const N=k.schema[k.opts.schemaId];N&&(k.baseId=(0,$.resolveUrl)(k.opts.uriResolver,k.baseId,N))}function V(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:k,schemaEnv:N,schema:C,errSchemaPath:z,opts:L}){const B=C.$comment;if(L.$comment===!0)k.code((0,c._)`${m.default.self}.logger.log(${B})`);else if(typeof L.$comment=="function"){const te=(0,c.str)`${z}/$comment`,ue=k.scopeValue("root",{ref:N.root});k.code((0,c._)`${m.default.self}.opts.$comment(${B}, ${te}, ${ue}.schema)`)}}function G(k){const{gen:N,schemaEnv:C,validateName:z,ValidationError:L,opts:B}=k;C.$async?N.if((0,c._)`${m.default.errors} === 0`,()=>N.return(m.default.data),()=>N.throw((0,c._)`new ${L}(${m.default.vErrors})`)):(N.assign((0,c._)`${z}.errors`,m.default.vErrors),B.unevaluated&&Q(k),N.return((0,c._)`${m.default.errors} === 0`))}function Q({gen:k,evaluated:N,props:C,items:z}){C instanceof c.Name&&k.assign((0,c._)`${N}.props`,C),z instanceof c.Name&&k.assign((0,c._)`${N}.items`,z)}function fe(k,N,C,z){const{gen:L,schema:B,data:te,allErrors:ue,opts:ae,self:oe}=k,{RULES:re}=oe;if(B.$ref&&(ae.ignoreKeywordsWithRef||!(0,g.schemaHasRulesButRef)(B,re))){L.block(()=>U(k,"$ref",re.all.$ref.definition));return}ae.jtd||x(k,N),L.block(()=>{for(const ce of re.rules)Ee(ce);Ee(re.post)});function Ee(ce){(0,f.shouldUseGroup)(B,ce)&&(ce.type?(L.if((0,o.checkDataType)(ce.type,te,ae.strictNumbers)),he(k,ce),N.length===1&&N[0]===ce.type&&C&&(L.else(),(0,o.reportTypeError)(k)),L.endIf()):he(k,ce),ue||L.if((0,c._)`${m.default.errors} === ${z||0}`))}}function he(k,N){const{gen:C,schema:z,opts:{useDefaults:L}}=k;L&&(0,w.assignDefaults)(k,N.type),C.block(()=>{for(const B of N.rules)(0,f.shouldUseRule)(z,B)&&U(k,B.keyword,B.definition,N.type)})}function x(k,N){k.schemaEnv.meta||!k.opts.strictTypes||(ge(k,N),k.opts.allowUnionTypes||D(k,N),O(k,k.dataTypes))}function ge(k,N){if(N.length){if(!k.dataTypes.length){k.dataTypes=N;return}N.forEach(C=>{T(k.dataTypes,C)||S(k,`type "${C}" not allowed by context "${k.dataTypes.join(",")}"`)}),d(k,N)}}function D(k,N){N.length>1&&!(N.length===2&&N.includes("null"))&&S(k,"use allowUnionTypes to allow union type keyword")}function O(k,N){const C=k.self.RULES.all;for(const z in C){const L=C[z];if(typeof L=="object"&&(0,f.shouldUseRule)(k.schema,L)){const{type:B}=L.definition;B.length&&!B.some(te=>A(N,te))&&S(k,`missing type "${B.join(",")}" for keyword "${z}"`)}}}function A(k,N){return k.includes(N)||N==="number"&&k.includes("integer")}function T(k,N){return k.includes(N)||N==="integer"&&k.includes("number")}function d(k,N){const C=[];for(const z of k.dataTypes)T(N,z)?C.push(z):N.includes("integer")&&z==="number"&&C.push("integer");k.dataTypes=C}function S(k,N){const C=k.schemaEnv.baseId+k.errSchemaPath;N+=` at "${C}" (strictTypes)`,(0,g.checkStrictMode)(k,N,k.opts.strictTypes)}class I{constructor(N,C,z){if((0,s.validateKeywordUsage)(N,C,z),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=z,this.data=N.data,this.schema=N.schema[z],this.$data=C.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,g.schemaRefOrVal)(N,this.schema,z,this.$data),this.schemaType=C.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=C,this.$data)this.schemaCode=N.gen.const("vSchema",W(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,C.schemaType,C.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(C.schemaType)}`);("code"in C?C.trackErrors:C.errors!==!1)&&(this.errsCount=N.gen.const("_errs",m.default.errors))}result(N,C,z){this.failResult((0,c.not)(N),C,z)}failResult(N,C,z){this.gen.if(N),z?z():this.error(),C?(this.gen.else(),C(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,C){this.failResult((0,c.not)(N),void 0,C)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:C}=this;this.fail((0,c._)`${C} !== undefined && (${(0,c.or)(this.invalid$data(),N)})`)}error(N,C,z){if(C){this.setParams(C),this._error(N,z),this.setParams({});return}this._error(N,z)}_error(N,C){(N?P.reportExtraError:P.reportError)(this,this.def.error,C)}$dataError(){(0,P.reportError)(this,this.def.$dataError||P.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,P.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,C){C?Object.assign(this.params,N):this.params=N}block$data(N,C,z=c.nil){this.gen.block(()=>{this.check$data(N,z),C()})}check$data(N=c.nil,C=c.nil){if(!this.$data)return;const{gen:z,schemaCode:L,schemaType:B,def:te}=this;z.if((0,c.or)((0,c._)`${L} === undefined`,C)),N!==c.nil&&z.assign(N,!0),(B.length||te.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),N!==c.nil&&z.assign(N,!1)),z.else()}invalid$data(){const{gen:N,schemaCode:C,schemaType:z,def:L,it:B}=this;return(0,c.or)(te(),ue());function te(){if(z.length){if(!(C instanceof c.Name))throw new Error("ajv implementation error");const ae=Array.isArray(z)?z:[z];return(0,c._)`${(0,o.checkDataTypes)(ae,C,B.opts.strictNumbers,o.DataType.Wrong)}`}return c.nil}function ue(){if(L.validateSchema){const ae=N.scopeValue("validate$data",{ref:L.validateSchema});return(0,c._)`!${ae}(${C})`}return c.nil}}subschema(N,C){const z=(0,h.getSubschema)(this.it,N);(0,h.extendSubschemaData)(z,this.it,N),(0,h.extendSubschemaMode)(z,N);const L={...this.it,...z,items:void 0,props:void 0};return i(L,C),L}mergeEvaluated(N,C){const{it:z,gen:L}=this;z.opts.unevaluated&&(z.props!==!0&&N.props!==void 0&&(z.props=g.mergeEvaluated.props(L,N.props,z.props,C)),z.items!==!0&&N.items!==void 0&&(z.items=g.mergeEvaluated.items(L,N.items,z.items,C)))}mergeValidEvaluated(N,C){const{it:z,gen:L}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return L.if(C,()=>this.mergeEvaluated(N,c.Name)),!0}}me.KeywordCxt=I;function U(k,N,C,z){const L=new I(k,C,N);"code"in C?C.code(L,z):L.$data&&C.validate?(0,s.funcKeywordCode)(L,C):"macro"in C?(0,s.macroKeywordCode)(L,C):(C.compile||C.validate)&&(0,s.funcKeywordCode)(L,C)}const K=/^\/(?:[^~]|~0|~1)*$/,Y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(k,{dataLevel:N,dataNames:C,dataPathArr:z}){let L,B;if(k==="")return m.default.rootData;if(k[0]==="/"){if(!K.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);L=k,B=m.default.rootData}else{const oe=Y.exec(k);if(!oe)throw new Error(`Invalid JSON-pointer: ${k}`);const re=+oe[1];if(L=oe[2],L==="#"){if(re>=N)throw new Error(ae("property/index",re));return z[N-re]}if(re>N)throw new Error(ae("data",re));if(B=C[N-re],!L)return B}let te=B;const ue=L.split("/");for(const oe of ue)oe&&(B=(0,c._)`${B}${(0,c.getProperty)((0,g.unescapeJsonPointer)(oe))}`,te=(0,c._)`${te} && ${B}`);return te;function ae(oe,re){return`Cannot access ${oe} ${re} levels up, current level is ${N}`}}return me.getData=W,me}var Ae={},yr;function Gt(){if(yr)return Ae;yr=1,Object.defineProperty(Ae,"__esModule",{value:!0});class e extends Error{constructor(f){super("validation failed"),this.errors=f,this.ajv=this.validation=!0}}return Ae.default=e,Ae}var Me={},gr;function kt(){if(gr)return Me;gr=1,Object.defineProperty(Me,"__esModule",{value:!0});const e=St();class t extends Error{constructor(o,w,s,h){super(h||`can't resolve reference ${s} from id ${w}`),this.missingRef=(0,e.resolveUrl)(o,w,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(o,this.missingRef))}}return Me.default=t,Me}var ie={},vr;function Ht(){if(vr)return ie;vr=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.resolveSchema=ie.getCompilingSchema=ie.resolveRef=ie.compileSchema=ie.SchemaEnv=void 0;const e=J(),t=Gt(),f=_e(),o=St(),w=X(),s=Pt();class h{constructor(u){var r;this.refs={},this.dynamicAnchors={};let i;typeof u.schema=="object"&&(i=u.schema),this.schema=u.schema,this.schemaId=u.schemaId,this.root=u.root||this,this.baseId=(r=u.baseId)!==null&&r!==void 0?r:(0,o.normalizeId)(i==null?void 0:i[u.schemaId||"$id"]),this.schemaPath=u.schemaPath,this.localRefs=u.localRefs,this.meta=u.meta,this.$async=i==null?void 0:i.$async,this.refs={}}}ie.SchemaEnv=h;function c(n){const u=g.call(this,n);if(u)return u;const r=(0,o.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:i,lines:p}=this.opts.code,{ownProperties:a}=this.opts,l=new e.CodeGen(this.scope,{es5:i,lines:p,ownProperties:a});let E;n.$async&&(E=l.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const R=l.scopeName("validate");n.validateName=R;const j={gen:l,allErrors:this.opts.allErrors,data:f.default.data,parentData:f.default.parentData,parentDataProperty:f.default.parentDataProperty,dataNames:[f.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",this.opts.code.source===!0?{ref:n.schema,code:(0,e.stringify)(n.schema)}:{ref:n.schema}),validateName:R,ValidationError:E,schema:n.schema,schemaEnv:n,rootId:r,baseId:n.baseId||r,schemaPath:e.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let q;try{this._compilations.add(n),(0,s.validateFunctionCode)(j),l.optimize(this.opts.code.optimize);const M=l.toString();q=`${l.scopeRefs(f.default.scope)}return ${M}`,this.opts.code.process&&(q=this.opts.code.process(q,n));const F=new Function(`${f.default.self}`,`${f.default.scope}`,q)(this,this.scope.get());if(this.scope.value(R,{ref:F}),F.errors=null,F.schema=n.schema,F.schemaEnv=n,n.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:R,validateCode:M,scopeValues:l._values}),this.opts.unevaluated){const{props:G,items:Q}=j;F.evaluated={props:G instanceof e.Name?void 0:G,items:Q instanceof e.Name?void 0:Q,dynamicProps:G instanceof e.Name,dynamicItems:Q instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return n.validate=F,n}catch(M){throw delete n.validate,delete n.validateName,q&&this.logger.error("Error compiling schema, function code:",q),M}finally{this._compilations.delete(n)}}ie.compileSchema=c;function m(n,u,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,u,r);const p=n.refs[r];if(p)return p;let a=_.call(this,n,r);if(a===void 0){const l=(i=n.localRefs)===null||i===void 0?void 0:i[r],{schemaId:E}=this.opts;l&&(a=new h({schema:l,schemaId:E,root:n,baseId:u}))}if(a!==void 0)return n.refs[r]=$.call(this,a)}ie.resolveRef=m;function $(n){return(0,o.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:c.call(this,n)}function g(n){for(const u of this._compilations)if(P(u,n))return u}ie.getCompilingSchema=g;function P(n,u){return n.schema===u.schema&&n.root===u.root&&n.baseId===u.baseId}function _(n,u){let r;for(;typeof(r=this.refs[u])=="string";)u=r;return r||this.schemas[u]||v.call(this,n,u)}function v(n,u){const r=this.opts.uriResolver.parse(u),i=(0,o._getFullPath)(this.opts.uriResolver,r);let p=(0,o.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&i===p)return b.call(this,r,n);const a=(0,o.normalizeId)(i),l=this.refs[a]||this.schemas[a];if(typeof l=="string"){const E=v.call(this,n,l);return typeof(E==null?void 0:E.schema)!="object"?void 0:b.call(this,r,E)}if(typeof(l==null?void 0:l.schema)=="object"){if(l.validate||c.call(this,l),a===(0,o.normalizeId)(u)){const{schema:E}=l,{schemaId:R}=this.opts,j=E[R];return j&&(p=(0,o.resolveUrl)(this.opts.uriResolver,p,j)),new h({schema:E,schemaId:R,root:n,baseId:p})}return b.call(this,r,l)}}ie.resolveSchema=v;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(n,{baseId:u,schema:r,root:i}){var p;if(((p=n.fragment)===null||p===void 0?void 0:p[0])!=="/")return;for(const E of n.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const R=r[(0,w.unescapeFragment)(E)];if(R===void 0)return;r=R;const j=typeof r=="object"&&r[this.opts.schemaId];!y.has(E)&&j&&(u=(0,o.resolveUrl)(this.opts.uriResolver,u,j))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,w.schemaHasRulesButRef)(r,this.RULES)){const E=(0,o.resolveUrl)(this.opts.uriResolver,u,r.$ref);a=v.call(this,i,E)}const{schemaId:l}=this.opts;if(a=a||new h({schema:r,schemaId:l,root:i,baseId:u}),a.schema!==a.root.schema)return a}return ie}const Fn="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Un="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ln="object",Kn=["$data"],Gn={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Hn=!1,Jn={$id:Fn,description:Un,type:Ln,required:Kn,properties:Gn,additionalProperties:Hn};var De={},Ne={exports:{}},Dt,_r;function _n(){if(_r)return Dt;_r=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=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);function f(_){let v="",y=0,b=0;for(b=0;b<_.length;b++)if(y=_[b].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";v+=_[b];break}for(b+=1;b<_.length;b++){if(y=_[b].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";v+=_[b]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function w(_){return _.length=0,!0}function s(_,v,y){if(_.length){const b=f(_);if(b!=="")v.push(b);else return y.error=!0,!1;_.length=0}return!0}function h(_){let v=0;const y={error:!1,address:"",zone:""},b=[],n=[];let u=!1,r=!1,i=s;for(let p=0;p<_.length;p++){const a=_[p];if(!(a==="["||a==="]"))if(a===":"){if(u===!0&&(r=!0),!i(n,b,y))break;if(++v>7){y.error=!0;break}p>0&&_[p-1]===":"&&(u=!0),b.push(":");continue}else if(a==="%"){if(!i(n,b,y))break;i=w}else{n.push(a);continue}}return n.length&&(i===w?y.zone=n.join(""):r?b.push(n.join("")):b.push(f(n))),y.address=b.join(""),y}function c(_){if(m(_,":")<2)return{host:_,isIPV6:!1};const v=h(_);if(v.error)return{host:_,isIPV6:!1};{let y=v.address,b=v.address;return v.zone&&(y+="%"+v.zone,b+="%25"+v.zone),{host:y,isIPV6:!0,escapedHost:b}}}function m(_,v){let y=0;for(let b=0;b<_.length;b++)_[b]===v&&y++;return y}function $(_){let v=_;const y=[];let b=-1,n=0;for(;n=v.length;){if(n===1){if(v===".")break;if(v==="/"){y.push("/");break}else{y.push(v);break}}else if(n===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){y.push("/");break}}else if(n===3&&v==="/.."){y.length!==0&&y.pop(),y.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),y.length!==0&&y.pop();continue}}if((b=v.indexOf("/",1))===-1){y.push(v);break}else y.push(v.slice(0,b)),v=v.slice(b)}return y.join("")}function g(_,v){const y=v!==!0?escape:unescape;return _.scheme!==void 0&&(_.scheme=y(_.scheme)),_.userinfo!==void 0&&(_.userinfo=y(_.userinfo)),_.host!==void 0&&(_.host=y(_.host)),_.path!==void 0&&(_.path=y(_.path)),_.query!==void 0&&(_.query=y(_.query)),_.fragment!==void 0&&(_.fragment=y(_.fragment)),_}function P(_){const v=[];if(_.userinfo!==void 0&&(v.push(_.userinfo),v.push("@")),_.host!==void 0){let y=unescape(_.host);if(!t(y)){const b=c(y);b.isIPV6===!0?y=`[${b.escapedHost}]`:y=_.host}v.push(y)}return(typeof _.port=="number"||typeof _.port=="string")&&(v.push(":"),v.push(String(_.port))),v.length?v.join(""):void 0}return Dt={nonSimpleDomain:o,recomposeAuthority:P,normalizeComponentEncoding:g,removeDotSegments:$,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:f},Dt}var zt,$r;function Bn(){if($r)return zt;$r=1;const{isUUID:e}=_n(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,f=["http","https","ws","wss","urn","urn:uuid"];function o(a){return f.indexOf(a)!==-1}function w(a){return a.secure===!0?!0:a.secure===!1?!1:a.scheme?a.scheme.length===3&&(a.scheme[0]==="w"||a.scheme[0]==="W")&&(a.scheme[1]==="s"||a.scheme[1]==="S")&&(a.scheme[2]==="s"||a.scheme[2]==="S"):!1}function s(a){return a.host||(a.error=a.error||"HTTP URIs must have a host."),a}function h(a){const l=String(a.scheme).toLowerCase()==="https";return(a.port===(l?443:80)||a.port==="")&&(a.port=void 0),a.path||(a.path="/"),a}function c(a){return a.secure=w(a),a.resourceName=(a.path||"/")+(a.query?"?"+a.query:""),a.path=void 0,a.query=void 0,a}function m(a){if((a.port===(w(a)?443:80)||a.port==="")&&(a.port=void 0),typeof a.secure=="boolean"&&(a.scheme=a.secure?"wss":"ws",a.secure=void 0),a.resourceName){const[l,E]=a.resourceName.split("?");a.path=l&&l!=="/"?l:void 0,a.query=E,a.resourceName=void 0}return a.fragment=void 0,a}function $(a,l){if(!a.path)return a.error="URN can not be parsed",a;const E=a.path.match(t);if(E){const R=l.scheme||a.scheme||"urn";a.nid=E[1].toLowerCase(),a.nss=E[2];const j=`${R}:${l.nid||a.nid}`,q=p(j);a.path=void 0,q&&(a=q.parse(a,l))}else a.error=a.error||"URN can not be parsed.";return a}function g(a,l){if(a.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=l.scheme||a.scheme||"urn",R=a.nid.toLowerCase(),j=`${E}:${l.nid||R}`,q=p(j);q&&(a=q.serialize(a,l));const M=a,V=a.nss;return M.path=`${R||l.nid}:${V}`,l.skipEscape=!0,M}function P(a,l){const E=a;return E.uuid=E.nss,E.nss=void 0,!l.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function _(a){const l=a;return l.nss=(a.uuid||"").toLowerCase(),l}const v={scheme:"http",domainHost:!0,parse:s,serialize:h},y={scheme:"https",domainHost:v.domainHost,parse:s,serialize:h},b={scheme:"ws",domainHost:!0,parse:c,serialize:m},n={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},i={http:v,https:y,ws:b,wss:n,urn:{scheme:"urn",parse:$,serialize:g,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:P,serialize:_,skipNormalize:!0}};Object.setPrototypeOf(i,null);function p(a){return a&&(i[a]||i[a.toLowerCase()])||void 0}return zt={wsIsSecure:w,SCHEMES:i,isValidSchemeName:o,getSchemeHandler:p},zt}var wr;function Wn(){if(wr)return Ne.exports;wr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:f,normalizeComponentEncoding:o,isIPv4:w,nonSimpleDomain:s}=_n(),{SCHEMES:h,getSchemeHandler:c}=Bn();function m(n,u){return typeof n=="string"?n=_(y(n,u),u):typeof n=="object"&&(n=y(_(n,u),u)),n}function $(n,u,r){const i=r?Object.assign({scheme:"null"},r):{scheme:"null"},p=g(y(n,i),y(u,i),i,!0);return i.skipEscape=!0,_(p,i)}function g(n,u,r,i){const p={};return i||(n=y(_(n,r),r),u=y(_(u,r),r)),r=r||{},!r.tolerant&&u.scheme?(p.scheme=u.scheme,p.userinfo=u.userinfo,p.host=u.host,p.port=u.port,p.path=t(u.path||""),p.query=u.query):(u.userinfo!==void 0||u.host!==void 0||u.port!==void 0?(p.userinfo=u.userinfo,p.host=u.host,p.port=u.port,p.path=t(u.path||""),p.query=u.query):(u.path?(u.path[0]==="/"?p.path=t(u.path):((n.userinfo!==void 0||n.host!==void 0||n.port!==void 0)&&!n.path?p.path="/"+u.path:n.path?p.path=n.path.slice(0,n.path.lastIndexOf("/")+1)+u.path:p.path=u.path,p.path=t(p.path)),p.query=u.query):(p.path=n.path,u.query!==void 0?p.query=u.query:p.query=n.query),p.userinfo=n.userinfo,p.host=n.host,p.port=n.port),p.scheme=n.scheme),p.fragment=u.fragment,p}function P(n,u,r){return typeof n=="string"?(n=unescape(n),n=_(o(y(n,r),!0),{...r,skipEscape:!0})):typeof n=="object"&&(n=_(o(n,!0),{...r,skipEscape:!0})),typeof u=="string"?(u=unescape(u),u=_(o(y(u,r),!0),{...r,skipEscape:!0})):typeof u=="object"&&(u=_(o(u,!0),{...r,skipEscape:!0})),n.toLowerCase()===u.toLowerCase()}function _(n,u){const r={host:n.host,scheme:n.scheme,userinfo:n.userinfo,port:n.port,path:n.path,query:n.query,nid:n.nid,nss:n.nss,uuid:n.uuid,fragment:n.fragment,reference:n.reference,resourceName:n.resourceName,secure:n.secure,error:""},i=Object.assign({},u),p=[],a=c(i.scheme||r.scheme);a&&a.serialize&&a.serialize(r,i),r.path!==void 0&&(i.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),i.reference!=="suffix"&&r.scheme&&p.push(r.scheme,":");const l=f(r);if(l!==void 0&&(i.reference!=="suffix"&&p.push("//"),p.push(l),r.path&&r.path[0]!=="/"&&p.push("/")),r.path!==void 0){let E=r.path;!i.absolutePath&&(!a||!a.absolutePath)&&(E=t(E)),l===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),p.push(E)}return r.query!==void 0&&p.push("?",r.query),r.fragment!==void 0&&p.push("#",r.fragment),p.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(n,u){const r=Object.assign({},u),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let p=!1;r.reference==="suffix"&&(r.scheme?n=r.scheme+":"+n:n="//"+n);const a=n.match(v);if(a){if(i.scheme=a[1],i.userinfo=a[3],i.host=a[4],i.port=parseInt(a[5],10),i.path=a[6]||"",i.query=a[7],i.fragment=a[8],isNaN(i.port)&&(i.port=a[5]),i.host)if(w(i.host)===!1){const R=e(i.host);i.host=R.host.toLowerCase(),p=R.isIPV6}else p=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const l=c(r.scheme||i.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&i.host&&(r.domainHost||l&&l.domainHost)&&p===!1&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(E){i.error=i.error||"Host's domain name can not be converted to ASCII: "+E}(!l||l&&!l.skipNormalize)&&(n.indexOf("%")!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),l&&l.parse&&l.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const b={SCHEMES:h,normalize:m,resolve:$,resolveComponent:g,equal:P,serialize:_,parse:y};return Ne.exports=b,Ne.exports.default=b,Ne.exports.fastUri=b,Ne.exports}var br;function Xn(){if(br)return De;br=1,Object.defineProperty(De,"__esModule",{value:!0});const e=Wn();return e.code='require("ajv/dist/runtime/uri").default',De.default=e,De}var Er;function Yn(){return Er||(Er=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Pt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var f=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});const o=Gt(),w=kt(),s=yn(),h=Ht(),c=J(),m=St(),$=_t(),g=X(),P=Jn,_=Xn(),v=(D,O)=>new RegExp(D,O);v.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),n={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."},u={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},r=200;function i(D){var O,A,T,d,S,I,U,K,Y,W,k,N,C,z,L,B,te,ue,ae,oe,re,Ee,ce,Ot,Nt;const ke=D.strict,Tt=(O=D.code)===null||O===void 0?void 0:O.optimize,Wt=Tt===!0||Tt===void 0?1:Tt||0,Xt=(T=(A=D.code)===null||A===void 0?void 0:A.regExp)!==null&&T!==void 0?T:v,In=(d=D.uriResolver)!==null&&d!==void 0?d:_.default;return{strictSchema:(I=(S=D.strictSchema)!==null&&S!==void 0?S:ke)!==null&&I!==void 0?I:!0,strictNumbers:(K=(U=D.strictNumbers)!==null&&U!==void 0?U:ke)!==null&&K!==void 0?K:!0,strictTypes:(W=(Y=D.strictTypes)!==null&&Y!==void 0?Y:ke)!==null&&W!==void 0?W:"log",strictTuples:(N=(k=D.strictTuples)!==null&&k!==void 0?k:ke)!==null&&N!==void 0?N:"log",strictRequired:(z=(C=D.strictRequired)!==null&&C!==void 0?C:ke)!==null&&z!==void 0?z:!1,code:D.code?{...D.code,optimize:Wt,regExp:Xt}:{optimize:Wt,regExp:Xt},loopRequired:(L=D.loopRequired)!==null&&L!==void 0?L:r,loopEnum:(B=D.loopEnum)!==null&&B!==void 0?B:r,meta:(te=D.meta)!==null&&te!==void 0?te:!0,messages:(ue=D.messages)!==null&&ue!==void 0?ue:!0,inlineRefs:(ae=D.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(oe=D.schemaId)!==null&&oe!==void 0?oe:"$id",addUsedSchema:(re=D.addUsedSchema)!==null&&re!==void 0?re:!0,validateSchema:(Ee=D.validateSchema)!==null&&Ee!==void 0?Ee:!0,validateFormats:(ce=D.validateFormats)!==null&&ce!==void 0?ce:!0,unicodeRegExp:(Ot=D.unicodeRegExp)!==null&&Ot!==void 0?Ot:!0,int32range:(Nt=D.int32range)!==null&&Nt!==void 0?Nt:!0,uriResolver:In}}class p{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...i(O)};const{es5:A,lines:T}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:b,es5:A,lines:T}),this.logger=V(O.logger);const d=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),a.call(this,n,O,"NOT SUPPORTED"),a.call(this,u,O,"DEPRECATED","warn"),this._metaOpts=q.call(this),O.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&j.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),E.call(this),O.validateFormats=d}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:A,schemaId:T}=this.opts;let d=P;T==="id"&&(d={...P},d.id=d.$id,delete d.$id),A&&O&&this.addMetaSchema(d,d[T],!1)}defaultMeta(){const{meta:O,schemaId:A}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[A]||O:void 0}validate(O,A){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const d=T(A);return"$async"in T||(this.errors=T.errors),d}compile(O,A){const T=this._addSchema(O,A);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,A){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return d.call(this,O,A);async function d(W,k){await S.call(this,W.$schema);const N=this._addSchema(W,k);return N.validate||I.call(this,N)}async function S(W){W&&!this.getSchema(W)&&await d.call(this,{$ref:W},!0)}async function I(W){try{return this._compileSchemaEnv(W)}catch(k){if(!(k instanceof w.default))throw k;return U.call(this,k),await K.call(this,k.missingSchema),I.call(this,W)}}function U({missingSchema:W,missingRef:k}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${k} cannot be resolved`)}async function K(W){const k=await Y.call(this,W);this.refs[W]||await S.call(this,k.$schema),this.refs[W]||this.addSchema(k,W,A)}async function Y(W){const k=this._loading[W];if(k)return k;try{return await(this._loading[W]=T(W))}finally{delete this._loading[W]}}}addSchema(O,A,T,d=this.opts.validateSchema){if(Array.isArray(O)){for(const I of O)this.addSchema(I,void 0,T,d);return this}let S;if(typeof O=="object"){const{schemaId:I}=this.opts;if(S=O[I],S!==void 0&&typeof S!="string")throw new Error(`schema ${I} must be string`)}return A=(0,m.normalizeId)(A||S),this._checkUnique(A),this.schemas[A]=this._addSchema(O,T,A,d,!0),this}addMetaSchema(O,A,T=this.opts.validateSchema){return this.addSchema(O,A,!0,T),this}validateSchema(O,A){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const d=this.validate(T,O);if(!d&&A){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return d}getSchema(O){let A;for(;typeof(A=l.call(this,O))=="string";)O=A;if(A===void 0){const{schemaId:T}=this.opts,d=new h.SchemaEnv({schema:{},schemaId:T});if(A=h.resolveSchema.call(this,d,O),!A)return;this.refs[O]=A}return A.validate||this._compileSchemaEnv(A)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const A=l.call(this,O);return typeof A=="object"&&this._cache.delete(A.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const A=O;this._cache.delete(A);let T=O[this.opts.schemaId];return T&&(T=(0,m.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const A of O)this.addKeyword(A);return this}addKeyword(O,A){let T;if(typeof O=="string")T=O,typeof A=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),A.keyword=T);else if(typeof O=="object"&&A===void 0){if(A=O,T=A.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,T,A),!A)return(0,g.eachItem)(T,S=>Q.call(this,S)),this;he.call(this,A);const d={...A,type:(0,$.getJSONTypes)(A.type),schemaType:(0,$.getJSONTypes)(A.schemaType)};return(0,g.eachItem)(T,d.type.length===0?S=>Q.call(this,S,d):S=>d.type.forEach(I=>Q.call(this,S,d,I))),this}getKeyword(O){const A=this.RULES.all[O];return typeof A=="object"?A.definition:!!A}removeKeyword(O){const{RULES:A}=this;delete A.keywords[O],delete A.all[O];for(const T of A.rules){const d=T.rules.findIndex(S=>S.keyword===O);d>=0&&T.rules.splice(d,1)}return this}addFormat(O,A){return typeof A=="string"&&(A=new RegExp(A)),this.formats[O]=A,this}errorsText(O=this.errors,{separator:A=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(d=>`${T}${d.instancePath} ${d.message}`).reduce((d,S)=>d+A+S)}$dataMetaSchema(O,A){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const d of A){const S=d.split("/").slice(1);let I=O;for(const U of S)I=I[U];for(const U in T){const K=T[U];if(typeof K!="object")continue;const{$data:Y}=K.definition,W=I[U];Y&&W&&(I[U]=ge(W))}}return O}_removeAllSchemas(O,A){for(const T in O){const d=O[T];(!A||A.test(T))&&(typeof d=="string"?delete O[T]:d&&!d.meta&&(this._cache.delete(d.schema),delete O[T]))}}_addSchema(O,A,T,d=this.opts.validateSchema,S=this.opts.addUsedSchema){let I;const{schemaId:U}=this.opts;if(typeof O=="object")I=O[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let K=this._cache.get(O);if(K!==void 0)return K;T=(0,m.normalizeId)(I||T);const Y=m.getSchemaRefs.call(this,O,T);return K=new h.SchemaEnv({schema:O,schemaId:U,meta:A,baseId:T,localRefs:Y}),this._cache.set(K.schema,K),S&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=K),d&&this.validateSchema(O,!0),K}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):h.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const A=this.opts;this.opts=this._metaOpts;try{h.compileSchema.call(this,O)}finally{this.opts=A}}}p.ValidationError=o.default,p.MissingRefError=w.default,e.default=p;function a(D,O,A,T="error"){for(const d in D){const S=d;S in O&&this.logger[T](`${A}: option ${d}. ${D[S]}`)}}function l(D){return D=(0,m.normalizeId)(D),this.schemas[D]||this.refs[D]}function E(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const O in D)this.addSchema(D[O],O)}function R(){for(const D in this.opts.formats){const O=this.opts.formats[D];O&&this.addFormat(D,O)}}function j(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in D){const A=D[O];A.keyword||(A.keyword=O),this.addKeyword(A)}}function q(){const D={...this.opts};for(const O of y)delete D[O];return D}const M={log(){},warn(){},error(){}};function V(D){if(D===!1)return M;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function G(D,O){const{RULES:A}=this;if((0,g.eachItem)(D,T=>{if(A.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!F.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function Q(D,O,A){var T;const d=O==null?void 0:O.post;if(A&&d)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let I=d?S.post:S.rules.find(({type:K})=>K===A);if(I||(I={type:A,rules:[]},S.rules.push(I)),S.keywords[D]=!0,!O)return;const U={keyword:D,definition:{...O,type:(0,$.getJSONTypes)(O.type),schemaType:(0,$.getJSONTypes)(O.schemaType)}};O.before?fe.call(this,I,U,O.before):I.rules.push(U),S.all[D]=U,(T=O.implements)===null||T===void 0||T.forEach(K=>this.addKeyword(K))}function fe(D,O,A){const T=D.rules.findIndex(d=>d.keyword===A);T>=0?D.rules.splice(T,0,O):(D.rules.push(O),this.logger.warn(`rule ${A} is not defined`))}function he(D){let{metaSchema:O}=D;O!==void 0&&(D.$data&&this.opts.$data&&(O=ge(O)),D.validateSchema=this.compile(O,!0))}const x={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ge(D){return{anyOf:[D,x]}}})(Rt)),Rt}var ze={},Ve={},Fe={},Sr;function Zn(){if(Sr)return Fe;Sr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Fe.default=e,Fe}var ve={},Pr;function Qn(){if(Pr)return ve;Pr=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.callRef=ve.getValidate=void 0;const e=kt(),t=le(),f=J(),o=_e(),w=Ht(),s=X(),h={keyword:"$ref",schemaType:"string",code($){const{gen:g,schema:P,it:_}=$,{baseId:v,schemaEnv:y,validateName:b,opts:n,self:u}=_,{root:r}=y;if((P==="#"||P==="#/")&&v===r.baseId)return p();const i=w.resolveRef.call(u,r,v,P);if(i===void 0)throw new e.default(_.opts.uriResolver,v,P);if(i instanceof w.SchemaEnv)return a(i);return l(i);function p(){if(y===r)return m($,b,y,y.$async);const E=g.scopeValue("root",{ref:r});return m($,(0,f._)`${E}.validate`,r,r.$async)}function a(E){const R=c($,E);m($,R,E,E.$async)}function l(E){const R=g.scopeValue("schema",n.code.source===!0?{ref:E,code:(0,f.stringify)(E)}:{ref:E}),j=g.name("valid"),q=$.subschema({schema:E,dataTypes:[],schemaPath:f.nil,topSchemaRef:R,errSchemaPath:P},j);$.mergeEvaluated(q),$.ok(j)}}};function c($,g){const{gen:P}=$;return g.validate?P.scopeValue("validate",{ref:g.validate}):(0,f._)`${P.scopeValue("wrapper",{ref:g})}.validate`}ve.getValidate=c;function m($,g,P,_){const{gen:v,it:y}=$,{allErrors:b,schemaEnv:n,opts:u}=y,r=u.passContext?o.default.this:f.nil;_?i():p();function i(){if(!n.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,f._)`await ${(0,t.callValidateCode)($,g,r)}`),l(g),b||v.assign(E,!0)},R=>{v.if((0,f._)`!(${R} instanceof ${y.ValidationError})`,()=>v.throw(R)),a(R),b||v.assign(E,!1)}),$.ok(E)}function p(){$.result((0,t.callValidateCode)($,g,r),()=>l(g),()=>a(g))}function a(E){const R=(0,f._)`${E}.errors`;v.assign(o.default.vErrors,(0,f._)`${o.default.vErrors} === null ? ${R} : ${o.default.vErrors}.concat(${R})`),v.assign(o.default.errors,(0,f._)`${o.default.vErrors}.length`)}function l(E){var R;if(!y.opts.unevaluated)return;const j=(R=P==null?void 0:P.validate)===null||R===void 0?void 0:R.evaluated;if(y.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(y.props=s.mergeEvaluated.props(v,j.props,y.props));else{const q=v.var("props",(0,f._)`${E}.evaluated.props`);y.props=s.mergeEvaluated.props(v,q,y.props,f.Name)}if(y.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(y.items=s.mergeEvaluated.items(v,j.items,y.items));else{const q=v.var("items",(0,f._)`${E}.evaluated.items`);y.items=s.mergeEvaluated.items(v,q,y.items,f.Name)}}}return ve.callRef=m,ve.default=h,ve}var kr;function xn(){if(kr)return Ve;kr=1,Object.defineProperty(Ve,"__esModule",{value:!0});const e=Zn(),t=Qn(),f=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ve.default=f,Ve}var Ue={},Le={},Or;function es(){if(Or)return Le;Or=1,Object.defineProperty(Le,"__esModule",{value:!0});const e=J(),t=e.operators,f={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},o={message:({keyword:s,schemaCode:h})=>(0,e.str)`must be ${f[s].okStr} ${h}`,params:({keyword:s,schemaCode:h})=>(0,e._)`{comparison: ${f[s].okStr}, limit: ${h}}`},w={keyword:Object.keys(f),type:"number",schemaType:"number",$data:!0,error:o,code(s){const{keyword:h,data:c,schemaCode:m}=s;s.fail$data((0,e._)`${c} ${f[h].fail} ${m} || isNaN(${c})`)}};return Le.default=w,Le}var Ke={},Nr;function ts(){if(Nr)return Ke;Nr=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=J(),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:o})=>(0,e.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0,e._)`{multipleOf: ${o}}`},code(o){const{gen:w,data:s,schemaCode:h,it:c}=o,m=c.opts.multipleOfPrecision,$=w.let("res"),g=m?(0,e._)`Math.abs(Math.round(${$}) - ${$}) > 1e-${m}`:(0,e._)`${$} !== parseInt(${$})`;o.fail$data((0,e._)`(${h} === 0 || (${$} = ${s}/${h}, ${g}))`)}};return Ke.default=f,Ke}var Ge={},He={},Tr;function rs(){if(Tr)return He;Tr=1,Object.defineProperty(He,"__esModule",{value:!0});function e(t){const f=t.length;let o=0,w=0,s;for(;w<f;)o++,s=t.charCodeAt(w++),s>=55296&&s<=56319&&w<f&&(s=t.charCodeAt(w),(s&64512)===56320&&w++);return o}return He.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',He}var Rr;function ns(){if(Rr)return Ge;Rr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=J(),t=X(),f=rs(),w={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:h}){const c=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${h} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:h,data:c,schemaCode:m,it:$}=s,g=h==="maxLength"?e.operators.GT:e.operators.LT,P=$.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(s.gen,f.default)}(${c})`;s.fail$data((0,e._)`${P} ${g} ${m}`)}};return Ge.default=w,Ge}var Je={},jr;function ss(){if(jr)return Je;jr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=le(),t=X(),f=J(),w={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,f.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,f._)`{pattern: ${s}}`},code(s){const{gen:h,data:c,$data:m,schema:$,schemaCode:g,it:P}=s,_=P.opts.unicodeRegExp?"u":"";if(m){const{regExp:v}=P.opts.code,y=v.code==="new RegExp"?(0,f._)`new RegExp`:(0,t.useFunc)(h,v),b=h.let("valid");h.try(()=>h.assign(b,(0,f._)`${y}(${g}, ${_}).test(${c})`),()=>h.assign(b,!1)),s.fail$data((0,f._)`!${b}`)}else{const v=(0,e.usePattern)(s,$);s.fail$data((0,f._)`!${v}.test(${c})`)}}};return Je.default=w,Je}var Be={},Ir;function as(){if(Ir)return Be;Ir=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=J(),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:w}){const s=o==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${w} properties`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:w,data:s,schemaCode:h}=o,c=w==="maxProperties"?e.operators.GT:e.operators.LT;o.fail$data((0,e._)`Object.keys(${s}).length ${c} ${h}`)}};return Be.default=f,Be}var We={},qr;function os(){if(qr)return We;qr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=le(),t=J(),f=X(),w={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:h,schema:c,schemaCode:m,data:$,$data:g,it:P}=s,{opts:_}=P;if(!g&&c.length===0)return;const v=c.length>=_.loopRequired;if(P.allErrors?y():b(),_.strictRequired){const r=s.parentSchema.properties,{definedProperties:i}=s.it;for(const p of c)if((r==null?void 0:r[p])===void 0&&!i.has(p)){const a=P.schemaEnv.baseId+P.errSchemaPath,l=`required property "${p}" is not defined at "${a}" (strictRequired)`;(0,f.checkStrictMode)(P,l,P.opts.strictRequired)}}function y(){if(v||g)s.block$data(t.nil,n);else for(const r of c)(0,e.checkReportMissingProp)(s,r)}function b(){const r=h.let("missing");if(v||g){const i=h.let("valid",!0);s.block$data(i,()=>u(r,i)),s.ok(i)}else h.if((0,e.checkMissingProp)(s,c,r)),(0,e.reportMissingProp)(s,r),h.else()}function n(){h.forOf("prop",m,r=>{s.setParams({missingProperty:r}),h.if((0,e.noPropertyInData)(h,$,r,_.ownProperties),()=>s.error())})}function u(r,i){s.setParams({missingProperty:r}),h.forOf(r,m,()=>{h.assign(i,(0,e.propertyInData)(h,$,r,_.ownProperties)),h.if((0,t.not)(i),()=>{s.error(),h.break()})},t.nil)}}};return We.default=w,We}var Xe={},Cr;function is(){if(Cr)return Xe;Cr=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=J(),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:w}){const s=o==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${w} items`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:w,data:s,schemaCode:h}=o,c=w==="maxItems"?e.operators.GT:e.operators.LT;o.fail$data((0,e._)`${s}.length ${c} ${h}`)}};return Xe.default=f,Xe}var Ye={},Ze={},Ar;function Jt(){if(Ar)return Ze;Ar=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=vn();return e.code='require("ajv/dist/runtime/equal").default',Ze.default=e,Ze}var Mr;function cs(){if(Mr)return Ye;Mr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=_t(),t=J(),f=X(),o=Jt(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:h,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${h} are identical)`,params:({params:{i:h,j:c}})=>(0,t._)`{i: ${h}, j: ${c}}`},code(h){const{gen:c,data:m,$data:$,schema:g,parentSchema:P,schemaCode:_,it:v}=h;if(!$&&!g)return;const y=c.let("valid"),b=P.items?(0,e.getSchemaTypes)(P.items):[];h.block$data(y,n,(0,t._)`${_} === false`),h.ok(y);function n(){const p=c.let("i",(0,t._)`${m}.length`),a=c.let("j");h.setParams({i:p,j:a}),c.assign(y,!0),c.if((0,t._)`${p} > 1`,()=>(u()?r:i)(p,a))}function u(){return b.length>0&&!b.some(p=>p==="object"||p==="array")}function r(p,a){const l=c.name("item"),E=(0,e.checkDataTypes)(b,l,v.opts.strictNumbers,e.DataType.Wrong),R=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${p}--;`,()=>{c.let(l,(0,t._)`${m}[${p}]`),c.if(E,(0,t._)`continue`),b.length>1&&c.if((0,t._)`typeof ${l} == "string"`,(0,t._)`${l} += "_"`),c.if((0,t._)`typeof ${R}[${l}] == "number"`,()=>{c.assign(a,(0,t._)`${R}[${l}]`),h.error(),c.assign(y,!1).break()}).code((0,t._)`${R}[${l}] = ${p}`)})}function i(p,a){const l=(0,f.useFunc)(c,o.default),E=c.name("outer");c.label(E).for((0,t._)`;${p}--;`,()=>c.for((0,t._)`${a} = ${p}; ${a}--;`,()=>c.if((0,t._)`${l}(${m}[${p}], ${m}[${a}])`,()=>{h.error(),c.assign(y,!1).break(E)})))}}};return Ye.default=s,Ye}var Qe={},Dr;function us(){if(Dr)return Qe;Dr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=J(),t=X(),f=Jt(),w={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:h,data:c,$data:m,schemaCode:$,schema:g}=s;m||g&&typeof g=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(h,f.default)}(${c}, ${$})`):s.fail((0,e._)`${g} !== ${c}`)}};return Qe.default=w,Qe}var xe={},zr;function ds(){if(zr)return xe;zr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=J(),t=X(),f=Jt(),w={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:h,data:c,$data:m,schema:$,schemaCode:g,it:P}=s;if(!m&&$.length===0)throw new Error("enum must have non-empty array");const _=$.length>=P.opts.loopEnum;let v;const y=()=>v??(v=(0,t.useFunc)(h,f.default));let b;if(_||m)b=h.let("valid"),s.block$data(b,n);else{if(!Array.isArray($))throw new Error("ajv implementation error");const r=h.const("vSchema",g);b=(0,e.or)(...$.map((i,p)=>u(r,p)))}s.pass(b);function n(){h.assign(b,!1),h.forOf("v",g,r=>h.if((0,e._)`${y()}(${c}, ${r})`,()=>h.assign(b,!0).break()))}function u(r,i){const p=$[i];return typeof p=="object"&&p!==null?(0,e._)`${y()}(${c}, ${r}[${i}])`:(0,e._)`${c} === ${p}`}}};return xe.default=w,xe}var Vr;function ls(){if(Vr)return Ue;Vr=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=es(),t=ts(),f=ns(),o=ss(),w=as(),s=os(),h=is(),c=cs(),m=us(),$=ds(),g=[e.default,t.default,f.default,o.default,w.default,s.default,h.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,$.default];return Ue.default=g,Ue}var et={},Se={},Fr;function $n(){if(Fr)return Se;Fr=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.validateAdditionalItems=void 0;const e=J(),t=X(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:h,it:c}=s,{items:m}=h;if(!Array.isArray(m)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}w(s,m)}};function w(s,h){const{gen:c,schema:m,data:$,keyword:g,it:P}=s;P.items=!0;const _=c.const("len",(0,e._)`${$}.length`);if(m===!1)s.setParams({len:h.length}),s.pass((0,e._)`${_} <= ${h.length}`);else if(typeof m=="object"&&!(0,t.alwaysValidSchema)(P,m)){const y=c.var("valid",(0,e._)`${_} <= ${h.length}`);c.if((0,e.not)(y),()=>v(y)),s.ok(y)}function v(y){c.forRange("i",h.length,_,b=>{s.subschema({keyword:g,dataProp:b,dataPropType:t.Type.Num},y),P.allErrors||c.if((0,e.not)(y),()=>c.break())})}}return Se.validateAdditionalItems=w,Se.default=o,Se}var tt={},Pe={},Ur;function wn(){if(Ur)return Pe;Ur=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.validateTuple=void 0;const e=J(),t=X(),f=le(),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:h,it:c}=s;if(Array.isArray(h))return w(s,"additionalItems",h);c.items=!0,!(0,t.alwaysValidSchema)(c,h)&&s.ok((0,f.validateArray)(s))}};function w(s,h,c=s.schema){const{gen:m,parentSchema:$,data:g,keyword:P,it:_}=s;b($),_.opts.unevaluated&&c.length&&_.items!==!0&&(_.items=t.mergeEvaluated.items(m,c.length,_.items));const v=m.name("valid"),y=m.const("len",(0,e._)`${g}.length`);c.forEach((n,u)=>{(0,t.alwaysValidSchema)(_,n)||(m.if((0,e._)`${y} > ${u}`,()=>s.subschema({keyword:P,schemaProp:u,dataProp:u},v)),s.ok(v))});function b(n){const{opts:u,errSchemaPath:r}=_,i=c.length,p=i===n.minItems&&(i===n.maxItems||n[h]===!1);if(u.strictTuples&&!p){const a=`"${P}" is ${i}-tuple, but minItems or maxItems/${h} are not specified or different at path "${r}"`;(0,t.checkStrictMode)(_,a,u.strictTuples)}}}return Pe.validateTuple=w,Pe.default=o,Pe}var Lr;function fs(){if(Lr)return tt;Lr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=wn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:f=>(0,e.validateTuple)(f,"items")};return tt.default=t,tt}var rt={},Kr;function hs(){if(Kr)return rt;Kr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=J(),t=X(),f=le(),o=$n(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:h}})=>(0,e.str)`must NOT have more than ${h} items`,params:({params:{len:h}})=>(0,e._)`{limit: ${h}}`},code(h){const{schema:c,parentSchema:m,it:$}=h,{prefixItems:g}=m;$.items=!0,!(0,t.alwaysValidSchema)($,c)&&(g?(0,o.validateAdditionalItems)(h,g):h.ok((0,f.validateArray)(h)))}};return rt.default=s,rt}var nt={},Gr;function ms(){if(Gr)return nt;Gr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=J(),t=X(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:w,max:s}})=>s===void 0?(0,e.str)`must contain at least ${w} valid item(s)`:(0,e.str)`must contain at least ${w} and no more than ${s} valid item(s)`,params:({params:{min:w,max:s}})=>s===void 0?(0,e._)`{minContains: ${w}}`:(0,e._)`{minContains: ${w}, maxContains: ${s}}`},code(w){const{gen:s,schema:h,parentSchema:c,data:m,it:$}=w;let g,P;const{minContains:_,maxContains:v}=c;$.opts.next?(g=_===void 0?1:_,P=v):g=1;const y=s.const("len",(0,e._)`${m}.length`);if(w.setParams({min:g,max:P}),P===void 0&&g===0){(0,t.checkStrictMode)($,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(P!==void 0&&g>P){(0,t.checkStrictMode)($,'"minContains" > "maxContains" is always invalid'),w.fail();return}if((0,t.alwaysValidSchema)($,h)){let i=(0,e._)`${y} >= ${g}`;P!==void 0&&(i=(0,e._)`${i} && ${y} <= ${P}`),w.pass(i);return}$.items=!0;const b=s.name("valid");P===void 0&&g===1?u(b,()=>s.if(b,()=>s.break())):g===0?(s.let(b,!0),P!==void 0&&s.if((0,e._)`${m}.length > 0`,n)):(s.let(b,!1),n()),w.result(b,()=>w.reset());function n(){const i=s.name("_valid"),p=s.let("count",0);u(i,()=>s.if(i,()=>r(p)))}function u(i,p){s.forRange("i",0,y,a=>{w.subschema({keyword:"contains",dataProp:a,dataPropType:t.Type.Num,compositeRule:!0},i),p()})}function r(i){s.code((0,e._)`${i}++`),P===void 0?s.if((0,e._)`${i} >= ${g}`,()=>s.assign(b,!0).break()):(s.if((0,e._)`${i} > ${P}`,()=>s.assign(b,!1).break()),g===1?s.assign(b,!0):s.if((0,e._)`${i} >= ${g}`,()=>s.assign(b,!0)))}}};return nt.default=o,nt}var Vt={},Hr;function ps(){return Hr||(Hr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=J(),f=X(),o=le();e.error={message:({params:{property:m,depsCount:$,deps:g}})=>{const P=$===1?"property":"properties";return(0,t.str)`must have ${P} ${g} when property ${m} is present`},params:({params:{property:m,depsCount:$,deps:g,missingProperty:P}})=>(0,t._)`{property: ${m},
|
|
6
|
+
missingProperty: ${P},
|
|
7
|
+
depsCount: ${$},
|
|
8
|
+
deps: ${g}}`};const w={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(m){const[$,g]=s(m);h(m,$),c(m,g)}};function s({schema:m}){const $={},g={};for(const P in m){if(P==="__proto__")continue;const _=Array.isArray(m[P])?$:g;_[P]=m[P]}return[$,g]}function h(m,$=m.schema){const{gen:g,data:P,it:_}=m;if(Object.keys($).length===0)return;const v=g.let("missing");for(const y in $){const b=$[y];if(b.length===0)continue;const n=(0,o.propertyInData)(g,P,y,_.opts.ownProperties);m.setParams({property:y,depsCount:b.length,deps:b.join(", ")}),_.allErrors?g.if(n,()=>{for(const u of b)(0,o.checkReportMissingProp)(m,u)}):(g.if((0,t._)`${n} && (${(0,o.checkMissingProp)(m,b,v)})`),(0,o.reportMissingProp)(m,v),g.else())}}e.validatePropertyDeps=h;function c(m,$=m.schema){const{gen:g,data:P,keyword:_,it:v}=m,y=g.name("valid");for(const b in $)(0,f.alwaysValidSchema)(v,$[b])||(g.if((0,o.propertyInData)(g,P,b,v.opts.ownProperties),()=>{const n=m.subschema({keyword:_,schemaProp:b},y);m.mergeValidEvaluated(n,y)},()=>g.var(y,!0)),m.ok(y))}e.validateSchemaDeps=c,e.default=w})(Vt)),Vt}var st={},Jr;function ys(){if(Jr)return st;Jr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=J(),t=X(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:w})=>(0,e._)`{propertyName: ${w.propertyName}}`},code(w){const{gen:s,schema:h,data:c,it:m}=w;if((0,t.alwaysValidSchema)(m,h))return;const $=s.name("valid");s.forIn("key",c,g=>{w.setParams({propertyName:g}),w.subschema({keyword:"propertyNames",data:g,dataTypes:["string"],propertyName:g,compositeRule:!0},$),s.if((0,e.not)($),()=>{w.error(!0),m.allErrors||s.break()})}),w.ok($)}};return st.default=o,st}var at={},Br;function bn(){if(Br)return at;Br=1,Object.defineProperty(at,"__esModule",{value:!0});const e=le(),t=J(),f=_e(),o=X(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:h})=>(0,t._)`{additionalProperty: ${h.additionalProperty}}`},code(h){const{gen:c,schema:m,parentSchema:$,data:g,errsCount:P,it:_}=h;if(!P)throw new Error("ajv implementation error");const{allErrors:v,opts:y}=_;if(_.props=!0,y.removeAdditional!=="all"&&(0,o.alwaysValidSchema)(_,m))return;const b=(0,e.allSchemaProperties)($.properties),n=(0,e.allSchemaProperties)($.patternProperties);u(),h.ok((0,t._)`${P} === ${f.default.errors}`);function u(){c.forIn("key",g,l=>{!b.length&&!n.length?p(l):c.if(r(l),()=>p(l))})}function r(l){let E;if(b.length>8){const R=(0,o.schemaRefOrVal)(_,$.properties,"properties");E=(0,e.isOwnProperty)(c,R,l)}else b.length?E=(0,t.or)(...b.map(R=>(0,t._)`${l} === ${R}`)):E=t.nil;return n.length&&(E=(0,t.or)(E,...n.map(R=>(0,t._)`${(0,e.usePattern)(h,R)}.test(${l})`))),(0,t.not)(E)}function i(l){c.code((0,t._)`delete ${g}[${l}]`)}function p(l){if(y.removeAdditional==="all"||y.removeAdditional&&m===!1){i(l);return}if(m===!1){h.setParams({additionalProperty:l}),h.error(),v||c.break();return}if(typeof m=="object"&&!(0,o.alwaysValidSchema)(_,m)){const E=c.name("valid");y.removeAdditional==="failing"?(a(l,E,!1),c.if((0,t.not)(E),()=>{h.reset(),i(l)})):(a(l,E),v||c.if((0,t.not)(E),()=>c.break()))}}function a(l,E,R){const j={keyword:"additionalProperties",dataProp:l,dataPropType:o.Type.Str};R===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),h.subschema(j,E)}}};return at.default=s,at}var ot={},Wr;function gs(){if(Wr)return ot;Wr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=Pt(),t=le(),f=X(),o=bn(),w={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:h,schema:c,parentSchema:m,data:$,it:g}=s;g.opts.removeAdditional==="all"&&m.additionalProperties===void 0&&o.default.code(new e.KeywordCxt(g,o.default,"additionalProperties"));const P=(0,t.allSchemaProperties)(c);for(const n of P)g.definedProperties.add(n);g.opts.unevaluated&&P.length&&g.props!==!0&&(g.props=f.mergeEvaluated.props(h,(0,f.toHash)(P),g.props));const _=P.filter(n=>!(0,f.alwaysValidSchema)(g,c[n]));if(_.length===0)return;const v=h.name("valid");for(const n of _)y(n)?b(n):(h.if((0,t.propertyInData)(h,$,n,g.opts.ownProperties)),b(n),g.allErrors||h.else().var(v,!0),h.endIf()),s.it.definedProperties.add(n),s.ok(v);function y(n){return g.opts.useDefaults&&!g.compositeRule&&c[n].default!==void 0}function b(n){s.subschema({keyword:"properties",schemaProp:n,dataProp:n},v)}}};return ot.default=w,ot}var it={},Xr;function vs(){if(Xr)return it;Xr=1,Object.defineProperty(it,"__esModule",{value:!0});const e=le(),t=J(),f=X(),o=X(),w={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:h,schema:c,data:m,parentSchema:$,it:g}=s,{opts:P}=g,_=(0,e.allSchemaProperties)(c),v=_.filter(p=>(0,f.alwaysValidSchema)(g,c[p]));if(_.length===0||v.length===_.length&&(!g.opts.unevaluated||g.props===!0))return;const y=P.strictSchema&&!P.allowMatchingProperties&&$.properties,b=h.name("valid");g.props!==!0&&!(g.props instanceof t.Name)&&(g.props=(0,o.evaluatedPropsToName)(h,g.props));const{props:n}=g;u();function u(){for(const p of _)y&&r(p),g.allErrors?i(p):(h.var(b,!0),i(p),h.if(b))}function r(p){for(const a in y)new RegExp(p).test(a)&&(0,f.checkStrictMode)(g,`property ${a} matches pattern ${p} (use allowMatchingProperties)`)}function i(p){h.forIn("key",m,a=>{h.if((0,t._)`${(0,e.usePattern)(s,p)}.test(${a})`,()=>{const l=v.includes(p);l||s.subschema({keyword:"patternProperties",schemaProp:p,dataProp:a,dataPropType:o.Type.Str},b),g.opts.unevaluated&&n!==!0?h.assign((0,t._)`${n}[${a}]`,!0):!l&&!g.allErrors&&h.if((0,t.not)(b),()=>h.break())})})}}};return it.default=w,it}var ct={},Yr;function _s(){if(Yr)return ct;Yr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=X(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(f){const{gen:o,schema:w,it:s}=f;if((0,e.alwaysValidSchema)(s,w)){f.fail();return}const h=o.name("valid");f.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},h),f.failResult(h,()=>f.reset(),()=>f.error())},error:{message:"must NOT be valid"}};return ct.default=t,ct}var ut={},Zr;function $s(){if(Zr)return ut;Zr=1,Object.defineProperty(ut,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:le().validateUnion,error:{message:"must match a schema in anyOf"}};return ut.default=t,ut}var dt={},Qr;function ws(){if(Qr)return dt;Qr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=J(),t=X(),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:w})=>(0,e._)`{passingSchemas: ${w.passing}}`},code(w){const{gen:s,schema:h,parentSchema:c,it:m}=w;if(!Array.isArray(h))throw new Error("ajv implementation error");if(m.opts.discriminator&&c.discriminator)return;const $=h,g=s.let("valid",!1),P=s.let("passing",null),_=s.name("_valid");w.setParams({passing:P}),s.block(v),w.result(g,()=>w.reset(),()=>w.error(!0));function v(){$.forEach((y,b)=>{let n;(0,t.alwaysValidSchema)(m,y)?s.var(_,!0):n=w.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},_),b>0&&s.if((0,e._)`${_} && ${g}`).assign(g,!1).assign(P,(0,e._)`[${P}, ${b}]`).else(),s.if(_,()=>{s.assign(g,!0),s.assign(P,b),n&&w.mergeEvaluated(n,e.Name)})})}}};return dt.default=o,dt}var lt={},xr;function bs(){if(xr)return lt;xr=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=X(),t={keyword:"allOf",schemaType:"array",code(f){const{gen:o,schema:w,it:s}=f;if(!Array.isArray(w))throw new Error("ajv implementation error");const h=o.name("valid");w.forEach((c,m)=>{if((0,e.alwaysValidSchema)(s,c))return;const $=f.subschema({keyword:"allOf",schemaProp:m},h);f.ok(h),f.mergeEvaluated($)})}};return lt.default=t,lt}var ft={},en;function Es(){if(en)return ft;en=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=J(),t=X(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:h,parentSchema:c,it:m}=s;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(m,'"if" without "then" and "else" is ignored');const $=w(m,"then"),g=w(m,"else");if(!$&&!g)return;const P=h.let("valid",!0),_=h.name("_valid");if(v(),s.reset(),$&&g){const b=h.let("ifClause");s.setParams({ifClause:b}),h.if(_,y("then",b),y("else",b))}else $?h.if(_,y("then")):h.if((0,e.not)(_),y("else"));s.pass(P,()=>s.error(!0));function v(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);s.mergeEvaluated(b)}function y(b,n){return()=>{const u=s.subschema({keyword:b},_);h.assign(P,_),s.mergeValidEvaluated(u,P),n?h.assign(n,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function w(s,h){const c=s.schema[h];return c!==void 0&&!(0,t.alwaysValidSchema)(s,c)}return ft.default=o,ft}var ht={},tn;function Ss(){if(tn)return ht;tn=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=X(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:f,parentSchema:o,it:w}){o.if===void 0&&(0,e.checkStrictMode)(w,`"${f}" without "if" is ignored`)}};return ht.default=t,ht}var rn;function Ps(){if(rn)return et;rn=1,Object.defineProperty(et,"__esModule",{value:!0});const e=$n(),t=fs(),f=wn(),o=hs(),w=ms(),s=ps(),h=ys(),c=bn(),m=gs(),$=vs(),g=_s(),P=$s(),_=ws(),v=bs(),y=Es(),b=Ss();function n(u=!1){const r=[g.default,P.default,_.default,v.default,y.default,b.default,h.default,c.default,s.default,m.default,$.default];return u?r.push(t.default,o.default):r.push(e.default,f.default),r.push(w.default),r}return et.default=n,et}var mt={},pt={},nn;function ks(){if(nn)return pt;nn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=J(),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,e.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,e._)`{format: ${o}}`},code(o,w){const{gen:s,data:h,$data:c,schema:m,schemaCode:$,it:g}=o,{opts:P,errSchemaPath:_,schemaEnv:v,self:y}=g;if(!P.validateFormats)return;c?b():n();function b(){const u=s.scopeValue("formats",{ref:y.formats,code:P.code.formats}),r=s.const("fDef",(0,e._)`${u}[${$}]`),i=s.let("fType"),p=s.let("format");s.if((0,e._)`typeof ${r} == "object" && !(${r} instanceof RegExp)`,()=>s.assign(i,(0,e._)`${r}.type || "string"`).assign(p,(0,e._)`${r}.validate`),()=>s.assign(i,(0,e._)`"string"`).assign(p,r)),o.fail$data((0,e.or)(a(),l()));function a(){return P.strictSchema===!1?e.nil:(0,e._)`${$} && !${p}`}function l(){const E=v.$async?(0,e._)`(${r}.async ? await ${p}(${h}) : ${p}(${h}))`:(0,e._)`${p}(${h})`,R=(0,e._)`(typeof ${p} == "function" ? ${E} : ${p}.test(${h}))`;return(0,e._)`${p} && ${p} !== true && ${i} === ${w} && !${R}`}}function n(){const u=y.formats[m];if(!u){a();return}if(u===!0)return;const[r,i,p]=l(u);r===w&&o.pass(E());function a(){if(P.strictSchema===!1){y.logger.warn(R());return}throw new Error(R());function R(){return`unknown format "${m}" ignored in schema at path "${_}"`}}function l(R){const j=R instanceof RegExp?(0,e.regexpCode)(R):P.code.formats?(0,e._)`${P.code.formats}${(0,e.getProperty)(m)}`:void 0,q=s.scopeValue("formats",{key:m,ref:R,code:j});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,e._)`${q}.validate`]:["string",R,q]}function E(){if(typeof u=="object"&&!(u instanceof RegExp)&&u.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${p}(${h})`}return typeof i=="function"?(0,e._)`${p}(${h})`:(0,e._)`${p}.test(${h})`}}}};return pt.default=f,pt}var sn;function Os(){if(sn)return mt;sn=1,Object.defineProperty(mt,"__esModule",{value:!0});const t=[ks().default];return mt.default=t,mt}var be={},an;function Ns(){return an||(an=1,Object.defineProperty(be,"__esModule",{value:!0}),be.contentVocabulary=be.metadataVocabulary=void 0,be.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],be.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),be}var on;function Ts(){if(on)return ze;on=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=xn(),t=ls(),f=Ps(),o=Os(),w=Ns(),s=[e.default,t.default,(0,f.default)(),o.default,w.metadataVocabulary,w.contentVocabulary];return ze.default=s,ze}var yt={},Te={},cn;function Rs(){if(cn)return Te;cn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Te.DiscrError=e={})),Te}var un;function js(){if(un)return yt;un=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=J(),t=Rs(),f=Ht(),o=kt(),w=X(),h={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:m}})=>c===t.DiscrError.Tag?`tag "${m}" must be string`:`value of tag "${m}" must be in oneOf`,params:({params:{discrError:c,tag:m,tagName:$}})=>(0,e._)`{error: ${c}, tag: ${$}, tagValue: ${m}}`},code(c){const{gen:m,data:$,schema:g,parentSchema:P,it:_}=c,{oneOf:v}=P;if(!_.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=g.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(g.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const b=m.let("valid",!1),n=m.const("tag",(0,e._)`${$}${(0,e.getProperty)(y)}`);m.if((0,e._)`typeof ${n} == "string"`,()=>u(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:n,tagName:y})),c.ok(b);function u(){const p=i();m.if(!1);for(const a in p)m.elseIf((0,e._)`${n} === ${a}`),m.assign(b,r(p[a]));m.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:n,tagName:y}),m.endIf()}function r(p){const a=m.name("valid"),l=c.subschema({keyword:"oneOf",schemaProp:p},a);return c.mergeEvaluated(l,e.Name),a}function i(){var p;const a={},l=R(P);let E=!0;for(let M=0;M<v.length;M++){let V=v[M];if(V!=null&&V.$ref&&!(0,w.schemaHasRulesButRef)(V,_.self.RULES)){const G=V.$ref;if(V=f.resolveRef.call(_.self,_.schemaEnv.root,_.baseId,G),V instanceof f.SchemaEnv&&(V=V.schema),V===void 0)throw new o.default(_.opts.uriResolver,_.baseId,G)}const F=(p=V==null?void 0:V.properties)===null||p===void 0?void 0:p[y];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);E=E&&(l||R(V)),j(F,M)}if(!E)throw new Error(`discriminator: "${y}" must be required`);return a;function R({required:M}){return Array.isArray(M)&&M.includes(y)}function j(M,V){if(M.const)q(M.const,V);else if(M.enum)for(const F of M.enum)q(F,V);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function q(M,V){if(typeof M!="string"||M in a)throw new Error(`discriminator: "${y}" values must be unique strings`);a[M]=V}}}};return yt.default=h,yt}const Is="http://json-schema.org/draft-07/schema#",qs="http://json-schema.org/draft-07/schema#",Cs="Core schema meta-schema",As={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:[]}},Ms=["object","boolean"],Ds={$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:"#"}},zs={$schema:Is,$id:qs,title:Cs,definitions:As,type:Ms,properties:Ds,default:!0};var dn;function En(){return dn||(dn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const f=Yn(),o=Ts(),w=js(),s=zs,h=["/properties"],c="http://json-schema.org/draft-07/schema";class m extends f.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(w.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,h):s;this.addMetaSchema(y,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=m,e.exports=t=m,e.exports.Ajv=m,Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var $=Pt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return $.KeywordCxt}});var g=J();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}});var P=Gt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return P.default}});var _=kt();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(qe,qe.exports)),qe.exports}var Sn=En(),gt={exports:{}},Ft={},ln;function Vs(){return ln||(ln=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(j,q){return{validate:j,compare:q}}e.fullFormats={date:t(s,h),time:t(m,$),"date-time":t(P,_),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:b,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:R,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:u,int32:{type:"number",validate:p},int64:{type:"number",validate:a},float:{type:"number",validate:l},double:{type:"number",validate:l},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,h),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function f(j){return j%4===0&&(j%100!==0||j%400===0)}const o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,w=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(j){const q=o.exec(j);if(!q)return!1;const M=+q[1],V=+q[2],F=+q[3];return V>=1&&V<=12&&F>=1&&F<=(V===2&&f(M)?29:w[V])}function h(j,q){if(j&&q)return j>q?1:j<q?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function m(j,q){const M=c.exec(j);if(!M)return!1;const V=+M[1],F=+M[2],G=+M[3],Q=M[5];return(V<=23&&F<=59&&G<=59||V===23&&F===59&&G===60)&&(!q||Q!=="")}function $(j,q){if(!(j&&q))return;const M=c.exec(j),V=c.exec(q);if(M&&V)return j=M[1]+M[2]+M[3]+(M[4]||""),q=V[1]+V[2]+V[3]+(V[4]||""),j>q?1:j<q?-1:0}const g=/t|\s/i;function P(j){const q=j.split(g);return q.length===2&&s(q[0])&&m(q[1],!0)}function _(j,q){if(!(j&&q))return;const[M,V]=j.split(g),[F,G]=q.split(g),Q=h(M,F);if(Q!==void 0)return Q||$(V,G)}const v=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function b(j){return v.test(j)&&y.test(j)}const n=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function u(j){return n.lastIndex=0,n.test(j)}const r=-2147483648,i=2**31-1;function p(j){return Number.isInteger(j)&&j<=i&&j>=r}function a(j){return Number.isInteger(j)}function l(){return!0}const E=/[^\\]\\Z/;function R(j){if(E.test(j))return!1;try{return new RegExp(j),!0}catch{return!1}}})(Ft)),Ft}var Ut={},fn;function Fs(){return fn||(fn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=En(),f=J(),o=f.operators,w={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:c,schemaCode:m})=>f.str`should be ${w[c].okStr} ${m}`,params:({keyword:c,schemaCode:m})=>f._`{comparison: ${w[c].okStr}, limit: ${m}}`};e.formatLimitDefinition={keyword:Object.keys(w),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:m,data:$,schemaCode:g,keyword:P,it:_}=c,{opts:v,self:y}=_;if(!v.validateFormats)return;const b=new t.KeywordCxt(_,y.RULES.all.format.definition,"format");b.$data?n():u();function n(){const i=m.scopeValue("formats",{ref:y.formats,code:v.code.formats}),p=m.const("fmt",f._`${i}[${b.schemaCode}]`);c.fail$data(f.or(f._`typeof ${p} != "object"`,f._`${p} instanceof RegExp`,f._`typeof ${p}.compare != "function"`,r(p)))}function u(){const i=b.schema,p=y.formats[i];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${P}": format "${i}" does not define "compare" function`);const a=m.scopeValue("formats",{key:i,ref:p,code:v.code.formats?f._`${v.code.formats}${f.getProperty(i)}`:void 0});c.fail$data(r(a))}function r(i){return f._`${i}.compare(${$}, ${g}) ${w[P].fail} 0`}},dependencies:["format"]};const h=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=h})(Ut)),Ut}var hn;function Us(){return hn||(hn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const f=Vs(),o=Fs(),w=J(),s=new w.Name("fullFormats"),h=new w.Name("fastFormats"),c=($,g={keywords:!0})=>{if(Array.isArray(g))return m($,g,f.fullFormats,s),$;const[P,_]=g.mode==="fast"?[f.fastFormats,h]:[f.fullFormats,s],v=g.formats||f.formatNames;return m($,v,P,_),g.keywords&&o.default($),$};c.get=($,g="full")=>{const _=(g==="fast"?f.fastFormats:f.fullFormats)[$];if(!_)throw new Error(`Unknown format "${$}"`);return _};function m($,g,P,_){var v,y;(v=(y=$.opts.code).formats)!==null&&v!==void 0||(y.formats=w._`require("ajv-formats/dist/formats").${_}`);for(const b of g)$.addFormat(b,P[b])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(gt,gt.exports)),gt.exports}var Ls=Us();const Pn=Cn(Ls),Ks="http://json-schema.org/draft-07/schema#",Gs="https://github.com/borderux/recursica/tree/main/packages/adapter-tester/src/golden/manifest.schema.json",Hs="test/golden/manifest.json",Js="Tracks golden (baseline) image metadata for @recursica/adapter-tester's golden-image visual regression checks. One manifest lives alongside its adapter's test/golden/<story-id>.png files, keyed by story id.",Bs="object",Ws={type:"object",additionalProperties:!1,required:["createdAt"],properties:{createdAt:{type:"string",format:"date-time",description:"When this story's own golden PNG was last captured, via --update-golden, --approve-divergence, or first-run auto-create."},sourceOfTruthCreatedAt:{type:"string",format:"date-time",description:"The source-of-truth adapter's (mantine) manifest `createdAt` for this story at the time this adapter's divergence from it was last reviewed via --approve-divergence. Omitted on the source-of-truth adapter's own manifest, and omitted here until the first approval. If mantine's current `createdAt` for this story is newer than this value, the divergence is flagged again for re-review."}}},Xs={$schema:Ks,$id:Gs,title:Hs,description:Js,type:Bs,additionalProperties:Ws},Ys=Pn,kn=new Sn.Ajv({allErrors:!0,strict:!0});Ys(kn);const mn=kn.compile(Xs);function Bt(e,t){if(mn(e))return;const f=(mn.errors??[]).map(o=>{var s;const w=(s=o.params)!=null&&s.additionalProperty?` '${o.params.additionalProperty}'`:"";return` - ${o.instancePath||"root"} ${o.message}${w}`}).join(`
|
|
9
|
+
`);throw new Error(`Invalid ${t}:
|
|
10
|
+
${f}`)}function $t(e){return bt.join(e,"manifest.json")}function On(e){return bt.join(e,"manifest.json.lock")}function Re(e,t){return bt.join(e,`${t}.png`)}function je(e){const t=$t(e);if(!ee.existsSync(t))return{};const f=JSON.parse(ee.readFileSync(t,"utf8"));return Bt(f,t),f}function Zs(e,t){const f=$t(e);Bt(t,f);const o={};for(const s of Object.keys(t).sort())o[s]=t[s];ee.mkdirSync(e,{recursive:!0});const w=`${f}.tmp-${process.pid}-${Math.random().toString(36).slice(2)}`;ee.writeFileSync(w,JSON.stringify(o,null,2)+`
|
|
11
|
+
`),ee.renameSync(w,f)}const Qs=25,xs=15e3;function ea(e){return new Promise(t=>setTimeout(t,e))}async function ta(e){ee.mkdirSync(e,{recursive:!0});const t=On(e),f=Date.now()+xs;for(;;)try{ee.closeSync(ee.openSync(t,"wx"));return}catch(o){if(o.code!=="EEXIST")throw o;if(Date.now()>=f)throw new Error(`Timed out waiting for the manifest lock at "${t}" — delete it if a previous run crashed while holding it.`);await ea(Qs)}}function ra(e){ee.rmSync(On(e),{force:!0})}async function Nn(e,t,f){await ta(e);try{const o=je(e),w=f(o[t]);return w===void 0?delete o[t]:o[t]=w,Zs(e,o),w}finally{ra(e)}}function na(e,t,f){ee.mkdirSync(e,{recursive:!0}),ee.writeFileSync(Re(e,t),f)}async function sa(e,t){const f=je(e),o=Object.keys(f).filter(w=>!t.has(w));for(const w of o){const s=Re(e,w);ee.existsSync(s)&&ee.unlinkSync(s),await Nn(e,w,()=>{})}return o}const pn="borderux/recursica-adapter-mantine-v8";async function aa(e,t){var s,h;const f=await fetch(`https://registry.npmjs.org/${e}`);if(!f.ok)throw new Error(`Could not reach npm registry for ${e}: ${f.statusText}`);const o=await f.json(),w=((s=o["dist-tags"])==null?void 0:s[t])??((h=o.versions)!=null&&h[t]?t:void 0);if(!w)throw new Error(`${e} has no version or dist-tag "${t}" on the npm registry.`);return w}async function Tn(e){if(e.type==="local"){if(!ee.existsSync($t(e.dir)))throw new Error(`No golden baseline found at ${e.dir} — the source-of-truth divergence check has nothing to compare against. Capture one there first (--update-golden), or fix sourceOfTruth.dir if it's pointing at the wrong checkout.`);return{manifest:je(e.dir),async readImage(m){const $=Re(e.dir,m);return ee.existsSync($)?ee.readFileSync($):null}}}let t;try{t=await aa(e.packageName,e.versionSpec)}catch(c){throw new Error(`Could not resolve ${e.packageName}@${e.versionSpec} on the npm registry — the source-of-truth divergence check has nothing to compare against.`,{cause:c})}const f=bt.join(e.cacheDir,t),o=`v${t}`,w=`https://raw.githubusercontent.com/${pn}/${o}/test/golden`;let s;const h=$t(f);if(ee.existsSync(h))s=je(f);else{let c;try{c=await fetch(`${w}/manifest.json`)}catch(g){throw new Error(`Could not reach GitHub to fetch ${o}'s golden baseline (${w}/manifest.json) — the source-of-truth divergence check has nothing to compare against.`,{cause:g})}if(!c.ok)throw new Error(`No golden baseline published for tag "${o}" in ${pn} (${w}/manifest.json returned ${c.status}) — the source-of-truth divergence check has nothing to compare against. Confirm that tag exists and its release actually published test/golden/.`);const m=await c.text(),$=JSON.parse(m);Bt($,`${w}/manifest.json`),ee.mkdirSync(f,{recursive:!0}),ee.writeFileSync(h,m),s=$}return{manifest:s,async readImage(c){const m=Re(f,c);if(ee.existsSync(m))return ee.readFileSync(m);const $=await fetch(`${w}/${c}.png`);if(!$.ok)return null;const g=Buffer.from(await $.arrayBuffer());return ee.mkdirSync(f,{recursive:!0}),ee.writeFileSync(m,g),g}}}const oa=["Theme","Tokens","Introduction"];function wt(e,t){return e===t||e.startsWith(t)}async function ia(e,t){let f;try{const o=await fetch(`${e.url}/index.json`);if(!o.ok)throw new Error(`Failed to fetch Storybook index: ${o.statusText}`);const s=(await o.json()).entries||{};f=Object.values(s).filter(h=>h.type==="story"&&!t.some(c=>h.title===c||h.title.startsWith(`${c}/`))),f.sort((h,c)=>h.id.localeCompare(c.id))}catch(o){throw console.error("Failed to load Storybook index from",`${e.url}/index.json`,o),new Error(`Storybook target "${e.name}" is not responsive or index.json is missing. Please ensure its Storybook is running.`)}return f}const ca={width:800,height:600};function Rn(e,t){let f;for(const o of Object.keys(t))t[o].viewport&&wt(e,o)&&(!f||o.length>f.length)&&(f=o);return f!==void 0?t[f].viewport:ca}function Kt(e,t,f){let o;for(const w of Object.keys(t))wt(e,w)&&(!o||w.length>o.length)&&(o=w);return o!==void 0?t[o]:f}async function jn(e){return await e.waitForSelector("#storybook-root"),await e.addStyleTag({content:"* { -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; }"}),await e.evaluate(()=>Promise.all(Array.from(document.querySelectorAll('link[rel="stylesheet"]')).map(t=>t.sheet?Promise.resolve():new Promise(f=>{t.addEventListener("load",()=>f(),{once:!0}),t.addEventListener("error",()=>f(),{once:!0})}))).then(()=>document.fonts.ready)),await e.waitForTimeout(300),e.screenshot()}async function ua(e){const t=e.isSourceOfTruthAdapter?e.targets[0]:e.targets.find(n=>!n.sourceOfTruth);if(!t)throw new Error("adapter-tester config has no non-sourceOfTruth target to run the golden check against.");const f=e.excludeTitlePrefixes??oa,o=e.stories??{},w=Object.keys(o).filter(n=>o[n].exclude),s=Object.fromEntries(Object.entries(o).filter(([,n])=>n.goldenThreshold!==void 0).map(([n,u])=>[n,u.goldenThreshold])),h=Object.fromEntries(Object.entries(o).filter(([,n])=>n.sourceOfTruthThreshold!==void 0).map(([n,u])=>[n,u.sourceOfTruthThreshold])),c=e.goldenDir,m=e.goldenMode,$=e.checkMode,g=await ia(t,f),P=g.filter(n=>!w.some(u=>wt(n.id,u)));if(m==="update-golden"){const n=await sa(c,new Set(P.map(u=>u.id)));n.length>0&&console.warn(`Pruned ${n.length} orphaned golden(s) no longer in Storybook: ${n.join(", ")}`)}const _=$!=="divergence"||e.isSourceOfTruthAdapter||!e.sourceOfTruthGolden?null:await Tn(e.sourceOfTruthGolden),v=new Set(g.map(n=>n.id)),y=_?Object.keys(_.manifest).filter(n=>!v.has(n)&&!w.some(u=>wt(n,u))).sort():[];y.length>0&&console.error(`[adapter-tester] ${y.length} stor(y/ies) exist in the source of truth but are missing here: ${y.join(", ")}. Add the missing story, or mark it \`exclude: true\` under \`stories\` in adapter-tester.config.json if intentional.`),console.log([`[adapter-tester] target: "${t.name}" (${t.url})`,`[adapter-tester] checkMode: "${$}" (${$==="divergence"?"live render vs source-of-truth's golden":"live render vs this project's own golden"})`,`[adapter-tester] goldenMode: "${m}"`,`[adapter-tester] goldenThresholdPixels: ${e.goldenThresholdPixels}`,`[adapter-tester] sourceOfTruthThresholdPixels: ${e.sourceOfTruthThresholdPixels}`,$==="divergence"?e.isSourceOfTruthAdapter?"[adapter-tester] sourceOfTruthGolden: skipped — this is the source-of-truth adapter, nothing to diverge from":e.sourceOfTruthGolden?`[adapter-tester] sourceOfTruthGolden: resolved, ${Object.keys(_.manifest).length} golden(s) available (config: ${JSON.stringify(e.sourceOfTruthGolden)})`:"[adapter-tester] sourceOfTruthGolden: skipped — no sourceOfTruthGolden configured":'[adapter-tester] sourceOfTruthGolden: not used in "own" checkMode',`[adapter-tester] stories: ${P.length} to check (excluded: ${w.length}, title prefixes excluded: ${f.join(", ")||"none"})`,`[adapter-tester] story parity with source of truth: ${y.length===0?"OK":`${y.length} missing (see error above)`}`].join(`
|
|
12
|
+
`));const b=$==="divergence"?"Source-of-Truth Divergence Check":"Own-Drift Golden Image Check";return{ownTargetName:t.name,suiteLabel:b,stories:P,missingFromSourceOfTruth:y,checkStory:async(n,u,r)=>{const i=await u.newPage();await i.setViewportSize(Rn(n.id,o)),await i.goto(`${t.url}/iframe.html?id=${n.id}&viewMode=story`,{waitUntil:"networkidle"});const p=await jn(i),a=Re(c,n.id),l=je(c)[n.id],E=m!=="check"||!l||!ee.existsSync(a);let R;if(E)na(c,n.id,p),R=l!=null&&l.sourceOfTruthCreatedAt?{createdAt:new Date().toISOString(),sourceOfTruthCreatedAt:l.sourceOfTruthCreatedAt}:{createdAt:new Date().toISOString()},l||r.annotations.push({type:"golden-created",description:`No golden existed yet for "${n.id}" — captured one from this run.`});else if(R=l,$==="own"){const j=ee.readFileSync(a),{diffPixels:q,diffImage:M}=Lt(p,j),V=Kt(n.id,s,e.goldenThresholdPixels);q>=V&&(await r.attach("expected",{body:j,contentType:"image/png"}),await r.attach("actual",{body:p,contentType:"image/png"}),M&&await r.attach("diff",{body:M,contentType:"image/png"})),Yt.expect.soft(q,`"${n.id}" has drifted from its own golden image (${q} mismatched pixels, threshold ${V})`).toBeLessThan(V)}if(_){const j=_.manifest[n.id],q=j?await _.readImage(n.id):null;if(j&&q)if(m==="approve-divergence")R={...R,sourceOfTruthCreatedAt:j.createdAt};else{const{diffPixels:M,diffImage:V}=Lt(p,q),F=Kt(n.id,h,e.sourceOfTruthThresholdPixels),G=R.sourceOfTruthCreatedAt,Q=M<F||G!==void 0&&G>=j.createdAt;Q||(await r.attach("expected",{body:q,contentType:"image/png"}),await r.attach("actual",{body:p,contentType:"image/png"}),V&&await r.attach("diff",{body:V,contentType:"image/png"}),r.annotations.push({type:"source-of-truth-divergence",description:`"${n.id}" differs from the source of truth's golden by ${M} mismatched pixels (threshold ${F}) and hasn't been reviewed — run with --approve-divergence if this is intentional, or fix the adapter styling.`})),Yt.expect.soft(Q,`"${n.id}" differs from the source of truth's golden by ${M} mismatched pixels (threshold ${F}) and hasn't been reviewed — run with --approve-divergence if this is intentional, or fix the adapter styling.`).toBe(!0)}}await Nn(c,n.id,()=>R)}}}exports.ajvExports=Sn;exports.captureStoryScreenshot=jn;exports.diffPngBuffers=Lt;exports.index=Pn;exports.resolveSourceOfTruthGolden=Tn;exports.resolveThreshold=Kt;exports.resolveViewport=Rn;exports.resolveVisualRegressionPlan=ua;
|
|
13
|
+
//# sourceMappingURL=runVisualRegression-DNafR8Lb.cjs.map
|