https://github.com/oldvis/gallery
Tip revision: f5f8c3818c0f3187707a656d1fb74c8d0895ac44 authored by zhangyu94 on 28 November 2023, 15:15:35 UTC
Deploying to gh-pages from @ oldvis/gallery@278a39b8cac804dc86a5c4567502eb2d42281b82 🚀
Deploying to gh-pages from @ oldvis/gallery@278a39b8cac804dc86a5c4567502eb2d42281b82 🚀
Tip revision: f5f8c38
index-f6f275dd.js
import{c as La,g as Ha,d as Ga,a as Rr,s as Ir,o as Je,b as _t,e as me,u as Oe,f as Xn,_ as Ja,i as Ba,Q as Wa,n as Rn,w as Qa,v as Xa,h as Ya,j as Za,k as vr}from"./index-85164b1a.js";var br={exports:{}},Yn={},Te={},gt={},Lt={},J={},Kt={};(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 r extends t{constructor(N){if(super(),!e.IDENTIFIER.test(N))throw new Error("CodeGen: name must be a valid identifier");this.str=N}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class a extends t{constructor(N){super(),this._items=typeof N=="string"?[N]:N}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const N=this._items[0];return N===""||N==='""'}get str(){var N;return(N=this._str)!==null&&N!==void 0?N:this._str=this._items.reduce((O,I)=>`${O}${I}`,"")}get names(){var N;return(N=this._names)!==null&&N!==void 0?N:this._names=this._items.reduce((O,I)=>(I instanceof r&&(O[I.str]=(O[I.str]||0)+1),O),{})}}e._Code=a,e.nil=new a("");function n(f,...N){const O=[f[0]];let I=0;for(;I<N.length;)m(O,N[I]),O.push(f[++I]);return new a(O)}e._=n;const i=new a("+");function l(f,...N){const O=[R(f[0])];let I=0;for(;I<N.length;)O.push(i),m(O,N[I]),O.push(i,R(f[++I]));return y(O),new a(O)}e.str=l;function m(f,N){N instanceof a?f.push(...N._items):N instanceof r?f.push(N):f.push(v(N))}e.addCodeArg=m;function y(f){let N=1;for(;N<f.length-1;){if(f[N]===i){const O=p(f[N-1],f[N+1]);if(O!==void 0){f.splice(N-1,3,O);continue}f[N++]="+"}N++}}function p(f,N){if(N==='""')return f;if(f==='""')return N;if(typeof f=="string")return N instanceof r||f[f.length-1]!=='"'?void 0:typeof N!="string"?`${f.slice(0,-1)}${N}"`:N[0]==='"'?f.slice(0,-1)+N.slice(1):void 0;if(typeof N=="string"&&N[0]==='"'&&!(f instanceof r))return`"${f}${N.slice(1)}`}function h(f,N){return N.emptyStr()?f:f.emptyStr()?N:l`${f}${N}`}e.strConcat=h;function v(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:R(Array.isArray(f)?f.join(","):f)}function j(f){return new a(R(f))}e.stringify=j;function R(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=R;function S(f){return typeof f=="string"&&e.IDENTIFIER.test(f)?new a(`.${f}`):n`[${f}]`}e.getProperty=S;function P(f){if(typeof f=="string"&&e.IDENTIFIER.test(f))return new a(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}e.getEsmExportName=P;function _(f){return new a(f.toString())}e.regexpCode=_})(Kt);var Sr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Kt;class r extends Error{constructor(p){super(`CodeGen: "code" for ${p} not defined`),this.value=p.value}}var a;(function(y){y[y.Started=0]="Started",y[y.Completed=1]="Completed"})(a=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:p,parent:h}={}){this._names={},this._prefixes=p,this._parent=h}toName(p){return p instanceof t.Name?p:this.name(p)}name(p){return new t.Name(this._newName(p))}_newName(p){const h=this._names[p]||this._nameGroup(p);return`${p}${h.index++}`}_nameGroup(p){var h,v;if(!((v=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||v===void 0)&&v.has(p)||this._prefixes&&!this._prefixes.has(p))throw new Error(`CodeGen: prefix "${p}" is not allowed in this scope`);return this._names[p]={prefix:p,index:0}}}e.Scope=n;class i extends t.Name{constructor(p,h){super(h),this.prefix=p}setValue(p,{property:h,itemIndex:v}){this.value=p,this.scopePath=(0,t._)`.${new t.Name(h)}[${v}]`}}e.ValueScopeName=i;const l=(0,t._)`\n`;class m extends n{constructor(p){super(p),this._values={},this._scope=p.scope,this.opts={...p,_n:p.lines?l:t.nil}}get(){return this._scope}name(p){return new i(p,this._newName(p))}value(p,h){var v;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const j=this.toName(p),{prefix:R}=j,S=(v=h.key)!==null&&v!==void 0?v:h.ref;let P=this._values[R];if(P){const N=P.get(S);if(N)return N}else P=this._values[R]=new Map;P.set(S,j);const _=this._scope[R]||(this._scope[R]=[]),f=_.length;return _[f]=h.ref,j.setValue(h,{property:R,itemIndex:f}),j}getValue(p,h){const v=this._values[p];if(v)return v.get(h)}scopeRefs(p,h=this._values){return this._reduceValues(h,v=>{if(v.scopePath===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return(0,t._)`${p}${v.scopePath}`})}scopeCode(p=this._values,h,v){return this._reduceValues(p,j=>{if(j.value===void 0)throw new Error(`CodeGen: name "${j}" has no value`);return j.value.code},h,v)}_reduceValues(p,h,v={},j){let R=t.nil;for(const S in p){const P=p[S];if(!P)continue;const _=v[S]=v[S]||new Map;P.forEach(f=>{if(_.has(f))return;_.set(f,a.Started);let N=h(f);if(N){const O=this.opts.es5?e.varKinds.var:e.varKinds.const;R=(0,t._)`${R}${O} ${f} = ${N};${this.opts._n}`}else if(N=j==null?void 0:j(f))R=(0,t._)`${R}${N}${this.opts._n}`;else throw new r(f);_.set(f,a.Completed)})}return R}}e.ValueScope=m})(Sr);(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=Kt,r=Sr;var a=Kt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return a.Name}});var n=Sr;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.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 i{optimizeNodes(){return this}optimizeNames(s,u){return this}}class l extends i{constructor(s,u,T){super(),this.varKind=s,this.name=u,this.rhs=T}render({es5:s,_n:u}){const T=s?r.varKinds.var:this.varKind,V=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${V};`+u}optimizeNames(s,u){if(s[this.name.str])return this.rhs&&(this.rhs=le(this.rhs,s,u)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class m extends i{constructor(s,u,T){super(),this.lhs=s,this.rhs=u,this.sideEffects=T}render({_n:s}){return`${this.lhs} = ${this.rhs};`+s}optimizeNames(s,u){if(!(this.lhs instanceof t.Name&&!s[this.lhs.str]&&!this.sideEffects))return this.rhs=le(this.rhs,s,u),this}get names(){const s=this.lhs instanceof t.Name?{}:{...this.lhs.names};return we(s,this.rhs)}}class y extends m{constructor(s,u,T,V){super(s,T,V),this.op=u}render({_n:s}){return`${this.lhs} ${this.op}= ${this.rhs};`+s}}class p extends i{constructor(s){super(),this.label=s,this.names={}}render({_n:s}){return`${this.label}:`+s}}class h extends i{constructor(s){super(),this.label=s,this.names={}}render({_n:s}){return`break${this.label?` ${this.label}`:""};`+s}}class v extends i{constructor(s){super(),this.error=s}render({_n:s}){return`throw ${this.error};`+s}get names(){return this.error.names}}class j extends i{constructor(s){super(),this.code=s}render({_n:s}){return`${this.code};`+s}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(s,u){return this.code=le(this.code,s,u),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class R extends i{constructor(s=[]){super(),this.nodes=s}render(s){return this.nodes.reduce((u,T)=>u+T.render(s),"")}optimizeNodes(){const{nodes:s}=this;let u=s.length;for(;u--;){const T=s[u].optimizeNodes();Array.isArray(T)?s.splice(u,1,...T):T?s[u]=T:s.splice(u,1)}return s.length>0?this:void 0}optimizeNames(s,u){const{nodes:T}=this;let V=T.length;for(;V--;){const F=T[V];F.optimizeNames(s,u)||(We(s,F.names),T.splice(V,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((s,u)=>Y(s,u.names),{})}}class S extends R{render(s){return"{"+s._n+super.render(s)+"}"+s._n}}class P extends R{}class _ extends S{}_.kind="else";class f extends S{constructor(s,u){super(u),this.condition=s}render(s){let u=`if(${this.condition})`+super.render(s);return this.else&&(u+="else "+this.else.render(s)),u}optimizeNodes(){super.optimizeNodes();const s=this.condition;if(s===!0)return this.nodes;let u=this.else;if(u){const T=u.optimizeNodes();u=this.else=Array.isArray(T)?new _(T):T}if(u)return s===!1?u instanceof f?u:u.nodes:this.nodes.length?this:new f(Qe(s),u instanceof f?[u]:u.nodes);if(!(s===!1||!this.nodes.length))return this}optimizeNames(s,u){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(s,u),!!(super.optimizeNames(s,u)||this.else))return this.condition=le(this.condition,s,u),this}get names(){const s=super.names;return we(s,this.condition),this.else&&Y(s,this.else.names),s}}f.kind="if";class N extends S{}N.kind="for";class O extends N{constructor(s){super(),this.iteration=s}render(s){return`for(${this.iteration})`+super.render(s)}optimizeNames(s,u){if(super.optimizeNames(s,u))return this.iteration=le(this.iteration,s,u),this}get names(){return Y(super.names,this.iteration.names)}}class I extends N{constructor(s,u,T,V){super(),this.varKind=s,this.name=u,this.from=T,this.to=V}render(s){const u=s.es5?r.varKinds.var:this.varKind,{name:T,from:V,to:F}=this;return`for(${u} ${T}=${V}; ${T}<${F}; ${T}++)`+super.render(s)}get names(){const s=we(super.names,this.from);return we(s,this.to)}}class A extends N{constructor(s,u,T,V){super(),this.loop=s,this.varKind=u,this.name=T,this.iterable=V}render(s){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(s)}optimizeNames(s,u){if(super.optimizeNames(s,u))return this.iterable=le(this.iterable,s,u),this}get names(){return Y(super.names,this.iterable.names)}}class g extends S{constructor(s,u,T){super(),this.name=s,this.args=u,this.async=T}render(s){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(s)}}g.kind="func";class C extends R{render(s){return"return "+super.render(s)}}C.kind="return";class D extends S{render(s){let u="try"+super.render(s);return this.catch&&(u+=this.catch.render(s)),this.finally&&(u+=this.finally.render(s)),u}optimizeNodes(){var s,u;return super.optimizeNodes(),(s=this.catch)===null||s===void 0||s.optimizeNodes(),(u=this.finally)===null||u===void 0||u.optimizeNodes(),this}optimizeNames(s,u){var T,V;return super.optimizeNames(s,u),(T=this.catch)===null||T===void 0||T.optimizeNames(s,u),(V=this.finally)===null||V===void 0||V.optimizeNames(s,u),this}get names(){const s=super.names;return this.catch&&Y(s,this.catch.names),this.finally&&Y(s,this.finally.names),s}}class L extends S{constructor(s){super(),this.error=s}render(s){return`catch(${this.error})`+super.render(s)}}L.kind="catch";class B extends S{render(s){return"finally"+super.render(s)}}B.kind="finally";class se{constructor(s,u={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...u,_n:u.lines?`
`:""},this._extScope=s,this._scope=new r.Scope({parent:s}),this._nodes=[new P]}toString(){return this._root.render(this.opts)}name(s){return this._scope.name(s)}scopeName(s){return this._extScope.name(s)}scopeValue(s,u){const T=this._extScope.value(s,u);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(s,u){return this._extScope.getValue(s,u)}scopeRefs(s){return this._extScope.scopeRefs(s,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(s,u,T,V){const F=this._scope.toName(u);return T!==void 0&&V&&(this._constants[F.str]=T),this._leafNode(new l(s,F,T)),F}const(s,u,T){return this._def(r.varKinds.const,s,u,T)}let(s,u,T){return this._def(r.varKinds.let,s,u,T)}var(s,u,T){return this._def(r.varKinds.var,s,u,T)}assign(s,u,T){return this._leafNode(new m(s,u,T))}add(s,u){return this._leafNode(new y(s,e.operators.ADD,u))}code(s){return typeof s=="function"?s():s!==t.nil&&this._leafNode(new j(s)),this}object(...s){const u=["{"];for(const[T,V]of s)u.length>1&&u.push(","),u.push(T),(T!==V||this.opts.es5)&&(u.push(":"),(0,t.addCodeArg)(u,V));return u.push("}"),new t._Code(u)}if(s,u,T){if(this._blockNode(new f(s)),u&&T)this.code(u).else().code(T).endIf();else if(u)this.code(u).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(s){return this._elseNode(new f(s))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(f,_)}_for(s,u){return this._blockNode(s),u&&this.code(u).endFor(),this}for(s,u){return this._for(new O(s),u)}forRange(s,u,T,V,F=this.opts.es5?r.varKinds.var:r.varKinds.let){const W=this._scope.toName(s);return this._for(new I(F,W,u,T),()=>V(W))}forOf(s,u,T,V=r.varKinds.const){const F=this._scope.toName(s);if(this.opts.es5){const W=u instanceof t.Name?u:this.var("_arr",u);return this.forRange("_i",0,(0,t._)`${W}.length`,X=>{this.var(F,(0,t._)`${W}[${X}]`),T(F)})}return this._for(new A("of",V,F,u),()=>T(F))}forIn(s,u,T,V=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(s,(0,t._)`Object.keys(${u})`,T);const F=this._scope.toName(s);return this._for(new A("in",V,F,u),()=>T(F))}endFor(){return this._endBlockNode(N)}label(s){return this._leafNode(new p(s))}break(s){return this._leafNode(new h(s))}return(s){const u=new C;if(this._blockNode(u),this.code(s),u.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(s,u,T){if(!u&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const V=new D;if(this._blockNode(V),this.code(s),u){const F=this.name("e");this._currNode=V.catch=new L(F),u(F)}return T&&(this._currNode=V.finally=new B,this.code(T)),this._endBlockNode(L,B)}throw(s){return this._leafNode(new v(s))}block(s,u){return this._blockStarts.push(this._nodes.length),s&&this.code(s).endBlock(u),this}endBlock(s){const u=this._blockStarts.pop();if(u===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-u;if(T<0||s!==void 0&&T!==s)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${s} expected`);return this._nodes.length=u,this}func(s,u=t.nil,T,V){return this._blockNode(new g(s,u,T)),V&&this.code(V).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(s=1){for(;s-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(s){return this._currNode.nodes.push(s),this}_blockNode(s){this._currNode.nodes.push(s),this._nodes.push(s)}_endBlockNode(s,u){const T=this._currNode;if(T instanceof s||u&&T instanceof u)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${u?`${s.kind}/${u.kind}`:s.kind}"`)}_elseNode(s){const u=this._currNode;if(!(u instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=u.else=s,this}get _root(){return this._nodes[0]}get _currNode(){const s=this._nodes;return s[s.length-1]}set _currNode(s){const u=this._nodes;u[u.length-1]=s}}e.CodeGen=se;function Y(w,s){for(const u in s)w[u]=(w[u]||0)+(s[u]||0);return w}function we(w,s){return s instanceof t._CodeOrName?Y(w,s.names):w}function le(w,s,u){if(w instanceof t.Name)return T(w);if(!V(w))return w;return new t._Code(w._items.reduce((F,W)=>(W instanceof t.Name&&(W=T(W)),W instanceof t._Code?F.push(...W._items):F.push(W),F),[]));function T(F){const W=u[F.str];return W===void 0||s[F.str]!==1?F:(delete s[F.str],W)}function V(F){return F instanceof t._Code&&F._items.some(W=>W instanceof t.Name&&s[W.str]===1&&u[W.str]!==void 0)}}function We(w,s){for(const u in s)w[u]=(w[u]||0)-(s[u]||0)}function Qe(w){return typeof w=="boolean"||typeof w=="number"||w===null?!w:(0,t._)`!${k(w)}`}e.not=Qe;const ot=$(e.operators.AND);function St(...w){return w.reduce(ot)}e.and=St;const it=$(e.operators.OR);function M(...w){return w.reduce(it)}e.or=M;function $(w){return(s,u)=>s===t.nil?u:u===t.nil?s:(0,t._)`${k(s)} ${w} ${k(u)}`}function k(w){return w instanceof t.Name?w:(0,t._)`(${w})`}})(J);var x={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=J,r=Kt;function a(g){const C={};for(const D of g)C[D]=!0;return C}e.toHash=a;function n(g,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(i(g,C),!l(C,g.self.RULES.all))}e.alwaysValidSchema=n;function i(g,C=g.schema){const{opts:D,self:L}=g;if(!D.strictSchema||typeof C=="boolean")return;const B=L.RULES.keywords;for(const se in C)B[se]||A(g,`unknown keyword: "${se}"`)}e.checkUnknownRules=i;function l(g,C){if(typeof g=="boolean")return!g;for(const D in g)if(C[D])return!0;return!1}e.schemaHasRules=l;function m(g,C){if(typeof g=="boolean")return!g;for(const D in g)if(D!=="$ref"&&C.all[D])return!0;return!1}e.schemaHasRulesButRef=m;function y({topSchemaRef:g,schemaPath:C},D,L,B){if(!B){if(typeof D=="number"||typeof D=="boolean")return D;if(typeof D=="string")return(0,t._)`${D}`}return(0,t._)`${g}${C}${(0,t.getProperty)(L)}`}e.schemaRefOrVal=y;function p(g){return j(decodeURIComponent(g))}e.unescapeFragment=p;function h(g){return encodeURIComponent(v(g))}e.escapeFragment=h;function v(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=v;function j(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=j;function R(g,C){if(Array.isArray(g))for(const D of g)C(D);else C(g)}e.eachItem=R;function S({mergeNames:g,mergeToName:C,mergeValues:D,resultToName:L}){return(B,se,Y,we)=>{const le=Y===void 0?se:Y instanceof t.Name?(se instanceof t.Name?g(B,se,Y):C(B,se,Y),Y):se instanceof t.Name?(C(B,Y,se),se):D(se,Y);return we===t.Name&&!(le instanceof t.Name)?L(B,le):le}}e.mergeEvaluated={props:S({mergeNames:(g,C,D)=>g.if((0,t._)`${D} !== true && ${C} !== undefined`,()=>{g.if((0,t._)`${C} === true`,()=>g.assign(D,!0),()=>g.assign(D,(0,t._)`${D} || {}`).code((0,t._)`Object.assign(${D}, ${C})`))}),mergeToName:(g,C,D)=>g.if((0,t._)`${D} !== true`,()=>{C===!0?g.assign(D,!0):(g.assign(D,(0,t._)`${D} || {}`),_(g,D,C))}),mergeValues:(g,C)=>g===!0?!0:{...g,...C},resultToName:P}),items:S({mergeNames:(g,C,D)=>g.if((0,t._)`${D} !== true && ${C} !== undefined`,()=>g.assign(D,(0,t._)`${C} === true ? true : ${D} > ${C} ? ${D} : ${C}`)),mergeToName:(g,C,D)=>g.if((0,t._)`${D} !== true`,()=>g.assign(D,C===!0?!0:(0,t._)`${D} > ${C} ? ${D} : ${C}`)),mergeValues:(g,C)=>g===!0?!0:Math.max(g,C),resultToName:(g,C)=>g.var("items",C)})};function P(g,C){if(C===!0)return g.var("props",!0);const D=g.var("props",(0,t._)`{}`);return C!==void 0&&_(g,D,C),D}e.evaluatedPropsToName=P;function _(g,C,D){Object.keys(D).forEach(L=>g.assign((0,t._)`${C}${(0,t.getProperty)(L)}`,!0))}e.setEvaluated=_;const f={};function N(g,C){return g.scopeValue("func",{ref:C,code:f[C.code]||(f[C.code]=new r._Code(C.code))})}e.useFunc=N;var O;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(O=e.Type||(e.Type={}));function I(g,C,D){if(g instanceof t.Name){const L=C===O.Num;return D?L?(0,t._)`"[" + ${g} + "]"`:(0,t._)`"['" + ${g} + "']"`:L?(0,t._)`"/" + ${g}`:(0,t._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return D?(0,t.getProperty)(g).toString():"/"+v(g)}e.getErrorPath=I;function A(g,C,D=g.opts.strictSchema){if(D){if(C=`strict mode: ${C}`,D===!0)throw new Error(C);g.self.logger.warn(C)}}e.checkStrictMode=A})(x);var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0});const pe=J,xa={data:new pe.Name("data"),valCxt:new pe.Name("valCxt"),instancePath:new pe.Name("instancePath"),parentData:new pe.Name("parentData"),parentDataProperty:new pe.Name("parentDataProperty"),rootData:new pe.Name("rootData"),dynamicAnchors:new pe.Name("dynamicAnchors"),vErrors:new pe.Name("vErrors"),errors:new pe.Name("errors"),this:new pe.Name("this"),self:new pe.Name("self"),scope:new pe.Name("scope"),json:new pe.Name("json"),jsonPos:new pe.Name("jsonPos"),jsonLen:new pe.Name("jsonLen"),jsonPart:new pe.Name("jsonPart")};Fe.default=xa;(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,r=x,a=Fe;e.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},e.keyword$DataError={message:({keyword:_,schemaType:f})=>f?(0,t.str)`"${_}" keyword must be ${f} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function n(_,f=e.keywordError,N,O){const{it:I}=_,{gen:A,compositeRule:g,allErrors:C}=I,D=v(_,f,N);O??(g||C)?y(A,D):p(I,(0,t._)`[${D}]`)}e.reportError=n;function i(_,f=e.keywordError,N){const{it:O}=_,{gen:I,compositeRule:A,allErrors:g}=O,C=v(_,f,N);y(I,C),A||g||p(O,a.default.vErrors)}e.reportExtraError=i;function l(_,f){_.assign(a.default.errors,f),_.if((0,t._)`${a.default.vErrors} !== null`,()=>_.if(f,()=>_.assign((0,t._)`${a.default.vErrors}.length`,f),()=>_.assign(a.default.vErrors,null)))}e.resetErrorsCount=l;function m({gen:_,keyword:f,schemaValue:N,data:O,errsCount:I,it:A}){if(I===void 0)throw new Error("ajv implementation error");const g=_.name("err");_.forRange("i",I,a.default.errors,C=>{_.const(g,(0,t._)`${a.default.vErrors}[${C}]`),_.if((0,t._)`${g}.instancePath === undefined`,()=>_.assign((0,t._)`${g}.instancePath`,(0,t.strConcat)(a.default.instancePath,A.errorPath))),_.assign((0,t._)`${g}.schemaPath`,(0,t.str)`${A.errSchemaPath}/${f}`),A.opts.verbose&&(_.assign((0,t._)`${g}.schema`,N),_.assign((0,t._)`${g}.data`,O))})}e.extendErrors=m;function y(_,f){const N=_.const("err",f);_.if((0,t._)`${a.default.vErrors} === null`,()=>_.assign(a.default.vErrors,(0,t._)`[${N}]`),(0,t._)`${a.default.vErrors}.push(${N})`),_.code((0,t._)`${a.default.errors}++`)}function p(_,f){const{gen:N,validateName:O,schemaEnv:I}=_;I.$async?N.throw((0,t._)`new ${_.ValidationError}(${f})`):(N.assign((0,t._)`${O}.errors`,f),N.return(!1))}const h={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 v(_,f,N){const{createErrors:O}=_.it;return O===!1?(0,t._)`{}`:j(_,f,N)}function j(_,f,N={}){const{gen:O,it:I}=_,A=[R(I,N),S(_,N)];return P(_,f,A),O.object(...A)}function R({errorPath:_},{instancePath:f}){const N=f?(0,t.str)`${_}${(0,r.getErrorPath)(f,r.Type.Str)}`:_;return[a.default.instancePath,(0,t.strConcat)(a.default.instancePath,N)]}function S({keyword:_,it:{errSchemaPath:f}},{schemaPath:N,parentSchema:O}){let I=O?f:(0,t.str)`${f}/${_}`;return N&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(N,r.Type.Str)}`),[h.schemaPath,I]}function P(_,{params:f,message:N},O){const{keyword:I,data:A,schemaValue:g,it:C}=_,{opts:D,propertyName:L,topSchemaRef:B,schemaPath:se}=C;O.push([h.keyword,I],[h.params,typeof f=="function"?f(_):f||(0,t._)`{}`]),D.messages&&O.push([h.message,typeof N=="function"?N(_):N]),D.verbose&&O.push([h.schema,g],[h.parentSchema,(0,t._)`${B}${se}`],[a.default.data,A]),L&&O.push([h.propertyName,L])}})(Lt);Object.defineProperty(gt,"__esModule",{value:!0});gt.boolOrEmptySchema=gt.topBoolOrEmptySchema=void 0;const es=Lt,ts=J,rs=Fe,ns={message:"boolean schema is false"};function as(e){const{gen:t,schema:r,validateName:a}=e;r===!1?Zn(e,!1):typeof r=="object"&&r.$async===!0?t.return(rs.default.data):(t.assign((0,ts._)`${a}.errors`,null),t.return(!0))}gt.topBoolOrEmptySchema=as;function ss(e,t){const{gen:r,schema:a}=e;a===!1?(r.var(t,!1),Zn(e)):r.var(t,!0)}gt.boolOrEmptySchema=ss;function Zn(e,t){const{gen:r,data:a}=e,n={gen:r,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,es.reportError)(n,ns,void 0,t)}var Ht={},at={};Object.defineProperty(at,"__esModule",{value:!0});at.getRules=at.isJSONType=void 0;const os=["string","number","integer","boolean","null","object","array"],is=new Set(os);function cs(e){return typeof e=="string"&&is.has(e)}at.isJSONType=cs;function us(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}at.getRules=us;var qe={};Object.defineProperty(qe,"__esModule",{value:!0});qe.shouldUseRule=qe.shouldUseGroup=qe.schemaHasRulesForType=void 0;function ls({schema:e,self:t},r){const a=t.RULES.types[r];return a&&a!==!0&&xn(e,a)}qe.schemaHasRulesForType=ls;function xn(e,t){return t.rules.some(r=>ea(e,r))}qe.shouldUseGroup=xn;function ea(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(a=>e[a]!==void 0))}qe.shouldUseRule=ea;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=at,r=qe,a=Lt,n=J,i=x;var l;(function(O){O[O.Correct=0]="Correct",O[O.Wrong=1]="Wrong"})(l=e.DataType||(e.DataType={}));function m(O){const I=y(O.type);if(I.includes("null")){if(O.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!I.length&&O.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');O.nullable===!0&&I.push("null")}return I}e.getSchemaTypes=m;function y(O){const I=Array.isArray(O)?O:O?[O]:[];if(I.every(t.isJSONType))return I;throw new Error("type must be JSONType or JSONType[]: "+I.join(","))}e.getJSONTypes=y;function p(O,I){const{gen:A,data:g,opts:C}=O,D=v(I,C.coerceTypes),L=I.length>0&&!(D.length===0&&I.length===1&&(0,r.schemaHasRulesForType)(O,I[0]));if(L){const B=P(I,g,C.strictNumbers,l.Wrong);A.if(B,()=>{D.length?j(O,I,D):f(O)})}return L}e.coerceAndCheckDataType=p;const h=new Set(["string","number","integer","boolean","null"]);function v(O,I){return I?O.filter(A=>h.has(A)||I==="array"&&A==="array"):[]}function j(O,I,A){const{gen:g,data:C,opts:D}=O,L=g.let("dataType",(0,n._)`typeof ${C}`),B=g.let("coerced",(0,n._)`undefined`);D.coerceTypes==="array"&&g.if((0,n._)`${L} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>g.assign(C,(0,n._)`${C}[0]`).assign(L,(0,n._)`typeof ${C}`).if(P(I,C,D.strictNumbers),()=>g.assign(B,C))),g.if((0,n._)`${B} !== undefined`);for(const Y of A)(h.has(Y)||Y==="array"&&D.coerceTypes==="array")&&se(Y);g.else(),f(O),g.endIf(),g.if((0,n._)`${B} !== undefined`,()=>{g.assign(C,B),R(O,B)});function se(Y){switch(Y){case"string":g.elseIf((0,n._)`${L} == "number" || ${L} == "boolean"`).assign(B,(0,n._)`"" + ${C}`).elseIf((0,n._)`${C} === null`).assign(B,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${L} == "boolean" || ${C} === null
|| (${L} == "string" && ${C} && ${C} == +${C})`).assign(B,(0,n._)`+${C}`);return;case"integer":g.elseIf((0,n._)`${L} === "boolean" || ${C} === null
|| (${L} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign(B,(0,n._)`+${C}`);return;case"boolean":g.elseIf((0,n._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign(B,!1).elseIf((0,n._)`${C} === "true" || ${C} === 1`).assign(B,!0);return;case"null":g.elseIf((0,n._)`${C} === "" || ${C} === 0 || ${C} === false`),g.assign(B,null);return;case"array":g.elseIf((0,n._)`${L} === "string" || ${L} === "number"
|| ${L} === "boolean" || ${C} === null`).assign(B,(0,n._)`[${C}]`)}}}function R({gen:O,parentData:I,parentDataProperty:A},g){O.if((0,n._)`${I} !== undefined`,()=>O.assign((0,n._)`${I}[${A}]`,g))}function S(O,I,A,g=l.Correct){const C=g===l.Correct?n.operators.EQ:n.operators.NEQ;let D;switch(O){case"null":return(0,n._)`${I} ${C} null`;case"array":D=(0,n._)`Array.isArray(${I})`;break;case"object":D=(0,n._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":D=L((0,n._)`!(${I} % 1) && !isNaN(${I})`);break;case"number":D=L();break;default:return(0,n._)`typeof ${I} ${C} ${O}`}return g===l.Correct?D:(0,n.not)(D);function L(B=n.nil){return(0,n.and)((0,n._)`typeof ${I} == "number"`,B,A?(0,n._)`isFinite(${I})`:n.nil)}}e.checkDataType=S;function P(O,I,A,g){if(O.length===1)return S(O[0],I,A,g);let C;const D=(0,i.toHash)(O);if(D.array&&D.object){const L=(0,n._)`typeof ${I} != "object"`;C=D.null?L:(0,n._)`!${I} || ${L}`,delete D.null,delete D.array,delete D.object}else C=n.nil;D.number&&delete D.integer;for(const L in D)C=(0,n.and)(C,S(L,I,A,g));return C}e.checkDataTypes=P;const _={message:({schema:O})=>`must be ${O}`,params:({schema:O,schemaValue:I})=>typeof O=="string"?(0,n._)`{type: ${O}}`:(0,n._)`{type: ${I}}`};function f(O){const I=N(O);(0,a.reportError)(I,_)}e.reportTypeError=f;function N(O){const{gen:I,data:A,schema:g}=O,C=(0,i.schemaRefOrVal)(O,g,"type");return{gen:I,keyword:"type",data:A,schema:g.type,schemaCode:C,schemaValue:C,parentSchema:g,params:{},it:O}}})(Ht);var fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.assignDefaults=void 0;const mt=J,ds=x;function fs(e,t){const{properties:r,items:a}=e.schema;if(t==="object"&&r)for(const n in r)In(e,n,r[n].default);else t==="array"&&Array.isArray(a)&&a.forEach((n,i)=>In(e,i,n.default))}fr.assignDefaults=fs;function In(e,t,r){const{gen:a,compositeRule:n,data:i,opts:l}=e;if(r===void 0)return;const m=(0,mt._)`${i}${(0,mt.getProperty)(t)}`;if(n){(0,ds.checkStrictMode)(e,`default is ignored for: ${m}`);return}let y=(0,mt._)`${m} === undefined`;l.useDefaults==="empty"&&(y=(0,mt._)`${y} || ${m} === null || ${m} === ""`),a.if(y,(0,mt._)`${m} = ${(0,mt.stringify)(r)}`)}var Ve={},G={};Object.defineProperty(G,"__esModule",{value:!0});G.validateUnion=G.validateArray=G.usePattern=G.callValidateCode=G.schemaProperties=G.allSchemaProperties=G.noPropertyInData=G.propertyInData=G.isOwnProperty=G.hasPropFunc=G.reportMissingProp=G.checkMissingProp=G.checkReportMissingProp=void 0;const re=J,jr=x,Le=Fe,hs=x;function ps(e,t){const{gen:r,data:a,it:n}=e;r.if(Dr(r,a,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,re._)`${t}`},!0),e.error()})}G.checkReportMissingProp=ps;function ms({gen:e,data:t,it:{opts:r}},a,n){return(0,re.or)(...a.map(i=>(0,re.and)(Dr(e,t,i,r.ownProperties),(0,re._)`${n} = ${i}`)))}G.checkMissingProp=ms;function ys(e,t){e.setParams({missingProperty:t},!0),e.error()}G.reportMissingProp=ys;function ta(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,re._)`Object.prototype.hasOwnProperty`})}G.hasPropFunc=ta;function kr(e,t,r){return(0,re._)`${ta(e)}.call(${t}, ${r})`}G.isOwnProperty=kr;function vs(e,t,r,a){const n=(0,re._)`${t}${(0,re.getProperty)(r)} !== undefined`;return a?(0,re._)`${n} && ${kr(e,t,r)}`:n}G.propertyInData=vs;function Dr(e,t,r,a){const n=(0,re._)`${t}${(0,re.getProperty)(r)} === undefined`;return a?(0,re.or)(n,(0,re.not)(kr(e,t,r))):n}G.noPropertyInData=Dr;function ra(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}G.allSchemaProperties=ra;function $s(e,t){return ra(t).filter(r=>!(0,jr.alwaysValidSchema)(e,t[r]))}G.schemaProperties=$s;function _s({schemaCode:e,data:t,it:{gen:r,topSchemaRef:a,schemaPath:n,errorPath:i},it:l},m,y,p){const h=p?(0,re._)`${e}, ${t}, ${a}${n}`:t,v=[[Le.default.instancePath,(0,re.strConcat)(Le.default.instancePath,i)],[Le.default.parentData,l.parentData],[Le.default.parentDataProperty,l.parentDataProperty],[Le.default.rootData,Le.default.rootData]];l.opts.dynamicRef&&v.push([Le.default.dynamicAnchors,Le.default.dynamicAnchors]);const j=(0,re._)`${h}, ${r.object(...v)}`;return y!==re.nil?(0,re._)`${m}.call(${y}, ${j})`:(0,re._)`${m}(${j})`}G.callValidateCode=_s;const gs=(0,re._)`new RegExp`;function ws({gen:e,it:{opts:t}},r){const a=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,a);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,re._)`${n.code==="new RegExp"?gs:(0,hs.useFunc)(e,n)}(${r}, ${a})`})}G.usePattern=ws;function Es(e){const{gen:t,data:r,keyword:a,it:n}=e,i=t.name("valid");if(n.allErrors){const m=t.let("valid",!0);return l(()=>t.assign(m,!1)),m}return t.var(i,!0),l(()=>t.break()),i;function l(m){const y=t.const("len",(0,re._)`${r}.length`);t.forRange("i",0,y,p=>{e.subschema({keyword:a,dataProp:p,dataPropType:jr.Type.Num},i),t.if((0,re.not)(i),m)})}}G.validateArray=Es;function bs(e){const{gen:t,schema:r,keyword:a,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(y=>(0,jr.alwaysValidSchema)(n,y))&&!n.opts.unevaluated)return;const l=t.let("valid",!1),m=t.name("_valid");t.block(()=>r.forEach((y,p)=>{const h=e.subschema({keyword:a,schemaProp:p,compositeRule:!0},m);t.assign(l,(0,re._)`${l} || ${m}`),e.mergeValidEvaluated(h,m)||t.if((0,re.not)(l))})),e.result(l,()=>e.reset(),()=>e.error(!0))}G.validateUnion=bs;Object.defineProperty(Ve,"__esModule",{value:!0});Ve.validateKeywordUsage=Ve.validSchemaType=Ve.funcKeywordCode=Ve.macroKeywordCode=void 0;const ye=J,tt=Fe,Ss=G,Ps=Lt;function Ns(e,t){const{gen:r,keyword:a,schema:n,parentSchema:i,it:l}=e,m=t.macro.call(l.self,n,i,l),y=na(r,a,m);l.opts.validateSchema!==!1&&l.self.validateSchema(m,!0);const p=r.name("valid");e.subschema({schema:m,schemaPath:ye.nil,errSchemaPath:`${l.errSchemaPath}/${a}`,topSchemaRef:y,compositeRule:!0},p),e.pass(p,()=>e.error(!0))}Ve.macroKeywordCode=Ns;function Os(e,t){var r;const{gen:a,keyword:n,schema:i,parentSchema:l,$data:m,it:y}=e;Ts(y,t);const p=!m&&t.compile?t.compile.call(y.self,i,l,y):t.validate,h=na(a,n,p),v=a.let("valid");e.block$data(v,j),e.ok((r=t.valid)!==null&&r!==void 0?r:v);function j(){if(t.errors===!1)P(),t.modifying&&jn(e),_(()=>e.error());else{const f=t.async?R():S();t.modifying&&jn(e),_(()=>Cs(e,f))}}function R(){const f=a.let("ruleErrs",null);return a.try(()=>P((0,ye._)`await `),N=>a.assign(v,!1).if((0,ye._)`${N} instanceof ${y.ValidationError}`,()=>a.assign(f,(0,ye._)`${N}.errors`),()=>a.throw(N))),f}function S(){const f=(0,ye._)`${h}.errors`;return a.assign(f,null),P(ye.nil),f}function P(f=t.async?(0,ye._)`await `:ye.nil){const N=y.opts.passContext?tt.default.this:tt.default.self,O=!("compile"in t&&!m||t.schema===!1);a.assign(v,(0,ye._)`${f}${(0,Ss.callValidateCode)(e,h,N,O)}`,t.modifying)}function _(f){var N;a.if((0,ye.not)((N=t.valid)!==null&&N!==void 0?N:v),f)}}Ve.funcKeywordCode=Os;function jn(e){const{gen:t,data:r,it:a}=e;t.if(a.parentData,()=>t.assign(r,(0,ye._)`${a.parentData}[${a.parentDataProperty}]`))}function Cs(e,t){const{gen:r}=e;r.if((0,ye._)`Array.isArray(${t})`,()=>{r.assign(tt.default.vErrors,(0,ye._)`${tt.default.vErrors} === null ? ${t} : ${tt.default.vErrors}.concat(${t})`).assign(tt.default.errors,(0,ye._)`${tt.default.vErrors}.length`),(0,Ps.extendErrors)(e)},()=>e.error())}function Ts({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function na(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ye.stringify)(r)})}function Rs(e,t,r=!1){return!t.length||t.some(a=>a==="array"?Array.isArray(e):a==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==a||r&&typeof e>"u")}Ve.validSchemaType=Rs;function Is({schema:e,opts:t,self:r,errSchemaPath:a},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");const l=n.dependencies;if(l!=null&&l.some(m=>!Object.prototype.hasOwnProperty.call(e,m)))throw new Error(`parent schema must have dependencies of ${i}: ${l.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){const y=`keyword "${i}" value is invalid at path "${a}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(y);else throw new Error(y)}}Ve.validateKeywordUsage=Is;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.extendSubschemaMode=Be.extendSubschemaData=Be.getSubschema=void 0;const Me=J,aa=x;function js(e,{keyword:t,schemaProp:r,schema:a,schemaPath:n,errSchemaPath:i,topSchemaRef:l}){if(t!==void 0&&a!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const m=e.schema[t];return r===void 0?{schema:m,schemaPath:(0,Me._)`${e.schemaPath}${(0,Me.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:m[r],schemaPath:(0,Me._)`${e.schemaPath}${(0,Me.getProperty)(t)}${(0,Me.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,aa.escapeFragment)(r)}`}}if(a!==void 0){if(n===void 0||i===void 0||l===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:n,topSchemaRef:l,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Be.getSubschema=js;function ks(e,t,{dataProp:r,dataPropType:a,data:n,dataTypes:i,propertyName:l}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=t;if(r!==void 0){const{errorPath:p,dataPathArr:h,opts:v}=t,j=m.let("data",(0,Me._)`${t.data}${(0,Me.getProperty)(r)}`,!0);y(j),e.errorPath=(0,Me.str)`${p}${(0,aa.getErrorPath)(r,a,v.jsPropertySyntax)}`,e.parentDataProperty=(0,Me._)`${r}`,e.dataPathArr=[...h,e.parentDataProperty]}if(n!==void 0){const p=n instanceof Me.Name?n:m.let("data",n,!0);y(p),l!==void 0&&(e.propertyName=l)}i&&(e.dataTypes=i);function y(p){e.data=p,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,p]}}Be.extendSubschemaData=ks;function Ds(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:a,createErrors:n,allErrors:i}){a!==void 0&&(e.compositeRule=a),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Be.extendSubschemaMode=Ds;var he={},sa=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var a,n,i;if(Array.isArray(t)){if(a=t.length,a!=r.length)return!1;for(n=a;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),a=i.length,a!==Object.keys(r).length)return!1;for(n=a;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=a;n--!==0;){var l=i[n];if(!e(t[l],r[l]))return!1}return!0}return t!==t&&r!==r},oa={exports:{}},Ge=oa.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var a=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};nr(t,a,n,e,"",e)};Ge.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ge.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ge.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ge.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 nr(e,t,r,a,n,i,l,m,y,p){if(a&&typeof a=="object"&&!Array.isArray(a)){t(a,n,i,l,m,y,p);for(var h in a){var v=a[h];if(Array.isArray(v)){if(h in Ge.arrayKeywords)for(var j=0;j<v.length;j++)nr(e,t,r,v[j],n+"/"+h+"/"+j,i,n,h,a,j)}else if(h in Ge.propsKeywords){if(v&&typeof v=="object")for(var R in v)nr(e,t,r,v[R],n+"/"+h+"/"+As(R),i,n,h,a,R)}else(h in Ge.keywords||e.allKeys&&!(h in Ge.skipKeywords))&&nr(e,t,r,v,n+"/"+h,i,n,h,a)}r(a,n,i,l,m,y,p)}}function As(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var Ms=oa.exports;Object.defineProperty(he,"__esModule",{value:!0});he.getSchemaRefs=he.resolveUrl=he.normalizeId=he._getFullPath=he.getFullPath=he.inlineRef=void 0;const Vs=x,Fs=sa,Us=Ms,qs=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function zs(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Pr(e):t?ia(e)<=t:!1}he.inlineRef=zs;const Ks=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Pr(e){for(const t in e){if(Ks.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Pr)||typeof r=="object"&&Pr(r))return!0}return!1}function ia(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!qs.has(r)&&(typeof e[r]=="object"&&(0,Vs.eachItem)(e[r],a=>t+=ia(a)),t===1/0))return 1/0}return t}function ca(e,t="",r){r!==!1&&(t=$t(t));const a=e.parse(t);return ua(e,a)}he.getFullPath=ca;function ua(e,t){return e.serialize(t).split("#")[0]+"#"}he._getFullPath=ua;const Ls=/#\/?$/;function $t(e){return e?e.replace(Ls,""):""}he.normalizeId=$t;function Hs(e,t,r){return r=$t(r),e.resolve(t,r)}he.resolveUrl=Hs;const Gs=/^[a-z_][-a-z0-9._]*$/i;function Js(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:a}=this.opts,n=$t(e[r]||t),i={"":n},l=ca(a,n,!1),m={},y=new Set;return Us(e,{allKeys:!0},(v,j,R,S)=>{if(S===void 0)return;const P=l+j;let _=i[S];typeof v[r]=="string"&&(_=f.call(this,v[r])),N.call(this,v.$anchor),N.call(this,v.$dynamicAnchor),i[j]=_;function f(O){const I=this.opts.uriResolver.resolve;if(O=$t(_?I(_,O):O),y.has(O))throw h(O);y.add(O);let A=this.refs[O];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?p(v,A.schema,O):O!==$t(P)&&(O[0]==="#"?(p(v,m[O],O),m[O]=v):this.refs[O]=P),O}function N(O){if(typeof O=="string"){if(!Gs.test(O))throw new Error(`invalid anchor "${O}"`);f.call(this,`#${O}`)}}}),m;function p(v,j,R){if(j!==void 0&&!Fs(v,j))throw h(R)}function h(v){return new Error(`reference "${v}" resolves to more than one schema`)}}he.getSchemaRefs=Js;Object.defineProperty(Te,"__esModule",{value:!0});Te.getData=Te.KeywordCxt=Te.validateFunctionCode=void 0;const la=gt,kn=Ht,Ar=qe,ir=Ht,Bs=fr,Vt=Ve,$r=Be,U=J,K=Fe,Ws=he,ze=x,Dt=Lt;function Qs(e){if(ha(e)&&(pa(e),fa(e))){Zs(e);return}da(e,()=>(0,la.topBoolOrEmptySchema)(e))}Te.validateFunctionCode=Qs;function da({gen:e,validateName:t,schema:r,schemaEnv:a,opts:n},i){n.code.es5?e.func(t,(0,U._)`${K.default.data}, ${K.default.valCxt}`,a.$async,()=>{e.code((0,U._)`"use strict"; ${Dn(r,n)}`),Ys(e,n),e.code(i)}):e.func(t,(0,U._)`${K.default.data}, ${Xs(n)}`,a.$async,()=>e.code(Dn(r,n)).code(i))}function Xs(e){return(0,U._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${e.dynamicRef?(0,U._)`, ${K.default.dynamicAnchors}={}`:U.nil}}={}`}function Ys(e,t){e.if(K.default.valCxt,()=>{e.var(K.default.instancePath,(0,U._)`${K.default.valCxt}.${K.default.instancePath}`),e.var(K.default.parentData,(0,U._)`${K.default.valCxt}.${K.default.parentData}`),e.var(K.default.parentDataProperty,(0,U._)`${K.default.valCxt}.${K.default.parentDataProperty}`),e.var(K.default.rootData,(0,U._)`${K.default.valCxt}.${K.default.rootData}`),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,U._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{e.var(K.default.instancePath,(0,U._)`""`),e.var(K.default.parentData,(0,U._)`undefined`),e.var(K.default.parentDataProperty,(0,U._)`undefined`),e.var(K.default.rootData,K.default.data),t.dynamicRef&&e.var(K.default.dynamicAnchors,(0,U._)`{}`)})}function Zs(e){const{schema:t,opts:r,gen:a}=e;da(e,()=>{r.$comment&&t.$comment&&ya(e),no(e),a.let(K.default.vErrors,null),a.let(K.default.errors,0),r.unevaluated&&xs(e),ma(e),oo(e)})}function xs(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,U._)`${r}.evaluated`),t.if((0,U._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,U._)`${e.evaluated}.props`,(0,U._)`undefined`)),t.if((0,U._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,U._)`${e.evaluated}.items`,(0,U._)`undefined`))}function Dn(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,U._)`/*# sourceURL=${r} */`:U.nil}function eo(e,t){if(ha(e)&&(pa(e),fa(e))){to(e,t);return}(0,la.boolOrEmptySchema)(e,t)}function fa({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function ha(e){return typeof e.schema!="boolean"}function to(e,t){const{schema:r,gen:a,opts:n}=e;n.$comment&&r.$comment&&ya(e),ao(e),so(e);const i=a.const("_errs",K.default.errors);ma(e,i),a.var(t,(0,U._)`${i} === ${K.default.errors}`)}function pa(e){(0,ze.checkUnknownRules)(e),ro(e)}function ma(e,t){if(e.opts.jtd)return An(e,[],!1,t);const r=(0,kn.getSchemaTypes)(e.schema),a=(0,kn.coerceAndCheckDataType)(e,r);An(e,r,!a,t)}function ro(e){const{schema:t,errSchemaPath:r,opts:a,self:n}=e;t.$ref&&a.ignoreKeywordsWithRef&&(0,ze.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function no(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,ze.checkStrictMode)(e,"default is ignored in the schema root")}function ao(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Ws.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function so(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function ya({gen:e,schemaEnv:t,schema:r,errSchemaPath:a,opts:n}){const i=r.$comment;if(n.$comment===!0)e.code((0,U._)`${K.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){const l=(0,U.str)`${a}/$comment`,m=e.scopeValue("root",{ref:t.root});e.code((0,U._)`${K.default.self}.opts.$comment(${i}, ${l}, ${m}.schema)`)}}function oo(e){const{gen:t,schemaEnv:r,validateName:a,ValidationError:n,opts:i}=e;r.$async?t.if((0,U._)`${K.default.errors} === 0`,()=>t.return(K.default.data),()=>t.throw((0,U._)`new ${n}(${K.default.vErrors})`)):(t.assign((0,U._)`${a}.errors`,K.default.vErrors),i.unevaluated&&io(e),t.return((0,U._)`${K.default.errors} === 0`))}function io({gen:e,evaluated:t,props:r,items:a}){r instanceof U.Name&&e.assign((0,U._)`${t}.props`,r),a instanceof U.Name&&e.assign((0,U._)`${t}.items`,a)}function An(e,t,r,a){const{gen:n,schema:i,data:l,allErrors:m,opts:y,self:p}=e,{RULES:h}=p;if(i.$ref&&(y.ignoreKeywordsWithRef||!(0,ze.schemaHasRulesButRef)(i,h))){n.block(()=>_a(e,"$ref",h.all.$ref.definition));return}y.jtd||co(e,t),n.block(()=>{for(const j of h.rules)v(j);v(h.post)});function v(j){(0,Ar.shouldUseGroup)(i,j)&&(j.type?(n.if((0,ir.checkDataType)(j.type,l,y.strictNumbers)),Mn(e,j),t.length===1&&t[0]===j.type&&r&&(n.else(),(0,ir.reportTypeError)(e)),n.endIf()):Mn(e,j),m||n.if((0,U._)`${K.default.errors} === ${a||0}`))}}function Mn(e,t){const{gen:r,schema:a,opts:{useDefaults:n}}=e;n&&(0,Bs.assignDefaults)(e,t.type),r.block(()=>{for(const i of t.rules)(0,Ar.shouldUseRule)(a,i)&&_a(e,i.keyword,i.definition,t.type)})}function co(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(uo(e,t),e.opts.allowUnionTypes||lo(e,t),fo(e,e.dataTypes))}function uo(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{va(e.dataTypes,r)||Mr(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),po(e,t)}}function lo(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Mr(e,"use allowUnionTypes to allow union type keyword")}function fo(e,t){const r=e.self.RULES.all;for(const a in r){const n=r[a];if(typeof n=="object"&&(0,Ar.shouldUseRule)(e.schema,n)){const{type:i}=n.definition;i.length&&!i.some(l=>ho(t,l))&&Mr(e,`missing type "${i.join(",")}" for keyword "${a}"`)}}}function ho(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function va(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function po(e,t){const r=[];for(const a of e.dataTypes)va(t,a)?r.push(a):t.includes("integer")&&a==="number"&&r.push("integer");e.dataTypes=r}function Mr(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,ze.checkStrictMode)(e,t,e.opts.strictTypes)}class $a{constructor(t,r,a){if((0,Vt.validateKeywordUsage)(t,r,a),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=a,this.data=t.data,this.schema=t.schema[a],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ze.schemaRefOrVal)(t,this.schema,a,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",ga(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Vt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${a} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",K.default.errors))}result(t,r,a){this.failResult((0,U.not)(t),r,a)}failResult(t,r,a){this.gen.if(t),a?a():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,U.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,U._)`${r} !== undefined && (${(0,U.or)(this.invalid$data(),t)})`)}error(t,r,a){if(r){this.setParams(r),this._error(t,a),this.setParams({});return}this._error(t,a)}_error(t,r){(t?Dt.reportExtraError:Dt.reportError)(this,this.def.error,r)}$dataError(){(0,Dt.reportError)(this,this.def.$dataError||Dt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Dt.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,a=U.nil){this.gen.block(()=>{this.check$data(t,a),r()})}check$data(t=U.nil,r=U.nil){if(!this.$data)return;const{gen:a,schemaCode:n,schemaType:i,def:l}=this;a.if((0,U.or)((0,U._)`${n} === undefined`,r)),t!==U.nil&&a.assign(t,!0),(i.length||l.validateSchema)&&(a.elseIf(this.invalid$data()),this.$dataError(),t!==U.nil&&a.assign(t,!1)),a.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:a,def:n,it:i}=this;return(0,U.or)(l(),m());function l(){if(a.length){if(!(r instanceof U.Name))throw new Error("ajv implementation error");const y=Array.isArray(a)?a:[a];return(0,U._)`${(0,ir.checkDataTypes)(y,r,i.opts.strictNumbers,ir.DataType.Wrong)}`}return U.nil}function m(){if(n.validateSchema){const y=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,U._)`!${y}(${r})`}return U.nil}}subschema(t,r){const a=(0,$r.getSubschema)(this.it,t);(0,$r.extendSubschemaData)(a,this.it,t),(0,$r.extendSubschemaMode)(a,t);const n={...this.it,...a,items:void 0,props:void 0};return eo(n,r),n}mergeEvaluated(t,r){const{it:a,gen:n}=this;a.opts.unevaluated&&(a.props!==!0&&t.props!==void 0&&(a.props=ze.mergeEvaluated.props(n,t.props,a.props,r)),a.items!==!0&&t.items!==void 0&&(a.items=ze.mergeEvaluated.items(n,t.items,a.items,r)))}mergeValidEvaluated(t,r){const{it:a,gen:n}=this;if(a.opts.unevaluated&&(a.props!==!0||a.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,U.Name)),!0}}Te.KeywordCxt=$a;function _a(e,t,r,a){const n=new $a(e,r,t);"code"in r?r.code(n,a):n.$data&&r.validate?(0,Vt.funcKeywordCode)(n,r):"macro"in r?(0,Vt.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Vt.funcKeywordCode)(n,r)}const mo=/^\/(?:[^~]|~0|~1)*$/,yo=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ga(e,{dataLevel:t,dataNames:r,dataPathArr:a}){let n,i;if(e==="")return K.default.rootData;if(e[0]==="/"){if(!mo.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=K.default.rootData}else{const p=yo.exec(e);if(!p)throw new Error(`Invalid JSON-pointer: ${e}`);const h=+p[1];if(n=p[2],n==="#"){if(h>=t)throw new Error(y("property/index",h));return a[t-h]}if(h>t)throw new Error(y("data",h));if(i=r[t-h],!n)return i}let l=i;const m=n.split("/");for(const p of m)p&&(i=(0,U._)`${i}${(0,U.getProperty)((0,ze.unescapeJsonPointer)(p))}`,l=(0,U._)`${l} && ${i}`);return l;function y(p,h){return`Cannot access ${p} ${h} levels up, current level is ${t}`}}Te.getData=ga;var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});class vo extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Gt.default=vo;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});const _r=he;class $o extends Error{constructor(t,r,a,n){super(n||`can't resolve reference ${a} from id ${r}`),this.missingRef=(0,_r.resolveUrl)(t,r,a),this.missingSchema=(0,_r.normalizeId)((0,_r.getFullPath)(t,this.missingRef))}}Jt.default=$o;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});_e.resolveSchema=_e.getCompilingSchema=_e.resolveRef=_e.compileSchema=_e.SchemaEnv=void 0;const Pe=J,_o=Gt,et=Fe,Ce=he,Vn=x,go=Te;class hr{constructor(t){var r;this.refs={},this.dynamicAnchors={};let a;typeof t.schema=="object"&&(a=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ce.normalizeId)(a==null?void 0:a[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=a==null?void 0:a.$async,this.refs={}}}_e.SchemaEnv=hr;function Vr(e){const t=wa.call(this,e);if(t)return t;const r=(0,Ce.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:n}=this.opts.code,{ownProperties:i}=this.opts,l=new Pe.CodeGen(this.scope,{es5:a,lines:n,ownProperties:i});let m;e.$async&&(m=l.scopeValue("Error",{ref:_o.default,code:(0,Pe._)`require("ajv/dist/runtime/validation_error").default`}));const y=l.scopeName("validate");e.validateName=y;const p={gen:l,allErrors:this.opts.allErrors,data:et.default.data,parentData:et.default.parentData,parentDataProperty:et.default.parentDataProperty,dataNames:[et.default.data],dataPathArr:[Pe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Pe.stringify)(e.schema)}:{ref:e.schema}),validateName:y,ValidationError:m,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Pe.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Pe._)`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,go.validateFunctionCode)(p),l.optimize(this.opts.code.optimize);const v=l.toString();h=`${l.scopeRefs(et.default.scope)}return ${v}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const R=new Function(`${et.default.self}`,`${et.default.scope}`,h)(this,this.scope.get());if(this.scope.value(y,{ref:R}),R.errors=null,R.schema=e.schema,R.schemaEnv=e,e.$async&&(R.$async=!0),this.opts.code.source===!0&&(R.source={validateName:y,validateCode:v,scopeValues:l._values}),this.opts.unevaluated){const{props:S,items:P}=p;R.evaluated={props:S instanceof Pe.Name?void 0:S,items:P instanceof Pe.Name?void 0:P,dynamicProps:S instanceof Pe.Name,dynamicItems:P instanceof Pe.Name},R.source&&(R.source.evaluated=(0,Pe.stringify)(R.evaluated))}return e.validate=R,e}catch(v){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),v}finally{this._compilations.delete(e)}}_e.compileSchema=Vr;function wo(e,t,r){var a;r=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let i=So.call(this,e,r);if(i===void 0){const l=(a=e.localRefs)===null||a===void 0?void 0:a[r],{schemaId:m}=this.opts;l&&(i=new hr({schema:l,schemaId:m,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=Eo.call(this,i)}_e.resolveRef=wo;function Eo(e){return(0,Ce.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Vr.call(this,e)}function wa(e){for(const t of this._compilations)if(bo(t,e))return t}_e.getCompilingSchema=wa;function bo(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function So(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||pr.call(this,e,t)}function pr(e,t){const r=this.opts.uriResolver.parse(t),a=(0,Ce._getFullPath)(this.opts.uriResolver,r);let n=(0,Ce.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&a===n)return gr.call(this,r,e);const i=(0,Ce.normalizeId)(a),l=this.refs[i]||this.schemas[i];if(typeof l=="string"){const m=pr.call(this,e,l);return typeof(m==null?void 0:m.schema)!="object"?void 0:gr.call(this,r,m)}if(typeof(l==null?void 0:l.schema)=="object"){if(l.validate||Vr.call(this,l),i===(0,Ce.normalizeId)(t)){const{schema:m}=l,{schemaId:y}=this.opts,p=m[y];return p&&(n=(0,Ce.resolveUrl)(this.opts.uriResolver,n,p)),new hr({schema:m,schemaId:y,root:e,baseId:n})}return gr.call(this,r,l)}}_e.resolveSchema=pr;const Po=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function gr(e,{baseId:t,schema:r,root:a}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const m of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const y=r[(0,Vn.unescapeFragment)(m)];if(y===void 0)return;r=y;const p=typeof r=="object"&&r[this.opts.schemaId];!Po.has(m)&&p&&(t=(0,Ce.resolveUrl)(this.opts.uriResolver,t,p))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Vn.schemaHasRulesButRef)(r,this.RULES)){const m=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=pr.call(this,a,m)}const{schemaId:l}=this.opts;if(i=i||new hr({schema:r,schemaId:l,root:a,baseId:t}),i.schema!==i.root.schema)return i}const No="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Oo="Meta-schema for $data reference (JSON AnySchema extension proposal)",Co="object",To=["$data"],Ro={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Io=!1,jo={$id:No,description:Oo,type:Co,required:To,properties:Ro,additionalProperties:Io};var Fr={},Nr={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,a){a(t)})(La,function(r){function a(){for(var c=arguments.length,o=Array(c),d=0;d<c;d++)o[d]=arguments[d];if(o.length>1){o[0]=o[0].slice(0,-1);for(var b=o.length-1,E=1;E<b;++E)o[E]=o[E].slice(1,-1);return o[b]=o[b].slice(1),o.join("")}else return o[0]}function n(c){return"(?:"+c+")"}function i(c){return c===void 0?"undefined":c===null?"null":Object.prototype.toString.call(c).split(" ").pop().split("]").shift().toLowerCase()}function l(c){return c.toUpperCase()}function m(c){return c!=null?c instanceof Array?c:typeof c.length!="number"||c.split||c.setInterval||c.call?[c]:Array.prototype.slice.call(c):[]}function y(c,o){var d=c;if(o)for(var b in o)d[b]=o[b];return d}function p(c){var o="[A-Za-z]",d="[0-9]",b=a(d,"[A-Fa-f]"),E=n(n("%[EFef]"+b+"%"+b+b+"%"+b+b)+"|"+n("%[89A-Fa-f]"+b+"%"+b+b)+"|"+n("%"+b+b)),q="[\\:\\/\\?\\#\\[\\]\\@]",z="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Z=a(q,z),te=c?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ie=c?"[\\uE000-\\uF8FF]":"[]",Q=a(o,d,"[\\-\\.\\_\\~]",te);n(o+a(o,d,"[\\+\\-\\.]")+"*"),n(n(E+"|"+a(Q,z,"[\\:]"))+"*");var ee=n(n("25[0-5]")+"|"+n("2[0-4]"+d)+"|"+n("1"+d+d)+"|"+n("0?[1-9]"+d)+"|0?0?"+d),ce=n(ee+"\\."+ee+"\\."+ee+"\\."+ee),H=n(b+"{1,4}"),ne=n(n(H+"\\:"+H)+"|"+ce),de=n(n(H+"\\:")+"{6}"+ne),ae=n("\\:\\:"+n(H+"\\:")+"{5}"+ne),Ke=n(n(H)+"?\\:\\:"+n(H+"\\:")+"{4}"+ne),ke=n(n(n(H+"\\:")+"{0,1}"+H)+"?\\:\\:"+n(H+"\\:")+"{3}"+ne),De=n(n(n(H+"\\:")+"{0,2}"+H)+"?\\:\\:"+n(H+"\\:")+"{2}"+ne),pt=n(n(n(H+"\\:")+"{0,3}"+H)+"?\\:\\:"+H+"\\:"+ne),Ze=n(n(n(H+"\\:")+"{0,4}"+H)+"?\\:\\:"+ne),be=n(n(n(H+"\\:")+"{0,5}"+H)+"?\\:\\:"+H),Ae=n(n(n(H+"\\:")+"{0,6}"+H)+"?\\:\\:"),xe=n([de,ae,Ke,ke,De,pt,Ze,be,Ae].join("|")),Ue=n(n(Q+"|"+E)+"+");n("[vV]"+b+"+\\."+a(Q,z,"[\\:]")+"+"),n(n(E+"|"+a(Q,z))+"*");var jt=n(E+"|"+a(Q,z,"[\\:\\@]"));return n(n(E+"|"+a(Q,z,"[\\@]"))+"+"),n(n(jt+"|"+a("[\\/\\?]",ie))+"*"),{NOT_SCHEME:new RegExp(a("[^]",o,d,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(a("[^\\%\\:]",Q,z),"g"),NOT_HOST:new RegExp(a("[^\\%\\[\\]\\:]",Q,z),"g"),NOT_PATH:new RegExp(a("[^\\%\\/\\:\\@]",Q,z),"g"),NOT_PATH_NOSCHEME:new RegExp(a("[^\\%\\/\\@]",Q,z),"g"),NOT_QUERY:new RegExp(a("[^\\%]",Q,z,"[\\:\\@\\/\\?]",ie),"g"),NOT_FRAGMENT:new RegExp(a("[^\\%]",Q,z,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(a("[^]",Q,z),"g"),UNRESERVED:new RegExp(Q,"g"),OTHER_CHARS:new RegExp(a("[^\\%]",Q,Z),"g"),PCT_ENCODED:new RegExp(E,"g"),IPV4ADDRESS:new RegExp("^("+ce+")$"),IPV6ADDRESS:new RegExp("^\\[?("+xe+")"+n(n("\\%25|\\%(?!"+b+"{2})")+"("+Ue+")")+"?\\]?$")}}var h=p(!1),v=p(!0),j=function(){function c(o,d){var b=[],E=!0,q=!1,z=void 0;try{for(var Z=o[Symbol.iterator](),te;!(E=(te=Z.next()).done)&&(b.push(te.value),!(d&&b.length===d));E=!0);}catch(ie){q=!0,z=ie}finally{try{!E&&Z.return&&Z.return()}finally{if(q)throw z}}return b}return function(o,d){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return c(o,d);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),R=function(c){if(Array.isArray(c)){for(var o=0,d=Array(c.length);o<c.length;o++)d[o]=c[o];return d}else return Array.from(c)},S=2147483647,P=36,_=1,f=26,N=38,O=700,I=72,A=128,g="-",C=/^xn--/,D=/[^\0-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},se=P-_,Y=Math.floor,we=String.fromCharCode;function le(c){throw new RangeError(B[c])}function We(c,o){for(var d=[],b=c.length;b--;)d[b]=o(c[b]);return d}function Qe(c,o){var d=c.split("@"),b="";d.length>1&&(b=d[0]+"@",c=d[1]),c=c.replace(L,".");var E=c.split("."),q=We(E,o).join(".");return b+q}function ot(c){for(var o=[],d=0,b=c.length;d<b;){var E=c.charCodeAt(d++);if(E>=55296&&E<=56319&&d<b){var q=c.charCodeAt(d++);(q&64512)==56320?o.push(((E&1023)<<10)+(q&1023)+65536):(o.push(E),d--)}else o.push(E)}return o}var St=function(o){return String.fromCodePoint.apply(String,R(o))},it=function(o){return o-48<10?o-22:o-65<26?o-65:o-97<26?o-97:P},M=function(o,d){return o+22+75*(o<26)-((d!=0)<<5)},$=function(o,d,b){var E=0;for(o=b?Y(o/O):o>>1,o+=Y(o/d);o>se*f>>1;E+=P)o=Y(o/se);return Y(E+(se+1)*o/(o+N))},k=function(o){var d=[],b=o.length,E=0,q=A,z=I,Z=o.lastIndexOf(g);Z<0&&(Z=0);for(var te=0;te<Z;++te)o.charCodeAt(te)>=128&&le("not-basic"),d.push(o.charCodeAt(te));for(var ie=Z>0?Z+1:0;ie<b;){for(var Q=E,ee=1,ce=P;;ce+=P){ie>=b&&le("invalid-input");var H=it(o.charCodeAt(ie++));(H>=P||H>Y((S-E)/ee))&&le("overflow"),E+=H*ee;var ne=ce<=z?_:ce>=z+f?f:ce-z;if(H<ne)break;var de=P-ne;ee>Y(S/de)&&le("overflow"),ee*=de}var ae=d.length+1;z=$(E-Q,ae,Q==0),Y(E/ae)>S-q&&le("overflow"),q+=Y(E/ae),E%=ae,d.splice(E++,0,q)}return String.fromCodePoint.apply(String,d)},w=function(o){var d=[];o=ot(o);var b=o.length,E=A,q=0,z=I,Z=!0,te=!1,ie=void 0;try{for(var Q=o[Symbol.iterator](),ee;!(Z=(ee=Q.next()).done);Z=!0){var ce=ee.value;ce<128&&d.push(we(ce))}}catch(kt){te=!0,ie=kt}finally{try{!Z&&Q.return&&Q.return()}finally{if(te)throw ie}}var H=d.length,ne=H;for(H&&d.push(g);ne<b;){var de=S,ae=!0,Ke=!1,ke=void 0;try{for(var De=o[Symbol.iterator](),pt;!(ae=(pt=De.next()).done);ae=!0){var Ze=pt.value;Ze>=E&&Ze<de&&(de=Ze)}}catch(kt){Ke=!0,ke=kt}finally{try{!ae&&De.return&&De.return()}finally{if(Ke)throw ke}}var be=ne+1;de-E>Y((S-q)/be)&&le("overflow"),q+=(de-E)*be,E=de;var Ae=!0,xe=!1,Ue=void 0;try{for(var jt=o[Symbol.iterator](),Nn;!(Ae=(Nn=jt.next()).done);Ae=!0){var On=Nn.value;if(On<E&&++q>S&&le("overflow"),On==E){for(var Qt=q,Xt=P;;Xt+=P){var Yt=Xt<=z?_:Xt>=z+f?f:Xt-z;if(Qt<Yt)break;var Cn=Qt-Yt,Tn=P-Yt;d.push(we(M(Yt+Cn%Tn,0))),Qt=Y(Cn/Tn)}d.push(we(M(Qt,0))),z=$(q,be,ne==H),q=0,++ne}}}catch(kt){xe=!0,Ue=kt}finally{try{!Ae&&jt.return&&jt.return()}finally{if(xe)throw Ue}}++q,++E}return d.join("")},s=function(o){return Qe(o,function(d){return C.test(d)?k(d.slice(4).toLowerCase()):d})},u=function(o){return Qe(o,function(d){return D.test(d)?"xn--"+w(d):d})},T={version:"2.1.0",ucs2:{decode:ot,encode:St},decode:k,encode:w,toASCII:u,toUnicode:s},V={};function F(c){var o=c.charCodeAt(0),d=void 0;return o<16?d="%0"+o.toString(16).toUpperCase():o<128?d="%"+o.toString(16).toUpperCase():o<2048?d="%"+(o>>6|192).toString(16).toUpperCase()+"%"+(o&63|128).toString(16).toUpperCase():d="%"+(o>>12|224).toString(16).toUpperCase()+"%"+(o>>6&63|128).toString(16).toUpperCase()+"%"+(o&63|128).toString(16).toUpperCase(),d}function W(c){for(var o="",d=0,b=c.length;d<b;){var E=parseInt(c.substr(d+1,2),16);if(E<128)o+=String.fromCharCode(E),d+=3;else if(E>=194&&E<224){if(b-d>=6){var q=parseInt(c.substr(d+4,2),16);o+=String.fromCharCode((E&31)<<6|q&63)}else o+=c.substr(d,6);d+=6}else if(E>=224){if(b-d>=9){var z=parseInt(c.substr(d+4,2),16),Z=parseInt(c.substr(d+7,2),16);o+=String.fromCharCode((E&15)<<12|(z&63)<<6|Z&63)}else o+=c.substr(d,9);d+=9}else o+=c.substr(d,3),d+=3}return o}function X(c,o){function d(b){var E=W(b);return E.match(o.UNRESERVED)?E:b}return c.scheme&&(c.scheme=String(c.scheme).replace(o.PCT_ENCODED,d).toLowerCase().replace(o.NOT_SCHEME,"")),c.userinfo!==void 0&&(c.userinfo=String(c.userinfo).replace(o.PCT_ENCODED,d).replace(o.NOT_USERINFO,F).replace(o.PCT_ENCODED,l)),c.host!==void 0&&(c.host=String(c.host).replace(o.PCT_ENCODED,d).toLowerCase().replace(o.NOT_HOST,F).replace(o.PCT_ENCODED,l)),c.path!==void 0&&(c.path=String(c.path).replace(o.PCT_ENCODED,d).replace(c.scheme?o.NOT_PATH:o.NOT_PATH_NOSCHEME,F).replace(o.PCT_ENCODED,l)),c.query!==void 0&&(c.query=String(c.query).replace(o.PCT_ENCODED,d).replace(o.NOT_QUERY,F).replace(o.PCT_ENCODED,l)),c.fragment!==void 0&&(c.fragment=String(c.fragment).replace(o.PCT_ENCODED,d).replace(o.NOT_FRAGMENT,F).replace(o.PCT_ENCODED,l)),c}function oe(c){return c.replace(/^0*(.*)/,"$1")||"0"}function Re(c,o){var d=c.match(o.IPV4ADDRESS)||[],b=j(d,2),E=b[1];return E?E.split(".").map(oe).join("."):c}function ct(c,o){var d=c.match(o.IPV6ADDRESS)||[],b=j(d,3),E=b[1],q=b[2];if(E){for(var z=E.toLowerCase().split("::").reverse(),Z=j(z,2),te=Z[0],ie=Z[1],Q=ie?ie.split(":").map(oe):[],ee=te.split(":").map(oe),ce=o.IPV4ADDRESS.test(ee[ee.length-1]),H=ce?7:8,ne=ee.length-H,de=Array(H),ae=0;ae<H;++ae)de[ae]=Q[ae]||ee[ne+ae]||"";ce&&(de[H-1]=Re(de[H-1],o));var Ke=de.reduce(function(be,Ae,xe){if(!Ae||Ae==="0"){var Ue=be[be.length-1];Ue&&Ue.index+Ue.length===xe?Ue.length++:be.push({index:xe,length:1})}return be},[]),ke=Ke.sort(function(be,Ae){return Ae.length-be.length})[0],De=void 0;if(ke&&ke.length>1){var pt=de.slice(0,ke.index),Ze=de.slice(ke.index+ke.length);De=pt.join(":")+"::"+Ze.join(":")}else De=de.join(":");return q&&(De+="%"+q),De}else return c}var Pt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Nt="".match(/(){0}/)[1]===void 0;function ge(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d={},b=o.iri!==!1?v:h;o.reference==="suffix"&&(c=(o.scheme?o.scheme+":":"")+"//"+c);var E=c.match(Pt);if(E){Nt?(d.scheme=E[1],d.userinfo=E[3],d.host=E[4],d.port=parseInt(E[5],10),d.path=E[6]||"",d.query=E[7],d.fragment=E[8],isNaN(d.port)&&(d.port=E[5])):(d.scheme=E[1]||void 0,d.userinfo=c.indexOf("@")!==-1?E[3]:void 0,d.host=c.indexOf("//")!==-1?E[4]:void 0,d.port=parseInt(E[5],10),d.path=E[6]||"",d.query=c.indexOf("?")!==-1?E[7]:void 0,d.fragment=c.indexOf("#")!==-1?E[8]:void 0,isNaN(d.port)&&(d.port=c.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?E[4]:void 0)),d.host&&(d.host=ct(Re(d.host,b),b)),d.scheme===void 0&&d.userinfo===void 0&&d.host===void 0&&d.port===void 0&&!d.path&&d.query===void 0?d.reference="same-document":d.scheme===void 0?d.reference="relative":d.fragment===void 0?d.reference="absolute":d.reference="uri",o.reference&&o.reference!=="suffix"&&o.reference!==d.reference&&(d.error=d.error||"URI is not a "+o.reference+" reference.");var q=V[(o.scheme||d.scheme||"").toLowerCase()];if(!o.unicodeSupport&&(!q||!q.unicodeSupport)){if(d.host&&(o.domainHost||q&&q.domainHost))try{d.host=T.toASCII(d.host.replace(b.PCT_ENCODED,W).toLowerCase())}catch(z){d.error=d.error||"Host's domain name can not be converted to ASCII via punycode: "+z}X(d,h)}else X(d,b);q&&q.parse&&q.parse(d,o)}else d.error=d.error||"URI can not be parsed.";return d}function Ot(c,o){var d=o.iri!==!1?v:h,b=[];return c.userinfo!==void 0&&(b.push(c.userinfo),b.push("@")),c.host!==void 0&&b.push(ct(Re(String(c.host),d),d).replace(d.IPV6ADDRESS,function(E,q,z){return"["+q+(z?"%25"+z:"")+"]"})),(typeof c.port=="number"||typeof c.port=="string")&&(b.push(":"),b.push(String(c.port))),b.length?b.join(""):void 0}var ut=/^\.\.?\//,lt=/^\/\.(\/|$)/,dt=/^\/\.\.(\/|$)/,Ct=/^\/?(?:.|\n)*?(?=\/|$)/;function Ie(c){for(var o=[];c.length;)if(c.match(ut))c=c.replace(ut,"");else if(c.match(lt))c=c.replace(lt,"/");else if(c.match(dt))c=c.replace(dt,"/"),o.pop();else if(c==="."||c==="..")c="";else{var d=c.match(Ct);if(d){var b=d[0];c=c.slice(b.length),o.push(b)}else throw new Error("Unexpected dot segment condition")}return o.join("")}function ve(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=o.iri?v:h,b=[],E=V[(o.scheme||c.scheme||"").toLowerCase()];if(E&&E.serialize&&E.serialize(c,o),c.host&&!d.IPV6ADDRESS.test(c.host)){if(o.domainHost||E&&E.domainHost)try{c.host=o.iri?T.toUnicode(c.host):T.toASCII(c.host.replace(d.PCT_ENCODED,W).toLowerCase())}catch(Z){c.error=c.error||"Host's domain name can not be converted to "+(o.iri?"Unicode":"ASCII")+" via punycode: "+Z}}X(c,d),o.reference!=="suffix"&&c.scheme&&(b.push(c.scheme),b.push(":"));var q=Ot(c,o);if(q!==void 0&&(o.reference!=="suffix"&&b.push("//"),b.push(q),c.path&&c.path.charAt(0)!=="/"&&b.push("/")),c.path!==void 0){var z=c.path;!o.absolutePath&&(!E||!E.absolutePath)&&(z=Ie(z)),q===void 0&&(z=z.replace(/^\/\//,"/%2F")),b.push(z)}return c.query!==void 0&&(b.push("?"),b.push(c.query)),c.fragment!==void 0&&(b.push("#"),b.push(c.fragment)),b.join("")}function ft(c,o){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=arguments[3],E={};return b||(c=ge(ve(c,d),d),o=ge(ve(o,d),d)),d=d||{},!d.tolerant&&o.scheme?(E.scheme=o.scheme,E.userinfo=o.userinfo,E.host=o.host,E.port=o.port,E.path=Ie(o.path||""),E.query=o.query):(o.userinfo!==void 0||o.host!==void 0||o.port!==void 0?(E.userinfo=o.userinfo,E.host=o.host,E.port=o.port,E.path=Ie(o.path||""),E.query=o.query):(o.path?(o.path.charAt(0)==="/"?E.path=Ie(o.path):((c.userinfo!==void 0||c.host!==void 0||c.port!==void 0)&&!c.path?E.path="/"+o.path:c.path?E.path=c.path.slice(0,c.path.lastIndexOf("/")+1)+o.path:E.path=o.path,E.path=Ie(E.path)),E.query=o.query):(E.path=c.path,o.query!==void 0?E.query=o.query:E.query=c.query),E.userinfo=c.userinfo,E.host=c.host,E.port=c.port),E.scheme=c.scheme),E.fragment=o.fragment,E}function Tt(c,o,d){var b=y({scheme:"null"},d);return ve(ft(ge(c,b),ge(o,b),b,!0),b)}function Xe(c,o){return typeof c=="string"?c=ve(ge(c,o),o):i(c)==="object"&&(c=ge(ve(c,o),o)),c}function Rt(c,o,d){return typeof c=="string"?c=ve(ge(c,d),d):i(c)==="object"&&(c=ve(c,d)),typeof o=="string"?o=ve(ge(o,d),d):i(o)==="object"&&(o=ve(o,d)),c===o}function Wt(c,o){return c&&c.toString().replace(!o||!o.iri?h.ESCAPE:v.ESCAPE,F)}function Ee(c,o){return c&&c.toString().replace(!o||!o.iri?h.PCT_ENCODED:v.PCT_ENCODED,W)}var Ye={scheme:"http",domainHost:!0,parse:function(o,d){return o.host||(o.error=o.error||"HTTP URIs must have a host."),o},serialize:function(o,d){var b=String(o.scheme).toLowerCase()==="https";return(o.port===(b?443:80)||o.port==="")&&(o.port=void 0),o.path||(o.path="/"),o}},$n={scheme:"https",domainHost:Ye.domainHost,parse:Ye.parse,serialize:Ye.serialize};function _n(c){return typeof c.secure=="boolean"?c.secure:String(c.scheme).toLowerCase()==="wss"}var It={scheme:"ws",domainHost:!0,parse:function(o,d){var b=o;return b.secure=_n(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b},serialize:function(o,d){if((o.port===(_n(o)?443:80)||o.port==="")&&(o.port=void 0),typeof o.secure=="boolean"&&(o.scheme=o.secure?"wss":"ws",o.secure=void 0),o.resourceName){var b=o.resourceName.split("?"),E=j(b,2),q=E[0],z=E[1];o.path=q&&q!=="/"?q:void 0,o.query=z,o.resourceName=void 0}return o.fragment=void 0,o}},gn={scheme:"wss",domainHost:It.domainHost,parse:It.parse,serialize:It.serialize},ja={},wn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",je="[0-9A-Fa-f]",ka=n(n("%[EFef]"+je+"%"+je+je+"%"+je+je)+"|"+n("%[89A-Fa-f]"+je+"%"+je+je)+"|"+n("%"+je+je)),Da="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Aa="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Ma=a(Aa,'[\\"\\\\]'),Va="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Fa=new RegExp(wn,"g"),ht=new RegExp(ka,"g"),Ua=new RegExp(a("[^]",Da,"[\\.]",'[\\"]',Ma),"g"),En=new RegExp(a("[^]",wn,Va),"g"),qa=En;function yr(c){var o=W(c);return o.match(Fa)?o:c}var bn={scheme:"mailto",parse:function(o,d){var b=o,E=b.to=b.path?b.path.split(","):[];if(b.path=void 0,b.query){for(var q=!1,z={},Z=b.query.split("&"),te=0,ie=Z.length;te<ie;++te){var Q=Z[te].split("=");switch(Q[0]){case"to":for(var ee=Q[1].split(","),ce=0,H=ee.length;ce<H;++ce)E.push(ee[ce]);break;case"subject":b.subject=Ee(Q[1],d);break;case"body":b.body=Ee(Q[1],d);break;default:q=!0,z[Ee(Q[0],d)]=Ee(Q[1],d);break}}q&&(b.headers=z)}b.query=void 0;for(var ne=0,de=E.length;ne<de;++ne){var ae=E[ne].split("@");if(ae[0]=Ee(ae[0]),d.unicodeSupport)ae[1]=Ee(ae[1],d).toLowerCase();else try{ae[1]=T.toASCII(Ee(ae[1],d).toLowerCase())}catch(Ke){b.error=b.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ke}E[ne]=ae.join("@")}return b},serialize:function(o,d){var b=o,E=m(o.to);if(E){for(var q=0,z=E.length;q<z;++q){var Z=String(E[q]),te=Z.lastIndexOf("@"),ie=Z.slice(0,te).replace(ht,yr).replace(ht,l).replace(Ua,F),Q=Z.slice(te+1);try{Q=d.iri?T.toUnicode(Q):T.toASCII(Ee(Q,d).toLowerCase())}catch(ne){b.error=b.error||"Email address's domain name can not be converted to "+(d.iri?"Unicode":"ASCII")+" via punycode: "+ne}E[q]=ie+"@"+Q}b.path=E.join(",")}var ee=o.headers=o.headers||{};o.subject&&(ee.subject=o.subject),o.body&&(ee.body=o.body);var ce=[];for(var H in ee)ee[H]!==ja[H]&&ce.push(H.replace(ht,yr).replace(ht,l).replace(En,F)+"="+ee[H].replace(ht,yr).replace(ht,l).replace(qa,F));return ce.length&&(b.query=ce.join("&")),b}},za=/^([^\:]+)\:(.*)/,Sn={scheme:"urn",parse:function(o,d){var b=o.path&&o.path.match(za),E=o;if(b){var q=d.scheme||E.scheme||"urn",z=b[1].toLowerCase(),Z=b[2],te=q+":"+(d.nid||z),ie=V[te];E.nid=z,E.nss=Z,E.path=void 0,ie&&(E=ie.parse(E,d))}else E.error=E.error||"URN can not be parsed.";return E},serialize:function(o,d){var b=d.scheme||o.scheme||"urn",E=o.nid,q=b+":"+(d.nid||E),z=V[q];z&&(o=z.serialize(o,d));var Z=o,te=o.nss;return Z.path=(E||d.nid)+":"+te,Z}},Ka=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Pn={scheme:"urn:uuid",parse:function(o,d){var b=o;return b.uuid=b.nss,b.nss=void 0,!d.tolerant&&(!b.uuid||!b.uuid.match(Ka))&&(b.error=b.error||"UUID is not valid."),b},serialize:function(o,d){var b=o;return b.nss=(o.uuid||"").toLowerCase(),b}};V[Ye.scheme]=Ye,V[$n.scheme]=$n,V[It.scheme]=It,V[gn.scheme]=gn,V[bn.scheme]=bn,V[Sn.scheme]=Sn,V[Pn.scheme]=Pn,r.SCHEMES=V,r.pctEncChar=F,r.pctDecChars=W,r.parse=ge,r.removeDotSegments=Ie,r.serialize=ve,r.resolveComponents=ft,r.resolve=Tt,r.normalize=Xe,r.equal=Rt,r.escapeComponent=Wt,r.unescapeComponent=Ee,Object.defineProperty(r,"__esModule",{value:!0})})})(Nr,Nr.exports);var ko=Nr.exports;Object.defineProperty(Fr,"__esModule",{value:!0});const Ea=ko;Ea.code='require("ajv/dist/runtime/uri").default';Fr.default=Ea;(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=Te;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=J;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const a=Gt,n=Jt,i=at,l=_e,m=J,y=he,p=Ht,h=x,v=jo,j=Fr,R=(M,$)=>new RegExp(M,$);R.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],P=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={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."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},N=200;function O(M){var $,k,w,s,u,T,V,F,W,X,oe,Re,ct,Pt,Nt,ge,Ot,ut,lt,dt,Ct,Ie,ve,ft,Tt;const Xe=M.strict,Rt=($=M.code)===null||$===void 0?void 0:$.optimize,Wt=Rt===!0||Rt===void 0?1:Rt||0,Ee=(w=(k=M.code)===null||k===void 0?void 0:k.regExp)!==null&&w!==void 0?w:R,Ye=(s=M.uriResolver)!==null&&s!==void 0?s:j.default;return{strictSchema:(T=(u=M.strictSchema)!==null&&u!==void 0?u:Xe)!==null&&T!==void 0?T:!0,strictNumbers:(F=(V=M.strictNumbers)!==null&&V!==void 0?V:Xe)!==null&&F!==void 0?F:!0,strictTypes:(X=(W=M.strictTypes)!==null&&W!==void 0?W:Xe)!==null&&X!==void 0?X:"log",strictTuples:(Re=(oe=M.strictTuples)!==null&&oe!==void 0?oe:Xe)!==null&&Re!==void 0?Re:"log",strictRequired:(Pt=(ct=M.strictRequired)!==null&&ct!==void 0?ct:Xe)!==null&&Pt!==void 0?Pt:!1,code:M.code?{...M.code,optimize:Wt,regExp:Ee}:{optimize:Wt,regExp:Ee},loopRequired:(Nt=M.loopRequired)!==null&&Nt!==void 0?Nt:N,loopEnum:(ge=M.loopEnum)!==null&&ge!==void 0?ge:N,meta:(Ot=M.meta)!==null&&Ot!==void 0?Ot:!0,messages:(ut=M.messages)!==null&&ut!==void 0?ut:!0,inlineRefs:(lt=M.inlineRefs)!==null&<!==void 0?lt:!0,schemaId:(dt=M.schemaId)!==null&&dt!==void 0?dt:"$id",addUsedSchema:(Ct=M.addUsedSchema)!==null&&Ct!==void 0?Ct:!0,validateSchema:(Ie=M.validateSchema)!==null&&Ie!==void 0?Ie:!0,validateFormats:(ve=M.validateFormats)!==null&&ve!==void 0?ve:!0,unicodeRegExp:(ft=M.unicodeRegExp)!==null&&ft!==void 0?ft:!0,int32range:(Tt=M.int32range)!==null&&Tt!==void 0?Tt:!0,uriResolver:Ye}}class I{constructor($={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...O($)};const{es5:k,lines:w}=this.opts.code;this.scope=new m.ValueScope({scope:{},prefixes:P,es5:k,lines:w}),this.logger=Y($.logger);const s=$.validateFormats;$.validateFormats=!1,this.RULES=(0,i.getRules)(),A.call(this,_,$,"NOT SUPPORTED"),A.call(this,f,$,"DEPRECATED","warn"),this._metaOpts=B.call(this),$.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&L.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),C.call(this),$.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:k,schemaId:w}=this.opts;let s=v;w==="id"&&(s={...v},s.id=s.$id,delete s.$id),k&&$&&this.addMetaSchema(s,s[w],!1)}defaultMeta(){const{meta:$,schemaId:k}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[k]||$:void 0}validate($,k){let w;if(typeof $=="string"){if(w=this.getSchema($),!w)throw new Error(`no schema with key or ref "${$}"`)}else w=this.compile($);const s=w(k);return"$async"in w||(this.errors=w.errors),s}compile($,k){const w=this._addSchema($,k);return w.validate||this._compileSchemaEnv(w)}compileAsync($,k){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:w}=this.opts;return s.call(this,$,k);async function s(X,oe){await u.call(this,X.$schema);const Re=this._addSchema(X,oe);return Re.validate||T.call(this,Re)}async function u(X){X&&!this.getSchema(X)&&await s.call(this,{$ref:X},!0)}async function T(X){try{return this._compileSchemaEnv(X)}catch(oe){if(!(oe instanceof n.default))throw oe;return V.call(this,oe),await F.call(this,oe.missingSchema),T.call(this,X)}}function V({missingSchema:X,missingRef:oe}){if(this.refs[X])throw new Error(`AnySchema ${X} is loaded but ${oe} cannot be resolved`)}async function F(X){const oe=await W.call(this,X);this.refs[X]||await u.call(this,oe.$schema),this.refs[X]||this.addSchema(oe,X,k)}async function W(X){const oe=this._loading[X];if(oe)return oe;try{return await(this._loading[X]=w(X))}finally{delete this._loading[X]}}}addSchema($,k,w,s=this.opts.validateSchema){if(Array.isArray($)){for(const T of $)this.addSchema(T,void 0,w,s);return this}let u;if(typeof $=="object"){const{schemaId:T}=this.opts;if(u=$[T],u!==void 0&&typeof u!="string")throw new Error(`schema ${T} must be string`)}return k=(0,y.normalizeId)(k||u),this._checkUnique(k),this.schemas[k]=this._addSchema($,w,k,s,!0),this}addMetaSchema($,k,w=this.opts.validateSchema){return this.addSchema($,k,!0,w),this}validateSchema($,k){if(typeof $=="boolean")return!0;let w;if(w=$.$schema,w!==void 0&&typeof w!="string")throw new Error("$schema must be a string");if(w=w||this.opts.defaultMeta||this.defaultMeta(),!w)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const s=this.validate(w,$);if(!s&&k){const u="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(u);else throw new Error(u)}return s}getSchema($){let k;for(;typeof(k=g.call(this,$))=="string";)$=k;if(k===void 0){const{schemaId:w}=this.opts,s=new l.SchemaEnv({schema:{},schemaId:w});if(k=l.resolveSchema.call(this,s,$),!k)return;this.refs[$]=k}return k.validate||this._compileSchemaEnv(k)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const k=g.call(this,$);return typeof k=="object"&&this._cache.delete(k.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const k=$;this._cache.delete(k);let w=$[this.opts.schemaId];return w&&(w=(0,y.normalizeId)(w),delete this.schemas[w],delete this.refs[w]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const k of $)this.addKeyword(k);return this}addKeyword($,k){let w;if(typeof $=="string")w=$,typeof k=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),k.keyword=w);else if(typeof $=="object"&&k===void 0){if(k=$,w=k.keyword,Array.isArray(w)&&!w.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(le.call(this,w,k),!k)return(0,h.eachItem)(w,u=>We.call(this,u)),this;ot.call(this,k);const s={...k,type:(0,p.getJSONTypes)(k.type),schemaType:(0,p.getJSONTypes)(k.schemaType)};return(0,h.eachItem)(w,s.type.length===0?u=>We.call(this,u,s):u=>s.type.forEach(T=>We.call(this,u,s,T))),this}getKeyword($){const k=this.RULES.all[$];return typeof k=="object"?k.definition:!!k}removeKeyword($){const{RULES:k}=this;delete k.keywords[$],delete k.all[$];for(const w of k.rules){const s=w.rules.findIndex(u=>u.keyword===$);s>=0&&w.rules.splice(s,1)}return this}addFormat($,k){return typeof k=="string"&&(k=new RegExp(k)),this.formats[$]=k,this}errorsText($=this.errors,{separator:k=", ",dataVar:w="data"}={}){return!$||$.length===0?"No errors":$.map(s=>`${w}${s.instancePath} ${s.message}`).reduce((s,u)=>s+k+u)}$dataMetaSchema($,k){const w=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const s of k){const u=s.split("/").slice(1);let T=$;for(const V of u)T=T[V];for(const V in w){const F=w[V];if(typeof F!="object")continue;const{$data:W}=F.definition,X=T[V];W&&X&&(T[V]=it(X))}}return $}_removeAllSchemas($,k){for(const w in $){const s=$[w];(!k||k.test(w))&&(typeof s=="string"?delete $[w]:s&&!s.meta&&(this._cache.delete(s.schema),delete $[w]))}}_addSchema($,k,w,s=this.opts.validateSchema,u=this.opts.addUsedSchema){let T;const{schemaId:V}=this.opts;if(typeof $=="object")T=$[V];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof $!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get($);if(F!==void 0)return F;w=(0,y.normalizeId)(T||w);const W=y.getSchemaRefs.call(this,$,w);return F=new l.SchemaEnv({schema:$,schemaId:V,meta:k,baseId:w,localRefs:W}),this._cache.set(F.schema,F),u&&!w.startsWith("#")&&(w&&this._checkUnique(w),this.refs[w]=F),s&&this.validateSchema($,!0),F}_checkUnique($){if(this.schemas[$]||this.refs[$])throw new Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta?this._compileMetaSchema($):l.compileSchema.call(this,$),!$.validate)throw new Error("ajv implementation error");return $.validate}_compileMetaSchema($){const k=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,$)}finally{this.opts=k}}}e.default=I,I.ValidationError=a.default,I.MissingRefError=n.default;function A(M,$,k,w="error"){for(const s in M){const u=s;u in $&&this.logger[w](`${k}: option ${s}. ${M[u]}`)}}function g(M){return M=(0,y.normalizeId)(M),this.schemas[M]||this.refs[M]}function C(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const $ in M)this.addSchema(M[$],$)}function D(){for(const M in this.opts.formats){const $=this.opts.formats[M];$&&this.addFormat(M,$)}}function L(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in M){const k=M[$];k.keyword||(k.keyword=$),this.addKeyword(k)}}function B(){const M={...this.opts};for(const $ of S)delete M[$];return M}const se={log(){},warn(){},error(){}};function Y(M){if(M===!1)return se;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const we=/^[a-z_$][a-z0-9_$:-]*$/i;function le(M,$){const{RULES:k}=this;if((0,h.eachItem)(M,w=>{if(k.keywords[w])throw new Error(`Keyword ${w} is already defined`);if(!we.test(w))throw new Error(`Keyword ${w} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function We(M,$,k){var w;const s=$==null?void 0:$.post;if(k&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:u}=this;let T=s?u.post:u.rules.find(({type:F})=>F===k);if(T||(T={type:k,rules:[]},u.rules.push(T)),u.keywords[M]=!0,!$)return;const V={keyword:M,definition:{...$,type:(0,p.getJSONTypes)($.type),schemaType:(0,p.getJSONTypes)($.schemaType)}};$.before?Qe.call(this,T,V,$.before):T.rules.push(V),u.all[M]=V,(w=$.implements)===null||w===void 0||w.forEach(F=>this.addKeyword(F))}function Qe(M,$,k){const w=M.rules.findIndex(s=>s.keyword===k);w>=0?M.rules.splice(w,0,$):(M.rules.push($),this.logger.warn(`rule ${k} is not defined`))}function ot(M){let{metaSchema:$}=M;$!==void 0&&(M.$data&&this.opts.$data&&($=it($)),M.validateSchema=this.compile($,!0))}const St={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function it(M){return{anyOf:[M,St]}}})(Yn);var Ur={},qr={},zr={};Object.defineProperty(zr,"__esModule",{value:!0});const Do={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};zr.default=Do;var st={};Object.defineProperty(st,"__esModule",{value:!0});st.callRef=st.getValidate=void 0;const Ao=Jt,Fn=G,$e=J,yt=Fe,Un=_e,Zt=x,Mo={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:a}=e,{baseId:n,schemaEnv:i,validateName:l,opts:m,self:y}=a,{root:p}=i;if((r==="#"||r==="#/")&&n===p.baseId)return v();const h=Un.resolveRef.call(y,p,n,r);if(h===void 0)throw new Ao.default(a.opts.uriResolver,n,r);if(h instanceof Un.SchemaEnv)return j(h);return R(h);function v(){if(i===p)return ar(e,l,i,i.$async);const S=t.scopeValue("root",{ref:p});return ar(e,(0,$e._)`${S}.validate`,p,p.$async)}function j(S){const P=ba(e,S);ar(e,P,S,S.$async)}function R(S){const P=t.scopeValue("schema",m.code.source===!0?{ref:S,code:(0,$e.stringify)(S)}:{ref:S}),_=t.name("valid"),f=e.subschema({schema:S,dataTypes:[],schemaPath:$e.nil,topSchemaRef:P,errSchemaPath:r},_);e.mergeEvaluated(f),e.ok(_)}}};function ba(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,$e._)`${r.scopeValue("wrapper",{ref:t})}.validate`}st.getValidate=ba;function ar(e,t,r,a){const{gen:n,it:i}=e,{allErrors:l,schemaEnv:m,opts:y}=i,p=y.passContext?yt.default.this:$e.nil;a?h():v();function h(){if(!m.$async)throw new Error("async schema referenced by sync schema");const S=n.let("valid");n.try(()=>{n.code((0,$e._)`await ${(0,Fn.callValidateCode)(e,t,p)}`),R(t),l||n.assign(S,!0)},P=>{n.if((0,$e._)`!(${P} instanceof ${i.ValidationError})`,()=>n.throw(P)),j(P),l||n.assign(S,!1)}),e.ok(S)}function v(){e.result((0,Fn.callValidateCode)(e,t,p),()=>R(t),()=>j(t))}function j(S){const P=(0,$e._)`${S}.errors`;n.assign(yt.default.vErrors,(0,$e._)`${yt.default.vErrors} === null ? ${P} : ${yt.default.vErrors}.concat(${P})`),n.assign(yt.default.errors,(0,$e._)`${yt.default.vErrors}.length`)}function R(S){var P;if(!i.opts.unevaluated)return;const _=(P=r==null?void 0:r.validate)===null||P===void 0?void 0:P.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=Zt.mergeEvaluated.props(n,_.props,i.props));else{const f=n.var("props",(0,$e._)`${S}.evaluated.props`);i.props=Zt.mergeEvaluated.props(n,f,i.props,$e.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=Zt.mergeEvaluated.items(n,_.items,i.items));else{const f=n.var("items",(0,$e._)`${S}.evaluated.items`);i.items=Zt.mergeEvaluated.items(n,f,i.items,$e.Name)}}}st.callRef=ar;st.default=Mo;Object.defineProperty(qr,"__esModule",{value:!0});const Vo=zr,Fo=st,Uo=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Vo.default,Fo.default];qr.default=Uo;var Kr={},Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});const cr=J,He=cr.operators,ur={maximum:{okStr:"<=",ok:He.LTE,fail:He.GT},minimum:{okStr:">=",ok:He.GTE,fail:He.LT},exclusiveMaximum:{okStr:"<",ok:He.LT,fail:He.GTE},exclusiveMinimum:{okStr:">",ok:He.GT,fail:He.LTE}},qo={message:({keyword:e,schemaCode:t})=>(0,cr.str)`must be ${ur[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,cr._)`{comparison: ${ur[e].okStr}, limit: ${t}}`},zo={keyword:Object.keys(ur),type:"number",schemaType:"number",$data:!0,error:qo,code(e){const{keyword:t,data:r,schemaCode:a}=e;e.fail$data((0,cr._)`${r} ${ur[t].fail} ${a} || isNaN(${r})`)}};Lr.default=zo;var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});const Ft=J,Ko={message:({schemaCode:e})=>(0,Ft.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ft._)`{multipleOf: ${e}}`},Lo={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Ko,code(e){const{gen:t,data:r,schemaCode:a,it:n}=e,i=n.opts.multipleOfPrecision,l=t.let("res"),m=i?(0,Ft._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${i}`:(0,Ft._)`${l} !== parseInt(${l})`;e.fail$data((0,Ft._)`(${a} === 0 || (${l} = ${r}/${a}, ${m}))`)}};Hr.default=Lo;var Gr={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});function Sa(e){const t=e.length;let r=0,a=0,n;for(;a<t;)r++,n=e.charCodeAt(a++),n>=55296&&n<=56319&&a<t&&(n=e.charCodeAt(a),(n&64512)===56320&&a++);return r}Jr.default=Sa;Sa.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(Gr,"__esModule",{value:!0});const rt=J,Ho=x,Go=Jr,Jo={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,rt.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,rt._)`{limit: ${e}}`},Bo={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Jo,code(e){const{keyword:t,data:r,schemaCode:a,it:n}=e,i=t==="maxLength"?rt.operators.GT:rt.operators.LT,l=n.opts.unicode===!1?(0,rt._)`${r}.length`:(0,rt._)`${(0,Ho.useFunc)(e.gen,Go.default)}(${r})`;e.fail$data((0,rt._)`${l} ${i} ${a}`)}};Gr.default=Bo;var Br={};Object.defineProperty(Br,"__esModule",{value:!0});const Wo=G,lr=J,Qo={message:({schemaCode:e})=>(0,lr.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,lr._)`{pattern: ${e}}`},Xo={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Qo,code(e){const{data:t,$data:r,schema:a,schemaCode:n,it:i}=e,l=i.opts.unicodeRegExp?"u":"",m=r?(0,lr._)`(new RegExp(${n}, ${l}))`:(0,Wo.usePattern)(e,a);e.fail$data((0,lr._)`!${m}.test(${t})`)}};Br.default=Xo;var Wr={};Object.defineProperty(Wr,"__esModule",{value:!0});const Ut=J,Yo={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Ut.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ut._)`{limit: ${e}}`},Zo={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Yo,code(e){const{keyword:t,data:r,schemaCode:a}=e,n=t==="maxProperties"?Ut.operators.GT:Ut.operators.LT;e.fail$data((0,Ut._)`Object.keys(${r}).length ${n} ${a}`)}};Wr.default=Zo;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});const At=G,qt=J,xo=x,ei={message:({params:{missingProperty:e}})=>(0,qt.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,qt._)`{missingProperty: ${e}}`},ti={keyword:"required",type:"object",schemaType:"array",$data:!0,error:ei,code(e){const{gen:t,schema:r,schemaCode:a,data:n,$data:i,it:l}=e,{opts:m}=l;if(!i&&r.length===0)return;const y=r.length>=m.loopRequired;if(l.allErrors?p():h(),m.strictRequired){const R=e.parentSchema.properties,{definedProperties:S}=e.it;for(const P of r)if((R==null?void 0:R[P])===void 0&&!S.has(P)){const _=l.schemaEnv.baseId+l.errSchemaPath,f=`required property "${P}" is not defined at "${_}" (strictRequired)`;(0,xo.checkStrictMode)(l,f,l.opts.strictRequired)}}function p(){if(y||i)e.block$data(qt.nil,v);else for(const R of r)(0,At.checkReportMissingProp)(e,R)}function h(){const R=t.let("missing");if(y||i){const S=t.let("valid",!0);e.block$data(S,()=>j(R,S)),e.ok(S)}else t.if((0,At.checkMissingProp)(e,r,R)),(0,At.reportMissingProp)(e,R),t.else()}function v(){t.forOf("prop",a,R=>{e.setParams({missingProperty:R}),t.if((0,At.noPropertyInData)(t,n,R,m.ownProperties),()=>e.error())})}function j(R,S){e.setParams({missingProperty:R}),t.forOf(R,a,()=>{t.assign(S,(0,At.propertyInData)(t,n,R,m.ownProperties)),t.if((0,qt.not)(S),()=>{e.error(),t.break()})},qt.nil)}}};Qr.default=ti;var Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});const zt=J,ri={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,zt.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,zt._)`{limit: ${e}}`},ni={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:ri,code(e){const{keyword:t,data:r,schemaCode:a}=e,n=t==="maxItems"?zt.operators.GT:zt.operators.LT;e.fail$data((0,zt._)`${r}.length ${n} ${a}`)}};Xr.default=ni;var Yr={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});const Pa=sa;Pa.code='require("ajv/dist/runtime/equal").default';Bt.default=Pa;Object.defineProperty(Yr,"__esModule",{value:!0});const wr=Ht,fe=J,ai=x,si=Bt,oi={message:({params:{i:e,j:t}})=>(0,fe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,fe._)`{i: ${e}, j: ${t}}`},ii={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:oi,code(e){const{gen:t,data:r,$data:a,schema:n,parentSchema:i,schemaCode:l,it:m}=e;if(!a&&!n)return;const y=t.let("valid"),p=i.items?(0,wr.getSchemaTypes)(i.items):[];e.block$data(y,h,(0,fe._)`${l} === false`),e.ok(y);function h(){const S=t.let("i",(0,fe._)`${r}.length`),P=t.let("j");e.setParams({i:S,j:P}),t.assign(y,!0),t.if((0,fe._)`${S} > 1`,()=>(v()?j:R)(S,P))}function v(){return p.length>0&&!p.some(S=>S==="object"||S==="array")}function j(S,P){const _=t.name("item"),f=(0,wr.checkDataTypes)(p,_,m.opts.strictNumbers,wr.DataType.Wrong),N=t.const("indices",(0,fe._)`{}`);t.for((0,fe._)`;${S}--;`,()=>{t.let(_,(0,fe._)`${r}[${S}]`),t.if(f,(0,fe._)`continue`),p.length>1&&t.if((0,fe._)`typeof ${_} == "string"`,(0,fe._)`${_} += "_"`),t.if((0,fe._)`typeof ${N}[${_}] == "number"`,()=>{t.assign(P,(0,fe._)`${N}[${_}]`),e.error(),t.assign(y,!1).break()}).code((0,fe._)`${N}[${_}] = ${S}`)})}function R(S,P){const _=(0,ai.useFunc)(t,si.default),f=t.name("outer");t.label(f).for((0,fe._)`;${S}--;`,()=>t.for((0,fe._)`${P} = ${S}; ${P}--;`,()=>t.if((0,fe._)`${_}(${r}[${S}], ${r}[${P}])`,()=>{e.error(),t.assign(y,!1).break(f)})))}}};Yr.default=ii;var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0});const Or=J,ci=x,ui=Bt,li={message:"must be equal to constant",params:({schemaCode:e})=>(0,Or._)`{allowedValue: ${e}}`},di={keyword:"const",$data:!0,error:li,code(e){const{gen:t,data:r,$data:a,schemaCode:n,schema:i}=e;a||i&&typeof i=="object"?e.fail$data((0,Or._)`!${(0,ci.useFunc)(t,ui.default)}(${r}, ${n})`):e.fail((0,Or._)`${i} !== ${r}`)}};Zr.default=di;var xr={};Object.defineProperty(xr,"__esModule",{value:!0});const Mt=J,fi=x,hi=Bt,pi={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Mt._)`{allowedValues: ${e}}`},mi={keyword:"enum",schemaType:"array",$data:!0,error:pi,code(e){const{gen:t,data:r,$data:a,schema:n,schemaCode:i,it:l}=e;if(!a&&n.length===0)throw new Error("enum must have non-empty array");const m=n.length>=l.opts.loopEnum;let y;const p=()=>y??(y=(0,fi.useFunc)(t,hi.default));let h;if(m||a)h=t.let("valid"),e.block$data(h,v);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const R=t.const("vSchema",i);h=(0,Mt.or)(...n.map((S,P)=>j(R,P)))}e.pass(h);function v(){t.assign(h,!1),t.forOf("v",i,R=>t.if((0,Mt._)`${p()}(${r}, ${R})`,()=>t.assign(h,!0).break()))}function j(R,S){const P=n[S];return typeof P=="object"&&P!==null?(0,Mt._)`${p()}(${r}, ${R}[${S}])`:(0,Mt._)`${r} === ${P}`}}};xr.default=mi;Object.defineProperty(Kr,"__esModule",{value:!0});const yi=Lr,vi=Hr,$i=Gr,_i=Br,gi=Wr,wi=Qr,Ei=Xr,bi=Yr,Si=Zr,Pi=xr,Ni=[yi.default,vi.default,$i.default,_i.default,gi.default,wi.default,Ei.default,bi.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Si.default,Pi.default];Kr.default=Ni;var en={},Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.validateAdditionalItems=void 0;const nt=J,Cr=x,Oi={message:({params:{len:e}})=>(0,nt.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,nt._)`{limit: ${e}}`},Ci={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Oi,code(e){const{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,Cr.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Na(e,a)}};function Na(e,t){const{gen:r,schema:a,data:n,keyword:i,it:l}=e;l.items=!0;const m=r.const("len",(0,nt._)`${n}.length`);if(a===!1)e.setParams({len:t.length}),e.pass((0,nt._)`${m} <= ${t.length}`);else if(typeof a=="object"&&!(0,Cr.alwaysValidSchema)(l,a)){const p=r.var("valid",(0,nt._)`${m} <= ${t.length}`);r.if((0,nt.not)(p),()=>y(p)),e.ok(p)}function y(p){r.forRange("i",t.length,m,h=>{e.subschema({keyword:i,dataProp:h,dataPropType:Cr.Type.Num},p),l.allErrors||r.if((0,nt.not)(p),()=>r.break())})}}Et.validateAdditionalItems=Na;Et.default=Ci;var tn={},bt={};Object.defineProperty(bt,"__esModule",{value:!0});bt.validateTuple=void 0;const qn=J,sr=x,Ti=G,Ri={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return Oa(e,"additionalItems",t);r.items=!0,!(0,sr.alwaysValidSchema)(r,t)&&e.ok((0,Ti.validateArray)(e))}};function Oa(e,t,r=e.schema){const{gen:a,parentSchema:n,data:i,keyword:l,it:m}=e;h(n),m.opts.unevaluated&&r.length&&m.items!==!0&&(m.items=sr.mergeEvaluated.items(a,r.length,m.items));const y=a.name("valid"),p=a.const("len",(0,qn._)`${i}.length`);r.forEach((v,j)=>{(0,sr.alwaysValidSchema)(m,v)||(a.if((0,qn._)`${p} > ${j}`,()=>e.subschema({keyword:l,schemaProp:j,dataProp:j},y)),e.ok(y))});function h(v){const{opts:j,errSchemaPath:R}=m,S=r.length,P=S===v.minItems&&(S===v.maxItems||v[t]===!1);if(j.strictTuples&&!P){const _=`"${l}" is ${S}-tuple, but minItems or maxItems/${t} are not specified or different at path "${R}"`;(0,sr.checkStrictMode)(m,_,j.strictTuples)}}}bt.validateTuple=Oa;bt.default=Ri;Object.defineProperty(tn,"__esModule",{value:!0});const Ii=bt,ji={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Ii.validateTuple)(e,"items")};tn.default=ji;var rn={};Object.defineProperty(rn,"__esModule",{value:!0});const zn=J,ki=x,Di=G,Ai=Et,Mi={message:({params:{len:e}})=>(0,zn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,zn._)`{limit: ${e}}`},Vi={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Mi,code(e){const{schema:t,parentSchema:r,it:a}=e,{prefixItems:n}=r;a.items=!0,!(0,ki.alwaysValidSchema)(a,t)&&(n?(0,Ai.validateAdditionalItems)(e,n):e.ok((0,Di.validateArray)(e)))}};rn.default=Vi;var nn={};Object.defineProperty(nn,"__esModule",{value:!0});const Se=J,xt=x,Fi={message:({params:{min:e,max:t}})=>t===void 0?(0,Se.str)`must contain at least ${e} valid item(s)`:(0,Se.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Se._)`{minContains: ${e}}`:(0,Se._)`{minContains: ${e}, maxContains: ${t}}`},Ui={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Fi,code(e){const{gen:t,schema:r,parentSchema:a,data:n,it:i}=e;let l,m;const{minContains:y,maxContains:p}=a;i.opts.next?(l=y===void 0?1:y,m=p):l=1;const h=t.const("len",(0,Se._)`${n}.length`);if(e.setParams({min:l,max:m}),m===void 0&&l===0){(0,xt.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0,xt.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,xt.alwaysValidSchema)(i,r)){let P=(0,Se._)`${h} >= ${l}`;m!==void 0&&(P=(0,Se._)`${P} && ${h} <= ${m}`),e.pass(P);return}i.items=!0;const v=t.name("valid");m===void 0&&l===1?R(v,()=>t.if(v,()=>t.break())):l===0?(t.let(v,!0),m!==void 0&&t.if((0,Se._)`${n}.length > 0`,j)):(t.let(v,!1),j()),e.result(v,()=>e.reset());function j(){const P=t.name("_valid"),_=t.let("count",0);R(P,()=>t.if(P,()=>S(_)))}function R(P,_){t.forRange("i",0,h,f=>{e.subschema({keyword:"contains",dataProp:f,dataPropType:xt.Type.Num,compositeRule:!0},P),_()})}function S(P){t.code((0,Se._)`${P}++`),m===void 0?t.if((0,Se._)`${P} >= ${l}`,()=>t.assign(v,!0).break()):(t.if((0,Se._)`${P} > ${m}`,()=>t.assign(v,!1).break()),l===1?t.assign(v,!0):t.if((0,Se._)`${P} >= ${l}`,()=>t.assign(v,!0)))}}};nn.default=Ui;var Ca={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=J,r=x,a=G;e.error={message:({params:{property:y,depsCount:p,deps:h}})=>{const v=p===1?"property":"properties";return(0,t.str)`must have ${v} ${h} when property ${y} is present`},params:({params:{property:y,depsCount:p,deps:h,missingProperty:v}})=>(0,t._)`{property: ${y},
missingProperty: ${v},
depsCount: ${p},
deps: ${h}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(y){const[p,h]=i(y);l(y,p),m(y,h)}};function i({schema:y}){const p={},h={};for(const v in y){if(v==="__proto__")continue;const j=Array.isArray(y[v])?p:h;j[v]=y[v]}return[p,h]}function l(y,p=y.schema){const{gen:h,data:v,it:j}=y;if(Object.keys(p).length===0)return;const R=h.let("missing");for(const S in p){const P=p[S];if(P.length===0)continue;const _=(0,a.propertyInData)(h,v,S,j.opts.ownProperties);y.setParams({property:S,depsCount:P.length,deps:P.join(", ")}),j.allErrors?h.if(_,()=>{for(const f of P)(0,a.checkReportMissingProp)(y,f)}):(h.if((0,t._)`${_} && (${(0,a.checkMissingProp)(y,P,R)})`),(0,a.reportMissingProp)(y,R),h.else())}}e.validatePropertyDeps=l;function m(y,p=y.schema){const{gen:h,data:v,keyword:j,it:R}=y,S=h.name("valid");for(const P in p)(0,r.alwaysValidSchema)(R,p[P])||(h.if((0,a.propertyInData)(h,v,P,R.opts.ownProperties),()=>{const _=y.subschema({keyword:j,schemaProp:P},S);y.mergeValidEvaluated(_,S)},()=>h.var(S,!0)),y.ok(S))}e.validateSchemaDeps=m,e.default=n})(Ca);var an={};Object.defineProperty(an,"__esModule",{value:!0});const Ta=J,qi=x,zi={message:"property name must be valid",params:({params:e})=>(0,Ta._)`{propertyName: ${e.propertyName}}`},Ki={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:zi,code(e){const{gen:t,schema:r,data:a,it:n}=e;if((0,qi.alwaysValidSchema)(n,r))return;const i=t.name("valid");t.forIn("key",a,l=>{e.setParams({propertyName:l}),e.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},i),t.if((0,Ta.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};an.default=Ki;var mr={};Object.defineProperty(mr,"__esModule",{value:!0});const er=G,Ne=J,Li=Fe,tr=x,Hi={message:"must NOT have additional properties",params:({params:e})=>(0,Ne._)`{additionalProperty: ${e.additionalProperty}}`},Gi={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Hi,code(e){const{gen:t,schema:r,parentSchema:a,data:n,errsCount:i,it:l}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:m,opts:y}=l;if(l.props=!0,y.removeAdditional!=="all"&&(0,tr.alwaysValidSchema)(l,r))return;const p=(0,er.allSchemaProperties)(a.properties),h=(0,er.allSchemaProperties)(a.patternProperties);v(),e.ok((0,Ne._)`${i} === ${Li.default.errors}`);function v(){t.forIn("key",n,_=>{!p.length&&!h.length?S(_):t.if(j(_),()=>S(_))})}function j(_){let f;if(p.length>8){const N=(0,tr.schemaRefOrVal)(l,a.properties,"properties");f=(0,er.isOwnProperty)(t,N,_)}else p.length?f=(0,Ne.or)(...p.map(N=>(0,Ne._)`${_} === ${N}`)):f=Ne.nil;return h.length&&(f=(0,Ne.or)(f,...h.map(N=>(0,Ne._)`${(0,er.usePattern)(e,N)}.test(${_})`))),(0,Ne.not)(f)}function R(_){t.code((0,Ne._)`delete ${n}[${_}]`)}function S(_){if(y.removeAdditional==="all"||y.removeAdditional&&r===!1){R(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),m||t.break();return}if(typeof r=="object"&&!(0,tr.alwaysValidSchema)(l,r)){const f=t.name("valid");y.removeAdditional==="failing"?(P(_,f,!1),t.if((0,Ne.not)(f),()=>{e.reset(),R(_)})):(P(_,f),m||t.if((0,Ne.not)(f),()=>t.break()))}}function P(_,f,N){const O={keyword:"additionalProperties",dataProp:_,dataPropType:tr.Type.Str};N===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,f)}}};mr.default=Gi;var sn={};Object.defineProperty(sn,"__esModule",{value:!0});const Ji=Te,Kn=G,Er=x,Ln=mr,Bi={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:n,it:i}=e;i.opts.removeAdditional==="all"&&a.additionalProperties===void 0&&Ln.default.code(new Ji.KeywordCxt(i,Ln.default,"additionalProperties"));const l=(0,Kn.allSchemaProperties)(r);for(const v of l)i.definedProperties.add(v);i.opts.unevaluated&&l.length&&i.props!==!0&&(i.props=Er.mergeEvaluated.props(t,(0,Er.toHash)(l),i.props));const m=l.filter(v=>!(0,Er.alwaysValidSchema)(i,r[v]));if(m.length===0)return;const y=t.name("valid");for(const v of m)p(v)?h(v):(t.if((0,Kn.propertyInData)(t,n,v,i.opts.ownProperties)),h(v),i.allErrors||t.else().var(y,!0),t.endIf()),e.it.definedProperties.add(v),e.ok(y);function p(v){return i.opts.useDefaults&&!i.compositeRule&&r[v].default!==void 0}function h(v){e.subschema({keyword:"properties",schemaProp:v,dataProp:v},y)}}};sn.default=Bi;var on={};Object.defineProperty(on,"__esModule",{value:!0});const Hn=G,rr=J,Gn=x,Jn=x,Wi={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:n,it:i}=e,{opts:l}=i,m=(0,Hn.allSchemaProperties)(r),y=m.filter(P=>(0,Gn.alwaysValidSchema)(i,r[P]));if(m.length===0||y.length===m.length&&(!i.opts.unevaluated||i.props===!0))return;const p=l.strictSchema&&!l.allowMatchingProperties&&n.properties,h=t.name("valid");i.props!==!0&&!(i.props instanceof rr.Name)&&(i.props=(0,Jn.evaluatedPropsToName)(t,i.props));const{props:v}=i;j();function j(){for(const P of m)p&&R(P),i.allErrors?S(P):(t.var(h,!0),S(P),t.if(h))}function R(P){for(const _ in p)new RegExp(P).test(_)&&(0,Gn.checkStrictMode)(i,`property ${_} matches pattern ${P} (use allowMatchingProperties)`)}function S(P){t.forIn("key",a,_=>{t.if((0,rr._)`${(0,Hn.usePattern)(e,P)}.test(${_})`,()=>{const f=y.includes(P);f||e.subschema({keyword:"patternProperties",schemaProp:P,dataProp:_,dataPropType:Jn.Type.Str},h),i.opts.unevaluated&&v!==!0?t.assign((0,rr._)`${v}[${_}]`,!0):!f&&!i.allErrors&&t.if((0,rr.not)(h),()=>t.break())})})}}};on.default=Wi;var cn={};Object.defineProperty(cn,"__esModule",{value:!0});const Qi=x,Xi={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:a}=e;if((0,Qi.alwaysValidSchema)(a,r)){e.fail();return}const n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};cn.default=Xi;var un={};Object.defineProperty(un,"__esModule",{value:!0});const Yi=G,Zi={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Yi.validateUnion,error:{message:"must match a schema in anyOf"}};un.default=Zi;var ln={};Object.defineProperty(ln,"__esModule",{value:!0});const or=J,xi=x,ec={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,or._)`{passingSchemas: ${e.passing}}`},tc={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:ec,code(e){const{gen:t,schema:r,parentSchema:a,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&a.discriminator)return;const i=r,l=t.let("valid",!1),m=t.let("passing",null),y=t.name("_valid");e.setParams({passing:m}),t.block(p),e.result(l,()=>e.reset(),()=>e.error(!0));function p(){i.forEach((h,v)=>{let j;(0,xi.alwaysValidSchema)(n,h)?t.var(y,!0):j=e.subschema({keyword:"oneOf",schemaProp:v,compositeRule:!0},y),v>0&&t.if((0,or._)`${y} && ${l}`).assign(l,!1).assign(m,(0,or._)`[${m}, ${v}]`).else(),t.if(y,()=>{t.assign(l,!0),t.assign(m,v),j&&e.mergeEvaluated(j,or.Name)})})}}};ln.default=tc;var dn={};Object.defineProperty(dn,"__esModule",{value:!0});const rc=x,nc={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=t.name("valid");r.forEach((i,l)=>{if((0,rc.alwaysValidSchema)(a,i))return;const m=e.subschema({keyword:"allOf",schemaProp:l},n);e.ok(n),e.mergeEvaluated(m)})}};dn.default=nc;var fn={};Object.defineProperty(fn,"__esModule",{value:!0});const dr=J,Ra=x,ac={message:({params:e})=>(0,dr.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,dr._)`{failingKeyword: ${e.ifClause}}`},sc={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ac,code(e){const{gen:t,parentSchema:r,it:a}=e;r.then===void 0&&r.else===void 0&&(0,Ra.checkStrictMode)(a,'"if" without "then" and "else" is ignored');const n=Bn(a,"then"),i=Bn(a,"else");if(!n&&!i)return;const l=t.let("valid",!0),m=t.name("_valid");if(y(),e.reset(),n&&i){const h=t.let("ifClause");e.setParams({ifClause:h}),t.if(m,p("then",h),p("else",h))}else n?t.if(m,p("then")):t.if((0,dr.not)(m),p("else"));e.pass(l,()=>e.error(!0));function y(){const h=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);e.mergeEvaluated(h)}function p(h,v){return()=>{const j=e.subschema({keyword:h},m);t.assign(l,m),e.mergeValidEvaluated(j,l),v?t.assign(v,(0,dr._)`${h}`):e.setParams({ifClause:h})}}}};function Bn(e,t){const r=e.schema[t];return r!==void 0&&!(0,Ra.alwaysValidSchema)(e,r)}fn.default=sc;var hn={};Object.defineProperty(hn,"__esModule",{value:!0});const oc=x,ic={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,oc.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};hn.default=ic;Object.defineProperty(en,"__esModule",{value:!0});const cc=Et,uc=tn,lc=bt,dc=rn,fc=nn,hc=Ca,pc=an,mc=mr,yc=sn,vc=on,$c=cn,_c=un,gc=ln,wc=dn,Ec=fn,bc=hn;function Sc(e=!1){const t=[$c.default,_c.default,gc.default,wc.default,Ec.default,bc.default,pc.default,mc.default,hc.default,yc.default,vc.default];return e?t.push(uc.default,dc.default):t.push(cc.default,lc.default),t.push(fc.default),t}en.default=Sc;var pn={},mn={};Object.defineProperty(mn,"__esModule",{value:!0});const ue=J,Pc={message:({schemaCode:e})=>(0,ue.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,ue._)`{format: ${e}}`},Nc={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Pc,code(e,t){const{gen:r,data:a,$data:n,schema:i,schemaCode:l,it:m}=e,{opts:y,errSchemaPath:p,schemaEnv:h,self:v}=m;if(!y.validateFormats)return;n?j():R();function j(){const S=r.scopeValue("formats",{ref:v.formats,code:y.code.formats}),P=r.const("fDef",(0,ue._)`${S}[${l}]`),_=r.let("fType"),f=r.let("format");r.if((0,ue._)`typeof ${P} == "object" && !(${P} instanceof RegExp)`,()=>r.assign(_,(0,ue._)`${P}.type || "string"`).assign(f,(0,ue._)`${P}.validate`),()=>r.assign(_,(0,ue._)`"string"`).assign(f,P)),e.fail$data((0,ue.or)(N(),O()));function N(){return y.strictSchema===!1?ue.nil:(0,ue._)`${l} && !${f}`}function O(){const I=h.$async?(0,ue._)`(${P}.async ? await ${f}(${a}) : ${f}(${a}))`:(0,ue._)`${f}(${a})`,A=(0,ue._)`(typeof ${f} == "function" ? ${I} : ${f}.test(${a}))`;return(0,ue._)`${f} && ${f} !== true && ${_} === ${t} && !${A}`}}function R(){const S=v.formats[i];if(!S){N();return}if(S===!0)return;const[P,_,f]=O(S);P===t&&e.pass(I());function N(){if(y.strictSchema===!1){v.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${i}" ignored in schema at path "${p}"`}}function O(A){const g=A instanceof RegExp?(0,ue.regexpCode)(A):y.code.formats?(0,ue._)`${y.code.formats}${(0,ue.getProperty)(i)}`:void 0,C=r.scopeValue("formats",{key:i,ref:A,code:g});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,ue._)`${C}.validate`]:["string",A,C]}function I(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ue._)`await ${f}(${a})`}return typeof _=="function"?(0,ue._)`${f}(${a})`:(0,ue._)`${f}.test(${a})`}}}};mn.default=Nc;Object.defineProperty(pn,"__esModule",{value:!0});const Oc=mn,Cc=[Oc.default];pn.default=Cc;var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.contentVocabulary=wt.metadataVocabulary=void 0;wt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];wt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Ur,"__esModule",{value:!0});const Tc=qr,Rc=Kr,Ic=en,jc=pn,Wn=wt,kc=[Tc.default,Rc.default,(0,Ic.default)(),jc.default,Wn.metadataVocabulary,Wn.contentVocabulary];Ur.default=kc;var yn={},Ia={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(Ia);Object.defineProperty(yn,"__esModule",{value:!0});const vt=J,Tr=Ia,Qn=_e,Dc=x,Ac={message:({params:{discrError:e,tagName:t}})=>e===Tr.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,vt._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Mc={keyword:"discriminator",type:"object",schemaType:"object",error:Ac,code(e){const{gen:t,data:r,schema:a,parentSchema:n,it:i}=e,{oneOf:l}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const m=a.propertyName;if(typeof m!="string")throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const y=t.let("valid",!1),p=t.const("tag",(0,vt._)`${r}${(0,vt.getProperty)(m)}`);t.if((0,vt._)`typeof ${p} == "string"`,()=>h(),()=>e.error(!1,{discrError:Tr.DiscrError.Tag,tag:p,tagName:m})),e.ok(y);function h(){const R=j();t.if(!1);for(const S in R)t.elseIf((0,vt._)`${p} === ${S}`),t.assign(y,v(R[S]));t.else(),e.error(!1,{discrError:Tr.DiscrError.Mapping,tag:p,tagName:m}),t.endIf()}function v(R){const S=t.name("valid"),P=e.subschema({keyword:"oneOf",schemaProp:R},S);return e.mergeEvaluated(P,vt.Name),S}function j(){var R;const S={},P=f(n);let _=!0;for(let I=0;I<l.length;I++){let A=l[I];A!=null&&A.$ref&&!(0,Dc.schemaHasRulesButRef)(A,i.self.RULES)&&(A=Qn.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,A==null?void 0:A.$ref),A instanceof Qn.SchemaEnv&&(A=A.schema));const g=(R=A==null?void 0:A.properties)===null||R===void 0?void 0:R[m];if(typeof g!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`);_=_&&(P||f(A)),N(g,I)}if(!_)throw new Error(`discriminator: "${m}" must be required`);return S;function f({required:I}){return Array.isArray(I)&&I.includes(m)}function N(I,A){if(I.const)O(I.const,A);else if(I.enum)for(const g of I.enum)O(g,A);else throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`)}function O(I,A){if(typeof I!="string"||I in S)throw new Error(`discriminator: "${m}" values must be unique strings`);S[I]=A}}}};yn.default=Mc;const Vc="http://json-schema.org/draft-07/schema#",Fc="http://json-schema.org/draft-07/schema#",Uc="Core schema meta-schema",qc={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:[]}},zc=["object","boolean"],Kc={$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:"#"}},Lc={$schema:Vc,$id:Fc,title:Uc,definitions:qc,type:zc,properties:Kc,default:!0};(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=void 0;const r=Yn,a=Ur,n=yn,i=Lc,l=["/properties"],m="http://json-schema.org/draft-07/schema";class y extends r.default{_addVocabularies(){super._addVocabularies(),a.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(i,l):i;this.addMetaSchema(S,m,!1),this.refs["http://json-schema.org/schema"]=m}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(m)?m:void 0)}}e.exports=t=y,Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var p=Te;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var h=J;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var v=Gt;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return v.default}});var j=Jt;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return j.default}})})(br,br.exports);var Hc=br.exports;const Gc=Ha(Hc),Jc={$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{uuid:{type:"string",nullable:!0},authors:{items:{type:"string"},type:"array",nullable:!0},displayName:{type:"string",nullable:!0},publishDate:{type:"number",nullable:!0},viewUrl:{type:"string",nullable:!0},downloadUrl:{type:"string",nullable:!0},md5:{type:"string",nullable:!0},phash:{type:"string",nullable:!0},resolution:{items:[{type:"number"},{type:"number"}],minItems:2,maxItems:2,type:"array",nullable:!0},fileSize:{type:"number",nullable:!0},languages:{items:{type:"string"},type:"array",nullable:!0},tags:{items:{type:"string"},type:"array",nullable:!0},abstract:{type:"string",nullable:!0},rights:{type:"string",nullable:!0},source:{type:"object",properties:{name:{type:"string"},url:{type:"string"},accessDate:{type:"string"}},required:["name","url","accessDate"],additionalProperties:!1,nullable:!0}},additionalProperties:!0},Bc=new Gc({allowUnionTypes:!0}),Wc=Bc.compile(Jc),Qc=e=>{let t=null,r=!1,a=!1;try{t=JSON.parse(e),r=!0,a=Wc(t)}catch{}return{parsed:t,validJson:r,validVisualization:a}},vn=Ga("json",{state:()=>({text:""}),getters:{validationResult:e=>Qc(e.text),parsed(){return this.validationResult.parsed},validJson(){return this.validationResult.validJson},validVisualization(){return this.validationResult.validVisualization}},persist:!0}),Xc={"view-container":""},Yc=me("div",{"view-header":""},[me("div",{class:"i-fa6-solid:code my-auto"}),me("div",{class:"font-bold"}," Data Entry Parsed ")],-1),Zc={class:"overflow-auto p-1 flex-1 flex"},xc={key:1,class:"text-red m-auto"},eu=Rr({__name:"TheViewDataEntryParsed",setup(e){const{parsed:t}=Ir(vn());return(r,a)=>{const n=Ja;return Je(),_t("div",Xc,[Yc,me("div",Zc,[Oe(t)!==null?(Je(),Xn(n,{key:0,datum:Oe(t)},null,8,["datum"])):(Je(),_t("div",xc," Invalid Data Entry "))])])}}}),tu={"view-container":""},ru=me("div",{"view-header":""},[me("div",{class:"i-fa6-solid:code my-auto"}),me("div",{class:"font-bold"}," JSON Parsed ")],-1),nu={class:"overflow-auto p-1 flex-1 flex"},au={key:1,class:"text-red m-auto"},su=Rr({__name:"TheViewJsonParsed",setup(e){const{parsed:t,validJson:r}=Ir(vn());return(a,n)=>(Je(),_t("div",tu,[ru,me("div",nu,[Oe(r)?(Je(),Xn(Oe(Wa),{key:0,data:Oe(t),"expand-level":5,"dark-theme":Oe(Ba)},null,8,["data","dark-theme"])):(Je(),_t("div",au," Invalid JSON "))])]))}}),ou={"view-container":""},iu={"view-header":""},cu=me("div",{class:"i-fa6-solid:code my-auto"},null,-1),uu=me("div",{class:"font-bold"}," JSON Input ",-1),lu=["disabled"],du=["disabled"],fu=me("a",{rel:"noreferrer",href:"https://github.com/oldvis/dataset/issues",target:"_blank"}," submit ",-1),hu=[fu],pu=Rr({__name:"TheViewJsonInput",setup(e){const{text:t,validJson:r}=Ir(vn()),a=()=>{r.value&&(t.value=JSON.stringify(JSON.parse(t.value),null,4))};return(n,i)=>(Je(),_t("div",ou,[me("div",iu,[cu,uu,me("button",{btn:"",class:Rn(["ml-auto py-0",{"pointer-events-none":!Oe(r)}]),title:"Format the JSON",disabled:!Oe(r),onClick:a}," format ",10,lu),me("button",{btn:"",class:Rn(["py-0",{"pointer-events-none":!Oe(r)}]),title:"Submit to server",disabled:!Oe(r)},hu,10,du)]),Qa(me("textarea",{"onUpdate:modelValue":i[0]||(i[0]=l=>Ya(t)?t.value=l:null),"input-area":"",class:"flex-1 m-1 py-1 text-sm resize-none",placeholder:"Your JSON..."},null,512),[[Xa,Oe(t)]])]))}}),mu={},yu={class:"flex grow gap-1 m-1 overflow-auto"},vu={class:"flex-1 gap-1",flex:"~ col"};function $u(e,t){const r=pu,a=su,n=eu;return Je(),_t("div",yu,[me("div",vu,[vr(r,{class:"flex-1"}),vr(a,{class:"flex-1"})]),vr(n,{class:"flex-1"})])}const gu=Za(mu,[["render",$u]]);export{gu as default};
